@leavepulse/ui 0.31.0 → 0.32.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/dist/assets/{LpDropzone-DVDC-ABU.css → LpDropzone-BBoWvi-J.css} +12 -12
- package/dist/assets/{LpImageEditor-DqP5JKCy.css → LpImageEditor-BsSwej47.css} +6 -6
- package/dist/chunks/{LpAddressInput-BDkp3-Bp.js → LpAddressInput-C35TsJXt.js} +19 -14
- package/dist/chunks/{LpAppShell-Chz8Vbtu.js → LpAppShell-lVvpENMH.js} +18 -13
- package/dist/chunks/{LpBreadcrumbs-5uvViCXi.js → LpBreadcrumbs-p4jHe_V-.js} +9 -7
- package/dist/chunks/{LpCalendar-B7ZL0ty3.js → LpCalendar-B7Ko5RdR.js} +12 -7
- package/dist/chunks/{LpCard-D0M2ZCnB.js → LpCard-1SeUYPBT.js} +36 -9
- package/dist/chunks/{LpCheckbox-BO0zuuPh.js → LpCheckbox-CVccKYaH.js} +9 -4
- package/dist/chunks/{LpCodeBlock-BWX1KZwk.js → LpCodeBlock-Bo0B4TFR.js} +37 -32
- package/dist/chunks/{LpDatePicker-dY2q4dr4.js → LpDatePicker-6JFXllj5.js} +1 -1
- package/dist/chunks/{LpDisclosure-B4kVAWfg.js → LpDisclosure-y7wDBgLa.js} +11 -6
- package/dist/chunks/{LpEmptyState-BV3q7Qyi.js → LpEmptyState-Dsdqz1Wj.js} +13 -5
- package/dist/chunks/{LpFileTree-DfFqY__1.js → LpFileTree-C-NFRT0H.js} +19 -14
- package/dist/chunks/{LpFileTreeNode-COchUMNn.js → LpFileTreeNode-DNJUJiiB.js} +13 -6
- package/dist/chunks/{LpFormField-fV_2ZdCk.js → LpFormField-CazBc2-a.js} +14 -9
- package/dist/chunks/{LpInput-Bt4J71xn.js → LpInput-9EXWUM9B.js} +1 -1
- package/dist/chunks/{LpLightbox-Ci35Y_xP.js → LpLightbox-Cixfxezw.js} +29 -6
- package/dist/chunks/{LpLink-BHZ1CLlF.js → LpLink-DCND-zyu.js} +16 -9
- package/dist/chunks/{LpLogViewer-TSRyt3t9.js → LpLogViewer-y53ZqSVq.js} +20 -10
- package/dist/chunks/{LpMapPicker-CXvoTrAe.js → LpMapPicker-ul4oYno6.js} +14 -9
- package/dist/chunks/LpMediaGallery-t1z3bQcY.js +187 -0
- package/dist/chunks/{LpNotificationBell-gdvQY89m.js → LpNotificationBell-lHePf89W.js} +1 -1
- package/dist/chunks/{LpNumberField-NPE8Bumx.js → LpNumberField-CWuX08iX.js} +12 -5
- package/dist/chunks/{LpOtpInput-DqaT0Z75.js → LpOtpInput-y2v-pmiN.js} +11 -6
- package/dist/chunks/{LpPagination-CeGuNe_q.js → LpPagination-5FxjmmB5.js} +21 -19
- package/dist/chunks/{LpPasswordInput-BqMAc5HA.js → LpPasswordInput--sjYCkLS.js} +1 -1
- package/dist/chunks/{LpPhoneInput-NXXjciJJ.js → LpPhoneInput-BDSKVl_z.js} +16 -9
- package/dist/chunks/{LpPie-BL1vTDSM.js → LpPie-c2-q4DJu.js} +14 -8
- package/dist/chunks/{LpRadio-CL-pI0_O.js → LpRadio-B5AfqTpZ.js} +13 -5
- package/dist/chunks/{LpRadioGroup-B4yDTmi6.js → LpRadioGroup-xPIuVDO_.js} +12 -5
- package/dist/chunks/{LpSegmented-BmpanyAo.js → LpSegmented-fV0Sk92p.js} +16 -6
- package/dist/chunks/{LpSidebar-BiWM_lDB.js → LpSidebar-DcYavim2.js} +2 -2
- package/dist/chunks/{LpSidebarNav-CsgeuGAu.js → LpSidebarNav-CqwvT4H8.js} +21 -16
- package/dist/chunks/{LpSlider-B1SF3pRV.js → LpSlider-BwNIBkAK.js} +12 -5
- package/dist/chunks/{LpStat-CDanpzU0.js → LpStat-CQaW8R--.js} +23 -18
- package/dist/chunks/{LpStepper-Wtl-6nUh.js → LpStepper-Bk-XaQYU.js} +15 -10
- package/dist/chunks/{LpSwitch-v6fnccSM.js → LpSwitch-xgnRU2k0.js} +12 -5
- package/dist/chunks/{LpTextarea-BMIOfw5l.js → LpTextarea-t7F6gv8E.js} +1 -1
- package/dist/chunks/{LpUptimeBar-DcQ8HikG.js → LpUptimeBar-DvAMno0S.js} +26 -21
- package/dist/component-names.d.ts +1 -1
- package/dist/components/LpAddressInput.vue.d.ts +34 -17
- package/dist/components/LpAddressInput.vue.js +1 -1
- package/dist/components/LpAppShell.vue.d.ts +65 -31
- package/dist/components/LpAppShell.vue.js +1 -1
- package/dist/components/LpBreadcrumbs.vue.d.ts +12 -6
- package/dist/components/LpBreadcrumbs.vue.js +1 -1
- package/dist/components/LpCalendar.vue.d.ts +15 -6
- package/dist/components/LpCalendar.vue.js +1 -1
- package/dist/components/LpCard.vue.d.ts +26 -0
- package/dist/components/LpCard.vue.js +1 -1
- package/dist/components/LpChart.vue.d.ts +54 -12
- package/dist/components/LpChart.vue.js +15 -9
- package/dist/components/LpCheckbox.vue.d.ts +16 -12
- package/dist/components/LpCheckbox.vue.js +1 -1
- package/dist/components/LpCodeBlock.vue.d.ts +25 -6
- package/dist/components/LpCodeBlock.vue.js +1 -1
- package/dist/components/LpDatePicker.vue.js +1 -1
- package/dist/components/LpDisclosure.vue.d.ts +24 -14
- package/dist/components/LpDisclosure.vue.js +1 -1
- package/dist/components/LpDropzone.vue.d.ts +38 -14
- package/dist/components/LpDropzone.vue.js +17 -11
- package/dist/components/LpEmptyState.vue.d.ts +15 -10
- package/dist/components/LpEmptyState.vue.js +1 -1
- package/dist/components/LpFileTree.vue.d.ts +51 -31
- package/dist/components/LpFileTree.vue.js +1 -1
- package/dist/components/LpFileTreeNode.vue.d.ts +31 -16
- package/dist/components/LpFileTreeNode.vue.js +1 -1
- package/dist/components/LpFormField.vue.d.ts +14 -13
- package/dist/components/LpFormField.vue.js +1 -1
- package/dist/components/LpImageEditor.vue.d.ts +33 -10
- package/dist/components/LpImageEditor.vue.js +13 -7
- package/dist/components/LpInput.vue.js +1 -1
- package/dist/components/LpLightbox.vue.js +1 -1
- package/dist/components/LpLink.vue.d.ts +46 -11
- package/dist/components/LpLink.vue.js +1 -1
- package/dist/components/LpLogViewer.vue.d.ts +63 -6
- package/dist/components/LpLogViewer.vue.js +1 -1
- package/dist/components/LpMapPicker.vue.d.ts +25 -10
- package/dist/components/LpMapPicker.vue.js +1 -1
- package/dist/components/LpMediaGallery.vue.d.ts +76 -0
- package/dist/components/LpMediaGallery.vue.js +4 -0
- package/dist/components/LpNotificationBell.vue.js +1 -1
- package/dist/components/LpNumberField.vue.d.ts +12 -6
- package/dist/components/LpNumberField.vue.js +1 -1
- package/dist/components/LpOtpInput.vue.d.ts +18 -6
- package/dist/components/LpOtpInput.vue.js +1 -1
- package/dist/components/LpPagination.vue.d.ts +16 -6
- package/dist/components/LpPagination.vue.js +1 -1
- package/dist/components/LpPasswordInput.vue.js +1 -1
- package/dist/components/LpPhoneInput.vue.d.ts +18 -6
- package/dist/components/LpPhoneInput.vue.js +1 -1
- package/dist/components/LpPie.vue.d.ts +96 -34
- package/dist/components/LpPie.vue.js +1 -1
- package/dist/components/LpRadio.vue.d.ts +10 -10
- package/dist/components/LpRadio.vue.js +1 -1
- package/dist/components/LpRadioGroup.vue.d.ts +12 -12
- package/dist/components/LpRadioGroup.vue.js +1 -1
- package/dist/components/LpSegmented.vue.d.ts +12 -6
- package/dist/components/LpSegmented.vue.js +1 -1
- package/dist/components/LpSidebar.vue.js +1 -1
- package/dist/components/LpSidebarNav.vue.d.ts +28 -17
- package/dist/components/LpSidebarNav.vue.js +1 -1
- package/dist/components/LpSlider.vue.d.ts +13 -6
- package/dist/components/LpSlider.vue.js +1 -1
- package/dist/components/LpStat.vue.d.ts +35 -11
- package/dist/components/LpStat.vue.js +1 -1
- package/dist/components/LpStepper.vue.d.ts +17 -5
- package/dist/components/LpStepper.vue.js +1 -1
- package/dist/components/LpSwitch.vue.d.ts +8 -6
- package/dist/components/LpSwitch.vue.js +1 -1
- package/dist/components/LpTable.vue.js +1 -1
- package/dist/components/LpTextarea.vue.js +1 -1
- package/dist/components/LpUptimeBar.vue.d.ts +21 -5
- package/dist/components/LpUptimeBar.vue.js +1 -1
- package/dist/composables/useMergedClass.d.ts +20 -0
- package/dist/composables/useMergedClass.js +11 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +95 -89
- package/package.json +1 -3
- package/src/component-names.ts +1 -0
- package/src/components/LpAddressInput.vue +16 -1
- package/src/components/LpAppShell.vue +16 -1
- package/src/components/LpBreadcrumbs.vue +16 -1
- package/src/components/LpCalendar.vue +15 -1
- package/src/components/LpCard.vue +50 -5
- package/src/components/LpChart.vue +16 -1
- package/src/components/LpCheckbox.vue +16 -1
- package/src/components/LpCodeBlock.vue +16 -1
- package/src/components/LpDisclosure.vue +15 -1
- package/src/components/LpDropzone.vue +21 -6
- package/src/components/LpEmptyState.vue +21 -3
- package/src/components/LpFileTree.vue +16 -1
- package/src/components/LpFileTreeNode.vue +15 -1
- package/src/components/LpFormField.vue +16 -1
- package/src/components/LpImageEditor.vue +16 -1
- package/src/components/LpLightbox.vue +54 -2
- package/src/components/LpLink.vue +25 -9
- package/src/components/LpLogViewer.vue +20 -2
- package/src/components/LpMapPicker.vue +15 -1
- package/src/components/LpMediaGallery.vue +280 -0
- package/src/components/LpNumberField.vue +15 -1
- package/src/components/LpOtpInput.vue +15 -1
- package/src/components/LpPagination.vue +16 -1
- package/src/components/LpPhoneInput.vue +23 -8
- package/src/components/LpPie.vue +16 -1
- package/src/components/LpRadio.vue +20 -3
- package/src/components/LpRadioGroup.vue +15 -1
- package/src/components/LpSegmented.vue +21 -2
- package/src/components/LpSidebarNav.vue +16 -1
- package/src/components/LpSlider.vue +15 -1
- package/src/components/LpStat.vue +16 -1
- package/src/components/LpStepper.vue +16 -1
- package/src/components/LpSwitch.vue +15 -1
- package/src/components/LpUptimeBar.vue +16 -1
- package/src/composables/useMergedClass.ts +30 -0
- package/src/index.ts +2 -0
- package/src/tokens/tokens.css +29 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent, ref, computed, openBlock, createBlock, unref, withCtx, createVNode, createElementVNode, normalizeClass, toDisplayString, createElementBlock, withKeys, withModifiers, createCommentVNode } from "vue";
|
|
2
2
|
import { PopoverRoot, PopoverTrigger, PopoverPortal, PopoverContent } from "reka-ui";
|
|
3
3
|
import { POPOVER_PANEL } from "../components/dropdown.js";
|
|
4
|
-
import { _ as _sfc_main$2 } from "./LpCalendar-
|
|
4
|
+
import { _ as _sfc_main$2 } from "./LpCalendar-B7Ko5RdR.js";
|
|
5
5
|
import { _ as _sfc_main$1 } from "./LpIcon-CCnX5_2j.js";
|
|
6
6
|
const _hoisted_1 = ["disabled"];
|
|
7
7
|
const _hoisted_2 = ["onKeydown"];
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import { defineComponent, getCurrentInstance, computed, ref, openBlock, createBlock, unref, withCtx, createVNode, createCommentVNode, createElementVNode, renderSlot, createTextVNode, toDisplayString, nextTick } from "vue";
|
|
1
|
+
import { defineComponent, getCurrentInstance, computed, ref, openBlock, createBlock, unref, mergeProps, withCtx, createVNode, createCommentVNode, createElementVNode, renderSlot, createTextVNode, toDisplayString, nextTick } from "vue";
|
|
2
2
|
import { CollapsibleRoot, CollapsibleTrigger, CollapsibleContent } from "reka-ui";
|
|
3
3
|
import { _ as _sfc_main$1 } from "./LpIcon-CCnX5_2j.js";
|
|
4
|
+
import { useMergedAttrs } from "../composables/useMergedClass.js";
|
|
4
5
|
const _hoisted_1 = { class: "min-w-0 flex-1 text-left" };
|
|
5
6
|
const _hoisted_2 = { class: "grid gap-2.5 px-3 pt-1 pb-3 group-data-[state=open]/content:animate-[disclosure-body-in_300ms_var(--ease-emphasized)] motion-reduce:animate-none" };
|
|
7
|
+
const __default__ = { inheritAttrs: false };
|
|
6
8
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
9
|
+
...__default__,
|
|
7
10
|
__name: "LpDisclosure",
|
|
8
11
|
props: {
|
|
9
12
|
open: { type: Boolean },
|
|
@@ -32,15 +35,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
32
35
|
});
|
|
33
36
|
}
|
|
34
37
|
}
|
|
38
|
+
const { class: rootClass, attrs: rest } = useMergedAttrs(
|
|
39
|
+
"overflow-hidden rounded-control border border-line bg-surface-soft"
|
|
40
|
+
);
|
|
35
41
|
return (_ctx, _cache) => {
|
|
36
|
-
return openBlock(), createBlock(unref(CollapsibleRoot), {
|
|
42
|
+
return openBlock(), createBlock(unref(CollapsibleRoot), mergeProps({
|
|
37
43
|
ref_key: "root",
|
|
38
44
|
ref: root,
|
|
39
45
|
open: rootOpen.value,
|
|
40
46
|
"default-open": __props.defaultOpen,
|
|
41
|
-
class:
|
|
42
|
-
|
|
43
|
-
}, {
|
|
47
|
+
class: unref(rootClass)
|
|
48
|
+
}, unref(rest), { "onUpdate:open": onToggle }), {
|
|
44
49
|
default: withCtx(() => [
|
|
45
50
|
createVNode(unref(CollapsibleTrigger), { class: "group flex w-full items-center gap-2 px-3 py-2.5 text-sm font-semibold text-ink outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring" }, {
|
|
46
51
|
default: withCtx(() => [
|
|
@@ -73,7 +78,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
73
78
|
})
|
|
74
79
|
]),
|
|
75
80
|
_: 3
|
|
76
|
-
},
|
|
81
|
+
}, 16, ["open", "default-open", "class"]);
|
|
77
82
|
};
|
|
78
83
|
}
|
|
79
84
|
});
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { defineComponent, openBlock, createElementBlock, normalizeClass, createVNode, createCommentVNode, createElementVNode, toDisplayString, renderSlot } from "vue";
|
|
1
|
+
import { defineComponent, openBlock, createElementBlock, mergeProps, unref, normalizeClass, createVNode, createCommentVNode, createElementVNode, toDisplayString, renderSlot } from "vue";
|
|
2
2
|
import { _ as _sfc_main$1 } from "./LpIcon-CCnX5_2j.js";
|
|
3
|
+
import { useMergedAttrs } from "../composables/useMergedClass.js";
|
|
3
4
|
const _hoisted_1 = { class: "flex flex-col gap-1" };
|
|
4
5
|
const _hoisted_2 = {
|
|
5
6
|
key: 0,
|
|
@@ -9,7 +10,9 @@ const _hoisted_3 = {
|
|
|
9
10
|
key: 1,
|
|
10
11
|
class: "mt-1"
|
|
11
12
|
};
|
|
13
|
+
const __default__ = { inheritAttrs: false };
|
|
12
14
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
15
|
+
...__default__,
|
|
13
16
|
__name: "LpEmptyState",
|
|
14
17
|
props: {
|
|
15
18
|
icon: {},
|
|
@@ -18,10 +21,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
18
21
|
compact: { type: Boolean }
|
|
19
22
|
},
|
|
20
23
|
setup(__props) {
|
|
24
|
+
const props = __props;
|
|
25
|
+
const { class: rootClass, attrs: rest } = useMergedAttrs(
|
|
26
|
+
() => [
|
|
27
|
+
"flex flex-col items-center px-6 text-center",
|
|
28
|
+
props.compact ? "gap-2 py-6" : "gap-3 py-12"
|
|
29
|
+
].join(" ")
|
|
30
|
+
);
|
|
21
31
|
return (_ctx, _cache) => {
|
|
22
|
-
return openBlock(), createElementBlock("div", {
|
|
23
|
-
class: normalizeClass(["flex flex-col items-center px-6 text-center", __props.compact ? "gap-2 py-6" : "gap-3 py-12"])
|
|
24
|
-
}, [
|
|
32
|
+
return openBlock(), createElementBlock("div", mergeProps({ class: unref(rootClass) }, unref(rest)), [
|
|
25
33
|
__props.icon ? (openBlock(), createElementBlock("div", {
|
|
26
34
|
key: 0,
|
|
27
35
|
class: normalizeClass(["flex items-center justify-center rounded-pill bg-surface-soft text-muted", __props.compact ? "size-9" : "size-12"])
|
|
@@ -40,7 +48,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
40
48
|
_ctx.$slots.default ? (openBlock(), createElementBlock("div", _hoisted_3, [
|
|
41
49
|
renderSlot(_ctx.$slots, "default")
|
|
42
50
|
])) : createCommentVNode("", true)
|
|
43
|
-
],
|
|
51
|
+
], 16);
|
|
44
52
|
};
|
|
45
53
|
}
|
|
46
54
|
});
|
|
@@ -1,22 +1,21 @@
|
|
|
1
|
-
import { defineComponent, ref, watch, computed, openBlock, createElementBlock, Fragment, renderList, normalizeStyle, createBlock, createVNode, withCtx, createElementVNode, renderSlot,
|
|
1
|
+
import { defineComponent, ref, watch, computed, openBlock, createElementBlock, mergeProps, unref, Fragment, renderList, normalizeStyle, createBlock, createVNode, withCtx, createElementVNode, renderSlot, normalizeProps, guardReactiveProps, createTextVNode, toDisplayString, createCommentVNode } from "vue";
|
|
2
2
|
import { computeStats, formatSize, sortNodes, subtreeIds, ancestorIds } from "../components/fileTree.js";
|
|
3
|
-
import { _ as _sfc_main$1 } from "./LpEmptyState-
|
|
4
|
-
import { _ as _sfc_main$3 } from "./LpFileTreeNode-
|
|
3
|
+
import { _ as _sfc_main$1 } from "./LpEmptyState-Dsdqz1Wj.js";
|
|
4
|
+
import { _ as _sfc_main$3 } from "./LpFileTreeNode-DNJUJiiB.js";
|
|
5
5
|
import { _ as _sfc_main$2 } from "./LpScrollArea-D8xyKXcF.js";
|
|
6
|
+
import { useMergedAttrs } from "../composables/useMergedClass.js";
|
|
6
7
|
const _hoisted_1 = {
|
|
7
|
-
key: 0,
|
|
8
|
-
class: "flex h-full w-full min-w-0 flex-col gap-1 overflow-hidden"
|
|
9
|
-
};
|
|
10
|
-
const _hoisted_2 = {
|
|
11
8
|
key: 2,
|
|
12
9
|
class: "flex h-full w-full min-w-0 flex-col"
|
|
13
10
|
};
|
|
14
|
-
const
|
|
15
|
-
const
|
|
11
|
+
const _hoisted_2 = ["aria-multiselectable"];
|
|
12
|
+
const _hoisted_3 = {
|
|
16
13
|
key: 0,
|
|
17
14
|
class: "shrink-0 border-t border-line px-2 py-1.5 text-xs text-muted"
|
|
18
15
|
};
|
|
16
|
+
const __default__ = { inheritAttrs: false };
|
|
19
17
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
18
|
+
...__default__,
|
|
20
19
|
__name: "LpFileTree",
|
|
21
20
|
props: {
|
|
22
21
|
nodes: {},
|
|
@@ -316,8 +315,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
316
315
|
setExpanded(/* @__PURE__ */ new Set());
|
|
317
316
|
}
|
|
318
317
|
__expose({ reveal, expandAll, collapseAll, checkAll, clearChecked, summary });
|
|
318
|
+
const { class: rootClass, attrs: rest } = useMergedAttrs(
|
|
319
|
+
"flex h-full w-full min-w-0 flex-col gap-1 overflow-hidden"
|
|
320
|
+
);
|
|
319
321
|
return (_ctx, _cache) => {
|
|
320
|
-
return __props.loading ? (openBlock(), createElementBlock("div",
|
|
322
|
+
return __props.loading ? (openBlock(), createElementBlock("div", mergeProps({
|
|
323
|
+
key: 0,
|
|
324
|
+
class: unref(rootClass)
|
|
325
|
+
}, unref(rest)), [
|
|
321
326
|
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.skeletonRows, (n) => {
|
|
322
327
|
return openBlock(), createElementBlock("div", {
|
|
323
328
|
key: n,
|
|
@@ -325,12 +330,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
325
330
|
style: normalizeStyle({ marginLeft: `${n % 3 * 14}px` })
|
|
326
331
|
}, null, 4);
|
|
327
332
|
}), 128))
|
|
328
|
-
])) : !roots.value.length ? (openBlock(), createBlock(_sfc_main$1, {
|
|
333
|
+
], 16)) : !roots.value.length ? (openBlock(), createBlock(_sfc_main$1, {
|
|
329
334
|
key: 1,
|
|
330
335
|
icon: "lucide:folder-search",
|
|
331
336
|
title: __props.emptyLabel,
|
|
332
337
|
description: __props.emptyDescription
|
|
333
|
-
}, null, 8, ["title", "description"])) : (openBlock(), createElementBlock("div",
|
|
338
|
+
}, null, 8, ["title", "description"])) : (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
334
339
|
createVNode(_sfc_main$2, { class: "min-h-0 w-full min-w-0 flex-1" }, {
|
|
335
340
|
default: withCtx(() => [
|
|
336
341
|
createElementVNode("ul", {
|
|
@@ -368,11 +373,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
368
373
|
_: 3
|
|
369
374
|
}, 8, ["node", "expanded", "loading", "selected-id", "focused-id", "sort", "icon-size", "checkable", "checked", "stats", "show-size", "show-modified"]);
|
|
370
375
|
}), 128))
|
|
371
|
-
], 40,
|
|
376
|
+
], 40, _hoisted_2)
|
|
372
377
|
]),
|
|
373
378
|
_: 3
|
|
374
379
|
}),
|
|
375
|
-
__props.checkable && (_ctx.$slots.summary || summary.value.files || summary.value.dirs) ? (openBlock(), createElementBlock("div",
|
|
380
|
+
__props.checkable && (_ctx.$slots.summary || summary.value.files || summary.value.dirs) ? (openBlock(), createElementBlock("div", _hoisted_3, [
|
|
376
381
|
renderSlot(_ctx.$slots, "summary", normalizeProps(guardReactiveProps(summary.value)), () => [
|
|
377
382
|
createTextVNode(toDisplayString(summary.value.files) + " " + toDisplayString(summary.value.files === 1 ? "file" : "files"), 1),
|
|
378
383
|
summary.value.dirs ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { defineComponent, computed, resolveComponent, openBlock, createElementBlock, createVNode, withCtx, createElementVNode, withModifiers, normalizeStyle, normalizeClass, createBlock, createCommentVNode,
|
|
1
|
+
import { defineComponent, computed, resolveComponent, openBlock, createElementBlock, mergeProps, unref, createVNode, withCtx, createElementVNode, withModifiers, normalizeStyle, normalizeClass, createBlock, createCommentVNode, renderSlot, createTextVNode, toDisplayString, Transition, Fragment, renderList } from "vue";
|
|
2
2
|
import { prefersReducedMotion, easingToken } from "../composables/easing.js";
|
|
3
3
|
import { sortNodes, formatSize, formatModified, fileIcon } from "../components/fileTree.js";
|
|
4
|
-
import { _ as _sfc_main$3 } from "./LpCheckbox-
|
|
4
|
+
import { _ as _sfc_main$3 } from "./LpCheckbox-CVccKYaH.js";
|
|
5
5
|
import { _ as _sfc_main$1 } from "./LpContextMenu-B6WBLleS.js";
|
|
6
6
|
import { _ as _sfc_main$2 } from "./LpIcon-CCnX5_2j.js";
|
|
7
|
+
import { useMergedAttrs } from "../composables/useMergedClass.js";
|
|
7
8
|
const _hoisted_1 = ["aria-level", "aria-selected", "aria-expanded", "aria-disabled"];
|
|
8
9
|
const _hoisted_2 = ["data-node-id", "tabindex"];
|
|
9
10
|
const _hoisted_3 = { class: "min-w-0 flex-1 shrink-[2] truncate" };
|
|
@@ -28,7 +29,9 @@ const _hoisted_8 = {
|
|
|
28
29
|
role: "group",
|
|
29
30
|
class: "flex min-w-0 flex-col overflow-hidden"
|
|
30
31
|
};
|
|
32
|
+
const __default__ = { inheritAttrs: false };
|
|
31
33
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
34
|
+
...__default__,
|
|
32
35
|
__name: "LpFileTreeNode",
|
|
33
36
|
props: {
|
|
34
37
|
node: {},
|
|
@@ -108,16 +111,20 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
108
111
|
emit("select", props.node);
|
|
109
112
|
if (isDir.value) emit("toggle", props.node);
|
|
110
113
|
}
|
|
114
|
+
const { class: rootClass, attrs: rest } = useMergedAttrs(
|
|
115
|
+
"min-w-0"
|
|
116
|
+
);
|
|
111
117
|
return (_ctx, _cache) => {
|
|
112
118
|
const _component_LpFileTreeNode = resolveComponent("LpFileTreeNode", true);
|
|
113
|
-
return openBlock(), createElementBlock("li", {
|
|
119
|
+
return openBlock(), createElementBlock("li", mergeProps({
|
|
114
120
|
role: "treeitem",
|
|
115
|
-
class:
|
|
121
|
+
class: unref(rootClass)
|
|
122
|
+
}, unref(rest), {
|
|
116
123
|
"aria-level": __props.depth + 1,
|
|
117
124
|
"aria-selected": isSelected.value,
|
|
118
125
|
"aria-expanded": canExpand.value ? isOpen.value : void 0,
|
|
119
126
|
"aria-disabled": __props.node.disabled || void 0
|
|
120
|
-
}, [
|
|
127
|
+
}), [
|
|
121
128
|
createVNode(_sfc_main$1, {
|
|
122
129
|
items: __props.node.menu ?? []
|
|
123
130
|
}, {
|
|
@@ -221,7 +228,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
221
228
|
]),
|
|
222
229
|
_: 3
|
|
223
230
|
})
|
|
224
|
-
],
|
|
231
|
+
], 16, _hoisted_1);
|
|
225
232
|
};
|
|
226
233
|
}
|
|
227
234
|
});
|
|
@@ -1,20 +1,22 @@
|
|
|
1
|
-
import { defineComponent, useId, openBlock, createElementBlock,
|
|
1
|
+
import { defineComponent, useId, openBlock, createElementBlock, mergeProps, unref, createBlock, withCtx, createTextVNode, toDisplayString, createCommentVNode, renderSlot, createVNode } from "vue";
|
|
2
2
|
import { Label } from "reka-ui";
|
|
3
3
|
import { _ as _sfc_main$1 } from "./LpShift-DXNsauQZ.js";
|
|
4
|
-
|
|
5
|
-
const
|
|
4
|
+
import { useMergedAttrs } from "../composables/useMergedClass.js";
|
|
5
|
+
const _hoisted_1 = {
|
|
6
6
|
key: 0,
|
|
7
7
|
class: "text-danger"
|
|
8
8
|
};
|
|
9
|
-
const
|
|
9
|
+
const _hoisted_2 = {
|
|
10
10
|
key: 0,
|
|
11
11
|
class: "pt-1.5 text-xs text-danger"
|
|
12
12
|
};
|
|
13
|
-
const
|
|
13
|
+
const _hoisted_3 = {
|
|
14
14
|
key: 1,
|
|
15
15
|
class: "pt-1.5 text-xs text-muted"
|
|
16
16
|
};
|
|
17
|
+
const __default__ = { inheritAttrs: false };
|
|
17
18
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
19
|
+
...__default__,
|
|
18
20
|
__name: "LpFormField",
|
|
19
21
|
props: {
|
|
20
22
|
label: {},
|
|
@@ -24,8 +26,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
24
26
|
},
|
|
25
27
|
setup(__props) {
|
|
26
28
|
const id = useId();
|
|
29
|
+
const { class: rootClass, attrs: rest } = useMergedAttrs(
|
|
30
|
+
"flex min-w-0 flex-col gap-1.5"
|
|
31
|
+
);
|
|
27
32
|
return (_ctx, _cache) => {
|
|
28
|
-
return openBlock(), createElementBlock("div",
|
|
33
|
+
return openBlock(), createElementBlock("div", mergeProps({ class: unref(rootClass) }, unref(rest)), [
|
|
29
34
|
__props.label ? (openBlock(), createBlock(unref(Label), {
|
|
30
35
|
key: 0,
|
|
31
36
|
for: unref(id),
|
|
@@ -33,14 +38,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
33
38
|
}, {
|
|
34
39
|
default: withCtx(() => [
|
|
35
40
|
createTextVNode(toDisplayString(__props.label) + " ", 1),
|
|
36
|
-
__props.required ? (openBlock(), createElementBlock("span",
|
|
41
|
+
__props.required ? (openBlock(), createElementBlock("span", _hoisted_1, "*")) : createCommentVNode("", true)
|
|
37
42
|
]),
|
|
38
43
|
_: 1
|
|
39
44
|
}, 8, ["for"])) : createCommentVNode("", true),
|
|
40
45
|
renderSlot(_ctx.$slots, "default", { id: unref(id) }),
|
|
41
46
|
createVNode(_sfc_main$1, { axis: "height" }, {
|
|
42
47
|
default: withCtx(() => [
|
|
43
|
-
__props.error ? (openBlock(), createElementBlock("p",
|
|
48
|
+
__props.error ? (openBlock(), createElementBlock("p", _hoisted_2, toDisplayString(__props.error), 1)) : __props.hint || _ctx.$slots.hint ? (openBlock(), createElementBlock("p", _hoisted_3, [
|
|
44
49
|
renderSlot(_ctx.$slots, "hint", {}, () => [
|
|
45
50
|
createTextVNode(toDisplayString(__props.hint), 1)
|
|
46
51
|
])
|
|
@@ -48,7 +53,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
48
53
|
]),
|
|
49
54
|
_: 3
|
|
50
55
|
})
|
|
51
|
-
]);
|
|
56
|
+
], 16);
|
|
52
57
|
};
|
|
53
58
|
}
|
|
54
59
|
});
|
|
@@ -2,7 +2,7 @@ import { defineComponent, computed, useSlots, useAttrs, ref, openBlock, createBl
|
|
|
2
2
|
import { tv } from "tailwind-variants";
|
|
3
3
|
import { useInputFilter } from "../composables/useInputFilter.js";
|
|
4
4
|
import { mergeClass } from "../composables/useMergedClass.js";
|
|
5
|
-
import { _ as _sfc_main$1 } from "./LpFormField-
|
|
5
|
+
import { _ as _sfc_main$1 } from "./LpFormField-CazBc2-a.js";
|
|
6
6
|
import { _ as _sfc_main$2 } from "./LpIcon-CCnX5_2j.js";
|
|
7
7
|
const _hoisted_1 = {
|
|
8
8
|
key: 0,
|
|
@@ -35,6 +35,7 @@ const _hoisted_12 = {
|
|
|
35
35
|
};
|
|
36
36
|
const _hoisted_13 = ["data-index", "aria-label", "onClick"];
|
|
37
37
|
const _hoisted_14 = ["src", "alt"];
|
|
38
|
+
const WHEEL_STEP = 60;
|
|
38
39
|
const BTN = "flex size-9 items-center justify-center rounded-control text-white/80 outline-none transition-colors duration-[var(--duration-fast)] hover:bg-white/15 hover:text-white focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-40";
|
|
39
40
|
const ARROW = "absolute top-1/2 z-10 flex size-11 -translate-y-1/2 items-center justify-center rounded-pill bg-black/45 text-white/90 outline-none backdrop-blur-sm transition-[background-color,scale] duration-[var(--duration-fast)] hover:bg-black/65 hover:scale-105 focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-0";
|
|
40
41
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
@@ -79,6 +80,29 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
79
80
|
}
|
|
80
81
|
const canPrev = computed(() => total.value > 1 && (props.loop || current.value > 0));
|
|
81
82
|
const canNext = computed(() => total.value > 1 && (props.loop || current.value < total.value - 1));
|
|
83
|
+
const wheelAccum = ref(0);
|
|
84
|
+
let wheelTimer;
|
|
85
|
+
function onStageWheel(e) {
|
|
86
|
+
const overImage = e.target?.closest("[data-lightbox-image]");
|
|
87
|
+
if (overImage || isZoomed.value) {
|
|
88
|
+
zoom.onWheel(e);
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
if (total.value < 2) return;
|
|
92
|
+
e.preventDefault();
|
|
93
|
+
wheelAccum.value += e.deltaY;
|
|
94
|
+
clearTimeout(wheelTimer);
|
|
95
|
+
wheelTimer = setTimeout(() => wheelAccum.value = 0, 200);
|
|
96
|
+
while (Math.abs(wheelAccum.value) >= WHEEL_STEP) {
|
|
97
|
+
const dir = wheelAccum.value > 0 ? 1 : -1;
|
|
98
|
+
wheelAccum.value -= dir * WHEEL_STEP;
|
|
99
|
+
if (dir > 0 ? !canNext.value : !canPrev.value) {
|
|
100
|
+
wheelAccum.value = 0;
|
|
101
|
+
break;
|
|
102
|
+
}
|
|
103
|
+
go(current.value + dir);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
82
106
|
watch(
|
|
83
107
|
() => [current.value, props.open],
|
|
84
108
|
() => {
|
|
@@ -205,7 +229,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
205
229
|
return (_ctx, _cache) => {
|
|
206
230
|
return openBlock(), createBlock(unref(DialogRoot), {
|
|
207
231
|
open: __props.open,
|
|
208
|
-
"onUpdate:open": _cache[
|
|
232
|
+
"onUpdate:open": _cache[8] || (_cache[8] = (v) => emit("update:open", v))
|
|
209
233
|
}, {
|
|
210
234
|
default: withCtx(() => [
|
|
211
235
|
createVNode(unref(DialogPortal), null, {
|
|
@@ -311,13 +335,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
311
335
|
ref_key: "viewport",
|
|
312
336
|
ref: viewport,
|
|
313
337
|
class: normalizeClass(["relative flex min-h-0 flex-1 items-center justify-center overflow-hidden", isPanning.value ? "cursor-grabbing" : isZoomed.value ? "cursor-grab" : ""]),
|
|
314
|
-
onWheel:
|
|
315
|
-
(...args) => unref(zoom).onWheel && unref(zoom).onWheel(...args)),
|
|
338
|
+
onWheel: onStageWheel,
|
|
316
339
|
onPointerdown: onPointerDown,
|
|
317
|
-
onPointermove: _cache[
|
|
340
|
+
onPointermove: _cache[6] || (_cache[6] = //@ts-ignore
|
|
318
341
|
(...args) => unref(zoom).onPointerMove && unref(zoom).onPointerMove(...args)),
|
|
319
342
|
onPointerup: onPointerUp,
|
|
320
|
-
onPointercancel: _cache[
|
|
343
|
+
onPointercancel: _cache[7] || (_cache[7] = //@ts-ignore
|
|
321
344
|
(...args) => unref(zoom).onPointerUp && unref(zoom).onPointerUp(...args)),
|
|
322
345
|
onDblclick: onDoubleClick,
|
|
323
346
|
onClick: onViewportClick
|
|
@@ -339,7 +362,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
339
362
|
name: "lucide:image-off",
|
|
340
363
|
size: 40
|
|
341
364
|
}),
|
|
342
|
-
_cache[
|
|
365
|
+
_cache[9] || (_cache[9] = createElementVNode("p", { class: "text-sm" }, "This image couldn't be loaded.", -1))
|
|
343
366
|
])) : item.value ? (openBlock(), createElementBlock("img", {
|
|
344
367
|
key: item.value.src,
|
|
345
368
|
"data-lightbox-image": "",
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { defineComponent, computed, openBlock, createBlock, resolveDynamicComponent,
|
|
2
|
-
|
|
1
|
+
import { defineComponent, computed, openBlock, createBlock, resolveDynamicComponent, mergeProps, unref, withCtx, renderSlot } from "vue";
|
|
2
|
+
import { useMergedAttrs } from "../composables/useMergedClass.js";
|
|
3
|
+
const __default__ = { inheritAttrs: false };
|
|
3
4
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
|
+
...__default__,
|
|
4
6
|
__name: "LpLink",
|
|
5
7
|
props: {
|
|
6
8
|
href: {},
|
|
@@ -29,6 +31,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
29
31
|
return "text-brand hover:text-brand-hover";
|
|
30
32
|
}
|
|
31
33
|
});
|
|
34
|
+
const REVEAL_BASE = "relative after:absolute after:inset-x-0 after:-bottom-0.5 after:h-px after:origin-left after:scale-x-0 after:bg-current after:transition-transform after:duration-[var(--duration-medium)] after:ease-[var(--ease-emphasized)] motion-reduce:after:transition-none";
|
|
32
35
|
const REVEAL_TRIGGER = {
|
|
33
36
|
self: "hover:after:scale-x-100 focus-visible:after:scale-x-100",
|
|
34
37
|
group: "group-hover:after:scale-x-100 group-focus-visible:after:scale-x-100 focus-visible:after:scale-x-100"
|
|
@@ -36,21 +39,25 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
36
39
|
const revealClass = computed(
|
|
37
40
|
() => `${REVEAL_BASE} ${REVEAL_TRIGGER[props.revealOn]}`
|
|
38
41
|
);
|
|
42
|
+
const { class: rootClass, attrs: rest } = useMergedAttrs(
|
|
43
|
+
() => [
|
|
44
|
+
"inline-flex items-center gap-1 underline-offset-2 outline-none transition-colors focus-visible:ring-2 focus-visible:ring-ring",
|
|
45
|
+
colorClass.value,
|
|
46
|
+
props.variant === "reveal" ? revealClass.value : props.variant === "underline" ? "underline decoration-current/40 hover:decoration-current" : "hover:underline"
|
|
47
|
+
].join(" ")
|
|
48
|
+
);
|
|
39
49
|
return (_ctx, _cache) => {
|
|
40
|
-
return openBlock(), createBlock(resolveDynamicComponent(__props.as), {
|
|
50
|
+
return openBlock(), createBlock(resolveDynamicComponent(__props.as), mergeProps({
|
|
41
51
|
href: isAnchor.value ? __props.href : void 0,
|
|
42
52
|
target: target.value,
|
|
43
53
|
rel: rel.value,
|
|
44
|
-
class:
|
|
45
|
-
|
|
46
|
-
__props.variant === "reveal" ? revealClass.value : __props.variant === "underline" ? "underline decoration-current/40 hover:decoration-current" : "hover:underline"
|
|
47
|
-
]])
|
|
48
|
-
}, {
|
|
54
|
+
class: unref(rootClass)
|
|
55
|
+
}, unref(rest)), {
|
|
49
56
|
default: withCtx(() => [
|
|
50
57
|
renderSlot(_ctx.$slots, "default")
|
|
51
58
|
]),
|
|
52
59
|
_: 3
|
|
53
|
-
},
|
|
60
|
+
}, 16, ["href", "target", "rel", "class"]);
|
|
54
61
|
};
|
|
55
62
|
}
|
|
56
63
|
});
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { defineComponent, ref, shallowRef, computed, onMounted, onBeforeUnmount, watch, nextTick, openBlock, createElementBlock,
|
|
1
|
+
import { defineComponent, ref, shallowRef, computed, onMounted, onBeforeUnmount, watch, nextTick, openBlock, createElementBlock, mergeProps, unref, createVNode, Transition, withCtx, toDisplayString, createCommentVNode, normalizeStyle, createElementVNode, Fragment, createBlock, resolveDynamicComponent, TransitionGroup, renderList, normalizeClass, createTextVNode } from "vue";
|
|
2
2
|
import { prefersReducedMotion } from "../composables/easing.js";
|
|
3
3
|
import { useClipboard } from "../composables/useClipboard.js";
|
|
4
4
|
import { useHotkeys } from "../composables/useHotkeys.js";
|
|
5
5
|
import { _ as _sfc_main$3 } from "./LpContextMenu-B6WBLleS.js";
|
|
6
6
|
import { _ as _sfc_main$2 } from "./LpIcon-CCnX5_2j.js";
|
|
7
7
|
import { _ as _sfc_main$1 } from "./LpScrollArea-D8xyKXcF.js";
|
|
8
|
+
import { useMergedAttrs } from "../composables/useMergedClass.js";
|
|
8
9
|
const _hoisted_1 = {
|
|
9
10
|
key: 0,
|
|
10
11
|
class: "pointer-events-none absolute top-2 left-1/2 z-10 -translate-x-1/2 rounded-pill bg-brand px-2.5 py-1 text-[11px] font-medium text-ink-inverse"
|
|
@@ -44,12 +45,9 @@ const _hoisted_12 = {
|
|
|
44
45
|
key: 0,
|
|
45
46
|
class: "absolute inset-x-0 bottom-3 flex justify-center"
|
|
46
47
|
};
|
|
47
|
-
const
|
|
48
|
-
const VIRTUALISE_ABOVE = 200;
|
|
49
|
-
const OVERSCAN = 12;
|
|
50
|
-
const NEAR = 120;
|
|
51
|
-
const TOP_NEAR = 80;
|
|
48
|
+
const __default__ = { inheritAttrs: false };
|
|
52
49
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
50
|
+
...__default__,
|
|
53
51
|
__name: "LpLogViewer",
|
|
54
52
|
props: {
|
|
55
53
|
lines: {},
|
|
@@ -270,6 +268,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
270
268
|
}
|
|
271
269
|
return parts;
|
|
272
270
|
}
|
|
271
|
+
const ROW_HEIGHT = 20;
|
|
272
|
+
const VIRTUALISE_ABOVE = 200;
|
|
273
|
+
const OVERSCAN = 12;
|
|
273
274
|
const virtualise = computed(() => !props.wrap && visibleLines.value.length > VIRTUALISE_ABOVE);
|
|
274
275
|
const viewportHeight = ref(0);
|
|
275
276
|
const scrollTop = ref(0);
|
|
@@ -294,12 +295,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
294
295
|
);
|
|
295
296
|
const scrollRef = ref(null);
|
|
296
297
|
const pinned = ref(true);
|
|
298
|
+
const NEAR = 120;
|
|
297
299
|
function viewport() {
|
|
298
300
|
return scrollRef.value?.viewportEl ?? null;
|
|
299
301
|
}
|
|
300
302
|
function atBottom(el) {
|
|
301
303
|
return el.scrollHeight - el.scrollTop - el.clientHeight <= NEAR;
|
|
302
304
|
}
|
|
305
|
+
const TOP_NEAR = 80;
|
|
303
306
|
let topArmed = true;
|
|
304
307
|
function onScroll(e) {
|
|
305
308
|
const el = e.target;
|
|
@@ -386,15 +389,22 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
386
389
|
"leave-to-class": "max-h-0 -translate-y-1 opacity-0",
|
|
387
390
|
"move-class": "transition-transform duration-200 ease-[var(--ease-emphasized)]"
|
|
388
391
|
};
|
|
392
|
+
const { class: rootClass, attrs: rest } = useMergedAttrs(
|
|
393
|
+
() => [
|
|
394
|
+
"relative overflow-hidden rounded-card border border-line bg-surface font-mono text-xs leading-relaxed",
|
|
395
|
+
frozen.value ? "ring-1 ring-brand" : ""
|
|
396
|
+
].join(" ")
|
|
397
|
+
);
|
|
389
398
|
return (_ctx, _cache) => {
|
|
390
|
-
return openBlock(), createElementBlock("div", {
|
|
399
|
+
return openBlock(), createElementBlock("div", mergeProps({
|
|
391
400
|
ref_key: "root",
|
|
392
401
|
ref: root,
|
|
393
402
|
tabindex: "-1",
|
|
394
|
-
class:
|
|
403
|
+
class: unref(rootClass)
|
|
404
|
+
}, unref(rest), {
|
|
395
405
|
onPointerenter: _cache[0] || (_cache[0] = ($event) => hovered.value = true),
|
|
396
406
|
onPointerleave: _cache[1] || (_cache[1] = ($event) => hovered.value = false)
|
|
397
|
-
}, [
|
|
407
|
+
}), [
|
|
398
408
|
createVNode(Transition, {
|
|
399
409
|
"enter-active-class": "transition duration-[var(--duration-fast)] ease-[var(--ease-emphasized)] motion-reduce:transition-none",
|
|
400
410
|
"leave-active-class": "transition duration-[var(--duration-fast)] ease-[var(--ease-emphasized)] motion-reduce:transition-none",
|
|
@@ -529,7 +539,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
529
539
|
]),
|
|
530
540
|
_: 1
|
|
531
541
|
})
|
|
532
|
-
],
|
|
542
|
+
], 16);
|
|
533
543
|
};
|
|
534
544
|
}
|
|
535
545
|
});
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { defineComponent, computed, ref, watch, onMounted, onBeforeUnmount, openBlock, createElementBlock,
|
|
1
|
+
import { defineComponent, computed, ref, watch, onMounted, onBeforeUnmount, openBlock, createElementBlock, mergeProps, unref, createElementVNode, normalizeClass, Fragment, renderList, normalizeStyle, createVNode, createCommentVNode, createBlock, toDisplayString } from "vue";
|
|
2
2
|
import { prefersReducedMotion } from "../composables/easing.js";
|
|
3
3
|
import { OSM_TILES, project, tileUrl, unproject } from "../components/address.js";
|
|
4
4
|
import { _ as _sfc_main$1 } from "./LpIcon-CCnX5_2j.js";
|
|
5
|
+
import { useMergedAttrs } from "../composables/useMergedClass.js";
|
|
5
6
|
const _hoisted_1 = ["tabindex", "aria-label"];
|
|
6
7
|
const _hoisted_2 = ["src", "onLoad"];
|
|
7
8
|
const _hoisted_3 = { class: "absolute right-2 top-2 flex flex-col gap-1.5" };
|
|
@@ -13,10 +14,9 @@ const _hoisted_8 = {
|
|
|
13
14
|
key: 1,
|
|
14
15
|
class: "pointer-events-none absolute bottom-0 right-0 rounded-tl-control bg-black/45 px-1.5 py-0.5 text-[10px] text-white/75 backdrop-blur-sm"
|
|
15
16
|
};
|
|
16
|
-
const
|
|
17
|
-
const ZOOM_MS = 220;
|
|
18
|
-
const CONTROL = "flex size-8 items-center justify-center rounded-control bg-black/45 text-white/90 outline-none backdrop-blur-sm transition-[background-color,scale] duration-[var(--duration-fast)] hover:bg-black/65 hover:scale-105 focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-40";
|
|
17
|
+
const __default__ = { inheritAttrs: false };
|
|
19
18
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
19
|
+
...__default__,
|
|
20
20
|
__name: "LpMapPicker",
|
|
21
21
|
props: {
|
|
22
22
|
modelValue: {},
|
|
@@ -35,6 +35,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
35
35
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
36
36
|
const props = __props;
|
|
37
37
|
const emit = __emit;
|
|
38
|
+
const PAN_STEP = 80;
|
|
39
|
+
const ZOOM_MS = 220;
|
|
38
40
|
const seenTiles = /* @__PURE__ */ new Set();
|
|
39
41
|
const tileSize = computed(() => props.tiles.tileSize ?? 256);
|
|
40
42
|
const minZoom = computed(() => props.tiles.minZoom ?? 1);
|
|
@@ -379,11 +381,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
379
381
|
stopGlide();
|
|
380
382
|
});
|
|
381
383
|
__expose({ zoomIn: () => zoomBy(1), zoomOut: () => zoomBy(-1), recentre, locate });
|
|
384
|
+
const CONTROL = "flex size-8 items-center justify-center rounded-control bg-black/45 text-white/90 outline-none backdrop-blur-sm transition-[background-color,scale] duration-[var(--duration-fast)] hover:bg-black/65 hover:scale-105 focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-40";
|
|
385
|
+
const { class: rootClass, attrs: rest } = useMergedAttrs(
|
|
386
|
+
"relative overflow-hidden rounded-control border border-line bg-surface-soft"
|
|
387
|
+
);
|
|
382
388
|
return (_ctx, _cache) => {
|
|
383
|
-
return openBlock(), createElementBlock("div", {
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
}, [
|
|
389
|
+
return openBlock(), createElementBlock("div", mergeProps({ class: unref(rootClass) }, unref(rest), {
|
|
390
|
+
style: { height: __props.height }
|
|
391
|
+
}), [
|
|
387
392
|
createElementVNode("div", {
|
|
388
393
|
ref_key: "viewport",
|
|
389
394
|
ref: viewport,
|
|
@@ -498,7 +503,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
498
503
|
class: "pointer-events-none absolute left-2 top-2 animate-spin text-white/70 drop-shadow-[0_1px_2px_rgba(0,0,0,0.6)]"
|
|
499
504
|
})) : createCommentVNode("", true),
|
|
500
505
|
props.tiles.attribution ? (openBlock(), createElementBlock("p", _hoisted_8, toDisplayString(props.tiles.attribution), 1)) : createCommentVNode("", true)
|
|
501
|
-
],
|
|
506
|
+
], 16);
|
|
502
507
|
};
|
|
503
508
|
}
|
|
504
509
|
});
|