vite-plugin-vue-devtools 1.0.0-rc.8 → 7.0.1
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 +8 -172
- package/dist/client/assets/css-a-KJtBLB.js +505 -0
- package/dist/client/assets/diff--l9-nN5b.js +1 -0
- package/dist/client/assets/html-5-AIf93y.js +74 -0
- package/dist/client/assets/index-NNrCE7Vx.css +1 -0
- package/dist/client/assets/index-oq63TS6O.js +1080 -0
- package/dist/client/assets/javascript-Of8SnKfU.js +699 -0
- package/dist/client/assets/json-t1qiHl76.js +25 -0
- package/dist/client/assets/onig-mBJmD8D5.js +1 -0
- package/dist/client/assets/shellscript-h1L64xId.js +4 -0
- package/dist/client/assets/typescript-b1Nw_bQe.js +666 -0
- package/dist/client/assets/unocss-runtime-kftsoZPE.js +2 -0
- package/dist/client/assets/vitesse-dark-5VceXvs6.js +1 -0
- package/dist/client/assets/vitesse-light-HOMMxGxw.js +1 -0
- package/dist/client/assets/vue-apis-Nh9IahXf.js +1 -0
- package/dist/client/assets/vue-html-eJ6eRCYJ.js +1 -0
- package/dist/client/assets/vue-nOwTje1i.js +2002 -0
- package/dist/client/assets/yaml-FtfhlYqU.js +200 -0
- package/dist/client/color-scheme.js +6 -0
- package/dist/client/index.html +13 -21
- package/dist/vite.cjs +116 -13794
- package/dist/vite.d.cts +6 -9
- package/dist/vite.d.mts +6 -9
- package/dist/vite.d.ts +6 -9
- package/dist/vite.mjs +113 -13774
- package/package.json +18 -19
- package/src/overlay/devtools-overlay.css +1 -0
- package/src/overlay/devtools-overlay.js +4 -0
- package/src/overlay.js +77 -0
- package/README.zh-CN.md +0 -186
- package/client.d.ts +0 -63
- package/dist/client/assets/DrawerRight.vue_vue_type_script_setup_true_lang-99688d1e.js +0 -81
- package/dist/client/assets/IconButton.vue_vue_type_script_setup_true_lang-48a6bea2.js +0 -26
- package/dist/client/assets/IconTitle.vue_vue_type_script_setup_true_lang-adb17252.js +0 -30
- package/dist/client/assets/IframeView.vue_vue_type_script_setup_true_lang-4ccdbf42.js +0 -96
- package/dist/client/assets/PanelGrids-664603ce.js +0 -15
- package/dist/client/assets/SectionBlock-0024395a.css +0 -18
- package/dist/client/assets/SectionBlock-04b7ab1e.js +0 -109
- package/dist/client/assets/StateFields.vue_vue_type_script_setup_true_lang-48cf50ad.js +0 -381
- package/dist/client/assets/Switch.vue_vue_type_script_setup_true_lang-d74bf986.js +0 -87
- package/dist/client/assets/TextInput.vue_vue_type_script_setup_true_lang-65c09c69.js +0 -38
- package/dist/client/assets/__eyedropper-7bbec9b2.js +0 -149
- package/dist/client/assets/_commonjsHelpers-7e83dbf2.js +0 -34
- package/dist/client/assets/assets-641818bf.js +0 -1597
- package/dist/client/assets/component-docs-7bd37475.js +0 -195
- package/dist/client/assets/components-b0181ea4.js +0 -790
- package/dist/client/assets/data-8729d21a.js +0 -399
- package/dist/client/assets/dayjs.min-f03ccd82.js +0 -13
- package/dist/client/assets/documentations-7cba8670.js +0 -276
- package/dist/client/assets/fuse.esm-c317b696.js +0 -1782
- package/dist/client/assets/graph-edf83976.js +0 -52092
- package/dist/client/assets/index-77d53487.js +0 -18551
- package/dist/client/assets/index-b5475fe0.css +0 -482
- package/dist/client/assets/inspect-d17224a9.js +0 -20
- package/dist/client/assets/jse-theme-dark-333a4654.js +0 -1565
- package/dist/client/assets/jse-theme-dark-351d62d5.css +0 -114
- package/dist/client/assets/npm-076ecb7c.js +0 -550
- package/dist/client/assets/npm-832f3f2c.css +0 -209
- package/dist/client/assets/overview-d99e7f18.js +0 -303
- package/dist/client/assets/pages-fca7d8d3.js +0 -561
- package/dist/client/assets/pinia-3f5b6c57.js +0 -108
- package/dist/client/assets/pinia-7ed2c830.svg +0 -1
- package/dist/client/assets/rerender-trace-3afd48a1.css +0 -14
- package/dist/client/assets/rerender-trace-5fc6fb22.js +0 -436
- package/dist/client/assets/routes-9567a43f.js +0 -132
- package/dist/client/assets/settings-5a2e184c.js +0 -9652
- package/dist/client/assets/settings-7bce89ae.css +0 -11
- package/dist/client/assets/splitpanes.es-26cdc434.js +0 -343
- package/dist/client/assets/timeline-20d79e43.js +0 -1480
- package/dist/client/assets/timeline-b315b2e0.css +0 -1
- package/dist/client/assets/vue-5d4e674c.svg +0 -1
- package/dist/client/assets/vueuse-995374f6.svg +0 -1
- package/src/app.js +0 -4
- package/src/views/ComponentInspector.vue +0 -68
- package/src/views/FrameBox.vue +0 -231
- package/src/views/Main.vue +0 -435
- package/src/views/RerenderIndicator.vue +0 -37
- package/src/views/composables.ts +0 -630
- package/src/views/utils.ts +0 -241
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
.container[data-v-44f45d0a] {
|
|
3
|
-
margin-top:0.5rem;display:flex;border-width:1px;border-color:rgba(156,163,175,0.2);border-radius:0.75rem;;
|
|
4
|
-
}
|
|
5
|
-
.container[data-v-44f45d0a]:empty {
|
|
6
|
-
padding: 0.8rem;
|
|
7
|
-
text-align: center;
|
|
8
|
-
}
|
|
9
|
-
.container[data-v-44f45d0a]:empty:before {
|
|
10
|
-
content: 'Empty group';
|
|
11
|
-
}
|
|
@@ -1,343 +0,0 @@
|
|
|
1
|
-
import { ar as h, o as openBlock, e as createElementBlock, f as renderSlot, l as normalizeStyle } from './index-77d53487.js';
|
|
2
|
-
|
|
3
|
-
const M = {
|
|
4
|
-
name: "splitpanes",
|
|
5
|
-
emits: ["ready", "resize", "resized", "pane-click", "pane-maximize", "pane-add", "pane-remove", "splitter-click"],
|
|
6
|
-
props: {
|
|
7
|
-
horizontal: { type: Boolean },
|
|
8
|
-
pushOtherPanes: { type: Boolean, default: !0 },
|
|
9
|
-
dblClickSplitter: { type: Boolean, default: !0 },
|
|
10
|
-
rtl: { type: Boolean, default: !1 },
|
|
11
|
-
firstSplitter: { type: Boolean }
|
|
12
|
-
},
|
|
13
|
-
provide() {
|
|
14
|
-
return {
|
|
15
|
-
requestUpdate: this.requestUpdate,
|
|
16
|
-
onPaneAdd: this.onPaneAdd,
|
|
17
|
-
onPaneRemove: this.onPaneRemove,
|
|
18
|
-
onPaneClick: this.onPaneClick
|
|
19
|
-
};
|
|
20
|
-
},
|
|
21
|
-
data: () => ({
|
|
22
|
-
container: null,
|
|
23
|
-
ready: !1,
|
|
24
|
-
panes: [],
|
|
25
|
-
touch: {
|
|
26
|
-
mouseDown: !1,
|
|
27
|
-
dragging: !1,
|
|
28
|
-
activeSplitter: null
|
|
29
|
-
},
|
|
30
|
-
splitterTaps: {
|
|
31
|
-
splitter: null,
|
|
32
|
-
timeoutId: null
|
|
33
|
-
}
|
|
34
|
-
}),
|
|
35
|
-
computed: {
|
|
36
|
-
panesCount() {
|
|
37
|
-
return this.panes.length;
|
|
38
|
-
},
|
|
39
|
-
indexedPanes() {
|
|
40
|
-
return this.panes.reduce((e, i) => (e[i.id] = i) && e, {});
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
methods: {
|
|
44
|
-
updatePaneComponents() {
|
|
45
|
-
this.panes.forEach((e) => {
|
|
46
|
-
e.update && e.update({
|
|
47
|
-
[this.horizontal ? "height" : "width"]: `${this.indexedPanes[e.id].size}%`
|
|
48
|
-
});
|
|
49
|
-
});
|
|
50
|
-
},
|
|
51
|
-
bindEvents() {
|
|
52
|
-
document.addEventListener("mousemove", this.onMouseMove, { passive: !1 }), document.addEventListener("mouseup", this.onMouseUp), "ontouchstart" in window && (document.addEventListener("touchmove", this.onMouseMove, { passive: !1 }), document.addEventListener("touchend", this.onMouseUp));
|
|
53
|
-
},
|
|
54
|
-
unbindEvents() {
|
|
55
|
-
document.removeEventListener("mousemove", this.onMouseMove, { passive: !1 }), document.removeEventListener("mouseup", this.onMouseUp), "ontouchstart" in window && (document.removeEventListener("touchmove", this.onMouseMove, { passive: !1 }), document.removeEventListener("touchend", this.onMouseUp));
|
|
56
|
-
},
|
|
57
|
-
onMouseDown(e, i) {
|
|
58
|
-
this.bindEvents(), this.touch.mouseDown = !0, this.touch.activeSplitter = i;
|
|
59
|
-
},
|
|
60
|
-
onMouseMove(e) {
|
|
61
|
-
this.touch.mouseDown && (e.preventDefault(), this.touch.dragging = !0, this.calculatePanesSize(this.getCurrentMouseDrag(e)), this.$emit("resize", this.panes.map((i) => ({ min: i.min, max: i.max, size: i.size }))));
|
|
62
|
-
},
|
|
63
|
-
onMouseUp() {
|
|
64
|
-
this.touch.dragging && this.$emit("resized", this.panes.map((e) => ({ min: e.min, max: e.max, size: e.size }))), this.touch.mouseDown = !1, setTimeout(() => {
|
|
65
|
-
this.touch.dragging = !1, this.unbindEvents();
|
|
66
|
-
}, 100);
|
|
67
|
-
},
|
|
68
|
-
onSplitterClick(e, i) {
|
|
69
|
-
"ontouchstart" in window && (e.preventDefault(), this.dblClickSplitter && (this.splitterTaps.splitter === i ? (clearTimeout(this.splitterTaps.timeoutId), this.splitterTaps.timeoutId = null, this.onSplitterDblClick(e, i), this.splitterTaps.splitter = null) : (this.splitterTaps.splitter = i, this.splitterTaps.timeoutId = setTimeout(() => {
|
|
70
|
-
this.splitterTaps.splitter = null;
|
|
71
|
-
}, 500)))), this.touch.dragging || this.$emit("splitter-click", this.panes[i]);
|
|
72
|
-
},
|
|
73
|
-
onSplitterDblClick(e, i) {
|
|
74
|
-
let s = 0;
|
|
75
|
-
this.panes = this.panes.map((n, t) => (n.size = t === i ? n.max : n.min, t !== i && (s += n.min), n)), this.panes[i].size -= s, this.$emit("pane-maximize", this.panes[i]), this.$emit("resized", this.panes.map((n) => ({ min: n.min, max: n.max, size: n.size })));
|
|
76
|
-
},
|
|
77
|
-
onPaneClick(e, i) {
|
|
78
|
-
this.$emit("pane-click", this.indexedPanes[i]);
|
|
79
|
-
},
|
|
80
|
-
getCurrentMouseDrag(e) {
|
|
81
|
-
const i = this.container.getBoundingClientRect(), { clientX: s, clientY: n } = "ontouchstart" in window && e.touches ? e.touches[0] : e;
|
|
82
|
-
return {
|
|
83
|
-
x: s - i.left,
|
|
84
|
-
y: n - i.top
|
|
85
|
-
};
|
|
86
|
-
},
|
|
87
|
-
getCurrentDragPercentage(e) {
|
|
88
|
-
e = e[this.horizontal ? "y" : "x"];
|
|
89
|
-
const i = this.container[this.horizontal ? "clientHeight" : "clientWidth"];
|
|
90
|
-
return this.rtl && !this.horizontal && (e = i - e), e * 100 / i;
|
|
91
|
-
},
|
|
92
|
-
calculatePanesSize(e) {
|
|
93
|
-
const i = this.touch.activeSplitter;
|
|
94
|
-
let s = {
|
|
95
|
-
prevPanesSize: this.sumPrevPanesSize(i),
|
|
96
|
-
nextPanesSize: this.sumNextPanesSize(i),
|
|
97
|
-
prevReachedMinPanes: 0,
|
|
98
|
-
nextReachedMinPanes: 0
|
|
99
|
-
};
|
|
100
|
-
const n = 0 + (this.pushOtherPanes ? 0 : s.prevPanesSize), t = 100 - (this.pushOtherPanes ? 0 : s.nextPanesSize), a = Math.max(Math.min(this.getCurrentDragPercentage(e), t), n);
|
|
101
|
-
let r = [i, i + 1], o = this.panes[r[0]] || null, h = this.panes[r[1]] || null;
|
|
102
|
-
const l = o.max < 100 && a >= o.max + s.prevPanesSize, u = h.max < 100 && a <= 100 - (h.max + this.sumNextPanesSize(i + 1));
|
|
103
|
-
if (l || u) {
|
|
104
|
-
l ? (o.size = o.max, h.size = Math.max(100 - o.max - s.prevPanesSize - s.nextPanesSize, 0)) : (o.size = Math.max(100 - h.max - s.prevPanesSize - this.sumNextPanesSize(i + 1), 0), h.size = h.max);
|
|
105
|
-
return;
|
|
106
|
-
}
|
|
107
|
-
if (this.pushOtherPanes) {
|
|
108
|
-
const d = this.doPushOtherPanes(s, a);
|
|
109
|
-
if (!d)
|
|
110
|
-
return;
|
|
111
|
-
(({ sums: s, panesToResize: r } = d)), o = this.panes[r[0]] || null, h = this.panes[r[1]] || null;
|
|
112
|
-
}
|
|
113
|
-
o !== null && (o.size = Math.min(Math.max(a - s.prevPanesSize - s.prevReachedMinPanes, o.min), o.max)), h !== null && (h.size = Math.min(Math.max(100 - a - s.nextPanesSize - s.nextReachedMinPanes, h.min), h.max));
|
|
114
|
-
},
|
|
115
|
-
doPushOtherPanes(e, i) {
|
|
116
|
-
const s = this.touch.activeSplitter, n = [s, s + 1];
|
|
117
|
-
return i < e.prevPanesSize + this.panes[n[0]].min && (n[0] = this.findPrevExpandedPane(s).index, e.prevReachedMinPanes = 0, n[0] < s && this.panes.forEach((t, a) => {
|
|
118
|
-
a > n[0] && a <= s && (t.size = t.min, e.prevReachedMinPanes += t.min);
|
|
119
|
-
}), e.prevPanesSize = this.sumPrevPanesSize(n[0]), n[0] === void 0) ? (e.prevReachedMinPanes = 0, this.panes[0].size = this.panes[0].min, this.panes.forEach((t, a) => {
|
|
120
|
-
a > 0 && a <= s && (t.size = t.min, e.prevReachedMinPanes += t.min);
|
|
121
|
-
}), this.panes[n[1]].size = 100 - e.prevReachedMinPanes - this.panes[0].min - e.prevPanesSize - e.nextPanesSize, null) : i > 100 - e.nextPanesSize - this.panes[n[1]].min && (n[1] = this.findNextExpandedPane(s).index, e.nextReachedMinPanes = 0, n[1] > s + 1 && this.panes.forEach((t, a) => {
|
|
122
|
-
a > s && a < n[1] && (t.size = t.min, e.nextReachedMinPanes += t.min);
|
|
123
|
-
}), e.nextPanesSize = this.sumNextPanesSize(n[1] - 1), n[1] === void 0) ? (e.nextReachedMinPanes = 0, this.panes[this.panesCount - 1].size = this.panes[this.panesCount - 1].min, this.panes.forEach((t, a) => {
|
|
124
|
-
a < this.panesCount - 1 && a >= s + 1 && (t.size = t.min, e.nextReachedMinPanes += t.min);
|
|
125
|
-
}), this.panes[n[0]].size = 100 - e.prevPanesSize - e.nextReachedMinPanes - this.panes[this.panesCount - 1].min - e.nextPanesSize, null) : { sums: e, panesToResize: n };
|
|
126
|
-
},
|
|
127
|
-
sumPrevPanesSize(e) {
|
|
128
|
-
return this.panes.reduce((i, s, n) => i + (n < e ? s.size : 0), 0);
|
|
129
|
-
},
|
|
130
|
-
sumNextPanesSize(e) {
|
|
131
|
-
return this.panes.reduce((i, s, n) => i + (n > e + 1 ? s.size : 0), 0);
|
|
132
|
-
},
|
|
133
|
-
findPrevExpandedPane(e) {
|
|
134
|
-
return [...this.panes].reverse().find((s) => s.index < e && s.size > s.min) || {};
|
|
135
|
-
},
|
|
136
|
-
findNextExpandedPane(e) {
|
|
137
|
-
return this.panes.find((s) => s.index > e + 1 && s.size > s.min) || {};
|
|
138
|
-
},
|
|
139
|
-
checkSplitpanesNodes() {
|
|
140
|
-
Array.from(this.container.children).forEach((i) => {
|
|
141
|
-
const s = i.classList.contains("splitpanes__pane"), n = i.classList.contains("splitpanes__splitter");
|
|
142
|
-
!s && !n && (i.parentNode.removeChild(i), console.warn("Splitpanes: Only <pane> elements are allowed at the root of <splitpanes>. One of your DOM nodes was removed."));
|
|
143
|
-
});
|
|
144
|
-
},
|
|
145
|
-
addSplitter(e, i, s = !1) {
|
|
146
|
-
const n = e - 1, t = document.createElement("div");
|
|
147
|
-
t.classList.add("splitpanes__splitter"), s || (t.onmousedown = (a) => this.onMouseDown(a, n), typeof window < "u" && "ontouchstart" in window && (t.ontouchstart = (a) => this.onMouseDown(a, n)), t.onclick = (a) => this.onSplitterClick(a, n + 1)), this.dblClickSplitter && (t.ondblclick = (a) => this.onSplitterDblClick(a, n + 1)), i.parentNode.insertBefore(t, i);
|
|
148
|
-
},
|
|
149
|
-
removeSplitter(e) {
|
|
150
|
-
e.onmousedown = void 0, e.onclick = void 0, e.ondblclick = void 0, e.parentNode.removeChild(e);
|
|
151
|
-
},
|
|
152
|
-
redoSplitters() {
|
|
153
|
-
const e = Array.from(this.container.children);
|
|
154
|
-
e.forEach((s) => {
|
|
155
|
-
s.className.includes("splitpanes__splitter") && this.removeSplitter(s);
|
|
156
|
-
});
|
|
157
|
-
let i = 0;
|
|
158
|
-
e.forEach((s) => {
|
|
159
|
-
s.className.includes("splitpanes__pane") && (!i && this.firstSplitter ? this.addSplitter(i, s, !0) : i && this.addSplitter(i, s), i++);
|
|
160
|
-
});
|
|
161
|
-
},
|
|
162
|
-
requestUpdate({ target: e, ...i }) {
|
|
163
|
-
const s = this.indexedPanes[e._.uid];
|
|
164
|
-
Object.entries(i).forEach(([n, t]) => s[n] = t);
|
|
165
|
-
},
|
|
166
|
-
onPaneAdd(e) {
|
|
167
|
-
let i = -1;
|
|
168
|
-
Array.from(e.$el.parentNode.children).some((t) => (t.className.includes("splitpanes__pane") && i++, t === e.$el));
|
|
169
|
-
const s = parseFloat(e.minSize), n = parseFloat(e.maxSize);
|
|
170
|
-
this.panes.splice(i, 0, {
|
|
171
|
-
id: e._.uid,
|
|
172
|
-
index: i,
|
|
173
|
-
min: isNaN(s) ? 0 : s,
|
|
174
|
-
max: isNaN(n) ? 100 : n,
|
|
175
|
-
size: e.size === null ? null : parseFloat(e.size),
|
|
176
|
-
givenSize: e.size,
|
|
177
|
-
update: e.update
|
|
178
|
-
}), this.panes.forEach((t, a) => t.index = a), this.ready && this.$nextTick(() => {
|
|
179
|
-
this.redoSplitters(), this.resetPaneSizes({ addedPane: this.panes[i] }), this.$emit("pane-add", { index: i, panes: this.panes.map((t) => ({ min: t.min, max: t.max, size: t.size })) });
|
|
180
|
-
});
|
|
181
|
-
},
|
|
182
|
-
onPaneRemove(e) {
|
|
183
|
-
const i = this.panes.findIndex((n) => n.id === e._.uid), s = this.panes.splice(i, 1)[0];
|
|
184
|
-
this.panes.forEach((n, t) => n.index = t), this.$nextTick(() => {
|
|
185
|
-
this.redoSplitters(), this.resetPaneSizes({ removedPane: { ...s, index: i } }), this.$emit("pane-remove", { removed: s, panes: this.panes.map((n) => ({ min: n.min, max: n.max, size: n.size })) });
|
|
186
|
-
});
|
|
187
|
-
},
|
|
188
|
-
resetPaneSizes(e = {}) {
|
|
189
|
-
!e.addedPane && !e.removedPane ? this.initialPanesSizing() : this.panes.some((i) => i.givenSize !== null || i.min || i.max < 100) ? this.equalizeAfterAddOrRemove(e) : this.equalize(), this.ready && this.$emit("resized", this.panes.map((i) => ({ min: i.min, max: i.max, size: i.size })));
|
|
190
|
-
},
|
|
191
|
-
equalize() {
|
|
192
|
-
const e = 100 / this.panesCount;
|
|
193
|
-
let i = 0;
|
|
194
|
-
const s = [], n = [];
|
|
195
|
-
this.panes.forEach((t) => {
|
|
196
|
-
t.size = Math.max(Math.min(e, t.max), t.min), i -= t.size, t.size >= t.max && s.push(t.id), t.size <= t.min && n.push(t.id);
|
|
197
|
-
}), i > 0.1 && this.readjustSizes(i, s, n);
|
|
198
|
-
},
|
|
199
|
-
initialPanesSizing() {
|
|
200
|
-
let e = 100;
|
|
201
|
-
const i = [], s = [];
|
|
202
|
-
let n = 0;
|
|
203
|
-
this.panes.forEach((a) => {
|
|
204
|
-
e -= a.size, a.size !== null && n++, a.size >= a.max && i.push(a.id), a.size <= a.min && s.push(a.id);
|
|
205
|
-
});
|
|
206
|
-
let t = 100;
|
|
207
|
-
e > 0.1 && (this.panes.forEach((a) => {
|
|
208
|
-
a.size === null && (a.size = Math.max(Math.min(e / (this.panesCount - n), a.max), a.min)), t -= a.size;
|
|
209
|
-
}), t > 0.1 && this.readjustSizes(e, i, s));
|
|
210
|
-
},
|
|
211
|
-
equalizeAfterAddOrRemove({ addedPane: e, removedPane: i } = {}) {
|
|
212
|
-
let s = 100 / this.panesCount, n = 0;
|
|
213
|
-
const t = [], a = [];
|
|
214
|
-
e && e.givenSize !== null && (s = (100 - e.givenSize) / (this.panesCount - 1)), this.panes.forEach((r) => {
|
|
215
|
-
n -= r.size, r.size >= r.max && t.push(r.id), r.size <= r.min && a.push(r.id);
|
|
216
|
-
}), !(Math.abs(n) < 0.1) && (this.panes.forEach((r) => {
|
|
217
|
-
e && e.givenSize !== null && e.id === r.id || (r.size = Math.max(Math.min(s, r.max), r.min)), n -= r.size, r.size >= r.max && t.push(r.id), r.size <= r.min && a.push(r.id);
|
|
218
|
-
}), n > 0.1 && this.readjustSizes(n, t, a));
|
|
219
|
-
},
|
|
220
|
-
readjustSizes(e, i, s) {
|
|
221
|
-
let n;
|
|
222
|
-
e > 0 ? n = e / (this.panesCount - i.length) : n = e / (this.panesCount - s.length), this.panes.forEach((t, a) => {
|
|
223
|
-
if (e > 0 && !i.includes(t.id)) {
|
|
224
|
-
const r = Math.max(Math.min(t.size + n, t.max), t.min), o = r - t.size;
|
|
225
|
-
e -= o, t.size = r;
|
|
226
|
-
} else if (!s.includes(t.id)) {
|
|
227
|
-
const r = Math.max(Math.min(t.size + n, t.max), t.min), o = r - t.size;
|
|
228
|
-
e -= o, t.size = r;
|
|
229
|
-
}
|
|
230
|
-
t.update({
|
|
231
|
-
[this.horizontal ? "height" : "width"]: `${this.indexedPanes[t.id].size}%`
|
|
232
|
-
});
|
|
233
|
-
}), Math.abs(e) > 0.1 && this.$nextTick(() => {
|
|
234
|
-
this.ready && console.warn("Splitpanes: Could not resize panes correctly due to their constraints.");
|
|
235
|
-
});
|
|
236
|
-
}
|
|
237
|
-
},
|
|
238
|
-
watch: {
|
|
239
|
-
panes: {
|
|
240
|
-
deep: !0,
|
|
241
|
-
immediate: !1,
|
|
242
|
-
handler() {
|
|
243
|
-
this.updatePaneComponents();
|
|
244
|
-
}
|
|
245
|
-
},
|
|
246
|
-
horizontal() {
|
|
247
|
-
this.updatePaneComponents();
|
|
248
|
-
},
|
|
249
|
-
firstSplitter() {
|
|
250
|
-
this.redoSplitters();
|
|
251
|
-
},
|
|
252
|
-
dblClickSplitter(e) {
|
|
253
|
-
[...this.container.querySelectorAll(".splitpanes__splitter")].forEach((s, n) => {
|
|
254
|
-
s.ondblclick = e ? (t) => this.onSplitterDblClick(t, n) : void 0;
|
|
255
|
-
});
|
|
256
|
-
}
|
|
257
|
-
},
|
|
258
|
-
beforeUnmount() {
|
|
259
|
-
this.ready = !1;
|
|
260
|
-
},
|
|
261
|
-
mounted() {
|
|
262
|
-
this.container = this.$refs.container, this.checkSplitpanesNodes(), this.redoSplitters(), this.resetPaneSizes(), this.$emit("ready"), this.ready = !0;
|
|
263
|
-
},
|
|
264
|
-
render() {
|
|
265
|
-
return h(
|
|
266
|
-
"div",
|
|
267
|
-
{
|
|
268
|
-
ref: "container",
|
|
269
|
-
class: [
|
|
270
|
-
"splitpanes",
|
|
271
|
-
`splitpanes--${this.horizontal ? "horizontal" : "vertical"}`,
|
|
272
|
-
{
|
|
273
|
-
"splitpanes--dragging": this.touch.dragging
|
|
274
|
-
}
|
|
275
|
-
]
|
|
276
|
-
},
|
|
277
|
-
this.$slots.default()
|
|
278
|
-
);
|
|
279
|
-
}
|
|
280
|
-
}, S = (e, i) => {
|
|
281
|
-
const s = e.__vccOpts || e;
|
|
282
|
-
for (const [n, t] of i)
|
|
283
|
-
s[n] = t;
|
|
284
|
-
return s;
|
|
285
|
-
}, x = {
|
|
286
|
-
name: "pane",
|
|
287
|
-
inject: ["requestUpdate", "onPaneAdd", "onPaneRemove", "onPaneClick"],
|
|
288
|
-
props: {
|
|
289
|
-
size: { type: [Number, String], default: null },
|
|
290
|
-
minSize: { type: [Number, String], default: 0 },
|
|
291
|
-
maxSize: { type: [Number, String], default: 100 }
|
|
292
|
-
},
|
|
293
|
-
data: () => ({
|
|
294
|
-
style: {}
|
|
295
|
-
}),
|
|
296
|
-
mounted() {
|
|
297
|
-
this.onPaneAdd(this);
|
|
298
|
-
},
|
|
299
|
-
beforeUnmount() {
|
|
300
|
-
this.onPaneRemove(this);
|
|
301
|
-
},
|
|
302
|
-
methods: {
|
|
303
|
-
update(e) {
|
|
304
|
-
this.style = e;
|
|
305
|
-
}
|
|
306
|
-
},
|
|
307
|
-
computed: {
|
|
308
|
-
sizeNumber() {
|
|
309
|
-
return this.size || this.size === 0 ? parseFloat(this.size) : null;
|
|
310
|
-
},
|
|
311
|
-
minSizeNumber() {
|
|
312
|
-
return parseFloat(this.minSize);
|
|
313
|
-
},
|
|
314
|
-
maxSizeNumber() {
|
|
315
|
-
return parseFloat(this.maxSize);
|
|
316
|
-
}
|
|
317
|
-
},
|
|
318
|
-
watch: {
|
|
319
|
-
sizeNumber(e) {
|
|
320
|
-
this.requestUpdate({ target: this, size: e });
|
|
321
|
-
},
|
|
322
|
-
minSizeNumber(e) {
|
|
323
|
-
this.requestUpdate({ target: this, min: e });
|
|
324
|
-
},
|
|
325
|
-
maxSizeNumber(e) {
|
|
326
|
-
this.requestUpdate({ target: this, max: e });
|
|
327
|
-
}
|
|
328
|
-
}
|
|
329
|
-
};
|
|
330
|
-
function P(e, i, s, n, t, a) {
|
|
331
|
-
return openBlock(), createElementBlock("div", {
|
|
332
|
-
class: "splitpanes__pane",
|
|
333
|
-
onClick: i[0] || (i[0] = (r) => a.onPaneClick(r, e._.uid)),
|
|
334
|
-
style: normalizeStyle(e.style)
|
|
335
|
-
}, [
|
|
336
|
-
renderSlot(e.$slots, "default")
|
|
337
|
-
], 4);
|
|
338
|
-
}
|
|
339
|
-
const g = /* @__PURE__ */ S(x, [["render", P]]);
|
|
340
|
-
|
|
341
|
-
/* Injected with object hook! */
|
|
342
|
-
|
|
343
|
-
export { M, g };
|