oasis-editor 0.0.115 → 0.0.116

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.
@@ -2539,7 +2539,7 @@ function OasisEditorAppLazy(props = {}) {
2539
2539
  onCleanup(() => {
2540
2540
  cancelled = true;
2541
2541
  });
2542
- import("./OasisEditorApp-C1dyjJoH.js").then((m) => {
2542
+ import("./OasisEditorApp-DY_N4M54.js").then((m) => {
2543
2543
  cancelled = true;
2544
2544
  setProgress(1);
2545
2545
  setTimeout(() => setApp(() => m.OasisEditorApp), 180);
@@ -13135,6 +13135,10 @@ function getPreciseFontProgram(family, bold, italic) {
13135
13135
  const resolved = family ?? "";
13136
13136
  return registry.get(faceKey(resolved, bold, italic)) ?? registry.get(faceKey(resolved, false, false)) ?? null;
13137
13137
  }
13138
+ function roundTo(value, decimals) {
13139
+ const factor = 10 ** decimals;
13140
+ return Math.round(value * factor) / factor;
13141
+ }
13138
13142
  const familyFileCache = /* @__PURE__ */ new Map();
13139
13143
  const fontLogger$1 = createEditorLogger("fonts");
13140
13144
  function resolveFaceFiles(family) {
@@ -13312,7 +13316,7 @@ async function preloadLayoutFonts(families) {
13312
13316
  );
13313
13317
  const finishedAt = typeof performance !== "undefined" ? performance.now() : Date.now();
13314
13318
  fontLogger$1.info("preload:done", {
13315
- durationMs: Math.round((finishedAt - startedAt) * 100) / 100,
13319
+ durationMs: roundTo(finishedAt - startedAt, 2),
13316
13320
  results,
13317
13321
  documentFontsStatus: typeof document !== "undefined" && document.fonts ? document.fonts.status : "unavailable"
13318
13322
  });
@@ -14086,7 +14090,6 @@ function findHyphenationPoints(word, lang) {
14086
14090
  }
14087
14091
  const DEFAULT_CONTENT_WIDTH = 624;
14088
14092
  const MIN_CONTENT_WIDTH = 120;
14089
- const PT_TO_PX = 96 / 72;
14090
14093
  function intersectsVertically(aTop, aBottom, bTop, bBottom) {
14091
14094
  return aTop < bBottom && aBottom > bTop;
14092
14095
  }
@@ -14538,7 +14541,7 @@ function composeMeasuredParagraphLines(options) {
14538
14541
  }
14539
14542
  if (!isEmptyLine) {
14540
14543
  const remaining = lineAvailableWidth - lineWidth;
14541
- const zonePx = ((hyphenation == null ? void 0 : hyphenation.zone) ?? 0) * PT_TO_PX;
14544
+ const zonePx = ((hyphenation == null ? void 0 : hyphenation.zone) ?? 0) * PX_PER_POINT;
14542
14545
  if (remaining > zonePx) {
14543
14546
  const hy = tryHyphenate(token.chars, remaining);
14544
14547
  if (hy) {
@@ -14938,6 +14941,9 @@ function getParagraphBorderInsets(style2) {
14938
14941
  bottom: edgeInset(style2.borderBottom)
14939
14942
  };
14940
14943
  }
14944
+ const VERTICAL_HIT_WEIGHT = 1e3;
14945
+ const TEXT_BASELINE_RATIO = 0.8;
14946
+ const NO_WRAP_MEASURE_WIDTH_PX = 1e5;
14941
14947
  function formatTimestamp() {
14942
14948
  const now = /* @__PURE__ */ new Date();
14943
14949
  const h = String(now.getHours()).padStart(2, "0");
@@ -14972,7 +14978,7 @@ function markEnd(label) {
14972
14978
  performance.mark(endName);
14973
14979
  try {
14974
14980
  const measure = performance.measure(label, startName, endName);
14975
- const duration = Math.round(measure.duration * 100) / 100;
14981
+ const duration = roundTo(measure.duration, 2);
14976
14982
  marks.push({
14977
14983
  name: label,
14978
14984
  duration,
@@ -14993,14 +14999,14 @@ function markEnd(label) {
14993
14999
  function recordDuration(label, durationMs) {
14994
15000
  marks.push({
14995
15001
  name: label,
14996
- duration: Math.round(durationMs * 100) / 100,
15002
+ duration: roundTo(durationMs, 2),
14997
15003
  timestamp: Date.now()
14998
15004
  });
14999
15005
  if (shouldLogPerformanceMetrics()) {
15000
15006
  console.info(
15001
15007
  `%c[perf] ${label}`,
15002
15008
  "color: #f59e0b;",
15003
- `${formatTimestamp()} ${Math.round(durationMs * 100) / 100}ms`
15009
+ `${formatTimestamp()} ${roundTo(durationMs, 2)}ms`
15004
15010
  );
15005
15011
  }
15006
15012
  }
@@ -15052,7 +15058,7 @@ function startLongTaskObserver() {
15052
15058
  observer = new PerformanceObserver((list) => {
15053
15059
  for (const entry of list.getEntries()) {
15054
15060
  longTasks.push({
15055
- duration: Math.round(entry.duration * 100) / 100,
15061
+ duration: roundTo(entry.duration, 2),
15056
15062
  startTime: Math.round(entry.startTime)
15057
15063
  });
15058
15064
  }
@@ -15347,11 +15353,14 @@ function resolveDropCapExclusion(options) {
15347
15353
  sourceRunId: DROP_CAP_EXCLUSION_RUN_ID
15348
15354
  };
15349
15355
  }
15350
- let activeHyphenation;
15351
- let activeHyphenationSignature = "";
15352
- function setActiveHyphenation(options) {
15353
- activeHyphenation = (options == null ? void 0 : options.enabled) ? options : void 0;
15354
- activeHyphenationSignature = activeHyphenation ? `h:${activeHyphenation.zone ?? ""}:${activeHyphenation.consecutiveLimit ?? ""}:${activeHyphenation.doNotHyphenateCaps ? 1 : 0}` : "";
15356
+ const EMPTY_PROJECTION_CONTEXT = {
15357
+ hyphenation: void 0,
15358
+ hyphenationSignature: ""
15359
+ };
15360
+ function createProjectionContext(options) {
15361
+ const hyphenation = (options == null ? void 0 : options.enabled) ? options : void 0;
15362
+ const hyphenationSignature = hyphenation ? `h:${hyphenation.zone ?? ""}:${hyphenation.consecutiveLimit ?? ""}:${hyphenation.doNotHyphenateCaps ? 1 : 0}` : "";
15363
+ return { hyphenation, hyphenationSignature };
15355
15364
  }
15356
15365
  function paragraphStyleComparableKey(style2) {
15357
15366
  const {
@@ -15418,9 +15427,9 @@ function getParagraphFieldDependence(paragraph) {
15418
15427
  paragraphFieldDependenceCache.set(paragraph, result);
15419
15428
  return result;
15420
15429
  }
15421
- function projectParagraphLayout(paragraph, pageIndex, totalPages, styles, contentWidth, measurer = domTextMeasurer, defaultTabStop) {
15430
+ function projectParagraphLayout(paragraph, pageIndex, totalPages, styles, contentWidth, measurer = domTextMeasurer, defaultTabStop, context2 = EMPTY_PROJECTION_CONTEXT) {
15422
15431
  const { dependsOnPageIndex, dependsOnTotalPages } = getParagraphFieldDependence(paragraph);
15423
- const cacheKey = `${dependsOnPageIndex ? pageIndex ?? "" : ""}:${dependsOnTotalPages ? totalPages ?? "" : ""}:${contentWidth ?? ""}:${defaultTabStop ?? ""}:${activeHyphenationSignature}`;
15432
+ const cacheKey = `${dependsOnPageIndex ? pageIndex ?? "" : ""}:${dependsOnTotalPages ? totalPages ?? "" : ""}:${contentWidth ?? ""}:${defaultTabStop ?? ""}:${context2.hyphenationSignature}`;
15424
15433
  let cacheForParagraph = paragraphLayoutCache.get(paragraph);
15425
15434
  if (cacheForParagraph) {
15426
15435
  const cached = cacheForParagraph.get(cacheKey);
@@ -15478,7 +15487,7 @@ function projectParagraphLayout(paragraph, pageIndex, totalPages, styles, conten
15478
15487
  styles,
15479
15488
  contentWidth,
15480
15489
  defaultTabStop,
15481
- hyphenation: activeHyphenation
15490
+ hyphenation: context2.hyphenation
15482
15491
  }).map((line) => ({
15483
15492
  ...line,
15484
15493
  height: line.height || lineHeight,
@@ -15507,7 +15516,7 @@ function projectParagraphLayout(paragraph, pageIndex, totalPages, styles, conten
15507
15516
  cacheForParagraph.set(cacheKey, result);
15508
15517
  return result;
15509
15518
  }
15510
- function projectParagraphLayoutWithExclusions(paragraph, pageSettings, contentWidth, measurer = domTextMeasurer, pageIndex, totalPages, styles, defaultTabStop, resolveTextBoxHeight, externalExclusions = []) {
15519
+ function projectParagraphLayoutWithExclusions(paragraph, pageSettings, contentWidth, measurer = domTextMeasurer, pageIndex, totalPages, styles, defaultTabStop, resolveTextBoxHeight, externalExclusions = [], context2 = EMPTY_PROJECTION_CONTEXT) {
15511
15520
  const preliminary = projectParagraphLayout(
15512
15521
  paragraph,
15513
15522
  pageIndex,
@@ -15515,7 +15524,8 @@ function projectParagraphLayoutWithExclusions(paragraph, pageSettings, contentWi
15515
15524
  styles,
15516
15525
  contentWidth,
15517
15526
  measurer,
15518
- defaultTabStop
15527
+ defaultTabStop,
15528
+ context2
15519
15529
  );
15520
15530
  if (!pageSettings || !contentWidth) {
15521
15531
  return preliminary;
@@ -15776,7 +15786,6 @@ function estimateParagraphBlockHeight(paragraph, styles, contentWidth, measurer
15776
15786
  }
15777
15787
  const MIN_TABLE_CELL_CONTENT_WIDTH_PX$2 = 24;
15778
15788
  const DEFAULT_CELL_PADDING_LEFT_RIGHT_PX$1 = 7.2;
15779
- const NO_WRAP_MEASURE_WIDTH_PX$1 = 1e5;
15780
15789
  function toPx$1(valuePt) {
15781
15790
  return valuePt * PX_PER_POINT;
15782
15791
  }
@@ -15850,7 +15859,7 @@ function getTableCellContentWidthForParagraph(document2, paragraphId, activeSect
15850
15859
  if (!row) return null;
15851
15860
  const cell = row.cells[tableLocation.cellIndex];
15852
15861
  if (!cell) return null;
15853
- if ((_a = cell.style) == null ? void 0 : _a.noWrap) return NO_WRAP_MEASURE_WIDTH_PX$1;
15862
+ if ((_a = cell.style) == null ? void 0 : _a.noWrap) return NO_WRAP_MEASURE_WIDTH_PX;
15854
15863
  const pageContentWidthPx = getPageContentWidth(
15855
15864
  getDocumentPageSettings(document2)
15856
15865
  );
@@ -15917,7 +15926,6 @@ function resolveCachedTableCellParagraph(source, formatting, styles) {
15917
15926
  return resolved;
15918
15927
  }
15919
15928
  const DEFAULT_LINE_HEIGHT = 1.15;
15920
- const NO_WRAP_MEASURE_WIDTH_PX = 1e5;
15921
15929
  const DEFAULT_TABLE_CELL_HORIZONTAL_PADDING_PX = 14.4;
15922
15930
  const MIN_TABLE_CELL_CONTENT_WIDTH_PX$1 = 24;
15923
15931
  const DEFAULT_TABLE_SEGMENT_VERTICAL_SPACING = 0;
@@ -16471,7 +16479,8 @@ function paginateParagraphBlock(track, params, sourceBlock, nextBlock, index) {
16471
16479
  track.floatingExclusions.map((exclusion) => ({
16472
16480
  ...exclusion,
16473
16481
  y: exclusion.y - track.height
16474
- }))
16482
+ })),
16483
+ params.projectionContext ?? EMPTY_PROJECTION_CONTEXT
16475
16484
  );
16476
16485
  const measuredParagraphLayout = measuredParagraphLayouts == null ? void 0 : measuredParagraphLayouts[sourceBlock.id];
16477
16486
  const paragraphLayout = measuredParagraphLayout && isMeasuredLayoutCurrent(projectedParagraphLayout, measuredParagraphLayout) ? applyMeasuredLineGeometry(
@@ -16783,7 +16792,7 @@ function estimateSingleCellRowSliceHeight(row, cellIndex, start, end, styles, me
16783
16792
  rowIndex
16784
16793
  );
16785
16794
  }
16786
- function findCellSplitEndPosition(row, cellIndex, start, availableHeight, styles, measurer, defaultTabStop, contentWidth, table, rowIndex) {
16795
+ function findCellSplitEndPosition(row, cellIndex, start, availableHeight, styles, measurer, defaultTabStop, contentWidth, table, rowIndex, projectionContext = EMPTY_PROJECTION_CONTEXT) {
16787
16796
  const cell = row.cells[cellIndex];
16788
16797
  if (!cell) return start;
16789
16798
  const limit = cell.blocks.length;
@@ -16822,7 +16831,8 @@ function findCellSplitEndPosition(row, cellIndex, start, availableHeight, styles
16822
16831
  styles,
16823
16832
  contentWidth,
16824
16833
  measurer,
16825
- defaultTabStop
16834
+ defaultTabStop,
16835
+ projectionContext
16826
16836
  );
16827
16837
  for (const line of layout.lines) {
16828
16838
  if (line.endOffset <= startOffset || line.endOffset >= paragraphLength) {
@@ -16894,7 +16904,14 @@ function resolveFloatingTableWidth(table, contentWidth) {
16894
16904
  }
16895
16905
  function paginateTableBlock(track, params, sourceBlock, index) {
16896
16906
  var _a;
16897
- const { contentWidth, measurer, styles, defaultTabStop, measuredHeights } = params;
16907
+ const {
16908
+ contentWidth,
16909
+ measurer,
16910
+ styles,
16911
+ defaultTabStop,
16912
+ measuredHeights,
16913
+ projectionContext
16914
+ } = params;
16898
16915
  const tableHeight = (measuredHeights == null ? void 0 : measuredHeights[sourceBlock.id]) ?? estimateTableBlockHeight(
16899
16916
  sourceBlock,
16900
16917
  styles,
@@ -17108,7 +17125,8 @@ function paginateTableBlock(track, params, sourceBlock, index) {
17108
17125
  defaultTabStop,
17109
17126
  contentWidth,
17110
17127
  sourceBlock,
17111
- rowGroups[groupEndIndex].startRowIndex
17128
+ rowGroups[groupEndIndex].startRowIndex,
17129
+ projectionContext
17112
17130
  )
17113
17131
  );
17114
17132
  if (positionsProgressed(starts, ends)) {
@@ -17155,7 +17173,12 @@ function paginateTableBlock(track, params, sourceBlock, index) {
17155
17173
  splitEndPositions,
17156
17174
  startCellPositions
17157
17175
  );
17158
- advanceCursor(groupEndIndex, isLastRowSplit, splitEnds, splitEndPositions);
17176
+ advanceCursor(
17177
+ groupEndIndex,
17178
+ isLastRowSplit,
17179
+ splitEnds,
17180
+ splitEndPositions
17181
+ );
17159
17182
  return block;
17160
17183
  },
17161
17184
  force(segmentId) {
@@ -17187,7 +17210,8 @@ function paginateTableBlock(track, params, sourceBlock, index) {
17187
17210
  defaultTabStop,
17188
17211
  contentWidth,
17189
17212
  sourceBlock,
17190
- startRowIndex
17213
+ startRowIndex,
17214
+ projectionContext
17191
17215
  )
17192
17216
  );
17193
17217
  if (!positionsProgressed(starts, ends)) {
@@ -17201,7 +17225,11 @@ function paginateTableBlock(track, params, sourceBlock, index) {
17201
17225
  splitEnds = positionsToBlockIndexes(ends);
17202
17226
  splitEndPositions = ends;
17203
17227
  isLastRowSplit = true;
17204
- const slicedLastRow = buildRowSliceFromPositions(targetRow, starts, ends);
17228
+ const slicedLastRow = buildRowSliceFromPositions(
17229
+ targetRow,
17230
+ starts,
17231
+ ends
17232
+ );
17205
17233
  segmentHeight = getTableSegmentHeight(
17206
17234
  { ...sourceBlock, rows: [slicedLastRow] },
17207
17235
  0,
@@ -17236,7 +17264,12 @@ function paginateTableBlock(track, params, sourceBlock, index) {
17236
17264
  splitEndPositions,
17237
17265
  startCellPositions
17238
17266
  );
17239
- advanceCursor(groupEndIndex, isLastRowSplit, splitEnds, splitEndPositions);
17267
+ advanceCursor(
17268
+ groupEndIndex,
17269
+ isLastRowSplit,
17270
+ splitEnds,
17271
+ splitEndPositions
17272
+ );
17240
17273
  return block;
17241
17274
  }
17242
17275
  });
@@ -17267,7 +17300,8 @@ function projectColumnTrackLayout(context2) {
17267
17300
  measurer = domTextMeasurer,
17268
17301
  reservedHeightByPageIndex,
17269
17302
  defaultTabStop,
17270
- contentWidthOverride
17303
+ contentWidthOverride,
17304
+ projectionContext
17271
17305
  } = context2;
17272
17306
  const contentWidth = contentWidthOverride ?? getPageContentWidth(pageSettings);
17273
17307
  const track = new PaginationTrack(
@@ -17285,7 +17319,8 @@ function projectColumnTrackLayout(context2) {
17285
17319
  totalPages,
17286
17320
  defaultTabStop,
17287
17321
  measuredHeights,
17288
- measuredParagraphLayouts
17322
+ measuredParagraphLayouts,
17323
+ projectionContext
17289
17324
  };
17290
17325
  for (let index = 0; index < blocks.length; index += 1) {
17291
17326
  const sourceBlock = blocks[index];
@@ -17966,7 +18001,6 @@ function resolveTableLeftOffset(table, tableWidth, contentWidth) {
17966
18001
  }
17967
18002
  return resolveTableIndentLeft(table);
17968
18003
  }
17969
- const NO_WRAP_WIDTH_PX = 1e5;
17970
18004
  const MIN_TABLE_CELL_CONTENT_WIDTH_PX = 24;
17971
18005
  function resolveCellVerticalMode(cell) {
17972
18006
  var _a, _b, _c;
@@ -18044,8 +18078,16 @@ function prepareCells(options) {
18044
18078
  right: resolveBorder(((_m = cell.style) == null ? void 0 : _m.borderRight) ?? logicalRight),
18045
18079
  bottom: resolveBorder((_n = cell.style) == null ? void 0 : _n.borderBottom),
18046
18080
  left: resolveBorder(((_o = cell.style) == null ? void 0 : _o.borderLeft) ?? logicalLeft),
18047
- ...((_p = cell.style) == null ? void 0 : _p.borderTopLeftToBottomRight) ? { topLeftToBottomRight: resolveBorder(cell.style.borderTopLeftToBottomRight) } : {},
18048
- ...((_q = cell.style) == null ? void 0 : _q.borderTopRightToBottomLeft) ? { topRightToBottomLeft: resolveBorder(cell.style.borderTopRightToBottomLeft) } : {}
18081
+ ...((_p = cell.style) == null ? void 0 : _p.borderTopLeftToBottomRight) ? {
18082
+ topLeftToBottomRight: resolveBorder(
18083
+ cell.style.borderTopLeftToBottomRight
18084
+ )
18085
+ } : {},
18086
+ ...((_q = cell.style) == null ? void 0 : _q.borderTopRightToBottomLeft) ? {
18087
+ topRightToBottomLeft: resolveBorder(
18088
+ cell.style.borderTopRightToBottomLeft
18089
+ )
18090
+ } : {}
18049
18091
  };
18050
18092
  const contentWidthPx = Math.max(
18051
18093
  MIN_TABLE_CELL_CONTENT_WIDTH_PX,
@@ -18060,7 +18102,7 @@ function prepareCells(options) {
18060
18102
  const wrapWidth = isRotated || ((_s = cell.style) == null ? void 0 : _s.noWrap) ? isRotated && hasExplicitRowHeight ? Math.max(
18061
18103
  MIN_TABLE_CELL_CONTENT_WIDTH_PX,
18062
18104
  explicitRowHeightPx - borders.top.width - borders.bottom.width - padding.top - padding.bottom
18063
- ) : NO_WRAP_WIDTH_PX : contentWidthPx;
18105
+ ) : NO_WRAP_MEASURE_WIDTH_PX : contentWidthPx;
18064
18106
  const projectedParagraphs = [];
18065
18107
  let contentNaturalHeightPx = 0;
18066
18108
  for (const original of cell.blocks) {
@@ -18071,7 +18113,7 @@ function prepareCells(options) {
18071
18113
  pageIndex,
18072
18114
  void 0,
18073
18115
  state.document.styles,
18074
- NO_WRAP_WIDTH_PX,
18116
+ NO_WRAP_MEASURE_WIDTH_PX,
18075
18117
  void 0,
18076
18118
  (_t = state.document.settings) == null ? void 0 : _t.defaultTabStop
18077
18119
  );
@@ -18127,7 +18169,10 @@ function prepareCells(options) {
18127
18169
  const removedAfter = previous.spacingAfter;
18128
18170
  previous.height = Math.max(1, previous.height - removedAfter);
18129
18171
  previous.spacingAfter = 0;
18130
- contentNaturalHeightPx = Math.max(0, contentNaturalHeightPx - removedAfter);
18172
+ contentNaturalHeightPx = Math.max(
18173
+ 0,
18174
+ contentNaturalHeightPx - removedAfter
18175
+ );
18131
18176
  effectiveSpacingBefore = 0;
18132
18177
  } else {
18133
18178
  const collapsed = Math.min(previous.spacingAfter, spacingBefore);
@@ -18279,7 +18324,11 @@ function assembleCellEntries(options) {
18279
18324
  0
18280
18325
  );
18281
18326
  let paragraphCursorY = 0;
18282
- const verticalContentOffset = cellEntry.verticalMode === "horizontal" ? resolveVerticalContentOffset(cell, contentHeightPx, cellEntry.contentNaturalHeightPx) : 0;
18327
+ const verticalContentOffset = cellEntry.verticalMode === "horizontal" ? resolveVerticalContentOffset(
18328
+ cell,
18329
+ contentHeightPx,
18330
+ cellEntry.contentNaturalHeightPx
18331
+ ) : 0;
18283
18332
  const paragraphs = [];
18284
18333
  for (const projected of cellEntry.projectedParagraphs) {
18285
18334
  paragraphs.push({
@@ -18371,7 +18420,10 @@ function buildCanvasTableLayout(options) {
18371
18420
  let glyphWidth = 0;
18372
18421
  for (const block of cell.blocks) {
18373
18422
  if (block.type !== "paragraph") continue;
18374
- glyphWidth = Math.max(glyphWidth, estimateStackedColumnWidth(block, state));
18423
+ glyphWidth = Math.max(
18424
+ glyphWidth,
18425
+ estimateStackedColumnWidth(block, state)
18426
+ );
18375
18427
  }
18376
18428
  if (glyphWidth <= 0) continue;
18377
18429
  const padding = resolveCellPadding(cell);
@@ -18387,7 +18439,9 @@ function buildCanvasTableLayout(options) {
18387
18439
  columnOffsets[i + 1] = columnOffsets[i] + resolvedColumnWidths[i] + cellSpacingPx;
18388
18440
  }
18389
18441
  const effectiveRowStyles = table.rows.map((row, rowIndex) => {
18390
- const entry = tableEntries.find((candidate) => candidate.rowIndex === rowIndex);
18442
+ const entry = tableEntries.find(
18443
+ (candidate) => candidate.rowIndex === rowIndex
18444
+ );
18391
18445
  return entry ? resolveEffectiveTableCellFormatting({
18392
18446
  table: sourceTable,
18393
18447
  rowIndex,
@@ -18437,7 +18491,7 @@ function buildCanvasTableLayout(options) {
18437
18491
  };
18438
18492
  }
18439
18493
  var _tmpl$$y = /* @__PURE__ */ template(`<div class=oasis-editor-page-break style="display:flex;align-items:center;justify-content:center;margin:16px 0;position:relative;user-select:none"><div style="position:absolute;left:0;right:0;top:50%;border-top:1px dashed var(--oasis-toolbar-border, #e0e3e7)"></div><div style="background:var(--oasis-bg, #f6f8fb);padding:0 12px;color:var(--oasis-text-muted, #5f6368);font-size:12px;font-family:var(--oasis-font-ui, sans-serif);z-index:1">`);
18440
- function PageBreak(props) {
18494
+ function PageBreak(_props) {
18441
18495
  const t = useI18n();
18442
18496
  return (() => {
18443
18497
  var _el$ = _tmpl$$y(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
@@ -20489,7 +20543,10 @@ function resolveCanvasTextFill(ctx, styles, line, fragment, originX, originY) {
20489
20543
  const axis = resolveGradientAxis(x0, y0, x1, y1, fill.angle ?? 0);
20490
20544
  const gradient = ctx.createLinearGradient(axis.x0, axis.y0, axis.x1, axis.y1);
20491
20545
  for (const stop of fill.stops) {
20492
- gradient.addColorStop(stop.position, hexToRgba(stop.color, stop.alpha ?? 1));
20546
+ gradient.addColorStop(
20547
+ stop.position,
20548
+ hexToRgba(stop.color, stop.alpha ?? 1)
20549
+ );
20493
20550
  }
20494
20551
  return gradient;
20495
20552
  }
@@ -20980,7 +21037,14 @@ function drawTextFragment(ctx, paragraph, line, fragment, slotByOffset, state, s
20980
21037
  segmentLeft = null;
20981
21038
  return;
20982
21039
  }
20983
- drawStyledText(ctx, segmentText, originX + segmentLeft, baselineY, scale, styles);
21040
+ drawStyledText(
21041
+ ctx,
21042
+ segmentText,
21043
+ originX + segmentLeft,
21044
+ baselineY,
21045
+ scale,
21046
+ styles
21047
+ );
20984
21048
  segmentText = "";
20985
21049
  segmentLeft = null;
20986
21050
  };
@@ -20999,14 +21063,27 @@ function drawTextFragment(ctx, paragraph, line, fragment, slotByOffset, state, s
20999
21063
  const nextSlot = slotByOffset.get(char.paragraphOffset + 1);
21000
21064
  const leader = resolveTabLeader(paragraph, line, slot.left, state);
21001
21065
  if (nextSlot && leader) {
21002
- drawTabLeader(ctx, leader, originX + slot.left, originX + nextSlot.left, baselineY);
21066
+ drawTabLeader(
21067
+ ctx,
21068
+ leader,
21069
+ originX + slot.left,
21070
+ originX + nextSlot.left,
21071
+ baselineY
21072
+ );
21003
21073
  }
21004
21074
  continue;
21005
21075
  }
21006
21076
  const renderedChar = getRenderedChar(char.char, styles);
21007
21077
  if (hasManualCharacterSpacing) {
21008
21078
  flushSegment();
21009
- drawStyledText(ctx, renderedChar, originX + slot.left, baselineY, scale, styles);
21079
+ drawStyledText(
21080
+ ctx,
21081
+ renderedChar,
21082
+ originX + slot.left,
21083
+ baselineY,
21084
+ scale,
21085
+ styles
21086
+ );
21010
21087
  continue;
21011
21088
  }
21012
21089
  if (char.char === " ") {
@@ -21028,7 +21105,7 @@ function drawParagraph(ctx, paragraph, lines, state, originX, originY, onUpdate,
21028
21105
  for (const slot of line.slots) {
21029
21106
  slotByOffset.set(slot.offset, slot);
21030
21107
  }
21031
- const baselineY = originY + line.top + line.height * 0.8;
21108
+ const baselineY = originY + line.top + line.height * TEXT_BASELINE_RATIO;
21032
21109
  const listPrefix = line.index === 0 ? resolveListPrefix(paragraph, state.document) : "";
21033
21110
  if (listPrefix) {
21034
21111
  const prefixStyles = resolveEffectiveTextStyleForParagraph(
@@ -21078,15 +21155,43 @@ function drawParagraph(ctx, paragraph, lines, state, originX, originY, onUpdate,
21078
21155
  italic: Boolean(styles.italic),
21079
21156
  sample: fragment.text.slice(0, 80)
21080
21157
  });
21081
- ctx.fillStyle = resolveCanvasTextFill(ctx, styles, line, fragment, originX, originY);
21158
+ ctx.fillStyle = resolveCanvasTextFill(
21159
+ ctx,
21160
+ styles,
21161
+ line,
21162
+ fragment,
21163
+ originX,
21164
+ originY
21165
+ );
21082
21166
  if (styles.shading) {
21083
- drawFragmentShading(ctx, line, fragment, originX, originY, styles.shading);
21167
+ drawFragmentShading(
21168
+ ctx,
21169
+ line,
21170
+ fragment,
21171
+ originX,
21172
+ originY,
21173
+ styles.shading
21174
+ );
21084
21175
  }
21085
21176
  if (styles.highlight) {
21086
- drawFragmentHighlight(ctx, line, fragment, originX, originY, styles.highlight);
21177
+ drawFragmentHighlight(
21178
+ ctx,
21179
+ line,
21180
+ fragment,
21181
+ originX,
21182
+ originY,
21183
+ styles.highlight
21184
+ );
21087
21185
  }
21088
21186
  if (styles.textBorder) {
21089
- drawFragmentBorder(ctx, line, fragment, originX, originY, styles.textBorder);
21187
+ drawFragmentBorder(
21188
+ ctx,
21189
+ line,
21190
+ fragment,
21191
+ originX,
21192
+ originY,
21193
+ styles.textBorder
21194
+ );
21090
21195
  }
21091
21196
  if (fragment.image && !fragment.image.floating) {
21092
21197
  const slot = slotByOffset.get(fragment.startOffset);
@@ -21173,7 +21278,14 @@ function drawParagraph(ctx, paragraph, lines, state, originX, originY, onUpdate,
21173
21278
  drawTextDecoration(ctx, line, fragment, originX, originY, "strike");
21174
21279
  }
21175
21280
  if (styles.doubleStrike) {
21176
- drawTextDecoration(ctx, line, fragment, originX, originY, "doubleStrike");
21281
+ drawTextDecoration(
21282
+ ctx,
21283
+ line,
21284
+ fragment,
21285
+ originX,
21286
+ originY,
21287
+ "doubleStrike"
21288
+ );
21177
21289
  }
21178
21290
  if (styles.emphasisMark) {
21179
21291
  drawFragmentEmphasis(
@@ -21223,7 +21335,7 @@ function drawParagraph(ctx, paragraph, lines, state, originX, originY, onUpdate,
21223
21335
  ctx.save();
21224
21336
  ctx.font = "400 13px Calibri";
21225
21337
  ctx.fillStyle = "#9ca3af";
21226
- const y = originY + line.top + line.height * 0.8;
21338
+ const y = originY + line.top + line.height * TEXT_BASELINE_RATIO;
21227
21339
  ctx.fillText("¶", originX + markSlot.left + 2, y);
21228
21340
  ctx.restore();
21229
21341
  }
@@ -21352,7 +21464,7 @@ function drawDropCapForParagraph(options) {
21352
21464
  }
21353
21465
  const style2 = dropCap.style;
21354
21466
  const { font, fillStyle, renderMetrics } = resolveCanvasRunPaintStyle(style2);
21355
- const bodyLineHeight = ((_a = lines[0]) == null ? void 0 : _a.height) ?? ((style2 == null ? void 0 : style2.fontSize) ?? DEFAULT_FONT_SIZE_PX);
21467
+ const bodyLineHeight = ((_a = lines[0]) == null ? void 0 : _a.height) ?? (style2 == null ? void 0 : style2.fontSize) ?? DEFAULT_FONT_SIZE_PX;
21356
21468
  const glyphWidth = measureDropCapWidth(dropCap);
21357
21469
  const x = dropCap.type === "margin" ? originX - glyphWidth : originX;
21358
21470
  const baselineY = paragraphTop + (dropCap.lines - 0.2) * bodyLineHeight + renderMetrics.baselineOffset;
@@ -23214,7 +23326,6 @@ const WRAP_OPTIONS = [{
23214
23326
  labelKey: "layoutOptions.front"
23215
23327
  }];
23216
23328
  function WrapIcon(props) {
23217
- useI18n();
23218
23329
  const line = (x, y, w) => (() => {
23219
23330
  var _el$ = _tmpl$$q();
23220
23331
  setAttribute(_el$, "x", x);
@@ -32263,14 +32374,14 @@ function twipsToPoints(value) {
32263
32374
  if (!Number.isFinite(parsed)) {
32264
32375
  return void 0;
32265
32376
  }
32266
- return Math.round(parsed / 20 * 1e4) / 1e4;
32377
+ return roundTo(parsed / 20, 4);
32267
32378
  }
32268
32379
  function halfPointsToPx(value) {
32269
32380
  const parsed = value ? Number(value) : Number.NaN;
32270
32381
  if (!Number.isFinite(parsed)) {
32271
32382
  return null;
32272
32383
  }
32273
- return Math.round(parsed / 2 / 72 * PX_PER_INCH * 1e4) / 1e4;
32384
+ return roundTo(parsed / 2 / 72 * PX_PER_INCH, 4);
32274
32385
  }
32275
32386
  function normalizeImportedFontFamily(value) {
32276
32387
  const family = value == null ? void 0 : value.trim();
@@ -32735,7 +32846,7 @@ function parseDocxBorder(borderNode) {
32735
32846
  return { width: 0, type: "none", color: "transparent" };
32736
32847
  }
32737
32848
  const size = Number(getAttributeValue(borderNode, "sz"));
32738
- const width = Number.isFinite(size) && size > 0 ? Math.round(size / 8 * 1e4) / 1e4 : 0.75;
32849
+ const width = Number.isFinite(size) && size > 0 ? roundTo(size / 8, 4) : 0.75;
32739
32850
  const color = normalizeImportedHexColor(getAttributeValue(borderNode, "color")) ?? "#000000";
32740
32851
  const normalizedValue = (value == null ? void 0 : value.toLowerCase()) ?? "single";
32741
32852
  const type = normalizedValue.includes("dotted") || normalizedValue.includes("dot") ? "dotted" : normalizedValue.includes("dash") ? "dashed" : "solid";
@@ -33467,7 +33578,7 @@ function parseParagraphStyle$1(paragraphProperties, colors) {
33467
33578
  }
33468
33579
  if (line) {
33469
33580
  if (lineRule === "exact" || lineRule === "atLeast") {
33470
- style2.lineHeight = Math.round(Number(line) / 1440 * 96 * 1e4) / 1e4;
33581
+ style2.lineHeight = roundTo(Number(line) / 1440 * 96, 4);
33471
33582
  style2.lineRule = lineRule;
33472
33583
  } else {
33473
33584
  style2.lineHeight = Number(line) / 240;
@@ -33600,7 +33711,7 @@ function parseDocxWidthValue(element) {
33600
33711
  return void 0;
33601
33712
  }
33602
33713
  const pct = raw.trim().endsWith("%") ? Number.parseFloat(raw) : Number(raw) / 50;
33603
- return Number.isFinite(pct) ? `${Math.round(pct * 1e4) / 1e4}%` : void 0;
33714
+ return Number.isFinite(pct) ? `${roundTo(pct, 4)}%` : void 0;
33604
33715
  }
33605
33716
  return twipsToPoints(raw);
33606
33717
  }
@@ -33984,7 +34095,7 @@ function parseTableCellStyle(cellProperties, tableDefaultMargins, colors) {
33984
34095
  } else if (cellWidthType === "pct" && cellWidthValue) {
33985
34096
  const pct = Number(cellWidthValue);
33986
34097
  if (Number.isFinite(pct)) {
33987
- style2.width = `${Math.round(pct / 50 * 1e4) / 1e4}%`;
34098
+ style2.width = `${roundTo(pct / 50, 4)}%`;
33988
34099
  }
33989
34100
  }
33990
34101
  const tcMar = parseCellMargins(
@@ -35042,7 +35153,7 @@ function parseTextBoxShape(wsp) {
35042
35153
  } else if (el.localName === "ln") {
35043
35154
  const width = parseOptionalInt$1(el.getAttribute("w"));
35044
35155
  if (width !== void 0) {
35045
- shape.borderWidthPt = Math.round(width / EMU_PER_PT * 100) / 100;
35156
+ shape.borderWidthPt = roundTo(width / EMU_PER_PT, 2);
35046
35157
  }
35047
35158
  const color = normalizeHexColor(
35048
35159
  (_b = findElementDeep(el, "srgbClr")) == null ? void 0 : _b.getAttribute("val")
@@ -36812,12 +36923,16 @@ async function importDocxToEditorDocument(buffer, options = {}) {
36812
36923
  const hasAssets = Object.keys(assets.assets).length > 0;
36813
36924
  const finalize = (doc2) => {
36814
36925
  const settingsPatch = {};
36815
- if (docSettings.defaultTabStop !== void 0) settingsPatch.defaultTabStop = docSettings.defaultTabStop;
36816
- if (docSettings.allowSpaceOfSameStyleInTable) settingsPatch.allowSpaceOfSameStyleInTable = true;
36926
+ if (docSettings.defaultTabStop !== void 0)
36927
+ settingsPatch.defaultTabStop = docSettings.defaultTabStop;
36928
+ if (docSettings.allowSpaceOfSameStyleInTable)
36929
+ settingsPatch.allowSpaceOfSameStyleInTable = true;
36817
36930
  if (docSettings.autoHyphenation) settingsPatch.autoHyphenation = true;
36818
36931
  if (docSettings.doNotHyphenateCaps) settingsPatch.doNotHyphenateCaps = true;
36819
- if (docSettings.consecutiveHyphenLimit !== void 0) settingsPatch.consecutiveHyphenLimit = docSettings.consecutiveHyphenLimit;
36820
- if (docSettings.hyphenationZone !== void 0) settingsPatch.hyphenationZone = docSettings.hyphenationZone;
36932
+ if (docSettings.consecutiveHyphenLimit !== void 0)
36933
+ settingsPatch.consecutiveHyphenLimit = docSettings.consecutiveHyphenLimit;
36934
+ if (docSettings.hyphenationZone !== void 0)
36935
+ settingsPatch.hyphenationZone = docSettings.hyphenationZone;
36821
36936
  if (Object.keys(settingsPatch).length > 0) {
36822
36937
  doc2.settings = { ...doc2.settings ?? {}, ...settingsPatch };
36823
36938
  }
@@ -37005,7 +37120,7 @@ function importDocxInWorker(buffer, options = {}) {
37005
37120
  const worker = new Worker(
37006
37121
  new URL(
37007
37122
  /* @vite-ignore */
37008
- "" + new URL("assets/importDocxWorker-D0F0jbcF.js", import.meta.url).href,
37123
+ "" + new URL("assets/importDocxWorker-nIS-zjkj.js", import.meta.url).href,
37009
37124
  import.meta.url
37010
37125
  ),
37011
37126
  {
@@ -37064,6 +37179,10 @@ const docxImporter = {
37064
37179
  });
37065
37180
  }
37066
37181
  };
37182
+ function isAllowedImageSrc(src) {
37183
+ const normalized = src.trim().toLowerCase();
37184
+ return normalized.startsWith("data:image/") || normalized.startsWith("blob:");
37185
+ }
37067
37186
  function parseInlineImage(element) {
37068
37187
  var _a, _b, _c;
37069
37188
  if (element.tagName !== "IMG") {
@@ -37071,7 +37190,7 @@ function parseInlineImage(element) {
37071
37190
  }
37072
37191
  const img = element;
37073
37192
  const src = ((_a = img.getAttribute("src")) == null ? void 0 : _a.trim()) ?? "";
37074
- if (!src) {
37193
+ if (!src || !isAllowedImageSrc(src)) {
37075
37194
  return void 0;
37076
37195
  }
37077
37196
  const widthAttr = ((_b = img.getAttribute("width")) == null ? void 0 : _b.trim()) ?? "";
@@ -38865,7 +38984,7 @@ function buildCanvasLayoutSnapshot(options) {
38865
38984
  };
38866
38985
  }
38867
38986
  function rounded(value) {
38868
- return Math.round(value * 100) / 100;
38987
+ return roundTo(value, 2);
38869
38988
  }
38870
38989
  function getCanvasPageRectSignature(surface) {
38871
38990
  const surfaceRect = surface.getBoundingClientRect();
@@ -40219,10 +40338,10 @@ function previousFontSizePt(currentPt) {
40219
40338
  return Math.max(1, Math.round(currentPt) - 1);
40220
40339
  }
40221
40340
  function fontSizePxToPt(px) {
40222
- return Math.round(pxToPt(px) * 100) / 100;
40341
+ return roundTo(pxToPt(px), 2);
40223
40342
  }
40224
40343
  function fontSizePtToPx(pt2) {
40225
- return Math.round(ptToPx(pt2) * 1e4) / 1e4;
40344
+ return roundTo(ptToPx(pt2), 4);
40226
40345
  }
40227
40346
  function formatFontSizePt(px) {
40228
40347
  const value = Number(px);
@@ -41112,7 +41231,7 @@ function cmToPx(cm) {
41112
41231
  return Math.round(cm * PX_PER_CM);
41113
41232
  }
41114
41233
  function pxToCm(px) {
41115
- return Math.round(px / PX_PER_CM * 100) / 100;
41234
+ return roundTo(px / PX_PER_CM, 2);
41116
41235
  }
41117
41236
  const MARGIN_PRESETS = [
41118
41237
  {
@@ -42634,254 +42753,258 @@ const OASIS_MENU_ITEMS = {
42634
42753
  formatListsNumbered: "format_lists_numbered"
42635
42754
  };
42636
42755
  export {
42637
- isParagraphTag as $,
42756
+ resolveImageSrc as $,
42638
42757
  getParagraphLength as A,
42639
42758
  getParagraphText as B,
42640
42759
  getActiveZone as C,
42641
42760
  getActiveSectionIndex as D,
42642
- getParagraphs as E,
42643
- normalizeSelection as F,
42644
- positionToParagraphOffset as G,
42645
- paragraphOffsetToPosition as H,
42646
- clampPosition as I,
42647
- findParagraphIndex as J,
42648
- createCollapsedSelection as K,
42649
- isSelectionCollapsed as L,
42761
+ EMPTY_PROJECTION_CONTEXT as E,
42762
+ getParagraphs as F,
42763
+ normalizeSelection as G,
42764
+ positionToParagraphOffset as H,
42765
+ paragraphOffsetToPosition as I,
42766
+ clampPosition as J,
42767
+ findParagraphIndex as K,
42768
+ createCollapsedSelection as L,
42650
42769
  MAX_FOOTNOTE_LAYOUT_ITERATIONS as M,
42651
- parseFontSizePtToPx as N,
42652
- formatFontSizePt as O,
42653
- createEditorParagraph as P,
42654
- getBlockParagraphs as Q,
42655
- findParagraphTableLocation as R,
42770
+ isSelectionCollapsed as N,
42771
+ parseFontSizePtToPx as O,
42772
+ formatFontSizePt as P,
42773
+ createEditorParagraph as Q,
42774
+ getBlockParagraphs as R,
42656
42775
  STANDARD_FONT_SIZES_PT as S,
42657
- buildTableCellLayout as T,
42658
- PT_PER_PX as U,
42659
- createEditorTableCell as V,
42660
- createEditorTableRow as W,
42661
- createEditorTable as X,
42662
- underlineStyleToCssDecorationStyle as Y,
42663
- resolveImageSrc as Z,
42664
- listKindForTag as _,
42776
+ findParagraphTableLocation as T,
42777
+ buildTableCellLayout as U,
42778
+ PT_PER_PX as V,
42779
+ createEditorTableCell as W,
42780
+ createEditorTableRow as X,
42781
+ createEditorTable as Y,
42782
+ PX_PER_POINT as Z,
42783
+ underlineStyleToCssDecorationStyle as _,
42665
42784
  getPageContentWidth as a,
42666
- resolveFloatingObjectRect as a$,
42667
- collectInlineRuns as a0,
42668
- parseParagraphStyle as a1,
42669
- getRunImage as a2,
42670
- InlineShell as a3,
42671
- BalloonShell as a4,
42672
- DocumentShell as a5,
42673
- createMemo as a6,
42674
- getCaretRectFromSnapshot as a7,
42675
- getParagraphRectFromSnapshot as a8,
42676
- createComponent as a9,
42677
- setPreciseFontPreference as aA,
42678
- setWelcomeSeen as aB,
42679
- enablePreciseFontMode as aC,
42680
- TWIPS_PER_POINT as aD,
42681
- PX_PER_INCH as aE,
42682
- TWIPS_PER_INCH as aF,
42683
- normalizeHex6 as aG,
42684
- TABLE_CONDITIONAL_FLAG_ATTRIBUTES as aH,
42685
- TABLE_BORDER_EDGE_KEYS as aI,
42686
- resolveEffectiveParagraphStyle as aJ,
42687
- resolveEffectiveTextStyleForParagraph as aK,
42688
- EMU_PER_PT as aL,
42689
- OOXML_ROTATION_UNITS as aM,
42690
- OOXML_PERCENT_DENOMINATOR as aN,
42691
- parseHexColorToRgb255 as aO,
42692
- EMU_PER_PX as aP,
42693
- getRunFootnoteReference as aQ,
42694
- getRunEndnoteReference as aR,
42695
- iterateFootnoteReferenceRuns as aS,
42696
- iterateEndnoteReferenceRuns as aT,
42697
- imageContentTypeDefaults as aU,
42698
- getRunFieldChar as aV,
42699
- getRunFieldInstruction as aW,
42700
- createEditorRun as aX,
42701
- JSZip as aY,
42702
- imageExtensionFromMime as aZ,
42703
- pxToPt as a_,
42704
- CaretOverlay as aa,
42705
- Show as ab,
42706
- createRenderEffect as ac,
42707
- style as ad,
42708
- setAttribute as ae,
42709
- setStyleProperty as af,
42710
- memo as ag,
42711
- template as ah,
42712
- addEventListener as ai,
42713
- insert as aj,
42714
- delegateEvents as ak,
42715
- useI18n as al,
42716
- createEffect as am,
42717
- use as an,
42718
- Dialog as ao,
42719
- className as ap,
42720
- For as aq,
42721
- UNDERLINE_STYLE_OPTIONS as ar,
42722
- Tabs as as,
42723
- createStore as at,
42724
- reconcile as au,
42725
- onMount as av,
42726
- onCleanup as aw,
42727
- PluginUiHost as ax,
42728
- OasisEditorEditor as ay,
42729
- OasisBrandMark as az,
42785
+ imageExtensionFromMime as a$,
42786
+ listKindForTag as a0,
42787
+ isParagraphTag as a1,
42788
+ collectInlineRuns as a2,
42789
+ parseParagraphStyle as a3,
42790
+ getRunImage as a4,
42791
+ InlineShell as a5,
42792
+ BalloonShell as a6,
42793
+ DocumentShell as a7,
42794
+ createMemo as a8,
42795
+ getCaretRectFromSnapshot as a9,
42796
+ OasisEditorEditor as aA,
42797
+ OasisBrandMark as aB,
42798
+ setPreciseFontPreference as aC,
42799
+ setWelcomeSeen as aD,
42800
+ enablePreciseFontMode as aE,
42801
+ TWIPS_PER_POINT as aF,
42802
+ PX_PER_INCH as aG,
42803
+ TWIPS_PER_INCH as aH,
42804
+ normalizeHex6 as aI,
42805
+ TABLE_CONDITIONAL_FLAG_ATTRIBUTES as aJ,
42806
+ TABLE_BORDER_EDGE_KEYS as aK,
42807
+ resolveEffectiveParagraphStyle as aL,
42808
+ resolveEffectiveTextStyleForParagraph as aM,
42809
+ EMU_PER_PT as aN,
42810
+ OOXML_ROTATION_UNITS as aO,
42811
+ OOXML_PERCENT_DENOMINATOR as aP,
42812
+ parseHexColorToRgb255 as aQ,
42813
+ EMU_PER_PX as aR,
42814
+ getRunFootnoteReference as aS,
42815
+ getRunEndnoteReference as aT,
42816
+ iterateFootnoteReferenceRuns as aU,
42817
+ iterateEndnoteReferenceRuns as aV,
42818
+ imageContentTypeDefaults as aW,
42819
+ getRunFieldChar as aX,
42820
+ getRunFieldInstruction as aY,
42821
+ createEditorRun as aZ,
42822
+ JSZip as a_,
42823
+ getParagraphRectFromSnapshot as aa,
42824
+ createComponent as ab,
42825
+ CaretOverlay as ac,
42826
+ Show as ad,
42827
+ createRenderEffect as ae,
42828
+ style as af,
42829
+ setAttribute as ag,
42830
+ setStyleProperty as ah,
42831
+ memo as ai,
42832
+ template as aj,
42833
+ addEventListener as ak,
42834
+ insert as al,
42835
+ delegateEvents as am,
42836
+ useI18n as an,
42837
+ createEffect as ao,
42838
+ use as ap,
42839
+ Dialog as aq,
42840
+ className as ar,
42841
+ For as as,
42842
+ UNDERLINE_STYLE_OPTIONS as at,
42843
+ Tabs as au,
42844
+ createStore as av,
42845
+ reconcile as aw,
42846
+ onMount as ax,
42847
+ onCleanup as ay,
42848
+ PluginUiHost as az,
42730
42849
  getPageBodyTop as b,
42731
- findParagraphLocation as b$,
42732
- getTextBoxFloatingGeometry as b0,
42733
- getPresetPathSegments as b1,
42734
- buildListLabels as b2,
42735
- PX_PER_POINT as b3,
42736
- DEFAULT_FONT_SIZE_PX as b4,
42737
- resolveGradientAxis as b5,
42738
- isDoubleUnderlineStyle as b6,
42739
- isWavyUnderlineStyle as b7,
42740
- underlineStyleLineWidthPx as b8,
42741
- WAVY_UNDERLINE_WAVELENGTH_PX as b9,
42742
- collectPdfFontFamilies as bA,
42743
- outlineFrom as bB,
42744
- getPageHeaderZoneTop as bC,
42745
- getPageColumnRects as bD,
42746
- findFootnoteReference as bE,
42747
- FOOTNOTE_MARKER_GUTTER_PX as bF,
42748
- resolveImporterForFile as bG,
42749
- getDocumentSectionsCanonical as bH,
42750
- getDocumentParagraphsCanonical as bI,
42751
- getDocumentParagraphs as bJ,
42752
- getDocumentPageSettings as bK,
42753
- getTableCellContentWidthForParagraph as bL,
42754
- layoutMetricsEpoch as bM,
42755
- bumpLayoutMetricsEpoch as bN,
42756
- createCanvasLayoutSnapshotProvider as bO,
42757
- on as bP,
42758
- debounce as bQ,
42759
- unwrap as bR,
42760
- perfTimer as bS,
42761
- getRunTextBox as bT,
42762
- createEditorDocument as bU,
42763
- resolveResizedDimensions as bV,
42764
- resolveTextBoxRenderHeight as bW,
42765
- getToolbarStyleState as bX,
42766
- getCachedCanvasImage as bY,
42767
- measureParagraphMinContentWidthPx as bZ,
42768
- getEditableBlocksForZone as b_,
42769
- WAVY_UNDERLINE_AMPLITUDE_PX as ba,
42770
- DOUBLE_UNDERLINE_OFFSET_PX as bb,
42771
- underlineStyleDashArray as bc,
42772
- EMPHASIS_GLYPH as bd,
42773
- rgb255ToHex as be,
42774
- getImageFloatingGeometry as bf,
42775
- textStyleToFontSizePt as bg,
42776
- resolveOpenTypeFeatureTags as bh,
42777
- resolveDecorationLineY as bi,
42778
- DOUBLE_STRIKE_OFFSET_PX as bj,
42779
- resolveListLabel as bk,
42780
- getListLabelInset as bl,
42781
- getAlignedListLabelInset as bm,
42782
- getParagraphBorderInsets as bn,
42783
- buildSegmentTable as bo,
42784
- buildCanvasTableLayout as bp,
42785
- resolveCanvasTableWidth as bq,
42786
- resolveFloatingTableRect as br,
42787
- normalizeFamily as bs,
42788
- ROBOTO_FONT_FILES as bt,
42789
- loadFontAsset as bu,
42790
- OFFICE_COMPAT_FONT_FAMILIES as bv,
42791
- BinaryReader as bw,
42792
- buildSfnt as bx,
42793
- defaultFontDecoderRegistry as by,
42794
- SfntFontProgram as bz,
42850
+ VERTICAL_HIT_WEIGHT as b$,
42851
+ pxToPt as b0,
42852
+ resolveFloatingObjectRect as b1,
42853
+ getTextBoxFloatingGeometry as b2,
42854
+ getPresetPathSegments as b3,
42855
+ buildListLabels as b4,
42856
+ DEFAULT_FONT_SIZE_PX as b5,
42857
+ resolveGradientAxis as b6,
42858
+ isDoubleUnderlineStyle as b7,
42859
+ isWavyUnderlineStyle as b8,
42860
+ underlineStyleLineWidthPx as b9,
42861
+ defaultFontDecoderRegistry as bA,
42862
+ SfntFontProgram as bB,
42863
+ collectPdfFontFamilies as bC,
42864
+ outlineFrom as bD,
42865
+ getPageHeaderZoneTop as bE,
42866
+ getPageColumnRects as bF,
42867
+ findFootnoteReference as bG,
42868
+ FOOTNOTE_MARKER_GUTTER_PX as bH,
42869
+ resolveImporterForFile as bI,
42870
+ roundTo as bJ,
42871
+ getDocumentSectionsCanonical as bK,
42872
+ getDocumentParagraphsCanonical as bL,
42873
+ getDocumentParagraphs as bM,
42874
+ getDocumentPageSettings as bN,
42875
+ getTableCellContentWidthForParagraph as bO,
42876
+ layoutMetricsEpoch as bP,
42877
+ bumpLayoutMetricsEpoch as bQ,
42878
+ createCanvasLayoutSnapshotProvider as bR,
42879
+ on as bS,
42880
+ debounce as bT,
42881
+ unwrap as bU,
42882
+ perfTimer as bV,
42883
+ getRunTextBox as bW,
42884
+ createEditorDocument as bX,
42885
+ resolveResizedDimensions as bY,
42886
+ resolveTextBoxRenderHeight as bZ,
42887
+ getToolbarStyleState as b_,
42888
+ WAVY_UNDERLINE_WAVELENGTH_PX as ba,
42889
+ WAVY_UNDERLINE_AMPLITUDE_PX as bb,
42890
+ DOUBLE_UNDERLINE_OFFSET_PX as bc,
42891
+ underlineStyleDashArray as bd,
42892
+ EMPHASIS_GLYPH as be,
42893
+ rgb255ToHex as bf,
42894
+ getImageFloatingGeometry as bg,
42895
+ textStyleToFontSizePt as bh,
42896
+ TEXT_BASELINE_RATIO as bi,
42897
+ resolveOpenTypeFeatureTags as bj,
42898
+ resolveDecorationLineY as bk,
42899
+ DOUBLE_STRIKE_OFFSET_PX as bl,
42900
+ resolveListLabel as bm,
42901
+ getListLabelInset as bn,
42902
+ getAlignedListLabelInset as bo,
42903
+ getParagraphBorderInsets as bp,
42904
+ buildSegmentTable as bq,
42905
+ buildCanvasTableLayout as br,
42906
+ resolveCanvasTableWidth as bs,
42907
+ resolveFloatingTableRect as bt,
42908
+ normalizeFamily as bu,
42909
+ ROBOTO_FONT_FILES as bv,
42910
+ loadFontAsset as bw,
42911
+ OFFICE_COMPAT_FONT_FAMILIES as bx,
42912
+ BinaryReader as by,
42913
+ buildSfnt as bz,
42795
42914
  getPageBodyBottom as c,
42796
- SplitButton as c$,
42797
- createSectionBoundaryParagraph as c0,
42798
- normalizePageSettings as c1,
42799
- DEFAULT_EDITOR_PAGE_SETTINGS as c2,
42800
- markStart as c3,
42801
- markEnd as c4,
42802
- getParagraphEntries as c5,
42803
- getParagraphById as c6,
42804
- createEditorFootnote as c7,
42805
- createFootnoteReferenceRun as c8,
42806
- renumberFootnotes as c9,
42807
- createEditorLogger as cA,
42808
- registerDomStatsSurface as cB,
42809
- Button as cC,
42810
- Checkbox as cD,
42811
- ColorPicker as cE,
42812
- CommandRegistry as cF,
42813
- DEFAULT_PALETTE as cG,
42814
- DialogFooter as cH,
42815
- FloatingActionButton as cI,
42816
- GridPicker as cJ,
42817
- IconButton as cK,
42818
- Menu as cL,
42819
- OASIS_BUILTIN_COMMANDS as cM,
42820
- OASIS_MENU_ITEMS as cN,
42821
- OASIS_TOOLBAR_ITEMS as cO,
42822
- OasisEditorAppLazy as cP,
42823
- OasisEditorContainer as cQ,
42824
- PluginCollection as cR,
42825
- Popover as cS,
42826
- RIBBON_TABS as cT,
42827
- Select as cU,
42828
- SelectField as cV,
42829
- Separator as cW,
42830
- SidePanel as cX,
42831
- SidePanelBody as cY,
42832
- SidePanelFooter as cZ,
42833
- SidePanelHeader as c_,
42834
- getHeadingLevel as ca,
42835
- preciseFontModeVersion as cb,
42836
- isPreciseFontModeEnabled as cc,
42837
- resolveNamedTextStyle as cd,
42838
- togglePreciseFontMode as ce,
42839
- nextFontSizePt as cf,
42840
- previousFontSizePt as cg,
42841
- fontSizePtToPx as ch,
42842
- createDefaultToolbarPreset as ci,
42843
- MenuRegistry as cj,
42844
- createToolbarRegistry as ck,
42845
- Editor as cl,
42846
- resolveCommandRef as cm,
42847
- commandRefName as cn,
42848
- createOasisEditorClient as co,
42849
- createEditorZoom as cp,
42850
- startLongTaskObserver as cq,
42851
- installGlobalReport as cr,
42852
- applyStoredPreciseFontPreference as cs,
42853
- getWelcomeSeen as ct,
42854
- isLocalFontAccessSupported as cu,
42855
- EDITOR_SCROLL_PADDING_PX as cv,
42856
- Toolbar as cw,
42857
- OasisEditorLoading as cx,
42858
- I18nProvider as cy,
42859
- createTranslator as cz,
42915
+ SidePanel as c$,
42916
+ getCachedCanvasImage as c0,
42917
+ measureParagraphMinContentWidthPx as c1,
42918
+ getEditableBlocksForZone as c2,
42919
+ findParagraphLocation as c3,
42920
+ createSectionBoundaryParagraph as c4,
42921
+ normalizePageSettings as c5,
42922
+ DEFAULT_EDITOR_PAGE_SETTINGS as c6,
42923
+ markStart as c7,
42924
+ markEnd as c8,
42925
+ getParagraphEntries as c9,
42926
+ Toolbar as cA,
42927
+ OasisEditorLoading as cB,
42928
+ I18nProvider as cC,
42929
+ createTranslator as cD,
42930
+ createEditorLogger as cE,
42931
+ registerDomStatsSurface as cF,
42932
+ Button as cG,
42933
+ Checkbox as cH,
42934
+ ColorPicker as cI,
42935
+ CommandRegistry as cJ,
42936
+ DEFAULT_PALETTE as cK,
42937
+ DialogFooter as cL,
42938
+ FloatingActionButton as cM,
42939
+ GridPicker as cN,
42940
+ IconButton as cO,
42941
+ Menu as cP,
42942
+ OASIS_BUILTIN_COMMANDS as cQ,
42943
+ OASIS_MENU_ITEMS as cR,
42944
+ OASIS_TOOLBAR_ITEMS as cS,
42945
+ OasisEditorAppLazy as cT,
42946
+ OasisEditorContainer as cU,
42947
+ PluginCollection as cV,
42948
+ Popover as cW,
42949
+ RIBBON_TABS as cX,
42950
+ Select as cY,
42951
+ SelectField as cZ,
42952
+ Separator as c_,
42953
+ getParagraphById as ca,
42954
+ createEditorFootnote as cb,
42955
+ createFootnoteReferenceRun as cc,
42956
+ renumberFootnotes as cd,
42957
+ getHeadingLevel as ce,
42958
+ preciseFontModeVersion as cf,
42959
+ isPreciseFontModeEnabled as cg,
42960
+ resolveNamedTextStyle as ch,
42961
+ togglePreciseFontMode as ci,
42962
+ nextFontSizePt as cj,
42963
+ previousFontSizePt as ck,
42964
+ fontSizePtToPx as cl,
42965
+ createDefaultToolbarPreset as cm,
42966
+ MenuRegistry as cn,
42967
+ createToolbarRegistry as co,
42968
+ Editor as cp,
42969
+ resolveCommandRef as cq,
42970
+ commandRefName as cr,
42971
+ createOasisEditorClient as cs,
42972
+ createEditorZoom as ct,
42973
+ startLongTaskObserver as cu,
42974
+ installGlobalReport as cv,
42975
+ applyStoredPreciseFontPreference as cw,
42976
+ getWelcomeSeen as cx,
42977
+ isLocalFontAccessSupported as cy,
42978
+ EDITOR_SCROLL_PADDING_PX as cz,
42860
42979
  domTextMeasurer as d,
42861
- StyleGallery as d0,
42862
- TextField as d1,
42863
- Button$1 as d2,
42864
- buildRibbonTabDefinitions as d3,
42865
- createEditorCommandBus as d4,
42866
- createOasisEditor as d5,
42867
- createOasisEditorContainer as d6,
42868
- mount as d7,
42869
- registerToolbarRenderer as d8,
42980
+ SidePanelBody as d0,
42981
+ SidePanelFooter as d1,
42982
+ SidePanelHeader as d2,
42983
+ SplitButton as d3,
42984
+ StyleGallery as d4,
42985
+ TextField as d5,
42986
+ Button$1 as d6,
42987
+ buildRibbonTabDefinitions as d7,
42988
+ createEditorCommandBus as d8,
42989
+ createOasisEditor as d9,
42990
+ createOasisEditorContainer as da,
42991
+ mount as db,
42992
+ registerToolbarRenderer as dc,
42870
42993
  estimateTableBlockHeight as e,
42871
42994
  getFootnoteDisplayMarker as f,
42872
42995
  getProjectedParagraphBlockHeight as g,
42873
- getDocumentSections as h,
42874
- buildFootnoteReservations as i,
42875
- applyFootnotesToPages as j,
42876
- getRunField as k,
42996
+ createProjectionContext as h,
42997
+ getDocumentSections as i,
42998
+ buildFootnoteReservations as j,
42999
+ applyFootnotesToPages as k,
42877
43000
  listReferencedEndnotes as l,
42878
- projectBlocksLayout as m,
42879
- assertNever as n,
42880
- createSignal as o,
43001
+ getRunField as m,
43002
+ projectBlocksLayout as n,
43003
+ assertNever as o,
42881
43004
  projectParagraphLayout as p,
42882
- createEditorStateFromDocument as q,
43005
+ createSignal as q,
42883
43006
  reservationSignature as r,
42884
- setActiveHyphenation as s,
43007
+ createEditorStateFromDocument as s,
42885
43008
  createInitialEditorState as t,
42886
43009
  fontSizePxToPt as u,
42887
43010
  visitRun as v,