@vizel/core 0.0.1-alpha.4 → 0.0.1-alpha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +13 -13
- package/dist/index51.js +1 -1
- package/dist/index55.js +1 -1
- package/dist/index69.js +98 -4
- package/dist/index70.js +4 -98
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -2575,15 +2575,14 @@ export { }
|
|
|
2575
2575
|
|
|
2576
2576
|
declare module "@tiptap/core" {
|
|
2577
2577
|
interface Commands<ReturnType> {
|
|
2578
|
-
|
|
2579
|
-
/**
|
|
2580
|
-
* Move the current block up
|
|
2581
|
-
*/
|
|
2582
|
-
moveBlockUp: () => ReturnType;
|
|
2578
|
+
diagram: {
|
|
2583
2579
|
/**
|
|
2584
|
-
*
|
|
2580
|
+
* Insert a diagram block
|
|
2585
2581
|
*/
|
|
2586
|
-
|
|
2582
|
+
insertDiagram: (options: {
|
|
2583
|
+
code: string;
|
|
2584
|
+
type?: VizelDiagramType;
|
|
2585
|
+
}) => ReturnType;
|
|
2587
2586
|
};
|
|
2588
2587
|
}
|
|
2589
2588
|
}
|
|
@@ -2591,14 +2590,15 @@ declare module "@tiptap/core" {
|
|
|
2591
2590
|
|
|
2592
2591
|
declare module "@tiptap/core" {
|
|
2593
2592
|
interface Commands<ReturnType> {
|
|
2594
|
-
|
|
2593
|
+
vizelBlockMove: {
|
|
2595
2594
|
/**
|
|
2596
|
-
*
|
|
2595
|
+
* Move the current block up
|
|
2597
2596
|
*/
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2597
|
+
moveBlockUp: () => ReturnType;
|
|
2598
|
+
/**
|
|
2599
|
+
* Move the current block down
|
|
2600
|
+
*/
|
|
2601
|
+
moveBlockDown: () => ReturnType;
|
|
2602
2602
|
};
|
|
2603
2603
|
}
|
|
2604
2604
|
}
|
package/dist/index51.js
CHANGED
package/dist/index55.js
CHANGED
package/dist/index69.js
CHANGED
|
@@ -1,6 +1,100 @@
|
|
|
1
|
-
function
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
var l = 200, p = function() {
|
|
2
|
+
};
|
|
3
|
+
p.prototype.append = function(t) {
|
|
4
|
+
return t.length ? (t = p.from(t), !this.length && t || t.length < l && this.leafAppend(t) || this.length < l && t.leafPrepend(this) || this.appendInner(t)) : this;
|
|
5
|
+
};
|
|
6
|
+
p.prototype.prepend = function(t) {
|
|
7
|
+
return t.length ? p.from(t).append(this) : this;
|
|
8
|
+
};
|
|
9
|
+
p.prototype.appendInner = function(t) {
|
|
10
|
+
return new u(this, t);
|
|
11
|
+
};
|
|
12
|
+
p.prototype.slice = function(t, r) {
|
|
13
|
+
return t === void 0 && (t = 0), r === void 0 && (r = this.length), t >= r ? p.empty : this.sliceInner(Math.max(0, t), Math.min(this.length, r));
|
|
14
|
+
};
|
|
15
|
+
p.prototype.get = function(t) {
|
|
16
|
+
if (!(t < 0 || t >= this.length))
|
|
17
|
+
return this.getInner(t);
|
|
18
|
+
};
|
|
19
|
+
p.prototype.forEach = function(t, r, e) {
|
|
20
|
+
r === void 0 && (r = 0), e === void 0 && (e = this.length), r <= e ? this.forEachInner(t, r, e, 0) : this.forEachInvertedInner(t, r, e, 0);
|
|
21
|
+
};
|
|
22
|
+
p.prototype.map = function(t, r, e) {
|
|
23
|
+
r === void 0 && (r = 0), e === void 0 && (e = this.length);
|
|
24
|
+
var n = [];
|
|
25
|
+
return this.forEach(function(i, s) {
|
|
26
|
+
return n.push(t(i, s));
|
|
27
|
+
}, r, e), n;
|
|
28
|
+
};
|
|
29
|
+
p.from = function(t) {
|
|
30
|
+
return t instanceof p ? t : t && t.length ? new o(t) : p.empty;
|
|
31
|
+
};
|
|
32
|
+
var o = /* @__PURE__ */ (function(h) {
|
|
33
|
+
function t(e) {
|
|
34
|
+
h.call(this), this.values = e;
|
|
35
|
+
}
|
|
36
|
+
h && (t.__proto__ = h), t.prototype = Object.create(h && h.prototype), t.prototype.constructor = t;
|
|
37
|
+
var r = { length: { configurable: !0 }, depth: { configurable: !0 } };
|
|
38
|
+
return t.prototype.flatten = function() {
|
|
39
|
+
return this.values;
|
|
40
|
+
}, t.prototype.sliceInner = function(n, i) {
|
|
41
|
+
return n == 0 && i == this.length ? this : new t(this.values.slice(n, i));
|
|
42
|
+
}, t.prototype.getInner = function(n) {
|
|
43
|
+
return this.values[n];
|
|
44
|
+
}, t.prototype.forEachInner = function(n, i, s, f) {
|
|
45
|
+
for (var a = i; a < s; a++)
|
|
46
|
+
if (n(this.values[a], f + a) === !1)
|
|
47
|
+
return !1;
|
|
48
|
+
}, t.prototype.forEachInvertedInner = function(n, i, s, f) {
|
|
49
|
+
for (var a = i - 1; a >= s; a--)
|
|
50
|
+
if (n(this.values[a], f + a) === !1)
|
|
51
|
+
return !1;
|
|
52
|
+
}, t.prototype.leafAppend = function(n) {
|
|
53
|
+
if (this.length + n.length <= l)
|
|
54
|
+
return new t(this.values.concat(n.flatten()));
|
|
55
|
+
}, t.prototype.leafPrepend = function(n) {
|
|
56
|
+
if (this.length + n.length <= l)
|
|
57
|
+
return new t(n.flatten().concat(this.values));
|
|
58
|
+
}, r.length.get = function() {
|
|
59
|
+
return this.values.length;
|
|
60
|
+
}, r.depth.get = function() {
|
|
61
|
+
return 0;
|
|
62
|
+
}, Object.defineProperties(t.prototype, r), t;
|
|
63
|
+
})(p);
|
|
64
|
+
p.empty = new o([]);
|
|
65
|
+
var u = /* @__PURE__ */ (function(h) {
|
|
66
|
+
function t(r, e) {
|
|
67
|
+
h.call(this), this.left = r, this.right = e, this.length = r.length + e.length, this.depth = Math.max(r.depth, e.depth) + 1;
|
|
68
|
+
}
|
|
69
|
+
return h && (t.__proto__ = h), t.prototype = Object.create(h && h.prototype), t.prototype.constructor = t, t.prototype.flatten = function() {
|
|
70
|
+
return this.left.flatten().concat(this.right.flatten());
|
|
71
|
+
}, t.prototype.getInner = function(e) {
|
|
72
|
+
return e < this.left.length ? this.left.get(e) : this.right.get(e - this.left.length);
|
|
73
|
+
}, t.prototype.forEachInner = function(e, n, i, s) {
|
|
74
|
+
var f = this.left.length;
|
|
75
|
+
if (n < f && this.left.forEachInner(e, n, Math.min(i, f), s) === !1 || i > f && this.right.forEachInner(e, Math.max(n - f, 0), Math.min(this.length, i) - f, s + f) === !1)
|
|
76
|
+
return !1;
|
|
77
|
+
}, t.prototype.forEachInvertedInner = function(e, n, i, s) {
|
|
78
|
+
var f = this.left.length;
|
|
79
|
+
if (n > f && this.right.forEachInvertedInner(e, n - f, Math.max(i, f) - f, s + f) === !1 || i < f && this.left.forEachInvertedInner(e, Math.min(n, f), i, s) === !1)
|
|
80
|
+
return !1;
|
|
81
|
+
}, t.prototype.sliceInner = function(e, n) {
|
|
82
|
+
if (e == 0 && n == this.length)
|
|
83
|
+
return this;
|
|
84
|
+
var i = this.left.length;
|
|
85
|
+
return n <= i ? this.left.slice(e, n) : e >= i ? this.right.slice(e - i, n - i) : this.left.slice(e, i).append(this.right.slice(0, n - i));
|
|
86
|
+
}, t.prototype.leafAppend = function(e) {
|
|
87
|
+
var n = this.right.leafAppend(e);
|
|
88
|
+
if (n)
|
|
89
|
+
return new t(this.left, n);
|
|
90
|
+
}, t.prototype.leafPrepend = function(e) {
|
|
91
|
+
var n = this.left.leafPrepend(e);
|
|
92
|
+
if (n)
|
|
93
|
+
return new t(n, this.right);
|
|
94
|
+
}, t.prototype.appendInner = function(e) {
|
|
95
|
+
return this.left.depth >= Math.max(this.right.depth, e.depth) + 1 ? new t(this.left, new t(this.right, e)) : new t(this, e);
|
|
96
|
+
}, t;
|
|
97
|
+
})(p);
|
|
4
98
|
export {
|
|
5
|
-
|
|
99
|
+
p as default
|
|
6
100
|
};
|
package/dist/index70.js
CHANGED
|
@@ -1,100 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
return t.length ? (t = p.from(t), !this.length && t || t.length < l && this.leafAppend(t) || this.length < l && t.leafPrepend(this) || this.appendInner(t)) : this;
|
|
5
|
-
};
|
|
6
|
-
p.prototype.prepend = function(t) {
|
|
7
|
-
return t.length ? p.from(t).append(this) : this;
|
|
8
|
-
};
|
|
9
|
-
p.prototype.appendInner = function(t) {
|
|
10
|
-
return new u(this, t);
|
|
11
|
-
};
|
|
12
|
-
p.prototype.slice = function(t, r) {
|
|
13
|
-
return t === void 0 && (t = 0), r === void 0 && (r = this.length), t >= r ? p.empty : this.sliceInner(Math.max(0, t), Math.min(this.length, r));
|
|
14
|
-
};
|
|
15
|
-
p.prototype.get = function(t) {
|
|
16
|
-
if (!(t < 0 || t >= this.length))
|
|
17
|
-
return this.getInner(t);
|
|
18
|
-
};
|
|
19
|
-
p.prototype.forEach = function(t, r, e) {
|
|
20
|
-
r === void 0 && (r = 0), e === void 0 && (e = this.length), r <= e ? this.forEachInner(t, r, e, 0) : this.forEachInvertedInner(t, r, e, 0);
|
|
21
|
-
};
|
|
22
|
-
p.prototype.map = function(t, r, e) {
|
|
23
|
-
r === void 0 && (r = 0), e === void 0 && (e = this.length);
|
|
24
|
-
var n = [];
|
|
25
|
-
return this.forEach(function(i, s) {
|
|
26
|
-
return n.push(t(i, s));
|
|
27
|
-
}, r, e), n;
|
|
28
|
-
};
|
|
29
|
-
p.from = function(t) {
|
|
30
|
-
return t instanceof p ? t : t && t.length ? new o(t) : p.empty;
|
|
31
|
-
};
|
|
32
|
-
var o = /* @__PURE__ */ (function(h) {
|
|
33
|
-
function t(e) {
|
|
34
|
-
h.call(this), this.values = e;
|
|
35
|
-
}
|
|
36
|
-
h && (t.__proto__ = h), t.prototype = Object.create(h && h.prototype), t.prototype.constructor = t;
|
|
37
|
-
var r = { length: { configurable: !0 }, depth: { configurable: !0 } };
|
|
38
|
-
return t.prototype.flatten = function() {
|
|
39
|
-
return this.values;
|
|
40
|
-
}, t.prototype.sliceInner = function(n, i) {
|
|
41
|
-
return n == 0 && i == this.length ? this : new t(this.values.slice(n, i));
|
|
42
|
-
}, t.prototype.getInner = function(n) {
|
|
43
|
-
return this.values[n];
|
|
44
|
-
}, t.prototype.forEachInner = function(n, i, s, f) {
|
|
45
|
-
for (var a = i; a < s; a++)
|
|
46
|
-
if (n(this.values[a], f + a) === !1)
|
|
47
|
-
return !1;
|
|
48
|
-
}, t.prototype.forEachInvertedInner = function(n, i, s, f) {
|
|
49
|
-
for (var a = i - 1; a >= s; a--)
|
|
50
|
-
if (n(this.values[a], f + a) === !1)
|
|
51
|
-
return !1;
|
|
52
|
-
}, t.prototype.leafAppend = function(n) {
|
|
53
|
-
if (this.length + n.length <= l)
|
|
54
|
-
return new t(this.values.concat(n.flatten()));
|
|
55
|
-
}, t.prototype.leafPrepend = function(n) {
|
|
56
|
-
if (this.length + n.length <= l)
|
|
57
|
-
return new t(n.flatten().concat(this.values));
|
|
58
|
-
}, r.length.get = function() {
|
|
59
|
-
return this.values.length;
|
|
60
|
-
}, r.depth.get = function() {
|
|
61
|
-
return 0;
|
|
62
|
-
}, Object.defineProperties(t.prototype, r), t;
|
|
63
|
-
})(p);
|
|
64
|
-
p.empty = new o([]);
|
|
65
|
-
var u = /* @__PURE__ */ (function(h) {
|
|
66
|
-
function t(r, e) {
|
|
67
|
-
h.call(this), this.left = r, this.right = e, this.length = r.length + e.length, this.depth = Math.max(r.depth, e.depth) + 1;
|
|
68
|
-
}
|
|
69
|
-
return h && (t.__proto__ = h), t.prototype = Object.create(h && h.prototype), t.prototype.constructor = t, t.prototype.flatten = function() {
|
|
70
|
-
return this.left.flatten().concat(this.right.flatten());
|
|
71
|
-
}, t.prototype.getInner = function(e) {
|
|
72
|
-
return e < this.left.length ? this.left.get(e) : this.right.get(e - this.left.length);
|
|
73
|
-
}, t.prototype.forEachInner = function(e, n, i, s) {
|
|
74
|
-
var f = this.left.length;
|
|
75
|
-
if (n < f && this.left.forEachInner(e, n, Math.min(i, f), s) === !1 || i > f && this.right.forEachInner(e, Math.max(n - f, 0), Math.min(this.length, i) - f, s + f) === !1)
|
|
76
|
-
return !1;
|
|
77
|
-
}, t.prototype.forEachInvertedInner = function(e, n, i, s) {
|
|
78
|
-
var f = this.left.length;
|
|
79
|
-
if (n > f && this.right.forEachInvertedInner(e, n - f, Math.max(i, f) - f, s + f) === !1 || i < f && this.left.forEachInvertedInner(e, Math.min(n, f), i, s) === !1)
|
|
80
|
-
return !1;
|
|
81
|
-
}, t.prototype.sliceInner = function(e, n) {
|
|
82
|
-
if (e == 0 && n == this.length)
|
|
83
|
-
return this;
|
|
84
|
-
var i = this.left.length;
|
|
85
|
-
return n <= i ? this.left.slice(e, n) : e >= i ? this.right.slice(e - i, n - i) : this.left.slice(e, i).append(this.right.slice(0, n - i));
|
|
86
|
-
}, t.prototype.leafAppend = function(e) {
|
|
87
|
-
var n = this.right.leafAppend(e);
|
|
88
|
-
if (n)
|
|
89
|
-
return new t(this.left, n);
|
|
90
|
-
}, t.prototype.leafPrepend = function(e) {
|
|
91
|
-
var n = this.left.leafPrepend(e);
|
|
92
|
-
if (n)
|
|
93
|
-
return new t(n, this.right);
|
|
94
|
-
}, t.prototype.appendInner = function(e) {
|
|
95
|
-
return this.left.depth >= Math.max(this.right.depth, e.depth) + 1 ? new t(this.left, new t(this.right, e)) : new t(this, e);
|
|
96
|
-
}, t;
|
|
97
|
-
})(p);
|
|
1
|
+
function e(t) {
|
|
2
|
+
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
3
|
+
}
|
|
98
4
|
export {
|
|
99
|
-
|
|
5
|
+
e as getDefaultExportFromCjs
|
|
100
6
|
};
|