@craftzbay/ui 0.6.0 → 0.6.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.
|
@@ -11,6 +11,12 @@ interface DocLayoutProps {
|
|
|
11
11
|
kind: Route['kind'];
|
|
12
12
|
slug?: string;
|
|
13
13
|
};
|
|
14
|
+
/**
|
|
15
|
+
* Additional sections searched ONLY when a query is active. Pass the other
|
|
16
|
+
* kinds' sidebar sections so a user on the Components page can still find
|
|
17
|
+
* Templates / Guides through search.
|
|
18
|
+
*/
|
|
19
|
+
crossKindSections?: DocSidebarSection[];
|
|
14
20
|
children: ReactNode;
|
|
15
21
|
}
|
|
16
22
|
/**
|
|
@@ -18,5 +24,5 @@ interface DocLayoutProps {
|
|
|
18
24
|
* The sticky ShowcaseTopBar sits above this in App.tsx, so the sidebar
|
|
19
25
|
* top offset is 3.5rem (h-14).
|
|
20
26
|
*/
|
|
21
|
-
export declare function DocLayout({ sidebar, topLinks, current, children }: DocLayoutProps): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
export declare function DocLayout({ sidebar, topLinks, current, crossKindSections, children, }: DocLayoutProps): import("react/jsx-runtime").JSX.Element;
|
|
22
28
|
export {};
|
|
@@ -22,6 +22,12 @@ interface DocSidebarProps {
|
|
|
22
22
|
label: string;
|
|
23
23
|
route: Route;
|
|
24
24
|
}[];
|
|
25
|
+
/**
|
|
26
|
+
* Additional sections searched ONLY when a query is active. Lets the
|
|
27
|
+
* Components-page sidebar surface matching Templates and Guides results
|
|
28
|
+
* without showing them when the query is empty.
|
|
29
|
+
*/
|
|
30
|
+
crossKindSections?: DocSidebarSection[];
|
|
25
31
|
}
|
|
26
|
-
export declare function DocSidebar({ sections, current, topLinks }: DocSidebarProps): import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
export declare function DocSidebar({ sections, current, topLinks, crossKindSections, }: DocSidebarProps): import("react/jsx-runtime").JSX.Element;
|
|
27
33
|
export {};
|
|
@@ -12,3 +12,11 @@ export declare const docTopLinks: {
|
|
|
12
12
|
label: string;
|
|
13
13
|
route: Route;
|
|
14
14
|
}[];
|
|
15
|
+
type Kind = 'component' | 'template' | 'guide';
|
|
16
|
+
/**
|
|
17
|
+
* Returns the sidebar sections for the two kinds NOT matching `currentKind`.
|
|
18
|
+
* Passed to DocLayout as `crossKindSections` so the search input can surface
|
|
19
|
+
* matches from other docs sections without showing them when idle.
|
|
20
|
+
*/
|
|
21
|
+
export declare function buildCrossKindSections(currentKind: Kind): DocSidebarSection[];
|
|
22
|
+
export {};
|
|
@@ -36,4 +36,4 @@ export type Route = {
|
|
|
36
36
|
};
|
|
37
37
|
export declare function parseHash(hash: string): Route;
|
|
38
38
|
export declare function routeToHash(route: Route): string;
|
|
39
|
-
export declare function isFullBleedRoute(
|
|
39
|
+
export declare function isFullBleedRoute(_route: Route): boolean;
|
package/package.json
CHANGED