@kong-ui-public/split-pane 0.1.1-pr.2798.c222b7a86.0 → 0.1.1-pr.2823.7037e5373.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 +222 -6
- package/dist/split-pane.es.js +560 -0
- package/dist/split-pane.umd.js +1 -0
- package/dist/style.css +1 -0
- package/dist/types/components/SplitPane.vue.d.ts +17 -0
- package/dist/types/components/SplitPane.vue.d.ts.map +1 -0
- package/dist/types/components/VerticalNavigation.vue.d.ts +10 -0
- package/dist/types/components/VerticalNavigation.vue.d.ts.map +1 -0
- package/dist/types/composable/useI18n.d.ts +9 -0
- package/dist/types/composable/useI18n.d.ts.map +1 -0
- package/dist/types/composable/useSplitPane.d.ts +17 -0
- package/dist/types/composable/useSplitPane.d.ts.map +1 -0
- package/dist/types/constants/split-pane.d.ts +9 -0
- package/dist/types/constants/split-pane.d.ts.map +1 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/types/index.d.ts +74 -0
- package/dist/types/types/index.d.ts.map +1 -0
- package/package.json +7 -4
package/README.md
CHANGED
|
@@ -1,29 +1,38 @@
|
|
|
1
1
|
# @kong-ui-public/split-pane
|
|
2
2
|
|
|
3
|
-
A shared SplitPane
|
|
3
|
+
A shared SplitPane component for Vue 3 applications with resizable panes, vertical navigation, and collapsible panels.
|
|
4
4
|
|
|
5
5
|
- [Features](#features)
|
|
6
6
|
- [Requirements](#requirements)
|
|
7
7
|
- [Usage](#usage)
|
|
8
8
|
- [Install](#install)
|
|
9
9
|
- [Props](#props)
|
|
10
|
+
- [Slots](#slots)
|
|
11
|
+
- [Composables](#composables)
|
|
12
|
+
- [Examples](#examples)
|
|
10
13
|
|
|
11
14
|
## Features
|
|
12
15
|
|
|
13
|
-
-
|
|
14
|
-
- Resizable panes
|
|
15
|
-
-
|
|
16
|
+
- **Three-pane layout**: Left, center, and right panes with customizable visibility
|
|
17
|
+
- **Resizable panes**: Drag-to-resize functionality between center and right panes
|
|
18
|
+
- **Collapsible left pane**: Expand/collapse the left pane with smooth transitions
|
|
19
|
+
- **Vertical navigation**: Optional navigation sidebar with icon buttons and tooltips
|
|
20
|
+
- **Flexible configuration**: Control pane visibility and maximum widths
|
|
21
|
+
- **Toolbar support**: Optional toolbar slot above the panes
|
|
22
|
+
- **Responsive**: Automatically adjusts to window resizing
|
|
23
|
+
- **Accessible**: Full keyboard support and ARIA attributes
|
|
16
24
|
|
|
17
25
|
## Requirements
|
|
18
26
|
|
|
19
27
|
- `vue` must be initialized in the host application
|
|
20
28
|
- `@kong/kongponents` must be available as a `dependency` in the host application
|
|
29
|
+
- `vue-router` (optional, required if using navigation items with routing)
|
|
21
30
|
|
|
22
31
|
## Usage
|
|
23
32
|
|
|
24
33
|
### Install
|
|
25
34
|
|
|
26
|
-
Install the package in your host application
|
|
35
|
+
Install the package in your host application:
|
|
27
36
|
|
|
28
37
|
```sh
|
|
29
38
|
pnpm add @kong-ui-public/split-pane
|
|
@@ -31,4 +40,211 @@ pnpm add @kong-ui-public/split-pane
|
|
|
31
40
|
|
|
32
41
|
### Props
|
|
33
42
|
|
|
34
|
-
|
|
43
|
+
#### `SplitPane` Component
|
|
44
|
+
|
|
45
|
+
| Prop | Type | Default | Description |
|
|
46
|
+
|------|------|---------|-------------|
|
|
47
|
+
| `resizable` | `boolean` | `true` | Enable drag-to-resize functionality between center and right panes |
|
|
48
|
+
| `showResizeHandle` | `boolean` | `true` | Show/hide the resize handle divider |
|
|
49
|
+
| `showNavigation` | `boolean` | `true` | Show/hide the vertical navigation sidebar |
|
|
50
|
+
| `navigationItems` | `VerticalNavigationItem[]` | `[]` | Array of navigation items to display in the sidebar |
|
|
51
|
+
| `paneLeft` | `PaneConfig` | `{ visible: true, maxWidth: '500px' }` | Configuration for the left pane |
|
|
52
|
+
| `paneCenter` | `PaneConfig` | `{ visible: true, maxWidth: '50%' }` | Configuration for the center pane |
|
|
53
|
+
| `paneRight` | `PaneConfig` | `{ visible: true, maxWidth: '50%' }` | Configuration for the right pane |
|
|
54
|
+
|
|
55
|
+
#### Type Definitions
|
|
56
|
+
|
|
57
|
+
```typescript
|
|
58
|
+
interface PaneConfig {
|
|
59
|
+
/** Pass false to hide the pane even if it contains slot content */
|
|
60
|
+
visible?: boolean
|
|
61
|
+
/** The max width of the pane (e.g., '500px', '50%') */
|
|
62
|
+
maxWidth?: string
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
interface VerticalNavigationItem {
|
|
66
|
+
/** Vue Router location object for navigation */
|
|
67
|
+
to?: RouteLocationRaw
|
|
68
|
+
/** Tooltip text displayed on hover */
|
|
69
|
+
tooltip: string
|
|
70
|
+
/** Whether this navigation item is currently active */
|
|
71
|
+
active: boolean
|
|
72
|
+
/** Icon component to display */
|
|
73
|
+
icon: Component
|
|
74
|
+
/** Test ID for the navigation item */
|
|
75
|
+
testid: string
|
|
76
|
+
}
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
#### Default Constraints
|
|
80
|
+
|
|
81
|
+
- **Left pane**: Min width `260px`, max width `500px` (customizable)
|
|
82
|
+
- **Center/Right panes**: Min width `300px` each
|
|
83
|
+
- When `resizable` is `true`, center and right panes have no max-width constraint
|
|
84
|
+
- When `resizable` is `false`, center and right panes respect the `maxWidth` prop
|
|
85
|
+
|
|
86
|
+
### Slots
|
|
87
|
+
|
|
88
|
+
The component provides four named slots:
|
|
89
|
+
|
|
90
|
+
| Slot | Description |
|
|
91
|
+
|------|-------------|
|
|
92
|
+
| `toolbar` | Optional toolbar content displayed above the panes |
|
|
93
|
+
| `pane-left` | Content for the collapsible left pane |
|
|
94
|
+
| `pane-center` | Content for the resizable center pane |
|
|
95
|
+
| `pane-right` | Content for the right pane |
|
|
96
|
+
|
|
97
|
+
### Composables
|
|
98
|
+
|
|
99
|
+
#### `useSplitPane()`
|
|
100
|
+
|
|
101
|
+
A composable that provides split-pane functionality including drag-to-resize and pane collapsing.
|
|
102
|
+
|
|
103
|
+
**Returns:**
|
|
104
|
+
|
|
105
|
+
```typescript
|
|
106
|
+
{
|
|
107
|
+
isDraggingPaneLeft: ComputedRef<boolean>
|
|
108
|
+
isDraggingInnerPanes: ComputedRef<boolean>
|
|
109
|
+
startDraggingInnerPanes: (e: MouseEvent) => void
|
|
110
|
+
refreshInnerPaneSizes: () => void
|
|
111
|
+
paneLeftExpanded: ComputedRef<boolean>
|
|
112
|
+
togglePaneLeft: () => Promise<void>
|
|
113
|
+
startDraggingPaneLeft: (e: MouseEvent) => void
|
|
114
|
+
centerPaneWidth: Ref<number>
|
|
115
|
+
}
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
## Examples
|
|
119
|
+
|
|
120
|
+
### Basic Three-Pane Layout
|
|
121
|
+
|
|
122
|
+
```vue
|
|
123
|
+
<template>
|
|
124
|
+
<SplitPane
|
|
125
|
+
:navigation-items="navItems"
|
|
126
|
+
:show-navigation="true"
|
|
127
|
+
>
|
|
128
|
+
<template #pane-left>
|
|
129
|
+
<div class="left-content">
|
|
130
|
+
<!-- Collapsible left sidebar content -->
|
|
131
|
+
</div>
|
|
132
|
+
</template>
|
|
133
|
+
|
|
134
|
+
<template #pane-center>
|
|
135
|
+
<div class="center-content">
|
|
136
|
+
<!-- Main content area -->
|
|
137
|
+
</div>
|
|
138
|
+
</template>
|
|
139
|
+
|
|
140
|
+
<template #pane-right>
|
|
141
|
+
<div class="right-content">
|
|
142
|
+
<!-- Right panel content -->
|
|
143
|
+
</div>
|
|
144
|
+
</template>
|
|
145
|
+
</SplitPane>
|
|
146
|
+
</template>
|
|
147
|
+
|
|
148
|
+
<script setup lang="ts">
|
|
149
|
+
import { SplitPane } from '@kong-ui-public/split-pane'
|
|
150
|
+
import { HomeIcon, SettingsIcon } from '@kong/icons'
|
|
151
|
+
|
|
152
|
+
const navItems = [
|
|
153
|
+
{
|
|
154
|
+
to: '/home',
|
|
155
|
+
tooltip: 'Home',
|
|
156
|
+
active: true,
|
|
157
|
+
icon: HomeIcon,
|
|
158
|
+
testid: 'home',
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
to: '/settings',
|
|
162
|
+
tooltip: 'Settings',
|
|
163
|
+
active: false,
|
|
164
|
+
icon: SettingsIcon,
|
|
165
|
+
testid: 'settings',
|
|
166
|
+
},
|
|
167
|
+
]
|
|
168
|
+
</script>
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
### With Toolbar
|
|
172
|
+
|
|
173
|
+
```vue
|
|
174
|
+
<template>
|
|
175
|
+
<SplitPane>
|
|
176
|
+
<template #toolbar>
|
|
177
|
+
<div class="toolbar">
|
|
178
|
+
<h1>Page Title</h1>
|
|
179
|
+
<button>Action</button>
|
|
180
|
+
</div>
|
|
181
|
+
</template>
|
|
182
|
+
|
|
183
|
+
<template #pane-center>
|
|
184
|
+
<!-- Content -->
|
|
185
|
+
</template>
|
|
186
|
+
</SplitPane>
|
|
187
|
+
</template>
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
### Two-Pane Layout (No Left Pane)
|
|
191
|
+
|
|
192
|
+
```vue
|
|
193
|
+
<template>
|
|
194
|
+
<SplitPane
|
|
195
|
+
:pane-left="{ visible: false }"
|
|
196
|
+
:show-navigation="false"
|
|
197
|
+
>
|
|
198
|
+
<template #pane-center>
|
|
199
|
+
<!-- Main content -->
|
|
200
|
+
</template>
|
|
201
|
+
|
|
202
|
+
<template #pane-right>
|
|
203
|
+
<!-- Side panel -->
|
|
204
|
+
</template>
|
|
205
|
+
</SplitPane>
|
|
206
|
+
</template>
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
### Non-Resizable Layout
|
|
210
|
+
|
|
211
|
+
```vue
|
|
212
|
+
<template>
|
|
213
|
+
<SplitPane
|
|
214
|
+
:resizable="false"
|
|
215
|
+
:pane-center="{ maxWidth: '60%' }"
|
|
216
|
+
:pane-right="{ maxWidth: '40%' }"
|
|
217
|
+
>
|
|
218
|
+
<template #pane-center>
|
|
219
|
+
<!-- Fixed width center pane -->
|
|
220
|
+
</template>
|
|
221
|
+
|
|
222
|
+
<template #pane-right>
|
|
223
|
+
<!-- Fixed width right pane -->
|
|
224
|
+
</template>
|
|
225
|
+
</SplitPane>
|
|
226
|
+
</template>
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
### Custom Pane Widths
|
|
230
|
+
|
|
231
|
+
```vue
|
|
232
|
+
<template>
|
|
233
|
+
<SplitPane
|
|
234
|
+
:pane-left="{ maxWidth: '400px' }"
|
|
235
|
+
:pane-center="{ maxWidth: '800px' }"
|
|
236
|
+
>
|
|
237
|
+
<template #pane-left>
|
|
238
|
+
<!-- Custom width left pane -->
|
|
239
|
+
</template>
|
|
240
|
+
|
|
241
|
+
<template #pane-center>
|
|
242
|
+
<!-- Custom width center pane -->
|
|
243
|
+
</template>
|
|
244
|
+
|
|
245
|
+
<template #pane-right>
|
|
246
|
+
<!-- Flexible right pane -->
|
|
247
|
+
</template>
|
|
248
|
+
</SplitPane>
|
|
249
|
+
</template>
|
|
250
|
+
```
|
|
@@ -0,0 +1,560 @@
|
|
|
1
|
+
import { watch as G, getCurrentScope as xe, onScopeDispose as we, onMounted as ee, nextTick as j, getCurrentInstance as pe, computed as P, toValue as $, shallowRef as Y, watchEffect as ye, unref as l, ref as m, readonly as ne, defineComponent as ge, useCssVars as he, resolveComponent as oe, createElementBlock as S, openBlock as k, createElementVNode as y, Fragment as Ce, renderList as ke, createBlock as V, withCtx as Z, createVNode as se, withModifiers as ie, normalizeClass as N, resolveDynamicComponent as le, createCommentVNode as F, useSlots as Le, useTemplateRef as I, renderSlot as J, withDirectives as re, vShow as ue } from "vue";
|
|
2
|
+
import { ChevronDoubleLeftIcon as We, ChevronDoubleRightIcon as ze } from "@kong/icons";
|
|
3
|
+
import { useRouter as De } from "vue-router";
|
|
4
|
+
import { createI18n as _e, i18nTComponent as Ie } from "@kong-ui-public/i18n";
|
|
5
|
+
const Ee = "260px", ae = "500px", ce = "50%", de = "50%";
|
|
6
|
+
function te(e) {
|
|
7
|
+
return xe() ? (we(e), !0) : !1;
|
|
8
|
+
}
|
|
9
|
+
const Ne = typeof window < "u" && typeof document < "u";
|
|
10
|
+
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
11
|
+
const Se = (e) => e != null, Te = Object.prototype.toString, Me = (e) => Te.call(e) === "[object Object]", $e = () => {
|
|
12
|
+
};
|
|
13
|
+
function K(e) {
|
|
14
|
+
return Array.isArray(e) ? e : [e];
|
|
15
|
+
}
|
|
16
|
+
function Oe(e) {
|
|
17
|
+
return pe();
|
|
18
|
+
}
|
|
19
|
+
function Ae(e, n = !0, r) {
|
|
20
|
+
Oe() ? ee(e, r) : n ? e() : j(e);
|
|
21
|
+
}
|
|
22
|
+
function Be(e, n, r) {
|
|
23
|
+
return G(
|
|
24
|
+
e,
|
|
25
|
+
n,
|
|
26
|
+
{
|
|
27
|
+
...r,
|
|
28
|
+
immediate: !0
|
|
29
|
+
}
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
const O = Ne ? window : void 0;
|
|
33
|
+
function z(e) {
|
|
34
|
+
var n;
|
|
35
|
+
const r = $(e);
|
|
36
|
+
return (n = r == null ? void 0 : r.$el) != null ? n : r;
|
|
37
|
+
}
|
|
38
|
+
function U(...e) {
|
|
39
|
+
const n = [], r = () => {
|
|
40
|
+
n.forEach((t) => t()), n.length = 0;
|
|
41
|
+
}, o = (t, c, f, v) => (t.addEventListener(c, f, v), () => t.removeEventListener(c, f, v)), u = P(() => {
|
|
42
|
+
const t = K($(e[0])).filter((c) => c != null);
|
|
43
|
+
return t.every((c) => typeof c != "string") ? t : void 0;
|
|
44
|
+
}), d = Be(
|
|
45
|
+
() => {
|
|
46
|
+
var t, c;
|
|
47
|
+
return [
|
|
48
|
+
(c = (t = u.value) == null ? void 0 : t.map((f) => z(f))) != null ? c : [O].filter((f) => f != null),
|
|
49
|
+
K($(u.value ? e[1] : e[0])),
|
|
50
|
+
K(l(u.value ? e[2] : e[1])),
|
|
51
|
+
// @ts-expect-error - TypeScript gets the correct types, but somehow still complains
|
|
52
|
+
$(u.value ? e[3] : e[2])
|
|
53
|
+
];
|
|
54
|
+
},
|
|
55
|
+
([t, c, f, v]) => {
|
|
56
|
+
if (r(), !(t != null && t.length) || !(c != null && c.length) || !(f != null && f.length))
|
|
57
|
+
return;
|
|
58
|
+
const a = Me(v) ? { ...v } : v;
|
|
59
|
+
n.push(
|
|
60
|
+
...t.flatMap(
|
|
61
|
+
(s) => c.flatMap(
|
|
62
|
+
(g) => f.map((h) => o(s, g, h, a))
|
|
63
|
+
)
|
|
64
|
+
)
|
|
65
|
+
);
|
|
66
|
+
},
|
|
67
|
+
{ flush: "post" }
|
|
68
|
+
), i = () => {
|
|
69
|
+
d(), r();
|
|
70
|
+
};
|
|
71
|
+
return te(r), i;
|
|
72
|
+
}
|
|
73
|
+
// @__NO_SIDE_EFFECTS__
|
|
74
|
+
function He() {
|
|
75
|
+
const e = Y(!1), n = pe();
|
|
76
|
+
return n && ee(() => {
|
|
77
|
+
e.value = !0;
|
|
78
|
+
}, n), e;
|
|
79
|
+
}
|
|
80
|
+
// @__NO_SIDE_EFFECTS__
|
|
81
|
+
function be(e) {
|
|
82
|
+
const n = /* @__PURE__ */ He();
|
|
83
|
+
return P(() => (n.value, !!e()));
|
|
84
|
+
}
|
|
85
|
+
function Xe(e, n, r = {}) {
|
|
86
|
+
const { window: o = O, ...u } = r;
|
|
87
|
+
let d;
|
|
88
|
+
const i = /* @__PURE__ */ be(() => o && "MutationObserver" in o), t = () => {
|
|
89
|
+
d && (d.disconnect(), d = void 0);
|
|
90
|
+
}, c = P(() => {
|
|
91
|
+
const s = $(e), g = K(s).map(z).filter(Se);
|
|
92
|
+
return new Set(g);
|
|
93
|
+
}), f = G(
|
|
94
|
+
c,
|
|
95
|
+
(s) => {
|
|
96
|
+
t(), i.value && s.size && (d = new MutationObserver(n), s.forEach((g) => d.observe(g, u)));
|
|
97
|
+
},
|
|
98
|
+
{ immediate: !0, flush: "post" }
|
|
99
|
+
), v = () => d == null ? void 0 : d.takeRecords(), a = () => {
|
|
100
|
+
f(), t();
|
|
101
|
+
};
|
|
102
|
+
return te(a), {
|
|
103
|
+
isSupported: i,
|
|
104
|
+
stop: a,
|
|
105
|
+
takeRecords: v
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
function Ve(e, n, r = {}) {
|
|
109
|
+
const {
|
|
110
|
+
window: o = O,
|
|
111
|
+
document: u = o == null ? void 0 : o.document,
|
|
112
|
+
flush: d = "sync"
|
|
113
|
+
} = r;
|
|
114
|
+
if (!o || !u)
|
|
115
|
+
return $e;
|
|
116
|
+
let i;
|
|
117
|
+
const t = (v) => {
|
|
118
|
+
i == null || i(), i = v;
|
|
119
|
+
}, c = ye(() => {
|
|
120
|
+
const v = z(e);
|
|
121
|
+
if (v) {
|
|
122
|
+
const { stop: a } = Xe(
|
|
123
|
+
u,
|
|
124
|
+
(s) => {
|
|
125
|
+
s.map((h) => [...h.removedNodes]).flat().some((h) => h === v || h.contains(v)) && n(s);
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
window: o,
|
|
129
|
+
childList: !0,
|
|
130
|
+
subtree: !0
|
|
131
|
+
}
|
|
132
|
+
);
|
|
133
|
+
t(a);
|
|
134
|
+
}
|
|
135
|
+
}, { flush: d }), f = () => {
|
|
136
|
+
c(), t();
|
|
137
|
+
};
|
|
138
|
+
return te(f), f;
|
|
139
|
+
}
|
|
140
|
+
function Fe(e, n, r = {}) {
|
|
141
|
+
const { window: o = O, ...u } = r;
|
|
142
|
+
let d;
|
|
143
|
+
const i = /* @__PURE__ */ be(() => o && "ResizeObserver" in o), t = () => {
|
|
144
|
+
d && (d.disconnect(), d = void 0);
|
|
145
|
+
}, c = P(() => {
|
|
146
|
+
const a = $(e);
|
|
147
|
+
return Array.isArray(a) ? a.map((s) => z(s)) : [z(a)];
|
|
148
|
+
}), f = G(
|
|
149
|
+
c,
|
|
150
|
+
(a) => {
|
|
151
|
+
if (t(), i.value && o) {
|
|
152
|
+
d = new ResizeObserver(n);
|
|
153
|
+
for (const s of a)
|
|
154
|
+
s && d.observe(s, u);
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
{ immediate: !0, flush: "post" }
|
|
158
|
+
), v = () => {
|
|
159
|
+
t(), f();
|
|
160
|
+
};
|
|
161
|
+
return te(v), {
|
|
162
|
+
isSupported: i,
|
|
163
|
+
stop: v
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
function fe(e, n = {}) {
|
|
167
|
+
const {
|
|
168
|
+
delayEnter: r = 0,
|
|
169
|
+
delayLeave: o = 0,
|
|
170
|
+
triggerOnRemoval: u = !1,
|
|
171
|
+
window: d = O
|
|
172
|
+
} = n, i = Y(!1);
|
|
173
|
+
let t;
|
|
174
|
+
const c = (f) => {
|
|
175
|
+
const v = f ? r : o;
|
|
176
|
+
t && (clearTimeout(t), t = void 0), v ? t = setTimeout(() => i.value = f, v) : i.value = f;
|
|
177
|
+
};
|
|
178
|
+
return d && (U(e, "mouseenter", () => c(!0), { passive: !0 }), U(e, "mouseleave", () => c(!1), { passive: !0 }), u && Ve(
|
|
179
|
+
P(() => z(e)),
|
|
180
|
+
() => c(!1)
|
|
181
|
+
)), i;
|
|
182
|
+
}
|
|
183
|
+
function Ke(e, n = { width: 0, height: 0 }, r = {}) {
|
|
184
|
+
const { window: o = O, box: u = "content-box" } = r, d = P(() => {
|
|
185
|
+
var a, s;
|
|
186
|
+
return (s = (a = z(e)) == null ? void 0 : a.namespaceURI) == null ? void 0 : s.includes("svg");
|
|
187
|
+
}), i = Y(n.width), t = Y(n.height), { stop: c } = Fe(
|
|
188
|
+
e,
|
|
189
|
+
([a]) => {
|
|
190
|
+
const s = u === "border-box" ? a.borderBoxSize : u === "content-box" ? a.contentBoxSize : a.devicePixelContentBoxSize;
|
|
191
|
+
if (o && d.value) {
|
|
192
|
+
const g = z(e);
|
|
193
|
+
if (g) {
|
|
194
|
+
const h = g.getBoundingClientRect();
|
|
195
|
+
i.value = h.width, t.value = h.height;
|
|
196
|
+
}
|
|
197
|
+
} else if (s) {
|
|
198
|
+
const g = K(s);
|
|
199
|
+
i.value = g.reduce((h, { inlineSize: W }) => h + W, 0), t.value = g.reduce((h, { blockSize: W }) => h + W, 0);
|
|
200
|
+
} else
|
|
201
|
+
i.value = a.contentRect.width, t.value = a.contentRect.height;
|
|
202
|
+
},
|
|
203
|
+
r
|
|
204
|
+
);
|
|
205
|
+
Ae(() => {
|
|
206
|
+
const a = z(e);
|
|
207
|
+
a && (i.value = "offsetWidth" in a ? a.offsetWidth : n.width, t.value = "offsetHeight" in a ? a.offsetHeight : n.height);
|
|
208
|
+
});
|
|
209
|
+
const f = G(
|
|
210
|
+
() => z(e),
|
|
211
|
+
(a) => {
|
|
212
|
+
i.value = a ? n.width : 0, t.value = a ? n.height : 0;
|
|
213
|
+
}
|
|
214
|
+
);
|
|
215
|
+
function v() {
|
|
216
|
+
c(), f();
|
|
217
|
+
}
|
|
218
|
+
return {
|
|
219
|
+
width: i,
|
|
220
|
+
height: t,
|
|
221
|
+
stop: v
|
|
222
|
+
};
|
|
223
|
+
}
|
|
224
|
+
const ve = "20px", M = m(!1), E = m(!1), Q = m(!0), X = m(0);
|
|
225
|
+
function me(e) {
|
|
226
|
+
const n = (e == null ? void 0 : e.verticalNavRef) || m(null), r = (e == null ? void 0 : e.innerPanesContainerRef) || m(null), o = (e == null ? void 0 : e.paneLeftRef) || m(null), u = (e == null ? void 0 : e.paneCenterRef) || m(null), d = (e == null ? void 0 : e.paneRightRef) || m(null), i = (p) => {
|
|
227
|
+
var b, C, L, x, w;
|
|
228
|
+
switch (p) {
|
|
229
|
+
case "verticalNav":
|
|
230
|
+
return ((b = n.value) == null ? void 0 : b.offsetWidth) || 0;
|
|
231
|
+
case "innerPanesContainer":
|
|
232
|
+
return ((C = r.value) == null ? void 0 : C.offsetWidth) || 0;
|
|
233
|
+
case "paneLeft":
|
|
234
|
+
return ((L = o.value) == null ? void 0 : L.offsetWidth) || 0;
|
|
235
|
+
case "paneCenter":
|
|
236
|
+
return ((x = u.value) == null ? void 0 : x.offsetWidth) || 0;
|
|
237
|
+
case "paneRight":
|
|
238
|
+
return ((w = d.value) == null ? void 0 : w.offsetWidth) || 0;
|
|
239
|
+
default:
|
|
240
|
+
return 0;
|
|
241
|
+
}
|
|
242
|
+
}, t = m(50), c = m(0), f = m(0), v = m(0), a = m(0), s = (p) => {
|
|
243
|
+
if (u.value) {
|
|
244
|
+
if (p) {
|
|
245
|
+
u.value.style.width = `${p}%`, X.value = i("paneCenter");
|
|
246
|
+
return;
|
|
247
|
+
} else (typeof t.value != "number" || !isFinite(t.value)) && (t.value = 38);
|
|
248
|
+
u.value.style.width = `${t.value}%`, X.value = i("paneCenter");
|
|
249
|
+
}
|
|
250
|
+
}, g = () => {
|
|
251
|
+
var p;
|
|
252
|
+
u.value && ((p = d.value) == null ? void 0 : p.style.display) === "none" ? s(100) : s();
|
|
253
|
+
}, h = () => {
|
|
254
|
+
var L;
|
|
255
|
+
if (!r.value || !u.value) return;
|
|
256
|
+
const p = 100, b = i("innerPanesContainer") - i("verticalNav") - i("paneLeft") - p, C = t.value / 100 * i("innerPanesContainer");
|
|
257
|
+
if (C < p ? t.value = p / i("innerPanesContainer") * 100 : C > b && (t.value = b / i("innerPanesContainer") * 100), u.value && d.value && ((L = d.value) == null ? void 0 : L.style.display) === "none") {
|
|
258
|
+
s(100);
|
|
259
|
+
return;
|
|
260
|
+
}
|
|
261
|
+
s();
|
|
262
|
+
}, W = (p) => {
|
|
263
|
+
!u.value || p.button !== 0 || (E.value = !0, c.value = p.clientX, f.value = u.value.offsetWidth || 0, document.body.style.userSelect = "none");
|
|
264
|
+
}, R = (p) => {
|
|
265
|
+
if (!E.value || !r.value || !u.value) return;
|
|
266
|
+
const b = r.value.offsetWidth, C = p.clientX - c.value, x = (f.value + C) / b * 100, w = 100 / b * 100, H = (b - 100) / b * 100;
|
|
267
|
+
t.value = Math.min(Math.max(w, x), H), s();
|
|
268
|
+
}, D = () => {
|
|
269
|
+
E.value = !1, document.body.style.userSelect = "";
|
|
270
|
+
}, T = (p) => {
|
|
271
|
+
!o.value || !Q.value || p.button !== 0 || (M.value = !0, v.value = p.clientX, a.value = o.value.offsetWidth || 0, document.body.style.userSelect = "none");
|
|
272
|
+
}, q = (p) => {
|
|
273
|
+
if (!M.value || !o.value) return;
|
|
274
|
+
let b = a.value + (p.clientX - v.value);
|
|
275
|
+
const C = Number(Ee.replace(/px$/i, "")), L = Number(ae.replace(/px$/i, ""));
|
|
276
|
+
b < C && (b = C), b > L && (b = L), o.value.style.width = `${b}px`, v.value = p.clientX, a.value = b, X.value = i("paneCenter");
|
|
277
|
+
}, _ = () => {
|
|
278
|
+
M.value = !1, document.body.style.userSelect = "";
|
|
279
|
+
}, A = () => {
|
|
280
|
+
E.value || h();
|
|
281
|
+
}, B = async () => {
|
|
282
|
+
Q.value = !Q.value;
|
|
283
|
+
};
|
|
284
|
+
return U(window, "resize", A), ee(async () => {
|
|
285
|
+
await j(), u.value && (h(), await j(), s(), requestAnimationFrame(() => {
|
|
286
|
+
X.value = i("paneCenter");
|
|
287
|
+
}));
|
|
288
|
+
}), U(document, "mousemove", (p) => {
|
|
289
|
+
E.value && R(p), M.value && q(p);
|
|
290
|
+
}), U(document, "mouseup", () => {
|
|
291
|
+
E.value && D(), M.value && _();
|
|
292
|
+
}), {
|
|
293
|
+
isDraggingPaneLeft: ne(M),
|
|
294
|
+
isDraggingInnerPanes: ne(E),
|
|
295
|
+
startDraggingInnerPanes: W,
|
|
296
|
+
refreshInnerPaneSizes: g,
|
|
297
|
+
// Toggle the left pane
|
|
298
|
+
paneLeftExpanded: ne(Q),
|
|
299
|
+
togglePaneLeft: B,
|
|
300
|
+
startDraggingPaneLeft: T,
|
|
301
|
+
centerPaneWidth: X
|
|
302
|
+
};
|
|
303
|
+
}
|
|
304
|
+
const Ue = {
|
|
305
|
+
return: "Return",
|
|
306
|
+
collapse_panel: "Collapse panel",
|
|
307
|
+
expand_panel: "Expand panel",
|
|
308
|
+
drag_to_resize: "Click and drag to resize"
|
|
309
|
+
}, je = {
|
|
310
|
+
actions: Ue
|
|
311
|
+
};
|
|
312
|
+
function Re() {
|
|
313
|
+
const e = _e("en-us", je);
|
|
314
|
+
return {
|
|
315
|
+
i18n: e,
|
|
316
|
+
i18nT: Ie(e)
|
|
317
|
+
// Translation component <i18n-t>
|
|
318
|
+
};
|
|
319
|
+
}
|
|
320
|
+
const Ge = { class: "kong-ui-public-split-pane-vertical-navigation" }, qe = { class: "split-pane-nav" }, Ze = { class: "top" }, Je = { class: "bottom" }, Qe = /* @__PURE__ */ ge({
|
|
321
|
+
__name: "VerticalNavigation",
|
|
322
|
+
props: {
|
|
323
|
+
paneLeftWidth: { default: 0 },
|
|
324
|
+
paneLeftVisible: { type: Boolean, default: !0 },
|
|
325
|
+
items: { default: () => [] }
|
|
326
|
+
},
|
|
327
|
+
setup(e) {
|
|
328
|
+
he((s) => ({
|
|
329
|
+
v01870e39: v.value
|
|
330
|
+
}));
|
|
331
|
+
const { i18n: n } = Re(), r = De(), { paneLeftExpanded: o, togglePaneLeft: u, isDraggingPaneLeft: d, isDraggingInnerPanes: i } = me(), t = m(!1), c = m(!1), f = P(() => t.value || d.value || i.value), v = P(() => `${e.paneLeftWidth - 8}px`), a = (s) => {
|
|
332
|
+
o.value || u(), !s.active && s.to && r.push(s.to);
|
|
333
|
+
};
|
|
334
|
+
return ee(async () => {
|
|
335
|
+
await j(), await new Promise((s) => setTimeout(s, 500)), c.value = !0;
|
|
336
|
+
}), (s, g) => {
|
|
337
|
+
const h = oe("KButton"), W = oe("KTooltip");
|
|
338
|
+
return k(), S("div", Ge, [
|
|
339
|
+
y("nav", qe, [
|
|
340
|
+
y("div", Ze, [
|
|
341
|
+
(k(!0), S(Ce, null, ke(e.items, (R) => (k(), V(W, {
|
|
342
|
+
key: R.tooltip,
|
|
343
|
+
"kpop-attributes": { offset: "10px" },
|
|
344
|
+
label: R.tooltip,
|
|
345
|
+
placement: "right"
|
|
346
|
+
}, {
|
|
347
|
+
default: Z(() => [
|
|
348
|
+
se(h, {
|
|
349
|
+
appearance: "none",
|
|
350
|
+
"aria-label": R.tooltip,
|
|
351
|
+
class: N(["split-pane-nav-item", { active: R.active }]),
|
|
352
|
+
"data-testid": `kong-ui-public-split-pane-vertical-navigation-nav-item-${R.testid}`,
|
|
353
|
+
icon: "",
|
|
354
|
+
size: "large",
|
|
355
|
+
style: { cursor: "pointer" },
|
|
356
|
+
to: R.to,
|
|
357
|
+
onClickCapture: ie((D) => a(R), ["prevent"])
|
|
358
|
+
}, {
|
|
359
|
+
default: Z(() => [
|
|
360
|
+
(k(), V(le(R.icon), {
|
|
361
|
+
decorative: "",
|
|
362
|
+
size: l(ve)
|
|
363
|
+
}, null, 8, ["size"]))
|
|
364
|
+
]),
|
|
365
|
+
_: 2
|
|
366
|
+
}, 1032, ["aria-label", "class", "data-testid", "to", "onClickCapture"])
|
|
367
|
+
]),
|
|
368
|
+
_: 2
|
|
369
|
+
}, 1032, ["label"]))), 128))
|
|
370
|
+
]),
|
|
371
|
+
y("div", Je, [
|
|
372
|
+
e.paneLeftVisible ? (k(), S("div", {
|
|
373
|
+
key: 0,
|
|
374
|
+
class: N(["toggle-left-panel-control", {
|
|
375
|
+
expanded: l(o),
|
|
376
|
+
"disable-animation": !c.value || l(d) || l(i)
|
|
377
|
+
}]),
|
|
378
|
+
onTransitionend: g[0] || (g[0] = ie((R) => t.value = !1, ["self"])),
|
|
379
|
+
onTransitionstart: g[1] || (g[1] = ie((R) => t.value = !0, ["self"]))
|
|
380
|
+
}, [
|
|
381
|
+
(k(), V(W, {
|
|
382
|
+
key: String(l(o)),
|
|
383
|
+
"kpop-attributes": l(o) ? void 0 : { offset: "10px" },
|
|
384
|
+
label: f.value ? void 0 : l(o) ? l(n).t("actions.collapse_panel") : l(n).t("actions.expand_panel"),
|
|
385
|
+
placement: l(o) ? "left" : "right"
|
|
386
|
+
}, {
|
|
387
|
+
default: Z(() => [
|
|
388
|
+
se(h, {
|
|
389
|
+
appearance: "none",
|
|
390
|
+
"aria-controls": "left-pane",
|
|
391
|
+
"aria-expanded": l(o),
|
|
392
|
+
"aria-label": l(o) ? l(n).t("actions.collapse_panel") : l(n).t("actions.expand_panel"),
|
|
393
|
+
class: "split-pane-nav-item toggle-left-panel",
|
|
394
|
+
"data-testid": "kong-ui-public-split-pane-toggle-left-panel-button",
|
|
395
|
+
icon: "",
|
|
396
|
+
size: "large",
|
|
397
|
+
onClick: l(u)
|
|
398
|
+
}, {
|
|
399
|
+
default: Z(() => [
|
|
400
|
+
(k(), V(le(l(o) ? l(We) : l(ze)), {
|
|
401
|
+
decorative: "",
|
|
402
|
+
size: l(ve)
|
|
403
|
+
}, null, 8, ["size"]))
|
|
404
|
+
]),
|
|
405
|
+
_: 1
|
|
406
|
+
}, 8, ["aria-expanded", "aria-label", "onClick"])
|
|
407
|
+
]),
|
|
408
|
+
_: 1
|
|
409
|
+
}, 8, ["kpop-attributes", "label", "placement"]))
|
|
410
|
+
], 34)) : F("", !0)
|
|
411
|
+
])
|
|
412
|
+
])
|
|
413
|
+
]);
|
|
414
|
+
};
|
|
415
|
+
}
|
|
416
|
+
}), Pe = (e, n) => {
|
|
417
|
+
const r = e.__vccOpts || e;
|
|
418
|
+
for (const [o, u] of n)
|
|
419
|
+
r[o] = u;
|
|
420
|
+
return r;
|
|
421
|
+
}, Ye = /* @__PURE__ */ Pe(Qe, [["__scopeId", "data-v-acbeb50e"]]), et = { class: "kong-ui-public-split-pane-container" }, tt = { class: "kong-ui-public-split-pane-container-inner" }, nt = { class: "kong-ui-public-split-pane-panes" }, it = ["aria-hidden", "tabindex"], at = ["title"], ot = { class: "kong-ui-public-split-pane-container-inner-content" }, st = ["aria-hidden", "tabindex"], lt = ["title"], rt = ["aria-hidden", "tabindex"], ut = /* @__PURE__ */ ge({
|
|
422
|
+
__name: "SplitPane",
|
|
423
|
+
props: {
|
|
424
|
+
resizable: { type: Boolean, default: !0 },
|
|
425
|
+
showResizeHandle: { type: Boolean, default: !0 },
|
|
426
|
+
showNavigation: { type: Boolean, default: !0 },
|
|
427
|
+
navigationItems: { default: () => [] },
|
|
428
|
+
paneLeft: { default: () => ({
|
|
429
|
+
/** Pass false to hide the panel even if it contains slot content */
|
|
430
|
+
visible: !0,
|
|
431
|
+
maxWidth: ae
|
|
432
|
+
}) },
|
|
433
|
+
paneCenter: { default: () => ({
|
|
434
|
+
/** Pass false to hide the panel even if it contains slot content */
|
|
435
|
+
visible: !0,
|
|
436
|
+
maxWidth: ce
|
|
437
|
+
}) },
|
|
438
|
+
paneRight: { default: () => ({
|
|
439
|
+
/** Pass false to hide the panel even if it contains slot content */
|
|
440
|
+
visible: !0,
|
|
441
|
+
maxWidth: de
|
|
442
|
+
}) }
|
|
443
|
+
},
|
|
444
|
+
setup(e) {
|
|
445
|
+
he((x) => ({
|
|
446
|
+
v77518bb8: o.value,
|
|
447
|
+
a7565b74: u.value,
|
|
448
|
+
v39a6730f: d.value
|
|
449
|
+
}));
|
|
450
|
+
const n = Le(), r = (x) => x === "left" ? e.paneLeft.maxWidth !== void 0 ? e.paneLeft.maxWidth : ae : x === "center" ? e.resizable ? "none" : e.paneCenter.maxWidth !== void 0 ? e.paneCenter.maxWidth : ce : x === "right" ? e.resizable ? "none" : e.paneRight.maxWidth !== void 0 ? e.paneRight.maxWidth : de : "none", o = P(() => r("left")), u = P(() => r("center")), d = P(() => r("right")), i = I("verticalNavRef"), t = I("innerPanesContainerRef"), c = I("paneLeftRef"), f = I("paneCenterRef"), v = I("paneRightRef"), a = I("paneLeftDivider"), s = I("innerPanesDivider"), { startDraggingInnerPanes: g, startDraggingPaneLeft: h, refreshInnerPaneSizes: W, paneLeftExpanded: R, isDraggingPaneLeft: D, isDraggingInnerPanes: T } = me({
|
|
451
|
+
verticalNavRef: i,
|
|
452
|
+
innerPanesContainerRef: t,
|
|
453
|
+
paneLeftRef: c,
|
|
454
|
+
paneCenterRef: f,
|
|
455
|
+
paneRightRef: v
|
|
456
|
+
}), { i18n: q } = Re(), _ = P(() => !!n["pane-left"] && e.paneLeft.visible !== !1 && R.value), A = P(() => !!n["pane-center"] && e.paneCenter.visible !== !1), B = P(() => !!n["pane-right"] && e.paneRight.visible !== !1), p = P(() => e.resizable && e.showResizeHandle && !!n["pane-center"] && e.paneCenter.visible !== !1 && !!n["pane-right"] && e.paneRight.visible !== !1), b = fe(a), C = fe(s), { width: L } = Ke(c);
|
|
457
|
+
return G(() => e.paneRight.visible, async () => {
|
|
458
|
+
e.resizable && (await j(), W());
|
|
459
|
+
}, { flush: "post" }), (x, w) => (k(), S("div", {
|
|
460
|
+
class: N(["kong-ui-public-split-pane", { "has-navigation": e.showNavigation }])
|
|
461
|
+
}, [
|
|
462
|
+
y("div", et, [
|
|
463
|
+
e.showNavigation ? (k(), V(Ye, {
|
|
464
|
+
key: 0,
|
|
465
|
+
ref_key: "verticalNavRef",
|
|
466
|
+
ref: i,
|
|
467
|
+
items: e.navigationItems,
|
|
468
|
+
"pane-left-visible": e.paneLeft.visible !== !1,
|
|
469
|
+
"pane-left-width": l(L)
|
|
470
|
+
}, null, 8, ["items", "pane-left-visible", "pane-left-width"])) : F("", !0),
|
|
471
|
+
y("div", tt, [
|
|
472
|
+
y("div", nt, [
|
|
473
|
+
y("div", {
|
|
474
|
+
id: "kong-ui-public-split-pane-left",
|
|
475
|
+
ref_key: "paneLeftRef",
|
|
476
|
+
ref: c,
|
|
477
|
+
"aria-hidden": _.value ? void 0 : "true",
|
|
478
|
+
class: N(["kong-ui-public-split-pane-pane-left", [{ expanded: l(R), "show-resize-border": l(b) }, { "is-dragging-pane-left": l(D) }, { "is-dragging-pane": l(D) || l(T) }]]),
|
|
479
|
+
"data-testid": "kong-ui-public-split-pane-pane-left",
|
|
480
|
+
tabindex: _.value ? 0 : -1
|
|
481
|
+
}, [
|
|
482
|
+
J(x.$slots, "pane-left", {}, void 0, !0)
|
|
483
|
+
], 10, it),
|
|
484
|
+
_.value ? (k(), S("div", {
|
|
485
|
+
key: 0,
|
|
486
|
+
ref_key: "paneLeftDivider",
|
|
487
|
+
ref: a,
|
|
488
|
+
class: "kong-ui-public-split-pane-resize-divider left",
|
|
489
|
+
tabindex: "0",
|
|
490
|
+
title: l(q).t("actions.drag_to_resize"),
|
|
491
|
+
onMousedown: w[0] || (w[0] = //@ts-ignore
|
|
492
|
+
(...H) => l(h) && l(h)(...H))
|
|
493
|
+
}, [...w[2] || (w[2] = [
|
|
494
|
+
y("div", { class: "kong-ui-public-split-pane-drag-handle" }, null, -1)
|
|
495
|
+
])], 40, at)) : F("", !0),
|
|
496
|
+
y("div", ot, [
|
|
497
|
+
n.toolbar ? (k(), S("div", {
|
|
498
|
+
key: 0,
|
|
499
|
+
class: N(["kong-ui-public-split-pane-toolbar-container", { "has-resize-divider-left": _.value }]),
|
|
500
|
+
"data-testid": "kong-ui-public-split-pane-toolbar"
|
|
501
|
+
}, [
|
|
502
|
+
J(x.$slots, "toolbar", {}, void 0, !0)
|
|
503
|
+
], 2)) : F("", !0),
|
|
504
|
+
y("div", {
|
|
505
|
+
ref_key: "innerPanesContainerRef",
|
|
506
|
+
ref: t,
|
|
507
|
+
class: "kong-ui-public-split-pane-inner-panes"
|
|
508
|
+
}, [
|
|
509
|
+
re(y("div", {
|
|
510
|
+
ref_key: "paneCenterRef",
|
|
511
|
+
ref: f,
|
|
512
|
+
"aria-hidden": A.value ? void 0 : "true",
|
|
513
|
+
class: N(["kong-ui-public-split-pane-pane-center", [{ "has-resize-divider-left": _.value }, { "has-resize-divider-right": p.value }, { "is-dragging-pane": l(D) || l(T) }]]),
|
|
514
|
+
"data-testid": "kong-ui-public-split-pane-pane-center",
|
|
515
|
+
tabindex: A.value ? 0 : -1
|
|
516
|
+
}, [
|
|
517
|
+
J(x.$slots, "pane-center", {}, void 0, !0)
|
|
518
|
+
], 10, st), [
|
|
519
|
+
[ue, A.value]
|
|
520
|
+
]),
|
|
521
|
+
p.value ? (k(), S("div", {
|
|
522
|
+
key: 0,
|
|
523
|
+
ref_key: "innerPanesDivider",
|
|
524
|
+
ref: s,
|
|
525
|
+
class: "kong-ui-public-split-pane-resize-divider right",
|
|
526
|
+
tabindex: "0",
|
|
527
|
+
title: l(q).t("actions.drag_to_resize"),
|
|
528
|
+
onMousedown: w[1] || (w[1] = //@ts-ignore
|
|
529
|
+
(...H) => l(g) && l(g)(...H))
|
|
530
|
+
}, [...w[3] || (w[3] = [
|
|
531
|
+
y("div", { class: "kong-ui-public-split-pane-drag-handle" }, null, -1)
|
|
532
|
+
])], 40, lt)) : F("", !0),
|
|
533
|
+
re(y("div", {
|
|
534
|
+
ref_key: "paneRightRef",
|
|
535
|
+
ref: v,
|
|
536
|
+
"aria-hidden": B.value ? void 0 : "true",
|
|
537
|
+
class: N(["kong-ui-public-split-pane-pane-right", [
|
|
538
|
+
{ "has-toolbar": !!n.toolbar },
|
|
539
|
+
{ "show-resize-border": l(C) },
|
|
540
|
+
{ "is-dragging-inner-panes": l(T) },
|
|
541
|
+
{ "is-dragging-pane": l(D) || l(T) }
|
|
542
|
+
]]),
|
|
543
|
+
"data-testid": "kong-ui-public-split-pane-pane-right",
|
|
544
|
+
tabindex: B.value ? 0 : -1
|
|
545
|
+
}, [
|
|
546
|
+
J(x.$slots, "pane-right", {}, void 0, !0)
|
|
547
|
+
], 10, rt), [
|
|
548
|
+
[ue, B.value]
|
|
549
|
+
])
|
|
550
|
+
], 512)
|
|
551
|
+
])
|
|
552
|
+
])
|
|
553
|
+
])
|
|
554
|
+
])
|
|
555
|
+
], 2));
|
|
556
|
+
}
|
|
557
|
+
}), pt = /* @__PURE__ */ Pe(ut, [["__scopeId", "data-v-a2181be5"]]);
|
|
558
|
+
export {
|
|
559
|
+
pt as SplitPane
|
|
560
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(x,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("@kong/icons"),require("vue-router"),require("@kong-ui-public/i18n")):typeof define=="function"&&define.amd?define(["exports","vue","@kong/icons","vue-router","@kong-ui-public/i18n"],e):(x=typeof globalThis<"u"?globalThis:x||self,e(x["kong-ui-public-split-pane"]={},x.Vue,x.KongIcons,x.VueRouter,x["kong-ui-public-i18n"]))})(this,function(x,e,H,Q,X){"use strict";const Y="260px",A="500px",F="50%",j="50%";function M(t){return e.getCurrentScope()?(e.onScopeDispose(t),!0):!1}const ee=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const te=t=>t!=null,ne=Object.prototype.toString,ie=t=>ne.call(t)==="[object Object]",ae=()=>{};function T(t){return Array.isArray(t)?t:[t]}function oe(t){return e.getCurrentInstance()}function le(t,i=!0,r){oe()?e.onMounted(t,r):i?t():e.nextTick(t)}function se(t,i,r){return e.watch(t,i,{...r,immediate:!0})}const N=ee?window:void 0;function y(t){var i;const r=e.toValue(t);return(i=r==null?void 0:r.$el)!=null?i:r}function _(...t){const i=[],r=()=>{i.forEach(n=>n()),i.length=0},l=(n,d,u,p)=>(n.addEventListener(d,u,p),()=>n.removeEventListener(d,u,p)),c=e.computed(()=>{const n=T(e.toValue(t[0])).filter(d=>d!=null);return n.every(d=>typeof d!="string")?n:void 0}),f=se(()=>{var n,d;return[(d=(n=c.value)==null?void 0:n.map(u=>y(u)))!=null?d:[N].filter(u=>u!=null),T(e.toValue(c.value?t[1]:t[0])),T(e.unref(c.value?t[2]:t[1])),e.toValue(c.value?t[3]:t[2])]},([n,d,u,p])=>{if(r(),!(n!=null&&n.length)||!(d!=null&&d.length)||!(u!=null&&u.length))return;const o=ie(p)?{...p}:p;i.push(...n.flatMap(s=>d.flatMap(h=>u.map(m=>l(s,h,m,o)))))},{flush:"post"}),a=()=>{f(),r()};return M(r),a}function re(){const t=e.shallowRef(!1),i=e.getCurrentInstance();return i&&e.onMounted(()=>{t.value=!0},i),t}function K(t){const i=re();return e.computed(()=>(i.value,!!t()))}function ce(t,i,r={}){const{window:l=N,...c}=r;let f;const a=K(()=>l&&"MutationObserver"in l),n=()=>{f&&(f.disconnect(),f=void 0)},d=e.computed(()=>{const s=e.toValue(t),h=T(s).map(y).filter(te);return new Set(h)}),u=e.watch(d,s=>{n(),a.value&&s.size&&(f=new MutationObserver(i),s.forEach(h=>f.observe(h,c)))},{immediate:!0,flush:"post"}),p=()=>f==null?void 0:f.takeRecords(),o=()=>{u(),n()};return M(o),{isSupported:a,stop:o,takeRecords:p}}function de(t,i,r={}){const{window:l=N,document:c=l==null?void 0:l.document,flush:f="sync"}=r;if(!l||!c)return ae;let a;const n=p=>{a==null||a(),a=p},d=e.watchEffect(()=>{const p=y(t);if(p){const{stop:o}=ce(c,s=>{s.map(m=>[...m.removedNodes]).flat().some(m=>m===p||m.contains(p))&&i(s)},{window:l,childList:!0,subtree:!0});n(o)}},{flush:f}),u=()=>{d(),n()};return M(u),u}function fe(t,i,r={}){const{window:l=N,...c}=r;let f;const a=K(()=>l&&"ResizeObserver"in l),n=()=>{f&&(f.disconnect(),f=void 0)},d=e.computed(()=>{const o=e.toValue(t);return Array.isArray(o)?o.map(s=>y(s)):[y(o)]}),u=e.watch(d,o=>{if(n(),a.value&&l){f=new ResizeObserver(i);for(const s of o)s&&f.observe(s,c)}},{immediate:!0,flush:"post"}),p=()=>{n(),u()};return M(p),{isSupported:a,stop:p}}function q(t,i={}){const{delayEnter:r=0,delayLeave:l=0,triggerOnRemoval:c=!1,window:f=N}=i,a=e.shallowRef(!1);let n;const d=u=>{const p=u?r:l;n&&(clearTimeout(n),n=void 0),p?n=setTimeout(()=>a.value=u,p):a.value=u};return f&&(_(t,"mouseenter",()=>d(!0),{passive:!0}),_(t,"mouseleave",()=>d(!1),{passive:!0}),c&&de(e.computed(()=>y(t)),()=>d(!1))),a}function ue(t,i={width:0,height:0},r={}){const{window:l=N,box:c="content-box"}=r,f=e.computed(()=>{var o,s;return(s=(o=y(t))==null?void 0:o.namespaceURI)==null?void 0:s.includes("svg")}),a=e.shallowRef(i.width),n=e.shallowRef(i.height),{stop:d}=fe(t,([o])=>{const s=c==="border-box"?o.borderBoxSize:c==="content-box"?o.contentBoxSize:o.devicePixelContentBoxSize;if(l&&f.value){const h=y(t);if(h){const m=h.getBoundingClientRect();a.value=m.width,n.value=m.height}}else if(s){const h=T(s);a.value=h.reduce((m,{inlineSize:P})=>m+P,0),n.value=h.reduce((m,{blockSize:P})=>m+P,0)}else a.value=o.contentRect.width,n.value=o.contentRect.height},r);le(()=>{const o=y(t);o&&(a.value="offsetWidth"in o?o.offsetWidth:i.width,n.value="offsetHeight"in o?o.offsetHeight:i.height)});const u=e.watch(()=>y(t),o=>{a.value=o?i.width:0,n.value=o?i.height:0});function p(){d(),u()}return{width:a,height:n,stop:p}}const U="20px",z=e.ref(!1),L=e.ref(!1),$=e.ref(!0),B=e.ref(0);function G(t){const i=(t==null?void 0:t.verticalNavRef)||e.ref(null),r=(t==null?void 0:t.innerPanesContainerRef)||e.ref(null),l=(t==null?void 0:t.paneLeftRef)||e.ref(null),c=(t==null?void 0:t.paneCenterRef)||e.ref(null),f=(t==null?void 0:t.paneRightRef)||e.ref(null),a=g=>{var b,R,w,k,C;switch(g){case"verticalNav":return((b=i.value)==null?void 0:b.offsetWidth)||0;case"innerPanesContainer":return((R=r.value)==null?void 0:R.offsetWidth)||0;case"paneLeft":return((w=l.value)==null?void 0:w.offsetWidth)||0;case"paneCenter":return((k=c.value)==null?void 0:k.offsetWidth)||0;case"paneRight":return((C=f.value)==null?void 0:C.offsetWidth)||0;default:return 0}},n=e.ref(50),d=e.ref(0),u=e.ref(0),p=e.ref(0),o=e.ref(0),s=g=>{if(c.value){if(g){c.value.style.width=`${g}%`,B.value=a("paneCenter");return}else(typeof n.value!="number"||!isFinite(n.value))&&(n.value=38);c.value.style.width=`${n.value}%`,B.value=a("paneCenter")}},h=()=>{var g;c.value&&((g=f.value)==null?void 0:g.style.display)==="none"?s(100):s()},m=()=>{var w;if(!r.value||!c.value)return;const g=100,b=a("innerPanesContainer")-a("verticalNav")-a("paneLeft")-g,R=n.value/100*a("innerPanesContainer");if(R<g?n.value=g/a("innerPanesContainer")*100:R>b&&(n.value=b/a("innerPanesContainer")*100),c.value&&f.value&&((w=f.value)==null?void 0:w.style.display)==="none"){s(100);return}s()},P=g=>{!c.value||g.button!==0||(L.value=!0,d.value=g.clientX,u.value=c.value.offsetWidth||0,document.body.style.userSelect="none")},v=g=>{if(!L.value||!r.value||!c.value)return;const b=r.value.offsetWidth,R=g.clientX-d.value,k=(u.value+R)/b*100,C=100/b*100,S=(b-100)/b*100;n.value=Math.min(Math.max(C,k),S),s()},W=()=>{L.value=!1,document.body.style.userSelect=""},D=g=>{!l.value||!$.value||g.button!==0||(z.value=!0,p.value=g.clientX,o.value=l.value.offsetWidth||0,document.body.style.userSelect="none")},O=g=>{if(!z.value||!l.value)return;let b=o.value+(g.clientX-p.value);const R=Number(Y.replace(/px$/i,"")),w=Number(A.replace(/px$/i,""));b<R&&(b=R),b>w&&(b=w),l.value.style.width=`${b}px`,p.value=g.clientX,o.value=b,B.value=a("paneCenter")},E=()=>{z.value=!1,document.body.style.userSelect=""},I=()=>{L.value||m()},V=async()=>{$.value=!$.value};return _(window,"resize",I),e.onMounted(async()=>{await e.nextTick(),c.value&&(m(),await e.nextTick(),s(),requestAnimationFrame(()=>{B.value=a("paneCenter")}))}),_(document,"mousemove",g=>{L.value&&v(g),z.value&&O(g)}),_(document,"mouseup",()=>{L.value&&W(),z.value&&E()}),{isDraggingPaneLeft:e.readonly(z),isDraggingInnerPanes:e.readonly(L),startDraggingInnerPanes:P,refreshInnerPaneSizes:h,paneLeftExpanded:e.readonly($),togglePaneLeft:V,startDraggingPaneLeft:D,centerPaneWidth:B}}const pe={actions:{return:"Return",collapse_panel:"Collapse panel",expand_panel:"Expand panel",drag_to_resize:"Click and drag to resize"}};function Z(){const t=X.createI18n("en-us",pe);return{i18n:t,i18nT:X.i18nTComponent(t)}}const ge={class:"kong-ui-public-split-pane-vertical-navigation"},he={class:"split-pane-nav"},me={class:"top"},be={class:"bottom"},ve=e.defineComponent({__name:"VerticalNavigation",props:{paneLeftWidth:{default:0},paneLeftVisible:{type:Boolean,default:!0},items:{default:()=>[]}},setup(t){e.useCssVars(s=>({v01870e39:p.value}));const{i18n:i}=Z(),r=Q.useRouter(),{paneLeftExpanded:l,togglePaneLeft:c,isDraggingPaneLeft:f,isDraggingInnerPanes:a}=G(),n=e.ref(!1),d=e.ref(!1),u=e.computed(()=>n.value||f.value||a.value),p=e.computed(()=>`${t.paneLeftWidth-8}px`),o=s=>{l.value||c(),!s.active&&s.to&&r.push(s.to)};return e.onMounted(async()=>{await e.nextTick(),await new Promise(s=>setTimeout(s,500)),d.value=!0}),(s,h)=>{const m=e.resolveComponent("KButton"),P=e.resolveComponent("KTooltip");return e.openBlock(),e.createElementBlock("div",ge,[e.createElementVNode("nav",he,[e.createElementVNode("div",me,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,v=>(e.openBlock(),e.createBlock(P,{key:v.tooltip,"kpop-attributes":{offset:"10px"},label:v.tooltip,placement:"right"},{default:e.withCtx(()=>[e.createVNode(m,{appearance:"none","aria-label":v.tooltip,class:e.normalizeClass(["split-pane-nav-item",{active:v.active}]),"data-testid":`kong-ui-public-split-pane-vertical-navigation-nav-item-${v.testid}`,icon:"",size:"large",style:{cursor:"pointer"},to:v.to,onClickCapture:e.withModifiers(W=>o(v),["prevent"])},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(v.icon),{decorative:"",size:e.unref(U)},null,8,["size"]))]),_:2},1032,["aria-label","class","data-testid","to","onClickCapture"])]),_:2},1032,["label"]))),128))]),e.createElementVNode("div",be,[t.paneLeftVisible?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["toggle-left-panel-control",{expanded:e.unref(l),"disable-animation":!d.value||e.unref(f)||e.unref(a)}]),onTransitionend:h[0]||(h[0]=e.withModifiers(v=>n.value=!1,["self"])),onTransitionstart:h[1]||(h[1]=e.withModifiers(v=>n.value=!0,["self"]))},[(e.openBlock(),e.createBlock(P,{key:String(e.unref(l)),"kpop-attributes":e.unref(l)?void 0:{offset:"10px"},label:u.value?void 0:e.unref(l)?e.unref(i).t("actions.collapse_panel"):e.unref(i).t("actions.expand_panel"),placement:e.unref(l)?"left":"right"},{default:e.withCtx(()=>[e.createVNode(m,{appearance:"none","aria-controls":"left-pane","aria-expanded":e.unref(l),"aria-label":e.unref(l)?e.unref(i).t("actions.collapse_panel"):e.unref(i).t("actions.expand_panel"),class:"split-pane-nav-item toggle-left-panel","data-testid":"kong-ui-public-split-pane-toggle-left-panel-button",icon:"",size:"large",onClick:e.unref(c)},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(l)?e.unref(H.ChevronDoubleLeftIcon):e.unref(H.ChevronDoubleRightIcon)),{decorative:"",size:e.unref(U)},null,8,["size"]))]),_:1},8,["aria-expanded","aria-label","onClick"])]),_:1},8,["kpop-attributes","label","placement"]))],34)):e.createCommentVNode("",!0)])])])}}}),J=(t,i)=>{const r=t.__vccOpts||t;for(const[l,c]of i)r[l]=c;return r},ke=J(ve,[["__scopeId","data-v-acbeb50e"]]),Ce={class:"kong-ui-public-split-pane-container"},Re={class:"kong-ui-public-split-pane-container-inner"},we={class:"kong-ui-public-split-pane-panes"},xe=["aria-hidden","tabindex"],ye=["title"],Pe={class:"kong-ui-public-split-pane-container-inner-content"},Le=["aria-hidden","tabindex"],We=["title"],Ee=["aria-hidden","tabindex"],Ne=J(e.defineComponent({__name:"SplitPane",props:{resizable:{type:Boolean,default:!0},showResizeHandle:{type:Boolean,default:!0},showNavigation:{type:Boolean,default:!0},navigationItems:{default:()=>[]},paneLeft:{default:()=>({visible:!0,maxWidth:A})},paneCenter:{default:()=>({visible:!0,maxWidth:F})},paneRight:{default:()=>({visible:!0,maxWidth:j})}},setup(t){e.useCssVars(k=>({v77518bb8:l.value,a7565b74:c.value,v39a6730f:f.value}));const i=e.useSlots(),r=k=>k==="left"?t.paneLeft.maxWidth!==void 0?t.paneLeft.maxWidth:A:k==="center"?t.resizable?"none":t.paneCenter.maxWidth!==void 0?t.paneCenter.maxWidth:F:k==="right"?t.resizable?"none":t.paneRight.maxWidth!==void 0?t.paneRight.maxWidth:j:"none",l=e.computed(()=>r("left")),c=e.computed(()=>r("center")),f=e.computed(()=>r("right")),a=e.useTemplateRef("verticalNavRef"),n=e.useTemplateRef("innerPanesContainerRef"),d=e.useTemplateRef("paneLeftRef"),u=e.useTemplateRef("paneCenterRef"),p=e.useTemplateRef("paneRightRef"),o=e.useTemplateRef("paneLeftDivider"),s=e.useTemplateRef("innerPanesDivider"),{startDraggingInnerPanes:h,startDraggingPaneLeft:m,refreshInnerPaneSizes:P,paneLeftExpanded:v,isDraggingPaneLeft:W,isDraggingInnerPanes:D}=G({verticalNavRef:a,innerPanesContainerRef:n,paneLeftRef:d,paneCenterRef:u,paneRightRef:p}),{i18n:O}=Z(),E=e.computed(()=>!!i["pane-left"]&&t.paneLeft.visible!==!1&&v.value),I=e.computed(()=>!!i["pane-center"]&&t.paneCenter.visible!==!1),V=e.computed(()=>!!i["pane-right"]&&t.paneRight.visible!==!1),g=e.computed(()=>t.resizable&&t.showResizeHandle&&!!i["pane-center"]&&t.paneCenter.visible!==!1&&!!i["pane-right"]&&t.paneRight.visible!==!1),b=q(o),R=q(s),{width:w}=ue(d);return e.watch(()=>t.paneRight.visible,async()=>{t.resizable&&(await e.nextTick(),P())},{flush:"post"}),(k,C)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["kong-ui-public-split-pane",{"has-navigation":t.showNavigation}])},[e.createElementVNode("div",Ce,[t.showNavigation?(e.openBlock(),e.createBlock(ke,{key:0,ref_key:"verticalNavRef",ref:a,items:t.navigationItems,"pane-left-visible":t.paneLeft.visible!==!1,"pane-left-width":e.unref(w)},null,8,["items","pane-left-visible","pane-left-width"])):e.createCommentVNode("",!0),e.createElementVNode("div",Re,[e.createElementVNode("div",we,[e.createElementVNode("div",{id:"kong-ui-public-split-pane-left",ref_key:"paneLeftRef",ref:d,"aria-hidden":E.value?void 0:"true",class:e.normalizeClass(["kong-ui-public-split-pane-pane-left",[{expanded:e.unref(v),"show-resize-border":e.unref(b)},{"is-dragging-pane-left":e.unref(W)},{"is-dragging-pane":e.unref(W)||e.unref(D)}]]),"data-testid":"kong-ui-public-split-pane-pane-left",tabindex:E.value?0:-1},[e.renderSlot(k.$slots,"pane-left",{},void 0,!0)],10,xe),E.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"paneLeftDivider",ref:o,class:"kong-ui-public-split-pane-resize-divider left",tabindex:"0",title:e.unref(O).t("actions.drag_to_resize"),onMousedown:C[0]||(C[0]=(...S)=>e.unref(m)&&e.unref(m)(...S))},[...C[2]||(C[2]=[e.createElementVNode("div",{class:"kong-ui-public-split-pane-drag-handle"},null,-1)])],40,ye)):e.createCommentVNode("",!0),e.createElementVNode("div",Pe,[i.toolbar?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["kong-ui-public-split-pane-toolbar-container",{"has-resize-divider-left":E.value}]),"data-testid":"kong-ui-public-split-pane-toolbar"},[e.renderSlot(k.$slots,"toolbar",{},void 0,!0)],2)):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"innerPanesContainerRef",ref:n,class:"kong-ui-public-split-pane-inner-panes"},[e.withDirectives(e.createElementVNode("div",{ref_key:"paneCenterRef",ref:u,"aria-hidden":I.value?void 0:"true",class:e.normalizeClass(["kong-ui-public-split-pane-pane-center",[{"has-resize-divider-left":E.value},{"has-resize-divider-right":g.value},{"is-dragging-pane":e.unref(W)||e.unref(D)}]]),"data-testid":"kong-ui-public-split-pane-pane-center",tabindex:I.value?0:-1},[e.renderSlot(k.$slots,"pane-center",{},void 0,!0)],10,Le),[[e.vShow,I.value]]),g.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"innerPanesDivider",ref:s,class:"kong-ui-public-split-pane-resize-divider right",tabindex:"0",title:e.unref(O).t("actions.drag_to_resize"),onMousedown:C[1]||(C[1]=(...S)=>e.unref(h)&&e.unref(h)(...S))},[...C[3]||(C[3]=[e.createElementVNode("div",{class:"kong-ui-public-split-pane-drag-handle"},null,-1)])],40,We)):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("div",{ref_key:"paneRightRef",ref:p,"aria-hidden":V.value?void 0:"true",class:e.normalizeClass(["kong-ui-public-split-pane-pane-right",[{"has-toolbar":!!i.toolbar},{"show-resize-border":e.unref(R)},{"is-dragging-inner-panes":e.unref(D)},{"is-dragging-pane":e.unref(W)||e.unref(D)}]]),"data-testid":"kong-ui-public-split-pane-pane-right",tabindex:V.value?0:-1},[e.renderSlot(k.$slots,"pane-right",{},void 0,!0)],10,Ee),[[e.vShow,V.value]])],512)])])])])],2))}}),[["__scopeId","data-v-a2181be5"]]);x.SplitPane=Ne,Object.defineProperty(x,Symbol.toStringTag,{value:"Module"})});
|
package/dist/style.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.kong-ui-public-split-pane-vertical-navigation[data-v-acbeb50e]{color:#bee2ff;color:var(--kui-navigation-color-text, #bee2ff);display:flex;height:100%;justify-content:center;padding:8px;padding:var(--kui-space-40, 8px);position:relative;width:52px;z-index:1}.kong-ui-public-split-pane-vertical-navigation .split-pane-nav[data-v-acbeb50e]{align-items:center;display:flex;flex-direction:column;gap:12px;gap:var(--kui-space-50, 12px);justify-content:space-between;width:100%}.kong-ui-public-split-pane-vertical-navigation .split-pane-nav .top[data-v-acbeb50e],.kong-ui-public-split-pane-vertical-navigation .split-pane-nav .bottom[data-v-acbeb50e]{display:flex;flex-direction:column;flex-grow:1;gap:12px;gap:var(--kui-space-50, 12px);position:relative;width:100%}.kong-ui-public-split-pane-vertical-navigation .split-pane-nav .top[data-v-acbeb50e]{align-items:center;justify-content:flex-start}.kong-ui-public-split-pane-vertical-navigation .split-pane-nav .bottom[data-v-acbeb50e]{align-items:center;justify-content:flex-end}.kong-ui-public-split-pane-vertical-navigation .split-pane-nav[data-v-acbeb50e] .k-popover .popover{pointer-events:none}.kong-ui-public-split-pane-vertical-navigation .split-pane-nav-item[data-v-acbeb50e]{align-items:center;background-color:#000933;background-color:var(--kui-navigation-color-background, #000933);border:1px solid transparent;border:var(--kui-border-width-10, 1px) solid var(--kui-color-border-transparent, transparent);border-radius:6px;border-radius:var(--kui-border-radius-30, 6px);color:#bee2ff;color:var(--kui-navigation-color-text, #bee2ff);cursor:pointer;display:flex;justify-content:center;justify-content:space-between;text-decoration:none;transition:color .2s ease;white-space:nowrap}.kong-ui-public-split-pane-vertical-navigation .split-pane-nav-item[data-v-acbeb50e]:hover,.kong-ui-public-split-pane-vertical-navigation .split-pane-nav-item[data-v-acbeb50e]:focus-visible{color:#eefaff;color:var(--kui-navigation-color-text-hover, #eefaff)}.kong-ui-public-split-pane-vertical-navigation .split-pane-nav-item[data-v-acbeb50e]:hover svg,.kong-ui-public-split-pane-vertical-navigation .split-pane-nav-item[data-v-acbeb50e]:focus-visible svg{color:#eefaff;color:var(--kui-navigation-color-text-hover, #eefaff)}.kong-ui-public-split-pane-vertical-navigation .split-pane-nav-item[data-v-acbeb50e]:focus-visible{box-shadow:0 0 0 1px #fff9 inset;box-shadow:var(--kui-navigation-shadow-focus, 0 0 0 1px rgba(255, 255, 255, .6) inset);outline:none}.kong-ui-public-split-pane-vertical-navigation .split-pane-nav-item[data-v-acbeb50e] svg path{color:currentColor;fill:currentColor;transition:all .2s ease-out}.kong-ui-public-split-pane-vertical-navigation .split-pane-nav-item.active[data-v-acbeb50e]{background-color:#ffffff1f;background-color:var(--kui-navigation-color-background-selected, rgba(255, 255, 255, .12));border-color:#ffffff1f;border-color:var(--kui-navigation-color-border, rgba(255, 255, 255, .12));color:#00fabe;color:var(--kui-navigation-color-text-selected, #00fabe)}.kong-ui-public-split-pane-vertical-navigation .split-pane-nav-item.active[data-v-acbeb50e]:hover,.kong-ui-public-split-pane-vertical-navigation .split-pane-nav-item.active[data-v-acbeb50e]:focus-visible{color:#00fabe!important;color:var(--kui-navigation-color-text-selected, #00fabe)!important}.kong-ui-public-split-pane-vertical-navigation .split-pane-nav-item.active[data-v-acbeb50e]:hover svg,.kong-ui-public-split-pane-vertical-navigation .split-pane-nav-item.active[data-v-acbeb50e]:focus-visible svg{color:#00fabe;color:var(--kui-navigation-color-text-selected, #00fabe)}.kong-ui-public-split-pane-vertical-navigation .split-pane-nav-item.toggle-left-panel[data-v-acbeb50e]{border-color:#ffffff1f;border-color:var(--kui-navigation-color-border, rgba(255, 255, 255, .12))}.toggle-left-panel-control[data-v-acbeb50e]{left:0;position:absolute;z-index:1}.toggle-left-panel-control[data-v-acbeb50e]:not(.disable-animation){transition:left .2s ease-out}.toggle-left-panel-control.expanded[data-v-acbeb50e]{left:var(--v01870e39)}[data-v-a2181be5],[data-v-a2181be5] *{box-sizing:border-box}.kong-ui-public-split-pane[data-v-a2181be5]{height:100%}.kong-ui-public-split-pane.has-navigation[data-v-a2181be5]{background-color:#000933;background-color:var(--kui-navigation-color-background, #000933);bottom:0;left:0;position:fixed;right:0;top:0;z-index:2000}.kong-ui-public-split-pane.has-navigation .kong-ui-public-split-pane-container-inner[data-v-a2181be5]{padding-top:6px;padding-top:var(--kui-space-30, 6px)}.kong-ui-public-split-pane-container[data-v-a2181be5]{display:flex;flex-direction:row;height:100%;width:100%}.kong-ui-public-split-pane-container-inner[data-v-a2181be5]{display:flex;flex-direction:column;width:100%}.kong-ui-public-split-pane-container-inner-content[data-v-a2181be5]{display:flex;flex:1 1 auto;flex-direction:column;height:100%;max-height:calc(100vh - 6px);min-width:0;position:relative;width:100%}.kong-ui-public-split-pane-inner-panes[data-v-a2181be5]{display:flex;height:100%;width:100%}.kong-ui-public-split-pane-panes[data-v-a2181be5]{align-items:stretch;background-color:#fff;background-color:var(--kui-color-background, #ffffff);border-top-left-radius:6px;border-top-left-radius:var(--kui-border-radius-30, 6px);display:flex;flex:1 1 auto;flex-direction:row;overflow:hidden;z-index:0}.kong-ui-public-split-pane-pane-left[data-v-a2181be5],.kong-ui-public-split-pane-pane-center[data-v-a2181be5],.kong-ui-public-split-pane-pane-right[data-v-a2181be5]{overflow-x:hidden;overflow-y:auto;position:relative;scrollbar-width:thin}.kong-ui-public-split-pane-pane-left.has-toolbar[data-v-a2181be5],.kong-ui-public-split-pane-pane-center.has-toolbar[data-v-a2181be5],.kong-ui-public-split-pane-pane-right.has-toolbar[data-v-a2181be5]{max-height:calc(100vh - 44px)}.kong-ui-public-split-pane-pane-left.is-dragging-pane[data-v-a2181be5],.kong-ui-public-split-pane-pane-center.is-dragging-pane[data-v-a2181be5],.kong-ui-public-split-pane-pane-right.is-dragging-pane[data-v-a2181be5]{pointer-events:none;transition:none}.kong-ui-public-split-pane-pane-left[data-v-a2181be5]{border-right:1px solid transparent;border-right:var(--kui-border-width-10, 1px) solid var(--kui-color-border-transparent, transparent);border-top-left-radius:6px;border-top-left-radius:var(--kui-border-radius-30, 6px);flex:0 0 auto;max-height:none!important;max-width:0;overflow:hidden;pointer-events:none;position:relative;transition:border-color .1s ease-in-out,max-width .1s ease-in-out;width:260px;will-change:border-color,max-width,min-width;z-index:5}.kong-ui-public-split-pane-pane-left.expanded[data-v-a2181be5]{border-right-color:#e0e4ea;border-right-color:var(--kui-color-border, #e0e4ea);max-width:var(--v77518bb8);pointer-events:auto}.kong-ui-public-split-pane-pane-left.is-dragging-pane-left[data-v-a2181be5],.kong-ui-public-split-pane-pane-left.expanded.show-resize-border[data-v-a2181be5],.kong-ui-public-split-pane-pane-left.show-resize-border[data-v-a2181be5]{border-right-color:#0044f4;border-right-color:var(--kui-color-border-primary, #0044f4)}.kong-ui-public-split-pane-pane-center[data-v-a2181be5]{max-width:var(--a7565b74);min-width:300px;width:300px}.kong-ui-public-split-pane-pane-center.has-resize-divider-left[data-v-a2181be5]{margin-left:-3px}.kong-ui-public-split-pane-pane-center.has-resize-divider-right[data-v-a2181be5]{margin-right:-3px}.kong-ui-public-split-pane-pane-right[data-v-a2181be5]{border-left:1px solid #e0e4ea;border-left:var(--kui-border-width-10, 1px) solid var(--kui-color-border, #e0e4ea);flex:1;max-width:var(--v39a6730f);min-width:300px;transition:border-color .1s ease-in-out}.kong-ui-public-split-pane-pane-right.is-dragging-inner-panes[data-v-a2181be5],.kong-ui-public-split-pane-pane-right.show-resize-border[data-v-a2181be5]{border-left-color:#0044f4;border-left-color:var(--kui-color-border-primary, #0044f4)}.kong-ui-public-split-pane-toolbar-container.has-resize-divider-left[data-v-a2181be5]{margin-left:-3px}.kong-ui-public-split-pane-resize-divider[data-v-a2181be5]{align-self:flex-end;background-color:transparent;background-color:var(--kui-color-background-transparent, transparent);cursor:col-resize;height:calc(100% - 43px);position:relative;transition:all .1s ease-in-out;width:3px;z-index:4}.kong-ui-public-split-pane-resize-divider.left[data-v-a2181be5]{margin-left:0}.kong-ui-public-split-pane-resize-divider.right[data-v-a2181be5]{right:-3px}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { SplitPaneProps } from '../types';
|
|
2
|
+
type __VLS_Slots = {
|
|
3
|
+
toolbar?: () => any;
|
|
4
|
+
'pane-left'?: () => any;
|
|
5
|
+
'pane-center'?: () => any;
|
|
6
|
+
'pane-right'?: () => any;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_base: import("vue").DefineComponent<SplitPaneProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<SplitPaneProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
10
|
+
declare const _default: typeof __VLS_export;
|
|
11
|
+
export default _default;
|
|
12
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
13
|
+
new (): {
|
|
14
|
+
$slots: S;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=SplitPane.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SplitPane.vue.d.ts","sourceRoot":"","sources":["../../../src/components/SplitPane.vue"],"names":[],"mappings":"AAkZA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AA0B9C,KAAK,WAAW,GAAG;IACjB,OAAO,CAAC,EAAE,MAAM,GAAG,CAAA;IACnB,WAAW,CAAC,EAAE,MAAM,GAAG,CAAA;IACvB,aAAa,CAAC,EAAE,MAAM,GAAG,CAAA;IACzB,YAAY,CAAC,EAAE,MAAM,GAAG,CAAA;CACzB,CAAC;AA2RF,QAAA,MAAM,UAAU,wSAEd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { VerticalNavigationItem } from '../types';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
paneLeftWidth?: number;
|
|
4
|
+
paneLeftVisible?: boolean;
|
|
5
|
+
items?: VerticalNavigationItem[];
|
|
6
|
+
};
|
|
7
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
8
|
+
declare const _default: typeof __VLS_export;
|
|
9
|
+
export default _default;
|
|
10
|
+
//# sourceMappingURL=VerticalNavigation.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VerticalNavigation.vue.d.ts","sourceRoot":"","sources":["../../../src/components/VerticalNavigation.vue"],"names":[],"mappings":"AA+PA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAA;AAEtD,KAAK,WAAW,GAAG;IACjB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,KAAK,CAAC,EAAE,sBAAsB,EAAE,CAAA;CACjC,CAAC;AAqRF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { createI18n, i18nTComponent } from '@kong-ui-public/i18n';
|
|
2
|
+
import english from '../locales/en.json';
|
|
3
|
+
interface UseI18nReturn {
|
|
4
|
+
i18n: ReturnType<typeof createI18n<typeof english>>;
|
|
5
|
+
i18nT: ReturnType<typeof i18nTComponent<typeof english>>;
|
|
6
|
+
}
|
|
7
|
+
export default function useI18n(): UseI18nReturn;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=useI18n.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useI18n.d.ts","sourceRoot":"","sources":["../../../src/composable/useI18n.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AACjE,OAAO,OAAO,MAAM,oBAAoB,CAAA;AAExC,UAAU,aAAa;IACrB,IAAI,EAAE,UAAU,CAAC,OAAO,UAAU,CAAC,OAAO,OAAO,CAAC,CAAC,CAAA;IACnD,KAAK,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,OAAO,OAAO,CAAC,CAAC,CAAA;CACzD;AAED,MAAM,CAAC,OAAO,UAAU,OAAO,IAAI,aAAa,CAO/C"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { useSplitPaneParams } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Composable for managing split pane layout with resizable panels
|
|
4
|
+
* @param {useSplitPaneParams} [params]
|
|
5
|
+
* @returns {Object} Object containing pane state and control functions
|
|
6
|
+
*/
|
|
7
|
+
export default function useSplitPane(params?: useSplitPaneParams): {
|
|
8
|
+
isDraggingPaneLeft: Readonly<import("vue").Ref<boolean, boolean>>;
|
|
9
|
+
isDraggingInnerPanes: Readonly<import("vue").Ref<boolean, boolean>>;
|
|
10
|
+
startDraggingInnerPanes: (e: MouseEvent) => void;
|
|
11
|
+
refreshInnerPaneSizes: () => void;
|
|
12
|
+
paneLeftExpanded: Readonly<import("vue").Ref<boolean, boolean>>;
|
|
13
|
+
togglePaneLeft: () => Promise<void>;
|
|
14
|
+
startDraggingPaneLeft: (e: MouseEvent) => void;
|
|
15
|
+
centerPaneWidth: import("vue").Ref<number, number>;
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=useSplitPane.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSplitPane.d.ts","sourceRoot":"","sources":["../../../src/composable/useSplitPane.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAA;AAgBlD;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,MAAM,CAAC,EAAE,kBAAkB;;;iCA+G1B,UAAU,KAAG,IAAI;iCA5CnB,IAAI;;0BA2JL,OAAO,CAAC,IAAI,CAAC;+BA7DZ,UAAU,KAAG,IAAI;;EA8GpD"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** Default minimum width for the left pane */
|
|
2
|
+
export declare const PANE_LEFT_MIN_WIDTH = "260px";
|
|
3
|
+
/** Default maximum width for the left pane */
|
|
4
|
+
export declare const PANE_LEFT_MAX_WIDTH = "500px";
|
|
5
|
+
/** Default maximum width for the center pane */
|
|
6
|
+
export declare const PANE_CENTER_DEFAULT_MAX_WIDTH: string;
|
|
7
|
+
/** Default maximum width for the right pane */
|
|
8
|
+
export declare const PANE_RIGHT_DEFAULT_MAX_WIDTH: string;
|
|
9
|
+
//# sourceMappingURL=split-pane.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"split-pane.d.ts","sourceRoot":"","sources":["../../../src/constants/split-pane.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAC9C,eAAO,MAAM,mBAAmB,UAAU,CAAA;AAC1C,8CAA8C;AAC9C,eAAO,MAAM,mBAAmB,UAAU,CAAA;AAC1C,gDAAgD;AAChD,eAAO,MAAM,6BAA6B,EAAE,MAAc,CAAA;AAC1D,+CAA+C;AAC/C,eAAO,MAAM,4BAA4B,EAAE,MAAc,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,SAAS,MAAM,4BAA4B,CAAA;AAalD,OAAO,EAAE,SAAS,EAAE,CAAA;AAEpB,cAAc,SAAS,CAAA"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import type { Component, ShallowRef } from 'vue';
|
|
2
|
+
import type { RouteLocationRaw } from 'vue-router';
|
|
3
|
+
export interface SplitPaneProps {
|
|
4
|
+
/**
|
|
5
|
+
* Should the center and right panels allow for resizing
|
|
6
|
+
* @default true
|
|
7
|
+
*/
|
|
8
|
+
resizable?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Should the resize handle be hidden
|
|
11
|
+
* @default true
|
|
12
|
+
*/
|
|
13
|
+
showResizeHandle?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Show the navigation pane
|
|
16
|
+
* @default true
|
|
17
|
+
*/
|
|
18
|
+
showNavigation?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* The items to show in the vertical navigation
|
|
21
|
+
* @default []
|
|
22
|
+
*/
|
|
23
|
+
navigationItems?: VerticalNavigationItem[];
|
|
24
|
+
paneLeft?: {
|
|
25
|
+
/** Pass false to hide the pane even if it contains slot content */
|
|
26
|
+
visible?: boolean;
|
|
27
|
+
maxWidth?: string;
|
|
28
|
+
};
|
|
29
|
+
paneCenter?: {
|
|
30
|
+
/** Pass false to hide the pane even if it contains slot content */
|
|
31
|
+
visible?: boolean;
|
|
32
|
+
maxWidth?: string;
|
|
33
|
+
};
|
|
34
|
+
paneRight?: {
|
|
35
|
+
/** Pass false to hide the pane even if it contains slot content */
|
|
36
|
+
visible?: boolean;
|
|
37
|
+
maxWidth?: string;
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
export interface VerticalNavigationItem {
|
|
41
|
+
/**
|
|
42
|
+
* The route location to navigate to
|
|
43
|
+
*/
|
|
44
|
+
to?: RouteLocationRaw;
|
|
45
|
+
/**
|
|
46
|
+
* The tooltip text to show on hover
|
|
47
|
+
*/
|
|
48
|
+
tooltip: string;
|
|
49
|
+
/**
|
|
50
|
+
* Is the item currently active
|
|
51
|
+
*/
|
|
52
|
+
active: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* The icon to show for the navigation item
|
|
55
|
+
*/
|
|
56
|
+
icon: Component;
|
|
57
|
+
/**
|
|
58
|
+
* The test ID for the navigation item
|
|
59
|
+
*/
|
|
60
|
+
testid: string;
|
|
61
|
+
}
|
|
62
|
+
export interface useSplitPaneParams {
|
|
63
|
+
/** The `useTemplateRef()` of the vertical navigation component */
|
|
64
|
+
verticalNavRef?: Readonly<ShallowRef<any | null>>;
|
|
65
|
+
/** The `useTemplateRef()` of the resizable pane's parent element */
|
|
66
|
+
innerPanesContainerRef?: Readonly<ShallowRef<HTMLDivElement | null>>;
|
|
67
|
+
/** The `useTemplateRef()` of the left pane */
|
|
68
|
+
paneLeftRef?: Readonly<ShallowRef<HTMLDivElement | null>>;
|
|
69
|
+
/** The `useTemplateRef()` of the center pane */
|
|
70
|
+
paneCenterRef?: Readonly<ShallowRef<HTMLDivElement | null>>;
|
|
71
|
+
/** The `useTemplateRef()` of the right pane */
|
|
72
|
+
paneRightRef?: Readonly<ShallowRef<HTMLDivElement | null>>;
|
|
73
|
+
}
|
|
74
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAChD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAElD,MAAM,WAAW,cAAc;IAC7B;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB;;;OAGG;IACH,eAAe,CAAC,EAAE,sBAAsB,EAAE,CAAA;IAC1C,QAAQ,CAAC,EAAE;QACT,mEAAmE;QACnE,OAAO,CAAC,EAAE,OAAO,CAAA;QAEjB,QAAQ,CAAC,EAAE,MAAM,CAAA;KAClB,CAAA;IACD,UAAU,CAAC,EAAE;QACX,mEAAmE;QACnE,OAAO,CAAC,EAAE,OAAO,CAAA;QAEjB,QAAQ,CAAC,EAAE,MAAM,CAAA;KAClB,CAAA;IACD,SAAS,CAAC,EAAE;QACV,mEAAmE;QACnE,OAAO,CAAC,EAAE,OAAO,CAAA;QAEjB,QAAQ,CAAC,EAAE,MAAM,CAAA;KAClB,CAAA;CACF;AAGD,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,EAAE,CAAC,EAAE,gBAAgB,CAAA;IACrB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAA;IACf;;OAEG;IACH,MAAM,EAAE,OAAO,CAAA;IACf;;OAEG;IACH,IAAI,EAAE,SAAS,CAAA;IACf;;OAEG;IACH,MAAM,EAAE,MAAM,CAAA;CACf;AAGD,MAAM,WAAW,kBAAkB;IACjC,kEAAkE;IAClE,cAAc,CAAC,EAAE,QAAQ,CAAC,UAAU,CAAC,GAAG,GAAG,IAAI,CAAC,CAAC,CAAA;IACjD,oEAAoE;IACpE,sBAAsB,CAAC,EAAE,QAAQ,CAAC,UAAU,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC,CAAA;IACpE,8CAA8C;IAC9C,WAAW,CAAC,EAAE,QAAQ,CAAC,UAAU,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC,CAAA;IACzD,gDAAgD;IAChD,aAAa,CAAC,EAAE,QAAQ,CAAC,UAAU,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC,CAAA;IAC3D,+CAA+C;IAC/C,YAAY,CAAC,EAAE,QAAQ,CAAC,UAAU,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC,CAAA;CAC3D"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kong-ui-public/split-pane",
|
|
3
|
-
"version": "0.1.1-pr.
|
|
3
|
+
"version": "0.1.1-pr.2823.7037e5373.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A shared SplitPane layout component for Vue 3 applications.",
|
|
6
6
|
"main": "./dist/split-pane.umd.js",
|
|
@@ -24,7 +24,8 @@
|
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@kong/design-tokens": "1.18.2",
|
|
26
26
|
"@kong/kongponents": "9.49.0",
|
|
27
|
-
"vue": "^3.5.26"
|
|
27
|
+
"vue": "^3.5.26",
|
|
28
|
+
"@kong-ui-public/i18n": "^2.4.5"
|
|
28
29
|
},
|
|
29
30
|
"repository": {
|
|
30
31
|
"type": "git",
|
|
@@ -44,8 +45,10 @@
|
|
|
44
45
|
"errorLimit": "200KB"
|
|
45
46
|
},
|
|
46
47
|
"peerDependencies": {
|
|
47
|
-
"@kong/
|
|
48
|
-
"
|
|
48
|
+
"@kong/icons": "^1.41.0",
|
|
49
|
+
"@kong/kongponents": ">=9.42.0 <10.0.0",
|
|
50
|
+
"vue": "^3.5.26",
|
|
51
|
+
"@kong-ui-public/i18n": "^2.4.5"
|
|
49
52
|
},
|
|
50
53
|
"scripts": {
|
|
51
54
|
"dev": "cross-env USE_SANDBOX=true vite",
|