@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.
Files changed (120) hide show
  1. package/README.md +4 -2
  2. package/dist/chunk-256AGL5I.js +1 -0
  3. package/dist/chunk-5GXF566S.js +1 -0
  4. package/dist/chunk-6BPHTR6G.js +1 -0
  5. package/dist/chunk-6VYGXDI5.js +1 -0
  6. package/dist/chunk-AA7FGYRS.js +1 -0
  7. package/dist/chunk-ATQVZ6KV.js +1 -0
  8. package/dist/chunk-BNDCMZAE.js +1 -0
  9. package/dist/chunk-CF4MD2TQ.js +1 -0
  10. package/dist/chunk-G734VGFN.js +1 -0
  11. package/dist/chunk-IS7TJ54I.js +0 -0
  12. package/dist/chunk-LAADEEXW.js +0 -0
  13. package/dist/chunk-NZGUNCV2.js +1 -0
  14. package/dist/chunk-PSHWPPFM.js +1 -0
  15. package/dist/chunk-Q3JUP6BM.js +1 -0
  16. package/dist/chunk-YZFJJMDS.js +1 -0
  17. package/dist/chunk-ZMWHBFUG.js +1 -0
  18. package/dist/index.d.ts +4 -2
  19. package/dist/index.js +1 -1
  20. package/dist/store.d.ts +32 -4
  21. package/dist/store.js +1 -1
  22. package/dist/types/appHeader.d.ts +10 -3
  23. package/dist/types/appHeader.js +1 -1
  24. package/dist/types/breadcrumbs.d.ts +2 -2
  25. package/dist/types/breadcrumbs.js +1 -1
  26. package/dist/types/colorMode.d.ts +3 -0
  27. package/dist/types/colorMode.js +1 -0
  28. package/dist/types/footer.d.ts +1 -1
  29. package/dist/types/footer.js +1 -1
  30. package/dist/types/helpLinks.d.ts +1 -1
  31. package/dist/types/helpLinks.js +1 -1
  32. package/dist/types/index.d.ts +2 -0
  33. package/dist/types/index.js +1 -1
  34. package/dist/types/layout.d.ts +1 -1
  35. package/dist/types/layout.js +1 -1
  36. package/dist/types/meta.d.ts +1 -1
  37. package/dist/types/meta.js +1 -1
  38. package/dist/types/navigation.d.ts +23 -0
  39. package/dist/types/navigation.js +1 -0
  40. package/dist/types/route.d.ts +1 -1
  41. package/dist/types/route.js +1 -1
  42. package/dist/types/searchIndex.d.ts +22 -0
  43. package/dist/types/searchIndex.js +1 -0
  44. package/dist/types/sharedConfig.d.ts +4 -5
  45. package/dist/types/sharedConfig.js +1 -1
  46. package/dist/types/sidebar.d.ts +18 -3
  47. package/dist/types/sidebar.js +1 -1
  48. package/dist/types/tableOfContents.d.ts +2 -2
  49. package/dist/types/tableOfContents.js +1 -1
  50. package/dist/useAppHeader.d.ts +2 -5
  51. package/dist/useAppHeader.js +1 -1
  52. package/dist/useBreadcrumbs.js +1 -1
  53. package/dist/useColorMode.d.ts +2 -0
  54. package/dist/useColorMode.js +1 -0
  55. package/dist/useFooter.d.ts +1 -1
  56. package/dist/useFooter.js +1 -1
  57. package/dist/useLayout.d.ts +1 -1
  58. package/dist/useLayout.js +1 -1
  59. package/dist/useMeta.d.ts +1 -1
  60. package/dist/useMeta.js +1 -1
  61. package/dist/useNavigation.d.ts +2 -0
  62. package/dist/useNavigation.js +1 -0
  63. package/dist/useRoute.js +1 -1
  64. package/dist/useSearchIndex.d.ts +6 -0
  65. package/dist/useSearchIndex.js +1 -0
  66. package/dist/useSidebar.d.ts +2 -2
  67. package/dist/useSidebar.js +1 -1
  68. package/dist/useStoreActions.d.ts +3 -0
  69. package/dist/useStoreActions.js +1 -0
  70. package/dist/useTableOfContents.d.ts +0 -1
  71. package/dist/useTableOfContents.js +1 -1
  72. package/package.json +29 -15
  73. package/.turbo/turbo-build.log +0 -4
  74. package/CHANGELOG.md +0 -15
  75. package/dist/chunk-5TAZCOCH.js +0 -1
  76. package/dist/chunk-AA7IK7Y5.js +0 -1
  77. package/dist/chunk-C62PIKZ5.js +0 -1
  78. package/dist/chunk-DGGPN6YK.js +0 -1
  79. package/dist/chunk-HUM6DWGV.js +0 -1
  80. package/dist/chunk-LYZGAQ5N.js +0 -1
  81. package/dist/chunk-OHN6TEOW.js +0 -1
  82. package/dist/chunk-PN7DOU52.js +0 -1
  83. package/dist/chunk-SD2G45FB.js +0 -1
  84. package/dist/chunk-TEDOG7PC.js +0 -1
  85. package/dist/chunk-UMYWSM5J.js +0 -1
  86. package/dist/useNextPrev.d.ts +0 -4
  87. package/dist/useNextPrev.js +0 -1
  88. package/src/__tests__/store.test.ts +0 -126
  89. package/src/__tests__/test-utils/utils.tsx +0 -25
  90. package/src/__tests__/useAppHeader.test.ts +0 -182
  91. package/src/__tests__/useBreadcrumbs.test.ts +0 -42
  92. package/src/__tests__/useFooter.test.ts +0 -64
  93. package/src/__tests__/useLayout.test.ts +0 -24
  94. package/src/__tests__/useMeta.test.ts +0 -35
  95. package/src/__tests__/useRoute.test.ts +0 -24
  96. package/src/__tests__/useTableOfContents.test.ts +0 -31
  97. package/src/index.ts +0 -13
  98. package/src/store.ts +0 -105
  99. package/src/types/appHeader.ts +0 -72
  100. package/src/types/breadcrumbs.ts +0 -21
  101. package/src/types/footer.ts +0 -17
  102. package/src/types/helpLinks.ts +0 -13
  103. package/src/types/index.ts +0 -10
  104. package/src/types/layout.ts +0 -7
  105. package/src/types/meta.ts +0 -13
  106. package/src/types/route.ts +0 -7
  107. package/src/types/sharedConfig.ts +0 -16
  108. package/src/types/sidebar.ts +0 -22
  109. package/src/types/tableOfContents.ts +0 -19
  110. package/src/useAppHeader.ts +0 -64
  111. package/src/useBreadcrumbs.ts +0 -11
  112. package/src/useFooter.ts +0 -10
  113. package/src/useLayout.ts +0 -9
  114. package/src/useMeta.ts +0 -17
  115. package/src/useNextPrev.ts +0 -43
  116. package/src/useRoute.ts +0 -9
  117. package/src/useSidebar.ts +0 -16
  118. package/src/useTableOfContents.ts +0 -10
  119. package/tsconfig.json +0 -9
  120. /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
- `@dpmosaic/site-store` an extendable API for accessing Mosaic state and props.
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 @dpmosaic/site-store`
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 './useNextPrev';
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 j,b as l}from"./chunk-UMYWSM5J.js";import{a as k}from"./chunk-HUM6DWGV.js";import{a as m}from"./chunk-PN7DOU52.js";import{a as f}from"./chunk-AA7IK7Y5.js";import"./chunk-ASPK4M5R.js";import"./chunk-BZYGOU7Y.js";import"./chunk-UGD4MMRB.js";import"./chunk-BHMVW2ZZ.js";import"./chunk-5L7EI47O.js";import"./chunk-MBLLQB7A.js";import"./chunk-ZJYDN5YH.js";import{a as e}from"./chunk-SD2G45FB.js";import"./chunk-VXYECVIB.js";import"./chunk-UK5NIPTI.js";import"./chunk-ZYJGHEAC.js";import{a as g}from"./chunk-DGGPN6YK.js";import{a as n}from"./chunk-OHN6TEOW.js";import{a as h}from"./chunk-LYZGAQ5N.js";import{a as i}from"./chunk-C62PIKZ5.js";import{a,b,c,d}from"./chunk-TEDOG7PC.js";import"./chunk-5TAZCOCH.js";export{e as MenuItemType,a as StoreProvider,b as initializeStore,f as useAppHeader,g as useBreadcrumbs,c as useCreateStore,n as useFooter,h as useLayout,i as useMeta,j as useNextPrev,k as useRoute,l as useSidebar,d as useStore,m as useTableOfContents};
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
- export declare type SiteState = BreadcrumbsSlice & LayoutSlice & SidebarSlice & TableOfContentsSlice & SharedConfigSlice & {
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-TEDOG7PC.js";import"./chunk-5TAZCOCH.js";export{a as StoreProvider,b as initializeStore,c as useCreateStore,d as useStore};
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 declare type Menu = MenuLinksItem | MenuLinkItem;
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 Tab */
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 declare type AppHeaderSlice = {
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
  };
@@ -1 +1 @@
1
- import{a}from"../chunk-SD2G45FB.js";import"../chunk-5TAZCOCH.js";export{a as MenuItemType};
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 declare type Breadcrumb = {
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 declare type BreadcrumbsSlice = {
17
+ export type BreadcrumbsSlice = {
18
18
  /** Path described in breadcrumbs */
19
19
  breadcrumbs: Breadcrumb[];
20
20
  };
@@ -1 +1 @@
1
- import"../chunk-VXYECVIB.js";import"../chunk-5TAZCOCH.js";
1
+ import"../chunk-VXYECVIB.js";
@@ -0,0 +1,3 @@
1
+ export declare const lightMode = "light";
2
+ export declare const darkMode = "dark";
3
+ export type ColorMode = typeof lightMode | typeof darkMode;
@@ -0,0 +1 @@
1
+ var o="light",e="dark";export{e as darkMode,o as lightMode};
@@ -2,7 +2,7 @@ import { HelpLinks } from './helpLinks';
2
2
  /**
3
3
  * [[`FooterSlice`]] specifies the footer props
4
4
  */
5
- export declare type FooterSlice = {
5
+ export type FooterSlice = {
6
6
  /** Footer description/message */
7
7
  description: string;
8
8
  /** Footer title */
@@ -1 +1 @@
1
- import"../chunk-UK5NIPTI.js";import"../chunk-5TAZCOCH.js";
1
+ import"../chunk-UK5NIPTI.js";
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * [[`HelpLinks`]] specifies the support channels
3
3
  */
4
- export declare type HelpLinks = {
4
+ export type HelpLinks = {
5
5
  /** StackOverflow link label */
6
6
  stackoverflowLabel: string;
7
7
  /** StackOverflow URL for product support */
@@ -1 +1 @@
1
- import"../chunk-ZYJGHEAC.js";import"../chunk-5TAZCOCH.js";
1
+ import"../chunk-ZYJGHEAC.js";
@@ -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';
@@ -1 +1 @@
1
- import"../chunk-ASPK4M5R.js";import"../chunk-BZYGOU7Y.js";import"../chunk-UGD4MMRB.js";import"../chunk-BHMVW2ZZ.js";import"../chunk-5L7EI47O.js";import"../chunk-MBLLQB7A.js";import"../chunk-ZJYDN5YH.js";import{a}from"../chunk-SD2G45FB.js";import"../chunk-VXYECVIB.js";import"../chunk-UK5NIPTI.js";import"../chunk-ZYJGHEAC.js";import"../chunk-5TAZCOCH.js";export{a as MenuItemType};
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};
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * [[`LayoutSlice`]] specifies the page's anatomy
3
3
  */
4
- export declare type LayoutSlice = {
4
+ export type LayoutSlice = {
5
5
  /** Layout name that will define the page's anatomy */
6
6
  layout?: string;
7
7
  };
@@ -1 +1 @@
1
- import"../chunk-BZYGOU7Y.js";import"../chunk-5TAZCOCH.js";
1
+ import"../chunk-BZYGOU7Y.js";
@@ -2,7 +2,7 @@ import type { Breadcrumb } from './breadcrumbs';
2
2
  /**
3
3
  * [[`MetaSlice`]] specifies the page's head metadata
4
4
  */
5
- export declare type MetaSlice = {
5
+ export type MetaSlice = {
6
6
  /** Page description */
7
7
  description?: string;
8
8
  /** Page breadcrumbs */
@@ -1 +1 @@
1
- import"../chunk-UGD4MMRB.js";import"../chunk-5TAZCOCH.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";
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * [[`RouteSlice`]] specifies the page's route
3
3
  */
4
- export declare type RouteSlice = {
4
+ export type RouteSlice = {
5
5
  /** Current page route */
6
6
  route?: string;
7
7
  };
@@ -1 +1 @@
1
- import"../chunk-BHMVW2ZZ.js";import"../chunk-5TAZCOCH.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
- import type { SidebarSlice } from './sidebar';
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?: SidebarSlice;
9
+ sidebar?: Pick<FooterSlice, 'helpLinks'>;
11
10
  };
12
- export declare type SharedConfigSlice = {
13
- sharedConfig: SharedConfig;
11
+ export type SharedConfigSlice = {
12
+ sharedConfig?: SharedConfig;
14
13
  };
@@ -1 +1 @@
1
- import"../chunk-5L7EI47O.js";import"../chunk-5TAZCOCH.js";
1
+ import"../chunk-5L7EI47O.js";
@@ -1,22 +1,37 @@
1
- export declare type SidebarItem = {
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 declare type SidebarSlice = {
34
+ export type SidebarSlice = {
20
35
  /** Sidebar items */
21
36
  sidebarData: SidebarItem[];
22
37
  };
@@ -1 +1 @@
1
- import"../chunk-MBLLQB7A.js";import"../chunk-5TAZCOCH.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 declare type TableOfContentsItem = {
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 declare type TableOfContentsSlice = {
15
+ export type TableOfContentsSlice = {
16
16
  /** Path described in breadcrumbs */
17
17
  tableOfContents: TableOfContentsItem[];
18
18
  };
@@ -1 +1 @@
1
- import"../chunk-ZJYDN5YH.js";import"../chunk-5TAZCOCH.js";
1
+ import"../chunk-ZJYDN5YH.js";
@@ -1,9 +1,6 @@
1
1
  import type { AppHeaderSlice, AppHeaderMenuLinkItem, AppHeaderMenuLinksItem } from './types';
2
- export declare type AppHeaderMenu = Array<AppHeaderMenuLinksItem | AppHeaderMenuLinkItem>;
3
- export interface AppHeader extends Omit<AppHeaderSlice, 'searchNamespace | menu'> {
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;
@@ -1 +1 @@
1
- import{a}from"./chunk-AA7IK7Y5.js";import"./chunk-ASPK4M5R.js";import"./chunk-BZYGOU7Y.js";import"./chunk-UGD4MMRB.js";import"./chunk-BHMVW2ZZ.js";import"./chunk-5L7EI47O.js";import"./chunk-MBLLQB7A.js";import"./chunk-ZJYDN5YH.js";import"./chunk-SD2G45FB.js";import"./chunk-VXYECVIB.js";import"./chunk-UK5NIPTI.js";import"./chunk-ZYJGHEAC.js";import"./chunk-TEDOG7PC.js";import"./chunk-5TAZCOCH.js";export{a as useAppHeader};
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};
@@ -1 +1 @@
1
- import{a}from"./chunk-DGGPN6YK.js";import"./chunk-TEDOG7PC.js";import"./chunk-5TAZCOCH.js";export{a as useBreadcrumbs};
1
+ import{a}from"./chunk-CF4MD2TQ.js";import"./chunk-6VYGXDI5.js";export{a as useBreadcrumbs};
@@ -0,0 +1,2 @@
1
+ import { ColorMode } from './types/colorMode';
2
+ export declare function useColorMode(): ColorMode;
@@ -0,0 +1 @@
1
+ import{a}from"./chunk-Q3JUP6BM.js";import"./chunk-6VYGXDI5.js";export{a as useColorMode};
@@ -1,4 +1,4 @@
1
1
  import type { FooterSlice } from './types';
2
- declare type Footer = FooterSlice | undefined;
2
+ type Footer = FooterSlice | undefined;
3
3
  export declare function useFooter(): Footer;
4
4
  export {};
package/dist/useFooter.js CHANGED
@@ -1 +1 @@
1
- import{a}from"./chunk-OHN6TEOW.js";import"./chunk-TEDOG7PC.js";import"./chunk-5TAZCOCH.js";export{a as useFooter};
1
+ import{a}from"./chunk-5GXF566S.js";import"./chunk-6VYGXDI5.js";export{a as useFooter};
@@ -1,4 +1,4 @@
1
1
  import type { LayoutSlice } from './types';
2
- declare type Layout = LayoutSlice;
2
+ type Layout = LayoutSlice;
3
3
  export declare function useLayout(): Layout;
4
4
  export {};
package/dist/useLayout.js CHANGED
@@ -1 +1 @@
1
- import{a}from"./chunk-LYZGAQ5N.js";import"./chunk-TEDOG7PC.js";import"./chunk-5TAZCOCH.js";export{a as useLayout};
1
+ import{a}from"./chunk-NZGUNCV2.js";import"./chunk-6VYGXDI5.js";export{a as useLayout};
package/dist/useMeta.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import type { MetaSlice } from './types';
2
- export declare type Meta = {
2
+ export type Meta = {
3
3
  meta: MetaSlice;
4
4
  };
5
5
  export declare function useMeta(): Meta;
package/dist/useMeta.js CHANGED
@@ -1 +1 @@
1
- import{a}from"./chunk-C62PIKZ5.js";import"./chunk-TEDOG7PC.js";import"./chunk-5TAZCOCH.js";export{a as useMeta};
1
+ import{a}from"./chunk-BNDCMZAE.js";import"./chunk-6VYGXDI5.js";export{a as useMeta};
@@ -0,0 +1,2 @@
1
+ import type { Navigation } from './types';
2
+ export declare function useNavigation(): Navigation;
@@ -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-HUM6DWGV.js";import"./chunk-TEDOG7PC.js";import"./chunk-5TAZCOCH.js";export{a as useRoute};
1
+ import{a}from"./chunk-256AGL5I.js";import"./chunk-6VYGXDI5.js";export{a as useRoute};
@@ -0,0 +1,6 @@
1
+ export type { SearchIndexSlice } from './types';
2
+ export declare function useSearchIndex(): {
3
+ searchEnabled: boolean;
4
+ searchIndex: import("./types").SearchIndex;
5
+ searchConfig: import("./types").SearchConfig;
6
+ };
@@ -0,0 +1 @@
1
+ import{a}from"./chunk-AA7FGYRS.js";import"./chunk-6VYGXDI5.js";export{a as useSearchIndex};
@@ -1,5 +1,5 @@
1
1
  export declare function useSidebar(): {
2
- sidebarData: import(".").SidebarItem[];
2
+ menu: import("./types").SidebarItem[];
3
3
  selectedNodeId: string | undefined;
4
- expandedNodeIds: Set<unknown>;
4
+ selectedGroupIds: Set<string>;
5
5
  };
@@ -1 +1 @@
1
- import{b as a}from"./chunk-UMYWSM5J.js";import"./chunk-HUM6DWGV.js";import"./chunk-PN7DOU52.js";import"./chunk-AA7IK7Y5.js";import"./chunk-ASPK4M5R.js";import"./chunk-BZYGOU7Y.js";import"./chunk-UGD4MMRB.js";import"./chunk-BHMVW2ZZ.js";import"./chunk-5L7EI47O.js";import"./chunk-MBLLQB7A.js";import"./chunk-ZJYDN5YH.js";import"./chunk-SD2G45FB.js";import"./chunk-VXYECVIB.js";import"./chunk-UK5NIPTI.js";import"./chunk-ZYJGHEAC.js";import"./chunk-DGGPN6YK.js";import"./chunk-OHN6TEOW.js";import"./chunk-LYZGAQ5N.js";import"./chunk-C62PIKZ5.js";import"./chunk-TEDOG7PC.js";import"./chunk-5TAZCOCH.js";export{a as useSidebar};
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,3 @@
1
+ export declare const useStoreActions: () => {
2
+ setColorMode: (colorMode: import("./types/colorMode").ColorMode) => void;
3
+ };
@@ -0,0 +1 @@
1
+ import{a}from"./chunk-ATQVZ6KV.js";import"./chunk-6VYGXDI5.js";export{a as useStoreActions};
@@ -1,4 +1,3 @@
1
- export type { TableOfContentsItem } from './types';
2
1
  export declare function useTableOfContents(): {
3
2
  tableOfContents: import("./types").TableOfContentsItem[];
4
3
  };
@@ -1 +1 @@
1
- import{a}from"./chunk-PN7DOU52.js";import"./chunk-TEDOG7PC.js";import"./chunk-5TAZCOCH.js";export{a as useTableOfContents};
1
+ import{a}from"./chunk-PSHWPPFM.js";import"./chunk-6VYGXDI5.js";export{a as useTableOfContents};