oasis-editor 0.0.108 → 0.0.109
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-DkiTrFZ6.js → OasisEditorApp-vuSkxc37.js} +56 -40
- package/dist/assets/{importDocxWorker-thqRCD9m.js → importDocxWorker-BF8VtQ9h.js} +1 -1
- package/dist/core/color.d.ts +9 -0
- package/dist/core/units.d.ts +8 -0
- package/dist/export/pdf/units.d.ts +2 -1
- package/dist/i18n/locales/en.d.ts +10 -0
- package/dist/i18n/locales/pt-BR.d.ts +10 -0
- package/dist/import/docx/units.d.ts +6 -2
- package/dist/{index-DzBLUs91.js → index-9yDGAODt.js} +1453 -826
- 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/ShapeGallery.d.ts +11 -0
- package/dist/ui/components/Toolbar/recentShapes.d.ts +8 -0
- package/dist/ui/components/Toolbar/shapeCatalog.d.ts +23 -0
- package/dist/ui/components/Toolbar/shapePreview.d.ts +16 -0
- package/dist/ui/textMeasurement/constants.d.ts +1 -1
- package/package.json +1 -1
|
@@ -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 { d as domTextMeasurer, g as getProjectedParagraphBlockHeight, e as estimateTableBlockHeight, p as projectParagraphLayout, a as getPageContentWidth, b as getPageBodyTop, c as getPageBodyBottom, l as listReferencedEndnotes, f as getFootnoteDisplayMarker, s as setActiveHyphenation, h as getDocumentSections, i as buildFootnoteReservations, M as MAX_FOOTNOTE_LAYOUT_ITERATIONS, r as reservationSignature, j as applyFootnotesToPages, k as getRunField, m as projectBlocksLayout, v as visitRun, n as assertNever, o as createSignal, q 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 getParagraphText, C as getActiveZone, D as getActiveSectionIndex, E as getParagraphs, F as normalizeSelection, G as positionToParagraphOffset, H as paragraphOffsetToPosition, I as clampPosition, J as findParagraphIndex, K as createCollapsedSelection, L as isSelectionCollapsed, N as parseFontSizePtToPx, O as formatFontSizePt, P as createEditorParagraph, Q as getBlockParagraphs, R as findParagraphTableLocation, T as buildTableCellLayout, U as PT_PER_PX, V as createEditorTableCell, W as createEditorTableRow, X as createEditorTable, Y as underlineStyleToCssDecorationStyle, Z as resolveImageSrc, _ as listKindForTag, $ as isParagraphTag, a0 as collectInlineRuns, a1 as parseParagraphStyle, a2 as getRunImage, a3 as InlineShell, a4 as BalloonShell, a5 as DocumentShell, a6 as createMemo, a7 as getCaretRectFromSnapshot, a8 as getParagraphRectFromSnapshot, a9 as createComponent, aa as CaretOverlay, ab as Show, ac as createRenderEffect, ad as style, ae as setAttribute, af as setStyleProperty, ag as memo, ah as template, ai as useI18n, aj as createEffect, ak as insert, al as use, am as addEventListener, an as Dialog, ao as delegateEvents, ap as className, aq as For, ar as UNDERLINE_STYLE_OPTIONS, as as Tabs, at as onMount, au as onCleanup, av as PluginUiHost, aw as OasisEditorEditor, ax as OasisBrandMark, ay as setPreciseFontPreference, az as setWelcomeSeen, aA as enablePreciseFontMode, aB as TWIPS_PER_POINT, aC as PX_PER_INCH, aD as TWIPS_PER_INCH, aE as resolveEffectiveParagraphStyle, aF as resolveEffectiveTextStyleForParagraph, aG as
|
|
4
|
+
import { d as domTextMeasurer, g as getProjectedParagraphBlockHeight, e as estimateTableBlockHeight, p as projectParagraphLayout, a as getPageContentWidth, b as getPageBodyTop, c as getPageBodyBottom, l as listReferencedEndnotes, f as getFootnoteDisplayMarker, s as setActiveHyphenation, h as getDocumentSections, i as buildFootnoteReservations, M as MAX_FOOTNOTE_LAYOUT_ITERATIONS, r as reservationSignature, j as applyFootnotesToPages, k as getRunField, m as projectBlocksLayout, v as visitRun, n as assertNever, o as createSignal, q 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 getParagraphText, C as getActiveZone, D as getActiveSectionIndex, E as getParagraphs, F as normalizeSelection, G as positionToParagraphOffset, H as paragraphOffsetToPosition, I as clampPosition, J as findParagraphIndex, K as createCollapsedSelection, L as isSelectionCollapsed, N as parseFontSizePtToPx, O as formatFontSizePt, P as createEditorParagraph, Q as getBlockParagraphs, R as findParagraphTableLocation, T as buildTableCellLayout, U as PT_PER_PX, V as createEditorTableCell, W as createEditorTableRow, X as createEditorTable, Y as underlineStyleToCssDecorationStyle, Z as resolveImageSrc, _ as listKindForTag, $ as isParagraphTag, a0 as collectInlineRuns, a1 as parseParagraphStyle, a2 as getRunImage, a3 as InlineShell, a4 as BalloonShell, a5 as DocumentShell, a6 as createMemo, a7 as getCaretRectFromSnapshot, a8 as getParagraphRectFromSnapshot, a9 as createComponent, aa as CaretOverlay, ab as Show, ac as createRenderEffect, ad as style, ae as setAttribute, af as setStyleProperty, ag as memo, ah as template, ai as useI18n, aj as createEffect, ak as insert, al as use, am as addEventListener, an as Dialog, ao as delegateEvents, ap as className, aq as For, ar as UNDERLINE_STYLE_OPTIONS, as as Tabs, at as onMount, au as onCleanup, av as PluginUiHost, aw as OasisEditorEditor, ax as OasisBrandMark, ay as setPreciseFontPreference, az as setWelcomeSeen, aA as enablePreciseFontMode, aB as TWIPS_PER_POINT, aC as PX_PER_INCH, aD as TWIPS_PER_INCH, aE as resolveEffectiveParagraphStyle, aF as resolveEffectiveTextStyleForParagraph, aG as EMU_PER_PT, aH as EMU_PER_PX, aI as getRunFootnoteReference, aJ as getRunEndnoteReference, aK as iterateFootnoteReferenceRuns, aL as iterateEndnoteReferenceRuns, aM as imageContentTypeDefaults, aN as getRunFieldChar, aO as getRunFieldInstruction, aP as createEditorRun, aQ as JSZip, aR as imageExtensionFromMime, aS as pxToPt$1, aT as resolveFloatingObjectRect, aU as getTextBoxFloatingGeometry, aV as getPresetPathSegments, aW as buildListLabels, aX as getImageFloatingGeometry, aY as textStyleToFontSizePt, aZ as PX_PER_POINT, a_ as DEFAULT_FONT_SIZE_PX, a$ as resolveOpenTypeFeatureTags, b0 as isDoubleUnderlineStyle, b1 as isWavyUnderlineStyle, b2 as underlineStyleLineWidthPx, b3 as underlineStyleDashArray, b4 as resolveListLabel, b5 as getListLabelInset, b6 as getAlignedListLabelInset, b7 as getParagraphBorderInsets, b8 as buildSegmentTable, b9 as buildCanvasTableLayout, ba as resolveCanvasTableWidth, bb as resolveFloatingTableRect, bc as normalizeFamily, bd as ROBOTO_FONT_FILES, be as loadFontAsset, bf as OFFICE_COMPAT_FONT_FAMILIES, bg as BinaryReader, bh as buildSfnt, bi as defaultFontDecoderRegistry, bj as SfntFontProgram, bk as collectPdfFontFamilies, bl as outlineFrom, bm as getPageHeaderZoneTop, bn as getPageColumnRects, bo as findFootnoteReference, bp as FOOTNOTE_MARKER_GUTTER_PX, bq as resolveImporterForFile, br as getDocumentSectionsCanonical, bs as getDocumentParagraphsCanonical, bt as getDocumentParagraphs, bu as getDocumentPageSettings, bv as getTableCellContentWidthForParagraph, bw as layoutMetricsEpoch, bx as bumpLayoutMetricsEpoch, by as createCanvasLayoutSnapshotProvider, bz as on, bA as debounce, bB as unwrap, bC as perfTimer, bD as getRunTextBox, bE as createEditorDocument, bF as resolveResizedDimensions, bG as resolveTextBoxRenderHeight, bH as getToolbarStyleState, bI as getCachedCanvasImage, bJ as measureParagraphMinContentWidthPx, bK as getEditableBlocksForZone, bL as findParagraphLocation, bM as createSectionBoundaryParagraph, bN as normalizePageSettings, bO as DEFAULT_EDITOR_PAGE_SETTINGS, bP as markStart, bQ as markEnd, bR as getParagraphEntries, bS as getParagraphById, bT as createEditorFootnote, bU as createFootnoteReferenceRun, bV as renumberFootnotes, bW as getHeadingLevel, bX as preciseFontModeVersion, bY as isPreciseFontModeEnabled, bZ as resolveNamedTextStyle, b_ as togglePreciseFontMode, b$ as nextFontSizePt, c0 as previousFontSizePt, c1 as fontSizePtToPx, c2 as createDefaultToolbarPreset, c3 as MenuRegistry, c4 as createToolbarRegistry, c5 as Editor, c6 as resolveCommandRef, c7 as commandRefName, c8 as createOasisEditorClient, c9 as createEditorZoom, ca as startLongTaskObserver, cb as installGlobalReport, cc as applyStoredPreciseFontPreference, cd as getWelcomeSeen, ce as isLocalFontAccessSupported, cf as EDITOR_SCROLL_PADDING_PX, cg as Toolbar, ch as OasisEditorLoading, ci as I18nProvider, cj as createTranslator, ck as createEditorLogger, cl as registerDomStatsSurface } from "./index-9yDGAODt.js";
|
|
5
5
|
function projectHeaderFooterBlocksWithDependencies(blocks, deps, context = {}) {
|
|
6
6
|
const {
|
|
7
7
|
pageIndex,
|
|
@@ -34471,6 +34471,28 @@ const DOCX_HIGHLIGHT_HEX_ALIASES = {
|
|
|
34471
34471
|
};
|
|
34472
34472
|
const OOXML_PERCENT_DENOMINATOR = 1e5;
|
|
34473
34473
|
const OOXML_ROTATION_UNITS = 6e4;
|
|
34474
|
+
const HEX6_PATTERN = /^[0-9a-fA-F]{6}$/;
|
|
34475
|
+
function stripHashPrefix(color) {
|
|
34476
|
+
return color.trim().replace(/^#/, "");
|
|
34477
|
+
}
|
|
34478
|
+
function parseHexColorToRgb255(color) {
|
|
34479
|
+
if (!color) {
|
|
34480
|
+
return null;
|
|
34481
|
+
}
|
|
34482
|
+
const normalized = stripHashPrefix(color);
|
|
34483
|
+
if (!HEX6_PATTERN.test(normalized)) {
|
|
34484
|
+
return null;
|
|
34485
|
+
}
|
|
34486
|
+
return [
|
|
34487
|
+
Number.parseInt(normalized.slice(0, 2), 16),
|
|
34488
|
+
Number.parseInt(normalized.slice(2, 4), 16),
|
|
34489
|
+
Number.parseInt(normalized.slice(4, 6), 16)
|
|
34490
|
+
];
|
|
34491
|
+
}
|
|
34492
|
+
function rgb255ToHex(r, g, b) {
|
|
34493
|
+
const toHex = (value) => Math.max(0, Math.min(255, Math.round(value))).toString(16).padStart(2, "0");
|
|
34494
|
+
return `#${toHex(r)}${toHex(g)}${toHex(b)}`;
|
|
34495
|
+
}
|
|
34474
34496
|
const MC_NS = "http://schemas.openxmlformats.org/markup-compatibility/2006";
|
|
34475
34497
|
function serializeW14SolidFillXml(color) {
|
|
34476
34498
|
const hex = normalizeDocxColor(color);
|
|
@@ -34482,11 +34504,11 @@ function serializeW14FillXml(fill) {
|
|
|
34482
34504
|
}
|
|
34483
34505
|
const gsXml = fill.stops.map((s) => {
|
|
34484
34506
|
const hex = normalizeDocxColor(s.color);
|
|
34485
|
-
const pos = Math.round(s.position *
|
|
34486
|
-
const alphaXml = s.alpha !== void 0 ? `<w14:alpha w14:val="${Math.round(s.alpha *
|
|
34507
|
+
const pos = Math.round(s.position * OOXML_PERCENT_DENOMINATOR);
|
|
34508
|
+
const alphaXml = s.alpha !== void 0 ? `<w14:alpha w14:val="${Math.round(s.alpha * OOXML_PERCENT_DENOMINATOR)}"/>` : "";
|
|
34487
34509
|
return `<w14:gs w14:pos="${pos}"><w14:srgbClr w14:val="${hex}">${alphaXml}</w14:srgbClr></w14:gs>`;
|
|
34488
34510
|
}).join("");
|
|
34489
|
-
const angVal = Math.round((fill.angle ?? 0) *
|
|
34511
|
+
const angVal = Math.round((fill.angle ?? 0) * OOXML_ROTATION_UNITS);
|
|
34490
34512
|
return `<w14:gradFill><w14:gsLst>${gsXml}</w14:gsLst><w14:lin w14:ang="${angVal}" w14:scaled="0"/></w14:gradFill>`;
|
|
34491
34513
|
}
|
|
34492
34514
|
function serializeTextFillMC(fill, fallbackColor) {
|
|
@@ -34495,34 +34517,34 @@ function serializeTextFillMC(fill, fallbackColor) {
|
|
|
34495
34517
|
return `<mc:AlternateContent xmlns:mc="${MC_NS}"><mc:Choice Requires="w14"><w14:textFill>${fillXml}</w14:textFill></mc:Choice><mc:Fallback><w:color w:val="${fbHex}"/></mc:Fallback></mc:AlternateContent>`;
|
|
34496
34518
|
}
|
|
34497
34519
|
function serializeTextOutlineMC(outline) {
|
|
34498
|
-
const widthEmu = Math.round(Math.max(0, outline.widthPt) *
|
|
34520
|
+
const widthEmu = Math.round(Math.max(0, outline.widthPt) * EMU_PER_PT);
|
|
34499
34521
|
const fillXml = outline.fill ? serializeW14FillXml(outline.fill) : outline.color ? serializeW14SolidFillXml(outline.color) : "";
|
|
34500
34522
|
return `<mc:AlternateContent xmlns:mc="${MC_NS}"><mc:Choice Requires="w14"><w14:textOutline w14:w="${widthEmu}" w14:cap="flat" w14:cmpd="sng" w14:algn="ctr">` + fillXml + `</w14:textOutline></mc:Choice><mc:Fallback><w:outline/></mc:Fallback></mc:AlternateContent>`;
|
|
34501
34523
|
}
|
|
34502
34524
|
function serializeW14ColorEl(color, alpha) {
|
|
34503
34525
|
const hex = normalizeDocxColor(color);
|
|
34504
|
-
const alphaXml = alpha !== void 0 ? `<w14:alpha w14:val="${Math.round(alpha *
|
|
34526
|
+
const alphaXml = alpha !== void 0 ? `<w14:alpha w14:val="${Math.round(alpha * OOXML_PERCENT_DENOMINATOR)}"/>` : "";
|
|
34505
34527
|
return `<w14:srgbClr w14:val="${hex}">${alphaXml}</w14:srgbClr>`;
|
|
34506
34528
|
}
|
|
34507
34529
|
function serializeTextShadowMC(shadow) {
|
|
34508
|
-
const blurEmu = Math.round(Math.max(0, shadow.blurPt) *
|
|
34509
|
-
const distEmu = Math.round(Math.max(0, shadow.distPt) *
|
|
34510
|
-
const dirVal = Math.round(shadow.dirDeg *
|
|
34530
|
+
const blurEmu = Math.round(Math.max(0, shadow.blurPt) * EMU_PER_PT);
|
|
34531
|
+
const distEmu = Math.round(Math.max(0, shadow.distPt) * EMU_PER_PT);
|
|
34532
|
+
const dirVal = Math.round(shadow.dirDeg * OOXML_ROTATION_UNITS);
|
|
34511
34533
|
const colorXml = serializeW14ColorEl(shadow.color, shadow.alpha);
|
|
34512
34534
|
return `<mc:AlternateContent xmlns:mc="${MC_NS}"><mc:Choice Requires="w14"><w14:shadow w14:blurRad="${blurEmu}" w14:dist="${distEmu}" w14:dir="${dirVal}" w14:sx="100000" w14:sy="100000" w14:kx="0" w14:ky="0" w14:algn="ctr">` + colorXml + `</w14:shadow></mc:Choice><mc:Fallback><w:shadow/></mc:Fallback></mc:AlternateContent>`;
|
|
34513
34535
|
}
|
|
34514
34536
|
function serializeGlowMC(glow) {
|
|
34515
|
-
const radEmu = Math.round(Math.max(0, glow.radiusPt) *
|
|
34537
|
+
const radEmu = Math.round(Math.max(0, glow.radiusPt) * EMU_PER_PT);
|
|
34516
34538
|
const colorXml = serializeW14ColorEl(glow.color, glow.alpha);
|
|
34517
34539
|
return `<mc:AlternateContent xmlns:mc="${MC_NS}"><mc:Choice Requires="w14"><w14:glow w14:rad="${radEmu}">${colorXml}</w14:glow></mc:Choice><mc:Fallback/></mc:AlternateContent>`;
|
|
34518
34540
|
}
|
|
34519
34541
|
function serializeReflectionMC(reflection) {
|
|
34520
|
-
const blurEmu = Math.round(Math.max(0, reflection.blurPt) *
|
|
34521
|
-
const stA = Math.round(reflection.startAlpha *
|
|
34522
|
-
const stPos = Math.round(reflection.startPos *
|
|
34523
|
-
const endA = Math.round(reflection.endAlpha *
|
|
34524
|
-
const endPos = Math.round(reflection.endPos *
|
|
34525
|
-
const distEmu = Math.round(Math.max(0, reflection.distPt) *
|
|
34542
|
+
const blurEmu = Math.round(Math.max(0, reflection.blurPt) * EMU_PER_PT);
|
|
34543
|
+
const stA = Math.round(reflection.startAlpha * OOXML_PERCENT_DENOMINATOR);
|
|
34544
|
+
const stPos = Math.round(reflection.startPos * OOXML_PERCENT_DENOMINATOR);
|
|
34545
|
+
const endA = Math.round(reflection.endAlpha * OOXML_PERCENT_DENOMINATOR);
|
|
34546
|
+
const endPos = Math.round(reflection.endPos * OOXML_PERCENT_DENOMINATOR);
|
|
34547
|
+
const distEmu = Math.round(Math.max(0, reflection.distPt) * EMU_PER_PT);
|
|
34526
34548
|
return `<mc:AlternateContent xmlns:mc="${MC_NS}"><mc:Choice Requires="w14"><w14:reflection w14:blurRad="${blurEmu}" w14:stA="${stA}" w14:stPos="${stPos}" w14:endA="${endA}" w14:endPos="${endPos}" w14:dist="${distEmu}" w14:dir="5400000" w14:fadeDir="5400000" w14:sx="100000" w14:sy="-100000" w14:kx="0" w14:ky="0" w14:algn="bl"/></mc:Choice><mc:Fallback/></mc:AlternateContent>`;
|
|
34527
34549
|
}
|
|
34528
34550
|
function serialize3dBlobMC(blob) {
|
|
@@ -34576,17 +34598,7 @@ function stylisticSetToDocx(value) {
|
|
|
34576
34598
|
}
|
|
34577
34599
|
return (1 << value - 1).toString(16).toUpperCase().padStart(8, "0");
|
|
34578
34600
|
}
|
|
34579
|
-
|
|
34580
|
-
const normalized = color.trim().replace(/^#/, "");
|
|
34581
|
-
if (!/^[0-9a-fA-F]{6}$/.test(normalized)) {
|
|
34582
|
-
return null;
|
|
34583
|
-
}
|
|
34584
|
-
return [
|
|
34585
|
-
Number.parseInt(normalized.slice(0, 2), 16),
|
|
34586
|
-
Number.parseInt(normalized.slice(2, 4), 16),
|
|
34587
|
-
Number.parseInt(normalized.slice(4, 6), 16)
|
|
34588
|
-
];
|
|
34589
|
-
}
|
|
34601
|
+
const parseHexColor = parseHexColorToRgb255;
|
|
34590
34602
|
function normalizeHighlightForDocx(highlight) {
|
|
34591
34603
|
if (highlight in DOCX_HIGHLIGHT_COLORS) {
|
|
34592
34604
|
return highlight;
|
|
@@ -36851,11 +36863,16 @@ async function drawFloatingImagesForParagraph(options) {
|
|
|
36851
36863
|
}
|
|
36852
36864
|
}
|
|
36853
36865
|
function blendColorWithWhite(hex, alpha) {
|
|
36866
|
+
const rgb = parseHexColorToRgb255(hex);
|
|
36867
|
+
if (!rgb) {
|
|
36868
|
+
return hex;
|
|
36869
|
+
}
|
|
36854
36870
|
const a = Math.max(0, Math.min(1, alpha));
|
|
36855
|
-
|
|
36856
|
-
|
|
36857
|
-
|
|
36858
|
-
|
|
36871
|
+
return rgb255ToHex(
|
|
36872
|
+
255 + (rgb[0] - 255) * a,
|
|
36873
|
+
255 + (rgb[1] - 255) * a,
|
|
36874
|
+
255 + (rgb[2] - 255) * a
|
|
36875
|
+
);
|
|
36859
36876
|
}
|
|
36860
36877
|
function drawFragmentHighlight(writer, pageIndex, line, fragment, originX, originY, styles) {
|
|
36861
36878
|
if (!styles.highlight) {
|
|
@@ -38069,15 +38086,11 @@ function colorToRgb(color, fallback) {
|
|
|
38069
38086
|
if (!color) {
|
|
38070
38087
|
return fallback;
|
|
38071
38088
|
}
|
|
38072
|
-
const
|
|
38073
|
-
if (
|
|
38089
|
+
const rgb = parseHexColorToRgb255(color);
|
|
38090
|
+
if (!rgb) {
|
|
38074
38091
|
return fallback;
|
|
38075
38092
|
}
|
|
38076
|
-
return [
|
|
38077
|
-
Number.parseInt(normalized.slice(0, 2), 16) / 255,
|
|
38078
|
-
Number.parseInt(normalized.slice(2, 4), 16) / 255,
|
|
38079
|
-
Number.parseInt(normalized.slice(4, 6), 16) / 255
|
|
38080
|
-
];
|
|
38093
|
+
return [rgb[0] / 255, rgb[1] / 255, rgb[2] / 255];
|
|
38081
38094
|
}
|
|
38082
38095
|
function colorCommand(color, operator, fallback) {
|
|
38083
38096
|
const [r, g, b] = colorToRgb(color, fallback);
|
|
@@ -40538,7 +40551,8 @@ function buildDocumentInfoBody(info) {
|
|
|
40538
40551
|
const entries = [];
|
|
40539
40552
|
if (info.title) entries.push(`/Title ${encodePdfTextString(info.title)}`);
|
|
40540
40553
|
if (info.author) entries.push(`/Author ${encodePdfTextString(info.author)}`);
|
|
40541
|
-
if (info.subject)
|
|
40554
|
+
if (info.subject)
|
|
40555
|
+
entries.push(`/Subject ${encodePdfTextString(info.subject)}`);
|
|
40542
40556
|
if (info.keywords)
|
|
40543
40557
|
entries.push(`/Keywords ${encodePdfTextString(info.keywords)}`);
|
|
40544
40558
|
if (info.producer)
|
|
@@ -47188,6 +47202,8 @@ function findNextWordBoundary(text, offset) {
|
|
|
47188
47202
|
}
|
|
47189
47203
|
return index;
|
|
47190
47204
|
}
|
|
47205
|
+
const REUSE_MOUSE_DOWN_HIT_MAX_AGE_MS = 600;
|
|
47206
|
+
const REUSE_MOUSE_DOWN_HIT_MAX_DISTANCE_PX = 8;
|
|
47191
47207
|
function resolveTripleClickParagraphRange(state, paragraph, targetZone) {
|
|
47192
47208
|
const zoneParagraphs = getDocumentParagraphs(state.document).filter(
|
|
47193
47209
|
(candidate) => {
|
|
@@ -47596,7 +47612,7 @@ function createEditorSurfaceEvents(deps) {
|
|
|
47596
47612
|
event.clientX - lastMouseDownX,
|
|
47597
47613
|
event.clientY - lastMouseDownY
|
|
47598
47614
|
);
|
|
47599
|
-
const useMouseDownHit = Date.now() - lastMouseDownAt <=
|
|
47615
|
+
const useMouseDownHit = Date.now() - lastMouseDownAt <= REUSE_MOUSE_DOWN_HIT_MAX_AGE_MS && distanceFromMouseDown <= REUSE_MOUSE_DOWN_HIT_MAX_DISTANCE_PX;
|
|
47600
47616
|
const hit = useMouseDownHit ? lastMouseDownHit : deps.resolveSurfaceHitAtPoint(event.clientX, event.clientY);
|
|
47601
47617
|
if (!(hit == null ? void 0 : hit.resolvedFromParagraph)) {
|
|
47602
47618
|
deps.focusInputAfterPointerSelection();
|