@vc-shell/framework 2.5.0-pr313.d5b02dd → 2.5.0-pr314.ce6b912
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/{VcScheduler.vue_vue_type_script_setup_true_lang-BmlVL_rn.js → VcScheduler.vue_vue_type_script_setup_true_lang-Cj_xmgb8.js} +718 -723
- package/dist/chunks/VcScheduler.vue_vue_type_script_setup_true_lang-Cj_xmgb8.js.map +1 -0
- package/dist/core/composables/useMenuExpanded/index.d.ts +10 -1
- package/dist/core/composables/useMenuExpanded/index.d.ts.map +1 -1
- package/dist/core/composables/useSidebarState/_internal.d.ts +47 -0
- package/dist/core/composables/useSidebarState/_internal.d.ts.map +1 -0
- package/dist/core/composables/useSidebarState/index.d.ts +4 -27
- package/dist/core/composables/useSidebarState/index.d.ts.map +1 -1
- package/dist/framework.js +636 -627
- package/dist/framework.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui/index.js +1 -1
- package/package.json +4 -4
- package/dist/chunks/VcScheduler.vue_vue_type_script_setup_true_lang-BmlVL_rn.js.map +0 -1
|
@@ -1,9 +1,18 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Ref } from "vue";
|
|
2
2
|
export interface UseMenuExpandedReturn {
|
|
3
3
|
isExpanded: Ref<boolean>;
|
|
4
4
|
toggleExpanded: () => void;
|
|
5
5
|
isHoverExpanded: Ref<boolean>;
|
|
6
6
|
toggleHoverExpanded: (shouldExpand?: boolean) => void;
|
|
7
7
|
}
|
|
8
|
+
/**
|
|
9
|
+
* Sidebar pinned/hover state with localStorage persistence.
|
|
10
|
+
*
|
|
11
|
+
* @deprecated Use `useSidebarState()`. Will be removed in the next major.
|
|
12
|
+
*
|
|
13
|
+
* Each call builds its own instance, so the returned `isHoverExpanded` is NOT the
|
|
14
|
+
* one the sidebar renders from - only the pinned state is shared, through the
|
|
15
|
+
* localStorage key. `useSidebarState()` returns the single provided instance.
|
|
16
|
+
*/
|
|
8
17
|
export declare const useMenuExpanded: () => UseMenuExpandedReturn;
|
|
9
18
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../core/composables/useMenuExpanded/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../core/composables/useMenuExpanded/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAG/B,MAAM,WAAW,qBAAqB;IACpC,UAAU,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;IACzB,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,eAAe,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;IAC9B,mBAAmB,EAAE,CAAC,YAAY,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;CACvD;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,eAAe,QAAO,qBASlC,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { Ref, ComputedRef } from "vue";
|
|
2
|
+
export interface SidebarState {
|
|
3
|
+
/** Sidebar is pinned open by user (persisted to localStorage) */
|
|
4
|
+
isPinned: Ref<boolean>;
|
|
5
|
+
/** Sidebar is temporarily expanded on mouse hover (desktop only) */
|
|
6
|
+
isHoverExpanded: Ref<boolean>;
|
|
7
|
+
/** Mobile menu overlay is visible */
|
|
8
|
+
isMenuOpen: Ref<boolean>;
|
|
9
|
+
/** Derived: sidebar content should render in expanded mode (pinned OR hovered) */
|
|
10
|
+
isExpanded: ComputedRef<boolean>;
|
|
11
|
+
}
|
|
12
|
+
export interface SidebarActions {
|
|
13
|
+
/** Toggle the pinned state (persists to localStorage) */
|
|
14
|
+
togglePin: () => void;
|
|
15
|
+
/** Set hover expansion state with delay for opening */
|
|
16
|
+
setHoverExpanded: (value: boolean) => void;
|
|
17
|
+
/** Open the mobile menu / widget overlay */
|
|
18
|
+
openMenu: () => void;
|
|
19
|
+
/** Close the mobile menu / widget overlay */
|
|
20
|
+
closeMenu: () => void;
|
|
21
|
+
}
|
|
22
|
+
export type UseSidebarStateReturn = SidebarState & SidebarActions;
|
|
23
|
+
/** @deprecated Use UseSidebarStateReturn instead */
|
|
24
|
+
export type SidebarStateReturn = UseSidebarStateReturn;
|
|
25
|
+
/**
|
|
26
|
+
* Shape of a freshly built instance. Identical to `UseSidebarStateReturn` except that
|
|
27
|
+
* `setHoverExpanded` also accepts `undefined` as a no-op, which the deprecated
|
|
28
|
+
* `useMenuExpanded` adapter forwards. Assignable to `UseSidebarStateReturn`.
|
|
29
|
+
*/
|
|
30
|
+
export type SidebarStateInstance = Omit<UseSidebarStateReturn, "setHoverExpanded"> & {
|
|
31
|
+
setHoverExpanded: (value?: boolean) => void;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* localStorage key holding the pinned state, scoped per application.
|
|
35
|
+
* The app name defaults to the first segment of `window.location.pathname`
|
|
36
|
+
* ("/vendor-portal/" -> "vendor-portal"), so several vc-shell apps on one
|
|
37
|
+
* domain keep independent sidebar states.
|
|
38
|
+
*/
|
|
39
|
+
export declare function sidebarStorageKey(appName?: string): string;
|
|
40
|
+
/**
|
|
41
|
+
* Builds a standalone sidebar state instance. Not provided, not shared:
|
|
42
|
+
* `provideSidebarState()` owns the one instance the component tree sees, and the
|
|
43
|
+
* deprecated `useMenuExpanded()` builds its own because it may be called outside
|
|
44
|
+
* the VcApp tree, where no provider exists.
|
|
45
|
+
*/
|
|
46
|
+
export declare function createSidebarStateInstance(): SidebarStateInstance;
|
|
47
|
+
//# sourceMappingURL=_internal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_internal.d.ts","sourceRoot":"","sources":["../../../../core/composables/useSidebarState/_internal.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,KAAK,CAAC;AAG5C,MAAM,WAAW,YAAY;IAC3B,iEAAiE;IACjE,QAAQ,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;IACvB,oEAAoE;IACpE,eAAe,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;IAC9B,qCAAqC;IACrC,UAAU,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;IACzB,kFAAkF;IAClF,UAAU,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;CAClC;AAED,MAAM,WAAW,cAAc;IAC7B,yDAAyD;IACzD,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,uDAAuD;IACvD,gBAAgB,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAC3C,4CAA4C;IAC5C,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,6CAA6C;IAC7C,SAAS,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,MAAM,MAAM,qBAAqB,GAAG,YAAY,GAAG,cAAc,CAAC;AAElE,oDAAoD;AACpD,MAAM,MAAM,kBAAkB,GAAG,qBAAqB,CAAC;AAEvD;;;;GAIG;AACH,MAAM,MAAM,oBAAoB,GAAG,IAAI,CAAC,qBAAqB,EAAE,kBAAkB,CAAC,GAAG;IACnF,gBAAgB,EAAE,CAAC,KAAK,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;CAC7C,CAAC;AAKF;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAG1D;AAED;;;;;GAKG;AACH,wBAAgB,0BAA0B,IAAI,oBAAoB,CA0DjE"}
|
|
@@ -1,32 +1,9 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
isPinned: Ref<boolean>;
|
|
5
|
-
/** Sidebar is temporarily expanded on mouse hover (desktop only) */
|
|
6
|
-
isHoverExpanded: Ref<boolean>;
|
|
7
|
-
/** Mobile menu overlay is visible */
|
|
8
|
-
isMenuOpen: Ref<boolean>;
|
|
9
|
-
/** Derived: sidebar content should render in expanded mode (pinned OR hovered) */
|
|
10
|
-
isExpanded: ComputedRef<boolean>;
|
|
11
|
-
}
|
|
12
|
-
export interface SidebarActions {
|
|
13
|
-
/** Toggle the pinned state (persists to localStorage) */
|
|
14
|
-
togglePin: () => void;
|
|
15
|
-
/** Set hover expansion state with delay for opening */
|
|
16
|
-
setHoverExpanded: (value: boolean) => void;
|
|
17
|
-
/** Open the mobile menu / widget overlay */
|
|
18
|
-
openMenu: () => void;
|
|
19
|
-
/** Close the mobile menu / widget overlay */
|
|
20
|
-
closeMenu: () => void;
|
|
21
|
-
}
|
|
22
|
-
export type UseSidebarStateReturn = SidebarState & SidebarActions;
|
|
23
|
-
/** @deprecated Use UseSidebarStateReturn instead */
|
|
24
|
-
export type SidebarStateReturn = UseSidebarStateReturn;
|
|
1
|
+
import type { UseSidebarStateReturn } from "./_internal";
|
|
2
|
+
export type { SidebarState, SidebarActions, UseSidebarStateReturn, SidebarStateReturn } from "./_internal";
|
|
3
|
+
export { sidebarStorageKey } from "./_internal";
|
|
25
4
|
/**
|
|
26
5
|
* Provides sidebar state to the component tree. Must be called once in VcApp setup.
|
|
27
|
-
* Idempotent: returns existing instance if already provided in the current tree.
|
|
28
|
-
* Internally delegates to useMenuExpanded() for shared reactive state,
|
|
29
|
-
* ensuring UserDropdownButton (which uses useMenuExpanded directly) stays in sync.
|
|
6
|
+
* Idempotent: returns the existing instance if already provided in the current tree.
|
|
30
7
|
*/
|
|
31
8
|
export declare function provideSidebarState(): UseSidebarStateReturn;
|
|
32
9
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../core/composables/useSidebarState/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../core/composables/useSidebarState/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAEzD,YAAY,EAAE,YAAY,EAAE,cAAc,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAC3G,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAIhD;;;GAGG;AACH,wBAAgB,mBAAmB,IAAI,qBAAqB,CAQ3D;AAED;;;GAGG;AACH,wBAAgB,eAAe,IAAI,qBAAqB,CAMvD"}
|