@prosekit/core 0.0.0-next-20240620223217 → 0.0.0-next-20240622120010
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/_tsup-dts-rollup.d.ts +19 -19
- package/dist/prosekit-core.js +6 -6
- package/package.json +3 -3
@@ -258,51 +258,51 @@ declare function defineBaseCommands(): Extension<{
|
|
258
258
|
Commands: {
|
259
259
|
insertText: [{
|
260
260
|
text: string;
|
261
|
-
from?: number
|
262
|
-
to?: number
|
261
|
+
from?: number;
|
262
|
+
to?: number;
|
263
263
|
}];
|
264
264
|
insertNode: [options: {
|
265
265
|
node: Node_2;
|
266
|
-
pos?: number
|
266
|
+
pos?: number;
|
267
267
|
type?: undefined;
|
268
268
|
attrs?: undefined;
|
269
269
|
} | {
|
270
270
|
node?: undefined;
|
271
|
-
pos?: number
|
271
|
+
pos?: number;
|
272
272
|
type: string;
|
273
|
-
attrs?: Attrs_2
|
273
|
+
attrs?: Attrs_2;
|
274
274
|
}];
|
275
275
|
removeNode: [options: {
|
276
276
|
type: string | NodeType_2;
|
277
|
-
pos?: number
|
277
|
+
pos?: number;
|
278
278
|
}];
|
279
279
|
wrap: [{
|
280
280
|
nodeType: NodeType_2;
|
281
|
-
attrs?: Attrs_2 | null
|
281
|
+
attrs?: Attrs_2 | null;
|
282
282
|
}];
|
283
283
|
setBlockType: [options: {
|
284
|
-
type:
|
285
|
-
attrs?: Attrs_2 | null
|
286
|
-
from?: number
|
287
|
-
to?: number
|
284
|
+
type: NodeType_2 | string;
|
285
|
+
attrs?: Attrs_2 | null;
|
286
|
+
from?: number;
|
287
|
+
to?: number;
|
288
288
|
}];
|
289
289
|
setNodeAttrs: [options: {
|
290
290
|
type: string | NodeType_2 | string[] | NodeType_2[];
|
291
291
|
attrs: Attrs_2;
|
292
|
-
pos?: number
|
292
|
+
pos?: number;
|
293
293
|
}];
|
294
294
|
selectAll: [];
|
295
295
|
addMark: [options: {
|
296
296
|
type: string | MarkType_2;
|
297
|
-
attrs?: Attrs_2 | null
|
298
|
-
from?: number
|
299
|
-
to?: number
|
297
|
+
attrs?: Attrs_2 | null;
|
298
|
+
from?: number;
|
299
|
+
to?: number;
|
300
300
|
}];
|
301
301
|
removeMark: [options: {
|
302
302
|
type: string | MarkType_2;
|
303
|
-
attrs?: Attrs_2 | null
|
304
|
-
from?: number
|
305
|
-
to?: number
|
303
|
+
attrs?: Attrs_2 | null;
|
304
|
+
from?: number;
|
305
|
+
to?: number;
|
306
306
|
}];
|
307
307
|
};
|
308
308
|
Nodes: never;
|
@@ -1680,7 +1680,7 @@ export declare function setSelectionAround(tr: Transaction, pos: number): void;
|
|
1680
1680
|
export declare type Setter<T> = (value: T) => void;
|
1681
1681
|
|
1682
1682
|
/**
|
1683
|
-
* @
|
1683
|
+
* @internal
|
1684
1684
|
*/
|
1685
1685
|
declare type SimplifyUnion<T> = Simplify<UnionToIntersection<T>>;
|
1686
1686
|
export { SimplifyUnion }
|
package/dist/prosekit-core.js
CHANGED
@@ -358,6 +358,11 @@ function toReversed(arr) {
|
|
358
358
|
return (_b = (_a = arr.toReversed) == null ? void 0 : _a.call(arr)) != null ? _b : [...arr].reverse();
|
359
359
|
}
|
360
360
|
|
361
|
+
// src/utils/is-not-null.ts
|
362
|
+
function isNotNull(value) {
|
363
|
+
return value != null;
|
364
|
+
}
|
365
|
+
|
361
366
|
// src/facets/facet-node.ts
|
362
367
|
function zip5(a, b, mapper) {
|
363
368
|
return [
|
@@ -433,7 +438,7 @@ var FacetNode = class {
|
|
433
438
|
childOutput[pri] && (inputs[pri] || (inputs[pri] = [])).push(childOutput[pri]);
|
434
439
|
}
|
435
440
|
if (this.facet.singleton) {
|
436
|
-
let reducer = (_a = this.reducers)[_b = 2 /* default */] || (_a[_b] = this.facet.reducer), input = inputs.filter(
|
441
|
+
let reducer = (_a = this.reducers)[_b = 2 /* default */] || (_a[_b] = this.facet.reducer), input = inputs.filter(isNotNull).flat();
|
437
442
|
output[2 /* default */] = reducer(input);
|
438
443
|
} else
|
439
444
|
for (let pri = 0; pri < 5; pri++) {
|
@@ -1134,11 +1139,6 @@ function isElement(value) {
|
|
1134
1139
|
return hasElement && value instanceof Element;
|
1135
1140
|
}
|
1136
1141
|
|
1137
|
-
// src/utils/is-not-null.ts
|
1138
|
-
function isNotNull(value) {
|
1139
|
-
return value != null;
|
1140
|
-
}
|
1141
|
-
|
1142
1142
|
// src/extensions/node-spec.ts
|
1143
1143
|
function defineNodeSpec(options) {
|
1144
1144
|
return defineFacetPayload(nodeSpecFacet, [[options, void 0]]);
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@prosekit/core",
|
3
3
|
"type": "module",
|
4
|
-
"version": "0.0.0-next-
|
4
|
+
"version": "0.0.0-next-20240622120010",
|
5
5
|
"private": false,
|
6
6
|
"author": {
|
7
7
|
"name": "ocavue",
|
@@ -39,11 +39,11 @@
|
|
39
39
|
"orderedmap": "^2.1.1",
|
40
40
|
"prosemirror-splittable": "^0.1.1",
|
41
41
|
"type-fest": "^4.20.1",
|
42
|
-
"@prosekit/pm": "^0.0.0-next-
|
42
|
+
"@prosekit/pm": "^0.0.0-next-20240622120010"
|
43
43
|
},
|
44
44
|
"devDependencies": {
|
45
45
|
"tsup": "^8.1.0",
|
46
|
-
"typescript": "^5.
|
46
|
+
"typescript": "^5.5.2",
|
47
47
|
"vitest": "^1.6.0",
|
48
48
|
"@prosekit/dev": "0.0.0"
|
49
49
|
},
|