@draftably/editor 0.1.0 → 0.2.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.
- package/README.md +4 -5
- package/dist/assets/{engine.worker-DmHew5f6.js → engine.worker-DwN9io_m.js} +2765 -2722
- package/dist/element.js +1 -1
- package/dist/index.js +19553 -2
- package/dist/types/src/components/controls.d.ts +8 -5
- package/dist/types/src/state/canvas-commands.d.ts +169 -0
- package/dist/types/src/state/canvas-keyboard.d.ts +15 -0
- package/dist/types/src/state/links.d.ts +4 -1
- package/dist/types/src/state/workspace.d.ts +3 -0
- package/package.json +1 -1
- package/dist/assets/import-d2.worker-CnXfFXoa.js +0 -5395
- package/dist/chunks/abnfDiagram-WEYOIA3C-llcpthp5.js +0 -87
- package/dist/chunks/arc-rJj0TtXf.js +0 -83
- package/dist/chunks/architectureDiagram-ZHVYKT53-CfiXg0Lk.js +0 -4781
- package/dist/chunks/blockDiagram-RJAE7QA3-CO-14jWz.js +0 -1440
- package/dist/chunks/browser-iNhbPsGc.js +0 -40
- package/dist/chunks/c4Diagram-XDPPPE54-DYKuxA4n.js +0 -1524
- package/dist/chunks/channel-qMvPU6eH.js +0 -5
- package/dist/chunks/chunk-2E7WHVMD-BEZwsFS3.js +0 -670
- package/dist/chunks/chunk-2Q5K7J3B-gqtzQ8ux.js +0 -18
- package/dist/chunks/chunk-4EMNKR2T-MC54CXVe.js +0 -262
- package/dist/chunks/chunk-55XCU76K-DkZUAaqC.js +0 -68
- package/dist/chunks/chunk-5VM5RSS4-CaKe4sjM.js +0 -19
- package/dist/chunks/chunk-JWPE2WC7-CnAFS2xF.js +0 -8
- package/dist/chunks/chunk-VQ5W62QI-CXRv7FiX.js +0 -19
- package/dist/chunks/chunk-XXDRQBXY-B-AMQgD2.js +0 -8
- package/dist/chunks/chunk-ZCHMQSOR-BALpdc3g.js +0 -451
- package/dist/chunks/classDiagram-v2-4MYWR3UA-wPjgJTg4.js +0 -1570
- package/dist/chunks/cose-bilkent-JH36ORCC-Bbh5ggBc.js +0 -2608
- package/dist/chunks/cynefin-EF2NZ3EQ-Bt6b88hY.js +0 -22361
- package/dist/chunks/cynefinDiagram-WF24UDRP-BHWZvxoF.js +0 -299
- package/dist/chunks/cytoscape.esm-CRsF_JA3.js +0 -18791
- package/dist/chunks/dagre-NK4GIZVX-Cz37yPrT.js +0 -2157
- package/dist/chunks/defaultLocale-BgPVtth8.js +0 -171
- package/dist/chunks/diagram-CBK3MWTC-Q2R6FJ0B.js +0 -531
- package/dist/chunks/diagram-I5XIIV2D-a2Kdu_wA.js +0 -153
- package/dist/chunks/diagram-ODIL2UCW-DTWXxcOn.js +0 -346
- package/dist/chunks/diagram-PFBEJUXE-DIAQQ5KX.js +0 -480
- package/dist/chunks/diagram-RJA3I4VV-BPD0GghS.js +0 -219
- package/dist/chunks/diagram-TYUNFSNR-BmdkONfG.js +0 -2586
- package/dist/chunks/dot-importer-B23jwEkx.js +0 -1547
- package/dist/chunks/ebnfDiagram-V4P3TTPT-C5IKvYlb.js +0 -109
- package/dist/chunks/elk-QONTBCTQ-CtdQFvh2.js +0 -49229
- package/dist/chunks/erDiagram-KYQIGQAA-5wguK9Dx.js +0 -1064
- package/dist/chunks/flowDiagram-IUGLLWBU-BijvFPku.js +0 -1771
- package/dist/chunks/ganttDiagram-R7GPNTJY-BaqGPz-O.js +0 -2729
- package/dist/chunks/gitGraphDiagram-PDYL7XHY-DZfMGyHE.js +0 -815
- package/dist/chunks/graph-CKJmgLki.js +0 -1541
- package/dist/chunks/import-core-C-I1wGfw.js +0 -145
- package/dist/chunks/infoDiagram-MVDRKAX5-C2vH_59e.js +0 -24
- package/dist/chunks/init-DjUOC4st.js +0 -16
- package/dist/chunks/ishikawaDiagram-HPEHV2GE-q149MFlV.js +0 -624
- package/dist/chunks/journeyDiagram-BOSHW7O7-D-2Z3VtR.js +0 -834
- package/dist/chunks/kanban-definition-FNSA4HC5-wvAjV5ub.js +0 -724
- package/dist/chunks/katex-BsrBVQKd.js +0 -11314
- package/dist/chunks/linear-4t7D_ros.js +0 -259
- package/dist/chunks/mermaid-facade-BoLWBerE.js +0 -289
- package/dist/chunks/mermaid-importer-Cgx1IhmR.js +0 -478
- package/dist/chunks/mermaid.core-DXv6D2Sm.js +0 -19244
- package/dist/chunks/mindmap-definition-6OY57UG3-r9wTKul_.js +0 -837
- package/dist/chunks/mount-C1Xk_GQz.js +0 -22131
- package/dist/chunks/ordinal-DfAQgscy.js +0 -61
- package/dist/chunks/pegDiagram-ECIUJNBX-CmKlFWiP.js +0 -95
- package/dist/chunks/pieDiagram-GNMPY74T-DNTw_qan.js +0 -208
- package/dist/chunks/quadrantDiagram-D57K4MC3-CT_tvVub.js +0 -1029
- package/dist/chunks/railroadDiagram-Y72NRBL7-C5TUvZBe.js +0 -77
- package/dist/chunks/requirementDiagram-EQYSW5RA-C_c65aCa.js +0 -889
- package/dist/chunks/sankeyDiagram-SY24JHO5-CKcbizM1.js +0 -859
- package/dist/chunks/sequenceDiagram-BLEHNHQU-GpVnHOjf.js +0 -2972
- package/dist/chunks/sizeCapture-INFHLROL-CToN3JSu.js +0 -46
- package/dist/chunks/stateDiagram-v2-A6IESKWZ-rJYd2FfM.js +0 -1520
- package/dist/chunks/swimlanes-B3ENRKFQ-C7w5pfxG.js +0 -4991
- package/dist/chunks/swimlanesDiagram-AYQRV4AK-BpGY_bvE.js +0 -13
- package/dist/chunks/timeline-definition-JXYKGLGB-ChKFPBKc.js +0 -1058
- package/dist/chunks/usecaseDiagram-WPOLBNNX-skXH8Dcu.js +0 -7945
- package/dist/chunks/vennDiagram-Q3Y3IDCW-C5KknmJf.js +0 -1578
- package/dist/chunks/wardleyDiagram-IVAIDKWA-DY4Lkfpu.js +0 -678
- package/dist/chunks/xychartDiagram-4URNHDU4-BHScsL7h.js +0 -1536
- package/dist/types/src/import/browser.d.ts +0 -3
- package/dist/types/src/import/detect.d.ts +0 -31
- package/dist/types/src/import/dot-importer.d.ts +0 -3
- package/dist/types/src/import/import-core.d.ts +0 -105
- package/dist/types/src/import/mermaid-facade.d.ts +0 -120
- package/dist/types/src/import/mermaid-importer.d.ts +0 -4
- package/dist/types/src/import/mermaid-sequence.d.ts +0 -8
- package/dist/types/src/import/scratch.d.ts +0 -3
- package/dist/types/src/lib/source-hash.d.ts +0 -7
- package/dist/types/src/model/candidates.d.ts +0 -53
- package/dist/types/src/model/examples.d.ts +0 -15
- package/dist/types/src/model/label-hits.d.ts +0 -27
- package/dist/types/src/model/static-scene.d.ts +0 -15
- package/dist/types/src/state/commands.d.ts +0 -529
- package/dist/types/src/state/comparison.d.ts +0 -151
- package/dist/types/src/state/files.d.ts +0 -61
- package/dist/types/src/state/keyboard.d.ts +0 -6
- package/dist/types/src/state/launch.d.ts +0 -61
- package/dist/types/src/state/ui.d.ts +0 -39
|
@@ -1,171 +0,0 @@
|
|
|
1
|
-
function J(n) {
|
|
2
|
-
return Math.abs(n = Math.round(n)) >= 1e21 ? n.toLocaleString("en").replace(/,/g, "") : n.toString(10);
|
|
3
|
-
}
|
|
4
|
-
function j(n, t) {
|
|
5
|
-
if (!isFinite(n) || n === 0) return null;
|
|
6
|
-
var e = (n = t ? n.toExponential(t - 1) : n.toExponential()).indexOf("e"), i = n.slice(0, e);
|
|
7
|
-
return [
|
|
8
|
-
i.length > 1 ? i[0] + i.slice(2) : i,
|
|
9
|
-
+n.slice(e + 1)
|
|
10
|
-
];
|
|
11
|
-
}
|
|
12
|
-
function K(n) {
|
|
13
|
-
return n = j(Math.abs(n)), n ? n[1] : NaN;
|
|
14
|
-
}
|
|
15
|
-
function Q(n, t) {
|
|
16
|
-
return function(e, i) {
|
|
17
|
-
for (var o = e.length, a = [], c = 0, h = n[0], M = 0; o > 0 && h > 0 && (M + h + 1 > i && (h = Math.max(1, i - M)), a.push(e.substring(o -= h, o + h)), !((M += h + 1) > i)); )
|
|
18
|
-
h = n[c = (c + 1) % n.length];
|
|
19
|
-
return a.reverse().join(t);
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
function V(n) {
|
|
23
|
-
return function(t) {
|
|
24
|
-
return t.replace(/[0-9]/g, function(e) {
|
|
25
|
-
return n[+e];
|
|
26
|
-
});
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
var W = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;
|
|
30
|
-
function $(n) {
|
|
31
|
-
if (!(t = W.exec(n))) throw new Error("invalid format: " + n);
|
|
32
|
-
var t;
|
|
33
|
-
return new L({
|
|
34
|
-
fill: t[1],
|
|
35
|
-
align: t[2],
|
|
36
|
-
sign: t[3],
|
|
37
|
-
symbol: t[4],
|
|
38
|
-
zero: t[5],
|
|
39
|
-
width: t[6],
|
|
40
|
-
comma: t[7],
|
|
41
|
-
precision: t[8] && t[8].slice(1),
|
|
42
|
-
trim: t[9],
|
|
43
|
-
type: t[10]
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
$.prototype = L.prototype;
|
|
47
|
-
function L(n) {
|
|
48
|
-
this.fill = n.fill === void 0 ? " " : n.fill + "", this.align = n.align === void 0 ? ">" : n.align + "", this.sign = n.sign === void 0 ? "-" : n.sign + "", this.symbol = n.symbol === void 0 ? "" : n.symbol + "", this.zero = !!n.zero, this.width = n.width === void 0 ? void 0 : +n.width, this.comma = !!n.comma, this.precision = n.precision === void 0 ? void 0 : +n.precision, this.trim = !!n.trim, this.type = n.type === void 0 ? "" : n.type + "";
|
|
49
|
-
}
|
|
50
|
-
L.prototype.toString = function() {
|
|
51
|
-
return this.fill + this.align + this.sign + this.symbol + (this.zero ? "0" : "") + (this.width === void 0 ? "" : Math.max(1, this.width | 0)) + (this.comma ? "," : "") + (this.precision === void 0 ? "" : "." + Math.max(0, this.precision | 0)) + (this.trim ? "~" : "") + this.type;
|
|
52
|
-
};
|
|
53
|
-
function _(n) {
|
|
54
|
-
n: for (var t = n.length, e = 1, i = -1, o; e < t; ++e)
|
|
55
|
-
switch (n[e]) {
|
|
56
|
-
case ".":
|
|
57
|
-
i = o = e;
|
|
58
|
-
break;
|
|
59
|
-
case "0":
|
|
60
|
-
i === 0 && (i = e), o = e;
|
|
61
|
-
break;
|
|
62
|
-
default:
|
|
63
|
-
if (!+n[e]) break n;
|
|
64
|
-
i > 0 && (i = 0);
|
|
65
|
-
break;
|
|
66
|
-
}
|
|
67
|
-
return i > 0 ? n.slice(0, i) + n.slice(o + 1) : n;
|
|
68
|
-
}
|
|
69
|
-
var N;
|
|
70
|
-
function v(n, t) {
|
|
71
|
-
var e = j(n, t);
|
|
72
|
-
if (!e) return N = void 0, n.toPrecision(t);
|
|
73
|
-
var i = e[0], o = e[1], a = o - (N = Math.max(-8, Math.min(8, Math.floor(o / 3))) * 3) + 1, c = i.length;
|
|
74
|
-
return a === c ? i : a > c ? i + new Array(a - c + 1).join("0") : a > 0 ? i.slice(0, a) + "." + i.slice(a) : "0." + new Array(1 - a).join("0") + j(n, Math.max(0, t + a - 1))[0];
|
|
75
|
-
}
|
|
76
|
-
function X(n, t) {
|
|
77
|
-
var e = j(n, t);
|
|
78
|
-
if (!e) return n + "";
|
|
79
|
-
var i = e[0], o = e[1];
|
|
80
|
-
return o < 0 ? "0." + new Array(-o).join("0") + i : i.length > o + 1 ? i.slice(0, o + 1) + "." + i.slice(o + 1) : i + new Array(o - i.length + 2).join("0");
|
|
81
|
-
}
|
|
82
|
-
const O = {
|
|
83
|
-
"%": (n, t) => (n * 100).toFixed(t),
|
|
84
|
-
b: (n) => Math.round(n).toString(2),
|
|
85
|
-
c: (n) => n + "",
|
|
86
|
-
d: J,
|
|
87
|
-
e: (n, t) => n.toExponential(t),
|
|
88
|
-
f: (n, t) => n.toFixed(t),
|
|
89
|
-
g: (n, t) => n.toPrecision(t),
|
|
90
|
-
o: (n) => Math.round(n).toString(8),
|
|
91
|
-
p: (n, t) => X(n * 100, t),
|
|
92
|
-
r: X,
|
|
93
|
-
s: v,
|
|
94
|
-
X: (n) => Math.round(n).toString(16).toUpperCase(),
|
|
95
|
-
x: (n) => Math.round(n).toString(16)
|
|
96
|
-
};
|
|
97
|
-
function R(n) {
|
|
98
|
-
return n;
|
|
99
|
-
}
|
|
100
|
-
var U = Array.prototype.map, Y = ["y", "z", "a", "f", "p", "n", "µ", "m", "", "k", "M", "G", "T", "P", "E", "Z", "Y"];
|
|
101
|
-
function nn(n) {
|
|
102
|
-
var t = n.grouping === void 0 || n.thousands === void 0 ? R : Q(U.call(n.grouping, Number), n.thousands + ""), e = n.currency === void 0 ? "" : n.currency[0] + "", i = n.currency === void 0 ? "" : n.currency[1] + "", o = n.decimal === void 0 ? "." : n.decimal + "", a = n.numerals === void 0 ? R : V(U.call(n.numerals, String)), c = n.percent === void 0 ? "%" : n.percent + "", h = n.minus === void 0 ? "−" : n.minus + "", M = n.nan === void 0 ? "NaN" : n.nan + "";
|
|
103
|
-
function T(f, g) {
|
|
104
|
-
f = $(f);
|
|
105
|
-
var b = f.fill, p = f.align, m = f.sign, w = f.symbol, S = f.zero, E = f.width, F = f.comma, y = f.precision, C = f.trim, d = f.type;
|
|
106
|
-
d === "n" ? (F = !0, d = "g") : O[d] || (y === void 0 && (y = 12), C = !0, d = "g"), (S || b === "0" && p === "=") && (S = !0, b = "0", p = "=");
|
|
107
|
-
var q = (g && g.prefix !== void 0 ? g.prefix : "") + (w === "$" ? e : w === "#" && /[boxX]/.test(d) ? "0" + d.toLowerCase() : ""), B = (w === "$" ? i : /[%p]/.test(d) ? c : "") + (g && g.suffix !== void 0 ? g.suffix : ""), D = O[d], H = /[defgprs%]/.test(d);
|
|
108
|
-
y = y === void 0 ? 6 : /[gprs]/.test(d) ? Math.max(1, Math.min(21, y)) : Math.max(0, Math.min(20, y));
|
|
109
|
-
function G(r) {
|
|
110
|
-
var l = q, u = B, x, I, k;
|
|
111
|
-
if (d === "c")
|
|
112
|
-
u = D(r) + u, r = "";
|
|
113
|
-
else {
|
|
114
|
-
r = +r;
|
|
115
|
-
var P = r < 0 || 1 / r < 0;
|
|
116
|
-
if (r = isNaN(r) ? M : D(Math.abs(r), y), C && (r = _(r)), P && +r == 0 && m !== "+" && (P = !1), l = (P ? m === "(" ? m : h : m === "-" || m === "(" ? "" : m) + l, u = (d === "s" && !isNaN(r) && N !== void 0 ? Y[8 + N / 3] : "") + u + (P && m === "(" ? ")" : ""), H) {
|
|
117
|
-
for (x = -1, I = r.length; ++x < I; )
|
|
118
|
-
if (k = r.charCodeAt(x), 48 > k || k > 57) {
|
|
119
|
-
u = (k === 46 ? o + r.slice(x + 1) : r.slice(x)) + u, r = r.slice(0, x);
|
|
120
|
-
break;
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
F && !S && (r = t(r, 1 / 0));
|
|
125
|
-
var z = l.length + r.length + u.length, s = z < E ? new Array(E - z + 1).join(b) : "";
|
|
126
|
-
switch (F && S && (r = t(s + r, s.length ? E - u.length : 1 / 0), s = ""), p) {
|
|
127
|
-
case "<":
|
|
128
|
-
r = l + r + u + s;
|
|
129
|
-
break;
|
|
130
|
-
case "=":
|
|
131
|
-
r = l + s + r + u;
|
|
132
|
-
break;
|
|
133
|
-
case "^":
|
|
134
|
-
r = s.slice(0, z = s.length >> 1) + l + r + u + s.slice(z);
|
|
135
|
-
break;
|
|
136
|
-
default:
|
|
137
|
-
r = s + l + r + u;
|
|
138
|
-
break;
|
|
139
|
-
}
|
|
140
|
-
return a(r);
|
|
141
|
-
}
|
|
142
|
-
return G.toString = function() {
|
|
143
|
-
return f + "";
|
|
144
|
-
}, G;
|
|
145
|
-
}
|
|
146
|
-
function Z(f, g) {
|
|
147
|
-
var b = Math.max(-8, Math.min(8, Math.floor(K(g) / 3))) * 3, p = Math.pow(10, -b), m = T((f = $(f), f.type = "f", f), { suffix: Y[8 + b / 3] });
|
|
148
|
-
return function(w) {
|
|
149
|
-
return m(p * w);
|
|
150
|
-
};
|
|
151
|
-
}
|
|
152
|
-
return {
|
|
153
|
-
format: T,
|
|
154
|
-
formatPrefix: Z
|
|
155
|
-
};
|
|
156
|
-
}
|
|
157
|
-
var A, tn, rn;
|
|
158
|
-
en({
|
|
159
|
-
thousands: ",",
|
|
160
|
-
grouping: [3],
|
|
161
|
-
currency: ["$", ""]
|
|
162
|
-
});
|
|
163
|
-
function en(n) {
|
|
164
|
-
return A = nn(n), tn = A.format, rn = A.formatPrefix, A;
|
|
165
|
-
}
|
|
166
|
-
export {
|
|
167
|
-
rn as a,
|
|
168
|
-
tn as b,
|
|
169
|
-
K as e,
|
|
170
|
-
$ as f
|
|
171
|
-
};
|