@portabletext/editor 6.6.4 → 7.0.1
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/lib/_chunks-dts/behavior.types.action.d.ts +683 -512
- package/lib/_chunks-dts/behavior.types.action.d.ts.map +1 -1
- package/lib/_chunks-dts/resolve-containers.d.ts +688 -0
- package/lib/_chunks-dts/resolve-containers.d.ts.map +1 -0
- package/lib/_chunks-es/get-ancestor.js +192 -0
- package/lib/_chunks-es/get-ancestor.js.map +1 -0
- package/lib/_chunks-es/get-first-child.js +130 -0
- package/lib/_chunks-es/get-first-child.js.map +1 -0
- package/lib/_chunks-es/get-path-sub-schema.js +266 -0
- package/lib/_chunks-es/get-path-sub-schema.js.map +1 -0
- package/lib/_chunks-es/selector.is-at-the-start-of-block.js +1021 -0
- package/lib/_chunks-es/selector.is-at-the-start-of-block.js.map +1 -0
- package/lib/_chunks-es/use-editor.js +4 -13
- package/lib/_chunks-es/use-editor.js.map +1 -1
- package/lib/_chunks-es/util.is-empty-text-block.js +15 -0
- package/lib/_chunks-es/util.is-empty-text-block.js.map +1 -0
- package/lib/_chunks-es/util.slice-blocks.js +347 -198
- package/lib/_chunks-es/util.slice-blocks.js.map +1 -1
- package/lib/behaviors/index.d.ts +2 -1
- package/lib/index.d.ts +3 -2
- package/lib/index.js +5457 -5611
- package/lib/index.js.map +1 -1
- package/lib/plugins/index.d.ts +18 -2
- package/lib/plugins/index.d.ts.map +1 -1
- package/lib/plugins/index.js +18 -2
- package/lib/plugins/index.js.map +1 -1
- package/lib/selectors/index.d.ts +220 -5
- package/lib/selectors/index.d.ts.map +1 -1
- package/lib/selectors/index.js +62 -71
- package/lib/selectors/index.js.map +1 -1
- package/lib/traversal/index.d.ts +235 -0
- package/lib/traversal/index.d.ts.map +1 -0
- package/lib/traversal/index.js +30 -0
- package/lib/traversal/index.js.map +1 -0
- package/lib/utils/index.d.ts +11 -57
- package/lib/utils/index.d.ts.map +1 -1
- package/lib/utils/index.js +36 -107
- package/lib/utils/index.js.map +1 -1
- package/package.json +19 -17
- package/lib/_chunks-es/selector.is-selecting-entire-blocks.js +0 -806
- package/lib/_chunks-es/selector.is-selecting-entire-blocks.js.map +0 -1
- package/lib/_chunks-es/util.slice-text-block.js +0 -60
- package/lib/_chunks-es/util.slice-text-block.js.map +0 -1
package/lib/plugins/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { W as Editor,
|
|
1
|
+
import { W as Editor, Y as Behavior, q as EditorEmittedEvent } from "../_chunks-dts/behavior.types.action.js";
|
|
2
|
+
import { _ as RegistrableNode } from "../_chunks-dts/resolve-containers.js";
|
|
2
3
|
import React from "react";
|
|
3
4
|
/**
|
|
4
5
|
* @beta
|
|
@@ -6,6 +7,21 @@ import React from "react";
|
|
|
6
7
|
declare function BehaviorPlugin(props: {
|
|
7
8
|
behaviors: Array<Behavior>;
|
|
8
9
|
}): null;
|
|
10
|
+
/**
|
|
11
|
+
* @alpha
|
|
12
|
+
*
|
|
13
|
+
* Plugin component that registers a list of nodes (containers, text
|
|
14
|
+
* blocks, spans, block objects, inline objects) with the editor. Each
|
|
15
|
+
* node is the result of a `defineX` factory.
|
|
16
|
+
*
|
|
17
|
+
* Stabilize the `nodes` array (a module-level constant or `useMemo`)
|
|
18
|
+
* to avoid a full unregister/re-register cycle on every parent
|
|
19
|
+
* render: a new array reference per render triggers the registration
|
|
20
|
+
* effect to re-run.
|
|
21
|
+
*/
|
|
22
|
+
declare function NodePlugin(props: {
|
|
23
|
+
nodes: Array<RegistrableNode>;
|
|
24
|
+
}): null;
|
|
9
25
|
/**
|
|
10
26
|
* @beta
|
|
11
27
|
*/
|
|
@@ -62,5 +78,5 @@ declare const EditorRefPlugin: React.ForwardRefExoticComponent<React.RefAttribut
|
|
|
62
78
|
declare function EventListenerPlugin(props: {
|
|
63
79
|
on: (event: EditorEmittedEvent) => void;
|
|
64
80
|
}): null;
|
|
65
|
-
export { BehaviorPlugin, EditorRefPlugin, EventListenerPlugin };
|
|
81
|
+
export { BehaviorPlugin, EditorRefPlugin, EventListenerPlugin, NodePlugin };
|
|
66
82
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../../src/plugins/plugin.behavior.tsx","../../src/plugins/plugin.editor-ref.tsx","../../src/plugins/plugin.event-listener.tsx"],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../src/plugins/plugin.behavior.tsx","../../src/plugins/plugin.node.tsx","../../src/plugins/plugin.editor-ref.tsx","../../src/plugins/plugin.event-listener.tsx"],"sourcesContent":[],"mappings":";;;;;;AAOgB,iBAAA,cAAA,CAAwC,KAAN,EAAA;aAAA,MAAM;ACSxD,CAAA,CAAA,EAAgB,IAAA;;;;ADThB;;ACSA;;ACTA;;;;;iBDSgB,UAAA;EEqCA,KAAA,EFrC0B,KEqC1B,CFrCgC,eEqCb,CAAA;;;;AH9CnC;cEAa,iBAAe,KAAA,CAAA,0BAAA,KAAA,CAAA,cAAA;;;;AFA5B;;ACSA;;ACTA;;;;;;AC8CA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAAgB,mBAAA;cACF"}
|
package/lib/plugins/index.js
CHANGED
|
@@ -9,10 +9,25 @@ function BehaviorPlugin(props) {
|
|
|
9
9
|
behavior
|
|
10
10
|
}));
|
|
11
11
|
return () => {
|
|
12
|
-
unregisterBehaviors.forEach(_temp);
|
|
12
|
+
unregisterBehaviors.forEach(_temp$1);
|
|
13
13
|
};
|
|
14
14
|
}, t1 = [editor, props.behaviors], $[0] = editor, $[1] = props.behaviors, $[2] = t0, $[3] = t1) : (t0 = $[2], t1 = $[3]), useEffect(t0, t1), null;
|
|
15
15
|
}
|
|
16
|
+
function _temp$1(unregister) {
|
|
17
|
+
unregister();
|
|
18
|
+
}
|
|
19
|
+
function NodePlugin(props) {
|
|
20
|
+
const $ = c(4), editor = useEditor();
|
|
21
|
+
let t0, t1;
|
|
22
|
+
return $[0] !== editor || $[1] !== props.nodes ? (t0 = () => {
|
|
23
|
+
const unregisterNodes = props.nodes.map((node) => editor.registerNode({
|
|
24
|
+
node
|
|
25
|
+
}));
|
|
26
|
+
return () => {
|
|
27
|
+
unregisterNodes.forEach(_temp);
|
|
28
|
+
};
|
|
29
|
+
}, t1 = [editor, props.nodes], $[0] = editor, $[1] = props.nodes, $[2] = t0, $[3] = t1) : (t0 = $[2], t1 = $[3]), useEffect(t0, t1), null;
|
|
30
|
+
}
|
|
16
31
|
function _temp(unregister) {
|
|
17
32
|
unregister();
|
|
18
33
|
}
|
|
@@ -35,6 +50,7 @@ function EventListenerPlugin(props) {
|
|
|
35
50
|
export {
|
|
36
51
|
BehaviorPlugin,
|
|
37
52
|
EditorRefPlugin,
|
|
38
|
-
EventListenerPlugin
|
|
53
|
+
EventListenerPlugin,
|
|
54
|
+
NodePlugin
|
|
39
55
|
};
|
|
40
56
|
//# sourceMappingURL=index.js.map
|
package/lib/plugins/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/plugins/plugin.behavior.tsx","../../src/plugins/plugin.editor-ref.tsx","../../src/plugins/plugin.event-listener.tsx"],"sourcesContent":["import {useEffect} from 'react'\nimport type {Behavior} from '../behaviors/behavior.types.behavior'\nimport {useEditor} from '../editor/use-editor'\n\n/**\n * @beta\n */\nexport function BehaviorPlugin(props: {behaviors: Array<Behavior>}) {\n const editor = useEditor()\n\n useEffect(() => {\n const unregisterBehaviors = props.behaviors.map((behavior) =>\n editor.registerBehavior({behavior}),\n )\n\n return () => {\n unregisterBehaviors.forEach((unregister) => {\n unregister()\n })\n }\n }, [editor, props.behaviors])\n\n return null\n}\n","import React from 'react'\nimport type {Editor} from '../editor'\nimport {useEditor} from '../editor/use-editor'\n\n/**\n * @beta\n */\nexport const EditorRefPlugin = React.forwardRef<Editor | null>((_, ref) => {\n const editor = useEditor()\n\n const portableTextEditorRef = React.useRef(editor)\n\n React.useImperativeHandle(ref, () => portableTextEditorRef.current, [])\n\n return null\n})\nEditorRefPlugin.displayName = 'EditorRefPlugin'\n","import {useEffect} from 'react'\nimport type {EditorEmittedEvent} from '../editor/relay-machine'\nimport {useEditor} from '../editor/use-editor'\n\n/**\n * @public\n * Listen for events emitted by the editor. Must be used inside `EditorProvider`. Events available include:\n * - 'blurred'\n * - 'done loading'\n * - 'editable'\n * - 'error'\n * - 'focused'\n * - 'invalid value'\n * - 'loading'\n * - 'mutation'\n * - 'patch'\n * - 'read only'\n * - 'ready'\n * - 'selection'\n * - 'value changed'\n *\n * @example\n * Listen and log events.\n * ```tsx\n * import {EditorProvider} from '@portabletext/editor'\n * import {EventListenerPlugin} from '@portabletext/editor/plugins'\n *\n * function MyComponent() {\n * return (\n * <EditorProvider>\n * <EventListenerPlugin\n * on={(event) => {\n * console.log(event)\n * }\n * } />\n * { ... }\n * </EditorProvider>\n * )\n * }\n * ```\n * @example\n * Handle events when there is a mutation.\n * ```tsx\n * <EventListenerPlugin\n * on={(event) => {\n * if (event.type === 'mutation') {\n * console.log('Value changed:', event.snapshot)\n * }\n * }}\n * />\n * ```\n * @group Components\n */\nexport function EventListenerPlugin(props: {\n on: (event: EditorEmittedEvent) => void\n}) {\n const editor = useEditor()\n\n useEffect(() => {\n const subscription = editor.on('*', props.on)\n\n return () => {\n subscription.unsubscribe()\n }\n }, [editor, props.on])\n\n return null\n}\n"],"names":["BehaviorPlugin","props","$","_c","editor","useEditor","t0","t1","behaviors","unregisterBehaviors","map","behavior","registerBehavior","forEach","_temp","useEffect","unregister","EditorRefPlugin","React","forwardRef","_","ref","portableTextEditorRef","useRef","Symbol","for","current","useImperativeHandle","displayName","EventListenerPlugin","on","subscription","unsubscribe"],"mappings":";;;AAOO,SAAAA,eAAAC,OAAA;AAAA,QAAAC,IAAAC,EAAA,CAAA,GACLC,SAAeC,UAAAA;AAAW,MAAAC,IAAAC;AAAA,SAAAL,SAAAE,UAAAF,EAAA,CAAA,MAAAD,MAAAO,aAEhBF,KAAAA,MAAA;AACR,UAAAG,sBAA4BR,MAAKO,UAAUE,IAAKC,CAAAA,aAC9CP,OAAMQ,iBAAkB;AAAA,MAAAD;AAAAA,IAAAA,CAAU,CACpC;AAAC,WAEM,MAAA;AACLF,0BAAmBI,QAASC,
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/plugins/plugin.behavior.tsx","../../src/plugins/plugin.node.tsx","../../src/plugins/plugin.editor-ref.tsx","../../src/plugins/plugin.event-listener.tsx"],"sourcesContent":["import {useEffect} from 'react'\nimport type {Behavior} from '../behaviors/behavior.types.behavior'\nimport {useEditor} from '../editor/use-editor'\n\n/**\n * @beta\n */\nexport function BehaviorPlugin(props: {behaviors: Array<Behavior>}) {\n const editor = useEditor()\n\n useEffect(() => {\n const unregisterBehaviors = props.behaviors.map((behavior) =>\n editor.registerBehavior({behavior}),\n )\n\n return () => {\n unregisterBehaviors.forEach((unregister) => {\n unregister()\n })\n }\n }, [editor, props.behaviors])\n\n return null\n}\n","import {useEffect} from 'react'\nimport {useEditor} from '../editor/use-editor'\nimport type {RegistrableNode} from '../renderers/renderer.types'\n\n/**\n * @alpha\n *\n * Plugin component that registers a list of nodes (containers, text\n * blocks, spans, block objects, inline objects) with the editor. Each\n * node is the result of a `defineX` factory.\n *\n * Stabilize the `nodes` array (a module-level constant or `useMemo`)\n * to avoid a full unregister/re-register cycle on every parent\n * render: a new array reference per render triggers the registration\n * effect to re-run.\n */\nexport function NodePlugin(props: {nodes: Array<RegistrableNode>}) {\n const editor = useEditor()\n\n useEffect(() => {\n const unregisterNodes = props.nodes.map((node) =>\n editor.registerNode({node}),\n )\n\n return () => {\n unregisterNodes.forEach((unregister) => {\n unregister()\n })\n }\n }, [editor, props.nodes])\n\n return null\n}\n","import React from 'react'\nimport type {Editor} from '../editor'\nimport {useEditor} from '../editor/use-editor'\n\n/**\n * @beta\n */\nexport const EditorRefPlugin = React.forwardRef<Editor | null>((_, ref) => {\n const editor = useEditor()\n\n const portableTextEditorRef = React.useRef(editor)\n\n React.useImperativeHandle(ref, () => portableTextEditorRef.current, [])\n\n return null\n})\nEditorRefPlugin.displayName = 'EditorRefPlugin'\n","import {useEffect} from 'react'\nimport type {EditorEmittedEvent} from '../editor/relay-machine'\nimport {useEditor} from '../editor/use-editor'\n\n/**\n * @public\n * Listen for events emitted by the editor. Must be used inside `EditorProvider`. Events available include:\n * - 'blurred'\n * - 'done loading'\n * - 'editable'\n * - 'error'\n * - 'focused'\n * - 'invalid value'\n * - 'loading'\n * - 'mutation'\n * - 'patch'\n * - 'read only'\n * - 'ready'\n * - 'selection'\n * - 'value changed'\n *\n * @example\n * Listen and log events.\n * ```tsx\n * import {EditorProvider} from '@portabletext/editor'\n * import {EventListenerPlugin} from '@portabletext/editor/plugins'\n *\n * function MyComponent() {\n * return (\n * <EditorProvider>\n * <EventListenerPlugin\n * on={(event) => {\n * console.log(event)\n * }\n * } />\n * { ... }\n * </EditorProvider>\n * )\n * }\n * ```\n * @example\n * Handle events when there is a mutation.\n * ```tsx\n * <EventListenerPlugin\n * on={(event) => {\n * if (event.type === 'mutation') {\n * console.log('Value changed:', event.snapshot)\n * }\n * }}\n * />\n * ```\n * @group Components\n */\nexport function EventListenerPlugin(props: {\n on: (event: EditorEmittedEvent) => void\n}) {\n const editor = useEditor()\n\n useEffect(() => {\n const subscription = editor.on('*', props.on)\n\n return () => {\n subscription.unsubscribe()\n }\n }, [editor, props.on])\n\n return null\n}\n"],"names":["BehaviorPlugin","props","$","_c","editor","useEditor","t0","t1","behaviors","unregisterBehaviors","map","behavior","registerBehavior","forEach","_temp","useEffect","unregister","NodePlugin","nodes","unregisterNodes","node","registerNode","EditorRefPlugin","React","forwardRef","_","ref","portableTextEditorRef","useRef","Symbol","for","current","useImperativeHandle","displayName","EventListenerPlugin","on","subscription","unsubscribe"],"mappings":";;;AAOO,SAAAA,eAAAC,OAAA;AAAA,QAAAC,IAAAC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AAC,GAAAC,QAAA;AAAA,QAAAxB,IAAAC,EAAA,CAAA,GAC7DC,SAAeC,aAEfsB,wBAA8BJ,MAAKK,OAAQxB,MAAM;AAAC,MAAAE,IAAAC;AAAA,SAAAL,EAAA,CAAA,MAAA2B,uBAAAC,IAAA,2BAAA,KAEnBxB,KAAAA,MAAMqB,sBAAqBI,SAAUxB,KAAA,CAAA,GAAEL,OAAAI,IAAAJ,OAAAK,OAAAD,KAAAJ,EAAA,CAAA,GAAAK,KAAAL,EAAA,CAAA,IAAtEqB,MAAKS,oBAAqBN,KAAKpB,IAAqCC,EAAE,GAE/D;AAAI,CACZ;AACDe,gBAAgBW,cAAc;ACqCvB,SAAAC,oBAAAjC,OAAA;AAAA,QAAAC,IAAAC,EAAA,CAAA,GAGLC,SAAeC,UAAAA;AAAW,MAAAC,IAAAC;AAAA,SAAAL,SAAAE,UAAAF,EAAA,CAAA,MAAAD,MAAAkC,MAEhB7B,KAAAA,MAAA;AACR,UAAA8B,eAAqBhC,OAAM+B,GAAI,KAAKlC,MAAKkC,EAAG;AAAC,WAEtC,MAAA;AACLC,mBAAYC,YAAAA;AAAAA,IAAc;AAAA,EAC3B,GACA9B,MAACH,QAAQH,MAAKkC,EAAG,GAACjC,OAAAE,QAAAF,EAAA,CAAA,IAAAD,MAAAkC,IAAAjC,OAAAI,IAAAJ,OAAAK,OAAAD,KAAAJ,EAAA,CAAA,GAAAK,KAAAL,EAAA,CAAA,IANrBa,UAAUT,IAMPC,EAAkB,GAEd;AAAI;"}
|
package/lib/selectors/index.d.ts
CHANGED
|
@@ -1,5 +1,65 @@
|
|
|
1
|
-
import { B as EditorSelector, F as BlockOffset,
|
|
1
|
+
import { B as EditorSelector, F as BlockOffset, ct as EditorSelection, lt as EditorSelectionPoint } from "../_chunks-dts/behavior.types.action.js";
|
|
2
|
+
import { A as ChildPath, D as Path, k as BlockPath } from "../_chunks-dts/resolve-containers.js";
|
|
2
3
|
import { PortableTextBlock, PortableTextListBlock, PortableTextObject, PortableTextSpan, PortableTextTextBlock } from "@portabletext/schema";
|
|
4
|
+
/**
|
|
5
|
+
* The set of schema member names applicable at the current selection,
|
|
6
|
+
* grouped by category.
|
|
7
|
+
*
|
|
8
|
+
* @beta
|
|
9
|
+
*/
|
|
10
|
+
type ApplicableSchema = {
|
|
11
|
+
decorators: ReadonlySet<string>;
|
|
12
|
+
annotations: ReadonlySet<string>;
|
|
13
|
+
lists: ReadonlySet<string>;
|
|
14
|
+
styles: ReadonlySet<string>;
|
|
15
|
+
blockObjects: ReadonlySet<string>;
|
|
16
|
+
inlineObjects: ReadonlySet<string>;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Resolve which schema members are applicable at the current selection. For
|
|
20
|
+
* each named category (decorators, annotations, lists, styles, block objects,
|
|
21
|
+
* inline objects) returns the set of names that the editor allows at the
|
|
22
|
+
* current selection.
|
|
23
|
+
*
|
|
24
|
+
* Categories split by what they apply to:
|
|
25
|
+
*
|
|
26
|
+
* Text-only (decorators, annotations, lists, styles): require text-block
|
|
27
|
+
* content in the selection. A name is applicable when at least one text
|
|
28
|
+
* block the range covers declares it (union). The underlying operations
|
|
29
|
+
* apply per-block, validating each block's sub-schema and skipping blocks
|
|
30
|
+
* that don't declare the type, so the result reflects "will this produce
|
|
31
|
+
* any effect?" semantics. Selection on a void block, or no selection,
|
|
32
|
+
* returns empty sets.
|
|
33
|
+
*
|
|
34
|
+
* Insertion (blockObjects, inlineObjects): the things consumers might
|
|
35
|
+
* insert AT the current selection. The focus block's sub-schema applies
|
|
36
|
+
* even when the selection is on a void block (the question "what can I
|
|
37
|
+
* insert here?" still has an answer). No selection returns empty sets.
|
|
38
|
+
*
|
|
39
|
+
* Useful for gating toolbar buttons, slash-command items, command palettes,
|
|
40
|
+
* keyboard-shortcut hints and other selection-aware UIs.
|
|
41
|
+
*
|
|
42
|
+
* Pair with `getUnionSchema` (from `@portabletext/editor/traversal`) to render a static toolbar whose
|
|
43
|
+
* buttons stay stable across selection moves while gating their enabled
|
|
44
|
+
* state on whether the corresponding name is in the relevant set.
|
|
45
|
+
*
|
|
46
|
+
* Note for React consumers: the returned object is a fresh value on every
|
|
47
|
+
* call, so subscribing via `useEditorSelector` requires a structural
|
|
48
|
+
* compare to avoid re-rendering on every editor tick. Use
|
|
49
|
+
* {@link compareApplicableSchema} as the third argument.
|
|
50
|
+
*
|
|
51
|
+
* @beta
|
|
52
|
+
*/
|
|
53
|
+
declare const getApplicableSchema: EditorSelector<ApplicableSchema>;
|
|
54
|
+
/**
|
|
55
|
+
* Structural comparator for {@link ApplicableSchema} values. Two results
|
|
56
|
+
* compare equal when every category contains the same names (set equality).
|
|
57
|
+
* Pass as the `compare` argument to `useEditorSelector` to keep React
|
|
58
|
+
* subscriptions stable.
|
|
59
|
+
*
|
|
60
|
+
* @beta
|
|
61
|
+
*/
|
|
62
|
+
declare function compareApplicableSchema(a: ApplicableSchema, b: ApplicableSchema): boolean;
|
|
3
63
|
/**
|
|
4
64
|
* @public
|
|
5
65
|
*/
|
|
@@ -13,6 +73,8 @@ declare const getActiveListItem: EditorSelector<PortableTextListBlock['listItem'
|
|
|
13
73
|
*/
|
|
14
74
|
declare const getActiveStyle: EditorSelector<PortableTextTextBlock['style']>;
|
|
15
75
|
/**
|
|
76
|
+
* Returns the block containing the anchor selection, resolved at any depth.
|
|
77
|
+
*
|
|
16
78
|
* @public
|
|
17
79
|
*/
|
|
18
80
|
declare const getAnchorBlock: EditorSelector<{
|
|
@@ -20,6 +82,9 @@ declare const getAnchorBlock: EditorSelector<{
|
|
|
20
82
|
path: BlockPath;
|
|
21
83
|
} | undefined>;
|
|
22
84
|
/**
|
|
85
|
+
* Returns the child (span or inline object) containing the anchor selection,
|
|
86
|
+
* resolved at any depth.
|
|
87
|
+
*
|
|
23
88
|
* @public
|
|
24
89
|
*/
|
|
25
90
|
declare const getAnchorChild: EditorSelector<{
|
|
@@ -27,6 +92,8 @@ declare const getAnchorChild: EditorSelector<{
|
|
|
27
92
|
path: ChildPath;
|
|
28
93
|
} | undefined>;
|
|
29
94
|
/**
|
|
95
|
+
* Returns the span containing the anchor selection, resolved at any depth.
|
|
96
|
+
*
|
|
30
97
|
* @public
|
|
31
98
|
*/
|
|
32
99
|
declare const getAnchorSpan: EditorSelector<{
|
|
@@ -34,6 +101,9 @@ declare const getAnchorSpan: EditorSelector<{
|
|
|
34
101
|
path: ChildPath;
|
|
35
102
|
} | undefined>;
|
|
36
103
|
/**
|
|
104
|
+
* Returns the text block containing the anchor selection, resolved at any
|
|
105
|
+
* depth.
|
|
106
|
+
*
|
|
37
107
|
* @public
|
|
38
108
|
*/
|
|
39
109
|
declare const getAnchorTextBlock: EditorSelector<{
|
|
@@ -54,6 +124,13 @@ declare const getBlockOffsets: EditorSelector<{
|
|
|
54
124
|
*/
|
|
55
125
|
declare const getCaretWordSelection: EditorSelector<EditorSelection>;
|
|
56
126
|
/**
|
|
127
|
+
* Returns the first block at the current container scope.
|
|
128
|
+
*
|
|
129
|
+
* When the focus is inside an editable container (e.g. a code block's line),
|
|
130
|
+
* this returns the first block within that container (the first line). When
|
|
131
|
+
* the focus is at root, or there is no selection, this returns the first
|
|
132
|
+
* block in the document.
|
|
133
|
+
*
|
|
57
134
|
* @public
|
|
58
135
|
*/
|
|
59
136
|
declare const getFirstBlock: EditorSelector<{
|
|
@@ -61,6 +138,12 @@ declare const getFirstBlock: EditorSelector<{
|
|
|
61
138
|
path: BlockPath;
|
|
62
139
|
} | undefined>;
|
|
63
140
|
/**
|
|
141
|
+
* Returns the block containing the focus selection, resolved at any depth.
|
|
142
|
+
*
|
|
143
|
+
* When the focus is inside an editable container (e.g. a code block's line),
|
|
144
|
+
* this returns the innermost block ancestor (the line), not the outer
|
|
145
|
+
* container. When the focus is at root, behavior is unchanged.
|
|
146
|
+
*
|
|
64
147
|
* @public
|
|
65
148
|
*/
|
|
66
149
|
declare const getFocusBlock: EditorSelector<{
|
|
@@ -68,6 +151,12 @@ declare const getFocusBlock: EditorSelector<{
|
|
|
68
151
|
path: BlockPath;
|
|
69
152
|
} | undefined>;
|
|
70
153
|
/**
|
|
154
|
+
* Returns the void block object containing the focus selection, resolved at
|
|
155
|
+
* any depth.
|
|
156
|
+
*
|
|
157
|
+
* Excludes text blocks and editable containers (which have their own children
|
|
158
|
+
* and are not "void"). When the focus is at root, behavior is unchanged.
|
|
159
|
+
*
|
|
71
160
|
* @public
|
|
72
161
|
*/
|
|
73
162
|
declare const getFocusBlockObject: EditorSelector<{
|
|
@@ -75,6 +164,9 @@ declare const getFocusBlockObject: EditorSelector<{
|
|
|
75
164
|
path: BlockPath;
|
|
76
165
|
} | undefined>;
|
|
77
166
|
/**
|
|
167
|
+
* Returns the child (span or inline object) containing the focus selection,
|
|
168
|
+
* resolved at any depth.
|
|
169
|
+
*
|
|
78
170
|
* @public
|
|
79
171
|
*/
|
|
80
172
|
declare const getFocusChild: EditorSelector<{
|
|
@@ -82,6 +174,9 @@ declare const getFocusChild: EditorSelector<{
|
|
|
82
174
|
path: ChildPath;
|
|
83
175
|
} | undefined>;
|
|
84
176
|
/**
|
|
177
|
+
* Returns the inline object containing the focus selection, resolved at any
|
|
178
|
+
* depth.
|
|
179
|
+
*
|
|
85
180
|
* @public
|
|
86
181
|
*/
|
|
87
182
|
declare const getFocusInlineObject: EditorSelector<{
|
|
@@ -89,6 +184,9 @@ declare const getFocusInlineObject: EditorSelector<{
|
|
|
89
184
|
path: ChildPath;
|
|
90
185
|
} | undefined>;
|
|
91
186
|
/**
|
|
187
|
+
* Returns the list block containing the focus selection, resolved at any
|
|
188
|
+
* depth.
|
|
189
|
+
*
|
|
92
190
|
* @public
|
|
93
191
|
*/
|
|
94
192
|
declare const getFocusListBlock: EditorSelector<{
|
|
@@ -96,6 +194,8 @@ declare const getFocusListBlock: EditorSelector<{
|
|
|
96
194
|
path: BlockPath;
|
|
97
195
|
} | undefined>;
|
|
98
196
|
/**
|
|
197
|
+
* Returns the span containing the focus selection, resolved at any depth.
|
|
198
|
+
*
|
|
99
199
|
* @public
|
|
100
200
|
*/
|
|
101
201
|
declare const getFocusSpan: EditorSelector<{
|
|
@@ -103,6 +203,12 @@ declare const getFocusSpan: EditorSelector<{
|
|
|
103
203
|
path: ChildPath;
|
|
104
204
|
} | undefined>;
|
|
105
205
|
/**
|
|
206
|
+
* Returns the text block containing the focus selection, resolved at any depth.
|
|
207
|
+
*
|
|
208
|
+
* When the focus is inside an editable container (e.g. a code block's line),
|
|
209
|
+
* this returns the innermost text block ancestor (the line), not the outer
|
|
210
|
+
* container. When the focus is at root, behavior is unchanged.
|
|
211
|
+
*
|
|
106
212
|
* @public
|
|
107
213
|
*/
|
|
108
214
|
declare const getFocusTextBlock: EditorSelector<{
|
|
@@ -110,6 +216,38 @@ declare const getFocusTextBlock: EditorSelector<{
|
|
|
110
216
|
path: BlockPath;
|
|
111
217
|
} | undefined>;
|
|
112
218
|
/**
|
|
219
|
+
* Returns the smallest top-level-valid fragment of the editor's value
|
|
220
|
+
* that covers the current selection.
|
|
221
|
+
*
|
|
222
|
+
* Starts from {@link getSelectedValue}'s envelope and unwraps it toward
|
|
223
|
+
* the selection's lowest common ancestor, stopping at the deepest level
|
|
224
|
+
* whose siblings are all root-accepted types. Intermediate single-child
|
|
225
|
+
* containers (a single row inside a table, a single cell inside a row)
|
|
226
|
+
* are walked through to look for a deeper unwrap target; an intermediate
|
|
227
|
+
* level with multiple siblings (the lowest common ancestor across two
|
|
228
|
+
* cells in one row) ends the walk and the last root-valid wrapping is
|
|
229
|
+
* returned.
|
|
230
|
+
*
|
|
231
|
+
* Backs every registered clipboard converter, `editor.getFragment()`
|
|
232
|
+
* (which projects to blocks only), and the drag preview pipeline (which
|
|
233
|
+
* uses the paths to find DOM nodes). Exposed for custom converters and
|
|
234
|
+
* any consumer that needs the clipboard-shaped view of the current
|
|
235
|
+
* selection without redundant ancestor envelopes.
|
|
236
|
+
*
|
|
237
|
+
* @public
|
|
238
|
+
*/
|
|
239
|
+
declare const getFragment: EditorSelector<Array<{
|
|
240
|
+
node: PortableTextBlock;
|
|
241
|
+
path: BlockPath;
|
|
242
|
+
}>>;
|
|
243
|
+
/**
|
|
244
|
+
* Returns the last block at the current container scope.
|
|
245
|
+
*
|
|
246
|
+
* When the focus is inside an editable container (e.g. a code block's line),
|
|
247
|
+
* this returns the last block within that container (the last line). When
|
|
248
|
+
* the focus is at root, or there is no selection, this returns the last
|
|
249
|
+
* block in the document.
|
|
250
|
+
*
|
|
113
251
|
* @public
|
|
114
252
|
*/
|
|
115
253
|
declare const getLastBlock: EditorSelector<{
|
|
@@ -134,6 +272,12 @@ type MarkState = {
|
|
|
134
272
|
*/
|
|
135
273
|
declare const getMarkState: EditorSelector<MarkState | undefined>;
|
|
136
274
|
/**
|
|
275
|
+
* Returns the block after the selection's end block within the same
|
|
276
|
+
* container scope, if any.
|
|
277
|
+
*
|
|
278
|
+
* Siblings are resolved within the enclosing container (or the document root
|
|
279
|
+
* if the selection is at root level). Never crosses container boundaries.
|
|
280
|
+
*
|
|
137
281
|
* @public
|
|
138
282
|
*/
|
|
139
283
|
declare const getNextBlock: EditorSelector<{
|
|
@@ -141,6 +285,9 @@ declare const getNextBlock: EditorSelector<{
|
|
|
141
285
|
path: BlockPath;
|
|
142
286
|
} | undefined>;
|
|
143
287
|
/**
|
|
288
|
+
* Returns the inline object after the selection end within the same text
|
|
289
|
+
* block, resolved at any depth.
|
|
290
|
+
*
|
|
144
291
|
* @public
|
|
145
292
|
*/
|
|
146
293
|
declare const getNextInlineObject: EditorSelector<{
|
|
@@ -148,6 +295,9 @@ declare const getNextInlineObject: EditorSelector<{
|
|
|
148
295
|
path: ChildPath;
|
|
149
296
|
} | undefined>;
|
|
150
297
|
/**
|
|
298
|
+
* Returns all inline objects after the selection end within the same text
|
|
299
|
+
* block, resolved at any depth.
|
|
300
|
+
*
|
|
151
301
|
* @public
|
|
152
302
|
*/
|
|
153
303
|
declare const getNextInlineObjects: EditorSelector<Array<{
|
|
@@ -155,13 +305,22 @@ declare const getNextInlineObjects: EditorSelector<Array<{
|
|
|
155
305
|
path: ChildPath;
|
|
156
306
|
}>>;
|
|
157
307
|
/**
|
|
308
|
+
* Returns the span after the selection end within the same text block,
|
|
309
|
+
* resolved at any depth.
|
|
310
|
+
*
|
|
158
311
|
* @public
|
|
159
312
|
*/
|
|
160
313
|
declare const getNextSpan: EditorSelector<{
|
|
161
314
|
node: PortableTextSpan;
|
|
162
|
-
path:
|
|
315
|
+
path: Path;
|
|
163
316
|
} | undefined>;
|
|
164
317
|
/**
|
|
318
|
+
* Returns the block before the selection's start block within the same
|
|
319
|
+
* container scope, if any.
|
|
320
|
+
*
|
|
321
|
+
* Siblings are resolved within the enclosing container (or the document root
|
|
322
|
+
* if the selection is at root level). Never crosses container boundaries.
|
|
323
|
+
*
|
|
165
324
|
* @public
|
|
166
325
|
*/
|
|
167
326
|
declare const getPreviousBlock: EditorSelector<{
|
|
@@ -169,6 +328,9 @@ declare const getPreviousBlock: EditorSelector<{
|
|
|
169
328
|
path: BlockPath;
|
|
170
329
|
} | undefined>;
|
|
171
330
|
/**
|
|
331
|
+
* Returns the inline object before the selection start within the same text
|
|
332
|
+
* block, resolved at any depth.
|
|
333
|
+
*
|
|
172
334
|
* @public
|
|
173
335
|
*/
|
|
174
336
|
declare const getPreviousInlineObject: EditorSelector<{
|
|
@@ -176,6 +338,9 @@ declare const getPreviousInlineObject: EditorSelector<{
|
|
|
176
338
|
path: ChildPath;
|
|
177
339
|
} | undefined>;
|
|
178
340
|
/**
|
|
341
|
+
* Returns all inline objects before the selection start within the same text
|
|
342
|
+
* block, resolved at any depth.
|
|
343
|
+
*
|
|
179
344
|
* @public
|
|
180
345
|
*/
|
|
181
346
|
declare const getPreviousInlineObjects: EditorSelector<Array<{
|
|
@@ -183,13 +348,26 @@ declare const getPreviousInlineObjects: EditorSelector<Array<{
|
|
|
183
348
|
path: ChildPath;
|
|
184
349
|
}>>;
|
|
185
350
|
/**
|
|
351
|
+
* Returns the span before the selection start within the same text block,
|
|
352
|
+
* resolved at any depth.
|
|
353
|
+
*
|
|
186
354
|
* @public
|
|
187
355
|
*/
|
|
188
356
|
declare const getPreviousSpan: EditorSelector<{
|
|
189
357
|
node: PortableTextSpan;
|
|
190
|
-
path:
|
|
358
|
+
path: Path;
|
|
191
359
|
} | undefined>;
|
|
192
360
|
/**
|
|
361
|
+
* Returns the root-level blocks the selection covers.
|
|
362
|
+
*
|
|
363
|
+
* Only looks at direct children of the editor. If the selection is inside
|
|
364
|
+
* an editable container, the container itself is returned - not its inner
|
|
365
|
+
* blocks. Containers are preserved whole.
|
|
366
|
+
*
|
|
367
|
+
* Use for block-level operations like `move.block up/down` and
|
|
368
|
+
* drag-and-drop. For "selection as portable text" use `getSelectedValue`;
|
|
369
|
+
* for "text blocks at any depth" use `getSelectedTextBlocks`.
|
|
370
|
+
*
|
|
193
371
|
* @public
|
|
194
372
|
*/
|
|
195
373
|
declare const getSelectedBlocks: EditorSelector<Array<{
|
|
@@ -197,6 +375,8 @@ declare const getSelectedBlocks: EditorSelector<Array<{
|
|
|
197
375
|
path: BlockPath;
|
|
198
376
|
}>>;
|
|
199
377
|
/**
|
|
378
|
+
* Returns the spans touched by the selection, resolved at any depth.
|
|
379
|
+
*
|
|
200
380
|
* @public
|
|
201
381
|
*/
|
|
202
382
|
declare const getSelectedSpans: EditorSelector<Array<{
|
|
@@ -204,13 +384,30 @@ declare const getSelectedSpans: EditorSelector<Array<{
|
|
|
204
384
|
path: ChildPath;
|
|
205
385
|
}>>;
|
|
206
386
|
/**
|
|
387
|
+
* Returns the text blocks touched by the selection, resolved at any depth.
|
|
388
|
+
*
|
|
389
|
+
* Walks the tree between the selection endpoints and returns every text
|
|
390
|
+
* block found, regardless of container nesting. For toolbar state and
|
|
391
|
+
* anywhere that needs "text blocks with text in the selection".
|
|
392
|
+
*
|
|
207
393
|
* @public
|
|
208
394
|
*/
|
|
209
395
|
declare const getSelectedTextBlocks: EditorSelector<Array<{
|
|
210
396
|
node: PortableTextTextBlock;
|
|
211
|
-
path:
|
|
397
|
+
path: Path;
|
|
212
398
|
}>>;
|
|
213
399
|
/**
|
|
400
|
+
* Returns the portion of the document's value covered by the selection,
|
|
401
|
+
* resolved at any depth.
|
|
402
|
+
*
|
|
403
|
+
* Containers fully inside the selection are preserved verbatim. Containers
|
|
404
|
+
* on the selection boundary are recursed into so only the selected portion
|
|
405
|
+
* of their content is kept. Text blocks on the boundary are span-sliced.
|
|
406
|
+
*
|
|
407
|
+
* The result preserves the full ancestor envelope around the selection. For
|
|
408
|
+
* the clipboard-shaped view that unwraps the envelope toward the selection's
|
|
409
|
+
* lowest common ancestor, see {@link getFragment}.
|
|
410
|
+
*
|
|
214
411
|
* @public
|
|
215
412
|
*/
|
|
216
413
|
declare const getSelectedValue: EditorSelector<Array<PortableTextBlock>>;
|
|
@@ -219,6 +416,9 @@ declare const getSelectedValue: EditorSelector<Array<PortableTextBlock>>;
|
|
|
219
416
|
*/
|
|
220
417
|
declare const getSelection: EditorSelector<EditorSelection>;
|
|
221
418
|
/**
|
|
419
|
+
* Returns the block containing the selection's end point, resolved at any
|
|
420
|
+
* depth.
|
|
421
|
+
*
|
|
222
422
|
* @public
|
|
223
423
|
*/
|
|
224
424
|
declare const getSelectionEndBlock: EditorSelector<{
|
|
@@ -226,6 +426,9 @@ declare const getSelectionEndBlock: EditorSelector<{
|
|
|
226
426
|
path: BlockPath;
|
|
227
427
|
} | undefined>;
|
|
228
428
|
/**
|
|
429
|
+
* Returns the child containing the selection's end point, resolved at any
|
|
430
|
+
* depth.
|
|
431
|
+
*
|
|
229
432
|
* @public
|
|
230
433
|
*/
|
|
231
434
|
declare const getSelectionEndChild: EditorSelector<{
|
|
@@ -237,6 +440,9 @@ declare const getSelectionEndChild: EditorSelector<{
|
|
|
237
440
|
*/
|
|
238
441
|
declare const getSelectionEndPoint: EditorSelector<EditorSelectionPoint | undefined>;
|
|
239
442
|
/**
|
|
443
|
+
* Returns the block containing the selection's start point, resolved at any
|
|
444
|
+
* depth.
|
|
445
|
+
*
|
|
240
446
|
* @public
|
|
241
447
|
*/
|
|
242
448
|
declare const getSelectionStartBlock: EditorSelector<{
|
|
@@ -244,6 +450,9 @@ declare const getSelectionStartBlock: EditorSelector<{
|
|
|
244
450
|
path: BlockPath;
|
|
245
451
|
} | undefined>;
|
|
246
452
|
/**
|
|
453
|
+
* Returns the child containing the selection's start point, resolved at any
|
|
454
|
+
* depth.
|
|
455
|
+
*
|
|
247
456
|
* @public
|
|
248
457
|
*/
|
|
249
458
|
declare const getSelectionStartChild: EditorSelector<{
|
|
@@ -311,6 +520,12 @@ declare function isAtTheStartOfBlock(block: {
|
|
|
311
520
|
path: BlockPath;
|
|
312
521
|
}): EditorSelector<boolean>;
|
|
313
522
|
/**
|
|
523
|
+
* Returns true if the supplied selection shares at least one point with the
|
|
524
|
+
* editor's current selection. Resolves at any container depth.
|
|
525
|
+
*
|
|
526
|
+
* Two selections that touch at a single endpoint share that point and are
|
|
527
|
+
* considered overlapping.
|
|
528
|
+
*
|
|
314
529
|
* @public
|
|
315
530
|
*/
|
|
316
531
|
declare function isOverlappingSelection(selection: EditorSelection): EditorSelector<boolean>;
|
|
@@ -334,5 +549,5 @@ declare const isSelectionCollapsed: EditorSelector<boolean>;
|
|
|
334
549
|
* @public
|
|
335
550
|
*/
|
|
336
551
|
declare const isSelectionExpanded: EditorSelector<boolean>;
|
|
337
|
-
export { type MarkState, getActiveAnnotations, getActiveListItem, getActiveStyle, getAnchorBlock, getAnchorChild, getAnchorSpan, getAnchorTextBlock, getBlockOffsets, getBlockTextAfter, getBlockTextBefore, getCaretWordSelection, getFirstBlock, getFocusBlock, getFocusBlockObject, getFocusChild, getFocusInlineObject, getFocusListBlock, getFocusSpan, getFocusTextBlock, getLastBlock, getMarkState, getNextBlock, getNextInlineObject, getNextInlineObjects, getNextSpan, getPreviousBlock, getPreviousInlineObject, getPreviousInlineObjects, getPreviousSpan, getSelectedBlocks, getSelectedSpans, getSelectedTextBlocks, getSelectedValue, getSelection, getSelectionEndBlock, getSelectionEndChild, getSelectionEndPoint, getSelectionStartBlock, getSelectionStartChild, getSelectionStartPoint, getSelectionText, getValue, isActiveAnnotation, isActiveDecorator, isActiveListItem, isActiveStyle, isAtTheEndOfBlock, isAtTheStartOfBlock, isOverlappingSelection, isPointAfterSelection, isPointBeforeSelection, isSelectingEntireBlocks, isSelectionCollapsed, isSelectionExpanded };
|
|
552
|
+
export { type ApplicableSchema, type MarkState, compareApplicableSchema, getActiveAnnotations, getActiveListItem, getActiveStyle, getAnchorBlock, getAnchorChild, getAnchorSpan, getAnchorTextBlock, getApplicableSchema, getBlockOffsets, getBlockTextAfter, getBlockTextBefore, getCaretWordSelection, getFirstBlock, getFocusBlock, getFocusBlockObject, getFocusChild, getFocusInlineObject, getFocusListBlock, getFocusSpan, getFocusTextBlock, getFragment, getLastBlock, getMarkState, getNextBlock, getNextInlineObject, getNextInlineObjects, getNextSpan, getPreviousBlock, getPreviousInlineObject, getPreviousInlineObjects, getPreviousSpan, getSelectedBlocks, getSelectedSpans, getSelectedTextBlocks, getSelectedValue, getSelection, getSelectionEndBlock, getSelectionEndChild, getSelectionEndPoint, getSelectionStartBlock, getSelectionStartChild, getSelectionStartPoint, getSelectionText, getValue, isActiveAnnotation, isActiveDecorator, isActiveListItem, isActiveStyle, isAtTheEndOfBlock, isAtTheStartOfBlock, isOverlappingSelection, isPointAfterSelection, isPointBeforeSelection, isSelectingEntireBlocks, isSelectionCollapsed, isSelectionExpanded };
|
|
338
553
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../../src/selectors/selector.get-active-annotations.ts","../../src/selectors/selector.get-active-list-item.ts","../../src/selectors/selector.get-active-style.ts","../../src/selectors/selector.get-anchor-block.ts","../../src/selectors/selector.get-anchor-child.ts","../../src/selectors/selector.get-anchor-span.ts","../../src/selectors/selector.get-anchor-text-block.ts","../../src/selectors/selector.get-block-offsets.ts","../../src/selectors/selector.get-caret-word-selection.ts","../../src/selectors/selector.get-first-block.ts","../../src/selectors/selector.get-focus-block.ts","../../src/selectors/selector.get-focus-block-object.ts","../../src/selectors/selector.get-focus-child.ts","../../src/selectors/selector.get-focus-inline-object.ts","../../src/selectors/selector.get-focus-list-block.ts","../../src/selectors/selector.get-focus-span.ts","../../src/selectors/selector.get-focus-text-block.ts","../../src/selectors/selector.get-last-block.ts","../../src/selectors/selector.get-mark-state.ts","../../src/selectors/selector.get-next-block.ts","../../src/selectors/selector.get-next-inline-object.ts","../../src/selectors/selector.get-next-inline-objects.ts","../../src/selectors/selector.get-next-span.ts","../../src/selectors/selector.get-previous-block.ts","../../src/selectors/selector.get-previous-inline-object.ts","../../src/selectors/selector.get-previous-inline-objects.ts","../../src/selectors/selector.get-previous-span.ts","../../src/selectors/selector.get-selected-blocks.ts","../../src/selectors/selector.get-selected-spans.ts","../../src/selectors/selector.get-selected-text-blocks.ts","../../src/selectors/selector.get-selected-value.ts","../../src/selectors/selector.get-selection.ts","../../src/selectors/selector.get-selection-end-block.ts","../../src/selectors/selector.get-selection-end-child.ts","../../src/selectors/selector.get-selection-end-point.ts","../../src/selectors/selector.get-selection-start-block.ts","../../src/selectors/selector.get-selection-start-child.ts","../../src/selectors/selector.get-selection-start-point.ts","../../src/selectors/selector.get-selection-text.ts","../../src/selectors/selector.get-text-after.ts","../../src/selectors/selector.get-text-before.ts","../../src/selectors/selector.get-value.ts","../../src/selectors/selector.is-active-annotation.ts","../../src/selectors/selector.is-active-decorator.ts","../../src/selectors/selector.is-active-list-item.ts","../../src/selectors/selector.is-active-style.ts","../../src/selectors/selector.is-at-the-end-of-block.ts","../../src/selectors/selector.is-at-the-start-of-block.ts","../../src/selectors/selector.is-overlapping-selection.ts","../../src/selectors/selector.is-point-after-selection.ts","../../src/selectors/selector.is-point-before-selection.ts","../../src/selectors/selector.is-selecting-entire-blocks.ts","../../src/selectors/selector.is-selection-collapsed.ts","../../src/selectors/selector.is-selection-expanded.ts"],"sourcesContent":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../src/selectors/selector.get-applicable-schema.ts","../../src/selectors/selector.get-active-annotations.ts","../../src/selectors/selector.get-active-list-item.ts","../../src/selectors/selector.get-active-style.ts","../../src/selectors/selector.get-anchor-block.ts","../../src/selectors/selector.get-anchor-child.ts","../../src/selectors/selector.get-anchor-span.ts","../../src/selectors/selector.get-anchor-text-block.ts","../../src/selectors/selector.get-block-offsets.ts","../../src/selectors/selector.get-caret-word-selection.ts","../../src/selectors/selector.get-first-block.ts","../../src/selectors/selector.get-focus-block.ts","../../src/selectors/selector.get-focus-block-object.ts","../../src/selectors/selector.get-focus-child.ts","../../src/selectors/selector.get-focus-inline-object.ts","../../src/selectors/selector.get-focus-list-block.ts","../../src/selectors/selector.get-focus-span.ts","../../src/selectors/selector.get-focus-text-block.ts","../../src/selectors/selector.get-fragment.ts","../../src/selectors/selector.get-last-block.ts","../../src/selectors/selector.get-mark-state.ts","../../src/selectors/selector.get-next-block.ts","../../src/selectors/selector.get-next-inline-object.ts","../../src/selectors/selector.get-next-inline-objects.ts","../../src/selectors/selector.get-next-span.ts","../../src/selectors/selector.get-previous-block.ts","../../src/selectors/selector.get-previous-inline-object.ts","../../src/selectors/selector.get-previous-inline-objects.ts","../../src/selectors/selector.get-previous-span.ts","../../src/selectors/selector.get-selected-blocks.ts","../../src/selectors/selector.get-selected-spans.ts","../../src/selectors/selector.get-selected-text-blocks.ts","../../src/selectors/selector.get-selected-value.ts","../../src/selectors/selector.get-selection.ts","../../src/selectors/selector.get-selection-end-block.ts","../../src/selectors/selector.get-selection-end-child.ts","../../src/selectors/selector.get-selection-end-point.ts","../../src/selectors/selector.get-selection-start-block.ts","../../src/selectors/selector.get-selection-start-child.ts","../../src/selectors/selector.get-selection-start-point.ts","../../src/selectors/selector.get-selection-text.ts","../../src/selectors/selector.get-text-after.ts","../../src/selectors/selector.get-text-before.ts","../../src/selectors/selector.get-value.ts","../../src/selectors/selector.is-active-annotation.ts","../../src/selectors/selector.is-active-decorator.ts","../../src/selectors/selector.is-active-list-item.ts","../../src/selectors/selector.is-active-style.ts","../../src/selectors/selector.is-at-the-end-of-block.ts","../../src/selectors/selector.is-at-the-start-of-block.ts","../../src/selectors/selector.is-overlapping-selection.ts","../../src/selectors/selector.is-point-after-selection.ts","../../src/selectors/selector.is-point-before-selection.ts","../../src/selectors/selector.is-selecting-entire-blocks.ts","../../src/selectors/selector.is-selection-collapsed.ts","../../src/selectors/selector.is-selection-expanded.ts"],"sourcesContent":[],"mappings":";;;;;;AAWA;;;AAGS,KAHG,gBAAA,GAGH;EACC,UAAA,EAHI,WAGJ,CAAA,MAAA,CAAA;EACM,WAAA,EAHD,WAGC,CAAA,MAAA,CAAA;EACC,KAAA,EAHR,WAGQ,CAAA,MAAA,CAAA;EAAW,MAAA,EAFlB,WAEkB,CAAA,MAAA,CAAA;EAsCf,YAAA,EAvCG,WAoFf,CAAA,MAAA,CAAA;EAUe,aAAA,EA7FC,WA6FsB,CAAA,MAAA,CAAA;;ACrGvC;;;;;;ACDA;;ACAA;;ACEA;;;;;;ACCA;;;;;;;ACDA;;;;;;ACCA;;;;;;ACFa,cR8CA,mBQtBZ,ERsBiC,cQtBjC,CRsBgD,gBQtBhD,CAAA;;;;;;ACXD;;ACJA;AACS,iBV2FO,uBAAA,CU3FP,CAAA,EV4FJ,gBU5FI,EAAA,CAAA,EV6FJ,gBU7FI,CAAA,EAAA,OAAA;;;AVRT;AACc,cCHD,oBDGC,ECHqB,cDGrB,CCHoC,KDGpC,CCH0C,kBDG1C,CAAA,CAAA;;;AADd;AACc,cEJD,iBFIC,EEJkB,cFIlB,CEHZ,qBFGY,CAAA,UAAA,CAAA,GAAA,SAAA,CAAA;;;AADd;AACc,cGJD,cHIC,EGJe,cHIf,CGJ8B,qBHI9B,CAAA,OAAA,CAAA,CAAA;;AADd;;;;AAIU,cILG,cJKH,EILmB,cJKnB,CAAA;EACM,IAAA,EILP,iBJKO;EACC,IAAA,EINiB,SJM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