@hankchen/canvas-editor-vue 0.1.1 → 0.1.3
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/canvas-DP-pVLyA.js +1650 -0
- package/dist/canvas.js +1 -1
- package/dist/{completionAnchor-4lhR2kJz.js → completionAnchor-CDR5YZhu.js} +28 -28
- package/dist/{createLucideIcon-CMq8ZKo2.js → createLucideIcon-SCvtEGVf.js} +11 -11
- package/dist/{dist-DuXLYZZ9.js → dist-DGtNmLwo.js} +1 -1
- package/dist/index.js +12 -12
- package/dist/{layer-panel-ArP66_vZ.js → layer-panel-CXIkRodC.js} +240 -239
- package/dist/layer-panel.js +1 -1
- package/dist/layerPath-uy2ywyld.js +76 -0
- package/dist/{property-panel-jt_rsTVW.js → property-panel-CigAECN_.js} +652 -651
- package/dist/property-panel.js +1 -1
- package/dist/shared-BTyB4vbT.js +123 -0
- package/dist/shared.js +8 -8
- package/dist/{status-bar-BhhrVoBZ.js → status-bar-DO8akYAw.js} +50 -49
- package/dist/status-bar.js +1 -1
- package/dist/{uploadFile-CutE_xI-.js → uploadFile-BOfv8aLG.js} +106 -105
- package/dist/{useDataSourceSchema-C924m8fc.js → useDataSourceSchema-DStVoY8Z.js} +47 -47
- package/dist/{usePathCompletion-DkHoGla4.js → usePathCompletion-uJ5c_gQ0.js} +60 -59
- package/dist/{useShortcutsHelp-DTC3yRil.js → useShortcutsHelp-CsyarO2P.js} +1 -1
- package/dist/{useTransientFeedback-gS9Xa9GY.js → useTransientFeedback-Cnp6aNB7.js} +1 -1
- package/dist/{useViewport-BLe2ise1.js → useViewport-D9Ipevzs.js} +5 -5
- package/package.json +1 -1
- package/dist/canvas-CS4SmrIO.js +0 -1649
- package/dist/layerPath-BRZK9ka1.js +0 -2160
- package/dist/shared-D9zYUQaw.js +0 -123
package/dist/layer-panel.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e, i as t, n, r, t as i } from "./layer-panel-
|
|
1
|
+
import { a as e, i as t, n, r, t as i } from "./layer-panel-CXIkRodC.js";
|
|
2
2
|
export { t as ADD_LAYER_MENU, e as ADD_MENU, i as LayerPanel, n as isUpperHalf, r as useLayerPanel };
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
//#region ../canvas-editor/src/shared/layerPath.ts
|
|
2
|
+
function e(e) {
|
|
3
|
+
return typeof e == "number" && Number.isSafeInteger(e) && e >= 0;
|
|
4
|
+
}
|
|
5
|
+
function t(t) {
|
|
6
|
+
if (!Array.isArray(t) || t.length < 2 || t[0] !== "layers" || !e(t[1])) return !1;
|
|
7
|
+
let n = [
|
|
8
|
+
"rows",
|
|
9
|
+
"cells",
|
|
10
|
+
"content"
|
|
11
|
+
], r = 0, i = 2;
|
|
12
|
+
for (; i < t.length;) {
|
|
13
|
+
let a = t[i];
|
|
14
|
+
if (r === 0 && a === "template") {
|
|
15
|
+
if (i === t.length - 1) return !0;
|
|
16
|
+
if (t[i + 1] !== "cells") return !1;
|
|
17
|
+
r = 1, i += 1;
|
|
18
|
+
continue;
|
|
19
|
+
}
|
|
20
|
+
let o = n[r];
|
|
21
|
+
if (a !== o) return !1;
|
|
22
|
+
if (o === "content") return i === t.length - 1;
|
|
23
|
+
if (!e(t[i + 1])) return !1;
|
|
24
|
+
r += 1, i += 2;
|
|
25
|
+
}
|
|
26
|
+
return !0;
|
|
27
|
+
}
|
|
28
|
+
function n(e) {
|
|
29
|
+
return e.includes("template");
|
|
30
|
+
}
|
|
31
|
+
function r(e) {
|
|
32
|
+
return t(e) && e.length === 2;
|
|
33
|
+
}
|
|
34
|
+
function i(e, t) {
|
|
35
|
+
if (e === t) return !0;
|
|
36
|
+
if (!e || !t || e.length !== t.length) return !1;
|
|
37
|
+
for (let n = 0; n < e.length; n += 1) if (e[n] !== t[n]) return !1;
|
|
38
|
+
return !0;
|
|
39
|
+
}
|
|
40
|
+
function a(e, t) {
|
|
41
|
+
if (e.length < t.length) return !1;
|
|
42
|
+
for (let n = 0; n < t.length; n += 1) if (e[n] !== t[n]) return !1;
|
|
43
|
+
return !0;
|
|
44
|
+
}
|
|
45
|
+
function o(e, t) {
|
|
46
|
+
return t.some((t) => a(e, t));
|
|
47
|
+
}
|
|
48
|
+
function s(e, t) {
|
|
49
|
+
let n = e, r = 0;
|
|
50
|
+
for (; r < t.length;) {
|
|
51
|
+
let e = n;
|
|
52
|
+
if (typeof e != "object" || !e) return null;
|
|
53
|
+
let i = t[r];
|
|
54
|
+
if (typeof i != "string" || (n = e[i], n == null)) return null;
|
|
55
|
+
if (i === "template") {
|
|
56
|
+
r += 1;
|
|
57
|
+
continue;
|
|
58
|
+
}
|
|
59
|
+
if (r + 1 >= t.length) break;
|
|
60
|
+
let a = n, o = t[r + 1];
|
|
61
|
+
if (!Array.isArray(a) || typeof o != "number" || (n = a[o], n == null)) return null;
|
|
62
|
+
r += 2;
|
|
63
|
+
}
|
|
64
|
+
return n;
|
|
65
|
+
}
|
|
66
|
+
function c(e, n) {
|
|
67
|
+
if (!t(n)) return null;
|
|
68
|
+
let r = s(e, n);
|
|
69
|
+
return typeof r != "object" || !r || !("type" in r) ? null : r;
|
|
70
|
+
}
|
|
71
|
+
function l(e, t) {
|
|
72
|
+
let n = t[1];
|
|
73
|
+
return typeof n != "number" || !Number.isSafeInteger(n) || n < 0 ? null : e.layers[n] ?? null;
|
|
74
|
+
}
|
|
75
|
+
//#endregion
|
|
76
|
+
export { c as a, i, r as n, l as o, n as r, o as t };
|