Skip to content

Commit

Permalink
chore(release): 1.0.0-alpha.3
Browse files Browse the repository at this point in the history
# [1.0.0-alpha.3](v1.0.0-alpha.2...v1.0.0-alpha.3) (2021-10-30)

### Bug Fixes

* make server types more generalized ([874b7f8](874b7f8))
  • Loading branch information
semantic-release-bot committed Oct 30, 2021
1 parent 874b7f8 commit 6b7cdde
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 81 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# [1.0.0-alpha.3](https://github.com/dash-ui/react/compare/v1.0.0-alpha.2...v1.0.0-alpha.3) (2021-10-30)


### Bug Fixes

* make server types more generalized ([874b7f8](https://github.com/dash-ui/react/commit/874b7f8593f27f33ff6789ba5bdc1575d9207483))

# [1.0.0-alpha.2](https://github.com/dash-ui/react/compare/v1.0.0-alpha.1...v1.0.0-alpha.2) (2021-10-29)

### Bug Fixes
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dash-ui/react",
"version": "1.0.0-alpha.2",
"version": "1.0.0-alpha.3",
"description": "React components and hooks for dash-ui",
"license": "MIT",
"author": "Jared Lunde <[email protected]> (https://jaredLunde.com)",
Expand Down
33 changes: 11 additions & 22 deletions server/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@ import * as React from "react";
* @param styles - An instance of `styles()`. Defaults to the default styles instance
* in `@dash-ui/styles`.
*/
export declare function toComponent(
html: string,
styles?: Styles<any, any>
): React.ReactElement;
export declare function toComponent(html: string, styles?: Styles<any, any>): React.ReactElement;
/**
* A React component for injecting SSR CSS styles into Next.js documents
*
Expand Down Expand Up @@ -39,22 +36,16 @@ export declare function toComponent(
* }
* }
*/
export declare function Style({
html,
styles,
}: StyleProps): React.ReactElement<
any,
string | React.JSXElementConstructor<any>
>;
export declare function Style({ html, styles }: StyleProps): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
export interface StyleProps {
/**
* The HTML generated by Next.js, `renderToStaticMarkup()` or `renderToString()`
*/
html: string;
/**
* An instance of `styles()`. Defaults to the default styles instance in `@dash-ui/styles`.
*/
styles?: Styles<any, any>;
/**
* The HTML generated by Next.js, `renderToStaticMarkup()` or `renderToString()`
*/
html: string;
/**
* An instance of `styles()`. Defaults to the default styles instance in `@dash-ui/styles`.
*/
styles?: Styles<any, any>;
}
/**
* Creates a Gatsby replaceRenderer for injecting styles generated by Dash on
Expand All @@ -66,7 +57,5 @@ export interface StyleProps {
* // gatsby-ssr.js
* exports.replaceRenderer = require('@dash-ui/react/server').createGatsbyRenderer()
*/
export declare function createGatsbyRenderer(
styles?: Styles<any, any>
): <P = any>(props: P) => P;
export declare function createGatsbyRenderer(styles?: Styles<any, any>): <P = any>(props: P) => P;
export * from "@dash-ui/styles/server";
75 changes: 17 additions & 58 deletions types/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
import type {
DashThemes,
DashTokens,
Falsy,
StyleCallback,
StyleObject,
Styles,
} from "@dash-ui/styles";
import type { DashThemes, DashTokens, Falsy, StyleCallback, StyleObject, Styles } from "@dash-ui/styles";
import * as React from "react";
/**
* A component for creating an inline `<style>` tag that is unmounted when
Expand All @@ -15,25 +8,19 @@ import * as React from "react";
* @param root0.css
* @param root0.styles
*/
export declare function Inline<
Tokens extends DashTokens,
Themes extends DashThemes
>({ styles, css: input }: InlineProps<Tokens, Themes>): JSX.Element | null;
export interface InlineProps<
Tokens extends DashTokens,
Themes extends DashThemes
> {
/**
* A Dash `styles` instance
*/
styles: Styles<Tokens, Themes>;
/**
* The CSS you want to inline in the DOM.
*
* @example
* const Component => <Inline css={({color}) => `html { color: ${color.text}; }`}/>
*/
css: string | StyleCallback<Tokens, Themes> | StyleObject;
export declare function Inline<Tokens extends DashTokens, Themes extends DashThemes>({ styles, css: input, }: InlineProps<Tokens, Themes>): JSX.Element | null;
export interface InlineProps<Tokens extends DashTokens, Themes extends DashThemes> {
/**
* A Dash `styles` instance
*/
styles: Styles<Tokens, Themes>;
/**
* The CSS you want to inline in the DOM.
*
* @example
* const Component => <Inline css={({color}) => `html { color: ${color.text}; }`}/>
*/
css: string | StyleCallback<Tokens, Themes> | StyleObject;
}
/**
* A hook for inserting transient global styles into the DOM. These styles
Expand All @@ -56,21 +43,7 @@ export interface InlineProps<
* )
* }
*/
export declare function useGlobal<
Tokens extends DashTokens,
Themes extends DashThemes
>(
styles: Styles<Tokens, Themes>,
value:
| string
| StyleCallback<Tokens, Themes>
| StyleObject
| null
| 0
| undefined
| false,
deps?: React.DependencyList
): void;
export declare function useGlobal<Tokens extends DashTokens, Themes extends DashThemes>(styles: Styles<Tokens, Themes>, value: string | StyleCallback<Tokens, Themes> | StyleObject | null | 0 | undefined | false, deps?: React.DependencyList): void;
/**
* A hook for inserting transient CSS tokens into the DOM. These tokens
* will be injected when the hook mounts and flushed when the hook unmounts.
Expand All @@ -89,14 +62,7 @@ export declare function useGlobal<
* )
* }
*/
export declare function useTokens<
Tokens extends DashTokens,
Themes extends DashThemes
>(
styles: Styles<Tokens, Themes>,
value: Parameters<Styles<Tokens, Themes>["insertTokens"]>[0] | Falsy,
deps?: React.DependencyList
): void;
export declare function useTokens<Tokens extends DashTokens, Themes extends DashThemes>(styles: Styles<Tokens, Themes>, value: Parameters<Styles<Tokens, Themes>["insertTokens"]>[0] | Falsy, deps?: React.DependencyList): void;
/**
* A hook for inserting transient CSS theme tokens into the DOM. These tokens
* will be injected when the hook mounts and flushed when the hook unmounts.
Expand All @@ -117,11 +83,4 @@ export declare function useTokens<
* )
* }
*/
export declare function useThemes<
Tokens extends DashTokens,
Themes extends DashThemes
>(
styles: Styles<Tokens, Themes>,
value: Parameters<Styles<Tokens, Themes>["insertThemes"]>[0] | Falsy,
deps?: React.DependencyList
): void;
export declare function useThemes<Tokens extends DashTokens, Themes extends DashThemes>(styles: Styles<Tokens, Themes>, value: Parameters<Styles<Tokens, Themes>["insertThemes"]>[0] | Falsy, deps?: React.DependencyList): void;

0 comments on commit 6b7cdde

Please sign in to comment.