Skip to content

Commit

Permalink
Prepare for release.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tylerian committed Oct 18, 2019
1 parent 030ddc2 commit 09ff5d1
Show file tree
Hide file tree
Showing 14 changed files with 39 additions and 28 deletions.
8 changes: 6 additions & 2 deletions out/types/context/styletron-consumer.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/// <reference types="react" />
declare const StyletronConsumer: import("react").ExoticComponent<import("react").ConsumerProps<import("styletron-standard").StandardEngine>>;
import { ReactChild } from "react";
import { StandardEngine } from "styletron-standard";
declare type StyletronConsumerProps = {
children: (engine: StandardEngine) => ReactChild | null;
};
declare function StyletronConsumer(props: StyletronConsumerProps): JSX.Element;
export { StyletronConsumer };
9 changes: 6 additions & 3 deletions out/types/context/styletron-context.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
/// <reference types="react" />
import { Context } from "react";
import { StandardEngine } from "styletron-standard";
declare const StyletronContext: import("react").Context<StandardEngine>;
export { StyletronContext };
declare type StyletronContextValue = {
engine?: StandardEngine;
};
declare function getStyletronContext(): Context<StyletronContextValue>;
export { getStyletronContext };
8 changes: 6 additions & 2 deletions out/types/context/styletron-provider.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/// <reference types="react" />
declare const StyletronProvider: import("react").ProviderExoticComponent<import("react").ProviderProps<import("styletron-standard").StandardEngine>>;
import { PropsWithChildren } from "react";
import { StandardEngine } from 'styletron-standard';
declare type StyletronProviderProps = PropsWithChildren<{
engine: StandardEngine;
}>;
declare function StyletronProvider(props: StyletronProviderProps): JSX.Element;
export { StyletronProvider };
File renamed without changes.
File renamed without changes.
7 changes: 3 additions & 4 deletions out/types/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import { StyletronContext } from "./context/styletron-context";
import { StyletronConsumer } from "./context/styletron-consumer";
import { StyletronProvider } from "./context/styletron-provider";
import { StyletronAtomicEngineProvider, DEFAULT_STYLETRON_HYDRATE_QUERY_SELECTOR } from "./providers/styletron-atomic-engine-provider";
import { getAtomicProvider } from "./utilities/get-provider";
import { getStyletronClient, getStyletronServer } from "./utilities/get-styletron";
import { useStyletron } from "./utilities/use-styletron";
import { useStyletronDriver } from "./utilities/use-styletron-driver";
import { useStyletron } from "./hooks/use-styletron";
import { useStyletronDriver } from "./hooks/use-styletron-driver";
import { withStyletron } from "./utilities/with-styletron";
export { StyletronContext, StyletronConsumer, StyletronProvider, getAtomicProvider, getStyletronClient, getStyletronServer, useStyletron, useStyletronDriver, withStyletron, StyletronAtomicEngineProvider, DEFAULT_STYLETRON_HYDRATE_QUERY_SELECTOR };
export { StyletronConsumer, StyletronProvider, getAtomicProvider, getStyletronClient, getStyletronServer, useStyletron, useStyletronDriver, withStyletron, StyletronAtomicEngineProvider, DEFAULT_STYLETRON_HYDRATE_QUERY_SELECTOR };
3 changes: 0 additions & 3 deletions out/types/utilities/get-atomic-provider.d.ts

This file was deleted.

6 changes: 6 additions & 0 deletions out/types/utilities/get-provider.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
import { StyletronAtomicEngineProvider, StyletronAtomicEngineProviderOptions } from "../providers/styletron-atomic-engine-provider";
/**
* Return a new instance of a StyletronEngineProvider
* based on StyletronAtomic as its backing engine.
*
* @param options StyletronAtomicEngine configuration options.
*/
declare function getAtomicProvider(options?: StyletronAtomicEngineProviderOptions): StyletronAtomicEngineProvider;
export { getAtomicProvider };
2 changes: 0 additions & 2 deletions out/types/utilities/get-styletron-atomic.d.ts

This file was deleted.

5 changes: 0 additions & 5 deletions out/types/utilities/get-styletron-client.d.ts

This file was deleted.

5 changes: 0 additions & 5 deletions out/types/utilities/get-styletron-server.d.ts

This file was deleted.

7 changes: 6 additions & 1 deletion out/types/utilities/get-styletron.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* Return a new instance of a styletron client if ran client-side,
* or a new instance of a styletron server if ran server-side.
*/
declare function getStyletron(): import("styletron-engine-atomic").Client | import("styletron-engine-atomic").Server;
/**
* Return a new instance of a styletron client with preset defaults.
*/
Expand All @@ -6,4 +11,4 @@ declare function getStyletronClient(): import("styletron-engine-atomic").Client;
* Return a new instance of a styletron server with preset defaults.
*/
declare function getStyletronServer(): import("styletron-engine-atomic").Server;
export { getStyletronClient, getStyletronServer };
export { getStyletron, getStyletronClient, getStyletronServer };
5 changes: 5 additions & 0 deletions out/types/utilities/with-styletron.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/// <reference types="react" />
/**
* Passes an styletron instance down the component tree.
*
* @param Component A react component to pass styletron.
*/
declare const withStyletron: (Component: any) => (props: any) => JSX.Element;
export { withStyletron };
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "styletron-react-lite",
"version": "2.1.2",
"version": "2.1.3",
"description": "A lightweight styletron binding for React.",
"main": "out/styletron-react-lite.cjs.js",
"module": "out/styletron-react-lite.esm.js",
Expand Down

0 comments on commit 09ff5d1

Please sign in to comment.