oasis-editor 0.0.151 → 0.0.152
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.
- package/dist/{OasisEditorApp-CZNfjaj2.js → OasisEditorApp-DjlntWNK.js} +1 -1
- package/dist/{index-DgN6KXYw.js → index-D_-RY5pS.js} +69 -14
- package/dist/oasis-editor.css +1 -1
- package/dist/oasis-editor.js +1 -1
- package/dist/oasis-editor.umd.cjs +4 -4
- package/dist/ui/components/Toolbar/primitives/Button.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
2
|
var __defNormalProp = (obj, key2, value) => key2 in obj ? __defProp(obj, key2, { enumerable: true, configurable: true, writable: true, value }) : obj[key2] = value;
|
|
3
3
|
var __publicField = (obj, key2, value) => __defNormalProp(obj, typeof key2 !== "symbol" ? key2 + "" : key2, 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, q as assertNever, r as cloneRun, s as createSignal, t as createEditorStateFromDocument, u as createInitialEditorState, S as STANDARD_FONT_SIZES_PT, v as fontSizePxToPt, w as probeLocalFontFamilies, x as createEditorParagraphFromRuns, y as isInlineObjectRun, z as stylesEqual, A as cloneStyle, B as createEditorStyledRun, C as cloneParagraphList, D as cloneParagraph, G as getParagraphLength, H as getActiveZone, I as getActiveSectionIndex, J as getParagraphs, K as normalizeSelection, L as positionToParagraphOffset, M as cloneParagraphs, N as paragraphOffsetToPosition, O as findParagraphIndex, P as createCollapsedSelection, Q as isSelectionCollapsed, R as MATH_OBJECT_REPLACEMENT, T as setValueStyle, U as setBooleanStyle, V as parseFontSizePtToPx, W as formatFontSizePt, X as setParagraphStyleValue, Y as createEditorParagraph, Z as cloneBlocks, _ as resolveDefaultParagraphStyleId, $ as findParagraphTablePathLocation, a0 as findParagraphLocation, a1 as resolveTablePath, a2 as buildTableCellLayout, a3 as PT_PER_PX, a4 as createEditorTableCell, a5 as createEditorTableRow, a6 as createEditorTable, a7 as clampPosition, a8 as PX_PER_POINT, a9 as underlineStyleToCssDecorationStyle, aa as resolveImageSrc, ab as listKindForTag, ac as isParagraphTag, ad as collectInlineRuns, ae as parseParagraphStyle, af as getRunImage, ag as InlineShell, ah as BalloonShell, ai as DocumentShell, aj as findParagraphTableLocation, ak as createMemo, al as getCaretRectFromSnapshot, am as getParagraphRectFromSnapshot, an as createComponent, ao as CaretOverlay, ap as Show, aq as createRenderEffect, ar as style, as as setStyleProperty, at as setAttribute, au as memo, av as template, aw as Button, ax as useI18n, ay as createEffect, az as TextField, aA as Dialog, aB as insert, aC as className, aD as Grid, aE as SelectField, aF as StatusText, aG as ColorField, aH as UNDERLINE_STYLE_OPTIONS, aI as Stack, aJ as For, aK as ToggleChip, aL as FormField, aM as Checkbox, aN as FieldGroup, aO as Tabs, aP as NumberField, aQ as parseNumber, aR as createStore, aS as reconcile, aT as RadioGroup, aU as Radio$1, aV as TextAreaField, aW as COMMON_SYMBOLS, aX as getRecentSymbols, aY as SYMBOL_CATEGORIES, aZ as rememberSymbol, a_ as delegateEvents, a$ as EMPTY_EDITOR_MATH_EXPRESSION, b0 as serializeLinearMath, b1 as parseLinearMath, b2 as Text, b3 as SurfaceButton, b4 as onMount, b5 as onCleanup, b6 as CheckIcon, b7 as use, b8 as PluginUiHost, b9 as OasisEditorEditor, ba as OasisBrandMark, bb as setPreciseFontPreference, bc as setWelcomeSeen, bd as enablePreciseFontMode, be as WORD_NS$6, bf as XMLSerializer, bg as DOMParser, bh as WORD14_NS, bi as mergeNestedExtensionMarkup, bj as resolveOpcRelationships, bk as parseOpcRelationships, bl as JSZip, bm as normalizeOpcPartPath, bn as OPC_CONTENT_TYPES_PATH, bo as getOpcRelationshipOwnerPath, bp as serializeOpcRelationships, bq as OPC_ROOT_RELATIONSHIPS_PATH, br as hashDocxPartBytes, bs as parseOpcContentTypes, bt as serializeOpcContentTypes, bu as mergeParagraphPropertiesXmlSource, bv as setEditorRunOoxmlSource, bw as mergeRunOoxmlSourceIntoGeneratedXml, bx as mergeTableCellPropertiesXmlSource, by as mergeTableRowPropertiesXmlSource, bz as mergeTablePropertiesXmlSource, bA as exportEditorDocumentToDocxBlob, bB as exportEditorDocumentToDocx, bC as pxToPt$1, bD as resolveFloatingObjectRect, bE as getTextBoxFloatingGeometry, bF as getPresetPathSegments, bG as buildListLabels, bH as lineDashPatternPt, bI as DEFAULT_FONT_SIZE_PX, bJ as resolveGradientAxis, bK as isDoubleUnderlineStyle, bL as isWavyUnderlineStyle, bM as underlineStyleLineWidthPx, bN as WAVY_UNDERLINE_WAVELENGTH_PX, bO as WAVY_UNDERLINE_AMPLITUDE_PX, bP as DOUBLE_UNDERLINE_OFFSET_PX, bQ as underlineStyleDashArray, bR as resolveEffectiveParagraphStyle, bS as EMPHASIS_GLYPH, bT as parseHexColorToRgb255, bU as rgb255ToHex, bV as getImageFloatingGeometry, bW as resolveEffectiveTextStyleForParagraph, bX as textStyleToFontSizePt, bY as mathDisplayText, bZ as TEXT_BASELINE_RATIO, b_ as resolveTextAlignmentBaselineOffset, b$ as resolveRenderedTextChar, c0 as resolveOpenTypeFeatureTags, c1 as isLowercaseSmallCapsChar, c2 as resolveDecorationLineY, c3 as DOUBLE_STRIKE_OFFSET_PX, c4 as resolveListLabel, c5 as getListLabelInset, c6 as getAlignedListLabelInset, c7 as getParagraphBorderInsets, c8 as buildSegmentTable, c9 as buildCanvasTableLayout, ca as resolveCanvasTableWidth, cb as resolveFloatingTableRect, cc as paragraphBetweenBorderMatches, cd as normalizeFamily, ce as ROBOTO_FONT_FILES, cf as loadFontAsset, cg as getRemotePdfFontFaces, ch as OFFICE_COMPAT_FONT_FAMILIES, ci as BinaryReader, cj as buildSfnt, ck as defaultFontDecoderRegistry, cl as SfntFontProgram, cm as zlibSync, cn as renumberImageCaptionsInDocument, co as collectPdfFontFamilies, cp as outlineFrom, cq as getPageHeaderZoneTop, cr as getPageColumnRects, cs as findFootnoteReference, ct as resolveImporterForFile, cu as roundTo, cv as getDocumentSectionsCanonical, cw as getDocumentParagraphsCanonical, cx as getDocumentParagraphs, cy as getImageCaptionText, cz as isImageCaptionParagraph, cA as updateImageCaptionParagraph, cB as createImageCaptionParagraph, cC as renumberImageCaptionParagraphs, cD as getCaptionSelectionOffset, cE as PX_PER_CM, cF as getDocumentPageSettings, cG as getTableCellContentWidthForParagraph, cH as layoutMetricsEpoch, cI as bumpLayoutMetricsEpoch, cJ as createCanvasLayoutSnapshotProvider, cK as on, cL as debounce, cM as unwrap, cN as perfTimer, cO as prepareDocumentFonts, cP as getRunTextBox, cQ as EMU_PER_PX, cR as createEditorDocument, cS as resolveResizedDimensions, cT as axisSignForDirection, cU as clamp$1, cV as MIN_RESIZE_SIZE_PX, cW as resolveTextBoxRenderHeight, cX as getToolbarStyleState, cY as VERTICAL_HIT_WEIGHT, cZ as getCachedCanvasImage, c_ as measureParagraphMinContentWidthPx, c$ as createSectionBoundaryParagraph, d0 as normalizePageSettings, d1 as DEFAULT_EDITOR_PAGE_SETTINGS, d2 as markStart, d3 as markEnd, d4 as getParagraphEntries, d5 as getParagraphById, d6 as createEditorFootnote, d7 as createFootnoteReferenceRun, d8 as renumberFootnotes, d9 as iterateFootnoteReferenceRuns, da as preciseFontModeVersion, db as isPreciseFontModeEnabled, dc as getRunFieldChar, dd as getRunFieldInstruction, de as getHeadingLevel, df as createEditorRun, dg as TWIPS_PER_INCH, dh as PX_PER_INCH, di as togglePreciseFontMode, dj as nextFontSizePt, dk as previousFontSizePt, dl as fontSizePtToPx, dm as resolveNamedTextStyle, dn as resolveNamedTableStyle, dp as resolveEffectiveTableStyle, dq as createDefaultToolbarPreset, dr as MenuRegistry, ds as createToolbarRegistry, dt as Editor, du as resolveCommandRef, dv as commandRefName, dw as createOasisEditorClient, dx as createEditorZoom, dy as startLongTaskObserver, dz as installGlobalReport, dA as applyStoredPreciseFontPreference, dB as getWelcomeSeen, dC as isLocalFontAccessSupported, dD as EDITOR_SCROLL_PADDING_PX, dE as Toolbar, dF as OasisEditorLoading, dG as I18nProvider, dH as createTranslator, dI as registerDomStatsSurface, dJ as createEditorLogger } from "./index-
|
|
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, q as assertNever, r as cloneRun, s as createSignal, t as createEditorStateFromDocument, u as createInitialEditorState, S as STANDARD_FONT_SIZES_PT, v as fontSizePxToPt, w as probeLocalFontFamilies, x as createEditorParagraphFromRuns, y as isInlineObjectRun, z as stylesEqual, A as cloneStyle, B as createEditorStyledRun, C as cloneParagraphList, D as cloneParagraph, G as getParagraphLength, H as getActiveZone, I as getActiveSectionIndex, J as getParagraphs, K as normalizeSelection, L as positionToParagraphOffset, M as cloneParagraphs, N as paragraphOffsetToPosition, O as findParagraphIndex, P as createCollapsedSelection, Q as isSelectionCollapsed, R as MATH_OBJECT_REPLACEMENT, T as setValueStyle, U as setBooleanStyle, V as parseFontSizePtToPx, W as formatFontSizePt, X as setParagraphStyleValue, Y as createEditorParagraph, Z as cloneBlocks, _ as resolveDefaultParagraphStyleId, $ as findParagraphTablePathLocation, a0 as findParagraphLocation, a1 as resolveTablePath, a2 as buildTableCellLayout, a3 as PT_PER_PX, a4 as createEditorTableCell, a5 as createEditorTableRow, a6 as createEditorTable, a7 as clampPosition, a8 as PX_PER_POINT, a9 as underlineStyleToCssDecorationStyle, aa as resolveImageSrc, ab as listKindForTag, ac as isParagraphTag, ad as collectInlineRuns, ae as parseParagraphStyle, af as getRunImage, ag as InlineShell, ah as BalloonShell, ai as DocumentShell, aj as findParagraphTableLocation, ak as createMemo, al as getCaretRectFromSnapshot, am as getParagraphRectFromSnapshot, an as createComponent, ao as CaretOverlay, ap as Show, aq as createRenderEffect, ar as style, as as setStyleProperty, at as setAttribute, au as memo, av as template, aw as Button, ax as useI18n, ay as createEffect, az as TextField, aA as Dialog, aB as insert, aC as className, aD as Grid, aE as SelectField, aF as StatusText, aG as ColorField, aH as UNDERLINE_STYLE_OPTIONS, aI as Stack, aJ as For, aK as ToggleChip, aL as FormField, aM as Checkbox, aN as FieldGroup, aO as Tabs, aP as NumberField, aQ as parseNumber, aR as createStore, aS as reconcile, aT as RadioGroup, aU as Radio$1, aV as TextAreaField, aW as COMMON_SYMBOLS, aX as getRecentSymbols, aY as SYMBOL_CATEGORIES, aZ as rememberSymbol, a_ as delegateEvents, a$ as EMPTY_EDITOR_MATH_EXPRESSION, b0 as serializeLinearMath, b1 as parseLinearMath, b2 as Text, b3 as SurfaceButton, b4 as onMount, b5 as onCleanup, b6 as CheckIcon, b7 as use, b8 as PluginUiHost, b9 as OasisEditorEditor, ba as OasisBrandMark, bb as setPreciseFontPreference, bc as setWelcomeSeen, bd as enablePreciseFontMode, be as WORD_NS$6, bf as XMLSerializer, bg as DOMParser, bh as WORD14_NS, bi as mergeNestedExtensionMarkup, bj as resolveOpcRelationships, bk as parseOpcRelationships, bl as JSZip, bm as normalizeOpcPartPath, bn as OPC_CONTENT_TYPES_PATH, bo as getOpcRelationshipOwnerPath, bp as serializeOpcRelationships, bq as OPC_ROOT_RELATIONSHIPS_PATH, br as hashDocxPartBytes, bs as parseOpcContentTypes, bt as serializeOpcContentTypes, bu as mergeParagraphPropertiesXmlSource, bv as setEditorRunOoxmlSource, bw as mergeRunOoxmlSourceIntoGeneratedXml, bx as mergeTableCellPropertiesXmlSource, by as mergeTableRowPropertiesXmlSource, bz as mergeTablePropertiesXmlSource, bA as exportEditorDocumentToDocxBlob, bB as exportEditorDocumentToDocx, bC as pxToPt$1, bD as resolveFloatingObjectRect, bE as getTextBoxFloatingGeometry, bF as getPresetPathSegments, bG as buildListLabels, bH as lineDashPatternPt, bI as DEFAULT_FONT_SIZE_PX, bJ as resolveGradientAxis, bK as isDoubleUnderlineStyle, bL as isWavyUnderlineStyle, bM as underlineStyleLineWidthPx, bN as WAVY_UNDERLINE_WAVELENGTH_PX, bO as WAVY_UNDERLINE_AMPLITUDE_PX, bP as DOUBLE_UNDERLINE_OFFSET_PX, bQ as underlineStyleDashArray, bR as resolveEffectiveParagraphStyle, bS as EMPHASIS_GLYPH, bT as parseHexColorToRgb255, bU as rgb255ToHex, bV as getImageFloatingGeometry, bW as resolveEffectiveTextStyleForParagraph, bX as textStyleToFontSizePt, bY as mathDisplayText, bZ as TEXT_BASELINE_RATIO, b_ as resolveTextAlignmentBaselineOffset, b$ as resolveRenderedTextChar, c0 as resolveOpenTypeFeatureTags, c1 as isLowercaseSmallCapsChar, c2 as resolveDecorationLineY, c3 as DOUBLE_STRIKE_OFFSET_PX, c4 as resolveListLabel, c5 as getListLabelInset, c6 as getAlignedListLabelInset, c7 as getParagraphBorderInsets, c8 as buildSegmentTable, c9 as buildCanvasTableLayout, ca as resolveCanvasTableWidth, cb as resolveFloatingTableRect, cc as paragraphBetweenBorderMatches, cd as normalizeFamily, ce as ROBOTO_FONT_FILES, cf as loadFontAsset, cg as getRemotePdfFontFaces, ch as OFFICE_COMPAT_FONT_FAMILIES, ci as BinaryReader, cj as buildSfnt, ck as defaultFontDecoderRegistry, cl as SfntFontProgram, cm as zlibSync, cn as renumberImageCaptionsInDocument, co as collectPdfFontFamilies, cp as outlineFrom, cq as getPageHeaderZoneTop, cr as getPageColumnRects, cs as findFootnoteReference, ct as resolveImporterForFile, cu as roundTo, cv as getDocumentSectionsCanonical, cw as getDocumentParagraphsCanonical, cx as getDocumentParagraphs, cy as getImageCaptionText, cz as isImageCaptionParagraph, cA as updateImageCaptionParagraph, cB as createImageCaptionParagraph, cC as renumberImageCaptionParagraphs, cD as getCaptionSelectionOffset, cE as PX_PER_CM, cF as getDocumentPageSettings, cG as getTableCellContentWidthForParagraph, cH as layoutMetricsEpoch, cI as bumpLayoutMetricsEpoch, cJ as createCanvasLayoutSnapshotProvider, cK as on, cL as debounce, cM as unwrap, cN as perfTimer, cO as prepareDocumentFonts, cP as getRunTextBox, cQ as EMU_PER_PX, cR as createEditorDocument, cS as resolveResizedDimensions, cT as axisSignForDirection, cU as clamp$1, cV as MIN_RESIZE_SIZE_PX, cW as resolveTextBoxRenderHeight, cX as getToolbarStyleState, cY as VERTICAL_HIT_WEIGHT, cZ as getCachedCanvasImage, c_ as measureParagraphMinContentWidthPx, c$ as createSectionBoundaryParagraph, d0 as normalizePageSettings, d1 as DEFAULT_EDITOR_PAGE_SETTINGS, d2 as markStart, d3 as markEnd, d4 as getParagraphEntries, d5 as getParagraphById, d6 as createEditorFootnote, d7 as createFootnoteReferenceRun, d8 as renumberFootnotes, d9 as iterateFootnoteReferenceRuns, da as preciseFontModeVersion, db as isPreciseFontModeEnabled, dc as getRunFieldChar, dd as getRunFieldInstruction, de as getHeadingLevel, df as createEditorRun, dg as TWIPS_PER_INCH, dh as PX_PER_INCH, di as togglePreciseFontMode, dj as nextFontSizePt, dk as previousFontSizePt, dl as fontSizePtToPx, dm as resolveNamedTextStyle, dn as resolveNamedTableStyle, dp as resolveEffectiveTableStyle, dq as createDefaultToolbarPreset, dr as MenuRegistry, ds as createToolbarRegistry, dt as Editor, du as resolveCommandRef, dv as commandRefName, dw as createOasisEditorClient, dx as createEditorZoom, dy as startLongTaskObserver, dz as installGlobalReport, dA as applyStoredPreciseFontPreference, dB as getWelcomeSeen, dC as isLocalFontAccessSupported, dD as EDITOR_SCROLL_PADDING_PX, dE as Toolbar, dF as OasisEditorLoading, dG as I18nProvider, dH as createTranslator, dI as registerDomStatsSurface, dJ as createEditorLogger } from "./index-D_-RY5pS.js";
|
|
5
5
|
function projectHeaderFooterBlocksWithDependencies(blocks, deps, context = {}) {
|
|
6
6
|
const {
|
|
7
7
|
pageIndex,
|
|
@@ -2736,7 +2736,7 @@ function OasisBrandMark(props) {
|
|
|
2736
2736
|
return _el$;
|
|
2737
2737
|
})();
|
|
2738
2738
|
}
|
|
2739
|
-
var _tmpl$$1b = /* @__PURE__ */ template(`<div class=oasis-editor-import-progress-label>`), _tmpl$2$L = /* @__PURE__ */ template(`<div role=status aria-live=polite><div class=oasis-editor-import-card><div class=oasis-editor-import-title></div><div class=oasis-editor-import-progress-track><div>`), _tmpl$3$
|
|
2739
|
+
var _tmpl$$1b = /* @__PURE__ */ template(`<div class=oasis-editor-import-progress-label>`), _tmpl$2$L = /* @__PURE__ */ template(`<div role=status aria-live=polite><div class=oasis-editor-import-card><div class=oasis-editor-import-title></div><div class=oasis-editor-import-progress-track><div>`), _tmpl$3$z = /* @__PURE__ */ template(`<span class=oasis-editor-import-done-icon>Done`);
|
|
2740
2740
|
function OasisEditorLoading(props) {
|
|
2741
2741
|
const t = useI18n();
|
|
2742
2742
|
const variant = () => props.variant ?? "overlay";
|
|
@@ -2760,7 +2760,7 @@ function OasisEditorLoading(props) {
|
|
|
2760
2760
|
var _el$6 = _tmpl$$1b();
|
|
2761
2761
|
insert(_el$6, (() => {
|
|
2762
2762
|
var _c$ = memo(() => !!isDone());
|
|
2763
|
-
return () => _c$() ? _tmpl$3$
|
|
2763
|
+
return () => _c$() ? _tmpl$3$z() : `${pct()}%`;
|
|
2764
2764
|
})());
|
|
2765
2765
|
return _el$6;
|
|
2766
2766
|
}
|
|
@@ -2811,7 +2811,7 @@ function OasisEditorAppLazy(props = {}) {
|
|
|
2811
2811
|
onCleanup(() => {
|
|
2812
2812
|
cancelled = true;
|
|
2813
2813
|
});
|
|
2814
|
-
import("./OasisEditorApp-
|
|
2814
|
+
import("./OasisEditorApp-DjlntWNK.js").then((m) => {
|
|
2815
2815
|
cancelled = true;
|
|
2816
2816
|
setProgress(1);
|
|
2817
2817
|
setTimeout(() => setApp(() => m.OasisEditorApp), 180);
|
|
@@ -6241,7 +6241,7 @@ function mount(target, props = {}) {
|
|
|
6241
6241
|
unmount: () => client.dispose()
|
|
6242
6242
|
});
|
|
6243
6243
|
}
|
|
6244
|
-
var _tmpl$$1a = /* @__PURE__ */ template(`<svg xmlns=http://www.w3.org/2000/svg aria-hidden=true>`), _tmpl$2$K = /* @__PURE__ */ template(`<svg><text x=2 y=18 font-family="'Segoe UI', Arial, sans-serif"font-size=14 font-weight=700 fill=currentColor>ab</svg>`, false, true, false), _tmpl$3$
|
|
6244
|
+
var _tmpl$$1a = /* @__PURE__ */ template(`<svg xmlns=http://www.w3.org/2000/svg aria-hidden=true>`), _tmpl$2$K = /* @__PURE__ */ template(`<svg><text x=2 y=18 font-family="'Segoe UI', Arial, sans-serif"font-size=14 font-weight=700 fill=currentColor>ab</svg>`, false, true, false), _tmpl$3$y = /* @__PURE__ */ template(`<svg><text x=15.5 y=11 font-family="'Segoe UI', Arial, sans-serif"font-size=10 font-weight=700 fill=#c00000>1</svg>`, false, true, false), _tmpl$4$m = /* @__PURE__ */ template(`<svg><g><path d="M3.375 4.875 L7.125 8.625 L3.375 12.375 L2.25 11.25 L4.875 8.625 L2.25 6 Z"></path><rect x=10.125 y=6 width=9 height=1.6875 rx=0.25></rect><rect x=5.625 y=10.875 width=13.5 height=1.6875 rx=0.25></rect><rect x=5.625 y=15.75 width=13.5 height=1.6875 rx=0.25></svg>`, false, true, false), _tmpl$5$e = /* @__PURE__ */ template(`<svg><polyline points="4 7 7 4 10 7"></svg>`, false, true, false), _tmpl$6$a = /* @__PURE__ */ template(`<svg><line x1=7 y1=4 x2=7 y2=20></svg>`, false, true, false), _tmpl$7$5 = /* @__PURE__ */ template(`<svg><polyline points="4 17 7 20 10 17"></svg>`, false, true, false), _tmpl$8$3 = /* @__PURE__ */ template(`<svg><line x1=13 y1=6 x2=21 y2=6></svg>`, false, true, false), _tmpl$9$1 = /* @__PURE__ */ template(`<svg><line x1=13 y1=12 x2=21 y2=12></svg>`, false, true, false), _tmpl$0$1 = /* @__PURE__ */ template(`<svg><line x1=13 y1=18 x2=21 y2=18></svg>`, false, true, false), _tmpl$1$1 = /* @__PURE__ */ template(`<svg><rect x=5.25 y=5.25 width=13.5 height=13.5 rx=0.7></svg>`, false, true, false), _tmpl$10 = /* @__PURE__ */ template(`<svg><path d="M9.75 5.25v13.5M14.25 5.25v13.5M5.25 9.75h13.5M5.25 14.25h13.5"></svg>`, false, true, false), _tmpl$11 = /* @__PURE__ */ template(`<svg><path d="M12 1.75v3M10.5 3.25 12 1.75l1.5 1.5"></svg>`, false, true, false), _tmpl$12 = /* @__PURE__ */ template(`<svg><path d="M5.25 8h13.5"stroke-width=2.5></svg>`, false, true, false), _tmpl$13 = /* @__PURE__ */ template(`<svg><path d="M12 22.25v-3M10.5 20.75 12 22.25l1.5-1.5"></svg>`, false, true, false), _tmpl$14 = /* @__PURE__ */ template(`<svg><path d="M5.25 16h13.5"stroke-width=2.5></svg>`, false, true, false), _tmpl$15 = /* @__PURE__ */ template(`<svg><path d="M4.5 12h15"stroke=#d14343 stroke-width=2.6></svg>`, false, true, false), _tmpl$16 = /* @__PURE__ */ template(`<svg><path d="M1.75 12h3M3.25 10.5 1.75 12l1.5 1.5"></svg>`, false, true, false), _tmpl$17 = /* @__PURE__ */ template(`<svg><path d="M8 5.25v13.5"stroke-width=2.5></svg>`, false, true, false), _tmpl$18 = /* @__PURE__ */ template(`<svg><path d="M22.25 12h-3M20.75 10.5l1.5 1.5-1.5 1.5"></svg>`, false, true, false), _tmpl$19 = /* @__PURE__ */ template(`<svg><path d="M16 5.25v13.5"stroke-width=2.5></svg>`, false, true, false), _tmpl$20 = /* @__PURE__ */ template(`<svg><path d="M12 4.5v15"stroke=#d14343 stroke-width=2.6></svg>`, false, true, false), _tmpl$21 = /* @__PURE__ */ template(`<svg><path d="M7.25 12h9.5M9.25 10l-2 2 2 2M14.75 10l2 2-2 2"stroke-width=2></svg>`, false, true, false), _tmpl$22 = /* @__PURE__ */ template(`<svg><path d="M12 8v8M10 10l2-2 2 2M10 14l2 2 2-2"stroke-width=2></svg>`, false, true, false), _tmpl$23 = /* @__PURE__ */ template(`<svg><path d="M3 21h18M4.5 19.5 3 21l1.5 1.5M19.5 19.5 21 21l-1.5 1.5"></svg>`, false, true, false), _tmpl$24 = /* @__PURE__ */ template(`<svg><path d="M2.5 6h19M2.5 18h19M12 1.75v2.5M10.5 3.25 12 1.75l1.5 1.5M12 22.25v-2.5M10.5 20.75 12 22.25l1.5-1.5"></svg>`, false, true, false), _tmpl$25 = /* @__PURE__ */ template(`<svg><path d="M6 2.5v19M18 2.5v19M1.75 12h2.5M3.25 10.5 1.75 12l1.5 1.5M22.25 12h-2.5M20.75 10.5l1.5 1.5-1.5 1.5"></svg>`, false, true, false), _tmpl$26 = /* @__PURE__ */ template(`<svg><path d="M2 21h20M5 19 2 21l3 2M19 19l3 2-3 2M8 12h8M10 10l-2 2 2 2M14 10l2 2-2 2"></svg>`, false, true, false), _tmpl$27 = /* @__PURE__ */ template(`<svg><rect x=4 y=4 width=16 height=16 rx=0.8></svg>`, false, true, false), _tmpl$28 = /* @__PURE__ */ template(`<svg><path></svg>`, false, true, false), _tmpl$29 = /* @__PURE__ */ template(`<svg><path d="M3 3l18 18"stroke-width=2></svg>`, false, true, false), _tmpl$30 = /* @__PURE__ */ template(`<svg><rect x=5 y=5 width=14 height=14 rx=0.8 stroke-dasharray="2.5 2"></svg>`, false, true, false), _tmpl$31 = /* @__PURE__ */ template(`<svg><path d="M3 3l18 18"stroke=#d14343 stroke-width=2.1></svg>`, false, true, false), _tmpl$32 = /* @__PURE__ */ template(`<svg><polyline points="20 6 9 17 4 12"></svg>`, false, true, false), _tmpl$33 = /* @__PURE__ */ template(`<i>`);
|
|
6245
6245
|
function SvgIcon(props) {
|
|
6246
6246
|
return (() => {
|
|
6247
6247
|
var _el$ = _tmpl$$1a();
|
|
@@ -6275,7 +6275,7 @@ function SvgIcon(props) {
|
|
|
6275
6275
|
const FootnoteIcon = () => createComponent(SvgIcon, {
|
|
6276
6276
|
fill: "none",
|
|
6277
6277
|
get children() {
|
|
6278
|
-
return [_tmpl$2$K(), _tmpl$3$
|
|
6278
|
+
return [_tmpl$2$K(), _tmpl$3$y()];
|
|
6279
6279
|
}
|
|
6280
6280
|
});
|
|
6281
6281
|
const SpecialIndentFirstLineIcon = () => createComponent(SvgIcon, {
|
|
@@ -6517,7 +6517,7 @@ function Text$1(props) {
|
|
|
6517
6517
|
}
|
|
6518
6518
|
}));
|
|
6519
6519
|
}
|
|
6520
|
-
var _tmpl$$18 = /* @__PURE__ */ template(`<div class=oasis-menubar role=menubar>`), _tmpl$2$J = /* @__PURE__ */ template(`<div class=oasis-menubar-dropdown role=menu>`), _tmpl$3$
|
|
6520
|
+
var _tmpl$$18 = /* @__PURE__ */ template(`<div class=oasis-menubar role=menubar>`), _tmpl$2$J = /* @__PURE__ */ template(`<div class=oasis-menubar-dropdown role=menu>`), _tmpl$3$x = /* @__PURE__ */ template(`<div class=oasis-menubar-menu>`), _tmpl$4$l = /* @__PURE__ */ template(`<div class=oasis-menubar-separator role=separator>`), _tmpl$5$d = /* @__PURE__ */ template(`<i class=oasis-menubar-submenu-icon data-lucide=chevron-right>`), _tmpl$6$9 = /* @__PURE__ */ template(`<div class=oasis-menubar-submenu role=menu>`);
|
|
6521
6521
|
function Menubar(props) {
|
|
6522
6522
|
const t = useI18n();
|
|
6523
6523
|
const [activeMenu, setActiveMenu] = createSignal(null);
|
|
@@ -6591,7 +6591,7 @@ function Menubar(props) {
|
|
|
6591
6591
|
return topLevelItems();
|
|
6592
6592
|
},
|
|
6593
6593
|
children: (topLevel) => (() => {
|
|
6594
|
-
var _el$2 = _tmpl$3$
|
|
6594
|
+
var _el$2 = _tmpl$3$x();
|
|
6595
6595
|
_el$2.addEventListener("mouseenter", () => {
|
|
6596
6596
|
if (activeMenu() && activeMenu() !== topLevel.id) {
|
|
6597
6597
|
setActiveMenu(topLevel.id);
|
|
@@ -6857,7 +6857,7 @@ function getCaretRectFromSnapshot(snapshot, position2, paragraphOffset) {
|
|
|
6857
6857
|
);
|
|
6858
6858
|
return rectFromBox(slot.left, slot.top, 1, slot.height || line.height);
|
|
6859
6859
|
}
|
|
6860
|
-
var _tmpl$$16 = /* @__PURE__ */ template(`<span class=oasis-outline-title>`), _tmpl$2$I = /* @__PURE__ */ template(`<div class=oasis-outline-list>`), _tmpl$3$
|
|
6860
|
+
var _tmpl$$16 = /* @__PURE__ */ template(`<span class=oasis-outline-title>`), _tmpl$2$I = /* @__PURE__ */ template(`<div class=oasis-outline-list>`), _tmpl$3$w = /* @__PURE__ */ template(`<div class=oasis-outline-panel><div class=oasis-outline-header><button class=oasis-outline-toggle><i>`), _tmpl$4$k = /* @__PURE__ */ template(`<div class=oasis-outline-empty>`), _tmpl$5$c = /* @__PURE__ */ template(`<div class=oasis-outline-item>`);
|
|
6861
6861
|
function OutlinePanel(props) {
|
|
6862
6862
|
const t = useI18n();
|
|
6863
6863
|
const [collapsed, setCollapsed] = createSignal(props.defaultCollapsed ?? false);
|
|
@@ -6928,7 +6928,7 @@ function OutlinePanel(props) {
|
|
|
6928
6928
|
}
|
|
6929
6929
|
});
|
|
6930
6930
|
return (() => {
|
|
6931
|
-
var _el$ = _tmpl$3$
|
|
6931
|
+
var _el$ = _tmpl$3$w(), _el$2 = _el$.firstChild, _el$4 = _el$2.firstChild, _el$5 = _el$4.firstChild;
|
|
6932
6932
|
insert(_el$2, createComponent(Show, {
|
|
6933
6933
|
get when() {
|
|
6934
6934
|
return !collapsed();
|
|
@@ -7234,12 +7234,12 @@ function resolveLabel(item, api) {
|
|
|
7234
7234
|
if (item.labelKey) return api.t(item.labelKey);
|
|
7235
7235
|
return void 0;
|
|
7236
7236
|
}
|
|
7237
|
-
var _tmpl$$14 = /* @__PURE__ */ template(`<span>`), _tmpl$2$G = /* @__PURE__ */ template(`<button type=button>`);
|
|
7237
|
+
var _tmpl$$14 = /* @__PURE__ */ template(`<span class=oasis-editor-tool-button-label>`), _tmpl$2$G = /* @__PURE__ */ template(`<span class=oasis-editor-tool-button-trailing-icon aria-hidden=true>`), _tmpl$3$v = /* @__PURE__ */ template(`<button type=button>`);
|
|
7238
7238
|
function Button$1(props) {
|
|
7239
|
-
const [local, others] = splitProps(props, ["icon", "label", "active", "tooltip", "wide", "ribbonSize", "aria-label", "class", "classList"]);
|
|
7239
|
+
const [local, others] = splitProps(props, ["icon", "trailingIcon", "label", "active", "tooltip", "wide", "ribbonSize", "aria-label", "class", "classList"]);
|
|
7240
7240
|
const ariaLabel = () => local["aria-label"] || local.tooltip || local.label || "";
|
|
7241
7241
|
return (() => {
|
|
7242
|
-
var _el$ = _tmpl$
|
|
7242
|
+
var _el$ = _tmpl$3$v();
|
|
7243
7243
|
spread(_el$, mergeProps({
|
|
7244
7244
|
get ["class"]() {
|
|
7245
7245
|
return `oasis-editor-tool-button ${local.class || ""}`;
|
|
@@ -7289,6 +7289,20 @@ function Button$1(props) {
|
|
|
7289
7289
|
return others.children;
|
|
7290
7290
|
}
|
|
7291
7291
|
}), null);
|
|
7292
|
+
insert(_el$, createComponent(Show, {
|
|
7293
|
+
get when() {
|
|
7294
|
+
return local.trailingIcon;
|
|
7295
|
+
},
|
|
7296
|
+
get children() {
|
|
7297
|
+
var _el$3 = _tmpl$2$G();
|
|
7298
|
+
insert(_el$3, createComponent(ToolIcon, {
|
|
7299
|
+
get name() {
|
|
7300
|
+
return local.trailingIcon;
|
|
7301
|
+
}
|
|
7302
|
+
}));
|
|
7303
|
+
return _el$3;
|
|
7304
|
+
}
|
|
7305
|
+
}), null);
|
|
7292
7306
|
return _el$;
|
|
7293
7307
|
})();
|
|
7294
7308
|
}
|
|
@@ -7518,7 +7532,8 @@ function Menu(props) {
|
|
|
7518
7532
|
var _el$2 = _tmpl$$11();
|
|
7519
7533
|
_el$2.$$click = (event) => {
|
|
7520
7534
|
const el = event.target;
|
|
7521
|
-
|
|
7535
|
+
const button = el.closest("button");
|
|
7536
|
+
if (button && button.getAttribute("aria-haspopup") !== "menu" && !el.closest(".oasis-editor-toolbar-list-options")) {
|
|
7522
7537
|
setOpen(false);
|
|
7523
7538
|
}
|
|
7524
7539
|
};
|
|
@@ -53372,20 +53387,38 @@ function CropMenuRow(props) {
|
|
|
53372
53387
|
get ["aria-haspopup"]() {
|
|
53373
53388
|
return props.submenu ? "menu" : void 0;
|
|
53374
53389
|
},
|
|
53390
|
+
get ["aria-expanded"]() {
|
|
53391
|
+
return memo(() => !!props.submenu)() ? props.open : void 0;
|
|
53392
|
+
},
|
|
53393
|
+
get ["aria-controls"]() {
|
|
53394
|
+
return memo(() => !!props.submenu)() ? props.submenuId : void 0;
|
|
53395
|
+
},
|
|
53375
53396
|
get onClick() {
|
|
53376
53397
|
return props.onClick;
|
|
53377
53398
|
},
|
|
53399
|
+
get onMouseEnter() {
|
|
53400
|
+
return props.onHover;
|
|
53401
|
+
},
|
|
53402
|
+
get onFocus() {
|
|
53403
|
+
return props.onHover;
|
|
53404
|
+
},
|
|
53378
53405
|
get icon() {
|
|
53379
53406
|
return props.icon;
|
|
53380
53407
|
},
|
|
53381
53408
|
get label() {
|
|
53382
|
-
return
|
|
53409
|
+
return props.label;
|
|
53410
|
+
},
|
|
53411
|
+
get trailingIcon() {
|
|
53412
|
+
return props.submenu ? "chevron-right" : void 0;
|
|
53383
53413
|
}
|
|
53384
53414
|
});
|
|
53385
53415
|
}
|
|
53386
53416
|
function ImageCropMenu(props) {
|
|
53387
53417
|
const t = useI18n();
|
|
53388
53418
|
const locale = () => t("locale.id") === "en" ? "en" : "pt-BR";
|
|
53419
|
+
const menuId = createUniqueId();
|
|
53420
|
+
const shapeSubmenuId = `${menuId}-crop-shapes`;
|
|
53421
|
+
const ratioSubmenuId = `${menuId}-crop-ratios`;
|
|
53389
53422
|
const [submenu, setSubmenu] = createSignal(null);
|
|
53390
53423
|
const toggleSubmenu = (value2) => {
|
|
53391
53424
|
setSubmenu((current) => current === value2 ? null : value2);
|
|
@@ -53404,6 +53437,9 @@ function ImageCropMenu(props) {
|
|
|
53404
53437
|
},
|
|
53405
53438
|
onClick: () => apply("imageCrop")
|
|
53406
53439
|
}), _el$4);
|
|
53440
|
+
_el$5.addEventListener("mouseleave", () => {
|
|
53441
|
+
setSubmenu(null);
|
|
53442
|
+
});
|
|
53407
53443
|
insert(_el$5, createComponent(CropMenuRow, {
|
|
53408
53444
|
testId: "editor-toolbar-image-crop-shape",
|
|
53409
53445
|
icon: "shapes",
|
|
@@ -53411,6 +53447,13 @@ function ImageCropMenu(props) {
|
|
|
53411
53447
|
return t("image.cropToShape");
|
|
53412
53448
|
},
|
|
53413
53449
|
submenu: true,
|
|
53450
|
+
get open() {
|
|
53451
|
+
return submenu() === "shape";
|
|
53452
|
+
},
|
|
53453
|
+
submenuId: shapeSubmenuId,
|
|
53454
|
+
onHover: () => {
|
|
53455
|
+
setSubmenu("shape");
|
|
53456
|
+
},
|
|
53414
53457
|
onClick: () => toggleSubmenu("shape")
|
|
53415
53458
|
}), null);
|
|
53416
53459
|
insert(_el$5, createComponent(Show, {
|
|
@@ -53419,6 +53462,7 @@ function ImageCropMenu(props) {
|
|
|
53419
53462
|
},
|
|
53420
53463
|
get children() {
|
|
53421
53464
|
var _el$6 = _tmpl$2();
|
|
53465
|
+
setAttribute(_el$6, "id", shapeSubmenuId);
|
|
53422
53466
|
insert(_el$6, createComponent(For, {
|
|
53423
53467
|
get each() {
|
|
53424
53468
|
return cropShapePresets();
|
|
@@ -53443,6 +53487,9 @@ function ImageCropMenu(props) {
|
|
|
53443
53487
|
return _el$6;
|
|
53444
53488
|
}
|
|
53445
53489
|
}), null);
|
|
53490
|
+
_el$7.addEventListener("mouseleave", () => {
|
|
53491
|
+
setSubmenu(null);
|
|
53492
|
+
});
|
|
53446
53493
|
insert(_el$7, createComponent(CropMenuRow, {
|
|
53447
53494
|
testId: "editor-toolbar-image-crop-ratio",
|
|
53448
53495
|
icon: "ratio",
|
|
@@ -53450,6 +53497,13 @@ function ImageCropMenu(props) {
|
|
|
53450
53497
|
return t("image.cropAspectRatio");
|
|
53451
53498
|
},
|
|
53452
53499
|
submenu: true,
|
|
53500
|
+
get open() {
|
|
53501
|
+
return submenu() === "ratio";
|
|
53502
|
+
},
|
|
53503
|
+
submenuId: ratioSubmenuId,
|
|
53504
|
+
onHover: () => {
|
|
53505
|
+
setSubmenu("ratio");
|
|
53506
|
+
},
|
|
53453
53507
|
onClick: () => toggleSubmenu("ratio")
|
|
53454
53508
|
}), null);
|
|
53455
53509
|
insert(_el$7, createComponent(Show, {
|
|
@@ -53458,6 +53512,7 @@ function ImageCropMenu(props) {
|
|
|
53458
53512
|
},
|
|
53459
53513
|
get children() {
|
|
53460
53514
|
var _el$8 = _tmpl$3();
|
|
53515
|
+
setAttribute(_el$8, "id", ratioSubmenuId);
|
|
53461
53516
|
insert(_el$8, createComponent(For, {
|
|
53462
53517
|
each: CROP_ASPECT_GROUPS,
|
|
53463
53518
|
children: (group) => (() => {
|