oasis-editor 0.0.136 → 0.0.137

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 { E as EMPTY_PROJECTION_CONTEXT, d as domTextMeasurer, g as getProjectedParagraphBlockHeight, e as estimateTableBlockHeight, p as projectParagraphLayout, a as getPageBodyBottom, b as getPageBodyTop, c as getPageContentWidth, F as FOOTNOTE_MARKER_GUTTER_PX, f as getParagraphText, h as getBlockParagraphs, i as getRunFootnoteReference, l as listReferencedEndnotes, j as getFootnoteDisplayMarker, k as createProjectionContext, m as getDocumentSections, n as getRunField, o as projectBlocksLayout, v as visitRun, q as assertNever, r as createSignal, s as createEditorStateFromDocument, t as createInitialEditorState, S as STANDARD_FONT_SIZES_PT, u as fontSizePxToPt, w as probeLocalFontFamilies, x as createEditorParagraphFromRuns, y as isInlineObjectRun, z as createEditorStyledRun, A as getParagraphLength, B as getActiveZone, C as getActiveSectionIndex, D as getParagraphs, G as normalizeSelection, H as positionToParagraphOffset, I as paragraphOffsetToPosition, J as clampPosition, K as findParagraphIndex, L as createCollapsedSelection, M as isSelectionCollapsed, N as parseFontSizePtToPx, O as formatFontSizePt, P as createEditorParagraph, Q as resolveDefaultParagraphStyleId, R as findParagraphTableLocation, T as buildTableCellLayout, U as PT_PER_PX, V as createEditorTableCell, W as createEditorTableRow, X as createEditorTable, Y as PX_PER_POINT, Z as underlineStyleToCssDecorationStyle, _ as resolveImageSrc, $ as listKindForTag, a0 as isParagraphTag, a1 as collectInlineRuns, a2 as parseParagraphStyle, a3 as getRunImage, a4 as InlineShell, a5 as BalloonShell, a6 as DocumentShell, a7 as createMemo, a8 as getCaretRectFromSnapshot, a9 as getParagraphRectFromSnapshot, aa as createComponent, ab as CaretOverlay, ac as Show, ad as createRenderEffect, ae as style, af as setStyleProperty, ag as setAttribute, ah as memo, ai as template, aj as Button, ak as useI18n, al as createEffect, am as TextField, an as Dialog, ao as insert, ap as className, aq as Grid, ar as SelectField, as as StatusText, at as ColorField, au as UNDERLINE_STYLE_OPTIONS, av as Stack, aw as For, ax as ToggleChip, ay as FormField, az as Checkbox, aA as FieldGroup, aB as Tabs, aC as NumberField, aD as parseNumber, aE as createStore, aF as reconcile, aG as RadioGroup, aH as Radio$1, aI as TextAreaField, aJ as Text, aK as SurfaceButton, aL as delegateEvents, aM as onMount, aN as onCleanup, aO as CheckIcon, aP as use, aQ as PluginUiHost, aR as OasisEditorEditor, aS as OasisBrandMark, aT as setPreciseFontPreference, aU as setWelcomeSeen, aV as enablePreciseFontMode, aW as TWIPS_PER_POINT, aX as PX_PER_INCH, aY as TWIPS_PER_INCH, aZ as normalizeHex6, a_ as TABLE_CONDITIONAL_FLAG_ATTRIBUTES, a$ as TABLE_BORDER_EDGE_KEYS, b0 as resolveEffectiveParagraphStyle, b1 as resolveEffectiveTextStyleForParagraph, b2 as EMU_PER_PT, b3 as OOXML_ROTATION_UNITS, b4 as OOXML_PERCENT_DENOMINATOR, b5 as parseHexColorToRgb255, b6 as EMU_PER_PX, b7 as getRunEndnoteReference, b8 as iterateFootnoteReferenceRuns, b9 as iterateEndnoteReferenceRuns, ba as imageContentTypeDefaults, bb as getRunFieldChar, bc as getRunFieldInstruction, bd as createEditorRun, be as JSZip, bf as imageExtensionFromMime, bg as pxToPt$1, bh as resolveFloatingObjectRect, bi as getTextBoxFloatingGeometry, bj as getPresetPathSegments, bk as buildListLabels, bl as lineDashPatternPt, bm as DEFAULT_FONT_SIZE_PX, bn as resolveGradientAxis, bo as isDoubleUnderlineStyle, bp as isWavyUnderlineStyle, bq as underlineStyleLineWidthPx, br as WAVY_UNDERLINE_WAVELENGTH_PX, bs as WAVY_UNDERLINE_AMPLITUDE_PX, bt as DOUBLE_UNDERLINE_OFFSET_PX, bu as underlineStyleDashArray, bv as EMPHASIS_GLYPH, bw as rgb255ToHex, bx as getImageFloatingGeometry, by as textStyleToFontSizePt, bz as resolveTextAlignmentBaselineOffset, bA as TEXT_BASELINE_RATIO, bB as resolveRenderedTextChar, bC as resolveOpenTypeFeatureTags, bD as isLowercaseSmallCapsChar, bE as resolveDecorationLineY, bF as DOUBLE_STRIKE_OFFSET_PX, bG as resolveListLabel, bH as getListLabelInset, bI as getAlignedListLabelInset, bJ as getParagraphBorderInsets, bK as buildSegmentTable, bL as buildCanvasTableLayout, bM as resolveCanvasTableWidth, bN as resolveFloatingTableRect, bO as paragraphBetweenBorderMatches, bP as normalizeFamily, bQ as ROBOTO_FONT_FILES, bR as loadFontAsset, bS as getRemotePdfFontFaces, bT as OFFICE_COMPAT_FONT_FAMILIES, bU as BinaryReader, bV as buildSfnt, bW as defaultFontDecoderRegistry, bX as SfntFontProgram, bY as zlibSync, bZ as collectPdfFontFamilies, b_ as outlineFrom, b$ as getPageHeaderZoneTop, c0 as getPageColumnRects, c1 as findFootnoteReference, c2 as resolveImporterForFile, c3 as roundTo, c4 as getDocumentSectionsCanonical, c5 as getDocumentParagraphsCanonical, c6 as getDocumentParagraphs, c7 as PX_PER_CM, c8 as getDocumentPageSettings, c9 as getTableCellContentWidthForParagraph, ca as layoutMetricsEpoch, cb as bumpLayoutMetricsEpoch, cc as createCanvasLayoutSnapshotProvider, cd as on, ce as debounce, cf as unwrap, cg as perfTimer, ch as prepareDocumentFonts, ci as getRunTextBox, cj as createEditorDocument, ck as resolveResizedDimensions, cl as axisSignForDirection, cm as clamp$1, cn as MIN_RESIZE_SIZE_PX, co as resolveTextBoxRenderHeight, cp as getToolbarStyleState, cq as VERTICAL_HIT_WEIGHT, cr as getCachedCanvasImage, cs as measureParagraphMinContentWidthPx, ct as getEditableBlocksForZone, cu as findParagraphLocation, cv as createSectionBoundaryParagraph, cw as normalizePageSettings, cx as DEFAULT_EDITOR_PAGE_SETTINGS, cy as markStart, cz as markEnd, cA as getParagraphEntries, cB as getParagraphById, cC as createEditorFootnote, cD as createFootnoteReferenceRun, cE as renumberFootnotes, cF as preciseFontModeVersion, cG as isPreciseFontModeEnabled, cH as getHeadingLevel, cI as togglePreciseFontMode, cJ as nextFontSizePt, cK as previousFontSizePt, cL as fontSizePtToPx, cM as resolveNamedTextStyle, cN as resolveNamedTableStyle, cO as createDefaultToolbarPreset, cP as MenuRegistry, cQ as createToolbarRegistry, cR as Editor, cS as resolveCommandRef, cT as commandRefName, cU as createOasisEditorClient, cV as createEditorZoom, cW as startLongTaskObserver, cX as installGlobalReport, cY as applyStoredPreciseFontPreference, cZ as getWelcomeSeen, c_ as isLocalFontAccessSupported, c$ as EDITOR_SCROLL_PADDING_PX, d0 as Toolbar, d1 as OasisEditorLoading, d2 as I18nProvider, d3 as createTranslator, d4 as registerDomStatsSurface, d5 as createEditorLogger } from "./index-Cbwb1bgI.js";
4
+ import { E as EMPTY_PROJECTION_CONTEXT, d as domTextMeasurer, g as getProjectedParagraphBlockHeight, e as estimateTableBlockHeight, p as projectParagraphLayout, a as getPageBodyBottom, b as getPageBodyTop, c as getPageContentWidth, F as FOOTNOTE_MARKER_GUTTER_PX, f as getParagraphText, h as getBlockParagraphs, i as getRunFootnoteReference, l as listReferencedEndnotes, j as getFootnoteDisplayMarker, k as createProjectionContext, m as getDocumentSections, n as getRunField, o as projectBlocksLayout, v as visitRun, q as assertNever, r as createSignal, s as createEditorStateFromDocument, t as createInitialEditorState, S as STANDARD_FONT_SIZES_PT, u as fontSizePxToPt, w as probeLocalFontFamilies, x as createEditorParagraphFromRuns, y as isInlineObjectRun, z as createEditorStyledRun, A as getParagraphLength, B as getActiveZone, C as getActiveSectionIndex, D as getParagraphs, G as normalizeSelection, H as positionToParagraphOffset, I as paragraphOffsetToPosition, J as clampPosition, K as findParagraphIndex, L as createCollapsedSelection, M as isSelectionCollapsed, N as parseFontSizePtToPx, O as formatFontSizePt, P as createEditorParagraph, Q as resolveDefaultParagraphStyleId, R as findParagraphTableLocation, T as buildTableCellLayout, U as PT_PER_PX, V as createEditorTableCell, W as createEditorTableRow, X as createEditorTable, Y as PX_PER_POINT, Z as underlineStyleToCssDecorationStyle, _ as resolveImageSrc, $ as listKindForTag, a0 as isParagraphTag, a1 as collectInlineRuns, a2 as parseParagraphStyle, a3 as getRunImage, a4 as InlineShell, a5 as BalloonShell, a6 as DocumentShell, a7 as createMemo, a8 as getCaretRectFromSnapshot, a9 as getParagraphRectFromSnapshot, aa as createComponent, ab as CaretOverlay, ac as Show, ad as createRenderEffect, ae as style, af as setStyleProperty, ag as setAttribute, ah as memo, ai as template, aj as Button, ak as useI18n, al as createEffect, am as TextField, an as Dialog, ao as insert, ap as className, aq as Grid, ar as SelectField, as as StatusText, at as ColorField, au as UNDERLINE_STYLE_OPTIONS, av as Stack, aw as For, ax as ToggleChip, ay as FormField, az as Checkbox, aA as FieldGroup, aB as Tabs, aC as NumberField, aD as parseNumber, aE as createStore, aF as reconcile, aG as RadioGroup, aH as Radio$1, aI as TextAreaField, aJ as Text, aK as SurfaceButton, aL as delegateEvents, aM as onMount, aN as onCleanup, aO as CheckIcon, aP as use, aQ as PluginUiHost, aR as OasisEditorEditor, aS as OasisBrandMark, aT as setPreciseFontPreference, aU as setWelcomeSeen, aV as enablePreciseFontMode, aW as TWIPS_PER_POINT, aX as PX_PER_INCH, aY as TWIPS_PER_INCH, aZ as normalizeHex6, a_ as TABLE_CONDITIONAL_FLAG_ATTRIBUTES, a$ as TABLE_BORDER_EDGE_KEYS, b0 as resolveEffectiveParagraphStyle, b1 as resolveEffectiveTextStyleForParagraph, b2 as EMU_PER_PT, b3 as OOXML_ROTATION_UNITS, b4 as OOXML_PERCENT_DENOMINATOR, b5 as parseHexColorToRgb255, b6 as EMU_PER_PX, b7 as getRunEndnoteReference, b8 as iterateFootnoteReferenceRuns, b9 as iterateEndnoteReferenceRuns, ba as imageContentTypeDefaults, bb as getRunFieldChar, bc as getRunFieldInstruction, bd as createEditorRun, be as JSZip, bf as imageExtensionFromMime, bg as pxToPt$1, bh as resolveFloatingObjectRect, bi as getTextBoxFloatingGeometry, bj as getPresetPathSegments, bk as buildListLabels, bl as lineDashPatternPt, bm as DEFAULT_FONT_SIZE_PX, bn as resolveGradientAxis, bo as isDoubleUnderlineStyle, bp as isWavyUnderlineStyle, bq as underlineStyleLineWidthPx, br as WAVY_UNDERLINE_WAVELENGTH_PX, bs as WAVY_UNDERLINE_AMPLITUDE_PX, bt as DOUBLE_UNDERLINE_OFFSET_PX, bu as underlineStyleDashArray, bv as EMPHASIS_GLYPH, bw as rgb255ToHex, bx as getImageFloatingGeometry, by as textStyleToFontSizePt, bz as resolveTextAlignmentBaselineOffset, bA as TEXT_BASELINE_RATIO, bB as resolveRenderedTextChar, bC as resolveOpenTypeFeatureTags, bD as isLowercaseSmallCapsChar, bE as resolveDecorationLineY, bF as DOUBLE_STRIKE_OFFSET_PX, bG as resolveListLabel, bH as getListLabelInset, bI as getAlignedListLabelInset, bJ as getParagraphBorderInsets, bK as buildSegmentTable, bL as buildCanvasTableLayout, bM as resolveCanvasTableWidth, bN as resolveFloatingTableRect, bO as paragraphBetweenBorderMatches, bP as normalizeFamily, bQ as ROBOTO_FONT_FILES, bR as loadFontAsset, bS as getRemotePdfFontFaces, bT as OFFICE_COMPAT_FONT_FAMILIES, bU as BinaryReader, bV as buildSfnt, bW as defaultFontDecoderRegistry, bX as SfntFontProgram, bY as zlibSync, bZ as collectPdfFontFamilies, b_ as outlineFrom, b$ as getPageHeaderZoneTop, c0 as getPageColumnRects, c1 as findFootnoteReference, c2 as resolveImporterForFile, c3 as roundTo, c4 as getDocumentSectionsCanonical, c5 as getDocumentParagraphsCanonical, c6 as getDocumentParagraphs, c7 as PX_PER_CM, c8 as getDocumentPageSettings, c9 as getTableCellContentWidthForParagraph, ca as layoutMetricsEpoch, cb as bumpLayoutMetricsEpoch, cc as createCanvasLayoutSnapshotProvider, cd as on, ce as debounce, cf as unwrap, cg as perfTimer, ch as prepareDocumentFonts, ci as getRunTextBox, cj as createEditorDocument, ck as resolveResizedDimensions, cl as axisSignForDirection, cm as clamp$1, cn as MIN_RESIZE_SIZE_PX, co as resolveTextBoxRenderHeight, cp as getToolbarStyleState, cq as VERTICAL_HIT_WEIGHT, cr as getCachedCanvasImage, cs as measureParagraphMinContentWidthPx, ct as getEditableBlocksForZone, cu as findParagraphLocation, cv as createSectionBoundaryParagraph, cw as normalizePageSettings, cx as DEFAULT_EDITOR_PAGE_SETTINGS, cy as markStart, cz as markEnd, cA as getParagraphEntries, cB as getParagraphById, cC as createEditorFootnote, cD as createFootnoteReferenceRun, cE as renumberFootnotes, cF as preciseFontModeVersion, cG as isPreciseFontModeEnabled, cH as getHeadingLevel, cI as togglePreciseFontMode, cJ as nextFontSizePt, cK as previousFontSizePt, cL as fontSizePtToPx, cM as resolveNamedTextStyle, cN as resolveNamedTableStyle, cO as createDefaultToolbarPreset, cP as MenuRegistry, cQ as createToolbarRegistry, cR as Editor, cS as resolveCommandRef, cT as commandRefName, cU as createOasisEditorClient, cV as createEditorZoom, cW as startLongTaskObserver, cX as installGlobalReport, cY as applyStoredPreciseFontPreference, cZ as getWelcomeSeen, c_ as isLocalFontAccessSupported, c$ as EDITOR_SCROLL_PADDING_PX, d0 as Toolbar, d1 as OasisEditorLoading, d2 as I18nProvider, d3 as createTranslator, d4 as registerDomStatsSurface, d5 as createEditorLogger } from "./index-Djyuogou.js";
5
5
  function projectHeaderFooterBlocksWithDependencies(blocks, deps, context = {}) {
6
6
  const {
7
7
  pageIndex,
@@ -2723,7 +2723,7 @@ function OasisEditorAppLazy(props = {}) {
2723
2723
  onCleanup(() => {
2724
2724
  cancelled = true;
2725
2725
  });
2726
- import("./OasisEditorApp-DPrjPRTW.js").then((m) => {
2726
+ import("./OasisEditorApp-32ewgFUr.js").then((m) => {
2727
2727
  cancelled = true;
2728
2728
  setProgress(1);
2729
2729
  setTimeout(() => setApp(() => m.OasisEditorApp), 180);
@@ -45622,8 +45622,9 @@ function ImageCropMenu(props) {
45622
45622
  })();
45623
45623
  }
45624
45624
  const RIBBON_PLACEMENTS = {
45625
- "editor-toolbar-file-dropdown": { tab: "file", group: "document", row: 1 },
45626
- "sep-file": { tab: "file", group: "document", row: 1 },
45625
+ "editor-toolbar-export-docx": { tab: "file", group: "document", row: 1 },
45626
+ "editor-toolbar-export-pdf": { tab: "file", group: "document", row: 1 },
45627
+ "editor-toolbar-import-document": { tab: "file", group: "document", row: 1 },
45627
45628
  "editor-toolbar-undo": { tab: "home", group: "clipboard", row: 1 },
45628
45629
  "editor-toolbar-redo": { tab: "home", group: "clipboard", row: 2 },
45629
45630
  "sep-history": { tab: "home", group: "clipboard", row: 2 },
@@ -46057,48 +46058,35 @@ const fontSizeOptions = (api) => {
46057
46058
  function createDefaultToolbarPreset(t) {
46058
46059
  const items = [];
46059
46060
  items.push({
46060
- type: "menu",
46061
- id: "editor-toolbar-file-dropdown",
46062
- group: "file",
46063
- iconName: "file",
46064
- tooltipKey: "toolbar.file",
46065
- content: {
46066
- kind: "items",
46067
- items: [
46068
- {
46069
- type: "button",
46070
- id: "editor-toolbar-export-docx",
46071
- testId: "editor-toolbar-export-docx",
46072
- iconName: "file-text",
46073
- labelKey: "toolbar.exportDocx",
46074
- wide: true,
46075
- tooltipKey: "toolbar.exportDocx",
46076
- command: "exportDocx"
46077
- },
46078
- {
46079
- type: "button",
46080
- id: "editor-toolbar-export-pdf",
46081
- testId: "editor-toolbar-export-pdf",
46082
- iconName: "file-down",
46083
- labelKey: "toolbar.exportPdf",
46084
- wide: true,
46085
- tooltipKey: "toolbar.exportPdf",
46086
- command: "exportPdf"
46087
- },
46088
- {
46089
- type: "button",
46090
- id: "editor-toolbar-import-document",
46091
- testId: "editor-toolbar-import-document",
46092
- iconName: "upload",
46093
- labelKey: "toolbar.import",
46094
- wide: true,
46095
- tooltipKey: "toolbar.import",
46096
- command: "importDocument"
46097
- }
46098
- ]
46099
- }
46061
+ type: "button",
46062
+ id: "editor-toolbar-export-docx",
46063
+ testId: "editor-toolbar-export-docx",
46064
+ iconName: "file-text",
46065
+ labelKey: "toolbar.exportDocx",
46066
+ tooltipKey: "toolbar.exportDocx",
46067
+ command: "exportDocx",
46068
+ ribbonSize: "large"
46069
+ });
46070
+ items.push({
46071
+ type: "button",
46072
+ id: "editor-toolbar-export-pdf",
46073
+ testId: "editor-toolbar-export-pdf",
46074
+ iconName: "file-down",
46075
+ labelKey: "toolbar.exportPdf",
46076
+ tooltipKey: "toolbar.exportPdf",
46077
+ command: "exportPdf",
46078
+ ribbonSize: "large"
46079
+ });
46080
+ items.push({
46081
+ type: "button",
46082
+ id: "editor-toolbar-import-document",
46083
+ testId: "editor-toolbar-import-document",
46084
+ iconName: "upload",
46085
+ labelKey: "toolbar.import",
46086
+ tooltipKey: "toolbar.import",
46087
+ command: "importDocument",
46088
+ ribbonSize: "large"
46100
46089
  });
46101
- items.push({ type: "separator", id: "sep-file", group: "file" });
46102
46090
  items.push({
46103
46091
  type: "button",
46104
46092
  id: "editor-toolbar-undo",
@@ -46628,7 +46616,6 @@ function createDefaultToolbarPreset(t) {
46628
46616
  return withDefaultRibbonPlacement(items);
46629
46617
  }
46630
46618
  const OASIS_TOOLBAR_ITEMS = {
46631
- fileDropdown: "editor-toolbar-file-dropdown",
46632
46619
  exportDocx: "editor-toolbar-export-docx",
46633
46620
  exportPdf: "editor-toolbar-export-pdf",
46634
46621
  importDocument: "editor-toolbar-import-document",
@@ -1,4 +1,4 @@
1
- import { d6, a5, aj, az, at, d7, d8, d9, an, da, a6, cR, aA, db, dc, ay, aq, dd, de, df, a4, dg, cP, aC, dh, di, dj, dk, dl, d1, dm, dn, dp, aH, aG, dq, ar, dr, ds, dt, du, dv, dw, av, as, dx, aK, aB, aJ, aI, am, ax, d0, dy, d7 as d72, dd as dd2, dg as dg2, dq as dq2, dr as dr2, dw as dw2, dz, cT, cO, dA, dB, dC, cQ, dD, dE, cS } from "./index-Cbwb1bgI.js";
1
+ import { d6, a5, aj, az, at, d7, d8, d9, an, da, a6, cR, aA, db, dc, ay, aq, dd, de, df, a4, dg, cP, aC, dh, di, dj, dk, dl, d1, dm, dn, dp, aH, aG, dq, ar, dr, ds, dt, du, dv, dw, av, as, dx, aK, aB, aJ, aI, am, ax, d0, dy, d7 as d72, dd as dd2, dg as dg2, dq as dq2, dr as dr2, dw as dw2, dz, cT, cO, dA, dB, dC, cQ, dD, dE, cS } from "./index-Djyuogou.js";
2
2
  export {
3
3
  d6 as ActionRow,
4
4
  a5 as BalloonShell,