@craftzbay/ui 0.6.0 → 0.7.0
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-lib/index.cjs +2 -2
- package/dist-lib/index.cjs.map +1 -1
- package/dist-lib/index.js +301 -305
- package/dist-lib/index.js.map +1 -1
- package/dist-lib/showcase/guides/Migration.d.ts +1 -0
- package/dist-lib/showcase/layout/DocLayout.d.ts +9 -3
- package/dist-lib/showcase/layout/DocSidebar.d.ts +15 -1
- package/dist-lib/showcase/layout/ShowcaseFooter.d.ts +5 -0
- package/dist-lib/showcase/layout/sidebars.d.ts +8 -0
- package/dist-lib/showcase/routing.d.ts +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function MigrationBody(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -11,12 +11,18 @@ 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
|
/**
|
|
17
23
|
* Two-column doc shell: left sidebar (sticky), right scrollable content.
|
|
18
|
-
*
|
|
19
|
-
*
|
|
24
|
+
* On screens < md the sidebar collapses behind a hamburger button that
|
|
25
|
+
* opens its contents in a left Sheet drawer.
|
|
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,20 @@ 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[];
|
|
31
|
+
/**
|
|
32
|
+
* Render variant. `'desktop'` (default) is sticky-positioned and hidden
|
|
33
|
+
* on screens < md. `'mobile'` is plain block — meant to be embedded inside
|
|
34
|
+
* a Sheet content.
|
|
35
|
+
*/
|
|
36
|
+
variant?: 'desktop' | 'mobile';
|
|
37
|
+
/** Called when a link is clicked. Mobile uses this to close the Sheet. */
|
|
38
|
+
onNavigate?: () => void;
|
|
25
39
|
}
|
|
26
|
-
export declare function DocSidebar({ sections, current, topLinks }: DocSidebarProps): import("react/jsx-runtime").JSX.Element;
|
|
40
|
+
export declare function DocSidebar({ sections, current, topLinks, crossKindSections, variant, onNavigate, }: DocSidebarProps): import("react/jsx-runtime").JSX.Element;
|
|
27
41
|
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