@gpichot/spectacle-deck 1.1.6 → 1.2.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/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import React from "react";
2
- export * from 'spectacle';
2
+ import { LayoutComponent } from "./context";
3
+ export * from "spectacle";
3
4
  export { default as FilePane } from "./components/FilePane";
4
5
  export { ItemsColumn } from "./components/ItemsColumn";
5
6
  export { Doc, DocItem } from "./components/DocumentationItem";
@@ -20,14 +21,36 @@ export type DeckType = {
20
21
  export declare function PassThrough({ children }: {
21
22
  children: React.ReactNode;
22
23
  }): React.JSX.Element;
23
- export declare function Layout({ children, frontmatter, }: {
24
- children: React.ReactNode;
25
- frontmatter: {
26
- layout?: string;
24
+ export declare const layouts: {
25
+ mainSection: ({ children, }: {
26
+ children: React.ReactNode;
27
+ }) => React.JSX.Element;
28
+ centered: (props: Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">) => React.JSX.Element;
29
+ default3: ({ children, position, }: {
30
+ children: React.ReactNode;
31
+ position?: "left" | "right";
32
+ }) => React.JSX.Element;
33
+ quote: typeof import("./layouts/QuoteLayout").QuoteLayout;
34
+ sidedCode: typeof import("./layouts/SideCodeLayout").SidedCodeLayout;
35
+ sidedImage: ({ children, image, position, height, ratio: ratioProp, }: {
36
+ children: React.ReactNode;
37
+ image?: string;
38
+ position?: "left" | "right";
39
+ ratio?: string;
40
+ height?: number;
41
+ }) => React.JSX.Element;
42
+ side: typeof import("./layouts/SideLayout").SideLayout;
43
+ section: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
44
+ };
45
+ interface ThemeOptions {
46
+ themeTokens: {
47
+ colors: Record<string, string>;
27
48
  };
28
- }): React.JSX.Element;
29
- export declare function Deck({ deck }: {
49
+ }
50
+ export declare function Deck({ deck, theme, layouts, }: {
30
51
  deck: DeckType;
52
+ theme: ThemeOptions;
53
+ layouts?: Record<string, LayoutComponent>;
31
54
  }): React.JSX.Element;
32
55
  export declare function Danger({ children }: {
33
56
  children: React.ReactNode;