oasis-editor 0.0.54 → 0.0.56

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.
@@ -1,7 +1,7 @@
1
1
  var __defProp = Object.defineProperty;
2
2
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
3
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
- import { n as normalizeSelection, g as getParagraphs, c as createEditorParagraphFromRuns, a as getParagraphLength, b as createEditorRun, d as getDocumentSections, e as createEditorStyledRun, f as getParagraphText, h as getActiveZone, i as getActiveSectionIndex, p as positionToParagraphOffset, j as paragraphOffsetToPosition, k as clampPosition, l as findParagraphIndex, m as createCollapsedSelection, o as isSelectionCollapsed, E as EMU_PER_PX, q as createEditorParagraph, r as getBlockParagraphs, s as createEditorFootnote, t as createFootnoteReferenceRun, u as renumberFootnotes, v as iterateFootnoteReferenceRuns, w as getFootnoteDisplayMarker, x as findParagraphTableLocation, y as buildTableCellLayout, z as createSignal, A as createEffect, B as onCleanup, C as buildCanvasLayoutSnapshot, D as on, F as onMount, G as debounce, H as unwrap, I as getDocumentParagraphs, P as PT_PER_PX, J as createEditorTableCell, K as createEditorTableRow, L as createEditorTable, M as getDocumentSectionsCanonical, N as createEditorDocument, O as getPageContentWidth, Q as getDocumentPageSettings, R as getTableCellContentWidthForParagraph, S as resolveResizedDimensions, T as resolveImageSrc, U as resolveTextBoxRenderHeight, V as TWIPS_PER_POINT, W as PX_PER_INCH, X as TWIPS_PER_INCH, Y as resolveEffectiveParagraphStyle, Z as resolveEffectiveTextStyleForParagraph, _ as EMU_PER_PT, $ as iterateEndnoteReferenceRuns, a0 as imageContentTypeDefaults, a1 as JSZip, a2 as imageExtensionFromMime, a3 as pxToPt$1, a4 as resolveFloatingObjectRect, a5 as getTextBoxFloatingGeometry, a6 as getPresetPathSegments, a7 as projectBlocksLayout, a8 as buildListLabels, a9 as textStyleToFontSizePt, aa as PX_PER_POINT, ab as DEFAULT_FONT_SIZE_PX, ac as isDoubleUnderlineStyle, ad as isWavyUnderlineStyle, ae as underlineStyleLineWidthPx, af as underlineStyleDashArray, ag as resolveListLabel, ah as getListLabelInset, ai as getAlignedListLabelInset, aj as getParagraphBorderInsets, ak as buildSegmentTable, al as buildCanvasTableLayout, am as normalizeFamily, an as ROBOTO_FONT_FILES, ao as loadFontAsset, ap as OFFICE_COMPAT_FONT_FAMILIES, aq as buildSfnt, ar as defaultFontDecoderRegistry, as as SfntFontProgram, at as collectPdfFontFamilies, au as projectDocumentLayout, av as getPageHeaderZoneTop, aw as getPageBodyTop, ax as getPageColumnRects, ay as findFootnoteReference, az as FOOTNOTE_MARKER_GUTTER_PX, aA as resolveImporterForFile, aB as createEditorStateFromDocument, aC as getDocumentParagraphsCanonical, aD as getToolbarStyleState, aE as STANDARD_FONT_SIZES_PT, aF as fontSizePxToPt, aG as probeLocalFontFamilies, aH as createInitialEditorState, aI as parseFontSizePtToPx, aJ as formatFontSizePt, aK as underlineStyleToCssDecorationStyle, aL as listKindForTag, aM as isParagraphTag, aN as collectInlineRuns, aO as parseParagraphStyle, aP as getCachedCanvasImage, aQ as getHeadingLevel, aR as preciseFontModeVersion, aS as isPreciseFontModeEnabled, aT as togglePreciseFontMode, aU as nextFontSizePt, aV as previousFontSizePt, aW as fontSizePtToPx, aX as createDefaultToolbarPreset, aY as MenuRegistry, aZ as createToolbarRegistry, a_ as Editor, a$ as resolveCommandRef, b0 as commandRefName, b1 as InlineShell, b2 as BalloonShell, b3 as DocumentShell, b4 as createMemo, b5 as getCaretRectFromSnapshot, b6 as getParagraphRectFromSnapshot, b7 as createComponent, b8 as CaretOverlay, b9 as Show, ba as createRenderEffect, bb as style, bc as setAttribute, bd as setStyleProperty, be as memo, bf as template, bg as useI18n, bh as insert, bi as use, bj as addEventListener, bk as Dialog, bl as delegateEvents, bm as className, bn as For, bo as UNDERLINE_STYLE_OPTIONS, bp as Tabs, bq as measureParagraphMinContentWidthPx, br as getEditableBlocksForZone, bs as findParagraphLocation, bt as createSectionBoundaryParagraph, bu as normalizePageSettings, bv as DEFAULT_EDITOR_PAGE_SETTINGS, bw as markStart, bx as markEnd, by as getParagraphEntries, bz as getParagraphById, bA as PluginUiHost, bB as OasisEditorEditor, bC as perfTimer, bD as OasisBrandMark, bE as setPreciseFontPreference, bF as setWelcomeSeen, bG as enablePreciseFontMode, bH as createOasisEditorClient, bI as createEditorZoom, bJ as startLongTaskObserver, bK as installGlobalReport, bL as applyStoredPreciseFontPreference, bM as getWelcomeSeen, bN as isLocalFontAccessSupported, bO as EDITOR_SCROLL_PADDING_PX, bP as Toolbar, bQ as OasisEditorLoading, bR as I18nProvider, bS as createEditorLogger, bT as createTranslator, bU as registerDomStatsSurface } from "./index-BAj76FrB.js";
4
+ import { n as normalizeSelection, g as getParagraphs, c as createEditorParagraphFromRuns, a as getParagraphLength, b as createEditorRun, d as getDocumentSections, e as createEditorStyledRun, f as getParagraphText, h as getActiveZone, i as getActiveSectionIndex, p as positionToParagraphOffset, j as paragraphOffsetToPosition, k as clampPosition, l as findParagraphIndex, m as createCollapsedSelection, o as isSelectionCollapsed, E as EMU_PER_PX, q as createEditorParagraph, r as getBlockParagraphs, s as createEditorFootnote, t as createFootnoteReferenceRun, u as renumberFootnotes, v as iterateFootnoteReferenceRuns, w as getFootnoteDisplayMarker, x as findParagraphTableLocation, y as buildTableCellLayout, z as createSignal, A as createEffect, B as onCleanup, C as buildCanvasLayoutSnapshot, D as on, F as onMount, G as debounce, H as unwrap, I as getDocumentParagraphs, P as PT_PER_PX, J as createEditorTableCell, K as createEditorTableRow, L as createEditorTable, M as getDocumentSectionsCanonical, N as createEditorDocument, O as getPageContentWidth, Q as getDocumentPageSettings, R as getTableCellContentWidthForParagraph, S as resolveResizedDimensions, T as resolveImageSrc, U as resolveTextBoxRenderHeight, V as TWIPS_PER_POINT, W as PX_PER_INCH, X as TWIPS_PER_INCH, Y as resolveEffectiveParagraphStyle, Z as resolveEffectiveTextStyleForParagraph, _ as EMU_PER_PT, $ as iterateEndnoteReferenceRuns, a0 as imageContentTypeDefaults, a1 as JSZip, a2 as imageExtensionFromMime, a3 as pxToPt$1, a4 as resolveFloatingObjectRect, a5 as getTextBoxFloatingGeometry, a6 as getPresetPathSegments, a7 as projectBlocksLayout, a8 as buildListLabels, a9 as textStyleToFontSizePt, aa as PX_PER_POINT, ab as DEFAULT_FONT_SIZE_PX, ac as isDoubleUnderlineStyle, ad as isWavyUnderlineStyle, ae as underlineStyleLineWidthPx, af as underlineStyleDashArray, ag as resolveListLabel, ah as getListLabelInset, ai as getAlignedListLabelInset, aj as getParagraphBorderInsets, ak as buildSegmentTable, al as buildCanvasTableLayout, am as normalizeFamily, an as ROBOTO_FONT_FILES, ao as loadFontAsset, ap as OFFICE_COMPAT_FONT_FAMILIES, aq as buildSfnt, ar as defaultFontDecoderRegistry, as as SfntFontProgram, at as collectPdfFontFamilies, au as projectDocumentLayout, av as getPageHeaderZoneTop, aw as getPageBodyTop, ax as getPageColumnRects, ay as findFootnoteReference, az as FOOTNOTE_MARKER_GUTTER_PX, aA as resolveImporterForFile, aB as createEditorStateFromDocument, aC as getDocumentParagraphsCanonical, aD as getToolbarStyleState, aE as STANDARD_FONT_SIZES_PT, aF as fontSizePxToPt, aG as probeLocalFontFamilies, aH as createInitialEditorState, aI as parseFontSizePtToPx, aJ as formatFontSizePt, aK as underlineStyleToCssDecorationStyle, aL as listKindForTag, aM as isParagraphTag, aN as collectInlineRuns, aO as parseParagraphStyle, aP as getCachedCanvasImage, aQ as getHeadingLevel, aR as preciseFontModeVersion, aS as isPreciseFontModeEnabled, aT as togglePreciseFontMode, aU as nextFontSizePt, aV as previousFontSizePt, aW as fontSizePtToPx, aX as createDefaultToolbarPreset, aY as MenuRegistry, aZ as createToolbarRegistry, a_ as Editor, a$ as resolveCommandRef, b0 as commandRefName, b1 as InlineShell, b2 as BalloonShell, b3 as DocumentShell, b4 as createMemo, b5 as getCaretRectFromSnapshot, b6 as getParagraphRectFromSnapshot, b7 as createComponent, b8 as CaretOverlay, b9 as Show, ba as createRenderEffect, bb as style, bc as setAttribute, bd as setStyleProperty, be as memo, bf as template, bg as useI18n, bh as insert, bi as use, bj as addEventListener, bk as Dialog, bl as delegateEvents, bm as className, bn as For, bo as UNDERLINE_STYLE_OPTIONS, bp as Tabs, bq as measureParagraphMinContentWidthPx, br as getEditableBlocksForZone, bs as findParagraphLocation, bt as createSectionBoundaryParagraph, bu as normalizePageSettings, bv as DEFAULT_EDITOR_PAGE_SETTINGS, bw as markStart, bx as markEnd, by as getParagraphEntries, bz as getParagraphById, bA as PluginUiHost, bB as OasisEditorEditor, bC as perfTimer, bD as OasisBrandMark, bE as setPreciseFontPreference, bF as setWelcomeSeen, bG as enablePreciseFontMode, bH as createOasisEditorClient, bI as createEditorZoom, bJ as startLongTaskObserver, bK as installGlobalReport, bL as applyStoredPreciseFontPreference, bM as getWelcomeSeen, bN as isLocalFontAccessSupported, bO as EDITOR_SCROLL_PADDING_PX, bP as Toolbar, bQ as OasisEditorLoading, bR as I18nProvider, bS as createEditorLogger, bT as createTranslator, bU as registerDomStatsSurface } from "./index-TE81CHER.js";
5
5
  function getSelectedObjectRun(state, predicate) {
6
6
  const normalized = normalizeSelection(state);
7
7
  if (normalized.isCollapsed || normalized.startIndex !== normalized.endIndex || normalized.endParagraphOffset - normalized.startParagraphOffset !== 1) {
@@ -2483,7 +2483,7 @@ function OasisEditorAppLazy(props = {}) {
2483
2483
  onCleanup(() => {
2484
2484
  cancelled = true;
2485
2485
  });
2486
- import("./OasisEditorApp-D9nFlW8O.js").then((m) => {
2486
+ import("./OasisEditorApp-jjFz0I9R.js").then((m) => {
2487
2487
  cancelled = true;
2488
2488
  setProgress(1);
2489
2489
  setTimeout(() => setApp(() => m.OasisEditorApp), 180);
@@ -12758,7 +12758,6 @@ function projectHeaderFooterBlocks(blocks, pageIndex, totalPages, measuredHeight
12758
12758
  defaultTabStop
12759
12759
  );
12760
12760
  }
12761
- const TEXT_BOX_AUTOFIT_SAFETY_PX$1 = 2;
12762
12761
  function normalizeCellStartPositions(row, starts, legacyStarts) {
12763
12762
  return row.cells.map((_, cellIdx) => {
12764
12763
  var _a, _b;
@@ -12944,6 +12943,83 @@ function positionsFinishedRow(row, ends) {
12944
12943
  }
12945
12944
  );
12946
12945
  }
12946
+ const MAX_COLUMN_BALANCE_ITERATIONS = 100;
12947
+ function projectColumnedBlocksLayout(context2, count, runTrackLayout) {
12948
+ var _a, _b;
12949
+ const { pageSettings, maxPageHeight, pageOffset = 0, existingPages = [] } = context2;
12950
+ const colWidth = ((_a = getPageColumnRects(pageSettings)[0]) == null ? void 0 : _a.width) ?? getPageContentWidth(pageSettings);
12951
+ const runTracks = (blocks, trackHeight) => runTrackLayout({
12952
+ ...context2,
12953
+ blocks,
12954
+ maxPageHeight: trackHeight,
12955
+ contentWidthOverride: colWidth,
12956
+ pageOffset: 0,
12957
+ existingPages: [],
12958
+ reservedHeightByPageIndex: void 0
12959
+ });
12960
+ let tracks = runTracks(context2.blocks, maxPageHeight);
12961
+ if (tracks.length > 1 || tracks.length === 1 && count > 1) {
12962
+ const trailingStart = Math.floor((tracks.length - 1) / count) * count;
12963
+ const trailingTracks = tracks.slice(trailingStart);
12964
+ const firstTrailingBlock = (_b = trailingTracks[0]) == null ? void 0 : _b.blocks[0];
12965
+ const prevTrack = trailingStart > 0 ? tracks[trailingStart - 1] : void 0;
12966
+ const prevLastBlock = prevTrack == null ? void 0 : prevTrack.blocks[prevTrack.blocks.length - 1];
12967
+ const cleanBoundary = firstTrailingBlock != null && (prevLastBlock == null || prevLastBlock.globalIndex !== firstTrailingBlock.globalIndex);
12968
+ if (cleanBoundary) {
12969
+ const startIndex = firstTrailingBlock.globalIndex;
12970
+ const sourceSubset = context2.blocks.slice(startIndex);
12971
+ const sumHeight = trailingTracks.reduce(
12972
+ (sum, track) => sum + track.height,
12973
+ 0
12974
+ );
12975
+ let target = Math.max(24, Math.ceil(sumHeight / count));
12976
+ let balanced = runTracks(sourceSubset, target);
12977
+ for (let iteration = 0; balanced.length > count && target < maxPageHeight && iteration < MAX_COLUMN_BALANCE_ITERATIONS; iteration += 1) {
12978
+ target = Math.min(maxPageHeight, Math.ceil(target * 1.05) + 4);
12979
+ balanced = runTracks(sourceSubset, target);
12980
+ }
12981
+ if (balanced.length <= count) {
12982
+ tracks = [...tracks.slice(0, trailingStart), ...balanced];
12983
+ }
12984
+ }
12985
+ }
12986
+ const pages = [...existingPages];
12987
+ const startPageIndex = existingPages.length > 0 ? existingPages[existingPages.length - 1].index + 1 : pageOffset;
12988
+ const physicalPageCount = Math.ceil(tracks.length / count);
12989
+ for (let p = 0; p < physicalPageCount; p += 1) {
12990
+ const pageIndex = startPageIndex + p;
12991
+ const pageTracks = tracks.slice(p * count, p * count + count);
12992
+ const blocks = [];
12993
+ let height = 0;
12994
+ pageTracks.forEach((track, columnIndex) => {
12995
+ for (const block of track.blocks) {
12996
+ block.columnIndex = columnIndex;
12997
+ blocks.push(block);
12998
+ }
12999
+ height = Math.max(height, track.height);
13000
+ });
13001
+ pages.push({
13002
+ id: `page:${pageIndex + 1}`,
13003
+ index: pageIndex,
13004
+ height,
13005
+ maxHeight: maxPageHeight,
13006
+ blocks,
13007
+ pageSettings
13008
+ });
13009
+ }
13010
+ if (pages.length === 0) {
13011
+ pages.push({
13012
+ id: `page:${startPageIndex + 1}`,
13013
+ index: startPageIndex,
13014
+ height: 0,
13015
+ maxHeight: maxPageHeight,
13016
+ blocks: [],
13017
+ pageSettings
13018
+ });
13019
+ }
13020
+ return pages;
13021
+ }
13022
+ const TEXT_BOX_AUTOFIT_SAFETY_PX$1 = 2;
12947
13023
  function estimateTextBoxAutoFitHeight(textBox, styles, measurer, pageIndex, totalPages, defaultTabStop) {
12948
13024
  var _a, _b, _c, _d, _e;
12949
13025
  if (!((_a = textBox.body) == null ? void 0 : _a.autoFit)) {
@@ -12990,7 +13066,11 @@ function estimateTextBoxAutoFitHeight(textBox, styles, measurer, pageIndex, tota
12990
13066
  function projectBlocksLayout(context2) {
12991
13067
  const columns = context2.pageSettings.columns;
12992
13068
  if (columns && columns.count > 1) {
12993
- return projectColumnedBlocksLayout(context2, columns.count);
13069
+ return projectColumnedBlocksLayout(
13070
+ context2,
13071
+ columns.count,
13072
+ projectColumnTrackLayout
13073
+ );
12994
13074
  }
12995
13075
  return projectColumnTrackLayout(context2);
12996
13076
  }
@@ -13572,82 +13652,6 @@ function projectColumnTrackLayout(context2) {
13572
13652
  }
13573
13653
  return pages;
13574
13654
  }
13575
- const MAX_COLUMN_BALANCE_ITERATIONS = 100;
13576
- function projectColumnedBlocksLayout(context2, count) {
13577
- var _a, _b;
13578
- const { pageSettings, maxPageHeight, pageOffset = 0, existingPages = [] } = context2;
13579
- const colWidth = ((_a = getPageColumnRects(pageSettings)[0]) == null ? void 0 : _a.width) ?? getPageContentWidth(pageSettings);
13580
- const runTracks = (blocks, trackHeight) => projectColumnTrackLayout({
13581
- ...context2,
13582
- blocks,
13583
- maxPageHeight: trackHeight,
13584
- contentWidthOverride: colWidth,
13585
- pageOffset: 0,
13586
- existingPages: [],
13587
- reservedHeightByPageIndex: void 0
13588
- });
13589
- let tracks = runTracks(context2.blocks, maxPageHeight);
13590
- if (tracks.length > 1 || tracks.length === 1 && count > 1) {
13591
- const trailingStart = Math.floor((tracks.length - 1) / count) * count;
13592
- const trailingTracks = tracks.slice(trailingStart);
13593
- const firstTrailingBlock = (_b = trailingTracks[0]) == null ? void 0 : _b.blocks[0];
13594
- const prevTrack = trailingStart > 0 ? tracks[trailingStart - 1] : void 0;
13595
- const prevLastBlock = prevTrack == null ? void 0 : prevTrack.blocks[prevTrack.blocks.length - 1];
13596
- const cleanBoundary = firstTrailingBlock != null && (prevLastBlock == null || prevLastBlock.globalIndex !== firstTrailingBlock.globalIndex);
13597
- if (cleanBoundary) {
13598
- const startIndex = firstTrailingBlock.globalIndex;
13599
- const sourceSubset = context2.blocks.slice(startIndex);
13600
- const sumHeight = trailingTracks.reduce(
13601
- (sum, track) => sum + track.height,
13602
- 0
13603
- );
13604
- let target = Math.max(24, Math.ceil(sumHeight / count));
13605
- let balanced = runTracks(sourceSubset, target);
13606
- for (let iteration = 0; balanced.length > count && target < maxPageHeight && iteration < MAX_COLUMN_BALANCE_ITERATIONS; iteration += 1) {
13607
- target = Math.min(maxPageHeight, Math.ceil(target * 1.05) + 4);
13608
- balanced = runTracks(sourceSubset, target);
13609
- }
13610
- if (balanced.length <= count) {
13611
- tracks = [...tracks.slice(0, trailingStart), ...balanced];
13612
- }
13613
- }
13614
- }
13615
- const pages = [...existingPages];
13616
- const startPageIndex = existingPages.length > 0 ? existingPages[existingPages.length - 1].index + 1 : pageOffset;
13617
- const physicalPageCount = Math.ceil(tracks.length / count);
13618
- for (let p = 0; p < physicalPageCount; p += 1) {
13619
- const pageIndex = startPageIndex + p;
13620
- const pageTracks = tracks.slice(p * count, p * count + count);
13621
- const blocks = [];
13622
- let height = 0;
13623
- pageTracks.forEach((track, columnIndex) => {
13624
- for (const block of track.blocks) {
13625
- block.columnIndex = columnIndex;
13626
- blocks.push(block);
13627
- }
13628
- height = Math.max(height, track.height);
13629
- });
13630
- pages.push({
13631
- id: `page:${pageIndex + 1}`,
13632
- index: pageIndex,
13633
- height,
13634
- maxHeight: maxPageHeight,
13635
- blocks,
13636
- pageSettings
13637
- });
13638
- }
13639
- if (pages.length === 0) {
13640
- pages.push({
13641
- id: `page:${startPageIndex + 1}`,
13642
- index: startPageIndex,
13643
- height: 0,
13644
- maxHeight: maxPageHeight,
13645
- blocks: [],
13646
- pageSettings
13647
- });
13648
- }
13649
- return pages;
13650
- }
13651
13655
  function getProjectedBlocksHeight(blocks) {
13652
13656
  if (!blocks || blocks.length === 0) {
13653
13657
  return 0;
@@ -1,25 +1,7 @@
1
- import { EditorBlockNode, EditorLayoutPage, EditorLayoutParagraph, EditorNamedStyle, EditorPageSettings } from '../core/model.js';
2
- import { ITextMeasurer } from '../core/engine.js';
1
+ import { EditorLayoutPage } from '../core/model.js';
2
+ import { ProjectBlocksLayoutContext } from './blocksPaginationTypes.js';
3
3
 
4
- export interface ProjectBlocksLayoutContext {
5
- blocks: EditorBlockNode[];
6
- pageSettings: EditorPageSettings;
7
- maxPageHeight: number;
8
- measuredHeights?: Record<string, number>;
9
- measuredParagraphLayouts?: Record<string, EditorLayoutParagraph>;
10
- styles?: Record<string, EditorNamedStyle>;
11
- pageOffset?: number;
12
- totalPages?: number;
13
- existingPages?: EditorLayoutPage[];
14
- measurer?: ITextMeasurer;
15
- reservedHeightByPageIndex?: Map<number, number>;
16
- defaultTabStop?: number;
17
- /**
18
- * Overrides the line-wrapping width (default: full page content width). Used
19
- * by the multi-column flow to wrap at a single column's width.
20
- */
21
- contentWidthOverride?: number;
22
- }
4
+ export type { ProjectBlocksLayoutContext } from './blocksPaginationTypes.js';
23
5
  /**
24
6
  * Entry point used by section pagination. Dispatches to the multi-column flow
25
7
  * when the page declares `columns.count > 1`, otherwise runs the standard
@@ -0,0 +1,22 @@
1
+ import { EditorBlockNode, EditorLayoutPage, EditorLayoutParagraph, EditorNamedStyle, EditorPageSettings } from '../core/model.js';
2
+ import { ITextMeasurer } from '../core/engine.js';
3
+
4
+ export interface ProjectBlocksLayoutContext {
5
+ blocks: EditorBlockNode[];
6
+ pageSettings: EditorPageSettings;
7
+ maxPageHeight: number;
8
+ measuredHeights?: Record<string, number>;
9
+ measuredParagraphLayouts?: Record<string, EditorLayoutParagraph>;
10
+ styles?: Record<string, EditorNamedStyle>;
11
+ pageOffset?: number;
12
+ totalPages?: number;
13
+ existingPages?: EditorLayoutPage[];
14
+ measurer?: ITextMeasurer;
15
+ reservedHeightByPageIndex?: Map<number, number>;
16
+ defaultTabStop?: number;
17
+ /**
18
+ * Overrides the line-wrapping width (default: full page content width). Used
19
+ * by the multi-column flow to wrap at a single column's width.
20
+ */
21
+ contentWidthOverride?: number;
22
+ }
@@ -0,0 +1,14 @@
1
+ import { EditorLayoutPage } from '../core/model.js';
2
+ import { ProjectBlocksLayoutContext } from './blocksPaginationTypes.js';
3
+
4
+ /**
5
+ * Multi-column (newspaper) flow. Lays blocks into single-column tracks, then
6
+ * groups every `count` consecutive tracks side-by-side onto one physical page,
7
+ * tagging each block with its `columnIndex`. The final page of the section is
8
+ * balanced so its columns are near-equal height, matching Word.
9
+ *
10
+ * The single-column track layout is injected as `runTrackLayout` so this module
11
+ * does not import back into blocksPagination (which dispatches to it) — keeping
12
+ * the recursion acyclic (S2).
13
+ */
14
+ export declare function projectColumnedBlocksLayout(context: ProjectBlocksLayoutContext, count: number, runTrackLayout: (context: ProjectBlocksLayoutContext) => EditorLayoutPage[]): EditorLayoutPage[];
@@ -0,0 +1,11 @@
1
+ import { EditorNamedStyle, EditorTableNode, EditorTableRowNode, TableCellBlockPosition } from '../core/model.js';
2
+ import { ITextMeasurer } from '../core/engine.js';
3
+
4
+ export declare function normalizeCellStartPositions(row: EditorTableRowNode, starts: TableCellBlockPosition[] | undefined, legacyStarts: number[] | undefined): TableCellBlockPosition[];
5
+ export declare function positionsToBlockIndexes(positions: TableCellBlockPosition[] | undefined): number[] | undefined;
6
+ export declare function hasPartialPositions(positions: TableCellBlockPosition[] | undefined): boolean;
7
+ export declare function buildRowSliceFromPositions(row: EditorTableRowNode, starts: TableCellBlockPosition[], ends: TableCellBlockPosition[]): EditorTableRowNode;
8
+ export declare function findCellSplitEndPosition(row: EditorTableRowNode, cellIndex: number, start: TableCellBlockPosition, availableHeight: number, styles: Record<string, EditorNamedStyle> | undefined, measurer: ITextMeasurer, defaultTabStop: number | undefined, contentWidth: number | undefined, table: EditorTableNode, rowIndex: number): TableCellBlockPosition;
9
+ export declare function canSplitTableRow(row: EditorTableRowNode | undefined): boolean;
10
+ export declare function positionsProgressed(starts: TableCellBlockPosition[], ends: TableCellBlockPosition[]): boolean;
11
+ export declare function positionsFinishedRow(row: EditorTableRowNode, ends: TableCellBlockPosition[]): boolean;
@@ -1,4 +1,4 @@
1
- import { b2, bV, bW, bX, bY, bZ, bk, b_, b3, a_, b$, c0, c1, b1, c2, aY, c3, c4, c5, c6, c7, bQ, c8, c9, ca, cb, cc, cd, ce, cf, cg, ch, ci, bp, cj, bP, ck, bX as bX2, c0 as c02, c2 as c22, cb as cb2, cd as cd2, ci as ci2, cl, b0, aX, cm, cn, co, aZ, cp, cq, a$ } from "./index-BAj76FrB.js";
1
+ import { b2, bV, bW, bX, bY, bZ, bk, b_, b3, a_, b$, c0, c1, b1, c2, aY, c3, c4, c5, c6, c7, bQ, c8, c9, ca, cb, cc, cd, ce, cf, cg, ch, ci, bp, cj, bP, ck, bX as bX2, c0 as c02, c2 as c22, cb as cb2, cd as cd2, ci as ci2, cl, b0, aX, cm, cn, co, aZ, cp, cq, a$ } from "./index-TE81CHER.js";
2
2
  export {
3
3
  b2 as BalloonShell,
4
4
  bV as Button,