@leavepulse/ui 0.73.0 → 0.73.6
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/{LpCommandPalette-Rtbg669l.css → LpCommandPalette-DOIZHw-g.css} +19 -19
- package/dist/chunks/{DropzoneLinkField-C-9BCGJn.js → DropzoneLinkField-ppY9xalk.js} +2 -2
- package/dist/chunks/{FieldWrapper-CORPzo9s.js → FieldWrapper-y5bKBNxA.js} +1 -1
- package/dist/chunks/{LpActionBar-BP1ld7-S.js → LpActionBar-B55msXTr.js} +2 -2
- package/dist/chunks/{LpAddressInput-Al3HT5ey.js → LpAddressInput-mf_dEpj_.js} +3 -3
- package/dist/chunks/{LpAlert-n5XPAZfv.js → LpAlert-Cg7oIx1B.js} +2 -2
- package/dist/chunks/{LpAppShell-rr5kqiK3.js → LpAppShell-B0Yu9MVs.js} +4 -4
- package/dist/chunks/{LpBadge-wUYLN4U9.js → LpBadge-0A6sPks3.js} +1 -1
- package/dist/chunks/{LpBottomNav-CbNQQPuL.js → LpBottomNav-Dik-ZcHv.js} +1 -1
- package/dist/chunks/{LpBreadcrumbs-DPdbth-c.js → LpBreadcrumbs-ssZV3_od.js} +1 -1
- package/dist/chunks/{LpButton-CFb44IjC.js → LpButton-BgdewXxF.js} +1 -1
- package/dist/chunks/{LpCard-r13WRqox.js → LpCard-BJ59q6hR.js} +1 -1
- package/dist/chunks/{LpCheckbox-Cs4SHaHX.js → LpCheckbox-B0kJ-t6T.js} +1 -1
- package/dist/chunks/{LpCodeBlock-DRC8VbXW.js → LpCodeBlock-CXR_7t_F.js} +1 -1
- package/dist/chunks/{LpCodeDisplay-CE9TxCA4.js → LpCodeDisplay-BCghfBFC.js} +4 -4
- package/dist/chunks/{LpConfirmDialog-DY2VjDji.js → LpConfirmDialog-CaA4pAre.js} +1 -1
- package/dist/chunks/{LpConfirmHost-DvSZTJ4N.js → LpConfirmHost-CBIzALSL.js} +1 -1
- package/dist/chunks/{LpCopyButton-xF7wFVoU.js → LpCopyButton-Cw-lF7Q3.js} +1 -1
- package/dist/chunks/{LpCountdown-DgeY3cLG.js → LpCountdown-BNNhnQAK.js} +1 -1
- package/dist/chunks/{LpDataList-Jxyl9H5w.js → LpDataList-CcAA-rD9.js} +1 -1
- package/dist/chunks/{LpEditable-Cy6GLbFx.js → LpEditable-CSuJIPbG.js} +2 -2
- package/dist/chunks/{LpFileTree-zIFEgo3I.js → LpFileTree-CxOh3rL2.js} +1 -1
- package/dist/chunks/{LpFileTreeNode-cT6BIWvz.js → LpFileTreeNode-9ue2P7ER.js} +3 -3
- package/dist/chunks/{LpFormField-Ch69Jd-X.js → LpFormField-BBFg8i2I.js} +1 -1
- package/dist/chunks/{LpHintLayer-CgObdUsM.js → LpHintLayer-Db_s9_DL.js} +2 -2
- package/dist/chunks/{LpHints-Bz-BlaSl.js → LpHints-Cxf5GXsx.js} +3 -3
- package/dist/chunks/{LpInfraNode-46XOCkfq.js → LpInfraNode-6NLxkAnr.js} +2 -2
- package/dist/chunks/{LpInput-Tw-yxT4I.js → LpInput-B2dTt4pc.js} +1 -1
- package/dist/chunks/{LpLightbox-B95yu22B.js → LpLightbox-Coe4OBUl.js} +2 -2
- package/dist/chunks/{LpLoader-DVwkOmt9.js → LpLoader-DPTNhqLu.js} +1 -1
- package/dist/chunks/{LpLogViewer-D25jM2_I.js → LpLogViewer-DxiR6Mbd.js} +3 -3
- package/dist/chunks/{LpMapPicker-DRGgh89B.js → LpMapPicker-DeJRMfFN.js} +1 -1
- package/dist/chunks/{LpMediaGallery-Bkram-MO.js → LpMediaGallery-B7Km8N9l.js} +1 -1
- package/dist/chunks/{LpModalNav-DQpV2kdn.js → LpModalNav-BmxEyqOx.js} +2 -2
- package/dist/chunks/{LpNotificationBell-3244LUVc.js → LpNotificationBell-u8-ZjRON.js} +3 -3
- package/dist/chunks/{LpPaletteTheme-DiLYKQiZ.js → LpPaletteTheme-CWAIjBCi.js} +3 -3
- package/dist/chunks/{LpPasswordInput-BkHKQDhM.js → LpPasswordInput-Ih7Lv43S.js} +2 -2
- package/dist/chunks/{LpPie-DrZepi0p.js → LpPie-Idujdb3M.js} +2 -2
- package/dist/chunks/{LpPipeline-B3aOVOkV.js → LpPipeline-QCZWWB0G.js} +2 -2
- package/dist/chunks/{LpRepeater-D7ZmnIYd.js → LpRepeater-DghUJ3bc.js} +2 -2
- package/dist/chunks/{LpScramble-Bn9OoOtC.js → LpScramble-DeT_D36q.js} +1 -1
- package/dist/chunks/{LpSecretField-BbmqM9ye.js → LpSecretField-osKPNdNT.js} +6 -6
- package/dist/chunks/{LpShift-CCq7dofl.js → LpShift-kKUeG9NS.js} +4 -2
- package/dist/chunks/{LpSidebar-BoNLKgh-.js → LpSidebar-CR_WKcn2.js} +2 -2
- package/dist/chunks/{LpSidebarNav-Bky8chrv.js → LpSidebarNav-h3YunOAr.js} +2 -2
- package/dist/chunks/{LpSidebarRow-BRYhNDSo.js → LpSidebarRow-SjV0Ouhq.js} +1 -1
- package/dist/chunks/{LpStat-BVf2UvEc.js → LpStat-DXqKD1h5.js} +34 -18
- package/dist/chunks/{LpStatus-DglxttQ7.js → LpStatus-DfZREVe0.js} +2 -2
- package/dist/chunks/{LpStepMark-DpzKVyh8.js → LpStepMark-TaAyuNsH.js} +1 -1
- package/dist/chunks/{LpStepper-DpsocBNJ.js → LpStepper-CKSTFzHE.js} +1 -1
- package/dist/chunks/{LpSwap-C96c0LWh.js → LpSwap-KIS24N8W.js} +1 -1
- package/dist/chunks/{LpSwitch-BnXd1llc.js → LpSwitch-DlZHmj-M.js} +1 -1
- package/dist/chunks/{LpTabFace-DPCwKkH2.js → LpTabFace-JFJLW0kA.js} +1 -1
- package/dist/chunks/{LpTableFilter-CiVBpaq0.js → LpTableFilter-47ANnx_a.js} +3 -3
- package/dist/chunks/{LpTagsInput-C-mDG648.js → LpTagsInput-CHoiid8u.js} +2 -2
- package/dist/chunks/{LpTextarea-TE-yZv2U.js → LpTextarea-CU7C1pLO.js} +1 -1
- package/dist/chunks/{LpThemeStudio-BpORDvH6.js → LpThemeStudio-zyOH3dF2.js} +2 -2
- package/dist/chunks/{LpThemeSwitcher-BnEn_mvf.js → LpThemeSwitcher-BXJhQYGD.js} +2 -2
- package/dist/chunks/{LpToaster-IwTXjbbU.js → LpToaster-C1D35SKk.js} +1 -1
- package/dist/chunks/{LpTopologyCanvas-B1gIbS0n.js → LpTopologyCanvas-1OufbBtQ.js} +1 -1
- package/dist/chunks/{LpTour-BZq-mUMv.js → LpTour-XshJslGg.js} +1 -1
- package/dist/chunks/{LpTruncate-CflAIwiJ.js → LpTruncate-qgKA-3K3.js} +1 -1
- package/dist/chunks/{LpUptimeBar-DqNvvMBK.js → LpUptimeBar-qhvvmmoI.js} +2 -2
- package/dist/chunks/{RevealToggle-BEit1n6Z.js → RevealToggle-6MlmohxS.js} +1 -1
- package/dist/chunks/{TourCard-DNclH3u_.js → TourCard-BuB-i4kv.js} +3 -3
- package/dist/components/DropzoneLinkField.vue.js +1 -1
- package/dist/components/FieldWrapper.vue.js +1 -1
- package/dist/components/LpActionBar.vue.js +1 -1
- package/dist/components/LpAddressInput.vue.js +1 -1
- package/dist/components/LpAlert.vue.js +1 -1
- package/dist/components/LpAppShell.vue.js +1 -1
- package/dist/components/LpBadge.vue.d.ts +2 -2
- package/dist/components/LpBadge.vue.js +1 -1
- package/dist/components/LpBottomNav.vue.js +1 -1
- package/dist/components/LpBreadcrumbs.vue.js +1 -1
- package/dist/components/LpButton.vue.js +1 -1
- package/dist/components/LpCard.vue.js +1 -1
- package/dist/components/LpChart.vue.js +2 -2
- package/dist/components/LpCheckbox.vue.js +1 -1
- package/dist/components/LpCodeBlock.vue.js +1 -1
- package/dist/components/LpCodeDisplay.vue.js +1 -1
- package/dist/components/LpCommandPalette.vue.js +5 -4
- package/dist/components/LpConfirmDialog.vue.js +1 -1
- package/dist/components/LpConfirmHost.vue.js +1 -1
- package/dist/components/LpCopyButton.vue.js +1 -1
- package/dist/components/LpCountdown.vue.js +1 -1
- package/dist/components/LpDataList.vue.js +1 -1
- package/dist/components/LpDropzone.vue.js +1 -1
- package/dist/components/LpEditable.vue.js +1 -1
- package/dist/components/LpFileTree.vue.js +1 -1
- package/dist/components/LpFileTreeNode.vue.js +1 -1
- package/dist/components/LpFormField.vue.js +1 -1
- package/dist/components/LpHintLayer.vue.js +1 -1
- package/dist/components/LpHints.vue.js +1 -1
- package/dist/components/LpHoverCard.vue.d.ts +1 -1
- package/dist/components/LpImageEditor.vue.js +1 -1
- package/dist/components/LpInfraNode.vue.js +1 -1
- package/dist/components/LpInput.vue.js +1 -1
- package/dist/components/LpLightbox.vue.js +1 -1
- package/dist/components/LpLoader.vue.js +1 -1
- package/dist/components/LpLogViewer.vue.js +1 -1
- package/dist/components/LpMapPicker.vue.js +1 -1
- package/dist/components/LpMediaGallery.vue.js +1 -1
- package/dist/components/LpModalNav.vue.js +1 -1
- package/dist/components/LpNotificationBell.vue.js +1 -1
- package/dist/components/LpPaletteTheme.vue.js +1 -1
- package/dist/components/LpPasswordInput.vue.js +1 -1
- package/dist/components/LpPie.vue.js +1 -1
- package/dist/components/LpPipeline.vue.js +1 -1
- package/dist/components/LpRepeater.vue.js +1 -1
- package/dist/components/LpScramble.vue.js +1 -1
- package/dist/components/LpSecretField.vue.js +1 -1
- package/dist/components/LpShift.vue.js +1 -1
- package/dist/components/LpSidebar.vue.js +1 -1
- package/dist/components/LpSidebarNav.vue.js +1 -1
- package/dist/components/LpSidebarRow.vue.js +1 -1
- package/dist/components/LpStat.vue.js +1 -1
- package/dist/components/LpStatus.vue.js +1 -1
- package/dist/components/LpStepMark.vue.js +1 -1
- package/dist/components/LpStepper.vue.js +1 -1
- package/dist/components/LpSwap.vue.js +1 -1
- package/dist/components/LpSwitch.vue.js +1 -1
- package/dist/components/LpTabFace.vue.js +1 -1
- package/dist/components/LpTable.vue.js +6 -6
- package/dist/components/LpTableFilter.vue.js +1 -1
- package/dist/components/LpTabs.vue.js +1 -1
- package/dist/components/LpTagsInput.vue.js +1 -1
- package/dist/components/LpTextarea.vue.js +1 -1
- package/dist/components/LpThemeStudio.vue.js +1 -1
- package/dist/components/LpThemeSwitcher.vue.js +1 -1
- package/dist/components/LpToaster.vue.js +1 -1
- package/dist/components/LpTopologyCanvas.vue.js +1 -1
- package/dist/components/LpTour.vue.js +1 -1
- package/dist/components/LpTruncate.vue.js +1 -1
- package/dist/components/LpUptimeBar.vue.js +1 -1
- package/dist/components/RevealToggle.vue.js +1 -1
- package/dist/components/TourCard.vue.js +1 -1
- package/dist/composables/useFitScale.d.ts +5 -0
- package/dist/composables/useFitScale.js +30 -0
- package/dist/composables/useMergedClass.js +17 -3
- package/dist/composables/useShift.d.ts +2 -0
- package/dist/composables/useShift.js +5 -0
- package/dist/index.js +55 -55
- package/package.json +1 -1
- package/src/components/LpCommandPalette.vue +4 -0
- package/src/components/LpShift.vue +4 -2
- package/src/components/LpStat.vue +24 -3
- package/src/composables/useFitScale.ts +43 -0
- package/src/composables/useMergedClass.ts +26 -3
- package/src/composables/useShift.ts +10 -0
|
@@ -42,9 +42,9 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
|
|
|
42
42
|
}>, {
|
|
43
43
|
disabled: boolean;
|
|
44
44
|
align: "start" | "center" | "end";
|
|
45
|
+
touch: "hold" | "none";
|
|
45
46
|
side: "top" | "right" | "bottom" | "left";
|
|
46
47
|
sideOffset: number;
|
|
47
|
-
touch: "hold" | "none";
|
|
48
48
|
openDelay: number;
|
|
49
49
|
closeDelay: number;
|
|
50
50
|
arrow: boolean;
|
|
@@ -4,7 +4,7 @@ import { isSideways, coverScale, exportType, imageTypeFromUrl, cropGeometry } fr
|
|
|
4
4
|
import { useHotkeys } from "../composables/useHotkeys.js";
|
|
5
5
|
import { useReveal } from "../composables/useReveal.js";
|
|
6
6
|
import { useZoomPan } from "../composables/useZoomPan.js";
|
|
7
|
-
import { _ as _sfc_main$2 } from "../chunks/LpButton-
|
|
7
|
+
import { _ as _sfc_main$2 } from "../chunks/LpButton-BgdewXxF.js";
|
|
8
8
|
import "./commandSearch.js";
|
|
9
9
|
import "reka-ui";
|
|
10
10
|
import "../composables/useHints.js";
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { defineComponent, computed, useAttrs, ref, shallowRef, watch, onMounted, onBeforeUnmount, useId, h, openBlock, createElementBlock, normalizeClass, createVNode, withCtx, createTextVNode, toDisplayString, createCommentVNode, Fragment, renderList, createBlock, createElementVNode, Transition, renderSlot, mergeProps, normalizeStyle, TransitionGroup, unref, withModifiers, nextTick } from "vue";
|
|
2
2
|
import { usePaletteScope, suppressPaletteDiscovery, usePaletteCommands } from "../composables/usePaletteCommands.js";
|
|
3
3
|
import { menuPaletteCommands } from "./commandPalette.js";
|
|
4
|
-
import { _ as _sfc_main$1 } from "../chunks/LpDataList-
|
|
5
|
-
import { _ as _sfc_main$9 } from "../chunks/LpCheckbox-
|
|
4
|
+
import { _ as _sfc_main$1 } from "../chunks/LpDataList-CcAA-rD9.js";
|
|
5
|
+
import { _ as _sfc_main$9 } from "../chunks/LpCheckbox-B0kJ-t6T.js";
|
|
6
6
|
import { _ as _sfc_main$8 } from "../chunks/LpContextMenu-rx2tCjwk.js";
|
|
7
7
|
import { _ as _sfc_main$d } from "../chunks/LpEmptyState-EQHiRYhG.js";
|
|
8
|
-
import { _ as _sfc_main$5 } from "../chunks/LpBadge-
|
|
8
|
+
import { _ as _sfc_main$5 } from "../chunks/LpBadge-0A6sPks3.js";
|
|
9
9
|
import { _ as _sfc_main$3 } from "../chunks/LpIcon--5WSb3jJ.js";
|
|
10
10
|
import { _ as _sfc_main$c } from "../chunks/LpSkeleton-BB6XIV-w.js";
|
|
11
11
|
import { _ as _sfc_main$e } from "../chunks/LpPagination-BIIiYHXR.js";
|
|
12
12
|
import { _ as _sfc_main$a } from "../chunks/LpPopover-DmZ3wUtP.js";
|
|
13
13
|
import { _ as _sfc_main$7 } from "../chunks/LpScrollArea-Hz3-JWUG.js";
|
|
14
14
|
import { _ as _sfc_main$6 } from "../chunks/LpRollingText-B54Pje7P.js";
|
|
15
|
-
import { _ as _sfc_main$4 } from "../chunks/LpShift-
|
|
16
|
-
import { _ as _sfc_main$b } from "../chunks/LpTableFilter-
|
|
15
|
+
import { _ as _sfc_main$4 } from "../chunks/LpShift-kKUeG9NS.js";
|
|
16
|
+
import { _ as _sfc_main$b } from "../chunks/LpTableFilter-47ANnx_a.js";
|
|
17
17
|
import { useKitStorage } from "../composables/usePersisted.js";
|
|
18
18
|
import { useAsyncTask } from "../composables/useAsyncTask.js";
|
|
19
19
|
import { useTableFacets } from "./tableFacets.js";
|
|
@@ -23,7 +23,7 @@ import { useRovingFocus } from "../composables/useRovingFocus.js";
|
|
|
23
23
|
import { useLabels } from "../composables/useLpConfig.js";
|
|
24
24
|
import { useResizeObserver } from "../composables/useResizeObserver.js";
|
|
25
25
|
import { compareValues } from "./tableSort.js";
|
|
26
|
-
import { _ as _sfc_main$2 } from "../chunks/LpButton-
|
|
26
|
+
import { _ as _sfc_main$2 } from "../chunks/LpButton-BgdewXxF.js";
|
|
27
27
|
import { toCsv, downloadFile, fileStem } from "./exportData.js";
|
|
28
28
|
import { summarizeShown, parseTableState, serializeTableState } from "./tableFilter.js";
|
|
29
29
|
import { resolveRowMenu } from "./tableRowMenu.js";
|
|
@@ -6,7 +6,7 @@ import { usePillTransition } from "../composables/usePillTransition.js";
|
|
|
6
6
|
import { prefersReducedMotion } from "../composables/easing.js";
|
|
7
7
|
import { _ as _sfc_main$1 } from "../chunks/LpContextMenu-rx2tCjwk.js";
|
|
8
8
|
import { _ as _sfc_main$3 } from "../chunks/LpSkeleton-BB6XIV-w.js";
|
|
9
|
-
import { _ as _sfc_main$2 } from "../chunks/LpTabFace-
|
|
9
|
+
import { _ as _sfc_main$2 } from "../chunks/LpTabFace-JFJLW0kA.js";
|
|
10
10
|
import { pickTab, BOTTOM_BAR, BOTTOM_ITEM, BOTTOM_MARKER } from "./tabs.js";
|
|
11
11
|
import { _ as _export_sfc } from "../chunks/_plugin-vue_export-helper-1tPrXgE0.js";
|
|
12
12
|
import '../assets/LpTabs-CDchzoRL.css';const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ref, onMounted, watch, onBeforeUnmount } from "vue";
|
|
2
|
+
function useFitScale(box, content, min = 0.6) {
|
|
3
|
+
const scale = ref(1);
|
|
4
|
+
const clipped = ref(false);
|
|
5
|
+
let observer;
|
|
6
|
+
function measure() {
|
|
7
|
+
const room = box.value?.clientWidth ?? 0;
|
|
8
|
+
const width = content.value?.scrollWidth ?? 0;
|
|
9
|
+
if (!room || !width) return;
|
|
10
|
+
const natural = width / scale.value;
|
|
11
|
+
const next = Math.max(min, Math.min(1, Math.floor(room / natural * 100) / 100));
|
|
12
|
+
if (next !== scale.value) scale.value = next;
|
|
13
|
+
clipped.value = natural * next > room + 0.5;
|
|
14
|
+
}
|
|
15
|
+
function observe() {
|
|
16
|
+
observer?.disconnect();
|
|
17
|
+
if (typeof ResizeObserver === "undefined") return;
|
|
18
|
+
observer = new ResizeObserver(measure);
|
|
19
|
+
if (box.value) observer.observe(box.value);
|
|
20
|
+
if (content.value) observer.observe(content.value);
|
|
21
|
+
measure();
|
|
22
|
+
}
|
|
23
|
+
onMounted(observe);
|
|
24
|
+
watch([box, content], observe, { flush: "post" });
|
|
25
|
+
onBeforeUnmount(() => observer?.disconnect());
|
|
26
|
+
return { scale, clipped };
|
|
27
|
+
}
|
|
28
|
+
export {
|
|
29
|
+
useFitScale
|
|
30
|
+
};
|
|
@@ -1,8 +1,22 @@
|
|
|
1
1
|
import { useAttrs, computed, toValue } from "vue";
|
|
2
|
-
import {
|
|
2
|
+
import { extendTailwindMerge } from "tailwind-merge";
|
|
3
|
+
import { cx } from "tailwind-variants";
|
|
4
|
+
const kitMerge = extendTailwindMerge({
|
|
5
|
+
extend: {
|
|
6
|
+
theme: {
|
|
7
|
+
radius: ["control", "card", "pill", "inner", "small"],
|
|
8
|
+
shadow: ["panel"],
|
|
9
|
+
ease: ["emphasized", "travel", "settle"]
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
function merge(...classes) {
|
|
14
|
+
const joined = cx(...classes);
|
|
15
|
+
return joined ? kitMerge(joined) : "";
|
|
16
|
+
}
|
|
3
17
|
function useMergedClass(own) {
|
|
4
18
|
const attrs = useAttrs();
|
|
5
|
-
return computed(() =>
|
|
19
|
+
return computed(() => merge(toValue(own), attrs.class));
|
|
6
20
|
}
|
|
7
21
|
function useMergedAttrs(own) {
|
|
8
22
|
const attrs = useAttrs();
|
|
@@ -15,7 +29,7 @@ function useMergedAttrs(own) {
|
|
|
15
29
|
};
|
|
16
30
|
}
|
|
17
31
|
function mergeClass(...classes) {
|
|
18
|
-
return
|
|
32
|
+
return merge(...classes);
|
|
19
33
|
}
|
|
20
34
|
export {
|
|
21
35
|
mergeClass,
|
|
@@ -32,4 +32,6 @@ export interface UseShift {
|
|
|
32
32
|
/** Re-measure and ease to the current natural size. Rarely needed by hand. */
|
|
33
33
|
retune: () => void;
|
|
34
34
|
}
|
|
35
|
+
/** Set on the box while it eases its width: where that width will land. */
|
|
36
|
+
export declare const TARGET_WIDTH = "--lp-shift-to-w";
|
|
35
37
|
export declare function useShift(options?: UseShiftOptions): UseShift;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ref, watch, toValue, onBeforeUnmount } from "vue";
|
|
2
2
|
import { prefersReducedMotion } from "./easing.js";
|
|
3
|
+
const TARGET_WIDTH = "--lp-shift-to-w";
|
|
3
4
|
const TWEEN_MS = 160;
|
|
4
5
|
const RETARGET_AFTER_MS = 40;
|
|
5
6
|
function useShift(options = {}) {
|
|
@@ -54,6 +55,7 @@ function useShift(options = {}) {
|
|
|
54
55
|
if (wantsWidth()) node.style.width = "";
|
|
55
56
|
const toHeight = wantsHeight() ? node.offsetHeight : 0;
|
|
56
57
|
const toWidth = wantsWidth() ? node.offsetWidth : 0;
|
|
58
|
+
const exactWidth = wantsWidth() ? Math.ceil(node.getBoundingClientRect().width) : 0;
|
|
57
59
|
restoreScroll(tops);
|
|
58
60
|
lastHeight = toHeight;
|
|
59
61
|
lastWidth = toWidth;
|
|
@@ -67,6 +69,7 @@ function useShift(options = {}) {
|
|
|
67
69
|
void node.offsetHeight;
|
|
68
70
|
if (movesHeight) node.style.height = `${toHeight}px`;
|
|
69
71
|
if (movesWidth) node.style.width = `${toWidth}px`;
|
|
72
|
+
if (movesWidth) node.style.setProperty(TARGET_WIDTH, `${exactWidth}px`);
|
|
70
73
|
restoreScroll(tops);
|
|
71
74
|
inFlight = true;
|
|
72
75
|
tweenStart = performance.now();
|
|
@@ -78,6 +81,7 @@ function useShift(options = {}) {
|
|
|
78
81
|
resizing.value = false;
|
|
79
82
|
if (wantsHeight()) node.style.height = "";
|
|
80
83
|
if (wantsWidth()) node.style.width = "";
|
|
84
|
+
node.style.removeProperty(TARGET_WIDTH);
|
|
81
85
|
lastHeight = node.offsetHeight;
|
|
82
86
|
lastWidth = node.offsetWidth;
|
|
83
87
|
}, wait);
|
|
@@ -140,5 +144,6 @@ function useShift(options = {}) {
|
|
|
140
144
|
return { el, tweening, resizing, retune };
|
|
141
145
|
}
|
|
142
146
|
export {
|
|
147
|
+
TARGET_WIDTH,
|
|
143
148
|
useShift
|
|
144
149
|
};
|