oasis-editor 0.0.43 → 0.0.44
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 findParagraphTableLocation, t as buildTableCellLayout, P as PT_PER_PX, u as createEditorTableCell, v as createEditorTableRow, w as createEditorTable, x as underlineStyleToCssDecorationStyle, y as resolveImageSrc, z as createEditorFootnote, A as createFootnoteReferenceRun, B as renumberFootnotes, C as iterateFootnoteReferenceRuns, D as getFootnoteDisplayMarker, F as createSignal, G as createEffect, H as onCleanup, I as buildCanvasLayoutSnapshot, J as on, K as onMount, L as debounce, M as unwrap, N as getDocumentParagraphs, O as getDocumentSectionsCanonical, Q as createEditorDocument, R as getPageContentWidth, S as getDocumentPageSettings, T as getTableCellContentWidthForParagraph, U as resolveResizedDimensions, V as resolveTextBoxRenderHeight, W as TWIPS_PER_POINT, X as PX_PER_INCH, Y as TWIPS_PER_INCH, Z as resolveEffectiveParagraphStyle, _ as resolveEffectiveTextStyleForParagraph, $ as EMU_PER_PT, a0 as iterateEndnoteReferenceRuns, a1 as JSZip, a2 as imageContentTypeDefaults, a3 as imageExtensionFromMime, a4 as pxToPt$1, a5 as resolveFloatingObjectRect, a6 as getTextBoxFloatingGeometry, a7 as getPresetPathSegments, a8 as projectBlocksLayout, a9 as buildListLabels, aa as textStyleToFontSizePt, ab as PX_PER_POINT, ac as DEFAULT_FONT_SIZE_PX, ad as isDoubleUnderlineStyle, ae as isWavyUnderlineStyle, af as underlineStyleLineWidthPx, ag as underlineStyleDashArray, ah as resolveListLabel, ai as getListLabelInset, aj as getAlignedListLabelInset, ak as getParagraphBorderInsets, al as buildSegmentTable, am as buildCanvasTableLayout, an as normalizeFamily, ao as ROBOTO_FONT_FILES, ap as loadFontAsset, aq as OFFICE_COMPAT_FONT_FAMILIES, ar as buildSfnt, as as defaultFontDecoderRegistry, at as SfntFontProgram, au as collectPdfFontFamilies, av as projectDocumentLayout, aw as getPageHeaderZoneTop, ax as getPageBodyTop, ay as getPageColumnRects, az as findFootnoteReference, aA as FOOTNOTE_MARKER_GUTTER_PX, aB as resolveImporterForFile, aC as createEditorStateFromDocument, aD as getDocumentParagraphsCanonical, aE as getToolbarStyleState, aF as STANDARD_FONT_SIZES_PT, aG as fontSizePxToPt, aH as probeLocalFontFamilies, aI as createInitialEditorState, aJ as parseFontSizePtToPx, aK as formatFontSizePt, 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-
|
|
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 findParagraphTableLocation, t as buildTableCellLayout, P as PT_PER_PX, u as createEditorTableCell, v as createEditorTableRow, w as createEditorTable, x as underlineStyleToCssDecorationStyle, y as resolveImageSrc, z as createEditorFootnote, A as createFootnoteReferenceRun, B as renumberFootnotes, C as iterateFootnoteReferenceRuns, D as getFootnoteDisplayMarker, F as createSignal, G as createEffect, H as onCleanup, I as buildCanvasLayoutSnapshot, J as on, K as onMount, L as debounce, M as unwrap, N as getDocumentParagraphs, O as getDocumentSectionsCanonical, Q as createEditorDocument, R as getPageContentWidth, S as getDocumentPageSettings, T as getTableCellContentWidthForParagraph, U as resolveResizedDimensions, V as resolveTextBoxRenderHeight, W as TWIPS_PER_POINT, X as PX_PER_INCH, Y as TWIPS_PER_INCH, Z as resolveEffectiveParagraphStyle, _ as resolveEffectiveTextStyleForParagraph, $ as EMU_PER_PT, a0 as iterateEndnoteReferenceRuns, a1 as JSZip, a2 as imageContentTypeDefaults, a3 as imageExtensionFromMime, a4 as pxToPt$1, a5 as resolveFloatingObjectRect, a6 as getTextBoxFloatingGeometry, a7 as getPresetPathSegments, a8 as projectBlocksLayout, a9 as buildListLabels, aa as textStyleToFontSizePt, ab as PX_PER_POINT, ac as DEFAULT_FONT_SIZE_PX, ad as isDoubleUnderlineStyle, ae as isWavyUnderlineStyle, af as underlineStyleLineWidthPx, ag as underlineStyleDashArray, ah as resolveListLabel, ai as getListLabelInset, aj as getAlignedListLabelInset, ak as getParagraphBorderInsets, al as buildSegmentTable, am as buildCanvasTableLayout, an as normalizeFamily, ao as ROBOTO_FONT_FILES, ap as loadFontAsset, aq as OFFICE_COMPAT_FONT_FAMILIES, ar as buildSfnt, as as defaultFontDecoderRegistry, at as SfntFontProgram, au as collectPdfFontFamilies, av as projectDocumentLayout, aw as getPageHeaderZoneTop, ax as getPageBodyTop, ay as getPageColumnRects, az as findFootnoteReference, aA as FOOTNOTE_MARKER_GUTTER_PX, aB as resolveImporterForFile, aC as createEditorStateFromDocument, aD as getDocumentParagraphsCanonical, aE as getToolbarStyleState, aF as STANDARD_FONT_SIZES_PT, aG as fontSizePxToPt, aH as probeLocalFontFamilies, aI as createInitialEditorState, aJ as parseFontSizePtToPx, aK as formatFontSizePt, 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-c-mRZBWM.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) {
|
|
@@ -9520,8 +9520,8 @@ function buildPartContext(blocks, numberingContext, state, document2) {
|
|
|
9520
9520
|
const common = {
|
|
9521
9521
|
rId,
|
|
9522
9522
|
runId: run.id,
|
|
9523
|
-
cx: Math.round(run.image.width *
|
|
9524
|
-
cy: Math.round(run.image.height *
|
|
9523
|
+
cx: Math.round(run.image.width * EMU_PER_PX),
|
|
9524
|
+
cy: Math.round(run.image.height * EMU_PER_PX),
|
|
9525
9525
|
alt: run.image.alt,
|
|
9526
9526
|
crop: run.image.crop,
|
|
9527
9527
|
fillMode: run.image.fillMode,
|
|
@@ -2483,7 +2483,7 @@ function OasisEditorAppLazy(props = {}) {
|
|
|
2483
2483
|
onCleanup(() => {
|
|
2484
2484
|
cancelled = true;
|
|
2485
2485
|
});
|
|
2486
|
-
import("./OasisEditorApp-
|
|
2486
|
+
import("./OasisEditorApp-Cu1s1H7A.js").then((m) => {
|
|
2487
2487
|
cancelled = true;
|
|
2488
2488
|
setProgress(1);
|
|
2489
2489
|
setTimeout(() => setApp(() => m.OasisEditorApp), 180);
|
|
@@ -15151,7 +15151,7 @@ function collectInlineTextBoxesFromLines(options) {
|
|
|
15151
15151
|
return inlineTextBoxes;
|
|
15152
15152
|
}
|
|
15153
15153
|
function resolveFloatingTopLeft(floating, opts) {
|
|
15154
|
-
const emuToPx2 = (value) => value === void 0 ? 0 : value /
|
|
15154
|
+
const emuToPx2 = (value) => value === void 0 ? 0 : value / EMU_PER_PX;
|
|
15155
15155
|
const h = floating.positionH;
|
|
15156
15156
|
const v = floating.positionV;
|
|
15157
15157
|
const hBase = (h == null ? void 0 : h.relativeFrom) === "page" ? opts.pageLeft : (h == null ? void 0 : h.relativeFrom) === "character" ? opts.lineLeftOffset + opts.slotLeft : opts.contentLeft;
|
package/dist/oasis-editor.js
CHANGED
|
@@ -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-
|
|
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-c-mRZBWM.js";
|
|
2
2
|
export {
|
|
3
3
|
b2 as BalloonShell,
|
|
4
4
|
bV as Button,
|