@jpmorganchase/mosaic-store 0.1.0-beta.9 → 0.1.0-beta.91
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/README.md +4 -2
- package/dist/chunk-256AGL5I.js +1 -0
- package/dist/chunk-5GXF566S.js +1 -0
- package/dist/chunk-6BPHTR6G.js +1 -0
- package/dist/chunk-6VYGXDI5.js +1 -0
- package/dist/chunk-AA7FGYRS.js +1 -0
- package/dist/chunk-ATQVZ6KV.js +1 -0
- package/dist/chunk-BNDCMZAE.js +1 -0
- package/dist/chunk-CF4MD2TQ.js +1 -0
- package/dist/chunk-G734VGFN.js +1 -0
- package/dist/chunk-IS7TJ54I.js +0 -0
- package/dist/chunk-LAADEEXW.js +0 -0
- package/dist/chunk-NZGUNCV2.js +1 -0
- package/dist/chunk-PSHWPPFM.js +1 -0
- package/dist/chunk-Q3JUP6BM.js +1 -0
- package/dist/chunk-YZFJJMDS.js +1 -0
- package/dist/chunk-ZMWHBFUG.js +1 -0
- package/dist/index.d.ts +4 -2
- package/dist/index.js +1 -1
- package/dist/store.d.ts +32 -4
- package/dist/store.js +1 -1
- package/dist/types/appHeader.d.ts +10 -3
- package/dist/types/appHeader.js +1 -1
- package/dist/types/breadcrumbs.d.ts +2 -2
- package/dist/types/breadcrumbs.js +1 -1
- package/dist/types/colorMode.d.ts +3 -0
- package/dist/types/colorMode.js +1 -0
- package/dist/types/footer.d.ts +1 -1
- package/dist/types/footer.js +1 -1
- package/dist/types/helpLinks.d.ts +1 -1
- package/dist/types/helpLinks.js +1 -1
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.js +1 -1
- package/dist/types/layout.d.ts +1 -1
- package/dist/types/layout.js +1 -1
- package/dist/types/meta.d.ts +1 -1
- package/dist/types/meta.js +1 -1
- package/dist/types/navigation.d.ts +23 -0
- package/dist/types/navigation.js +1 -0
- package/dist/types/route.d.ts +1 -1
- package/dist/types/route.js +1 -1
- package/dist/types/searchIndex.d.ts +22 -0
- package/dist/types/searchIndex.js +1 -0
- package/dist/types/sharedConfig.d.ts +4 -5
- package/dist/types/sharedConfig.js +1 -1
- package/dist/types/sidebar.d.ts +18 -3
- package/dist/types/sidebar.js +1 -1
- package/dist/types/tableOfContents.d.ts +2 -2
- package/dist/types/tableOfContents.js +1 -1
- package/dist/useAppHeader.d.ts +2 -5
- package/dist/useAppHeader.js +1 -1
- package/dist/useBreadcrumbs.js +1 -1
- package/dist/useColorMode.d.ts +2 -0
- package/dist/useColorMode.js +1 -0
- package/dist/useFooter.d.ts +1 -1
- package/dist/useFooter.js +1 -1
- package/dist/useLayout.d.ts +1 -1
- package/dist/useLayout.js +1 -1
- package/dist/useMeta.d.ts +1 -1
- package/dist/useMeta.js +1 -1
- package/dist/useNavigation.d.ts +2 -0
- package/dist/useNavigation.js +1 -0
- package/dist/useRoute.js +1 -1
- package/dist/useSearchIndex.d.ts +6 -0
- package/dist/useSearchIndex.js +1 -0
- package/dist/useSidebar.d.ts +2 -2
- package/dist/useSidebar.js +1 -1
- package/dist/useStoreActions.d.ts +3 -0
- package/dist/useStoreActions.js +1 -0
- package/dist/useTableOfContents.d.ts +0 -1
- package/dist/useTableOfContents.js +1 -1
- package/package.json +29 -15
- package/.turbo/turbo-build.log +0 -4
- package/CHANGELOG.md +0 -15
- package/dist/chunk-5TAZCOCH.js +0 -1
- package/dist/chunk-AA7IK7Y5.js +0 -1
- package/dist/chunk-C62PIKZ5.js +0 -1
- package/dist/chunk-DGGPN6YK.js +0 -1
- package/dist/chunk-HUM6DWGV.js +0 -1
- package/dist/chunk-LYZGAQ5N.js +0 -1
- package/dist/chunk-OHN6TEOW.js +0 -1
- package/dist/chunk-PN7DOU52.js +0 -1
- package/dist/chunk-SD2G45FB.js +0 -1
- package/dist/chunk-TEDOG7PC.js +0 -1
- package/dist/chunk-UMYWSM5J.js +0 -1
- package/dist/useNextPrev.d.ts +0 -4
- package/dist/useNextPrev.js +0 -1
- package/src/__tests__/store.test.ts +0 -126
- package/src/__tests__/test-utils/utils.tsx +0 -25
- package/src/__tests__/useAppHeader.test.ts +0 -182
- package/src/__tests__/useBreadcrumbs.test.ts +0 -42
- package/src/__tests__/useFooter.test.ts +0 -64
- package/src/__tests__/useLayout.test.ts +0 -24
- package/src/__tests__/useMeta.test.ts +0 -35
- package/src/__tests__/useRoute.test.ts +0 -24
- package/src/__tests__/useTableOfContents.test.ts +0 -31
- package/src/index.ts +0 -13
- package/src/store.ts +0 -105
- package/src/types/appHeader.ts +0 -72
- package/src/types/breadcrumbs.ts +0 -21
- package/src/types/footer.ts +0 -17
- package/src/types/helpLinks.ts +0 -13
- package/src/types/index.ts +0 -10
- package/src/types/layout.ts +0 -7
- package/src/types/meta.ts +0 -13
- package/src/types/route.ts +0 -7
- package/src/types/sharedConfig.ts +0 -16
- package/src/types/sidebar.ts +0 -22
- package/src/types/tableOfContents.ts +0 -19
- package/src/useAppHeader.ts +0 -64
- package/src/useBreadcrumbs.ts +0 -11
- package/src/useFooter.ts +0 -10
- package/src/useLayout.ts +0 -9
- package/src/useMeta.ts +0 -17
- package/src/useNextPrev.ts +0 -43
- package/src/useRoute.ts +0 -9
- package/src/useSidebar.ts +0 -16
- package/src/useTableOfContents.ts +0 -10
- package/tsconfig.json +0 -9
- /package/dist/{chunk-ASPK4M5R.js → chunk-BHW7CEID.js} +0 -0
package/README.md
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
# Mosaic Site Store
|
|
2
2
|
|
|
3
|
-
`@
|
|
3
|
+
`@jpmorganchase/mosaic-store` an extendable API for accessing Mosaic state and props.
|
|
4
4
|
|
|
5
5
|
The Mosaic store is based on [Zustand](https://zustand-demo.pmnd.rs/).
|
|
6
6
|
|
|
7
7
|
## Installation
|
|
8
8
|
|
|
9
|
-
`yarn add @
|
|
9
|
+
`yarn add @jpmorganchase/mosaic-store`
|
|
10
|
+
|
|
11
|
+
The Redux DevTools chrome extension can be used to view the contents of the store if required.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as e}from"./chunk-6VYGXDI5.js";function u(){return{route:e(t=>t.route)}}export{u as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as o}from"./chunk-6VYGXDI5.js";function f(){return o(e=>e.sharedConfig?.footer)}export{f as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as t}from"./chunk-6VYGXDI5.js";function u(e){return e.links!==void 0}function d(e){return e.link!==void 0}function M(){let e=t(n=>n.sharedConfig?.header);if(!e)return;let i=e.menu.reduce((n,p)=>{if(u(p)){let r={...p,type:"menu"};return[...n,r]}if(d(p)){let r={...p,type:"link"};return[...n,r]}return console.error("Unknown menu type passed to useAppHeader, ignoring",p),n},[]);return{...e,menu:i}}export{M as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useLayoutEffect as l,createContext as f,useContext as p}from"react";import{createStore as u,useStore as m}from"zustand";import{devtools as y,persist as C}from"zustand/middleware";var r;function s(){return{breadcrumbs:[],sidebarData:[],tableOfContents:[],navigation:{},searchIndex:[],searchConfig:{},sharedConfig:{},description:void 0,layout:void 0,route:void 0,title:void 0,colorMode:"light"}}var a=f(void 0);a.displayName="StoreContext";var P=a.Provider,g=e=>y(C(e,{name:"mosaic-theme-pref",partialize:t=>({colorMode:t.colorMode})})),n=(e={})=>u(g(o=>({...s(),...e,actions:{setColorMode:i=>o({colorMode:i})}})));function T(e,t=!1){if(typeof window>"u"||t)return()=>n(e);let o=!!r;return r=r??n(e),l(()=>{if(e&&o){let i={...s(),...e},{colorMode:S,actions:d,...c}=r.getState();r.setState({...c,...i,colorMode:S,actions:d},!0)}}),()=>r}function v(e,t){let o=p(a);if(!o)throw new Error("Missing StoreProvider in the tree");return m(o,e,t)}export{P as a,n as b,T as c,v as d};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as c}from"./chunk-6VYGXDI5.js";function t(){let e=c(r=>r.searchIndex),o=c(r=>r.searchConfig),n=o!==void 0&&e!==void 0&&e.length>0;return{searchEnabled:n,searchIndex:n?e:[],searchConfig:n?o:{}}}export{t as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as o}from"./chunk-6VYGXDI5.js";var r=()=>o(t=>t.actions);export{r as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as t}from"./chunk-6VYGXDI5.js";function o(){return{meta:t(e=>({description:e.description,breadcrumbs:e.breadcrumbs,title:e.title}))}}export{o as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as e}from"./chunk-6VYGXDI5.js";function m(t=1){let r=e(b=>b.breadcrumbs);return{breadcrumbs:r||[],enabled:r?.length>t}}export{m as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as c}from"./chunk-256AGL5I.js";import{a as u}from"./chunk-CF4MD2TQ.js";import{d as s}from"./chunk-6VYGXDI5.js";function p(){let e=s(o=>o.sidebarData)||[],{route:r}=c(),{breadcrumbs:t}=u();return{menu:e,selectedNodeId:r,selectedGroupIds:d(t)}}function d(e){let r=e.reduce((t,{id:o})=>[...t,o.replace(/\/[^\/]*$/,"")],[]);return new Set(r)}export{p as a};
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as t}from"./chunk-6VYGXDI5.js";function e(){return{layout:t(o=>o.layout)}}export{e as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as t}from"./chunk-6VYGXDI5.js";function s(){return{tableOfContents:t(e=>e.tableOfContents)||[]}}export{s as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as o}from"./chunk-6VYGXDI5.js";function d(){return o(r=>r.colorMode)}export{d as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as t}from"./chunk-6VYGXDI5.js";function r(){let{next:o,prev:i}=t(n=>n.navigation)||{};return{next:o,prev:i}}export{r as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var t=(e=>(e.MENU="menu",e.LINK="link",e))(t||{});export{t as a};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
export * from './store';
|
|
2
2
|
export * from './useAppHeader';
|
|
3
3
|
export * from './useBreadcrumbs';
|
|
4
|
+
export * from './useColorMode';
|
|
4
5
|
export * from './useLayout';
|
|
5
6
|
export * from './useMeta';
|
|
6
|
-
export * from './
|
|
7
|
+
export * from './useNavigation';
|
|
7
8
|
export * from './useRoute';
|
|
9
|
+
export * from './useSearchIndex';
|
|
8
10
|
export * from './useSidebar';
|
|
9
11
|
export * from './useTableOfContents';
|
|
10
12
|
export * from './useFooter';
|
|
13
|
+
export * from './useStoreActions';
|
|
11
14
|
export * from './types';
|
|
12
|
-
export { MenuItemType } from './types';
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as
|
|
1
|
+
import{a as c}from"./chunk-YZFJJMDS.js";import{a as g}from"./chunk-AA7FGYRS.js";import{a as h}from"./chunk-G734VGFN.js";import{a as d}from"./chunk-256AGL5I.js";import{a as k}from"./chunk-ATQVZ6KV.js";import{a as i}from"./chunk-PSHWPPFM.js";import{a as p}from"./chunk-6BPHTR6G.js";import"./chunk-BHW7CEID.js";import"./chunk-IS7TJ54I.js";import"./chunk-5L7EI47O.js";import"./chunk-MBLLQB7A.js";import"./chunk-ZJYDN5YH.js";import"./chunk-UK5NIPTI.js";import"./chunk-ZYJGHEAC.js";import"./chunk-BZYGOU7Y.js";import"./chunk-UGD4MMRB.js";import"./chunk-LAADEEXW.js";import"./chunk-BHMVW2ZZ.js";import{a as m}from"./chunk-ZMWHBFUG.js";import"./chunk-VXYECVIB.js";import{a as t}from"./chunk-CF4MD2TQ.js";import{a as x}from"./chunk-Q3JUP6BM.js";import{a as j}from"./chunk-5GXF566S.js";import{a}from"./chunk-NZGUNCV2.js";import{a as b}from"./chunk-BNDCMZAE.js";import{a as o,b as r,c as e,d as f}from"./chunk-6VYGXDI5.js";export{m as MenuItemType,o as StoreProvider,r as initializeStore,p as useAppHeader,t as useBreadcrumbs,x as useColorMode,e as useCreateStore,j as useFooter,a as useLayout,b as useMeta,c as useNavigation,d as useRoute,g as useSearchIndex,h as useSidebar,f as useStore,k as useStoreActions,i as useTableOfContents};
|
package/dist/store.d.ts
CHANGED
|
@@ -1,28 +1,56 @@
|
|
|
1
1
|
import { StoreApi } from 'zustand';
|
|
2
2
|
import type { BreadcrumbsSlice } from './types/breadcrumbs';
|
|
3
|
+
import type { SearchIndexSlice } from './types/searchIndex';
|
|
3
4
|
import type { SharedConfigSlice } from './types/sharedConfig';
|
|
4
5
|
import type { LayoutSlice } from './types/layout';
|
|
6
|
+
import type { NavigationSlice } from './types/navigation';
|
|
5
7
|
import type { SidebarSlice } from './types/sidebar';
|
|
6
8
|
import type { TableOfContentsSlice } from './types/tableOfContents';
|
|
7
|
-
|
|
9
|
+
import type { ColorMode } from './types/colorMode';
|
|
10
|
+
export type SiteState = BreadcrumbsSlice & LayoutSlice & SidebarSlice & TableOfContentsSlice & NavigationSlice & SearchIndexSlice & SharedConfigSlice & {
|
|
8
11
|
/** Page metadata description, used by search */
|
|
9
12
|
description?: string;
|
|
10
13
|
/** Page route */
|
|
11
14
|
route?: string;
|
|
12
15
|
/** Page title */
|
|
13
16
|
title?: string;
|
|
17
|
+
colorMode: ColorMode;
|
|
18
|
+
actions: {
|
|
19
|
+
setColorMode: (colorMode: ColorMode) => void;
|
|
20
|
+
};
|
|
14
21
|
};
|
|
22
|
+
type PeristedStoreState = Pick<SiteState, 'colorMode'>;
|
|
15
23
|
declare const StoreProvider: import("react").Provider<StoreApi<SiteState> | undefined>;
|
|
16
|
-
declare const initializeStore: (preloadedState?: Partial<SiteState>) => Omit<StoreApi<SiteState>, "setState"> & {
|
|
24
|
+
declare const initializeStore: (preloadedState?: Partial<SiteState>) => Omit<Omit<StoreApi<SiteState>, "setState"> & {
|
|
17
25
|
setState<A extends string | {
|
|
18
26
|
type: unknown;
|
|
19
27
|
}>(partial: SiteState | Partial<SiteState> | ((state: SiteState) => SiteState | Partial<SiteState>), replace?: boolean | undefined, action?: A | undefined): void;
|
|
28
|
+
}, "persist"> & {
|
|
29
|
+
persist: {
|
|
30
|
+
setOptions: (options: Partial<import("zustand/middleware").PersistOptions<SiteState, PeristedStoreState>>) => void;
|
|
31
|
+
clearStorage: () => void;
|
|
32
|
+
rehydrate: () => Promise<void> | void;
|
|
33
|
+
hasHydrated: () => boolean;
|
|
34
|
+
onHydrate: (fn: (state: SiteState) => void) => () => void;
|
|
35
|
+
onFinishHydration: (fn: (state: SiteState) => void) => () => void;
|
|
36
|
+
getOptions: () => Partial<import("zustand/middleware").PersistOptions<SiteState, PeristedStoreState>>;
|
|
37
|
+
};
|
|
20
38
|
};
|
|
21
|
-
declare function useCreateStore(serverInitialState: Partial<SiteState>, isSSR?: boolean): () => Omit<StoreApi<SiteState>, "setState"> & {
|
|
39
|
+
declare function useCreateStore(serverInitialState: Partial<SiteState>, isSSR?: boolean): (() => Omit<Omit<StoreApi<SiteState>, "setState"> & {
|
|
22
40
|
setState<A extends string | {
|
|
23
41
|
type: unknown;
|
|
24
42
|
}>(partial: SiteState | Partial<SiteState> | ((state: SiteState) => SiteState | Partial<SiteState>), replace?: boolean | undefined, action?: A | undefined): void;
|
|
25
|
-
}
|
|
43
|
+
}, "persist"> & {
|
|
44
|
+
persist: {
|
|
45
|
+
setOptions: (options: Partial<import("zustand/middleware").PersistOptions<SiteState, PeristedStoreState>>) => void;
|
|
46
|
+
clearStorage: () => void;
|
|
47
|
+
rehydrate: () => Promise<void> | void;
|
|
48
|
+
hasHydrated: () => boolean;
|
|
49
|
+
onHydrate: (fn: (state: SiteState) => void) => () => void;
|
|
50
|
+
onFinishHydration: (fn: (state: SiteState) => void) => () => void;
|
|
51
|
+
getOptions: () => Partial<import("zustand/middleware").PersistOptions<SiteState, PeristedStoreState>>;
|
|
52
|
+
};
|
|
53
|
+
}) | (() => StoreApi<SiteState>);
|
|
26
54
|
/**
|
|
27
55
|
* Hook providing access to state stored in the site store
|
|
28
56
|
*/
|
package/dist/store.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c,d}from"./chunk-
|
|
1
|
+
import{a,b,c,d}from"./chunk-6VYGXDI5.js";export{a as StoreProvider,b as initializeStore,c as useCreateStore,d as useStore};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { SearchIndexSlice } from './searchIndex';
|
|
1
2
|
/**
|
|
2
3
|
* [[`MenuItemType`]] defines the type of App header Menu items
|
|
3
4
|
*/
|
|
@@ -8,15 +9,17 @@ export declare enum MenuItemType {
|
|
|
8
9
|
/**
|
|
9
10
|
* [[`Menu`]] defines App Header menus
|
|
10
11
|
*/
|
|
11
|
-
export
|
|
12
|
+
export type Menu = MenuLinksItem | MenuLinkItem;
|
|
12
13
|
/**
|
|
13
14
|
* [[`MenuLinksItem`]] defines a menu of links
|
|
14
15
|
*/
|
|
15
16
|
export interface MenuLinksItem {
|
|
16
17
|
/** Collection of link options */
|
|
17
18
|
links: MenuLinkItem[];
|
|
18
|
-
/** Title of
|
|
19
|
+
/** Title of MenuLinksItem */
|
|
19
20
|
title: string;
|
|
21
|
+
/** Type of MenuLinksItem */
|
|
22
|
+
type: MenuItemType.MENU;
|
|
20
23
|
}
|
|
21
24
|
/**
|
|
22
25
|
* [[`MenuLinksItem`]] defines a menu of links and includes a type
|
|
@@ -37,6 +40,8 @@ export interface MenuLinkItem {
|
|
|
37
40
|
link: string;
|
|
38
41
|
/** Title of Tab */
|
|
39
42
|
title?: string;
|
|
43
|
+
/** Type of MenuLinkItem */
|
|
44
|
+
type: MenuItemType.LINK;
|
|
40
45
|
}
|
|
41
46
|
/**
|
|
42
47
|
* [[`MenuLinkItem`]] define a menu link and include a type
|
|
@@ -52,7 +57,7 @@ export interface AppHeaderMenuLinkItem {
|
|
|
52
57
|
/**
|
|
53
58
|
* [[`AppHeaderSlice`]] specifies the contents of the AppHeader
|
|
54
59
|
*/
|
|
55
|
-
export
|
|
60
|
+
export type AppHeaderSlice = {
|
|
56
61
|
/** App logo/title */
|
|
57
62
|
title: string;
|
|
58
63
|
/** Link to the home page */
|
|
@@ -63,4 +68,6 @@ export declare type AppHeaderSlice = {
|
|
|
63
68
|
menu: Menu[];
|
|
64
69
|
/** Search namespace, suffix used on env variable `process.env.SEARCH_ENDPOINT` to filter search results to a specific namespace. */
|
|
65
70
|
searchNamespace?: string;
|
|
71
|
+
/** Search index, created by SearchIndexPlugin */
|
|
72
|
+
searchIndex?: SearchIndexSlice;
|
|
66
73
|
};
|
package/dist/types/appHeader.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../chunk-
|
|
1
|
+
import{a}from"../chunk-ZMWHBFUG.js";export{a as MenuItemType};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* [[`Breadcrumb`]] defines the breadcrumb for a page
|
|
3
3
|
*/
|
|
4
|
-
export
|
|
4
|
+
export type Breadcrumb = {
|
|
5
5
|
/** The associated route/path of the breadcrumb */
|
|
6
6
|
path: string;
|
|
7
7
|
/** Whether the breadcrumb is hidden */
|
|
@@ -14,7 +14,7 @@ export declare type Breadcrumb = {
|
|
|
14
14
|
/**
|
|
15
15
|
* [[`BreadcrumbsSlice`]] is the associated [[`Breadcrumb`]] items
|
|
16
16
|
*/
|
|
17
|
-
export
|
|
17
|
+
export type BreadcrumbsSlice = {
|
|
18
18
|
/** Path described in breadcrumbs */
|
|
19
19
|
breadcrumbs: Breadcrumb[];
|
|
20
20
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../chunk-VXYECVIB.js";
|
|
1
|
+
import"../chunk-VXYECVIB.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var o="light",e="dark";export{e as darkMode,o as lightMode};
|
package/dist/types/footer.d.ts
CHANGED
package/dist/types/footer.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../chunk-UK5NIPTI.js";
|
|
1
|
+
import"../chunk-UK5NIPTI.js";
|
package/dist/types/helpLinks.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../chunk-ZYJGHEAC.js";
|
|
1
|
+
import"../chunk-ZYJGHEAC.js";
|
package/dist/types/index.d.ts
CHANGED
|
@@ -4,7 +4,9 @@ export * from './footer';
|
|
|
4
4
|
export * from './helpLinks';
|
|
5
5
|
export * from './layout';
|
|
6
6
|
export * from './meta';
|
|
7
|
+
export * from './navigation';
|
|
7
8
|
export * from './route';
|
|
9
|
+
export * from './searchIndex';
|
|
8
10
|
export * from './sharedConfig';
|
|
9
11
|
export * from './sidebar';
|
|
10
12
|
export * from './tableOfContents';
|
package/dist/types/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../chunk-
|
|
1
|
+
import"../chunk-BHW7CEID.js";import"../chunk-IS7TJ54I.js";import"../chunk-5L7EI47O.js";import"../chunk-MBLLQB7A.js";import"../chunk-ZJYDN5YH.js";import"../chunk-UK5NIPTI.js";import"../chunk-ZYJGHEAC.js";import"../chunk-BZYGOU7Y.js";import"../chunk-UGD4MMRB.js";import"../chunk-LAADEEXW.js";import"../chunk-BHMVW2ZZ.js";import{a}from"../chunk-ZMWHBFUG.js";import"../chunk-VXYECVIB.js";export{a as MenuItemType};
|
package/dist/types/layout.d.ts
CHANGED
package/dist/types/layout.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../chunk-BZYGOU7Y.js";
|
|
1
|
+
import"../chunk-BZYGOU7Y.js";
|
package/dist/types/meta.d.ts
CHANGED
package/dist/types/meta.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../chunk-UGD4MMRB.js";
|
|
1
|
+
import"../chunk-UGD4MMRB.js";
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Page within a sequence
|
|
3
|
+
*/
|
|
4
|
+
export type NavigationLink = {
|
|
5
|
+
/** page title */
|
|
6
|
+
title: string;
|
|
7
|
+
/** page route */
|
|
8
|
+
route: string;
|
|
9
|
+
/** parent group */
|
|
10
|
+
group?: string;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* [[`Navigation`]] specifies page navigation such as next or previous pages
|
|
14
|
+
*/
|
|
15
|
+
export type Navigation = {
|
|
16
|
+
/** next page in sequence */
|
|
17
|
+
next?: NavigationLink;
|
|
18
|
+
/** previous page in sequence */
|
|
19
|
+
prev?: NavigationLink;
|
|
20
|
+
};
|
|
21
|
+
export type NavigationSlice = {
|
|
22
|
+
navigation?: Navigation;
|
|
23
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../chunk-LAADEEXW.js";
|
package/dist/types/route.d.ts
CHANGED
package/dist/types/route.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../chunk-BHMVW2ZZ.js";
|
|
1
|
+
import"../chunk-BHMVW2ZZ.js";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
type SearchDataPage = {
|
|
2
|
+
title: string;
|
|
3
|
+
content: string[];
|
|
4
|
+
route: string;
|
|
5
|
+
};
|
|
6
|
+
export type SearchIndex = SearchDataPage[];
|
|
7
|
+
export type SearchConfig = {
|
|
8
|
+
includeScore?: boolean;
|
|
9
|
+
includeMatches?: boolean;
|
|
10
|
+
maxPatternLength?: number;
|
|
11
|
+
ignoreLocation?: boolean;
|
|
12
|
+
threshold?: number;
|
|
13
|
+
keys?: string[] | {
|
|
14
|
+
name: string;
|
|
15
|
+
weight: number;
|
|
16
|
+
}[];
|
|
17
|
+
};
|
|
18
|
+
export type SearchIndexSlice = {
|
|
19
|
+
searchIndex?: SearchIndex;
|
|
20
|
+
searchConfig?: SearchConfig;
|
|
21
|
+
};
|
|
22
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../chunk-IS7TJ54I.js";
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import type { AppHeaderSlice } from './appHeader';
|
|
2
2
|
import type { FooterSlice } from './footer';
|
|
3
|
-
|
|
4
|
-
export declare type SharedConfig = {
|
|
3
|
+
export type SharedConfig = {
|
|
5
4
|
/** Footer props */
|
|
6
5
|
footer?: FooterSlice;
|
|
7
6
|
/** Header props */
|
|
8
7
|
header?: AppHeaderSlice;
|
|
9
8
|
/** Sidebar props */
|
|
10
|
-
sidebar?:
|
|
9
|
+
sidebar?: Pick<FooterSlice, 'helpLinks'>;
|
|
11
10
|
};
|
|
12
|
-
export
|
|
13
|
-
sharedConfig
|
|
11
|
+
export type SharedConfigSlice = {
|
|
12
|
+
sharedConfig?: SharedConfig;
|
|
14
13
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../chunk-5L7EI47O.js";
|
|
1
|
+
import"../chunk-5L7EI47O.js";
|
package/dist/types/sidebar.d.ts
CHANGED
|
@@ -1,22 +1,37 @@
|
|
|
1
|
-
export
|
|
1
|
+
export interface SidebarNode {
|
|
2
2
|
/** The id of the item */
|
|
3
3
|
id: string;
|
|
4
|
+
/** Node kind */
|
|
5
|
+
kind: 'data';
|
|
4
6
|
/** The name of the item */
|
|
5
7
|
name: string;
|
|
6
8
|
/** Sidebar data */
|
|
7
9
|
data: {
|
|
10
|
+
/** The level of the menu item from the sidebar root */
|
|
11
|
+
level: number;
|
|
8
12
|
/** The link of the item */
|
|
9
13
|
link: string;
|
|
10
14
|
};
|
|
15
|
+
/** Whether the item is hidden */
|
|
16
|
+
hidden: boolean;
|
|
17
|
+
}
|
|
18
|
+
export interface SidebarGroup {
|
|
19
|
+
/** The id of the item */
|
|
20
|
+
id: string;
|
|
21
|
+
/** Node kind */
|
|
22
|
+
kind: 'group';
|
|
11
23
|
/** Child nodes */
|
|
12
24
|
childNodes: SidebarItem[];
|
|
25
|
+
/** The name of the item */
|
|
26
|
+
name: string;
|
|
13
27
|
/** Whether the item is hidden */
|
|
14
28
|
hidden: boolean;
|
|
15
|
-
}
|
|
29
|
+
}
|
|
30
|
+
export type SidebarItem = SidebarNode | SidebarGroup;
|
|
16
31
|
/**
|
|
17
32
|
* [[`SidebarSlice`]] specifies sidebar content
|
|
18
33
|
*/
|
|
19
|
-
export
|
|
34
|
+
export type SidebarSlice = {
|
|
20
35
|
/** Sidebar items */
|
|
21
36
|
sidebarData: SidebarItem[];
|
|
22
37
|
};
|
package/dist/types/sidebar.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../chunk-MBLLQB7A.js";
|
|
1
|
+
import"../chunk-MBLLQB7A.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* [[`TableOfContentsItem`]] defines a table of contents item
|
|
3
3
|
*/
|
|
4
|
-
export
|
|
4
|
+
export type TableOfContentsItem = {
|
|
5
5
|
/** The depth of the heading */
|
|
6
6
|
level: number;
|
|
7
7
|
/** The id attribute of the heading */
|
|
@@ -12,7 +12,7 @@ export declare type TableOfContentsItem = {
|
|
|
12
12
|
/**
|
|
13
13
|
* [[`TableOfContentsSlice`]] defines the table of contents for a page
|
|
14
14
|
*/
|
|
15
|
-
export
|
|
15
|
+
export type TableOfContentsSlice = {
|
|
16
16
|
/** Path described in breadcrumbs */
|
|
17
17
|
tableOfContents: TableOfContentsItem[];
|
|
18
18
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../chunk-ZJYDN5YH.js";
|
|
1
|
+
import"../chunk-ZJYDN5YH.js";
|
package/dist/useAppHeader.d.ts
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import type { AppHeaderSlice, AppHeaderMenuLinkItem, AppHeaderMenuLinksItem } from './types';
|
|
2
|
-
export
|
|
3
|
-
export interface AppHeader extends Omit<AppHeaderSlice, '
|
|
4
|
-
HeaderControlsProps?: {
|
|
5
|
-
searchEndpoint: string;
|
|
6
|
-
};
|
|
2
|
+
export type AppHeaderMenu = Array<AppHeaderMenuLinksItem | AppHeaderMenuLinkItem>;
|
|
3
|
+
export interface AppHeader extends Omit<AppHeaderSlice, 'menu'> {
|
|
7
4
|
menu: AppHeaderMenu;
|
|
8
5
|
}
|
|
9
6
|
export declare function useAppHeader(): AppHeader | undefined;
|
package/dist/useAppHeader.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
1
|
+
import{a}from"./chunk-6BPHTR6G.js";import"./chunk-BHW7CEID.js";import"./chunk-IS7TJ54I.js";import"./chunk-5L7EI47O.js";import"./chunk-MBLLQB7A.js";import"./chunk-ZJYDN5YH.js";import"./chunk-UK5NIPTI.js";import"./chunk-ZYJGHEAC.js";import"./chunk-BZYGOU7Y.js";import"./chunk-UGD4MMRB.js";import"./chunk-LAADEEXW.js";import"./chunk-BHMVW2ZZ.js";import"./chunk-ZMWHBFUG.js";import"./chunk-VXYECVIB.js";import"./chunk-6VYGXDI5.js";export{a as useAppHeader};
|
package/dist/useBreadcrumbs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
1
|
+
import{a}from"./chunk-CF4MD2TQ.js";import"./chunk-6VYGXDI5.js";export{a as useBreadcrumbs};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-Q3JUP6BM.js";import"./chunk-6VYGXDI5.js";export{a as useColorMode};
|
package/dist/useFooter.d.ts
CHANGED
package/dist/useFooter.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
1
|
+
import{a}from"./chunk-5GXF566S.js";import"./chunk-6VYGXDI5.js";export{a as useFooter};
|
package/dist/useLayout.d.ts
CHANGED
package/dist/useLayout.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
1
|
+
import{a}from"./chunk-NZGUNCV2.js";import"./chunk-6VYGXDI5.js";export{a as useLayout};
|
package/dist/useMeta.d.ts
CHANGED
package/dist/useMeta.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
1
|
+
import{a}from"./chunk-BNDCMZAE.js";import"./chunk-6VYGXDI5.js";export{a as useMeta};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-YZFJJMDS.js";import"./chunk-6VYGXDI5.js";export{a as useNavigation};
|
package/dist/useRoute.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
1
|
+
import{a}from"./chunk-256AGL5I.js";import"./chunk-6VYGXDI5.js";export{a as useRoute};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-AA7FGYRS.js";import"./chunk-6VYGXDI5.js";export{a as useSearchIndex};
|
package/dist/useSidebar.d.ts
CHANGED
package/dist/useSidebar.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{a}from"./chunk-G734VGFN.js";import"./chunk-256AGL5I.js";import"./chunk-CF4MD2TQ.js";import"./chunk-6VYGXDI5.js";export{a as useSidebar};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-ATQVZ6KV.js";import"./chunk-6VYGXDI5.js";export{a as useStoreActions};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
1
|
+
import{a}from"./chunk-PSHWPPFM.js";import"./chunk-6VYGXDI5.js";export{a as useTableOfContents};
|