@leavepulse/ui 0.73.6 → 0.74.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/chunks/{DropzoneLinkField-ppY9xalk.js → DropzoneLinkField-C-9BCGJn.js} +2 -2
- package/dist/chunks/{FieldWrapper-y5bKBNxA.js → FieldWrapper-CORPzo9s.js} +1 -1
- package/dist/chunks/{LpActionBar-B55msXTr.js → LpActionBar-BP1ld7-S.js} +2 -2
- package/dist/chunks/{LpAddressInput-mf_dEpj_.js → LpAddressInput-Al3HT5ey.js} +3 -3
- package/dist/chunks/{LpAlert-Cg7oIx1B.js → LpAlert-n5XPAZfv.js} +2 -2
- package/dist/chunks/{LpAppShell-B0Yu9MVs.js → LpAppShell-CpSSm5WT.js} +53 -24
- package/dist/chunks/{LpBadge-0A6sPks3.js → LpBadge-wUYLN4U9.js} +1 -1
- package/dist/chunks/{LpBottomNav-Dik-ZcHv.js → LpBottomNav-CbNQQPuL.js} +1 -1
- package/dist/chunks/{LpBreadcrumbs-ssZV3_od.js → LpBreadcrumbs-DPdbth-c.js} +1 -1
- package/dist/chunks/{LpButton-BgdewXxF.js → LpButton-CFb44IjC.js} +1 -1
- package/dist/chunks/{LpCard-BJ59q6hR.js → LpCard-r13WRqox.js} +1 -1
- package/dist/chunks/{LpCheckbox-B0kJ-t6T.js → LpCheckbox-Cs4SHaHX.js} +1 -1
- package/dist/chunks/{LpCodeBlock-CXR_7t_F.js → LpCodeBlock-DRC8VbXW.js} +1 -1
- package/dist/chunks/{LpCodeDisplay-BCghfBFC.js → LpCodeDisplay-CE9TxCA4.js} +4 -4
- package/dist/chunks/{LpConfirmDialog-CaA4pAre.js → LpConfirmDialog-DY2VjDji.js} +1 -1
- package/dist/chunks/{LpConfirmHost-CBIzALSL.js → LpConfirmHost-DvSZTJ4N.js} +1 -1
- package/dist/chunks/LpContextSwitcher-Dwh6dyID.js +81 -0
- package/dist/chunks/{LpCopyButton-Cw-lF7Q3.js → LpCopyButton-xF7wFVoU.js} +1 -1
- package/dist/chunks/{LpCountdown-BNNhnQAK.js → LpCountdown-DgeY3cLG.js} +1 -1
- package/dist/chunks/{LpDataList-CcAA-rD9.js → LpDataList-Jxyl9H5w.js} +1 -1
- package/dist/chunks/{LpEditable-CSuJIPbG.js → LpEditable-Cy6GLbFx.js} +2 -2
- package/dist/chunks/{LpFileTree-CxOh3rL2.js → LpFileTree-zIFEgo3I.js} +1 -1
- package/dist/chunks/{LpFileTreeNode-9ue2P7ER.js → LpFileTreeNode-cT6BIWvz.js} +3 -3
- package/dist/chunks/{LpFormField-BBFg8i2I.js → LpFormField-Ch69Jd-X.js} +1 -1
- package/dist/chunks/{LpHintLayer-Db_s9_DL.js → LpHintLayer-CgObdUsM.js} +2 -2
- package/dist/chunks/{LpHints-Cxf5GXsx.js → LpHints-Bz-BlaSl.js} +3 -3
- package/dist/chunks/{LpInfraNode-6NLxkAnr.js → LpInfraNode-46XOCkfq.js} +2 -2
- package/dist/chunks/{LpInput-B2dTt4pc.js → LpInput-Tw-yxT4I.js} +1 -1
- package/dist/chunks/{LpLightbox-Coe4OBUl.js → LpLightbox-B95yu22B.js} +2 -2
- package/dist/chunks/{LpLoader-DPTNhqLu.js → LpLoader-DVwkOmt9.js} +1 -1
- package/dist/chunks/{LpLogViewer-DxiR6Mbd.js → LpLogViewer-D25jM2_I.js} +3 -3
- package/dist/chunks/{LpMapPicker-DeJRMfFN.js → LpMapPicker-DRGgh89B.js} +1 -1
- package/dist/chunks/{LpMediaGallery-B7Km8N9l.js → LpMediaGallery-Bkram-MO.js} +1 -1
- package/dist/chunks/{LpModalNav-BmxEyqOx.js → LpModalNav-DQpV2kdn.js} +2 -2
- package/dist/chunks/{LpNotificationBell-u8-ZjRON.js → LpNotificationBell-3244LUVc.js} +3 -3
- package/dist/chunks/{LpPaletteTheme-CWAIjBCi.js → LpPaletteTheme-DiLYKQiZ.js} +3 -3
- package/dist/chunks/{LpPasswordInput-Ih7Lv43S.js → LpPasswordInput-BkHKQDhM.js} +2 -2
- package/dist/chunks/{LpPie-Idujdb3M.js → LpPie-DrZepi0p.js} +2 -2
- package/dist/chunks/{LpPipeline-QCZWWB0G.js → LpPipeline-B3aOVOkV.js} +2 -2
- package/dist/chunks/{LpRepeater-DghUJ3bc.js → LpRepeater-D7ZmnIYd.js} +2 -2
- package/dist/chunks/{LpScramble-DeT_D36q.js → LpScramble-Bn9OoOtC.js} +1 -1
- package/dist/chunks/{LpSecretField-osKPNdNT.js → LpSecretField-BbmqM9ye.js} +6 -6
- package/dist/chunks/{LpShift-kKUeG9NS.js → LpShift-CCq7dofl.js} +2 -4
- package/dist/chunks/{LpSidebar-CR_WKcn2.js → LpSidebar-BoNLKgh-.js} +2 -2
- package/dist/chunks/{LpSidebarNav-h3YunOAr.js → LpSidebarNav-Bky8chrv.js} +2 -2
- package/dist/chunks/{LpSidebarRow-SjV0Ouhq.js → LpSidebarRow-BRYhNDSo.js} +1 -1
- package/dist/chunks/{LpStat-DXqKD1h5.js → LpStat-f2LfDCJ4.js} +1 -1
- package/dist/chunks/{LpStatus-DfZREVe0.js → LpStatus-DglxttQ7.js} +2 -2
- package/dist/chunks/{LpStepMark-TaAyuNsH.js → LpStepMark-DpzKVyh8.js} +1 -1
- package/dist/chunks/{LpStepper-CKSTFzHE.js → LpStepper-DpsocBNJ.js} +1 -1
- package/dist/chunks/{LpSwap-KIS24N8W.js → LpSwap-C96c0LWh.js} +1 -1
- package/dist/chunks/{LpSwitch-DlZHmj-M.js → LpSwitch-BnXd1llc.js} +1 -1
- package/dist/chunks/{LpTabFace-JFJLW0kA.js → LpTabFace-DPCwKkH2.js} +1 -1
- package/dist/chunks/{LpTableFilter-47ANnx_a.js → LpTableFilter-CiVBpaq0.js} +3 -3
- package/dist/chunks/{LpTagsInput-CHoiid8u.js → LpTagsInput-C-mDG648.js} +2 -2
- package/dist/chunks/{LpTextarea-CU7C1pLO.js → LpTextarea-TE-yZv2U.js} +1 -1
- package/dist/chunks/{LpThemeStudio-zyOH3dF2.js → LpThemeStudio-BpORDvH6.js} +2 -2
- package/dist/chunks/{LpThemeSwitcher-BXJhQYGD.js → LpThemeSwitcher-BnEn_mvf.js} +2 -2
- package/dist/chunks/{LpToaster-C1D35SKk.js → LpToaster-IwTXjbbU.js} +1 -1
- package/dist/chunks/{LpTopologyCanvas-1OufbBtQ.js → LpTopologyCanvas-B1gIbS0n.js} +1 -1
- package/dist/chunks/{LpTour-XshJslGg.js → LpTour-BZq-mUMv.js} +1 -1
- package/dist/chunks/{LpTruncate-qgKA-3K3.js → LpTruncate-CflAIwiJ.js} +1 -1
- package/dist/chunks/{LpUptimeBar-qhvvmmoI.js → LpUptimeBar-DqNvvMBK.js} +2 -2
- package/dist/chunks/{RevealToggle-6MlmohxS.js → RevealToggle-BEit1n6Z.js} +1 -1
- package/dist/chunks/{TourCard-BuB-i4kv.js → TourCard-DNclH3u_.js} +3 -3
- package/dist/component-names.d.ts +1 -1
- 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.d.ts +25 -1
- package/dist/components/LpAppShell.vue.js +1 -1
- 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 +2 -2
- package/dist/components/LpConfirmDialog.vue.js +1 -1
- package/dist/components/LpConfirmHost.vue.js +1 -1
- package/dist/components/LpContextSwitcher.vue.d.ts +34 -0
- package/dist/components/LpContextSwitcher.vue.js +4 -0
- 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/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/components/sidebar.d.ts +6 -0
- package/dist/composables/useShift.d.ts +0 -2
- package/dist/composables/useShift.js +0 -5
- package/dist/index.d.ts +2 -0
- package/dist/index.js +143 -141
- package/package.json +1 -1
- package/src/component-names.ts +1 -0
- package/src/components/LpAppShell.vue +27 -3
- package/src/components/LpContextSwitcher.vue +74 -0
- package/src/components/LpShift.vue +2 -4
- package/src/components/sidebar.ts +7 -0
- package/src/composables/useShift.ts +0 -10
- package/src/index.ts +2 -0
|
@@ -2,11 +2,11 @@ import { defineComponent, computed, h, shallowRef, ref, watch, useId, useSlots,
|
|
|
2
2
|
import { DialogRoot, DialogPortal, DialogOverlay, DialogContent, DialogTitle, DialogDescription } from "reka-ui";
|
|
3
3
|
import { usePaletteScope, suppressPaletteDiscovery, mergePaletteCommands } from "../composables/usePaletteCommands.js";
|
|
4
4
|
import { useToast } from "../composables/useToast.js";
|
|
5
|
-
import { _ as _sfc_main$3 } from "../chunks/LpButton-
|
|
5
|
+
import { _ as _sfc_main$3 } from "../chunks/LpButton-CFb44IjC.js";
|
|
6
6
|
import { _ as _sfc_main$6 } from "../chunks/PalettePreviewBoundary-B0Hhu3Yw.js";
|
|
7
7
|
import { _ as _sfc_main$5 } from "../chunks/LpAvatar-Cg6Az3wz.js";
|
|
8
8
|
import { _ as _sfc_main$1 } from "../chunks/LpIcon--5WSb3jJ.js";
|
|
9
|
-
import { _ as _sfc_main$2 } from "../chunks/LpLoader-
|
|
9
|
+
import { _ as _sfc_main$2 } from "../chunks/LpLoader-DVwkOmt9.js";
|
|
10
10
|
import { _ as _sfc_main$4 } from "../chunks/LpScrollArea-Hz3-JWUG.js";
|
|
11
11
|
import MenuShortcut from "./MenuShortcut.vue.js";
|
|
12
12
|
import { staggerDelay } from "./reveal.js";
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { AppContext } from "./sidebar";
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
contexts: AppContext[];
|
|
4
|
+
/** The current context's id (v-model). */
|
|
5
|
+
modelValue?: string;
|
|
6
|
+
/** The icon rail: the trigger is a square with the icon or an initial. */
|
|
7
|
+
compact?: boolean;
|
|
8
|
+
labels?: Partial<{
|
|
9
|
+
switch: string;
|
|
10
|
+
title: string;
|
|
11
|
+
}>;
|
|
12
|
+
};
|
|
13
|
+
declare var __VLS_9: {
|
|
14
|
+
context: AppContext;
|
|
15
|
+
compact: boolean;
|
|
16
|
+
};
|
|
17
|
+
type __VLS_Slots = {} & {
|
|
18
|
+
default?: (props: typeof __VLS_9) => any;
|
|
19
|
+
};
|
|
20
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
21
|
+
"update:modelValue": (id: string) => any;
|
|
22
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
23
|
+
"onUpdate:modelValue"?: ((id: string) => any) | undefined;
|
|
24
|
+
}>, {
|
|
25
|
+
compact: boolean;
|
|
26
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
27
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
28
|
+
declare const _default: typeof __VLS_export;
|
|
29
|
+
export default _default;
|
|
30
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
31
|
+
new (): {
|
|
32
|
+
$slots: S;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
@@ -5,7 +5,7 @@ import { useLabels } from "../composables/useLpConfig.js";
|
|
|
5
5
|
import { useMergedAttrs } from "../composables/useMergedClass.js";
|
|
6
6
|
import { useReveal } from "../composables/useReveal.js";
|
|
7
7
|
import { PopoverRoot, PopoverAnchor, PopoverPortal, PopoverContent } from "reka-ui";
|
|
8
|
-
import { _ as _sfc_main$1 } from "../chunks/DropzoneLinkField-
|
|
8
|
+
import { _ as _sfc_main$1 } from "../chunks/DropzoneLinkField-C-9BCGJn.js";
|
|
9
9
|
import { POPOVER_PANEL } from "./dropdown.js";
|
|
10
10
|
import { _ as _sfc_main$2 } from "../chunks/LpIcon--5WSb3jJ.js";
|
|
11
11
|
import { usePortalTarget, useOutsideGuard } from "../composables/useView.js";
|
|
@@ -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-CFb44IjC.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-Jxyl9H5w.js";
|
|
5
|
+
import { _ as _sfc_main$9 } from "../chunks/LpCheckbox-Cs4SHaHX.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-wUYLN4U9.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-CCq7dofl.js";
|
|
16
|
+
import { _ as _sfc_main$b } from "../chunks/LpTableFilter-CiVBpaq0.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-CFb44IjC.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-DPCwKkH2.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({
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import type { Component } from "vue";
|
|
2
2
|
import type { ContextMenuItemDef } from "./LpContextMenu.vue";
|
|
3
|
+
/** One of an app's contexts in the rail header switcher (LpContextSwitcher). */
|
|
4
|
+
export interface AppContext {
|
|
5
|
+
id: string;
|
|
6
|
+
label: string;
|
|
7
|
+
icon?: string;
|
|
8
|
+
}
|
|
3
9
|
export interface SidebarItem {
|
|
4
10
|
id: string;
|
|
5
11
|
label: string;
|
|
@@ -32,6 +32,4 @@ 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";
|
|
37
35
|
export declare function useShift(options?: UseShiftOptions): UseShift;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ref, watch, toValue, onBeforeUnmount } from "vue";
|
|
2
2
|
import { prefersReducedMotion } from "./easing.js";
|
|
3
|
-
const TARGET_WIDTH = "--lp-shift-to-w";
|
|
4
3
|
const TWEEN_MS = 160;
|
|
5
4
|
const RETARGET_AFTER_MS = 40;
|
|
6
5
|
function useShift(options = {}) {
|
|
@@ -55,7 +54,6 @@ function useShift(options = {}) {
|
|
|
55
54
|
if (wantsWidth()) node.style.width = "";
|
|
56
55
|
const toHeight = wantsHeight() ? node.offsetHeight : 0;
|
|
57
56
|
const toWidth = wantsWidth() ? node.offsetWidth : 0;
|
|
58
|
-
const exactWidth = wantsWidth() ? Math.ceil(node.getBoundingClientRect().width) : 0;
|
|
59
57
|
restoreScroll(tops);
|
|
60
58
|
lastHeight = toHeight;
|
|
61
59
|
lastWidth = toWidth;
|
|
@@ -69,7 +67,6 @@ function useShift(options = {}) {
|
|
|
69
67
|
void node.offsetHeight;
|
|
70
68
|
if (movesHeight) node.style.height = `${toHeight}px`;
|
|
71
69
|
if (movesWidth) node.style.width = `${toWidth}px`;
|
|
72
|
-
if (movesWidth) node.style.setProperty(TARGET_WIDTH, `${exactWidth}px`);
|
|
73
70
|
restoreScroll(tops);
|
|
74
71
|
inFlight = true;
|
|
75
72
|
tweenStart = performance.now();
|
|
@@ -81,7 +78,6 @@ function useShift(options = {}) {
|
|
|
81
78
|
resizing.value = false;
|
|
82
79
|
if (wantsHeight()) node.style.height = "";
|
|
83
80
|
if (wantsWidth()) node.style.width = "";
|
|
84
|
-
node.style.removeProperty(TARGET_WIDTH);
|
|
85
81
|
lastHeight = node.offsetHeight;
|
|
86
82
|
lastWidth = node.offsetWidth;
|
|
87
83
|
}, wait);
|
|
@@ -144,6 +140,5 @@ function useShift(options = {}) {
|
|
|
144
140
|
return { el, tweening, resizing, retune };
|
|
145
141
|
}
|
|
146
142
|
export {
|
|
147
|
-
TARGET_WIDTH,
|
|
148
143
|
useShift
|
|
149
144
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -137,6 +137,8 @@ export { default as LpHintExample } from "./components/LpHintExample.vue";
|
|
|
137
137
|
export { default as LpShortcutsDialog } from "./components/LpShortcutsDialog.vue";
|
|
138
138
|
export { default as LpSidebar } from "./components/LpSidebar.vue";
|
|
139
139
|
export type { SidebarItem, SidebarSection } from "./components/LpSidebar.vue";
|
|
140
|
+
export type { AppContext } from "./components/sidebar";
|
|
141
|
+
export { default as LpContextSwitcher } from "./components/LpContextSwitcher.vue";
|
|
140
142
|
export { default as LpSkeleton } from "./components/LpSkeleton.vue";
|
|
141
143
|
export { default as LpSlider } from "./components/LpSlider.vue";
|
|
142
144
|
export { default as LpRangeSlider } from "./components/LpRangeSlider.vue";
|