svedit 0.11.1 → 0.13.0

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.
Files changed (93) hide show
  1. package/README.md +260 -82
  2. package/dist/Command.svelte.d.ts +54 -29
  3. package/dist/Command.svelte.d.ts.map +1 -1
  4. package/dist/Command.svelte.js +286 -283
  5. package/dist/CustomProperty.svelte +3 -5
  6. package/dist/CustomProperty.svelte.d.ts +3 -6
  7. package/dist/CustomProperty.svelte.d.ts.map +1 -1
  8. package/dist/KeyMapper.svelte.d.ts +19 -6
  9. package/dist/KeyMapper.svelte.d.ts.map +1 -1
  10. package/dist/KeyMapper.svelte.js +95 -112
  11. package/dist/Node.svelte +40 -9
  12. package/dist/Node.svelte.d.ts +3 -5
  13. package/dist/Node.svelte.d.ts.map +1 -1
  14. package/dist/NodeArrayProperty.svelte +142 -18
  15. package/dist/NodeArrayProperty.svelte.d.ts +3 -5
  16. package/dist/NodeArrayProperty.svelte.d.ts.map +1 -1
  17. package/dist/NodeCaret.svelte +1 -1
  18. package/dist/NodeCaret.svelte.d.ts +6 -14
  19. package/dist/NodeCaret.svelte.d.ts.map +1 -1
  20. package/dist/NodeGap.svelte +60 -12
  21. package/dist/NodeGap.svelte.d.ts +7 -14
  22. package/dist/NodeGap.svelte.d.ts.map +1 -1
  23. package/dist/NodeGapMarkers.svelte +19 -10
  24. package/dist/NodeGapMarkers.svelte.d.ts +6 -11
  25. package/dist/NodeGapMarkers.svelte.d.ts.map +1 -1
  26. package/dist/NodeSelectionMarkers.svelte +20 -6
  27. package/dist/NodeSelectionMarkers.svelte.d.ts +2 -5
  28. package/dist/NodeSelectionMarkers.svelte.d.ts.map +1 -1
  29. package/dist/Session.svelte.d.ts +85 -116
  30. package/dist/Session.svelte.d.ts.map +1 -1
  31. package/dist/Session.svelte.js +543 -571
  32. package/dist/Svedit.svelte +243 -216
  33. package/dist/Svedit.svelte.d.ts +30 -10
  34. package/dist/Svedit.svelte.d.ts.map +1 -1
  35. package/dist/{AnnotatedTextProperty.svelte → TextProperty.svelte} +71 -56
  36. package/dist/TextProperty.svelte.d.ts +5 -0
  37. package/dist/TextProperty.svelte.d.ts.map +1 -0
  38. package/dist/Transaction.svelte.d.ts +101 -126
  39. package/dist/Transaction.svelte.d.ts.map +1 -1
  40. package/dist/Transaction.svelte.js +843 -827
  41. package/dist/UnknownNode.svelte +4 -3
  42. package/dist/UnknownNode.svelte.d.ts +5 -9
  43. package/dist/UnknownNode.svelte.d.ts.map +1 -1
  44. package/dist/doc_utils.d.ts +109 -122
  45. package/dist/doc_utils.d.ts.map +1 -1
  46. package/dist/doc_utils.js +726 -698
  47. package/dist/index.d.ts +20 -17
  48. package/dist/index.d.ts.map +1 -1
  49. package/dist/index.js +2 -18
  50. package/dist/node_visibility.svelte.d.ts +132 -5
  51. package/dist/node_visibility.svelte.d.ts.map +1 -1
  52. package/dist/node_visibility.svelte.js +535 -642
  53. package/dist/paste_utils.d.ts +11 -43
  54. package/dist/paste_utils.d.ts.map +1 -1
  55. package/dist/paste_utils.js +111 -149
  56. package/dist/transforms.svelte.d.ts +9 -7
  57. package/dist/transforms.svelte.d.ts.map +1 -1
  58. package/dist/transforms.svelte.js +126 -152
  59. package/dist/types.d.ts +329 -291
  60. package/dist/types.d.ts.map +1 -0
  61. package/dist/types.js +1 -0
  62. package/dist/utils.d.ts +79 -95
  63. package/dist/utils.d.ts.map +1 -1
  64. package/dist/utils.js +392 -305
  65. package/package.json +69 -67
  66. package/src/lib/{Command.svelte.js → Command.svelte.ts} +111 -41
  67. package/src/lib/CustomProperty.svelte +3 -5
  68. package/src/lib/{KeyMapper.svelte.js → KeyMapper.svelte.ts} +28 -11
  69. package/src/lib/Node.svelte +40 -9
  70. package/src/lib/NodeArrayProperty.svelte +142 -18
  71. package/src/lib/NodeCaret.svelte +1 -1
  72. package/src/lib/NodeGap.svelte +60 -12
  73. package/src/lib/NodeGapMarkers.svelte +19 -10
  74. package/src/lib/NodeSelectionMarkers.svelte +20 -6
  75. package/src/lib/Session.svelte.ts +656 -0
  76. package/src/lib/Svedit.svelte +243 -216
  77. package/src/lib/{AnnotatedTextProperty.svelte → TextProperty.svelte} +71 -56
  78. package/src/lib/Transaction.svelte.ts +1020 -0
  79. package/src/lib/UnknownNode.svelte +4 -3
  80. package/src/lib/doc_utils.ts +1120 -0
  81. package/src/lib/{index.js → index.ts} +48 -1
  82. package/src/lib/node_visibility.svelte.ts +658 -0
  83. package/src/lib/{paste_utils.js → paste_utils.ts} +51 -59
  84. package/src/lib/{transforms.svelte.js → transforms.svelte.ts} +44 -27
  85. package/src/lib/{types.d.ts → types.ts} +250 -103
  86. package/src/lib/utils.ts +660 -0
  87. package/dist/AnnotatedTextProperty.svelte.d.ts +0 -7
  88. package/dist/AnnotatedTextProperty.svelte.d.ts.map +0 -1
  89. package/src/lib/Session.svelte.js +0 -575
  90. package/src/lib/Transaction.svelte.js +0 -846
  91. package/src/lib/doc_utils.js +0 -807
  92. package/src/lib/node_visibility.svelte.js +0 -718
  93. package/src/lib/utils.js +0 -465
@@ -1,9 +1,10 @@
1
- <script>
1
+ <script lang="ts">
2
2
  import { getContext } from 'svelte';
3
3
  import Node from './Node.svelte';
4
+ import type { DocumentPath, SveditContext } from './types.js';
4
5
 
5
- const svedit = getContext('svedit');
6
- let { path } = $props();
6
+ const svedit = getContext<SveditContext>('svedit');
7
+ let { path }: { path: DocumentPath } = $props();
7
8
  let node = $derived(svedit.session.get(path));
8
9
  </script>
9
10
 
@@ -1,12 +1,8 @@
1
- export default UnknownNode;
2
- type UnknownNode = {
3
- $on?(type: string, callback: (e: any) => void): () => void;
4
- $set?(props: Partial<$$ComponentProps>): void;
5
- };
6
- declare const UnknownNode: import("svelte").Component<{
7
- path: any;
8
- }, {}, "">;
1
+ import type { DocumentPath } from './types.js';
9
2
  type $$ComponentProps = {
10
- path: any;
3
+ path: DocumentPath;
11
4
  };
5
+ declare const UnknownNode: import("svelte").Component<$$ComponentProps, {}, "">;
6
+ type UnknownNode = ReturnType<typeof UnknownNode>;
7
+ export default UnknownNode;
12
8
  //# sourceMappingURL=UnknownNode.svelte.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"UnknownNode.svelte.d.ts","sourceRoot":"","sources":["../src/lib/UnknownNode.svelte.js"],"names":[],"mappings":";;;;;AAqBA;UAV0B,GAAG;WAU6B;wBAVxC;IAAE,IAAI,EAAE,GAAG,CAAA;CAAE"}
1
+ {"version":3,"file":"UnknownNode.svelte.d.ts","sourceRoot":"","sources":["../src/lib/UnknownNode.svelte.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAiB,MAAM,YAAY,CAAC;AAE7D,KAAK,gBAAgB,GAAI;IAAE,IAAI,EAAE,YAAY,CAAA;CAAE,CAAC;AAiBjD,QAAA,MAAM,WAAW,sDAAwC,CAAC;AAC1D,KAAK,WAAW,GAAG,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC;AAClD,eAAe,WAAW,CAAC"}
@@ -1,29 +1,25 @@
1
+ /**
2
+ * Shared document utilities used by both Session and Transaction.
3
+ *
4
+ * These functions operate on the core document state (schema, doc, selection, config)
5
+ * without any history management or transaction tracking.
6
+ */
7
+ import type { NodeId, DocumentPath, PrimitiveType, PropertyDefinition, NodeProperty, NodeArrayProperty, NodeSchema, NodeKind, DocumentSchema, Selection, Attachment, Document, DocumentNode, ValidateDocumentSchema, Inspection, DocumentOperation, SessionConfig } from './types.js';
1
8
  /**
2
9
  * Identity function — keeps schema at runtime & makes IDE infer types.
3
10
  * Similar to your define_schema pattern but for document schemas.
4
- *
5
- * @template {Record<string, NodeSchema>} S
6
- * @param {S & ValidateDocumentSchema<S>} schema - The document schema to validate
7
- * @returns {S} The same schema, but with type information preserved
8
11
  */
9
- export function define_document_schema<S extends Record<string, NodeSchema>>(schema: S & ValidateDocumentSchema<S>): S;
12
+ export declare function define_document_schema<S extends Record<string, NodeSchema>>(schema: S & ValidateDocumentSchema<S>): S;
10
13
  /**
11
14
  * Check if a string represents a valid primitive type.
12
- * @param {string} type - The type string to check
13
- * @returns {type is PrimitiveType} True if it's a valid primitive type
14
15
  */
15
- export function is_primitive_type(type: string): type is PrimitiveType;
16
+ export declare function is_primitive_type(type: string): type is PrimitiveType;
16
17
  /**
17
18
  * Get the default node type for a property that references nodes.
18
- * @param {NodeProperty | NodeArrayProperty} property_definition - The property definition
19
- * @returns {string | null} The default node type, or null if none specified
19
+ * Returns null if none specified.
20
20
  */
21
- export function get_default_node_type(property_definition: NodeProperty | NodeArrayProperty): string | null;
22
- /**
23
- * @param {import('./types').PropertyDefinition} property_definition
24
- * @returns {any}
25
- */
26
- export function get_property_default(property_definition: import("./types").PropertyDefinition): any;
21
+ export declare function get_default_node_type(property_definition: NodeProperty | NodeArrayProperty): string | null;
22
+ export declare function get_property_default(property_definition: PropertyDefinition): any;
27
23
  /**
28
24
  * Fill omitted properties with schema defaults and Svedit's built-in type defaults.
29
25
  *
@@ -32,11 +28,9 @@ export function get_property_default(property_definition: import("./types").Prop
32
28
  * schema changes cannot be represented by defaults, such as property renames or
33
29
  * data transformations.
34
30
  *
35
- * @param {any} node - The node to fill defaults for
36
- * @param {DocumentSchema} schema - The document schema
37
- * @returns {any} A shallow copy of the node with cloned default values filled in
31
+ * @returns A shallow copy of the node with cloned default values filled in
38
32
  */
39
- export function fill_node_defaults(node: any, schema: DocumentSchema): any;
33
+ export declare function fill_node_defaults(node: DocumentNode, schema: DocumentSchema): DocumentNode;
40
34
  /**
41
35
  * Fill omitted properties with schema defaults and Svedit's built-in type defaults across a document.
42
36
  *
@@ -44,162 +38,155 @@ export function fill_node_defaults(node: any, schema: DocumentSchema): any;
44
38
  * by itself. Call this as one step in an explicit document migration when it is
45
39
  * appropriate.
46
40
  *
47
- * @param {Document} doc - The document to fill defaults for
48
- * @param {DocumentSchema} schema - The document schema
49
- * @returns {Document} A document copy with cloned default values filled in
41
+ * @returns A document copy with cloned default values filled in
50
42
  */
51
- export function fill_document_defaults(doc: Document, schema: DocumentSchema): Document;
43
+ export declare function fill_document_defaults(doc: Document, schema: DocumentSchema): Document;
52
44
  /**
53
45
  * Validate a document schema to ensure all referenced node types exist.
54
- * @param {DocumentSchema} document_schema - The document schema to validate
55
46
  * @throws {Error} Throws if the document schema is invalid
56
47
  */
57
- export function validate_document_schema(document_schema: DocumentSchema): void;
48
+ export declare function validate_document_schema(document_schema: DocumentSchema): void;
58
49
  /**
59
- * @param {string} id
60
- * @returns {boolean}
50
+ * Validate that no annotation node type has a registered component.
51
+ *
52
+ * Marks render in-place via components; annotations are data-only overlay
53
+ * ranges that must be interpreted by the app (via CSS classes or props).
54
+ *
55
+ * @throws {Error} Throws if a kind 'annotation' type has a registered component
61
56
  */
62
- export function is_id_valid(id: string): boolean;
57
+ export declare function validate_config_components(schema: DocumentSchema, config: SessionConfig): void;
58
+ export declare function is_id_valid(id: string): boolean;
63
59
  /**
64
60
  * Validate a node against its schema.
65
- * @param {any} node - The node to validate
66
- * @param {DocumentSchema} schema - The document schema
67
- * @param {Record<string, any>} all_nodes - All nodes in the document to check references
68
- * @param {{ require_references?: boolean }} [options] - Validation options
61
+ *
62
+ * @param node - The node to validate
63
+ * @param schema - The document schema
64
+ * @param all_nodes - All nodes in the document to check references
65
+ * @param options - Validation options
69
66
  * @throws {Error} Throws if the node is invalid
70
67
  */
71
- export function validate_node(node: any, schema: DocumentSchema, all_nodes?: Record<string, any>, options?: {
68
+ export declare function validate_node(node: DocumentNode, schema: DocumentSchema, all_nodes?: Record<string, DocumentNode>, options?: {
72
69
  require_references?: boolean;
73
70
  }): void;
74
71
  /**
75
72
  * Validate a document against its schema.
76
73
  *
77
- * @param {Document} doc - The document to validate
78
- * @param {DocumentSchema} schema - The document schema
79
74
  * @throws {Error} Throws if the document is invalid
80
75
  */
81
- export function validate_document(doc: Document, schema: DocumentSchema): void;
76
+ export declare function validate_document(doc: Document, schema: DocumentSchema): void;
82
77
  /**
83
78
  * Gets a value from the document at the specified path.
84
79
  *
85
- * @param {DocumentSchema} schema - The document schema
86
- * @param {Document} doc - The document containing nodes
87
- * @param {DocumentPath|string} path - Array path to the value, or a string node ID
88
- * @returns {any} The value at the specified path
80
+ * @param schema - The document schema
81
+ * @param doc - The document containing nodes
82
+ * @param path - Array path to the value, or a string node ID
83
+ * @returns The value at the specified path
89
84
  */
90
- export function get(schema: DocumentSchema, doc: Document, path: DocumentPath | string): any;
85
+ export declare function get(schema: DocumentSchema, doc: Document, path: DocumentPath | string): any;
91
86
  /**
92
87
  * Gets the type of a property from the schema.
93
- *
94
- * @param {object} schema - The document schema
95
- * @param {string} type - The node type
96
- * @param {string} property - The property name
97
- * @returns {string} The property type
98
88
  */
99
- export function property_type(schema: object, type: string, property: string): string;
89
+ export declare function property_type(schema: DocumentSchema, type: string, property: string): string;
100
90
  /**
101
- * Determines the kind of a node ('block', 'text', or 'annotation').
102
- *
103
- * @param {object} schema - The document schema
104
- * @param {any} node - The node to check
105
- * @returns {'block'|'text'|'annotation'} The node kind
91
+ * Determines the kind of a node ('document', 'block', 'text', 'mark', or 'annotation').
92
+ */
93
+ export declare function kind(schema: DocumentSchema, node: DocumentNode): NodeKind;
94
+ /**
95
+ * Inspects a path to get metadata about the value at that location.
106
96
  */
107
- export function kind(schema: object, node: any): "block" | "text" | "annotation";
97
+ export declare function inspect(schema: DocumentSchema, doc: Document, path: DocumentPath): Inspection;
108
98
  /**
109
- * Checks whether an annotation node can be switched to another annotation type
110
- * without losing data.
99
+ * Creates a mutable draft of a document: a new document object with a new
100
+ * nodes map, sharing the (immutable) node objects with the original.
111
101
  *
112
- * @param {DocumentSchema} schema - The document schema
113
- * @param {any} annotation_node - The annotation node to switch
114
- * @param {string} target_annotation_type - The target annotation type
115
- * @returns {boolean} True if the annotation can be switched safely
102
+ * apply_op_to_draft mutates the draft's nodes map but copies node objects
103
+ * before changing them, so node identity is preserved for unchanged nodes
104
+ * (fine-grained rendering relies on this) and the original document is
105
+ * never touched.
106
+ *
107
+ * @returns A draft document safe to mutate via apply_op_to_draft
116
108
  */
117
- export function can_switch_annotation_type(schema: DocumentSchema, annotation_node: any, target_annotation_type: string): boolean;
109
+ export declare function create_document_draft(doc: Document): Document;
118
110
  /**
119
- * Inspects a path to get metadata about the value at that location.
111
+ * Applies an operation to a document draft in place.
120
112
  *
121
- * @param {DocumentSchema} schema - The document schema
122
- * @param {Document} doc - The document containing nodes
123
- * @param {DocumentPath} path - The path to inspect
124
- * @returns {{kind: 'property'|'node', [key: string]: any}} Metadata about the path
113
+ * The draft's nodes map is mutated, but node objects are copied on write —
114
+ * one nodes-map copy per draft (see create_document_draft) replaces the
115
+ * previous one-copy-per-op behavior, which made transactions with many ops
116
+ * (paste, cascade delete) O(N·ops).
117
+ *
118
+ * @param draft - A draft created via create_document_draft
119
+ * @param op - The operation to apply [type, ...args]
120
+ * @returns The same draft, for convenience
125
121
  */
126
- export function inspect(schema: DocumentSchema, doc: Document, path: DocumentPath): {
127
- kind: "property" | "node";
128
- [key: string]: any;
129
- };
122
+ export declare function apply_op_to_draft(draft: Document, op: DocumentOperation): Document;
130
123
  /**
131
124
  * Applies an operation to a document and returns the new document.
132
125
  * Uses copy-on-write semantics.
133
126
  *
134
- * @param {Document} doc - The document to apply the operation to
135
- * @param {Array} op - The operation to apply [type, ...args]
136
- * @returns {Document} The new document with the operation applied
127
+ * @param doc - The document to apply the operation to
128
+ * @param op - The operation to apply [type, ...args]
129
+ * @returns The new document with the operation applied
137
130
  */
138
- export function apply_op(doc: Document, op: any[]): Document;
131
+ export declare function apply_op(doc: Document, op: DocumentOperation): Document;
139
132
  /**
140
133
  * Counts how many times a node is referenced in the document.
141
- *
142
- * @param {DocumentSchema} schema - The document schema
143
- * @param {Document} doc - The document containing nodes
144
- * @param {NodeId} node_id - The node ID to count references for
145
- * @returns {number} The number of references
146
134
  */
147
- export function count_references(schema: DocumentSchema, doc: Document, node_id: NodeId): number;
135
+ export declare function count_references(schema: DocumentSchema, doc: Document, node_id: NodeId): number;
148
136
  /**
149
- * Gets the currently active annotation at the selection, optionally filtered by type.
150
- *
151
- * An annotation is considered "active" if it overlaps with the current selection in any way:
152
- * - Annotation contains the selection start
153
- * - Annotation contains the selection end
154
- * - Selection fully contains the annotation
155
- *
156
- * @param {DocumentSchema} schema - The document schema
157
- * @param {Document} doc - The document containing nodes
158
- * @param {Selection} [selection] - The current selection
159
- * @param {string} [annotation_type] - Optional annotation type to filter by
160
- * @returns {Annotation | null} The active annotation, or null if none found
137
+ * Whether a mark can be switched between these types.
138
+ */
139
+ export declare function can_switch_mark_type(schema: DocumentSchema, from_type: string, to_type: string): boolean;
140
+ /**
141
+ * An attachment (mark or annotation) enriched with its index in the parent
142
+ * attachment array and the resolved payload node.
143
+ */
144
+ export type SelectedAttachment = Attachment & {
145
+ index: number;
146
+ node: DocumentNode;
147
+ };
148
+ /**
149
+ * Gets marks touched by the current selection.
150
+ */
151
+ export declare function get_selected_marks(schema: DocumentSchema, doc: Document, selection?: Selection | null): SelectedAttachment[];
152
+ /**
153
+ * Gets annotations touched by the current selection.
154
+ */
155
+ export declare function get_selected_annotations(schema: DocumentSchema, doc: Document, selection?: Selection | null): SelectedAttachment[];
156
+ /**
157
+ * Node types represented in the selected ranges.
161
158
  */
162
- export function get_active_annotation(schema: DocumentSchema, doc: Document, selection?: Selection, annotation_type?: string): Annotation | null;
159
+ export declare function get_selected_range_types(selected_ranges: SelectedAttachment[]): Set<string>;
163
160
  /**
164
161
  * Counts references to a node, excluding nodes marked for deletion.
165
- *
166
- * @param {DocumentSchema} schema - The document schema
167
- * @param {Document} doc - The document containing nodes
168
- * @param {NodeId} target_node_id - The node ID to count references for
169
- * @param {Record<NodeId, boolean>} nodes_to_delete - Nodes marked for deletion
170
- * @returns {number} The number of references excluding deleted nodes
171
162
  */
172
- export function count_references_excluding_deleted(schema: DocumentSchema, doc: Document, target_node_id: NodeId, nodes_to_delete: Record<NodeId, boolean>): number;
163
+ export declare function count_references_excluding_deleted(schema: DocumentSchema, doc: Document, target_node_id: NodeId, nodes_to_delete: Record<NodeId, boolean>): number;
164
+ /**
165
+ * Iterates all node references going out of a node, invoking the visitor
166
+ * once per occurrence (multiplicity matters for reference counting).
167
+ * Covers the same reference kinds as count_references_excluding_deleted:
168
+ * a `node` property, `node_array` .nodes ids, and the mark/annotation
169
+ * node_ids carried on `text` and `node_array` properties.
170
+ */
171
+ export declare function visit_node_references(schema: DocumentSchema, node: DocumentNode, visit: (referenced_id: NodeId) => void): void;
172
+ /**
173
+ * Builds reference counts for every referenced node in one full-document
174
+ * scan. Used by cascade deletion so the fixpoint can decrement counts
175
+ * incrementally instead of re-scanning the document per candidate node.
176
+ */
177
+ export declare function build_reference_counts(schema: DocumentSchema, doc: Document): Map<NodeId, number>;
173
178
  /**
174
179
  * Gets ids of nodes that reference any of the target nodes.
175
- *
176
- * @param {DocumentSchema} schema - The document schema
177
- * @param {Document} doc - The document containing nodes
178
- * @param {Iterable<NodeId>} target_node_ids - Node IDs to find referrers for
179
- * @returns {NodeId[]} IDs of nodes with references to any target node
180
180
  */
181
- export function get_referencing_node_ids(schema: DocumentSchema, doc: Document, target_node_ids: Iterable<NodeId>): NodeId[];
181
+ export declare function get_referencing_node_ids(schema: DocumentSchema, doc: Document, target_node_ids: Iterable<NodeId>): NodeId[];
182
182
  /**
183
183
  * Validates a selection against the current document state.
184
184
  * Works with any object that implements get() and inspect() (Session or Transaction).
185
185
  *
186
- * @param {Selection} selection - The selection to validate
187
- * @param {{ get: Function, inspect: Function }} session_or_transaction - A Session or Transaction instance
188
186
  * @throws {Error} Throws if the selection is invalid
189
187
  */
190
- export function validate_selection(selection: Selection, session_or_transaction: {
191
- get: Function;
192
- inspect: Function;
188
+ export declare function validate_selection(selection: Selection | null | undefined, session_or_transaction: {
189
+ get: (path: DocumentPath) => any;
190
+ inspect: (path: DocumentPath) => Inspection;
193
191
  }): void;
194
- import type { NodeSchema } from './types';
195
- import type { ValidateDocumentSchema } from './types';
196
- import type { PrimitiveType } from './types';
197
- import type { NodeProperty } from './types';
198
- import type { NodeArrayProperty } from './types';
199
- import type { DocumentSchema } from './types';
200
- import type { Document } from './types';
201
- import type { DocumentPath } from './types';
202
- import type { NodeId } from './types';
203
- import type { Selection } from './types';
204
- import type { Annotation } from './types';
205
192
  //# sourceMappingURL=doc_utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"doc_utils.d.ts","sourceRoot":"","sources":["../src/lib/doc_utils.js"],"names":[],"mappings":"AAiBA;;;;;;;GAOG;AACH,uCAJ0C,CAAC,SAA7B,MAAM,CAAC,MAAM,EAAE,UAAU,CAAE,UAC9B,CAAC,GAAG,uBAAuB,CAAC,CAAC,GAC3B,CAAC,CAIb;AAED;;;;GAIG;AACH,wCAHW,MAAM,GACJ,IAAI,IAAI,aAAa,CAejC;AAED;;;;GAIG;AACH,2DAHW,YAAY,GAAG,iBAAiB,GAC9B,MAAM,GAAG,IAAI,CAWzB;AAED;;;GAGG;AACH,0DAHW,OAAO,SAAS,EAAE,kBAAkB,GAClC,GAAG,CAqBf;AAED;;;;;;;;;;;GAWG;AACH,yCAJW,GAAG,UACH,cAAc,GACZ,GAAG,CAgBf;AAED;;;;;;;;;;GAUG;AACH,4CAJW,QAAQ,UACR,cAAc,GACZ,QAAQ,CAcpB;AAED;;;;GAIG;AACH,0DAHW,cAAc,QAoBxB;AAoHD;;;GAGG;AACH,gCAHW,MAAM,GACJ,OAAO,CAInB;AAED;;;;;;;GAOG;AACH,oCANW,GAAG,UACH,cAAc,cACd,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,YACnB;IAAE,kBAAkB,CAAC,EAAE,OAAO,CAAA;CAAE,QAwF1C;AAED;;;;;;GAMG;AACH,uCAJW,QAAQ,UACR,cAAc,QAUxB;AAED;;;;;;;GAOG;AACH,4BALW,cAAc,OACd,QAAQ,QACR,YAAY,GAAC,MAAM,GACjB,GAAG,CA4Ef;AAED;;;;;;;GAOG;AACH,sCALW,MAAM,QACN,MAAM,YACN,MAAM,GACJ,MAAM,CAclB;AAED;;;;;;GAMG;AACH,6BAJ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