@bagelink/vue 1.21.71 → 1.22.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/dist/{StructuredEditor-B3FBmkDp.js → StructuredEditor-BiBhDIf8.js} +1 -1
- package/dist/{StructuredEditor-DU80v1ME.cjs → StructuredEditor-Cdl9_djZ.cjs} +1 -1
- package/dist/components/dataTable/DataTable.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/DatePicker.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/SelectBtn.vue.d.ts +6 -0
- package/dist/components/form/inputs/SelectBtn.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/SelectInput.vue.d.ts.map +1 -1
- package/dist/components/layout/AppLayout.vue.d.ts.map +1 -1
- package/dist/components/layout/AppSidebar.vue.d.ts.map +1 -1
- package/dist/components/layout/Panel.vue.d.ts.map +1 -1
- package/dist/composables/useBoundedRectDrag.d.ts +13 -0
- package/dist/composables/useBoundedRectDrag.d.ts.map +1 -1
- package/dist/core.css +2 -2
- package/dist/dialog/Dialog.vue.d.ts.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/src-CyUKZxJV.cjs +764 -0
- package/dist/{src-BzdyPQ2G.js → src-lXTK29UB.js} +10053 -9929
- package/dist/src.css +1 -1
- package/dist/style.css +2 -2
- package/package.json +2 -2
- package/src/components/Icon/Icon.vue +1 -1
- package/src/components/dataTable/DataTable.vue +8 -0
- package/src/components/form/inputs/DatePicker.vue +36 -1
- package/src/components/form/inputs/SelectBtn.vue +25 -1
- package/src/components/form/inputs/SelectInput.vue +3 -2
- package/src/components/layout/AppLayout.vue +41 -3
- package/src/components/layout/AppSidebar.vue +319 -28
- package/src/components/layout/Panel.vue +12 -0
- package/src/composables/useBoundedRectDrag.ts +16 -1
- package/src/composables/usePointerSession.ts +2 -2
- package/src/dialog/Dialog.vue +25 -2
- package/src/styles/app-layout.css +4 -0
- package/src/styles/core.css +1 -1
- package/src/styles/toast-overrides.css +8 -2
- package/dist/src-D4naZ4N-.cjs +0 -764
|
@@ -74,6 +74,18 @@ watch(() => props.size, (val) => {
|
|
|
74
74
|
if (clamped !== panelState.value.size.value) panelState.value.size.value = clamped
|
|
75
75
|
})
|
|
76
76
|
|
|
77
|
+
// Keep drag clamps in sync when the consumer changes min/max (e.g. fit-to-container).
|
|
78
|
+
watch(
|
|
79
|
+
() => [props.min, props.max] as const,
|
|
80
|
+
([min, max]) => {
|
|
81
|
+
if (!panelState.value) return
|
|
82
|
+
panelState.value.config.min = min
|
|
83
|
+
panelState.value.config.max = max
|
|
84
|
+
const clamped = Math.max(min, Math.min(max, panelState.value.size.value))
|
|
85
|
+
if (clamped !== panelState.value.size.value) panelState.value.size.value = clamped
|
|
86
|
+
},
|
|
87
|
+
)
|
|
88
|
+
|
|
77
89
|
// Internal → prop (drag end syncs back up via v-model:size)
|
|
78
90
|
// Skip the initial mount transition (undefined → number) to avoid spurious emits
|
|
79
91
|
watch(
|
|
@@ -14,6 +14,19 @@ export interface BoundedRectDragOptions {
|
|
|
14
14
|
threshold?: number
|
|
15
15
|
/** Client pixels per rectangle unit (defaults to screen-space geometry). */
|
|
16
16
|
scale?: number
|
|
17
|
+
/**
|
|
18
|
+
* Element (or document) that holds pointer capture. Prefer a stable ancestor
|
|
19
|
+
* of the drag handle — capturing on a tiny handle fails when the pointer
|
|
20
|
+
* races over an iframe before capture sticks.
|
|
21
|
+
*/
|
|
22
|
+
target?: Element | Document | null
|
|
23
|
+
cursor?: string
|
|
24
|
+
/**
|
|
25
|
+
* When the pointer session is interrupted, restore the pre-drag rect.
|
|
26
|
+
* Default true. Set false for free-floating UI where keeping the last
|
|
27
|
+
* previewed position feels better than snapping back.
|
|
28
|
+
*/
|
|
29
|
+
rollbackOnCancel?: boolean
|
|
17
30
|
onUpdate: (rect: DragRect) => void
|
|
18
31
|
onCommit?: (moved: boolean) => void
|
|
19
32
|
onCancel?: () => void
|
|
@@ -49,13 +62,15 @@ export function useBoundedRectDrag() {
|
|
|
49
62
|
}
|
|
50
63
|
const started = session.start(event, {
|
|
51
64
|
threshold: options.threshold,
|
|
65
|
+
target: options.target,
|
|
66
|
+
cursor: options.cursor,
|
|
52
67
|
onMove: (_next, { dx, dy }) => applyMove(dx, dy),
|
|
53
68
|
onEnd: (_next, { dx, dy }) => {
|
|
54
69
|
try { applyMove(dx, dy); options.onCommit?.(moved) } finally { active.value = false }
|
|
55
70
|
},
|
|
56
71
|
onCancel: () => {
|
|
57
72
|
active.value = false
|
|
58
|
-
if (previewed) options.onUpdate({ ...initial })
|
|
73
|
+
if (previewed && options.rollbackOnCancel !== false) options.onUpdate({ ...initial })
|
|
59
74
|
options.onCancel?.()
|
|
60
75
|
},
|
|
61
76
|
})
|
|
@@ -79,7 +79,6 @@ export function createPointerSession() {
|
|
|
79
79
|
view!.removeEventListener('pointercancel', interrupted)
|
|
80
80
|
view!.removeEventListener('blur', cancel)
|
|
81
81
|
view!.removeEventListener('keydown', keydown)
|
|
82
|
-
targetEl?.removeEventListener('lostpointercapture', interrupted as EventListener)
|
|
83
82
|
try {
|
|
84
83
|
if (targetEl?.hasPointerCapture?.(id)) targetEl.releasePointerCapture(id)
|
|
85
84
|
} catch { /* Detached targets may already have lost capture. */ }
|
|
@@ -101,7 +100,8 @@ export function createPointerSession() {
|
|
|
101
100
|
view.addEventListener('pointercancel', interrupted)
|
|
102
101
|
view.addEventListener('blur', cancel)
|
|
103
102
|
view.addEventListener('keydown', keydown)
|
|
104
|
-
|
|
103
|
+
// Capture helps over iframes, but losing it must NOT abort — window
|
|
104
|
+
// listeners keep the session alive (fast drags often drop capture).
|
|
105
105
|
try { targetEl?.setPointerCapture?.(id) } catch { /* Window listeners remain a capture fallback. */ }
|
|
106
106
|
return true
|
|
107
107
|
}
|
package/src/dialog/Dialog.vue
CHANGED
|
@@ -170,12 +170,17 @@ defineExpose({ close })
|
|
|
170
170
|
|
|
171
171
|
<style scoped>
|
|
172
172
|
|
|
173
|
-
/* Base dialog styles
|
|
173
|
+
/* Base dialog styles.
|
|
174
|
+
Height cascade: vh fallback → dvh (tracks iOS chrome / fold) → subtract
|
|
175
|
+
asymmetric safe-area so content clears notch + home indicator on Duo. */
|
|
174
176
|
dialog {
|
|
175
177
|
border-radius: var(--bgl-card-radius, 12px);
|
|
176
178
|
max-width: var(--dialog-width);
|
|
177
179
|
width: calc(100% - 2rem);
|
|
178
180
|
max-height: calc(100vh - 2rem);
|
|
181
|
+
max-height: calc(100dvh - 2rem - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
|
|
182
|
+
margin-top: max(1rem, env(safe-area-inset-top, 0px));
|
|
183
|
+
margin-bottom: max(1rem, env(safe-area-inset-bottom, 0px));
|
|
179
184
|
background: var(--bgl-popup-bg, #fff);
|
|
180
185
|
color: var(--bgl-popup-text, black);
|
|
181
186
|
}
|
|
@@ -189,10 +194,12 @@ border-radius: var(--bgl-card-radius, 12px);
|
|
|
189
194
|
|
|
190
195
|
.height-100-2 {
|
|
191
196
|
height: calc(100vh - 2rem);
|
|
197
|
+
height: calc(100dvh - 2rem - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
|
|
192
198
|
}
|
|
193
199
|
|
|
194
200
|
.max-height-100-2 {
|
|
195
201
|
max-height: calc(100vh - 2rem);
|
|
202
|
+
max-height: calc(100dvh - 2rem - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
|
|
196
203
|
}
|
|
197
204
|
|
|
198
205
|
.dialog-close {
|
|
@@ -285,7 +292,17 @@ dialog.dialog-bottom {
|
|
|
285
292
|
border-end-start-radius: 0;
|
|
286
293
|
}
|
|
287
294
|
@media (max-width: 910px) {
|
|
288
|
-
dialog.dialog-bottom {
|
|
295
|
+
dialog.dialog-bottom {
|
|
296
|
+
width: 100%;
|
|
297
|
+
max-width: 100%;
|
|
298
|
+
margin-inline: 0;
|
|
299
|
+
margin-bottom: 0;
|
|
300
|
+
padding-bottom: env(safe-area-inset-bottom, 0px);
|
|
301
|
+
padding-left: env(safe-area-inset-left, 0px);
|
|
302
|
+
padding-right: env(safe-area-inset-right, 0px);
|
|
303
|
+
max-height: calc(100dvh - env(safe-area-inset-top, 0px));
|
|
304
|
+
box-sizing: border-box;
|
|
305
|
+
}
|
|
289
306
|
}
|
|
290
307
|
|
|
291
308
|
/* Drag-handle grip for bottom sheets. */
|
|
@@ -463,12 +480,18 @@ dialog.dialog-right .grid-dialog {
|
|
|
463
480
|
dialog.dialog-left .grid-dialog,
|
|
464
481
|
dialog.dialog-right .grid-dialog {
|
|
465
482
|
max-height: 100vh;
|
|
483
|
+
max-height: 100dvh;
|
|
466
484
|
height: unset !important;
|
|
467
485
|
}
|
|
468
486
|
|
|
469
487
|
dialog.dialog-left,
|
|
470
488
|
dialog.dialog-right {
|
|
471
489
|
width: 100%;
|
|
490
|
+
padding-top: env(safe-area-inset-top, 0px);
|
|
491
|
+
padding-bottom: env(safe-area-inset-bottom, 0px);
|
|
492
|
+
padding-left: env(safe-area-inset-left, 0px);
|
|
493
|
+
padding-right: env(safe-area-inset-right, 0px);
|
|
494
|
+
box-sizing: border-box;
|
|
472
495
|
}
|
|
473
496
|
}
|
|
474
497
|
|
|
@@ -162,6 +162,10 @@
|
|
|
162
162
|
}
|
|
163
163
|
}
|
|
164
164
|
|
|
165
|
+
/* iPhone Duo / foldables: when the inner display is open the viewport is often
|
|
166
|
+
near-square — still treat it as a single fluid viewport (no device sniffing).
|
|
167
|
+
The 910px mobile breakpoint already flips list/detail stacks; keep that. */
|
|
168
|
+
|
|
165
169
|
@media screen and (max-width: 910px) {
|
|
166
170
|
.tab {
|
|
167
171
|
font-size: 12px;
|
package/src/styles/core.css
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* Font-neutral Bagel UI stylesheet for public/customer sites.
|
|
2
2
|
Apps choose their own typography and may import optional font packs. */
|
|
3
|
-
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,100..700,0..1,0&display=
|
|
3
|
+
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,100..700,0..1,0&display=block');
|
|
4
4
|
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/brands.min.css');
|
|
5
5
|
|
|
6
6
|
@import "theme.css";
|
|
@@ -1,13 +1,19 @@
|
|
|
1
|
-
/* Reset popover containers used to promote elements above showModal() dialogs
|
|
1
|
+
/* Reset popover containers used to promote elements above showModal() dialogs.
|
|
2
|
+
Physical safe-area sides (not a single inline shorthand) — iPhone Duo insets
|
|
3
|
+
are frequently asymmetric across the fold. */
|
|
2
4
|
#bgl-toast-container {
|
|
3
5
|
all: unset;
|
|
4
6
|
display: block;
|
|
5
7
|
position: fixed;
|
|
6
|
-
top:
|
|
8
|
+
top: env(safe-area-inset-top, 0px);
|
|
7
9
|
inset-inline-end: 0;
|
|
8
10
|
width: 0;
|
|
9
11
|
height: 0;
|
|
10
12
|
overflow: visible;
|
|
13
|
+
padding-top: 0.5rem;
|
|
14
|
+
padding-left: env(safe-area-inset-left, 0px);
|
|
15
|
+
padding-right: env(safe-area-inset-right, 0px);
|
|
16
|
+
box-sizing: content-box;
|
|
11
17
|
}
|
|
12
18
|
|
|
13
19
|
/* Override vue-toastification default styles */
|