oasis-editor 0.0.42 → 0.0.43

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.
@@ -2483,7 +2483,7 @@ function OasisEditorAppLazy(props = {}) {
2483
2483
  onCleanup(() => {
2484
2484
  cancelled = true;
2485
2485
  });
2486
- import("./OasisEditorApp-Cx-3bgIC.js").then((m) => {
2486
+ import("./OasisEditorApp-BOjvnIF_.js").then((m) => {
2487
2487
  cancelled = true;
2488
2488
  setProgress(1);
2489
2489
  setTimeout(() => setApp(() => m.OasisEditorApp), 180);
@@ -5220,7 +5220,15 @@ function applyFootnotesToPages(pages, context2) {
5220
5220
  };
5221
5221
  });
5222
5222
  }
5223
- const PX_PER_POINT$2 = 96 / 72;
5223
+ const PX_PER_INCH = 96;
5224
+ const POINTS_PER_INCH = 72;
5225
+ const PX_PER_POINT = PX_PER_INCH / POINTS_PER_INCH;
5226
+ const PT_PER_PX = POINTS_PER_INCH / PX_PER_INCH;
5227
+ const PX_PER_CM = PX_PER_INCH / 2.54;
5228
+ const EMU_PER_PX = 9525;
5229
+ const EMU_PER_PT = 12700;
5230
+ const TWIPS_PER_INCH = 1440;
5231
+ const TWIPS_PER_POINT = 20;
5224
5232
  const PARAGRAPH_BORDER_PADDING_PX = 2;
5225
5233
  function isVisibleBorder$1(border) {
5226
5234
  return !!border && border.type !== "none" && border.width > 0;
@@ -5229,7 +5237,7 @@ function edgeInset(border) {
5229
5237
  if (!isVisibleBorder$1(border)) {
5230
5238
  return 0;
5231
5239
  }
5232
- return border.width * PX_PER_POINT$2 + PARAGRAPH_BORDER_PADDING_PX;
5240
+ return border.width * PX_PER_POINT + PARAGRAPH_BORDER_PADDING_PX;
5233
5241
  }
5234
5242
  function getParagraphBorderInsets(style2) {
5235
5243
  return {
@@ -5238,7 +5246,6 @@ function getParagraphBorderInsets(style2) {
5238
5246
  };
5239
5247
  }
5240
5248
  const DEFAULT_FONT_SIZE$3 = 14.6667;
5241
- const PX_PER_POINT$1 = 96 / 72;
5242
5249
  class TtfDecoder {
5243
5250
  constructor() {
5244
5251
  __publicField(this, "format", "ttf");
@@ -10725,7 +10732,7 @@ function measureCharacterWidth(char, styles, fallbackFontSize) {
10725
10732
  const font = buildCanvasFont(styles, fallbackFontSize);
10726
10733
  const renderedChar = getRenderedMeasureChar(char, styles);
10727
10734
  const scale = (styles == null ? void 0 : styles.characterScale) && styles.characterScale > 0 ? styles.characterScale / 100 : 1;
10728
- const spacing = ((styles == null ? void 0 : styles.characterSpacing) ?? 0) * PX_PER_POINT$1;
10735
+ const spacing = ((styles == null ? void 0 : styles.characterSpacing) ?? 0) * PX_PER_POINT;
10729
10736
  const cacheKey = `${font}|${renderedChar}|${scale}|${spacing}`;
10730
10737
  const cached = textMeasureCache.get(cacheKey);
10731
10738
  if (cached !== void 0) {
@@ -10859,7 +10866,7 @@ function getListTextFirstLineInset(paragraph, paragraphStyle, baseInset) {
10859
10866
  if (suffix !== "tab") {
10860
10867
  return baseInset;
10861
10868
  }
10862
- const nextTabStop = (paragraphStyle.tabs ?? []).filter((tab) => tab.type !== "clear" && Number.isFinite(tab.position)).map((tab) => tab.position * PX_PER_POINT$1).filter((positionPx) => positionPx > numberStart + 0.01).sort((a, b) => a - b)[0];
10869
+ const nextTabStop = (paragraphStyle.tabs ?? []).filter((tab) => tab.type !== "clear" && Number.isFinite(tab.position)).map((tab) => tab.position * PX_PER_POINT).filter((positionPx) => positionPx > numberStart + 0.01).sort((a, b) => a - b)[0];
10863
10870
  return nextTabStop !== void 0 ? Math.max(baseInset, nextTabStop) : baseInset;
10864
10871
  }
10865
10872
  function getListLabelInset(paragraph, styles) {
@@ -10955,7 +10962,7 @@ function getParagraphLineHeight(paragraph, styles, fallbackFontSize) {
10955
10962
  styles
10956
10963
  );
10957
10964
  const fontSize = runTextStyle.fontSize ?? paragraphTextStyle.fontSize ?? fallbackFontSize;
10958
- const baselineShiftPx = Math.abs(runTextStyle.baselineShift ?? 0) * PX_PER_POINT$1;
10965
+ const baselineShiftPx = Math.abs(runTextStyle.baselineShift ?? 0) * PX_PER_POINT;
10959
10966
  const runLineHeight = resolveRenderedLineHeightPx(
10960
10967
  { ...runTextStyle, fontSize },
10961
10968
  lineHeight
@@ -11005,12 +11012,12 @@ function resolveTabAdvancePx(paragraph, styles, defaultTabStop, lineStartInset,
11005
11012
  const tabOrigin = 0;
11006
11013
  const explicitStops = (paragraphStyle.tabs ?? []).filter((tab) => tab.type !== "clear" && Number.isFinite(tab.position)).map((tab) => ({
11007
11014
  ...tab,
11008
- positionPx: tabOrigin + tab.position * PX_PER_POINT$1
11015
+ positionPx: tabOrigin + tab.position * PX_PER_POINT
11009
11016
  })).filter((tab) => tab.positionPx > currentLeft + 0.01).sort((a, b) => a.positionPx - b.positionPx);
11010
11017
  const explicitStop = explicitStops[0];
11011
11018
  const nextStop = (explicitStop == null ? void 0 : explicitStop.positionPx) ?? tabOrigin + Math.ceil(
11012
- (currentLeft - tabOrigin + 0.01) / ((defaultTabStop ?? DEFAULT_TAB_STOP_POINTS) * PX_PER_POINT$1)
11013
- ) * ((defaultTabStop ?? DEFAULT_TAB_STOP_POINTS) * PX_PER_POINT$1);
11019
+ (currentLeft - tabOrigin + 0.01) / ((defaultTabStop ?? DEFAULT_TAB_STOP_POINTS) * PX_PER_POINT)
11020
+ ) * ((defaultTabStop ?? DEFAULT_TAB_STOP_POINTS) * PX_PER_POINT);
11014
11021
  let alignmentAdjustment = 0;
11015
11022
  if ((explicitStop == null ? void 0 : explicitStop.type) === "right" || (explicitStop == null ? void 0 : explicitStop.type) === "center") {
11016
11023
  const followingWidth = measureTabAlignedTextWidth(tabOffset, measuredChars);
@@ -11731,9 +11738,8 @@ function installGlobalReport() {
11731
11738
  return stats;
11732
11739
  };
11733
11740
  }
11734
- const EMU_PER_PX$1 = 9525;
11735
11741
  function emuToPx$1(value) {
11736
- return value === void 0 ? 0 : value / EMU_PER_PX$1;
11742
+ return value === void 0 ? 0 : value / EMU_PER_PX;
11737
11743
  }
11738
11744
  function clampFinite(value, fallback) {
11739
11745
  return Number.isFinite(value) ? value : fallback;
@@ -12339,11 +12345,10 @@ function estimateParagraphBlockHeight(paragraph, styles, contentWidth, measurer
12339
12345
  const insets = getParagraphBorderInsets(paragraphStyle);
12340
12346
  return spacingBefore + spacingAfter + lineHeightPx + insets.top + insets.bottom;
12341
12347
  }
12342
- const POINT_TO_PX$2 = 96 / 72;
12343
12348
  const MIN_TABLE_CELL_CONTENT_WIDTH_PX$2 = 24;
12344
12349
  const DEFAULT_CELL_PADDING_LEFT_RIGHT_PX$1 = 7.2;
12345
12350
  function toPx$1(valuePt) {
12346
- return valuePt * POINT_TO_PX$2;
12351
+ return valuePt * PX_PER_POINT;
12347
12352
  }
12348
12353
  function resolveTableWidthPx(table, pageContentWidthPx) {
12349
12354
  var _a;
@@ -12439,27 +12444,26 @@ function getTableCellContentWidthForParagraph(document2, paragraphId, activeSect
12439
12444
  }
12440
12445
  const DEFAULT_FONT_SIZE$1 = 14.6667;
12441
12446
  const DEFAULT_LINE_HEIGHT = 1.15;
12442
- const POINT_TO_PX$1 = 96 / 72;
12443
12447
  const DEFAULT_TABLE_CELL_HORIZONTAL_PADDING_PX = 14.4;
12444
12448
  const MIN_TABLE_CELL_CONTENT_WIDTH_PX$1 = 24;
12445
12449
  const DEFAULT_TABLE_SEGMENT_VERTICAL_SPACING = 0;
12446
12450
  const DEFAULT_TABLE_ROW_VERTICAL_SPACING = 0;
12447
12451
  function getCellHorizontalChromePx(cell) {
12448
12452
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
12449
- const padLeft = ((_a = cell.style) == null ? void 0 : _a.padding) !== void 0 ? cell.style.padding * POINT_TO_PX$1 : ((_b = cell.style) == null ? void 0 : _b.paddingLeft) !== void 0 ? cell.style.paddingLeft * POINT_TO_PX$1 : ((_c = cell.style) == null ? void 0 : _c.paddingStart) !== void 0 ? cell.style.paddingStart * POINT_TO_PX$1 : DEFAULT_TABLE_CELL_HORIZONTAL_PADDING_PX / 2;
12450
- const padRight = ((_d = cell.style) == null ? void 0 : _d.padding) !== void 0 ? cell.style.padding * POINT_TO_PX$1 : ((_e = cell.style) == null ? void 0 : _e.paddingRight) !== void 0 ? cell.style.paddingRight * POINT_TO_PX$1 : ((_f = cell.style) == null ? void 0 : _f.paddingEnd) !== void 0 ? cell.style.paddingEnd * POINT_TO_PX$1 : DEFAULT_TABLE_CELL_HORIZONTAL_PADDING_PX / 2;
12453
+ const padLeft = ((_a = cell.style) == null ? void 0 : _a.padding) !== void 0 ? cell.style.padding * PX_PER_POINT : ((_b = cell.style) == null ? void 0 : _b.paddingLeft) !== void 0 ? cell.style.paddingLeft * PX_PER_POINT : ((_c = cell.style) == null ? void 0 : _c.paddingStart) !== void 0 ? cell.style.paddingStart * PX_PER_POINT : DEFAULT_TABLE_CELL_HORIZONTAL_PADDING_PX / 2;
12454
+ const padRight = ((_d = cell.style) == null ? void 0 : _d.padding) !== void 0 ? cell.style.padding * PX_PER_POINT : ((_e = cell.style) == null ? void 0 : _e.paddingRight) !== void 0 ? cell.style.paddingRight * PX_PER_POINT : ((_f = cell.style) == null ? void 0 : _f.paddingEnd) !== void 0 ? cell.style.paddingEnd * PX_PER_POINT : DEFAULT_TABLE_CELL_HORIZONTAL_PADDING_PX / 2;
12451
12455
  const leftBorder = ((_g = cell.style) == null ? void 0 : _g.borderLeft) ?? ((_h = cell.style) == null ? void 0 : _h.borderStart);
12452
12456
  const rightBorder = ((_i = cell.style) == null ? void 0 : _i.borderRight) ?? ((_j = cell.style) == null ? void 0 : _j.borderEnd);
12453
- const borderLeft = leftBorder ? Math.max(0, leftBorder.width * POINT_TO_PX$1) : 1;
12454
- const borderRight = rightBorder ? Math.max(0, rightBorder.width * POINT_TO_PX$1) : 1;
12457
+ const borderLeft = leftBorder ? Math.max(0, leftBorder.width * PX_PER_POINT) : 1;
12458
+ const borderRight = rightBorder ? Math.max(0, rightBorder.width * PX_PER_POINT) : 1;
12455
12459
  return Math.max(0, padLeft + padRight + borderLeft + borderRight);
12456
12460
  }
12457
12461
  function getCellVerticalChromePx(cell) {
12458
12462
  var _a, _b, _c, _d, _e, _f;
12459
- const padTop = ((_a = cell.style) == null ? void 0 : _a.padding) !== void 0 ? cell.style.padding * POINT_TO_PX$1 : ((_b = cell.style) == null ? void 0 : _b.paddingTop) !== void 0 ? cell.style.paddingTop * POINT_TO_PX$1 : 0;
12460
- const padBottom = ((_c = cell.style) == null ? void 0 : _c.padding) !== void 0 ? cell.style.padding * POINT_TO_PX$1 : ((_d = cell.style) == null ? void 0 : _d.paddingBottom) !== void 0 ? cell.style.paddingBottom * POINT_TO_PX$1 : 0;
12461
- const borderTop = ((_e = cell.style) == null ? void 0 : _e.borderTop) ? Math.max(0, cell.style.borderTop.width * POINT_TO_PX$1) : 1;
12462
- const borderBottom = ((_f = cell.style) == null ? void 0 : _f.borderBottom) ? Math.max(0, cell.style.borderBottom.width * POINT_TO_PX$1) : 1;
12463
+ const padTop = ((_a = cell.style) == null ? void 0 : _a.padding) !== void 0 ? cell.style.padding * PX_PER_POINT : ((_b = cell.style) == null ? void 0 : _b.paddingTop) !== void 0 ? cell.style.paddingTop * PX_PER_POINT : 0;
12464
+ const padBottom = ((_c = cell.style) == null ? void 0 : _c.padding) !== void 0 ? cell.style.padding * PX_PER_POINT : ((_d = cell.style) == null ? void 0 : _d.paddingBottom) !== void 0 ? cell.style.paddingBottom * PX_PER_POINT : 0;
12465
+ const borderTop = ((_e = cell.style) == null ? void 0 : _e.borderTop) ? Math.max(0, cell.style.borderTop.width * PX_PER_POINT) : 1;
12466
+ const borderBottom = ((_f = cell.style) == null ? void 0 : _f.borderBottom) ? Math.max(0, cell.style.borderBottom.width * PX_PER_POINT) : 1;
12463
12467
  return Math.max(0, padTop + padBottom + borderTop + borderBottom);
12464
12468
  }
12465
12469
  function getTableCellContentWidth(cell, fallbackContentWidth, columnWidthPx) {
@@ -12473,8 +12477,8 @@ function getTableCellContentWidth(cell, fallbackContentWidth, columnWidthPx) {
12473
12477
  if (typeof ((_a = cell.style) == null ? void 0 : _a.width) !== "number") {
12474
12478
  return fallbackContentWidth;
12475
12479
  }
12476
- const widthPx = cell.style.width * POINT_TO_PX$1;
12477
- const horizontalPaddingPx = cell.style.padding !== void 0 ? cell.style.padding * POINT_TO_PX$1 * 2 : DEFAULT_TABLE_CELL_HORIZONTAL_PADDING_PX;
12480
+ const widthPx = cell.style.width * PX_PER_POINT;
12481
+ const horizontalPaddingPx = cell.style.padding !== void 0 ? cell.style.padding * PX_PER_POINT * 2 : DEFAULT_TABLE_CELL_HORIZONTAL_PADDING_PX;
12478
12482
  return Math.max(
12479
12483
  MIN_TABLE_CELL_CONTENT_WIDTH_PX$1,
12480
12484
  widthPx - horizontalPaddingPx
@@ -12482,7 +12486,7 @@ function getTableCellContentWidth(cell, fallbackContentWidth, columnWidthPx) {
12482
12486
  }
12483
12487
  function parseTableRowHeightToPx(height) {
12484
12488
  if (typeof height === "number" && Number.isFinite(height)) {
12485
- return Math.max(0, height * POINT_TO_PX$1);
12489
+ return Math.max(0, height * PX_PER_POINT);
12486
12490
  }
12487
12491
  if (typeof height !== "string") {
12488
12492
  return null;
@@ -12493,7 +12497,7 @@ function parseTableRowHeightToPx(height) {
12493
12497
  }
12494
12498
  if (trimmed.endsWith("pt")) {
12495
12499
  const parsed2 = Number.parseFloat(trimmed.slice(0, -2));
12496
- return Number.isFinite(parsed2) ? Math.max(0, parsed2 * POINT_TO_PX$1) : null;
12500
+ return Number.isFinite(parsed2) ? Math.max(0, parsed2 * PX_PER_POINT) : null;
12497
12501
  }
12498
12502
  if (trimmed.endsWith("px")) {
12499
12503
  const parsed2 = Number.parseFloat(trimmed.slice(0, -2));
@@ -12503,7 +12507,7 @@ function parseTableRowHeightToPx(height) {
12503
12507
  return null;
12504
12508
  }
12505
12509
  const parsed = Number.parseFloat(trimmed);
12506
- return Number.isFinite(parsed) ? Math.max(0, parsed * POINT_TO_PX$1) : null;
12510
+ return Number.isFinite(parsed) ? Math.max(0, parsed * PX_PER_POINT) : null;
12507
12511
  }
12508
12512
  const tableColumnGeometryCache = /* @__PURE__ */ new WeakMap();
12509
12513
  function getCachedTableColumnGeometry(table, contentWidthPx) {
@@ -14388,7 +14392,7 @@ function resolveCanvasFontFamily(fontFamily) {
14388
14392
  return [...families.map(quoteFontFamily), generic].join(", ");
14389
14393
  }
14390
14394
  function resolveCanvasTextRenderMetrics(styles, fontSize) {
14391
- const explicitBaselineShift = ((styles == null ? void 0 : styles.baselineShift) ?? 0) * PX_PER_POINT$2;
14395
+ const explicitBaselineShift = ((styles == null ? void 0 : styles.baselineShift) ?? 0) * PX_PER_POINT;
14392
14396
  if (styles == null ? void 0 : styles.smallCaps) {
14393
14397
  return {
14394
14398
  fontSize: fontSize * 0.8,
@@ -14600,9 +14604,8 @@ const DEFAULT_CELL_PADDING_TOP_BOTTOM_PX = 0;
14600
14604
  const DEFAULT_CELL_PADDING_LEFT_RIGHT_PX = 7.2;
14601
14605
  const MIN_TABLE_CELL_CONTENT_WIDTH_PX = 24;
14602
14606
  const MIN_TABLE_CELL_CONTENT_HEIGHT_PX = 1;
14603
- const POINT_TO_PX = 96 / 72;
14604
14607
  function toPx(value) {
14605
- return value * POINT_TO_PX;
14608
+ return value * PX_PER_POINT;
14606
14609
  }
14607
14610
  function parseDimensionToPx(value) {
14608
14611
  if (typeof value === "number" && Number.isFinite(value)) {
@@ -19511,7 +19514,7 @@ function drawTextBoxShape(ctx, textBox, x, y, width, height) {
19511
19514
  }
19512
19515
  if (borderColor && borderWidth > 0) {
19513
19516
  ctx.strokeStyle = borderColor;
19514
- ctx.lineWidth = Math.max(1, borderWidth * (96 / 72));
19517
+ ctx.lineWidth = Math.max(1, borderWidth * PX_PER_POINT);
19515
19518
  ctx.stroke(path);
19516
19519
  }
19517
19520
  ctx.restore();
@@ -19813,7 +19816,7 @@ function resolveTabLeader(paragraph, line, tabLeft, state) {
19813
19816
  }
19814
19817
  const lineStart = ((_a = line.slots[0]) == null ? void 0 : _a.left) ?? 0;
19815
19818
  const relativeLeft = tabLeft - lineStart;
19816
- const stop = tabs.filter((tab) => tab.type !== "clear").map((tab) => ({ ...tab, positionPx: tab.position * PX_PER_POINT$2 })).filter((tab) => tab.positionPx > relativeLeft + 0.01).sort((a, b) => a.positionPx - b.positionPx)[0];
19819
+ const stop = tabs.filter((tab) => tab.type !== "clear").map((tab) => ({ ...tab, positionPx: tab.position * PX_PER_POINT })).filter((tab) => tab.positionPx > relativeLeft + 0.01).sort((a, b) => a.positionPx - b.positionPx)[0];
19817
19820
  return (stop == null ? void 0 : stop.leader) && stop.leader !== "none" ? stop.leader : void 0;
19818
19821
  }
19819
19822
  function drawTabLeader(ctx, leader, x1, x2, y) {
@@ -20467,7 +20470,7 @@ function toCanvasEdge(border) {
20467
20470
  return void 0;
20468
20471
  }
20469
20472
  return {
20470
- width: border.width * PX_PER_POINT$2,
20473
+ width: border.width * PX_PER_POINT,
20471
20474
  color: border.color,
20472
20475
  type: border.type
20473
20476
  };
@@ -21385,8 +21388,6 @@ function getToolbarStyleState(state) {
21385
21388
  };
21386
21389
  }
21387
21390
  const EDITOR_SCROLL_PADDING_PX = 34;
21388
- const PX_PER_INCH$2 = 96;
21389
- const PX_PER_CM = PX_PER_INCH$2 / 2.54;
21390
21391
  const MIN_CONTENT_WIDTH_PX = 24;
21391
21392
  function resolveFirstLineOffset(indents) {
21392
21393
  if (indents.indentHanging > 0) {
@@ -21423,7 +21424,7 @@ function measurePageLeft(viewport) {
21423
21424
  return paperRect.left - viewportRect.left + viewport.scrollLeft;
21424
21425
  }
21425
21426
  function computeRulerTicks(pageWidth, contentLeft, unit) {
21426
- const major = unit === "in" ? PX_PER_INCH$2 : PX_PER_CM;
21427
+ const major = unit === "in" ? PX_PER_INCH : PX_PER_CM;
21427
21428
  const subdivisions = unit === "in" ? 8 : 10;
21428
21429
  const step = major / subdivisions;
21429
21430
  const ticks = [];
@@ -31177,8 +31178,6 @@ function resolveThemeFont(fonts, themeFonts) {
31177
31178
  const normalizedThemeKey = themeKey === "majorAscii" || themeKey === "majorHAnsi" ? "majorHAnsi" : themeKey === "minorAscii" || themeKey === "minorHAnsi" ? "minorHAnsi" : themeKey === "majorEastAsia" ? "majorEastAsia" : themeKey === "minorEastAsia" ? "minorEastAsia" : themeKey === "majorBidi" ? "majorBidi" : themeKey === "minorBidi" ? "minorBidi" : void 0;
31178
31179
  return normalizedThemeKey ? themeFonts[normalizedThemeKey] : void 0;
31179
31180
  }
31180
- const TWIPS_PER_INCH = 1440;
31181
- const PX_PER_INCH$1 = 96;
31182
31181
  const PAGE_BREAK_MARKER = "\f";
31183
31182
  const DOCX_IMPLICIT_SINGLE_LINE_HEIGHT = 1.1;
31184
31183
  function twipsToPx(value, fallback) {
@@ -31186,7 +31185,7 @@ function twipsToPx(value, fallback) {
31186
31185
  if (!Number.isFinite(parsed)) {
31187
31186
  return fallback;
31188
31187
  }
31189
- return Math.round(parsed / TWIPS_PER_INCH * PX_PER_INCH$1);
31188
+ return Math.round(parsed / TWIPS_PER_INCH * PX_PER_INCH);
31190
31189
  }
31191
31190
  function twipsToPoints(value) {
31192
31191
  const parsed = value ? Number(value) : Number.NaN;
@@ -31200,7 +31199,7 @@ function halfPointsToPx(value) {
31200
31199
  if (!Number.isFinite(parsed)) {
31201
31200
  return null;
31202
31201
  }
31203
- return Math.round(parsed / 2 / 72 * PX_PER_INCH$1 * 1e4) / 1e4;
31202
+ return Math.round(parsed / 2 / 72 * PX_PER_INCH * 1e4) / 1e4;
31204
31203
  }
31205
31204
  function normalizeImportedFontFamily(value) {
31206
31205
  const family = value == null ? void 0 : value.trim();
@@ -32539,13 +32538,9 @@ function applyDocGridLinePitch(blocks, linePitchPx, mode, docGridType, settings)
32539
32538
  }
32540
32539
  }
32541
32540
  }
32542
- const EMU_PER_PX = 9525;
32543
- const EMU_PER_PT = 12700;
32544
32541
  const OOXML_PERCENT_DENOMINATOR = 1e5;
32545
32542
  const OOXML_ROTATION_UNITS = 6e4;
32546
32543
  const VML_FRACTION_DENOMINATOR = 65536;
32547
- const PX_PER_INCH = 96;
32548
- const PX_PER_POINT = PX_PER_INCH / 72;
32549
32544
  function emuToPx(value) {
32550
32545
  const emu = parseOptionalInt$1(value);
32551
32546
  return emu === void 0 ? void 0 : Math.round(emu / EMU_PER_PX);
@@ -35604,7 +35599,7 @@ function importDocxInWorker(buffer, options = {}) {
35604
35599
  const worker = new Worker(
35605
35600
  new URL(
35606
35601
  /* @vite-ignore */
35607
- "" + new URL("assets/importDocxWorker-CMMv6C-7.js", import.meta.url).href,
35602
+ "" + new URL("assets/importDocxWorker-BFWGoKvI.js", import.meta.url).href,
35608
35603
  import.meta.url
35609
35604
  ),
35610
35605
  {
@@ -38082,7 +38077,7 @@ class MenuRegistry {
38082
38077
  return [...this.items];
38083
38078
  }
38084
38079
  }
38085
- const PX_TO_PT = 72 / 96;
38080
+ const PX_TO_PT = PT_PER_PX;
38086
38081
  const DEFAULT_FONT_SIZE_PX = 14.6667;
38087
38082
  function pxToPt(value) {
38088
38083
  if (!Number.isFinite(value)) {
@@ -39007,12 +39002,11 @@ function SectionGroup(props) {
39007
39002
  }
39008
39003
  });
39009
39004
  }
39010
- const CM_TO_PX = 96 / 2.54;
39011
39005
  function cmToPx(cm) {
39012
- return Math.round(cm * CM_TO_PX);
39006
+ return Math.round(cm * PX_PER_CM);
39013
39007
  }
39014
39008
  function pxToCm(px) {
39015
- return Math.round(px / CM_TO_PX * 100) / 100;
39009
+ return Math.round(px / PX_PER_CM * 100) / 100;
39016
39010
  }
39017
39011
  const MARGIN_PRESETS = [
39018
39012
  {
@@ -39941,186 +39935,192 @@ const OASIS_MENU_ITEMS = {
39941
39935
  formatListsNumbered: "format_lists_numbered"
39942
39936
  };
39943
39937
  export {
39944
- resolveFloatingObjectRect as $,
39938
+ EMU_PER_PT as $,
39945
39939
  createFootnoteReferenceRun as A,
39946
39940
  renumberFootnotes as B,
39947
39941
  iterateFootnoteReferenceRuns as C,
39948
39942
  getFootnoteDisplayMarker as D,
39949
- createSignal as E,
39950
- createEffect as F,
39951
- onCleanup as G,
39952
- buildCanvasLayoutSnapshot as H,
39953
- on as I,
39954
- onMount as J,
39955
- debounce as K,
39956
- unwrap as L,
39957
- getDocumentParagraphs as M,
39958
- getDocumentSectionsCanonical as N,
39959
- createEditorDocument as O,
39960
- getPageContentWidth as P,
39961
- getDocumentPageSettings as Q,
39962
- getTableCellContentWidthForParagraph as R,
39963
- resolveResizedDimensions as S,
39964
- resolveTextBoxRenderHeight as T,
39965
- resolveEffectiveParagraphStyle as U,
39966
- resolveEffectiveTextStyleForParagraph as V,
39967
- iterateEndnoteReferenceRuns as W,
39968
- JSZip as X,
39969
- imageContentTypeDefaults as Y,
39970
- imageExtensionFromMime as Z,
39971
- pxToPt as _,
39943
+ EMU_PER_PX as E,
39944
+ createSignal as F,
39945
+ createEffect as G,
39946
+ onCleanup as H,
39947
+ buildCanvasLayoutSnapshot as I,
39948
+ on as J,
39949
+ onMount as K,
39950
+ debounce as L,
39951
+ unwrap as M,
39952
+ getDocumentParagraphs as N,
39953
+ getDocumentSectionsCanonical as O,
39954
+ PT_PER_PX as P,
39955
+ createEditorDocument as Q,
39956
+ getPageContentWidth as R,
39957
+ getDocumentPageSettings as S,
39958
+ getTableCellContentWidthForParagraph as T,
39959
+ resolveResizedDimensions as U,
39960
+ resolveTextBoxRenderHeight as V,
39961
+ TWIPS_PER_POINT as W,
39962
+ PX_PER_INCH as X,
39963
+ TWIPS_PER_INCH as Y,
39964
+ resolveEffectiveParagraphStyle as Z,
39965
+ resolveEffectiveTextStyleForParagraph as _,
39972
39966
  getParagraphLength as a,
39973
- getCaretRectFromSnapshot as a$,
39974
- getTextBoxFloatingGeometry as a0,
39975
- getPresetPathSegments as a1,
39976
- projectBlocksLayout as a2,
39977
- buildListLabels as a3,
39978
- textStyleToFontSizePt as a4,
39979
- PX_PER_POINT$2 as a5,
39980
- DEFAULT_FONT_SIZE_PX as a6,
39981
- isDoubleUnderlineStyle as a7,
39982
- isWavyUnderlineStyle as a8,
39983
- underlineStyleLineWidthPx as a9,
39984
- fontSizePxToPt as aA,
39985
- probeLocalFontFamilies as aB,
39986
- createInitialEditorState as aC,
39987
- parseFontSizePtToPx as aD,
39988
- formatFontSizePt as aE,
39989
- listKindForTag as aF,
39990
- isParagraphTag as aG,
39991
- collectInlineRuns as aH,
39992
- parseParagraphStyle as aI,
39993
- getCachedCanvasImage as aJ,
39994
- getHeadingLevel as aK,
39995
- preciseFontModeVersion as aL,
39996
- isPreciseFontModeEnabled as aM,
39997
- togglePreciseFontMode as aN,
39998
- nextFontSizePt as aO,
39999
- previousFontSizePt as aP,
40000
- fontSizePtToPx as aQ,
40001
- createDefaultToolbarPreset as aR,
40002
- MenuRegistry as aS,
40003
- createToolbarRegistry as aT,
40004
- Editor as aU,
40005
- resolveCommandRef as aV,
40006
- commandRefName as aW,
40007
- InlineShell as aX,
40008
- BalloonShell as aY,
40009
- DocumentShell as aZ,
40010
- createMemo as a_,
40011
- underlineStyleDashArray as aa,
40012
- resolveListLabel as ab,
40013
- getListLabelInset as ac,
40014
- getAlignedListLabelInset as ad,
40015
- getParagraphBorderInsets as ae,
40016
- buildSegmentTable as af,
40017
- buildCanvasTableLayout as ag,
40018
- normalizeFamily as ah,
40019
- ROBOTO_FONT_FILES as ai,
40020
- loadFontAsset as aj,
40021
- OFFICE_COMPAT_FONT_FAMILIES as ak,
40022
- buildSfnt as al,
40023
- defaultFontDecoderRegistry as am,
40024
- SfntFontProgram as an,
40025
- collectPdfFontFamilies as ao,
40026
- projectDocumentLayout as ap,
40027
- getPageHeaderZoneTop as aq,
40028
- getPageBodyTop as ar,
40029
- getPageColumnRects as as,
40030
- findFootnoteReference as at,
40031
- FOOTNOTE_MARKER_GUTTER_PX as au,
40032
- resolveImporterForFile as av,
40033
- createEditorStateFromDocument as aw,
40034
- getDocumentParagraphsCanonical as ax,
40035
- getToolbarStyleState as ay,
40036
- STANDARD_FONT_SIZES_PT as az,
39967
+ resolveCommandRef as a$,
39968
+ iterateEndnoteReferenceRuns as a0,
39969
+ JSZip as a1,
39970
+ imageContentTypeDefaults as a2,
39971
+ imageExtensionFromMime as a3,
39972
+ pxToPt as a4,
39973
+ resolveFloatingObjectRect as a5,
39974
+ getTextBoxFloatingGeometry as a6,
39975
+ getPresetPathSegments as a7,
39976
+ projectBlocksLayout as a8,
39977
+ buildListLabels as a9,
39978
+ FOOTNOTE_MARKER_GUTTER_PX as aA,
39979
+ resolveImporterForFile as aB,
39980
+ createEditorStateFromDocument as aC,
39981
+ getDocumentParagraphsCanonical as aD,
39982
+ getToolbarStyleState as aE,
39983
+ STANDARD_FONT_SIZES_PT as aF,
39984
+ fontSizePxToPt as aG,
39985
+ probeLocalFontFamilies as aH,
39986
+ createInitialEditorState as aI,
39987
+ parseFontSizePtToPx as aJ,
39988
+ formatFontSizePt as aK,
39989
+ listKindForTag as aL,
39990
+ isParagraphTag as aM,
39991
+ collectInlineRuns as aN,
39992
+ parseParagraphStyle as aO,
39993
+ getCachedCanvasImage as aP,
39994
+ getHeadingLevel as aQ,
39995
+ preciseFontModeVersion as aR,
39996
+ isPreciseFontModeEnabled as aS,
39997
+ togglePreciseFontMode as aT,
39998
+ nextFontSizePt as aU,
39999
+ previousFontSizePt as aV,
40000
+ fontSizePtToPx as aW,
40001
+ createDefaultToolbarPreset as aX,
40002
+ MenuRegistry as aY,
40003
+ createToolbarRegistry as aZ,
40004
+ Editor as a_,
40005
+ textStyleToFontSizePt as aa,
40006
+ PX_PER_POINT as ab,
40007
+ DEFAULT_FONT_SIZE_PX as ac,
40008
+ isDoubleUnderlineStyle as ad,
40009
+ isWavyUnderlineStyle as ae,
40010
+ underlineStyleLineWidthPx as af,
40011
+ underlineStyleDashArray as ag,
40012
+ resolveListLabel as ah,
40013
+ getListLabelInset as ai,
40014
+ getAlignedListLabelInset as aj,
40015
+ getParagraphBorderInsets as ak,
40016
+ buildSegmentTable as al,
40017
+ buildCanvasTableLayout as am,
40018
+ normalizeFamily as an,
40019
+ ROBOTO_FONT_FILES as ao,
40020
+ loadFontAsset as ap,
40021
+ OFFICE_COMPAT_FONT_FAMILIES as aq,
40022
+ buildSfnt as ar,
40023
+ defaultFontDecoderRegistry as as,
40024
+ SfntFontProgram as at,
40025
+ collectPdfFontFamilies as au,
40026
+ projectDocumentLayout as av,
40027
+ getPageHeaderZoneTop as aw,
40028
+ getPageBodyTop as ax,
40029
+ getPageColumnRects as ay,
40030
+ findFootnoteReference as az,
40037
40031
  createEditorRun as b,
40038
- OASIS_TOOLBAR_ITEMS as b$,
40039
- getParagraphRectFromSnapshot as b0,
40040
- createComponent as b1,
40041
- CaretOverlay as b2,
40042
- Show as b3,
40043
- createRenderEffect as b4,
40044
- style as b5,
40045
- setAttribute as b6,
40046
- setStyleProperty as b7,
40047
- memo as b8,
40048
- template as b9,
40049
- enablePreciseFontMode as bA,
40050
- createOasisEditorClient as bB,
40051
- createEditorZoom as bC,
40052
- startLongTaskObserver as bD,
40053
- installGlobalReport as bE,
40054
- applyStoredPreciseFontPreference as bF,
40055
- getWelcomeSeen as bG,
40056
- isLocalFontAccessSupported as bH,
40057
- EDITOR_SCROLL_PADDING_PX as bI,
40058
- Toolbar as bJ,
40059
- OasisEditorLoading as bK,
40060
- I18nProvider as bL,
40061
- createEditorLogger as bM,
40062
- createTranslator as bN,
40063
- registerDomStatsSurface as bO,
40064
- Button as bP,
40065
- Checkbox as bQ,
40066
- ColorPicker as bR,
40067
- CommandRegistry as bS,
40068
- DEFAULT_PALETTE as bT,
40069
- DialogFooter as bU,
40070
- FloatingActionButton as bV,
40071
- GridPicker as bW,
40072
- IconButton as bX,
40073
- Menu as bY,
40074
- OASIS_BUILTIN_COMMANDS as bZ,
40075
- OASIS_MENU_ITEMS as b_,
40076
- useI18n as ba,
40077
- insert as bb,
40078
- use as bc,
40079
- addEventListener as bd,
40080
- Dialog as be,
40081
- delegateEvents as bf,
40082
- className as bg,
40083
- For as bh,
40084
- UNDERLINE_STYLE_OPTIONS as bi,
40085
- Tabs as bj,
40086
- measureParagraphMinContentWidthPx as bk,
40087
- getEditableBlocksForZone as bl,
40088
- findParagraphLocation as bm,
40089
- createSectionBoundaryParagraph as bn,
40090
- normalizePageSettings as bo,
40091
- DEFAULT_EDITOR_PAGE_SETTINGS as bp,
40092
- markStart as bq,
40093
- markEnd as br,
40094
- getParagraphEntries as bs,
40095
- getParagraphById as bt,
40096
- PluginUiHost as bu,
40097
- OasisEditorEditor as bv,
40098
- perfTimer as bw,
40099
- OasisBrandMark as bx,
40100
- setPreciseFontPreference as by,
40101
- setWelcomeSeen as bz,
40032
+ FloatingActionButton as b$,
40033
+ commandRefName as b0,
40034
+ InlineShell as b1,
40035
+ BalloonShell as b2,
40036
+ DocumentShell as b3,
40037
+ createMemo as b4,
40038
+ getCaretRectFromSnapshot as b5,
40039
+ getParagraphRectFromSnapshot as b6,
40040
+ createComponent as b7,
40041
+ CaretOverlay as b8,
40042
+ Show as b9,
40043
+ PluginUiHost as bA,
40044
+ OasisEditorEditor as bB,
40045
+ perfTimer as bC,
40046
+ OasisBrandMark as bD,
40047
+ setPreciseFontPreference as bE,
40048
+ setWelcomeSeen as bF,
40049
+ enablePreciseFontMode as bG,
40050
+ createOasisEditorClient as bH,
40051
+ createEditorZoom as bI,
40052
+ startLongTaskObserver as bJ,
40053
+ installGlobalReport as bK,
40054
+ applyStoredPreciseFontPreference as bL,
40055
+ getWelcomeSeen as bM,
40056
+ isLocalFontAccessSupported as bN,
40057
+ EDITOR_SCROLL_PADDING_PX as bO,
40058
+ Toolbar as bP,
40059
+ OasisEditorLoading as bQ,
40060
+ I18nProvider as bR,
40061
+ createEditorLogger as bS,
40062
+ createTranslator as bT,
40063
+ registerDomStatsSurface as bU,
40064
+ Button as bV,
40065
+ Checkbox as bW,
40066
+ ColorPicker as bX,
40067
+ CommandRegistry as bY,
40068
+ DEFAULT_PALETTE as bZ,
40069
+ DialogFooter as b_,
40070
+ createRenderEffect as ba,
40071
+ style as bb,
40072
+ setAttribute as bc,
40073
+ setStyleProperty as bd,
40074
+ memo as be,
40075
+ template as bf,
40076
+ useI18n as bg,
40077
+ insert as bh,
40078
+ use as bi,
40079
+ addEventListener as bj,
40080
+ Dialog as bk,
40081
+ delegateEvents as bl,
40082
+ className as bm,
40083
+ For as bn,
40084
+ UNDERLINE_STYLE_OPTIONS as bo,
40085
+ Tabs as bp,
40086
+ measureParagraphMinContentWidthPx as bq,
40087
+ getEditableBlocksForZone as br,
40088
+ findParagraphLocation as bs,
40089
+ createSectionBoundaryParagraph as bt,
40090
+ normalizePageSettings as bu,
40091
+ DEFAULT_EDITOR_PAGE_SETTINGS as bv,
40092
+ markStart as bw,
40093
+ markEnd as bx,
40094
+ getParagraphEntries as by,
40095
+ getParagraphById as bz,
40102
40096
  createEditorParagraphFromRuns as c,
40103
- OasisEditorAppLazy as c0,
40104
- OasisEditorContainer as c1,
40105
- PluginCollection as c2,
40106
- Popover as c3,
40107
- RIBBON_TABS as c4,
40108
- Select as c5,
40109
- SelectField as c6,
40110
- Separator as c7,
40111
- SidePanel as c8,
40112
- SidePanelBody as c9,
40113
- SidePanelFooter as ca,
40114
- SidePanelHeader as cb,
40115
- SplitButton as cc,
40116
- TextField as cd,
40117
- Button$1 as ce,
40118
- buildRibbonTabDefinitions as cf,
40119
- createEditorCommandBus as cg,
40120
- createOasisEditor as ch,
40121
- createOasisEditorContainer as ci,
40122
- mount as cj,
40123
- registerToolbarRenderer as ck,
40097
+ GridPicker as c0,
40098
+ IconButton as c1,
40099
+ Menu as c2,
40100
+ OASIS_BUILTIN_COMMANDS as c3,
40101
+ OASIS_MENU_ITEMS as c4,
40102
+ OASIS_TOOLBAR_ITEMS as c5,
40103
+ OasisEditorAppLazy as c6,
40104
+ OasisEditorContainer as c7,
40105
+ PluginCollection as c8,
40106
+ Popover as c9,
40107
+ RIBBON_TABS as ca,
40108
+ Select as cb,
40109
+ SelectField as cc,
40110
+ Separator as cd,
40111
+ SidePanel as ce,
40112
+ SidePanelBody as cf,
40113
+ SidePanelFooter as cg,
40114
+ SidePanelHeader as ch,
40115
+ SplitButton as ci,
40116
+ TextField as cj,
40117
+ Button$1 as ck,
40118
+ buildRibbonTabDefinitions as cl,
40119
+ createEditorCommandBus as cm,
40120
+ createOasisEditor as cn,
40121
+ createOasisEditorContainer as co,
40122
+ mount as cp,
40123
+ registerToolbarRenderer as cq,
40124
40124
  getDocumentSections as d,
40125
40125
  createEditorStyledRun as e,
40126
40126
  getParagraphText as f,