plitejs 54.0.0-beta.4 → 54.0.0-beta.5
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/annotations/index.d.ts +1 -1
- package/dist/annotations/index.js +1 -1
- package/dist/authored/index.d.ts +2 -2
- package/dist/authored/index.js +4 -4
- package/dist/{authored-veto-D_9wCJcK.js → authored-veto-Cu-5JdVj.js} +1 -1
- package/dist/{comparison-plan-DY_vuGPq.js → comparison-plan-BJxnVPcS.js} +1 -1
- package/dist/{comparison-types-DdwE6mYq.d.ts → comparison-types-Bvvxzxq2.d.ts} +1 -1
- package/dist/{create-editor-CLQEkEZ1.js → create-editor-XvI_4sYc.js} +1 -1
- package/dist/diff/index.d.ts +2 -2
- package/dist/diff/index.js +2 -2
- package/dist/dom/index.d.ts +1 -1
- package/dist/dom/index.js +1 -1
- package/dist/{dom-CH2BXXj6.js → dom-BjspML2h.js} +71 -46
- package/dist/{editor-owner-C9rVbMTs.js → editor-owner-CRgIQ625.js} +1 -1
- package/dist/history/index.d.ts +1 -1
- package/dist/history/index.js +2 -2
- package/dist/hyperscript/index.d.ts +1 -1
- package/dist/hyperscript/index.js +1 -1
- package/dist/{hyperscript-CeT83ZLB.js → hyperscript-BFypA5qW.js} +2 -2
- package/dist/{index-UrB4jAwl.d.ts → index-BUJsM0oV.d.ts} +1 -1
- package/dist/{index-Dq3Jlj8O.d.ts → index-BwmXxqbi.d.ts} +1 -1
- package/dist/{index-BWPcE4ac.d.ts → index-CRmyGzS8.d.ts} +1 -1
- package/dist/{index-DVMNewDn.d.ts → index-CYac3_ID.d.ts} +20 -13
- package/dist/{index-Db-ktCTE.d.ts → index-DaXz-4c7.d.ts} +6 -3
- package/dist/{index-BXjLmx1n.d.ts → index-QuqD4Dyj.d.ts} +9 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4 -4
- package/dist/internal/index.d.ts +2 -2
- package/dist/internal/index.js +4 -4
- package/dist/{mapped-view-store-CbWqba_1.js → mapped-view-store-XUJ-fnHE.js} +1 -1
- package/dist/{native-grouping-input-DXNhlPHd.js → native-grouping-input-8kO12VK9.js} +1 -1
- package/dist/pagination/index.d.ts +1 -1
- package/dist/pagination/index.js +1 -1
- package/dist/pagination/react.d.ts +2 -2
- package/dist/pagination/react.js +5 -5
- package/dist/{pagination-CBdYiOuR.js → pagination-ChDBJtdC.js} +1 -1
- package/dist/{plugin-SR3HTH0j.js → plugin-BvM4s-Lr.js} +24 -13
- package/dist/{range-geometry-CdltxcH6.js → range-geometry-B5CITwMp.js} +2 -2
- package/dist/{range-geometry-Dwp2oyCc.d.ts → range-geometry-wFuJaBlA.d.ts} +1 -1
- package/dist/react/index.d.ts +4 -4
- package/dist/react/index.js +6 -6
- package/dist/react/virtualized.d.ts +2 -2
- package/dist/react/virtualized.js +1 -1
- package/dist/{react-CN-iBh1z.js → react-cmFeNP6P.js} +16 -8
- package/dist/{retraction-BmPJB9cE.js → retraction-lXQwo2Ia.js} +1 -1
- package/dist/{src-B-zm0kz4.js → src-BA6F9yxN.js} +88 -21
- package/dist/{store-51r4zpCR.js → store-Bllfuqp4.js} +3 -3
- package/dist/testing/index.d.ts +2 -2
- package/dist/testing/index.js +3 -3
- package/dist/{use-editor-dom-scope-uDJQ692F.js → use-editor-dom-scope-B4gF9t_Y.js} +416 -384
- package/dist/yjs/index.d.ts +1 -1
- package/dist/yjs/index.js +1 -1
- package/dist/yjs/react/index.d.ts +3 -3
- package/dist/yjs/react/index.js +3 -3
- package/dist/{yjs-IGE0Al3n.js → yjs-CWdWDrpv.js} +3 -3
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as AnnotationSnapshot, c as OwnedAnnotationStore, i as AnnotationRefreshOptions, l as ResolvedAnnotation, n as AnnotationAnchor, o as AnnotationStore, r as AnnotationChange, s as AnnotationStoreOptions, t as Annotation, u as createAnnotationStore } from "../index-
|
|
1
|
+
import { a as AnnotationSnapshot, c as OwnedAnnotationStore, i as AnnotationRefreshOptions, l as ResolvedAnnotation, n as AnnotationAnchor, o as AnnotationStore, r as AnnotationChange, s as AnnotationStoreOptions, t as Annotation, u as createAnnotationStore } from "../index-CRmyGzS8.js";
|
|
2
2
|
export { type Annotation, type AnnotationAnchor, type AnnotationChange, type AnnotationRefreshOptions, type AnnotationSnapshot, type AnnotationStore, type AnnotationStoreOptions, type OwnedAnnotationStore, type ResolvedAnnotation, createAnnotationStore };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as createAnnotationStore } from "../store-
|
|
1
|
+
import { t as createAnnotationStore } from "../store-Bllfuqp4.js";
|
|
2
2
|
export { createAnnotationStore };
|
package/dist/authored/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { h as TwoWayComparison } from "../comparison-types-
|
|
1
|
+
import { As as SchemaPropertyLandingPolicy, Cs as SchemaPropertyCopyPolicy, Hd as PluginDependencyReferenceFor, Jg as EditorJsonValue, Lm as TxDeclaredMethod, Mg as Location, Mo as PropertySetDescriptor, Ms as SchemaPropertyRole, Ns as SchemaPropertySplitPolicy, Oc as ContentSlice, Od as Plugin, Of as Value, Og as Range, Oo as PropertyJsonDescriptor, Ps as SchemaPropertyTypeChangePolicy, Ts as SchemaPropertyExclusiveGroup, Ug as Path, dn as AuthoredDocumentProjection, fn as AuthoredProjectionDiagnostic, gd as EditorViewOptions, ol as EditorDocumentValue, pn as AuthoredProjectionRefusal, wc as AnyEditor, wd as NodeKey, zg as Point, zm as TxOnlyMethod } from "../index-QuqD4Dyj.js";
|
|
2
|
+
import { h as TwoWayComparison } from "../comparison-types-Bvvxzxq2.js";
|
|
3
3
|
//#region src/authored/tree/layers.d.ts
|
|
4
4
|
type FormatWrite = Readonly<{
|
|
5
5
|
kind: 'remove';
|
package/dist/authored/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { $
|
|
2
|
-
import { t as authoredVeto } from "../authored-veto-
|
|
3
|
-
import { n as EditorMissingReferenceError, t as retractionOf } from "../retraction-
|
|
4
|
-
import { S as fingerprintEditorJson, c as COMPARISON_POLICY, n as comparisonPlanOf, t as closeOverRequired } from "../comparison-plan-
|
|
1
|
+
import { $d as isTextNode, $l as splitDroppedKeysOf, $o as documentAdmissionPoint, $s as judgeProjectedRoots, Aa as gridRolesOf, As as mapSelectionWithContext, Bc as getAuthoredUpdateView, Bl as handoverKeysOf, Bs as joinedAway, Ca as editorReads, D as property, Df as withValueRecords, Du as getEditorRuntimeOwner, Ed as addSection, El as getPluginContributions, Eu as getEditorRuntime, Fl as crossesUniqueTarget, Fn as getActiveEditorUpdateId, Gd as normalizeSetValues, Gl as isSupportedGeneratedElementProperty, Gn as getCurrentSelectionRoot, Gs as judgedBy, Ha as getPlacementGeneration, Hd as rootIndexOf, Hl as hashSchemaIdentityString, If as isEditorJsonValue, In as getActiveEditorUpdateTags, Is as completeChildrenAt, Jd as PreparedTokenSliceStructureError, Jf as RangeApi, Js as elementSplitOutput, Kd as classifyRootChange, Kl as matchesCompiledSchemaTarget, Ks as readingCovered, Ll as getCompiledPropertyCandidates, Ma as survivalUnder, Md as mapRootChangePositionBackward, Mo as getBaseViewPresentation, Mr as isPresentationComposing, Ms as settleSelectionMode, Nd as propertyDeltaFromModifications, Nu as UNSCOPED_ORIGINS, O as schema, Oa as gridHoldersOf, Od as applyPropertyModifications, Of as withoutValueRoots, Ou as getEditorRuntimeRoot, Pc as authoredDocumentCapabilityPoint, Pd as semanticPropertyModifications, Pr as notifyPresentationViewState, Qd as isElementNode, Qs as changedRootsOf, Qu as DocumentChange, Rd as DocumentIndex, Sa as executeEditorRead, Sd as withDocumentChangeRecords, Sf as recordOpsBetween, Si as withEditorDocumentProjection, Sr as inheritEditorProjectionIndexes, Tc as getEditorCommitValue, Td as RootChange, Tu as registerEditorCommandDocument, Ud as rootNodesOf, Ul as holdsUniqueKey, Us as EditorSchemaValidationError, Wc as registerAuthoredRuntime, Wd as canonicalJsonKey, Wn as getCurrentSelection, Ws as adoptVerdicts, Xc as isDocumentViewReading, Xd as encodeNodes, Xs as isSplitOutput, Ya as nextMintedGeneration, Yd as closeToken, Yo as txStored, Ys as isLeftOutDefault, Zf as PointApi, Zl as resolveCompiledSchemaProperty, Zn as getEditorProjectionSnapshotIndex, Zo as admitDocument, Zs as readsAt, _f as getRecordsWithPrefix, _l as notifyObservers, _r as getTransactionSnapshot, _s as readEmptyText, _u as SelectionApi, aa as registerEditorFitsByLook, ac as ensureElementOwnedRootIndex, ad as filterDocumentChangeRoots, ao as subscribeCommittedPlacement, ap as copyRoot, bd as valueRootIndex, bf as hasRecordWithPrefix, bn as applyDocumentChange, bo as getViewPresentation, cc as rootsOwnedOnlyWithin, cd as getInternalDocumentChangeEntries, cf as NO_RECORD_OPS, cl as toInternalRoot, cp as lazyRootOf, dd as getInternalDocumentChangeRootKeys, df as deriveValue, dp as countCoreWork, ec as orphanedRoots, ef as nodeProps, fd as getInternalDocumentRootChange, ff as getRecordCount, fs as getRepresentationEditorFromApi, gf as getRecordText, gp as jsonEqual, hf as getRecordSetVersion, hi as subscribePresentationComposition, hl as subscribeEditorRefusals, ia as registerEditorDraftView, ic as advanceElementOwnedRootIndex, if as tokenLength$1, ip as copyFields, is as acceptsPropertyValue, ja as leftWithNoGridPart, jd as keptRunsOf, js as rawNodeAt, k as target, ka as gridPartsOf, kf as areEditorJsonValuesEqual, ku as getEditorSchema, l as definePlugin, ld as getInternalDocumentChangeRanges, lf as canonicalRecordJson, ll as toPublicRoot, lp as setLazyRoot, ls as generateElementPropertyValue, mf as getRecordIds, ml as publishEditorRefusal, mp as deepFreeze, ms as holdsOneText, na as registerEditorDocumentRecorder, nc as rootsDeletedByName, np as PathApi, ns as documentRootsOf, nu as tracksPlaces, oc as ownedRootsOf, op as copyRoots, os as canonicalizeCompiledTextProperties, pc as createEditorCommit, pf as getRecordEntries, pl as EditorRefusalError, qd as PreparedTokenSlice, qo as txOnly, qs as carriesDefault, ra as registerEditorDraftGuard, rc as schemaHasContentRoots, rf as textToken, rs as ElementGenerationMaskedError, ru as uniquePropertiesOf, sc as rebaseElementOwnedRootIndex, sf as getNodeKeyForNode, sp as isFrozenWithRoots, ss as createDetachedEditorSchema, tc as orphanedValueRoots, td as createInternalDocumentChange, tf as openToken, tu as toCompiledTargetContext, ud as getInternalDocumentChangeRecords, uf as composeRecordOps, ul as getRangeEndpointAssociations, up as visitRootNames, vf as getValueRecords, vo as getViewAuthor, vp as getDefined, vs as withoutGeneration, vu as ElementApi, wf as recordSetChanges, wl as getCompiledEditorSchema, wt as isEmpty, wu as registerEditorContent, xc as getEditorCommitSchemas, xd as valueRootNodes, yd as valueRoot, yf as hasRecord, yr as hasEditorProjectionSnapshotIndex, ys as withoutGenerationOf, z as prepareCommandFrame, zd as NO_NODES } from "../plugin-BvM4s-Lr.js";
|
|
2
|
+
import { t as authoredVeto } from "../authored-veto-Cu-5JdVj.js";
|
|
3
|
+
import { n as EditorMissingReferenceError, t as retractionOf } from "../retraction-lXQwo2Ia.js";
|
|
4
|
+
import { S as fingerprintEditorJson, c as COMPARISON_POLICY, n as comparisonPlanOf, t as closeOverRequired } from "../comparison-plan-BJxnVPcS.js";
|
|
5
5
|
//#region src/authored/ledger/roots.ts
|
|
6
6
|
/** @internal */
|
|
7
7
|
const rootOf = (value, root) => root === "main" ? rootIndexOf(value, "children") : rootIndexOf(value.roots ?? {}, root);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { mu as definePluginPoint } from "./plugin-BvM4s-Lr.js";
|
|
2
2
|
//#region src/core/authored-veto.ts
|
|
3
3
|
/** Contribute a reason Suggesting refuses a change that touches an element. */
|
|
4
4
|
const authoredVeto = definePluginPoint("authored.veto");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { $d as isTextNode, Qd as isElementNode, Qu as DocumentChange, Rd as DocumentIndex, Rf as snapshotEditorJsonValue, Td as RootChange, Wd as canonicalJsonKey, ef as nodeProps, gp as jsonEqual, hp as isRecord, lc as lawCheckEnabled, pp as cloneFrozen } from "./plugin-BvM4s-Lr.js";
|
|
2
2
|
//#region src/core/json-fingerprint.ts
|
|
3
3
|
/** Deterministic fingerprint for already validated JSON-compatible data. */
|
|
4
4
|
const fingerprintEditorJson = (value) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Km as DocumentChange, Of as Value, ol as EditorDocumentValue, po as EditorSchemaIdentity } from "./index-
|
|
1
|
+
import { Km as DocumentChange, Of as Value, ol as EditorDocumentValue, po as EditorSchemaIdentity } from "./index-QuqD4Dyj.js";
|
|
2
2
|
//#region src/diff/lib/comparison-types.d.ts
|
|
3
3
|
/** A comparison-local interval in the canonical document token coordinate. */
|
|
4
4
|
type ComparisonSpan = Readonly<{
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as first$1, $f as
|
|
1
|
+
import { $ as first$1, $f as getCommonLocationRoot, $o as documentAdmissionPoint, At as last$1, B as NodeApi, Bn as getChildren$1, Bo as createEditorUpdateApi, Bt as point, Ci as withEditorRootChildren, Cl as finalizePluginRegistry, Cr as initializeEditorSchemaDocument, Cs as assertSelectionSupported, Cu as isEditorContent, Dl as getPluginRegistry, Dr as invalidateEditorTransactionSpecs, El as getPluginContributions, Er as initializePublicState, Et as isInline, Eu as getEditorRuntime, Fa as node, Fr as readEditor, Gn as getCurrentSelectionRoot, Gr as repairEditorValue, Ic as createEditorAnchorApi, Io as subscribe, Jc as assertNoDocumentViewRead, Jf as RangeApi, Ji as getFragment, Jn as getEditorDocumentValue, Kn as getEditorChildrenRoot, Lo as subscribeCommit, Mt as levels$1, Na as nodes, Nr as loadOpenedRecords, On as createTransactionSpec, Ot as isStart$1, Pa as normalizeNodeMatch, Pc as authoredDocumentCapabilityPoint, Qf as MAIN_ROOT_KEY, Qo as admitEditorDocument, Ro as subscribeSource, Rs as constructLoadedDocumentChange, Rt as parent$1, Sl as createPluginRegistry, Sn as applyTransactionSpecToDocument, Ta as getWordDistances, Tr as initializeEditorSchemaSnapshot, Tt as isEnd$1, U as after, Uf as defineEffect, V as above$1, Vs as isEmptyElement, W as before, Wn as getCurrentSelection, Wt as range, Yf as LocationApi, Yr as saveEditorSchemaDocument, Zf as PointApi, Zo as admitDocument, Zr as seedUniqueMaps, _ as markEditorDormant, ar as getLiveSelection, bi as updateEditor, bl as setEditorLifecycleErrorSink, bt as isBlock$1, ca as range$1, cr as getNodeKey, cs as createEditorSchema, d as extendEditor, dn as voidEditor, dt as hasInlines$1, el as hasActiveAnchors, es as onlyDocumentAdmission, fi as snapshotInitialDocumentState, ha as elementReadOnly, hu as point$1, ir as getLiveNode, j as createCommandDispatch, jl as registerEffectTypeInRegistry, ju as setEditorRuntime, kl as initializeBasePluginRegistry, ks as mapSelectionThroughChange, kt as isVoid, ku as getEditorSchema, lt as getSnapshot, mr as getSnapshot$1, np as PathApi, or as getLiveText, pu as failInvariant, rr as getLastCommit, s as createEditorViewPluginApis, tt as getChildren, u as destroyEditor, ur as getPathByNodeKey, v as prepareInitialPluginPublication, va as before$1, vp as getDefined, wa as getCharacterDistance, wi as withEditorRootChildrenGenerator, wl as getCompiledEditorSchema, wr as initializeEditorSchemaSelection, wt as isEmpty$1, xa as resolveShouldMergeNodesRemovePrevNode, xl as assertPluginPublicationInactive, y as prepareScopedPluginPublication, ya as after$1, yi as transformEditorSnapshotInput, zn as getChildList, zo as createEditorReadApi, zt as path$1 } from "./plugin-BvM4s-Lr.js";
|
|
2
2
|
/**
|
|
3
3
|
* Local, ephemeral screen-reader text emitted by an application command.
|
|
4
4
|
*
|
package/dist/diff/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Of as Value, mu as EditorStateSchemaApi } from "../index-
|
|
2
|
-
import { a as ComparisonConflictAlternative, c as ComparisonEffect, d as ComparisonResolutionResult, f as ComparisonSnapshot, h as TwoWayComparison, i as ComparisonConflict, l as ComparisonEvidence, m as ThreeWayComparison, n as Comparison, o as ComparisonCorrespondence, p as ComparisonSpan, r as ComparisonBranch, s as ComparisonDiagnostic, t as ComparedChange, u as ComparisonResolution } from "../comparison-types-
|
|
1
|
+
import { Of as Value, mu as EditorStateSchemaApi } from "../index-QuqD4Dyj.js";
|
|
2
|
+
import { a as ComparisonConflictAlternative, c as ComparisonEffect, d as ComparisonResolutionResult, f as ComparisonSnapshot, h as TwoWayComparison, i as ComparisonConflict, l as ComparisonEvidence, m as ThreeWayComparison, n as Comparison, o as ComparisonCorrespondence, p as ComparisonSpan, r as ComparisonBranch, s as ComparisonDiagnostic, t as ComparedChange, u as ComparisonResolution } from "../comparison-types-Bvvxzxq2.js";
|
|
3
3
|
//#region src/diff/lib/compare.d.ts
|
|
4
4
|
type TwoWayInput<V extends Value> = Readonly<{
|
|
5
5
|
after: unknown;
|
package/dist/diff/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { _ as mergeGroups, a as comparisonTextRuns, b as uniqueSpans$1, c as COMPARISON_POLICY, d as comparisonDocumentsEqual, f as comparisonHash, g as disjointSets, h as detachComparisonEnvelope, i as comparisonTextPoint, l as COMPARISON_WORD, m as detachComparisonDocument, n as comparisonPlanOf, o as comparisonTextSpans, p as createComparisonSnapshot, r as planComparison, s as createComparisonIndex, t as closeOverRequired, u as assertComparisonActive, v as spanKey, x as yieldComparisonWork, y as stableStringify } from "../comparison-plan-
|
|
1
|
+
import { Qu as DocumentChange, gp as jsonEqual } from "../plugin-BvM4s-Lr.js";
|
|
2
|
+
import { _ as mergeGroups, a as comparisonTextRuns, b as uniqueSpans$1, c as COMPARISON_POLICY, d as comparisonDocumentsEqual, f as comparisonHash, g as disjointSets, h as detachComparisonEnvelope, i as comparisonTextPoint, l as COMPARISON_WORD, m as detachComparisonDocument, n as comparisonPlanOf, o as comparisonTextSpans, p as createComparisonSnapshot, r as planComparison, s as createComparisonIndex, t as closeOverRequired, u as assertComparisonActive, v as spanKey, x as yieldComparisonWork, y as stableStringify } from "../comparison-plan-BJxnVPcS.js";
|
|
3
3
|
import { DiffMatchPatch, DiffOp } from "diff-match-patch-ts";
|
|
4
4
|
//#region src/diff/lib/comparison-matcher.ts
|
|
5
5
|
const CANDIDATES_PER_NODE = 24;
|
package/dist/dom/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as ClipboardSliceWrite, $t as isAfter, A as DataTransferFormat, At as DOMCoverageMaterializeHandler, B as DOMApi, Bt as DOMElement, C as getEditorDOMRoot, Ct as DOMDropTargetOptions, D as DataTransferDecodeContext, Dt as DOMCoverageBoundaryEdge, E as usesAppleDOMHotkeys, Et as DOMCoverageBoundaryAnchor, F as writeDataTransferFragment, Ft as DOMCoveragePointResult, G as DOMEditorClipboardCapability, Gt as DOMStaticRange, H as DOMClipboardInsertDataHandler, Ht as DOMPoint, I as DOMEditorOptions, It as DOMCoverageReason, J as DOMVisualPointOptions, Jt as containsShadowAware, K as DOMResolutionError, Kt as DOMText, L as DOMPlugin, Lt as DOMCoverageRuntimeRange, M as DataTransferSchemaClaim, Mt as DOMCoverageMaterializeReason, N as DataTransferSnapshot, Nt as DOMCoverageMaterializeResult, O as DataTransferDiagnostic, Ot as DOMCoverageBoundaryState, P as dataTransferFormats, Pt as DOMCoveragePathRange, Q as ClipboardSliceRead, Qt as hasShadowRoot, R as DOMPluginTypes, Rt as DOMCoverageSelectionPolicy, S as TRIPLE_CLICK, St as DOMDropTargetInput, T as isGeckoDOMHost, Tt as DOMCoverageBoundary, U as DOMDragApi, Ut as DOMRange, V as DOMClipboardApi, Vt as DOMNode, W as DOMEditor, Wt as DOMSelection, X as ScrollIntoViewTarget, Xt as getDefaultView, Y as ScrollIntoViewOptions, Yt as getActiveElement, Z as isTrackedMutation, Zt as getSelection, _ as HotkeySpec, _t as DOMGeometryRect, a as isLeaf, an as isPlainTextOnlyPaste, at as writeDOMFragmentData, b as createCompiledHotkeyMatcher, bt as DOMDropEdge, c as isText, ct as StringDiff, d as DOMSelectionPoints, dt as mergeStringDiffs, en as isBefore, et as DOMFragmentDataHtml, f as readDOMSelectionRange, ft as normalizePoint, g as HotkeyPlatform, gt as verifyDiffState, h as HotkeyMatchOptions, ht as targetRange, i as isElement, in as isDOMText, it as getDOMClipboardFormatKey, j as DataTransferFormatPhase, jt as DOMCoverageMaterializeRangeRole, k as DataTransferEncodeContext, kt as DOMCoverageCopyPolicy, l as isVoid, lt as TextDiff, m as Hotkeys, mt as normalizeStringDiff, n as getNodeDataAttributeKeys, nn as isDOMNode, nt as cleanDOMClipboardContents, o as isNode, on as normalizeDOMPoint, ot as writeDOMRangeData, p as writeDOMSelection, pt as normalizeRange, q as DOMVisualPoint, qt as closestShadowAware, r as isEditor, rn as isDOMSelection, rt as domCommands, s as isString, st as Key, t as getElements, tn as isDOMElement, tt as DOMFragmentDataPayload, u as keyToDataAttribute, ut as applyStringDiff, v as KeyboardEventLike, vt as DropIndicator, w as CAN_USE_DOM, wt as DOMCoverage, x as isHotkey, xt as DOMDropTarget, y as ariaKeyShortcuts, yt as DOMDragStart, z as dom, zt as DOMCoverageSession } from "../index-
|
|
1
|
+
import { $ as ClipboardSliceWrite, $t as isAfter, A as DataTransferFormat, At as DOMCoverageMaterializeHandler, B as DOMApi, Bt as DOMElement, C as getEditorDOMRoot, Ct as DOMDropTargetOptions, D as DataTransferDecodeContext, Dt as DOMCoverageBoundaryEdge, E as usesAppleDOMHotkeys, Et as DOMCoverageBoundaryAnchor, F as writeDataTransferFragment, Ft as DOMCoveragePointResult, G as DOMEditorClipboardCapability, Gt as DOMStaticRange, H as DOMClipboardInsertDataHandler, Ht as DOMPoint, I as DOMEditorOptions, It as DOMCoverageReason, J as DOMVisualPointOptions, Jt as containsShadowAware, K as DOMResolutionError, Kt as DOMText, L as DOMPlugin, Lt as DOMCoverageRuntimeRange, M as DataTransferSchemaClaim, Mt as DOMCoverageMaterializeReason, N as DataTransferSnapshot, Nt as DOMCoverageMaterializeResult, O as DataTransferDiagnostic, Ot as DOMCoverageBoundaryState, P as dataTransferFormats, Pt as DOMCoveragePathRange, Q as ClipboardSliceRead, Qt as hasShadowRoot, R as DOMPluginTypes, Rt as DOMCoverageSelectionPolicy, S as TRIPLE_CLICK, St as DOMDropTargetInput, T as isGeckoDOMHost, Tt as DOMCoverageBoundary, U as DOMDragApi, Ut as DOMRange, V as DOMClipboardApi, Vt as DOMNode, W as DOMEditor, Wt as DOMSelection, X as ScrollIntoViewTarget, Xt as getDefaultView, Y as ScrollIntoViewOptions, Yt as getActiveElement, Z as isTrackedMutation, Zt as getSelection, _ as HotkeySpec, _t as DOMGeometryRect, a as isLeaf, an as isPlainTextOnlyPaste, at as writeDOMFragmentData, b as createCompiledHotkeyMatcher, bt as DOMDropEdge, c as isText, ct as StringDiff, d as DOMSelectionPoints, dt as mergeStringDiffs, en as isBefore, et as DOMFragmentDataHtml, f as readDOMSelectionRange, ft as normalizePoint, g as HotkeyPlatform, gt as verifyDiffState, h as HotkeyMatchOptions, ht as targetRange, i as isElement, in as isDOMText, it as getDOMClipboardFormatKey, j as DataTransferFormatPhase, jt as DOMCoverageMaterializeRangeRole, k as DataTransferEncodeContext, kt as DOMCoverageCopyPolicy, l as isVoid, lt as TextDiff, m as Hotkeys, mt as normalizeStringDiff, n as getNodeDataAttributeKeys, nn as isDOMNode, nt as cleanDOMClipboardContents, o as isNode, on as normalizeDOMPoint, ot as writeDOMRangeData, p as writeDOMSelection, pt as normalizeRange, q as DOMVisualPoint, qt as closestShadowAware, r as isEditor, rn as isDOMSelection, rt as domCommands, s as isString, st as Key, t as getElements, tn as isDOMElement, tt as DOMFragmentDataPayload, u as keyToDataAttribute, ut as applyStringDiff, v as KeyboardEventLike, vt as DropIndicator, w as CAN_USE_DOM, wt as DOMCoverage, x as isHotkey, xt as DOMDropTarget, y as ariaKeyShortcuts, yt as DOMDragStart, z as dom, zt as DOMCoverageSession } from "../index-DaXz-4c7.js";
|
|
2
2
|
export { CAN_USE_DOM, type ClipboardSliceRead, type ClipboardSliceWrite, type DOMApi, type DOMClipboardApi, type DOMClipboardInsertDataHandler, DOMCoverage, type DOMCoverageBoundary, type DOMCoverageBoundaryAnchor, type DOMCoverageBoundaryEdge, type DOMCoverageBoundaryState, type DOMCoverageCopyPolicy, type DOMCoverageMaterializeHandler, type DOMCoverageMaterializeRangeRole, type DOMCoverageMaterializeReason, type DOMCoverageMaterializeResult, type DOMCoveragePathRange, type DOMCoveragePointResult, type DOMCoverageReason, type DOMCoverageRuntimeRange, type DOMCoverageSelectionPolicy, type DOMCoverageSession, type DOMDragApi, type DOMDragStart, type DOMDropEdge, type DOMDropTarget, type DOMDropTargetInput, type DOMDropTargetOptions, DOMEditor, type DOMEditorClipboardCapability, type DOMEditorOptions, type DOMElement, type DOMFragmentDataHtml, type DOMFragmentDataPayload, type DOMGeometryRect, type DOMNode, type DOMPlugin, type DOMPluginTypes, type DOMPoint, type DOMRange, DOMResolutionError, type DOMSelection, type DOMSelectionPoints, type DOMStaticRange, type DOMText, type DOMVisualPoint, type DOMVisualPointOptions, type DataTransferDecodeContext, type DataTransferDiagnostic, type DataTransferEncodeContext, type DataTransferFormat, type DataTransferFormatPhase, type DataTransferSchemaClaim, type DataTransferSnapshot, type DropIndicator, type HotkeyMatchOptions, type HotkeyPlatform, type HotkeySpec, Hotkeys, Key, type KeyboardEventLike, type ScrollIntoViewOptions, type ScrollIntoViewTarget, type StringDiff, TRIPLE_CLICK, type TextDiff, applyStringDiff, ariaKeyShortcuts, cleanDOMClipboardContents, closestShadowAware, containsShadowAware, createCompiledHotkeyMatcher, dataTransferFormats, dom, domCommands, getActiveElement, getDOMClipboardFormatKey, getDefaultView, getEditorDOMRoot, getElements, getNodeDataAttributeKeys, getSelection, hasShadowRoot, isAfter, isBefore, isDOMElement, isDOMNode, isDOMSelection, isDOMText, isEditor, isElement, isGeckoDOMHost, isHotkey, isLeaf, isNode, isPlainTextOnlyPaste, isString, isText, isTrackedMutation, isVoid, keyToDataAttribute, mergeStringDiffs, normalizeDOMPoint, normalizePoint, normalizeRange, normalizeStringDiff, readDOMSelectionRange, targetRange, usesAppleDOMHotkeys, verifyDiffState, writeDOMFragmentData, writeDOMRangeData, writeDOMSelection, writeDataTransferFragment };
|
package/dist/dom/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as normalizeRange,
|
|
1
|
+
import { Ar as isDOMSelection, C as normalizeRange, Ct as writeDOMFragmentData, D as DOMEditor, Dr as isBefore, Dt as writeDataTransferFragment, E as verifyDiffState, Er as isAfter, I as isTrackedMutation, Kt as getEditorDOMRoot, Mr as isPlainTextOnlyPaste, O as DOMResolutionError, Or as isDOMElement, Ot as Key, Pr as normalizeDOMPoint, S as normalizePoint, Sr as getDefaultView, T as targetRange, Tr as hasShadowRoot, Tt as dataTransferFormats, _ as TRIPLE_CLICK, a as isLeaf, an as readDOMSelectionRange, br as containsShadowAware, bt as domCommands, c as isText, d as Hotkeys, g as isHotkey, h as createCompiledHotkeyMatcher, i as isElement, jr as isDOMText, kr as isDOMNode, l as isVoid, m as ariaKeyShortcuts, n as getNodeDataAttributeKeys, o as isNode, pn as CAN_USE_DOM, qn as DOMCoverage, r as isEditor, s as isString, t as getElements, u as keyToDataAttribute, un as writeDOMSelection, v as dom, vn as isGeckoDOMHost, w as normalizeStringDiff, wr as getSelection, wt as writeDOMRangeData, x as mergeStringDiffs, xn as usesAppleDOMHotkeys, xr as getActiveElement, xt as getDOMClipboardFormatKey, y as applyStringDiff, yr as closestShadowAware, yt as cleanDOMClipboardContents } from "../dom-BjspML2h.js";
|
|
2
2
|
export { CAN_USE_DOM, DOMCoverage, DOMEditor, DOMResolutionError, Hotkeys, Key, TRIPLE_CLICK, applyStringDiff, ariaKeyShortcuts, cleanDOMClipboardContents, closestShadowAware, containsShadowAware, createCompiledHotkeyMatcher, dataTransferFormats, dom, domCommands, getActiveElement, getDOMClipboardFormatKey, getDefaultView, getEditorDOMRoot, getElements, getNodeDataAttributeKeys, getSelection, hasShadowRoot, isAfter, isBefore, isDOMElement, isDOMNode, isDOMSelection, isDOMText, isEditor, isElement, isGeckoDOMHost, isHotkey, isLeaf, isNode, isPlainTextOnlyPaste, isString, isText, isTrackedMutation, isVoid, keyToDataAttribute, mergeStringDiffs, normalizeDOMPoint, normalizePoint, normalizeRange, normalizeStringDiff, readDOMSelectionRange, targetRange, usesAppleDOMHotkeys, verifyDiffState, writeDOMFragmentData, writeDOMRangeData, writeDOMSelection, writeDataTransferFragment };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $
|
|
2
|
-
import { a as transferEntries, n as checkFilesLanding, r as checkTransfer } from "./src-
|
|
1
|
+
import { $a as resolveParkedCaret, Ai as captureSliceLanding, Au as hasEditorRuntime, B as NodeApi, Bt as point, Da as isTextCell, Di as withUpdateTagContext, Dl as getPluginRegistry, Du as getEditorRuntimeOwner, El as getPluginContributions, En as attachTransactionSpecAfterCommit, Es as getSelectionDOMRange, Et as isInline, Eu as getEditorRuntime, F as getActiveCommandEditor, Ha as getPlacementGeneration, Jf as RangeApi, Ko as txLocate, Lt as next, M as dispatchCommand, Mu as defineCommand, N as evaluateCommand, Na as nodes, Ou as getEditorRuntimeRoot, P as evaluateCommandWithState, Pn as getActiveEditorTransaction, Qn as getEditorReadDepth, Rd as DocumentIndex, Rn as getBaseCallRoot, Sc as getEditorCommitSnapshot, Su as TextApi, Tc as getEditorCommitValue, U as after, Us as EditorSchemaValidationError, V as above, Va as getCaretOwner, W as before, Wa as holdsCaret, Wt as range, Xa as placedSince, Yf as LocationApi, Zf as PointApi, _d as mapInternalDocumentChangePosition, _i as toEditorCoreStateView, _n as afterActiveTransactionEnds, _u as SelectionApi, at as getNodeKey, bt as isBlock, cl as toInternalRoot, ct as getSelection$1, dc as createDetachedContentSlice, dn as voidEditor, dp as countCoreWork, ds as getInternalEditorSchemaFromApi, fa as readRemovalLanding, ft as hasPath, gd as mapInternalDocumentChangePoint, go as getOwnViewPresentation, ks as mapSelectionThroughChange, kt as isVoid$2, ku as getEditorSchema, l as definePlugin, la as withLandingBlock, ll as toPublicRoot, lr as getNodeTargetRoot, lt as getSnapshot, m as getInstalledPlugin, mu as definePluginPoint, np as PathApi, ot as getPathByNodeKey, pd as hasInternalDocumentChangeRoot, pi as subscribeCaretTarget, pn as editorCommands, pr as getSetSite, pu as failInvariant, qr as resolveEditorNodeKeyForNode, ri as setEditorFocused, ro as setSelectionAsView, sf as getNodeKeyForNode, sl as getPublicExplicitLocationRoot, sn as unhangRange, tr as getEditorStateView, tt as getChildren, uc as ContentSlice, us as getCompiledEditorSchemaFromApi, vl as reportEditorLifecycleError, vp as getDefined, vu as ElementApi, wl as getCompiledEditorSchema, xn as applyTransactionSpec, yd as valueRoot, yo as getViewFollowTarget, yu as formatDebugValue, zl as getCompiledSchemaPropertyId } from "./plugin-BvM4s-Lr.js";
|
|
2
|
+
import { a as transferEntries, n as checkFilesLanding, r as checkTransfer } from "./src-BA6F9yxN.js";
|
|
3
3
|
import scrollIntoViewIfNeeded from "scroll-into-view-if-needed";
|
|
4
4
|
//#region src/dom/utils/dom.ts
|
|
5
5
|
globalThis.Node;
|
|
@@ -200,6 +200,10 @@ const getFlatTreeParentElement = (element) => {
|
|
|
200
200
|
const ShadowRootConstructor = element.ownerDocument.defaultView?.ShadowRoot;
|
|
201
201
|
return ShadowRootConstructor && root instanceof ShadowRootConstructor ? root.host : null;
|
|
202
202
|
};
|
|
203
|
+
const pageOf = (document) => {
|
|
204
|
+
const frame = document.defaultView?.frameElement;
|
|
205
|
+
return frame ? pageOf(frame.ownerDocument) : document;
|
|
206
|
+
};
|
|
203
207
|
/**
|
|
204
208
|
* Retrieves the deepest active element in the DOM, considering nested shadow DOMs.
|
|
205
209
|
*/
|
|
@@ -3893,6 +3897,28 @@ const registerTreesAbove = (element) => {
|
|
|
3893
3897
|
}
|
|
3894
3898
|
};
|
|
3895
3899
|
const shadowRootOf = (host) => host.shadowRoot ?? SHADOW_ROOT_BY_HOST.get(host);
|
|
3900
|
+
/**
|
|
3901
|
+
* Whether the element itself holds focus. It walks up from the element, so a
|
|
3902
|
+
* closed shadow root nobody registered counts, and a host whose own shadow
|
|
3903
|
+
* tree holds focus does not.
|
|
3904
|
+
*/
|
|
3905
|
+
const isElementFocused = (element) => {
|
|
3906
|
+
const frameDocument = "contentDocument" in element ? element.contentDocument : null;
|
|
3907
|
+
const inner = shadowRootOf(element) ?? frameDocument;
|
|
3908
|
+
if (inner?.activeElement && inner.activeElement !== frameDocument?.body) return false;
|
|
3909
|
+
let node = element;
|
|
3910
|
+
for (;;) {
|
|
3911
|
+
const tree = node.getRootNode();
|
|
3912
|
+
if (tree.activeElement !== node) return false;
|
|
3913
|
+
if ("host" in tree) {
|
|
3914
|
+
node = tree.host;
|
|
3915
|
+
continue;
|
|
3916
|
+
}
|
|
3917
|
+
const frame = tree.defaultView?.frameElement;
|
|
3918
|
+
if (!frame) return true;
|
|
3919
|
+
node = frame;
|
|
3920
|
+
}
|
|
3921
|
+
};
|
|
3896
3922
|
const resolveInnermostElementAtPoint = (document, x, y) => {
|
|
3897
3923
|
let element = document.elementFromPoint(x, y);
|
|
3898
3924
|
for (let inner = element && shadowRootOf(element)?.elementFromPoint(x, y); inner && inner !== element; inner = shadowRootOf(element)?.elementFromPoint(x, y)) element = inner;
|
|
@@ -3907,6 +3933,7 @@ const focusedElementOf = (top) => {
|
|
|
3907
3933
|
}
|
|
3908
3934
|
return null;
|
|
3909
3935
|
};
|
|
3936
|
+
const focusedElementOnPage = (node) => focusedElementOf(pageOf(node.ownerDocument ?? node));
|
|
3910
3937
|
const outerElementOf = (element) => {
|
|
3911
3938
|
if (element.parentElement) return element.parentElement;
|
|
3912
3939
|
const parent = element.parentNode;
|
|
@@ -7212,7 +7239,7 @@ const resolveNextKeyCaret = (view, editable) => {
|
|
|
7212
7239
|
};
|
|
7213
7240
|
const ensureFocusCaret = (view, editable) => {
|
|
7214
7241
|
const caret = resolveNextKeyCaret(view, editable);
|
|
7215
|
-
if (!caret) {
|
|
7242
|
+
if (!caret && getEditorReadDepth(getEditorRuntimeOwner(view)) === 0) {
|
|
7216
7243
|
const start = view.read.points.start([]);
|
|
7217
7244
|
if (start) setSelectionAsView(view, start);
|
|
7218
7245
|
}
|
|
@@ -7222,19 +7249,26 @@ const ensureFocusCaret = (view, editable) => {
|
|
|
7222
7249
|
//#region src/dom/plugin/dom-editor.ts
|
|
7223
7250
|
const EDITOR_TO_CANCEL_FOCUS_RETRY = /* @__PURE__ */ new WeakMap();
|
|
7224
7251
|
const EDITOR_TO_FOCUS_REQUEST_GENERATION = /* @__PURE__ */ new WeakMap();
|
|
7225
|
-
const
|
|
7252
|
+
const PAGE_TO_FOCUS_REQUEST_OWNER = /* @__PURE__ */ new WeakMap();
|
|
7226
7253
|
const supersedeFocusRequest = (editor) => {
|
|
7227
7254
|
EDITOR_TO_FOCUS_REQUEST_GENERATION.set(editor, (EDITOR_TO_FOCUS_REQUEST_GENERATION.get(editor) ?? 0) + 1);
|
|
7228
7255
|
EDITOR_TO_CANCEL_FOCUS_RETRY.get(editor)?.();
|
|
7229
7256
|
EDITOR_TO_CANCEL_FOCUS_RETRY.delete(editor);
|
|
7230
7257
|
};
|
|
7231
|
-
const
|
|
7232
|
-
const
|
|
7258
|
+
const readFocusRequest = (node) => node && PAGE_TO_FOCUS_REQUEST_OWNER.get(pageOf(node.ownerDocument ?? node));
|
|
7259
|
+
const watchFocusSuperseded = (editor, node) => {
|
|
7260
|
+
const page = node ?? resolveLastEditorWindow(editor)?.document;
|
|
7261
|
+
const generation = EDITOR_TO_FOCUS_REQUEST_GENERATION.get(editor);
|
|
7262
|
+
const owner = readFocusRequest(page);
|
|
7263
|
+
return () => EDITOR_TO_FOCUS_REQUEST_GENERATION.get(editor) !== generation || readFocusRequest(page) !== owner;
|
|
7264
|
+
};
|
|
7265
|
+
const isFocusRequestedElsewhere = (editor, node) => {
|
|
7266
|
+
const holder = readFocusRequest(node)?.editor.deref();
|
|
7267
|
+
return !!holder && holder !== editor && holder !== reachView(editor);
|
|
7268
|
+
};
|
|
7269
|
+
const claimFocusRequest = (editor, element) => {
|
|
7233
7270
|
supersedeFocusRequest(editor);
|
|
7234
|
-
|
|
7235
|
-
editor,
|
|
7236
|
-
generation: EDITOR_TO_FOCUS_REQUEST_GENERATION.get(editor) ?? 0
|
|
7237
|
-
});
|
|
7271
|
+
PAGE_TO_FOCUS_REQUEST_OWNER.set(pageOf(element.ownerDocument), { editor: new WeakRef(editor) });
|
|
7238
7272
|
};
|
|
7239
7273
|
const getLastChildren = (element) => {
|
|
7240
7274
|
if (element.childElementCount > 0) return getLastChildren(element.children[0]);
|
|
@@ -7581,8 +7615,9 @@ const DOMEditorImpl = {
|
|
|
7581
7615
|
const el = DOMEditor.editable(editor);
|
|
7582
7616
|
const root = DOMEditor.resolveDocumentOrShadowRoot(editor);
|
|
7583
7617
|
if (!el || !root) return;
|
|
7584
|
-
|
|
7585
|
-
if (
|
|
7618
|
+
const focusElement = findDOMRootRuntime(el)?.nodeSelectionFocus();
|
|
7619
|
+
if (focusElement && isElementFocused(focusElement)) focusElement.blur();
|
|
7620
|
+
else if (isElementFocused(el)) el.blur();
|
|
7586
7621
|
},
|
|
7587
7622
|
deselect: (editor) => {
|
|
7588
7623
|
const selection = editor.read((state) => state.selection());
|
|
@@ -7667,25 +7702,25 @@ const DOMEditorImpl = {
|
|
|
7667
7702
|
},
|
|
7668
7703
|
resolvePath: (editor, node) => resolvePliteNodePath(editor, node),
|
|
7669
7704
|
focus: (editor, options = {}) => {
|
|
7670
|
-
const retries =
|
|
7671
|
-
|
|
7672
|
-
EDITOR_TO_FOCUS_REQUEST_GENERATION.set(editor, focusRequestGeneration);
|
|
7705
|
+
const retries = options.retries ?? 50;
|
|
7706
|
+
supersedeFocusRequest(editor);
|
|
7673
7707
|
const el = DOMEditor.editable(editor);
|
|
7674
7708
|
const root = DOMEditor.resolveDocumentOrShadowRoot(editor);
|
|
7675
7709
|
if (!el || !root) return;
|
|
7676
|
-
const focusRequestOwner = {
|
|
7677
|
-
editor,
|
|
7678
|
-
generation: focusRequestGeneration
|
|
7679
|
-
};
|
|
7680
|
-
ROOT_TO_FOCUS_REQUEST_OWNER.set(root, focusRequestOwner);
|
|
7681
7710
|
if (retries <= 0) return;
|
|
7711
|
+
PAGE_TO_FOCUS_REQUEST_OWNER.set(pageOf(el.ownerDocument), { editor: new WeakRef(editor) });
|
|
7712
|
+
const superseded = watchFocusSuperseded(editor, el);
|
|
7713
|
+
const markAndFocus = () => {
|
|
7714
|
+
IS_FOCUSED.set(editor, true);
|
|
7715
|
+
setEditorFocused(editor, true);
|
|
7716
|
+
el.focus({ preventScroll: true });
|
|
7717
|
+
};
|
|
7682
7718
|
if (IS_NODE_MAP_DIRTY.get(editor)) {
|
|
7683
|
-
EDITOR_TO_CANCEL_FOCUS_RETRY.get(editor)?.();
|
|
7684
7719
|
let cancel = () => {};
|
|
7685
7720
|
const generation = getPlacementGeneration(editor);
|
|
7686
7721
|
cancel = scheduleEditorDOMPhase(editor, "dom-write", "dom-editor-focus-retry", () => {
|
|
7687
7722
|
if (EDITOR_TO_CANCEL_FOCUS_RETRY.get(editor) === cancel) EDITOR_TO_CANCEL_FOCUS_RETRY.delete(editor);
|
|
7688
|
-
if (
|
|
7723
|
+
if (superseded() || placedSince(editor, generation)) return;
|
|
7689
7724
|
DOMEditor.focus(editor, { retries: retries - 1 });
|
|
7690
7725
|
}, {
|
|
7691
7726
|
delay: 10,
|
|
@@ -7695,9 +7730,9 @@ const DOMEditorImpl = {
|
|
|
7695
7730
|
EDITOR_TO_CANCEL_FOCUS_RETRY.set(editor, cancel);
|
|
7696
7731
|
return;
|
|
7697
7732
|
}
|
|
7698
|
-
|
|
7699
|
-
EDITOR_TO_CANCEL_FOCUS_RETRY.delete(editor);
|
|
7733
|
+
if (findDOMRootRuntime(el)?.focusSelection(el)) return;
|
|
7700
7734
|
const selection = ensureFocusCaret(editor, el);
|
|
7735
|
+
if (superseded()) return;
|
|
7701
7736
|
const selectionAtFocus = selection ? getSelectionDOMRange(editor, selection) : null;
|
|
7702
7737
|
const syncDomSelection = () => {
|
|
7703
7738
|
if (findDOMRootRuntime(el)?.isSelectionHeld()) return;
|
|
@@ -7726,7 +7761,7 @@ const DOMEditorImpl = {
|
|
|
7726
7761
|
};
|
|
7727
7762
|
let ownedActiveElement = root.activeElement === el || root.activeElement && containsShadowAware(el, root.activeElement) ? root.activeElement : null;
|
|
7728
7763
|
const settleFocus = () => {
|
|
7729
|
-
if (
|
|
7764
|
+
if (superseded()) return;
|
|
7730
7765
|
if (DOMEditor.editable(editor) !== el || !el.isConnected || el.getRootNode() !== root) return;
|
|
7731
7766
|
const rootActiveElement = root.activeElement;
|
|
7732
7767
|
const shadowHost = "host" in root ? root.host : null;
|
|
@@ -7740,9 +7775,8 @@ const DOMEditorImpl = {
|
|
|
7740
7775
|
return;
|
|
7741
7776
|
}
|
|
7742
7777
|
if (!(activeElement === null || activeElement === el.ownerDocument.body || rootActiveElement === null && activeElement === shadowHost || activeElement === ownedActiveElement && !activeElement.isConnected)) return;
|
|
7743
|
-
|
|
7744
|
-
|
|
7745
|
-
el.focus({ preventScroll: true });
|
|
7778
|
+
markAndFocus();
|
|
7779
|
+
if (superseded()) return;
|
|
7746
7780
|
trySyncDomSelection();
|
|
7747
7781
|
};
|
|
7748
7782
|
const scheduleFocusSettle = () => {
|
|
@@ -7761,14 +7795,16 @@ const DOMEditorImpl = {
|
|
|
7761
7795
|
});
|
|
7762
7796
|
};
|
|
7763
7797
|
if (root.activeElement !== el) {
|
|
7764
|
-
IS_FOCUSED.set(editor, true);
|
|
7765
|
-
setEditorFocused(editor, true);
|
|
7766
7798
|
const { activeElement } = root;
|
|
7767
|
-
if (isDOMElement(activeElement) && containsShadowAware(el, activeElement) && "blur" in activeElement && typeof activeElement.blur === "function")
|
|
7768
|
-
|
|
7799
|
+
if (isDOMElement(activeElement) && containsShadowAware(el, activeElement) && "blur" in activeElement && typeof activeElement.blur === "function") {
|
|
7800
|
+
activeElement.blur();
|
|
7801
|
+
if (superseded()) return;
|
|
7802
|
+
}
|
|
7803
|
+
markAndFocus();
|
|
7804
|
+
if (superseded()) return;
|
|
7769
7805
|
trySyncDomSelection();
|
|
7770
7806
|
if (selectionAtFocus) scheduleEditorDOMPhase(editor, "selection-repair", "dom-editor-focus-selection-sync", () => {
|
|
7771
|
-
if (
|
|
7807
|
+
if (superseded() || !isElementFocused(el)) return;
|
|
7772
7808
|
const currentSelection = getSelectionDOMRange(editor, resolveNextKeyCaret(editor, el));
|
|
7773
7809
|
if (!currentSelection || !RangeApi.equals(currentSelection, selectionAtFocus)) return;
|
|
7774
7810
|
trySyncDomSelection();
|
|
@@ -8418,12 +8454,7 @@ const createDOMEditorCapability = (editor) => {
|
|
|
8418
8454
|
};
|
|
8419
8455
|
const capability = {
|
|
8420
8456
|
blur: () => {
|
|
8421
|
-
|
|
8422
|
-
const el = DOMEditorImpl.editable(view);
|
|
8423
|
-
const focusElement = el && findDOMRootRuntime(el)?.nodeSelectionFocus();
|
|
8424
|
-
const held = !!focusElement && focusElement.getRootNode().activeElement === focusElement;
|
|
8425
|
-
DOMEditorImpl.blur(view);
|
|
8426
|
-
if (held) focusElement.blur();
|
|
8457
|
+
DOMEditor.blur(editor);
|
|
8427
8458
|
},
|
|
8428
8459
|
deselect: () => {
|
|
8429
8460
|
DOMEditor.deselect(editor);
|
|
@@ -8435,12 +8466,6 @@ const createDOMEditorCapability = (editor) => {
|
|
|
8435
8466
|
findKey: (node) => DOMEditor.findKey(editor, node),
|
|
8436
8467
|
assertPath: (node) => DOMEditor.assertPath(editor, node),
|
|
8437
8468
|
focus: (options) => {
|
|
8438
|
-
const view = reachView(editor);
|
|
8439
|
-
const el = DOMEditorImpl.editable(view);
|
|
8440
|
-
if (focusRetries(options) > 0 && el) {
|
|
8441
|
-
claimFocusRequest(view, el.getRootNode());
|
|
8442
|
-
if (findDOMRootRuntime(el)?.focusSelection(el)) return;
|
|
8443
|
-
}
|
|
8444
8469
|
DOMEditor.focus(editor, options);
|
|
8445
8470
|
},
|
|
8446
8471
|
getWindow: () => DOMEditor.getWindow(editor),
|
|
@@ -9217,4 +9242,4 @@ const keyToDataAttribute = (key) => `data-editor-${toKebabCase(key)}`;
|
|
|
9217
9242
|
/** Return DOM data attribute names that mirror primitive node properties. */
|
|
9218
9243
|
const getNodeDataAttributeKeys = (node) => Object.keys(node).filter((key) => typeof node[key] !== "object" && (!TextApi.isText(node) || key !== "text")).map((key) => keyToDataAttribute(key));
|
|
9219
9244
|
//#endregion
|
|
9220
|
-
export {
|
|
9245
|
+
export { getDragAutoScrollTarget as $, EDITOR_TO_PENDING_DIFFS as $n, scheduleEditorDOMPhase as $t, createDOMEditorCapability as A, getPliteStringPlacementAtX as An, isDOMSelection as Ar, SOFT_LINE_END_SELECTOR as At, setEditableRootReveal as B, resolveDOMTextFlowEntry as Bn, findMountedDOMNodeByPath as Bt, normalizeRange as C, getNearestPliteStringRect as Cn, getFlatTreeParentElement as Cr, writeDOMFragmentData as Ct, DOMEditor as D, getPliteStringDocumentOffset as Dn, isBefore as Dr, writeDataTransferFragment as Dt, verifyDiffState as E, getPliteStringDirectPlacement as En, isAfter as Er, observeDataTransferInsertion as Et, isSelectableDOMSelection as F, getUsableRangeRects as Fn, noteAfterInsertCaret as Ft, supersedeFocusRequest as G, setDOMTextFlowRecordIndex as Gn, focusedElementOnPage as Gt, setEditorDOMRootElement as H, resolveDOMTextFlowOffset as Hn, DOMRootRuntime as Ht, isTrackedMutation as I, hasUsableDOMRect as In, readAfterInsertCaret as It, ensureFocusCaret as J, isCollapsedDOMCoverageBoundary as Jn, resolveDOMReach as Jt, watchFocusSuperseded as K, setDOMTextFlowRecordIndexes as Kn, getEditorDOMRoot as Kt, resolveDOMPointInRoot as L, isDOMTextFlowSegmentSynchronized as Ln, readLowerSoftLineEnd as Lt, getEditorDOMHostScrollElement as M, getPliteTextHostBounds as Mn, isPlainTextOnlyPaste as Mr, clearAfterInsertCaret as Mt, getOrCreateDOMNodeKey as N, getPliteTextHostStrings as Nn, markPlainTextPaste as Nr, isSoftLineEndBetween as Nt, DOMResolutionError as O, getPliteStringEdgeOffset as On, isDOMElement as Or, Key as Ot, isFocusRequestedElsewhere as P, getTextFlowPointAtCoordinates as Pn, normalizeDOMPoint as Pr, isSoftLineTextStale as Pt, resolveBlockFragmentDropRange as Q, EDITOR_TO_PENDING_ACTION as Qn, watchDOMSyncTextMarks as Qt, resolveDOMRangeInRoot as R, readDOMTextFlowPaint as Rn, recordSoftLineEnd as Rt, normalizePoint as S, createDOMGeometryKernel as Sn, getDefaultView as Sr, writeDOMDataTransferFragment as St, targetRange as T, getPliteStringCoordinatePlacement as Tn, hasShadowRoot as Tr, dataTransferFormats as Tt, setEditorDOMScrollElement as U, resolveDOMTextFlowRecordDOMText as Un, findDOMRootRuntime as Ut, setEditorDOMEditableElement as V, resolveDOMTextFlowInsertTarget as Vn, resolvePliteNodePath as Vt, subscribeEditorDOMScope as W, resolveDOMTextFlowRecordText as Wn, findEditorDOMRootRuntime as Wt, resolveNextKeyCaret as X, EDITOR_TO_FORCE_RENDER as Xn, isDOMSyncMutation as Xt, liftCaretOutOfCollapsedSection as Y, EDITOR_TO_ELEMENT as Yn, resolveDOMTargetView as Yt, eventCarriesBlockFragment as Z, EDITOR_TO_KEY_TO_ELEMENT as Zn, markDOMSyncMutationTarget as Zt, TRIPLE_CLICK as _, isBlinkDOMHost as _n, NODE_TO_INDEX as _r, readDropIndicator as _t, isLeaf as a, readDOMSelectionRange as an, EDITOR_TO_RUNTIME_ID_TO_KEY as ar, resolveDOMDropTarget as at, longestCommonPrefixLength as b, supportsDOMBeforeInput as bn, containsShadowAware as br, domCommands as bt, isText as c, recordDOMSelection as cn, EDITOR_TO_USER_SELECTION as cr, cancelDragRest as ct, Hotkeys as d, enableKernelTraceRetention as dn, ELEMENT_TO_NODE as dr, isDragSessionClaimed as dt, changeDOMSelection as en, EDITOR_TO_PENDING_INSERTION_MARKS as er, intersectClipChain as et, getLineBoundaryKeyboardMove as f, selectDOMInputDefaultActionPhase as fn, IS_COMPOSING as fr, readDragSession as ft, isHotkey as g, isAndroidDOMHost as gn, NODE_TO_ELEMENT as gr, publishDropIndicator as gt, createCompiledHotkeyMatcher as h, hasDOMHostQuirk as hn, IS_READ_ONLY as hr, takeDragSession as ht, isElement as i, readDOMSelectionPoints as in, EDITOR_TO_RUNTIME_ID_TO_ELEMENTS as ir, pointAt as it, findDOMPointElementInRoot as j, getPliteStringPlacementDOMPoint as jn, isDOMText as jr, SOFT_LINE_FLAG as jt, claimFocusRequest as k, getPliteStringLength as kn, isDOMNode as kr, SOFT_LINE_END as kt, isVoid as l, sameDOMSelectionPoints as ln, EDITOR_TO_WINDOW as lr, clearDragScrollRepaint as lt, ariaKeyShortcuts as m, getDOMHostLanguage as mn, IS_NODE_MAP_DIRTY as mr, settleDragSession as mt, getNodeDataAttributeKeys as n, forgetDOMSelectionRecordWithin as nn, EDITOR_TO_PLACEHOLDER_ELEMENT as nr, copyIntentOf as nt, isNode as o, readDOMSelectionRecord as on, EDITOR_TO_SCHEDULE_FLUSH as or, restDOMBlockDrag as ot, isPasteWithoutFormatting as p, CAN_USE_DOM as pn, IS_FOCUSED as pr, setDragScrollRepaint as pt, writeViewSelectionPart as q, DOMCoverage as qn, isElementFocused as qt, isEditor as r, getDOMRangeSelectionPoints as rn, EDITOR_TO_ROOT_VIEW_EDITORS as rr, indicateDOMDropTarget as rt, isString as s, readsSelectionAsHost as sn, EDITOR_TO_USER_MARKS as sr, beginDragSession as st, getElements as t, forgetDOMSelectionRecord as tn, EDITOR_TO_PENDING_SELECTION as tr, walkClipChain as tt, keyToDataAttribute as u, writeDOMSelection as un, ELEMENT_TO_EDITOR as ur, clearDragSession as ut, dom as v, isGeckoDOMHost as vn, NODE_TO_PARENT as vr, subscribeDropIndicator as vt, normalizeStringDiff as w, getOwnedPliteTextStrings as wn, getSelection as wr, writeDOMRangeData as wt, mergeStringDiffs as x, usesAppleDOMHotkeys as xn, getActiveElement as xr, getDOMClipboardFormatKey as xt, applyStringDiff as y, isWebKitDOMHost as yn, closestShadowAware as yr, cleanDOMClipboardContents as yt, resolveWrittenDOMRange as z, releaseDOMTextFlowRecordIndex as zn, resolveSoftLineEndDOMPoint as zt };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Du as getEditorRuntimeOwner, dp as countCoreWork, u as destroyEditor, w as startEditor, x as releaseEditor } from "./plugin-BvM4s-Lr.js";
|
|
2
2
|
//#region src/core/same-result.ts
|
|
3
3
|
const MAX_VALUES = 100;
|
|
4
4
|
const MAX_DEPTH = 64;
|
package/dist/history/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $t as encodeEditorEffect, Km as DocumentChange, Lm as TxDeclaredMethod, Od as Plugin, Of as Value, af as PluginTypeProvider, ba as RootFactsJson, dh as Selection, jc as Editor, po as EditorSchemaIdentity, sl as EditorEffect, vd as HistoryApi, xa as CarriedRun, xt as encodeEditorSelection, zm as TxOnlyMethod } from "../index-
|
|
1
|
+
import { $t as encodeEditorEffect, Km as DocumentChange, Lm as TxDeclaredMethod, Od as Plugin, Of as Value, af as PluginTypeProvider, ba as RootFactsJson, dh as Selection, jc as Editor, po as EditorSchemaIdentity, sl as EditorEffect, vd as HistoryApi, xa as CarriedRun, xt as encodeEditorSelection, zm as TxOnlyMethod } from "../index-QuqD4Dyj.js";
|
|
2
2
|
//#region src/history/history.d.ts
|
|
3
3
|
interface Batch<_V extends Value = Value> {
|
|
4
4
|
/** Canonical change to apply when this batch is consumed. */
|
package/dist/history/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $
|
|
2
|
-
import { t as nativeGroupingInput } from "../native-grouping-input-
|
|
1
|
+
import { $d as isTextNode, $u as alignedDocumentChange, Ac as getDocumentChangeRelocations, Ad as getDocumentPropertyContext, Ar as isInTransaction, Ba as getBookmark, Bc as getAuthoredUpdateView, Bu as factsFromJSON, Cc as getEditorCommitStartedAt, Cd as withInternalDocumentRootChange, Cs as assertSelectionSupported, Dl as getPluginRegistry, Du as getEditorRuntimeOwner, Ec as historyReplayClaim, Ed as addSection, Eu as getEditorRuntime, Fd as markReadBack, Gd as normalizeSetValues, Gf as invertEffect, Gn as getCurrentSelectionRoot, Gu as carriedLetterPairs, Hf as createEditorEffect, Hr as registerEditorHistoryRuntime, Hs as EditorNoncanonicalChangeError, Hu as flipFacts, Id as joinsOf, Iu as NO_FACTS, Jf as RangeApi, Jl as propertyTargetsReadParents, Jn as getEditorDocumentValue, Ju as invertCarriedRun, Kf as mapEffect, Ko as txLocate, Ku as carriesRun, La as changedBookmarks, Ld as liftOf, Ls as constructCanonicalDocumentChange, Lu as NO_ROOT_FACTS, Md as mapRootChangePositionBackward, Mf as decodeEditorEffect, Nl as areEditorSchemaIdentitiesEqual, Ns as withLandedMarks, Od as applyPropertyModifications, Or as isBuildingTransactionSpec, Pf as encodeEditorEffect, Pu as classifyDocumentChange, Qc as consumeAnchorHistoryCapture, Qd as isElementNode, Qf as MAIN_ROOT_KEY, Qu as DocumentChange, Rd as DocumentIndex, Ru as UNKNOWN_FACTS, Sc as getEditorCommitSnapshot, Td as RootChange, Ti as withEditorUpdateRootScope, Ts as encodeEditorSelection, Us as EditorSchemaValidationError, Vd as decodeNodes, Vr as recordEditorHistoryReplayReceipt, Vu as factsToJSON, Wf as defineUpdateAnnotation, Wr as registerEditorTransactionGuard, Wu as recordedFacts, Xl as readEditorSchemaIdentity, Xu as mapCarriedRunThrough, Yd as closeToken, Yu as landCarriedRuns, Za as resolveBookmark, Zd as getDocumentSliceNodeKeys, Zu as widenRun, _c as getEditorCommitCompletedTextDeletion, _d as mapInternalDocumentChangePosition, _u as SelectionApi, af as tokensEqual, al as stageAnchorHistoryRecovery, bc as getEditorCommitRest, bd as valueRootIndex, bn as applyDocumentChange, cd as getInternalDocumentChangeEntries, ct as getSelection, dd as getInternalDocumentChangeRootKeys, di as setTypedMarks, dp as countCoreWork, ed as collapseDocumentElementPropertyWrites, ef as nodeProps, eo as restoreHistoryCarets, fd as getInternalDocumentRootChange, fp as readCoreWork, gc as getEditorCommitCarriedRuns, gf as getRecordText, gp as jsonEqual, hc as getEditorCommitAdmission, hd as isInternalDocumentChangeNoop, id as documentChangeWritesOnlyElementProperties, if as tokenLength, kc as snapshotIndexOf, kd as applyPropertyModificationsToSlice, kn as documentReplacement, ks as mapSelectionThroughChange, ku as getEditorSchema, l as definePlugin, ld as getInternalDocumentChangeRanges, ll as toPublicRoot, nl as mergeAnchorHistoryRecovery, no as sameCarets, nr as getEditorUpdateRoot, pf as getRecordEntries, qd as PreparedTokenSlice, qo as txOnly, qu as exactRunOn, rf as textToken, rp as isObject, sd as getInternalDocumentChangeClassificationEntries, td as createInternalDocumentChange, tf as openToken, tl as mapAnchorHistoryRecovery, to as rootChildrenOf, ud as getInternalDocumentChangeRecords, vc as getEditorCommitFacts, vd as transformInternalDocumentChange, vf as getValueRecords, vl as reportEditorLifecycleError, vp as getDefined, vr as getUpdateView, vu as ElementApi, wc as getEditorCommitUnsettle, wd as withoutRetainedRecordSets, wl as getCompiledEditorSchema, ws as decodeEditorSelection, yd as valueRoot, yf as hasRecord, za as consumeCommitCarets, zu as composeFacts } from "../plugin-BvM4s-Lr.js";
|
|
2
|
+
import { t as nativeGroupingInput } from "../native-grouping-input-8kO12VK9.js";
|
|
3
3
|
//#region src/core/change/carried-projection.ts
|
|
4
4
|
/** A projection the documents leave no place for. */
|
|
5
5
|
var CarriedProjectionError = class extends Error {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as HyperscriptEditorFixture, c as createText, i as createHyperscript, n as HyperscriptCreators, o as createEditor, r as HyperscriptShorthands, s as createEditorFixture, t as jsx } from "../index-
|
|
1
|
+
import { a as HyperscriptEditorFixture, c as createText, i as createHyperscript, n as HyperscriptCreators, o as createEditor, r as HyperscriptShorthands, s as createEditorFixture, t as jsx } from "../index-BwmXxqbi.js";
|
|
2
2
|
export { type HyperscriptCreators, type HyperscriptEditorFixture, type HyperscriptShorthands, createEditor, createEditorFixture, createHyperscript, createText, jsx };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as createText, i as createEditorFixture, n as createHyperscript, r as createEditor, t as jsx } from "../hyperscript-
|
|
1
|
+
import { a as createText, i as createEditorFixture, n as createHyperscript, r as createEditor, t as jsx } from "../hyperscript-BFypA5qW.js";
|
|
2
2
|
export { createEditor, createEditorFixture, createHyperscript, createText, jsx };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { B as NodeApi,
|
|
2
|
-
import { a as createEditor$1 } from "./create-editor-
|
|
1
|
+
import { B as NodeApi, Jf as RangeApi, Jt as replace, Su as TextApi, _u as SelectionApi, vu as ElementApi } from "./plugin-BvM4s-Lr.js";
|
|
2
|
+
import { a as createEditor$1 } from "./create-editor-XvI_4sYc.js";
|
|
3
3
|
//#region src/hyperscript/tokens.ts
|
|
4
4
|
/**
|
|
5
5
|
* A weak map to hold anchor tokens.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Od as Plugin, Og as Range, Ud as PluginFactoryTypeLambda, Wd as PluginFactoryTypeProvider } from "./index-QuqD4Dyj.js";
|
|
2
2
|
import * as Y from "yjs";
|
|
3
3
|
//#region src/yjs/core/editor-adapter.d.ts
|
|
4
4
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Dh as Descendant,
|
|
1
|
+
import { Dh as Descendant, Ug as Path, dh as Selection, hh as TextSelection, jc as Editor, nc as Element, vc as Text } from "./index-QuqD4Dyj.js";
|
|
2
2
|
//#region src/hyperscript/tokens.d.ts
|
|
3
3
|
/**
|
|
4
4
|
* All tokens inherit from a single constructor for `instanceof` checking.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Of as Value, Og as Range, jc as Editor, vg as Anchor, wd as NodeKey } from "./index-QuqD4Dyj.js";
|
|
2
2
|
//#region src/internal/view/view-source.d.ts
|
|
3
3
|
type ViewSourcePhase = 'project' | 'read' | 'resolve';
|
|
4
4
|
/** Diagnostic emitted when an optional view source is deactivated. */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { An as TransferCheck, Bd as PluginDependencyContractReference, Bt as CheckedEditorOptions, Cd as NamedRootKey, Cf as StateFieldValueInput, Cn as TransferApi, Dc as CompatibleEditorCommand,
|
|
2
|
-
import { a as AnnotationSnapshot, f as ViewSourceErrorSink, l as ResolvedAnnotation, o as AnnotationStore, t as Annotation } from "./index-
|
|
3
|
-
import { B as DOMApi, I as DOMEditorOptions, It as DOMCoverageReason, L as DOMPlugin, Mt as DOMCoverageMaterializeReason, O as DataTransferDiagnostic, R as DOMPluginTypes, Rt as DOMCoverageSelectionPolicy, Tt as DOMCoverageBoundary, V as DOMClipboardApi, W as DOMEditor, jt as DOMCoverageMaterializeRangeRole, kt as DOMCoverageCopyPolicy, vt as DropIndicator } from "./index-
|
|
4
|
-
import { r as ViewportRect, t as RangeGeometry } from "./range-geometry-
|
|
1
|
+
import { An as TransferCheck, Bd as PluginDependencyContractReference, Bt as CheckedEditorOptions, Cd as NamedRootKey, Cf as StateFieldValueInput, Cn as TransferApi, Dc as CompatibleEditorCommand, Dg as BaseRange, Hd as PluginDependencyReferenceFor, Ln as TransferOutcome, Nn as TransferInput, Od as Plugin, Of as Value, Og as Range, Ph as Node$1, Td as NodeTarget, Tl as EditorLifecycleErrorSink, Ug as Path, Vc as EditorCommandDescriptor, Wc as EditorCommandInput, Xc as EditorCommitContext, Xd as PluginPortal, _h as DecorationAttributes, bu as EditorStateView, cd as EditorUpdateTransaction, df as PluginsOf, gd as EditorViewOptions, id as EditorUpdatePolicy, jc as Editor$2, kc as CreateEditorOptions$1, kf as ValueOf, n as PluginsFromOptions, nc as Element$1, nd as EditorUpdateContext, nf as PluginReference, ou as EditorSnapshot, pf as RootKey, qc as EditorCommit, su as EditorStateField, t as EditorValueFromOptions, vc as Text, wc as AnyEditor, wd as NodeKey, wn as TransferPlugin, yd as HistoryOutcome, yh as DecorationSource } from "./index-QuqD4Dyj.js";
|
|
2
|
+
import { a as AnnotationSnapshot, f as ViewSourceErrorSink, l as ResolvedAnnotation, o as AnnotationStore, t as Annotation } from "./index-CRmyGzS8.js";
|
|
3
|
+
import { B as DOMApi, I as DOMEditorOptions, It as DOMCoverageReason, L as DOMPlugin, Mt as DOMCoverageMaterializeReason, O as DataTransferDiagnostic, R as DOMPluginTypes, Rt as DOMCoverageSelectionPolicy, Tt as DOMCoverageBoundary, V as DOMClipboardApi, W as DOMEditor, jt as DOMCoverageMaterializeRangeRole, kt as DOMCoverageCopyPolicy, vt as DropIndicator } from "./index-DaXz-4c7.js";
|
|
4
|
+
import { r as ViewportRect, t as RangeGeometry } from "./range-geometry-wFuJaBlA.js";
|
|
5
5
|
import React$1, { CSSProperties, DependencyList, HTMLAttributes, KeyboardEvent as KeyboardEvent$1, MouseEventHandler, ReactNode, Ref, RefObject, TextareaHTMLAttributes } from "react";
|
|
6
6
|
import "lodash";
|
|
7
7
|
//#region src/react/editable/runtime-editor-api.d.ts
|
|
@@ -531,15 +531,22 @@ type EditableContentRootSlotOptions = {
|
|
|
531
531
|
id?: string;
|
|
532
532
|
/**
|
|
533
533
|
* The element that takes focus in place of this root's editable when the
|
|
534
|
-
* editor moves focus here, as after an undo
|
|
535
|
-
* `editor.api.dom.focus()
|
|
536
|
-
*
|
|
537
|
-
*
|
|
538
|
-
*
|
|
539
|
-
*
|
|
540
|
-
*
|
|
541
|
-
*
|
|
542
|
-
*
|
|
534
|
+
* editor moves focus here, as after an undo, on a click that selects an
|
|
535
|
+
* object or on a call to `editor.api.dom.focus()`. It takes focus only while
|
|
536
|
+
* no range is shown into this root and the root's own selection is none or
|
|
537
|
+
* a node selection of its top-level blocks, including a node selection the
|
|
538
|
+
* root kept while the caret was in another root. Once the element holds
|
|
539
|
+
* focus, that kept node selection becomes the selection again, so a key the
|
|
540
|
+
* element handles acts on it. It does not come back when the element's focus
|
|
541
|
+
* handler leaves focus on another element, asks for focus elsewhere or
|
|
542
|
+
* changes the selection. A focus call made inside an update or a read focuses
|
|
543
|
+
* the editable instead, as on a root without this element. When the render
|
|
544
|
+
* that follows a focus call replaces the element, focus falls to the page.
|
|
545
|
+
* Give the element `contentEditable={false}`: one that inherits editing runs
|
|
546
|
+
* the editable's own focus handler, which in Firefox moves focus to the
|
|
547
|
+
* editable. Unless the element is a control, such as a button, the editor
|
|
548
|
+
* reads no keys from it, so it must handle the keys it needs, such as undo
|
|
549
|
+
* and redo.
|
|
543
550
|
*/
|
|
544
551
|
nodeSelectionFocus?: NodeSelectionFocus;
|
|
545
552
|
placeholder?: ReactNode;
|