oasis-editor 0.0.8 → 0.0.9

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 createEditorStyledRun, b as getParagraphLength, d as getParagraphText, e as getActiveZone, f as getDocumentSections, h as getActiveSectionIndex, p as positionToParagraphOffset, i as paragraphOffsetToPosition, j as clampPosition, k as findParagraphIndex, l as createCollapsedSelection, m as isSelectionCollapsed, o as createEditorParagraph, q as getBlockParagraphs, r as findParagraphTableLocation, s as buildTableCellLayout, t as createEditorTableCell, u as createEditorTable, v as createEditorTableRow, w as underlineStyleToCssDecorationStyle, x as resolveImageSrc, y as createEditorFootnote, z as createFootnoteReferenceRun, A as renumberFootnotes, B as iterateFootnoteReferenceRuns, C as getFootnoteDisplayMarker, D as createSignal, E as createEffect, F as onCleanup, G as buildCanvasLayoutSnapshot, H as on, I as onMount, J as debounce, K as unwrap, L as getDocumentParagraphs, M as getDocumentSectionsCanonical, N as createEditorDocument, O as getPageContentWidth, P as getDocumentPageSettings, Q as getTableCellContentWidthForParagraph, R as resolveResizedDimensions, S as resolveTextBoxRenderHeight, T as resolveEffectiveParagraphStyle, U as resolveEffectiveTextStyleForParagraph, V as iterateEndnoteReferenceRuns, W as JSZip, X as imageContentTypeDefaults, Y as imageExtensionFromMime, Z as pxToPt$1, _ as textStyleToFontSizePt, $ as PX_PER_POINT, a0 as DEFAULT_FONT_SIZE_PX, a1 as isDoubleUnderlineStyle, a2 as isWavyUnderlineStyle, a3 as underlineStyleLineWidthPx, a4 as underlineStyleDashArray, a5 as getListLabelInset, a6 as getParagraphBorderInsets, a7 as buildSegmentTable, a8 as buildCanvasTableLayout, a9 as normalizeFamily, aa as ROBOTO_FONT_FILES, ab as loadFontAsset, ac as OFFICE_COMPAT_FONT_FAMILIES, ad as buildSfnt, ae as defaultFontDecoderRegistry, af as SfntFontProgram, ag as collectPdfFontFamilies, ah as projectDocumentLayout, ai as getPageHeaderZoneTop, aj as getPageBodyTop, ak as findFootnoteReference, al as FOOTNOTE_MARKER_GUTTER_PX, am as resolveImporterForFile, an as createEditorStateFromDocument, ao as getDocumentParagraphsCanonical, ap as getToolbarStyleState, aq as STANDARD_FONT_SIZES_PT, ar as fontSizePxToPt, as as probeLocalFontFamilies, at as createInitialEditorState, au as parseFontSizePtToPx, av as formatFontSizePt, aw as listKindForTag, ax as isParagraphTag, ay as collectInlineRuns, az as parseParagraphStyle, aA as t, aB as preciseFontModeVersion, aC as isPreciseFontModeEnabled, aD as togglePreciseFontMode, aE as createDefaultToolbarPreset, aF as defaultMenuItems, aG as MenuRegistry, aH as createToolbarRegistry, aI as Editor, aJ as resolveCommandRef, aK as commandRefName, aL as InlineShell, aM as BalloonShell, aN as DocumentShell, aO as createMemo, aP as getCaretRectFromSnapshot, aQ as getParagraphRectFromSnapshot, aR as createComponent, aS as CaretOverlay, aT as Show, aU as createRenderEffect, aV as style, aW as setAttribute, aX as setStyleProperty, aY as memo, aZ as template, a_ as insert, a$ as use, b0 as addEventListener, b1 as Dialog, b2 as delegateEvents, b3 as className, b4 as For, b5 as UNDERLINE_STYLE_OPTIONS, b6 as Tabs, b7 as measureParagraphMinContentWidthPx, b8 as getEditableBlocksForZone, b9 as findParagraphLocation, ba as createSectionBoundaryParagraph, bb as normalizePageSettings, bc as DEFAULT_EDITOR_PAGE_SETTINGS, bd as markStart, be as markEnd, bf as getParagraphEntries, bg as getParagraphById, bh as PluginUiHost, bi as OasisEditorEditor, bj as perfTimer, bk as OasisBrandMark, bl as setPreciseFontPreference, bm as setWelcomeSeen, bn as enablePreciseFontMode, bo as createOasisEditorClient, bp as setLocale, bq as startLongTaskObserver, br as installGlobalReport, bs as applyStoredPreciseFontPreference, bt as getWelcomeSeen, bu as isLocalFontAccessSupported, bv as EDITOR_SCROLL_PADDING_PX, bw as Toolbar, bx as OasisEditorLoading, by as createEditorLogger, bz as getCachedCanvasImage, bA as registerDomStatsSurface } from "./index-BlQocUZB.js";
4
+ import { n as normalizeSelection, g as getParagraphs, c as createEditorParagraphFromRuns, a as createEditorStyledRun, b as getParagraphLength, d as getParagraphText, e as getActiveZone, f as getDocumentSections, h as getActiveSectionIndex, p as positionToParagraphOffset, i as paragraphOffsetToPosition, j as clampPosition, k as findParagraphIndex, l as createCollapsedSelection, m as isSelectionCollapsed, o as createEditorParagraph, q as getBlockParagraphs, r as findParagraphTableLocation, s as buildTableCellLayout, t as createEditorTableCell, u as createEditorTable, v as createEditorTableRow, w as underlineStyleToCssDecorationStyle, x as resolveImageSrc, y as createEditorFootnote, z as createFootnoteReferenceRun, A as renumberFootnotes, B as iterateFootnoteReferenceRuns, C as getFootnoteDisplayMarker, D as createSignal, E as createEffect, F as onCleanup, G as buildCanvasLayoutSnapshot, H as on, I as onMount, J as debounce, K as unwrap, L as getDocumentParagraphs, M as getDocumentSectionsCanonical, N as createEditorDocument, O as getPageContentWidth, P as getDocumentPageSettings, Q as getTableCellContentWidthForParagraph, R as resolveResizedDimensions, S as resolveTextBoxRenderHeight, T as resolveEffectiveParagraphStyle, U as resolveEffectiveTextStyleForParagraph, V as iterateEndnoteReferenceRuns, W as JSZip, X as imageContentTypeDefaults, Y as imageExtensionFromMime, Z as pxToPt$1, _ as textStyleToFontSizePt, $ as PX_PER_POINT, a0 as DEFAULT_FONT_SIZE_PX, a1 as isDoubleUnderlineStyle, a2 as isWavyUnderlineStyle, a3 as underlineStyleLineWidthPx, a4 as underlineStyleDashArray, a5 as getListLabelInset, a6 as getParagraphBorderInsets, a7 as buildSegmentTable, a8 as buildCanvasTableLayout, a9 as normalizeFamily, aa as ROBOTO_FONT_FILES, ab as loadFontAsset, ac as OFFICE_COMPAT_FONT_FAMILIES, ad as buildSfnt, ae as defaultFontDecoderRegistry, af as SfntFontProgram, ag as collectPdfFontFamilies, ah as projectDocumentLayout, ai as getPageHeaderZoneTop, aj as getPageBodyTop, ak as findFootnoteReference, al as FOOTNOTE_MARKER_GUTTER_PX, am as resolveImporterForFile, an as createEditorStateFromDocument, ao as getDocumentParagraphsCanonical, ap as getToolbarStyleState, aq as STANDARD_FONT_SIZES_PT, ar as fontSizePxToPt, as as probeLocalFontFamilies, at as createInitialEditorState, au as parseFontSizePtToPx, av as formatFontSizePt, aw as listKindForTag, ax as isParagraphTag, ay as collectInlineRuns, az as parseParagraphStyle, aA as t, aB as preciseFontModeVersion, aC as isPreciseFontModeEnabled, aD as togglePreciseFontMode, aE as createDefaultToolbarPreset, aF as defaultMenuItems, aG as MenuRegistry, aH as createToolbarRegistry, aI as Editor, aJ as resolveCommandRef, aK as commandRefName, aL as InlineShell, aM as BalloonShell, aN as DocumentShell, aO as createMemo, aP as getCaretRectFromSnapshot, aQ as getParagraphRectFromSnapshot, aR as createComponent, aS as CaretOverlay, aT as Show, aU as createRenderEffect, aV as style, aW as setAttribute, aX as setStyleProperty, aY as memo, aZ as template, a_ as insert, a$ as use, b0 as addEventListener, b1 as Dialog, b2 as delegateEvents, b3 as className, b4 as For, b5 as UNDERLINE_STYLE_OPTIONS, b6 as Tabs, b7 as measureParagraphMinContentWidthPx, b8 as getEditableBlocksForZone, b9 as findParagraphLocation, ba as createSectionBoundaryParagraph, bb as normalizePageSettings, bc as DEFAULT_EDITOR_PAGE_SETTINGS, bd as markStart, be as markEnd, bf as getParagraphEntries, bg as getParagraphById, bh as PluginUiHost, bi as OasisEditorEditor, bj as perfTimer, bk as OasisBrandMark, bl as setPreciseFontPreference, bm as setWelcomeSeen, bn as enablePreciseFontMode, bo as createOasisEditorClient, bp as setLocale, bq as startLongTaskObserver, br as installGlobalReport, bs as applyStoredPreciseFontPreference, bt as getWelcomeSeen, bu as isLocalFontAccessSupported, bv as EDITOR_SCROLL_PADDING_PX, bw as Toolbar, bx as OasisEditorLoading, by as createEditorLogger, bz as getCachedCanvasImage, bA as registerDomStatsSurface } from "./index-D1GDOw-0.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) {
@@ -2270,7 +2270,7 @@ function OasisEditorAppLazy(props = {}) {
2270
2270
  onCleanup(() => {
2271
2271
  cancelled = true;
2272
2272
  });
2273
- import("./OasisEditorApp-PbwiUucf.js").then((m) => {
2273
+ import("./OasisEditorApp-kUhRrsHZ.js").then((m) => {
2274
2274
  cancelled = true;
2275
2275
  setProgress(1);
2276
2276
  setTimeout(() => setApp(() => m.OasisEditorApp), 180);
@@ -18169,9 +18169,8 @@ const RIBBON_GROUP_ORDER = {
18169
18169
  home: {
18170
18170
  clipboard: 10,
18171
18171
  font: 20,
18172
- text: 30,
18173
- paragraph: 40,
18174
- styles: 50
18172
+ paragraph: 30,
18173
+ styles: 40
18175
18174
  },
18176
18175
  insert: {
18177
18176
  illustrations: 10,
@@ -36714,13 +36713,13 @@ const RIBBON_PLACEMENTS = {
36714
36713
  "editor-toolbar-highlight": { tab: "home", group: "font", row: 2 },
36715
36714
  "editor-toolbar-text-shading": { tab: "home", group: "font", row: 2 },
36716
36715
  "sep-style": { tab: "home", group: "font", row: 2 },
36717
- "editor-toolbar-bold": { tab: "home", group: "text", row: 1 },
36718
- "editor-toolbar-italic": { tab: "home", group: "text", row: 1 },
36719
- "editor-toolbar-underline-control": { tab: "home", group: "text", row: 1 },
36720
- "editor-toolbar-strike": { tab: "home", group: "text", row: 1 },
36721
- "editor-toolbar-superscript": { tab: "home", group: "text", row: 2 },
36722
- "editor-toolbar-subscript": { tab: "home", group: "text", row: 2 },
36723
- "sep-format": { tab: "home", group: "text", row: 2 },
36716
+ "editor-toolbar-bold": { tab: "home", group: "font", row: 2 },
36717
+ "editor-toolbar-italic": { tab: "home", group: "font", row: 2 },
36718
+ "editor-toolbar-underline-control": { tab: "home", group: "font", row: 2 },
36719
+ "editor-toolbar-strike": { tab: "home", group: "font", row: 2 },
36720
+ "editor-toolbar-superscript": { tab: "home", group: "font", row: 2 },
36721
+ "editor-toolbar-subscript": { tab: "home", group: "font", row: 2 },
36722
+ "sep-format": { tab: "home", group: "font", row: 2 },
36724
36723
  "editor-toolbar-insert-image": { tab: "insert", group: "illustrations", row: 1 },
36725
36724
  "editor-toolbar-insert-table": { tab: "insert", group: "tables", row: 1 },
36726
36725
  "editor-toolbar-link": { tab: "insert", group: "links", row: 1 },
@@ -36728,15 +36727,15 @@ const RIBBON_PLACEMENTS = {
36728
36727
  "editor-toolbar-footnote": { tab: "references", group: "footnotes", row: 1 },
36729
36728
  "editor-toolbar-image-alt": { tab: "insert", group: "accessibility", row: 2 },
36730
36729
  "sep-insert": { tab: "insert", group: "accessibility", row: 2 },
36731
- "editor-toolbar-align-left": { tab: "home", group: "paragraph", row: 1 },
36732
- "editor-toolbar-align-center": { tab: "home", group: "paragraph", row: 1 },
36733
- "editor-toolbar-align-right": { tab: "home", group: "paragraph", row: 1 },
36734
- "editor-toolbar-align-justify": { tab: "home", group: "paragraph", row: 1 },
36735
- "editor-toolbar-list-bullet": { tab: "home", group: "paragraph", row: 2 },
36736
- "editor-toolbar-list-ordered": { tab: "home", group: "paragraph", row: 2 },
36737
- "editor-toolbar-list-outdent": { tab: "home", group: "paragraph", row: 2 },
36738
- "editor-toolbar-list-indent": { tab: "home", group: "paragraph", row: 2 },
36739
- "editor-toolbar-list-options": { tab: "home", group: "paragraph", row: 2 },
36730
+ "editor-toolbar-align-left": { tab: "home", group: "paragraph", row: 2 },
36731
+ "editor-toolbar-align-center": { tab: "home", group: "paragraph", row: 2 },
36732
+ "editor-toolbar-align-right": { tab: "home", group: "paragraph", row: 2 },
36733
+ "editor-toolbar-align-justify": { tab: "home", group: "paragraph", row: 2 },
36734
+ "editor-toolbar-list-bullet": { tab: "home", group: "paragraph", row: 1 },
36735
+ "editor-toolbar-list-ordered": { tab: "home", group: "paragraph", row: 1 },
36736
+ "editor-toolbar-list-outdent": { tab: "home", group: "paragraph", row: 1 },
36737
+ "editor-toolbar-list-indent": { tab: "home", group: "paragraph", row: 1 },
36738
+ "editor-toolbar-list-options": { tab: "home", group: "paragraph", row: 1 },
36740
36739
  "editor-toolbar-line-spacing-control": { tab: "home", group: "paragraph", row: 2 },
36741
36740
  "sep-paragraph": { tab: "home", group: "paragraph", row: 2 },
36742
36741
  "editor-toolbar-metrics": { tab: "layout", group: "paragraph", row: 1 },
@@ -36850,37 +36849,6 @@ function createDefaultToolbarPreset() {
36850
36849
  command: "setFontSize",
36851
36850
  options: fontSizeOptions
36852
36851
  });
36853
- items.push({
36854
- type: "colorPicker",
36855
- id: "editor-toolbar-color",
36856
- testId: "editor-toolbar-color",
36857
- kind: "color",
36858
- iconName: "type",
36859
- defaultValue: "#111827",
36860
- tooltipKey: "toolbar.color",
36861
- command: "setColor"
36862
- });
36863
- items.push({
36864
- type: "colorPicker",
36865
- id: "editor-toolbar-highlight",
36866
- testId: "editor-toolbar-highlight",
36867
- kind: "highlight",
36868
- iconName: "highlighter",
36869
- defaultValue: "#fef08a",
36870
- tooltipKey: "toolbar.highlight",
36871
- command: "setHighlight"
36872
- });
36873
- items.push({
36874
- type: "colorPicker",
36875
- id: "editor-toolbar-text-shading",
36876
- testId: "editor-toolbar-text-shading",
36877
- kind: "shading",
36878
- iconName: "paint-bucket",
36879
- defaultValue: "#fef3c7",
36880
- tooltipKey: "toolbar.textShading",
36881
- command: "setTextShading"
36882
- });
36883
- items.push({ type: "separator", id: "sep-style" });
36884
36852
  items.push({
36885
36853
  type: "toggle",
36886
36854
  id: "editor-toolbar-bold",
@@ -36910,6 +36878,14 @@ function createDefaultToolbarPreset() {
36910
36878
  command: "strike",
36911
36879
  tooltipKey: "toolbar.strike"
36912
36880
  });
36881
+ items.push({
36882
+ type: "toggle",
36883
+ id: "editor-toolbar-subscript",
36884
+ testId: "editor-toolbar-subscript",
36885
+ iconName: "subscript",
36886
+ command: "subscript",
36887
+ tooltipKey: "toolbar.subscript"
36888
+ });
36913
36889
  items.push({
36914
36890
  type: "toggle",
36915
36891
  id: "editor-toolbar-superscript",
@@ -36918,15 +36894,38 @@ function createDefaultToolbarPreset() {
36918
36894
  command: "superscript",
36919
36895
  tooltipKey: "toolbar.superscript"
36920
36896
  });
36897
+ items.push({ type: "separator", id: "sep-format" });
36921
36898
  items.push({
36922
- type: "toggle",
36923
- id: "editor-toolbar-subscript",
36924
- testId: "editor-toolbar-subscript",
36925
- iconName: "subscript",
36926
- command: "subscript",
36927
- tooltipKey: "toolbar.subscript"
36899
+ type: "colorPicker",
36900
+ id: "editor-toolbar-color",
36901
+ testId: "editor-toolbar-color",
36902
+ kind: "color",
36903
+ iconName: "type",
36904
+ defaultValue: "#111827",
36905
+ tooltipKey: "toolbar.color",
36906
+ command: "setColor"
36928
36907
  });
36929
- items.push({ type: "separator", id: "sep-format" });
36908
+ items.push({
36909
+ type: "colorPicker",
36910
+ id: "editor-toolbar-highlight",
36911
+ testId: "editor-toolbar-highlight",
36912
+ kind: "highlight",
36913
+ iconName: "highlighter",
36914
+ defaultValue: "#fef08a",
36915
+ tooltipKey: "toolbar.highlight",
36916
+ command: "setHighlight"
36917
+ });
36918
+ items.push({
36919
+ type: "colorPicker",
36920
+ id: "editor-toolbar-text-shading",
36921
+ testId: "editor-toolbar-text-shading",
36922
+ kind: "shading",
36923
+ iconName: "paint-bucket",
36924
+ defaultValue: "#fef3c7",
36925
+ tooltipKey: "toolbar.textShading",
36926
+ command: "setTextShading"
36927
+ });
36928
+ items.push({ type: "separator", id: "sep-style" });
36930
36929
  items.push({
36931
36930
  type: "button",
36932
36931
  id: "editor-toolbar-insert-image",
@@ -1,4 +1,4 @@
1
- import { aM, bB, bC, bD, bE, bF, b1, bG, aN, aI, bH, bI, bJ, aL, bK, aG, bL, bM, bN, bO, bP, bx, bQ, bR, bS, bT, bU, bV, bW, bX, bY, bZ, b_, b$, b6, c0, bw, c1, bD as bD2, bI as bI2, bK as bK2, bU as bU2, bW as bW2, b$ as b$2, aK, aE, c2, c3, c4, aH, c5, c6, aJ } from "./index-BlQocUZB.js";
1
+ import { aM, bB, bC, bD, bE, bF, b1, bG, aN, aI, bH, bI, bJ, aL, bK, aG, bL, bM, bN, bO, bP, bx, bQ, bR, bS, bT, bU, bV, bW, bX, bY, bZ, b_, b$, b6, c0, bw, c1, bD as bD2, bI as bI2, bK as bK2, bU as bU2, bW as bW2, b$ as b$2, aK, aE, c2, c3, c4, aH, c5, c6, aJ } from "./index-D1GDOw-0.js";
2
2
  export {
3
3
  aM as BalloonShell,
4
4
  bB as Button,