svedit 0.12.0 → 0.14.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 (88) hide show
  1. package/README.md +35 -22
  2. package/dist/Command.svelte.d.ts +38 -30
  3. package/dist/Command.svelte.d.ts.map +1 -1
  4. package/dist/Command.svelte.js +271 -326
  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 +16 -13
  12. package/dist/Node.svelte.d.ts +3 -5
  13. package/dist/Node.svelte.d.ts.map +1 -1
  14. package/dist/NodeArrayProperty.svelte +39 -22
  15. package/dist/NodeArrayProperty.svelte.d.ts +3 -5
  16. package/dist/NodeArrayProperty.svelte.d.ts.map +1 -1
  17. package/dist/NodeCaret.svelte +2 -2
  18. package/dist/NodeCaret.svelte.d.ts +6 -14
  19. package/dist/NodeCaret.svelte.d.ts.map +1 -1
  20. package/dist/NodeGap.svelte +12 -6
  21. package/dist/NodeGap.svelte.d.ts +7 -14
  22. package/dist/NodeGap.svelte.d.ts.map +1 -1
  23. package/dist/NodeGapMarkers.svelte +36 -14
  24. package/dist/NodeGapMarkers.svelte.d.ts +6 -11
  25. package/dist/NodeGapMarkers.svelte.d.ts.map +1 -1
  26. package/dist/NodeSelectionMarkers.svelte +21 -7
  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 +81 -129
  30. package/dist/Session.svelte.d.ts.map +1 -1
  31. package/dist/Session.svelte.js +542 -648
  32. package/dist/Svedit.svelte +146 -140
  33. package/dist/Svedit.svelte.d.ts +30 -10
  34. package/dist/Svedit.svelte.d.ts.map +1 -1
  35. package/dist/TextProperty.svelte +37 -23
  36. package/dist/TextProperty.svelte.d.ts +3 -5
  37. package/dist/TextProperty.svelte.d.ts.map +1 -1
  38. package/dist/Transaction.svelte.d.ts +64 -127
  39. package/dist/Transaction.svelte.d.ts.map +1 -1
  40. package/dist/Transaction.svelte.js +839 -1001
  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 +67 -155
  45. package/dist/doc_utils.d.ts.map +1 -1
  46. package/dist/doc_utils.js +619 -863
  47. package/dist/index.d.ts +20 -17
  48. package/dist/index.d.ts.map +1 -1
  49. package/dist/index.js +1 -17
  50. package/dist/node_visibility.svelte.d.ts +110 -9
  51. package/dist/node_visibility.svelte.d.ts.map +1 -1
  52. package/dist/node_visibility.svelte.js +473 -544
  53. package/dist/paste_utils.d.ts +11 -44
  54. package/dist/paste_utils.d.ts.map +1 -1
  55. package/dist/paste_utils.js +111 -152
  56. package/dist/styles/svedit-colors.css +8 -5
  57. package/dist/transforms.svelte.d.ts +9 -7
  58. package/dist/transforms.svelte.d.ts.map +1 -1
  59. package/dist/transforms.svelte.js +125 -150
  60. package/dist/types.d.ts +294 -309
  61. package/dist/types.d.ts.map +1 -0
  62. package/dist/types.js +1 -0
  63. package/dist/utils.d.ts +40 -119
  64. package/dist/utils.d.ts.map +1 -1
  65. package/dist/utils.js +346 -473
  66. package/package.json +70 -70
  67. package/src/lib/{Command.svelte.js → Command.svelte.ts} +29 -17
  68. package/src/lib/CustomProperty.svelte +3 -5
  69. package/src/lib/{KeyMapper.svelte.js → KeyMapper.svelte.ts} +28 -11
  70. package/src/lib/Node.svelte +16 -13
  71. package/src/lib/NodeArrayProperty.svelte +39 -22
  72. package/src/lib/NodeCaret.svelte +2 -2
  73. package/src/lib/NodeGap.svelte +12 -6
  74. package/src/lib/NodeGapMarkers.svelte +36 -14
  75. package/src/lib/NodeSelectionMarkers.svelte +21 -7
  76. package/src/lib/{Session.svelte.js → Session.svelte.ts} +130 -127
  77. package/src/lib/Svedit.svelte +146 -140
  78. package/src/lib/TextProperty.svelte +37 -23
  79. package/src/lib/{Transaction.svelte.js → Transaction.svelte.ts} +139 -143
  80. package/src/lib/UnknownNode.svelte +4 -3
  81. package/src/lib/{doc_utils.js → doc_utils.ts} +247 -206
  82. package/src/lib/{index.js → index.ts} +48 -0
  83. package/src/lib/{node_visibility.svelte.js → node_visibility.svelte.ts} +68 -92
  84. package/src/lib/{paste_utils.js → paste_utils.ts} +47 -58
  85. package/src/lib/styles/svedit-colors.css +8 -5
  86. package/src/lib/{transforms.svelte.js → transforms.svelte.ts} +39 -21
  87. package/src/lib/{types.d.ts → types.ts} +161 -66
  88. package/src/lib/{utils.js → utils.ts} +110 -129
@@ -1,47 +1,14 @@
1
- /**
2
- * @import { DocumentSchema } from './types.d.ts'
3
- */
4
- export function normalize_line_endings(text: any): any;
5
- export function dedent_plain_text(plain_text: any): any;
6
- export function split_plain_text_paragraphs(plain_text: any): any;
7
- export function normalize_plain_text_for_single_line_property(plain_text: any): any;
8
- /**
9
- * @param {string | null | undefined} node_type
10
- * @param {DocumentSchema} schema
11
- * @returns {string | null}
12
- */
13
- export function get_text_property_name(node_type: string | null | undefined, schema: DocumentSchema): string | null;
14
- /**
15
- * @param {any} node
16
- * @param {DocumentSchema} schema
17
- * @returns {{ content: string, marks: any[], annotations: any[] } | null}
18
- */
19
- export function get_text_content(node: any, schema: DocumentSchema): {
20
- content: string;
21
- marks: any[];
22
- annotations: any[];
23
- } | null;
24
- /**
25
- * @param {any} node
26
- * @param {DocumentSchema} schema
27
- * @returns {boolean}
28
- */
29
- export function is_text_like_node_payload(node: any, schema: DocumentSchema): boolean;
30
- /**
31
- * @param {any} node_array_property_definition
32
- * @param {DocumentSchema} schema
33
- * @returns {string | null}
34
- */
35
- export function get_default_text_node(node_array_property_definition: any, schema: DocumentSchema): string | null;
36
- /**
37
- * @param {string[]} paragraph_fragments
38
- * @param {string | null | undefined} node_type
39
- * @param {DocumentSchema} schema
40
- * @returns {{ main_nodes: string[], nodes: Record<string, any> } | null}
41
- */
42
- export function create_plain_text_nodes_payload(paragraph_fragments: string[], node_type: string | null | undefined, schema: DocumentSchema): {
1
+ import type { Text, DocumentNode, DocumentSchema } from './types.js';
2
+ export declare function normalize_line_endings(text: string): string;
3
+ export declare function dedent_plain_text(plain_text: string): string;
4
+ export declare function split_plain_text_paragraphs(plain_text: string): string[];
5
+ export declare function normalize_plain_text_for_single_line_property(plain_text: string): string;
6
+ export declare function get_text_property_name(node_type: string | null | undefined, schema: DocumentSchema): string | null;
7
+ export declare function get_text_content(node: unknown, schema: DocumentSchema): Text | null;
8
+ export declare function is_text_like_node_payload(node: unknown, schema: DocumentSchema): boolean;
9
+ export declare function get_default_text_node(node_array_property_definition: unknown, schema: DocumentSchema): string | null;
10
+ export declare function create_plain_text_nodes_payload(paragraph_fragments: string[], node_type: string | null | undefined, schema: DocumentSchema): {
43
11
  main_nodes: string[];
44
- nodes: Record<string, any>;
12
+ nodes: Record<string, DocumentNode>;
45
13
  } | null;
46
- import type { DocumentSchema } from './types.d.ts';
47
14
  //# sourceMappingURL=paste_utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"paste_utils.d.ts","sourceRoot":"","sources":["../src/lib/paste_utils.js"],"names":[],"mappings":"AAAA;;GAEG;AAEH,uDAEC;AAED,wDAkCC;AAED,kEAKC;AAED,oFAEC;AAED;;;;GAIG;AACH,kDAJW,MAAM,GAAG,IAAI,GAAG,SAAS,UACzB,cAAc,GACZ,MAAM,GAAG,IAAI,CAYzB;AAED;;;;GAIG;AACH,uCAJW,GAAG,UACH,cAAc,GACZ;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,GAAG,EAAE,CAAC;IAAC,WAAW,EAAE,GAAG,EAAE,CAAA;CAAE,GAAG,IAAI,CAqBxE;AAED;;;;GAIG;AACH,gDAJW,GAAG,UACH,cAAc,GACZ,OAAO,CAMnB;AAED;;;;GAIG;AACH,sEAJW,GAAG,UACH,cAAc,GACZ,MAAM,GAAG,IAAI,CAoBzB;AAED;;;;;GAKG;AACH,qEALW,MAAM,EAAE,aACR,MAAM,GAAG,IAAI,GAAG,SAAS,UACzB,cAAc,GACZ;IAAE,UAAU,EAAE,MAAM,EAAE,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;CAAE,GAAG,IAAI,CA+BvE;oCAxKkC,cAAc"}
1
+ {"version":3,"file":"paste_utils.d.ts","sourceRoot":"","sources":["../src/lib/paste_utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAerE,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE3D;AAED,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAkC5D;AAED,wBAAgB,2BAA2B,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,EAAE,CAKxE;AAED,wBAAgB,6CAA6C,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAExF;AAED,wBAAgB,sBAAsB,CACrC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACpC,MAAM,EAAE,cAAc,GACpB,MAAM,GAAG,IAAI,CAUf;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,cAAc,GAAG,IAAI,GAAG,IAAI,CAcnF;AAED,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,cAAc,GAAG,OAAO,CAIxF;AAED,wBAAgB,qBAAqB,CACpC,8BAA8B,EAAE,OAAO,EACvC,MAAM,EAAE,cAAc,GACpB,MAAM,GAAG,IAAI,CAiBf;AAED,wBAAgB,+BAA+B,CAC9C,mBAAmB,EAAE,MAAM,EAAE,EAC7B,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACpC,MAAM,EAAE,cAAc,GACpB;IAAE,UAAU,EAAE,MAAM,EAAE,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAA;CAAE,GAAG,IAAI,CA6BtE"}
@@ -1,170 +1,129 @@
1
- /**
2
- * @import { DocumentSchema } from './types.d.ts'
3
- */
4
-
1
+ function is_record(value) {
2
+ return typeof value === 'object' && value !== null;
3
+ }
4
+ function is_text(value) {
5
+ return (is_record(value) &&
6
+ typeof value.content === 'string' &&
7
+ Array.isArray(value.marks) &&
8
+ Array.isArray(value.annotations));
9
+ }
5
10
  export function normalize_line_endings(text) {
6
- return text.replace(/\r\n/g, '\n').replace(/\r/g, '\n');
11
+ return text.replace(/\r\n/g, '\n').replace(/\r/g, '\n');
7
12
  }
8
-
9
13
  export function dedent_plain_text(plain_text) {
10
- const lines = normalize_line_endings(plain_text).split('\n');
11
- if (lines.length < 2) return plain_text;
12
-
13
- const non_empty_lines = lines.filter((line) => line.trim().length > 0);
14
- if (non_empty_lines.length === 0) return plain_text;
15
-
16
- const indented_non_empty_lines = non_empty_lines.filter((line) => /^[\t ]+/.test(line));
17
- const indented_line_ratio = indented_non_empty_lines.length / non_empty_lines.length;
18
- if (indented_line_ratio < 0.8) return plain_text;
19
-
20
- const leading_whitespace_lengths = indented_non_empty_lines
21
- .map((line) => line.match(/^[\t ]+/)?.[0].length || 0)
22
- .filter(Boolean);
23
- if (leading_whitespace_lengths.length === 0) return plain_text;
24
-
25
- const dedent_size = Math.min(...leading_whitespace_lengths);
26
- if (dedent_size <= 0) return plain_text;
27
-
28
- return lines
29
- .map((line) => {
30
- if (line.trim().length === 0) return line;
31
- let removable_count = 0;
32
- while (removable_count < dedent_size && removable_count < line.length) {
33
- const char = line[removable_count];
34
- if (char === ' ' || char === '\t') {
35
- removable_count += 1;
36
- } else {
37
- break;
38
- }
39
- }
40
- return line.slice(removable_count);
41
- })
42
- .join('\n');
14
+ const lines = normalize_line_endings(plain_text).split('\n');
15
+ if (lines.length < 2)
16
+ return plain_text;
17
+ const non_empty_lines = lines.filter((line) => line.trim().length > 0);
18
+ if (non_empty_lines.length === 0)
19
+ return plain_text;
20
+ const indented_non_empty_lines = non_empty_lines.filter((line) => /^[\t ]+/.test(line));
21
+ const indented_line_ratio = indented_non_empty_lines.length / non_empty_lines.length;
22
+ if (indented_line_ratio < 0.8)
23
+ return plain_text;
24
+ const leading_whitespace_lengths = indented_non_empty_lines
25
+ .map((line) => line.match(/^[\t ]+/)?.[0].length || 0)
26
+ .filter(Boolean);
27
+ if (leading_whitespace_lengths.length === 0)
28
+ return plain_text;
29
+ const dedent_size = Math.min(...leading_whitespace_lengths);
30
+ if (dedent_size <= 0)
31
+ return plain_text;
32
+ return lines
33
+ .map((line) => {
34
+ if (line.trim().length === 0)
35
+ return line;
36
+ let removable_count = 0;
37
+ while (removable_count < dedent_size && removable_count < line.length) {
38
+ const char = line[removable_count];
39
+ if (char === ' ' || char === '\t') {
40
+ removable_count += 1;
41
+ }
42
+ else {
43
+ break;
44
+ }
45
+ }
46
+ return line.slice(removable_count);
47
+ })
48
+ .join('\n');
43
49
  }
44
-
45
50
  export function split_plain_text_paragraphs(plain_text) {
46
- return normalize_line_endings(plain_text)
47
- .split(/\n{2,}/)
48
- .map((fragment) => fragment.trim())
49
- .filter(Boolean);
51
+ return normalize_line_endings(plain_text)
52
+ .split(/\n{2,}/)
53
+ .map((fragment) => fragment.trim())
54
+ .filter(Boolean);
50
55
  }
51
-
52
56
  export function normalize_plain_text_for_single_line_property(plain_text) {
53
- return normalize_line_endings(plain_text).replace(/\s*\n+\s*/g, ' ');
57
+ return normalize_line_endings(plain_text).replace(/\s*\n+\s*/g, ' ');
54
58
  }
55
-
56
- /**
57
- * @param {string | null | undefined} node_type
58
- * @param {DocumentSchema} schema
59
- * @returns {string | null}
60
- */
61
59
  export function get_text_property_name(node_type, schema) {
62
- if (!node_type) return null;
63
- const node_schema = schema[node_type];
64
- if (!node_schema || node_schema.kind !== 'text') return null;
65
- if (node_schema.properties?.content?.type === 'text') return 'content';
66
- return (
67
- Object.entries(node_schema.properties).find(([, property_definition]) => {
68
- return property_definition.type === 'text';
69
- })?.[0] || null
70
- );
60
+ if (!node_type)
61
+ return null;
62
+ const node_schema = schema[node_type];
63
+ if (!node_schema || node_schema.kind !== 'text')
64
+ return null;
65
+ if (node_schema.properties?.content?.type === 'text')
66
+ return 'content';
67
+ return (Object.entries(node_schema.properties).find(([, property_definition]) => {
68
+ return property_definition.type === 'text';
69
+ })?.[0] || null);
71
70
  }
72
-
73
- /**
74
- * @param {any} node
75
- * @param {DocumentSchema} schema
76
- * @returns {{ content: string, marks: any[], annotations: any[] } | null}
77
- */
78
71
  export function get_text_content(node, schema) {
79
- if (!node || typeof node !== 'object') return null;
80
-
81
- const is_text_value = (value) =>
82
- value &&
83
- typeof value.content === 'string' &&
84
- Array.isArray(value.marks) &&
85
- Array.isArray(value.annotations);
86
-
87
- const text_property_name = get_text_property_name(node.type, schema);
88
- if (text_property_name && is_text_value(node[text_property_name])) {
89
- return node[text_property_name];
90
- }
91
-
92
- if (is_text_value(node.content)) {
93
- return node.content;
94
- }
95
-
96
- return null;
72
+ if (!is_record(node))
73
+ return null;
74
+ const node_type = typeof node.type === 'string' ? node.type : null;
75
+ const text_property_name = get_text_property_name(node_type, schema);
76
+ if (text_property_name && is_text(node[text_property_name])) {
77
+ return node[text_property_name];
78
+ }
79
+ if (is_text(node.content)) {
80
+ return node.content;
81
+ }
82
+ return null;
97
83
  }
98
-
99
- /**
100
- * @param {any} node
101
- * @param {DocumentSchema} schema
102
- * @returns {boolean}
103
- */
104
84
  export function is_text_like_node_payload(node, schema) {
105
- if (!node || typeof node !== 'object') return false;
106
- if (schema[node.type]?.kind === 'text') return true;
107
- return !!get_text_content(node, schema);
85
+ if (!is_record(node))
86
+ return false;
87
+ if (typeof node.type === 'string' && schema[node.type]?.kind === 'text')
88
+ return true;
89
+ return !!get_text_content(node, schema);
108
90
  }
109
-
110
- /**
111
- * @param {any} node_array_property_definition
112
- * @param {DocumentSchema} schema
113
- * @returns {string | null}
114
- */
115
91
  export function get_default_text_node(node_array_property_definition, schema) {
116
- if (
117
- node_array_property_definition?.type !== 'node_array' ||
118
- !Array.isArray(node_array_property_definition.node_types)
119
- ) {
120
- return null;
121
- }
122
-
123
- const default_node_type = node_array_property_definition.default_node_type;
124
- if (default_node_type && schema[default_node_type]?.kind === 'text') {
125
- return default_node_type;
126
- }
127
-
128
- return (
129
- node_array_property_definition.node_types.find(
130
- (node_type) => schema[node_type]?.kind === 'text'
131
- ) || null
132
- );
92
+ if (!is_record(node_array_property_definition) ||
93
+ node_array_property_definition.type !== 'node_array' ||
94
+ !Array.isArray(node_array_property_definition.node_types)) {
95
+ return null;
96
+ }
97
+ const default_node_type = node_array_property_definition.default_node_type;
98
+ if (typeof default_node_type === 'string' && schema[default_node_type]?.kind === 'text') {
99
+ return default_node_type;
100
+ }
101
+ return (node_array_property_definition.node_types.find((node_type) => typeof node_type === 'string' && schema[node_type]?.kind === 'text') || null);
133
102
  }
134
-
135
- /**
136
- * @param {string[]} paragraph_fragments
137
- * @param {string | null | undefined} node_type
138
- * @param {DocumentSchema} schema
139
- * @returns {{ main_nodes: string[], nodes: Record<string, any> } | null}
140
- */
141
103
  export function create_plain_text_nodes_payload(paragraph_fragments, node_type, schema) {
142
- if (!Array.isArray(paragraph_fragments) || paragraph_fragments.length === 0 || !node_type) {
143
- return null;
144
- }
145
-
146
- const text_property_name = get_text_property_name(node_type, schema);
147
- if (!text_property_name) return null;
148
-
149
- const payload = {
150
- main_nodes: [],
151
- nodes: {}
152
- };
153
-
154
- for (let i = 0; i < paragraph_fragments.length; i++) {
155
- const fragment = paragraph_fragments[i];
156
- const node_id = 'fragment_' + i;
157
- payload.nodes[node_id] = {
158
- id: node_id,
159
- type: node_type,
160
- [text_property_name]: {
161
- content: fragment,
162
- marks: [],
163
- annotations: []
164
- }
165
- };
166
- payload.main_nodes.push(node_id);
167
- }
168
-
169
- return payload;
104
+ if (!Array.isArray(paragraph_fragments) || paragraph_fragments.length === 0 || !node_type) {
105
+ return null;
106
+ }
107
+ const text_property_name = get_text_property_name(node_type, schema);
108
+ if (!text_property_name)
109
+ return null;
110
+ const payload = {
111
+ main_nodes: [],
112
+ nodes: {}
113
+ };
114
+ for (let i = 0; i < paragraph_fragments.length; i++) {
115
+ const fragment = paragraph_fragments[i];
116
+ const node_id = 'fragment_' + i;
117
+ payload.nodes[node_id] = {
118
+ id: node_id,
119
+ type: node_type,
120
+ [text_property_name]: {
121
+ content: fragment,
122
+ marks: [],
123
+ annotations: []
124
+ }
125
+ };
126
+ payload.main_nodes.push(node_id);
127
+ }
128
+ return payload;
170
129
  }
@@ -1,9 +1,12 @@
1
1
  @layer svedit-defaults {
2
2
  :root {
3
- --svedit-brand: oklch(60% 0.22 283);
4
- --svedit-editing-stroke: var(--svedit-brand);
5
- --svedit-editing-fill: oklch(from var(--svedit-brand) l c h / 0.1);
6
- --svedit-canvas-stroke: color-mix(in oklch, currentColor 25%, transparent);
7
- --svedit-caret-color: var(--svedit-brand);
3
+ /* Primary accent for active editing controls, carets, and selections. */
4
+ --editing: oklch(60% 0.22 283);
5
+ /* Low-opacity version of the editing accent for passive highlights. */
6
+ --editing-muted: oklch(from var(--editing) l c h / 0.1);
7
+ /* Low-emphasis strokes and outlines, such as inactive node gaps. */
8
+ --editing-stroke: color-mix(in oklch, currentColor 25%, transparent);
9
+ /* Foreground color for content displayed on the editing accent. */
10
+ --editing-foreground: oklch(100% 0 0);
8
11
  }
9
12
  }
@@ -1,12 +1,14 @@
1
+ import type Transaction from './Transaction.svelte.js';
2
+ import type { DocumentPath } from './types.js';
1
3
  /**
2
4
  * Set multiple properties on a node via a transaction.
3
5
  *
4
- * @param {object} tr - The transaction
5
- * @param {Array} path - Path to the node
6
- * @param {Record<string, any>} properties - Key/value pairs to set
6
+ * @param tr - The transaction
7
+ * @param path - Path to the node
8
+ * @param properties - Key/value pairs to set
7
9
  */
8
- export function set_properties(tr: object, path: any[], properties: Record<string, any>): void;
9
- export function break_text_node(tr: any): boolean;
10
- export function join_text_node(tr: any): boolean;
11
- export function insert_default_node(tr: any): boolean;
10
+ export declare function set_properties(tr: Transaction, path: DocumentPath, properties: Record<string, unknown>): void;
11
+ export declare function break_text_node(tr: Transaction): boolean;
12
+ export declare function join_text_node(tr: Transaction): boolean;
13
+ export declare function insert_default_node(tr: Transaction): boolean;
12
14
  //# sourceMappingURL=transforms.svelte.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"transforms.svelte.d.ts","sourceRoot":"","sources":["../src/lib/transforms.svelte.js"],"names":[],"mappings":"AAGA;;;;;;GAMG;AACH,mCAJW,MAAM,2BAEN,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,QAM7B;AAED,kDAoDC;AAED,iDAoEC;AAED,sDAuBC"}
1
+ {"version":3,"file":"transforms.svelte.d.ts","sourceRoot":"","sources":["../src/lib/transforms.svelte.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,WAAW,MAAM,yBAAyB,CAAC;AACvD,OAAO,KAAK,EAEX,YAAY,EAKZ,MAAM,YAAY,CAAC;AAEpB;;;;;;GAMG;AACH,wBAAgB,cAAc,CAC7B,EAAE,EAAE,WAAW,EACf,IAAI,EAAE,YAAY,EAClB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACjC,IAAI,CAIN;AAED,wBAAgB,eAAe,CAAC,EAAE,EAAE,WAAW,GAAG,OAAO,CAuDxD;AAED,wBAAgB,cAAc,CAAC,EAAE,EAAE,WAAW,GAAG,OAAO,CAoEvD;AAED,wBAAgB,mBAAmB,CAAC,EAAE,EAAE,WAAW,GAAG,OAAO,CAyB5D"}