@theme-ui/mdx
Advanced tools
Comparing version 0.4.0-rc.3 to 0.4.0-rc.5
@@ -30,9 +30,10 @@ import { IntrinsicSxElements } from '@theme-ui/core'; | ||
export declare const themed: (key: StyledComponentName) => (props: ThemedProps) => import("@theme-ui/core").CSSObject; | ||
interface AnyComponentProps extends JSX.IntrinsicAttributes { | ||
[key: string]: unknown; | ||
} | ||
export declare type WithPoorAsProp<Props, As extends ElementType | undefined = undefined> = { | ||
as?: As; | ||
} & (As extends undefined ? Props : { | ||
[key: string]: unknown; | ||
}); | ||
} & (As extends undefined ? Props : AnyComponentProps); | ||
export interface ThemedComponent<Name extends ElementType> { | ||
<As extends ElementType | undefined>(props: WithPoorAsProp<ComponentProps<Name>, As>): JSX.Element; | ||
<As extends ElementType | undefined = undefined>(props: WithPoorAsProp<ComponentProps<Name>, As>): JSX.Element; | ||
} | ||
@@ -39,0 +40,0 @@ export declare type StyledComponentsDict = { |
import { jsx as jsx$1 } from '@emotion/core'; | ||
import { createContext } from 'react'; | ||
import { version } from '@emotion/core/package.json'; | ||
import '@theme-ui/css/dist/types'; | ||
import styled from '@emotion/styled'; | ||
@@ -6,0 +5,0 @@ import { useMDXComponents, MDXProvider as MDXProvider$1 } from '@mdx-js/react'; |
@@ -6,3 +6,2 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } | ||
var package_json = require('@emotion/core/package.json'); | ||
require('@theme-ui/css/dist/types'); | ||
var styled = _interopDefault(require('@emotion/styled')); | ||
@@ -9,0 +8,0 @@ var react$1 = require('@mdx-js/react'); |
import { jsx as jsx$1 } from '@emotion/core'; | ||
import { createContext } from 'react'; | ||
import { version } from '@emotion/core/package.json'; | ||
import '@theme-ui/css/dist/types'; | ||
import styled from '@emotion/styled'; | ||
@@ -6,0 +5,0 @@ import { useMDXComponents, MDXProvider as MDXProvider$1 } from '@mdx-js/react'; |
(function (global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@emotion/core'), require('react'), require('@emotion/core/package.json'), require('@theme-ui/css/dist/types'), require('@emotion/styled'), require('@mdx-js/react')) : | ||
typeof define === 'function' && define.amd ? define(['exports', '@emotion/core', 'react', '@emotion/core/package.json', '@theme-ui/css/dist/types', '@emotion/styled', '@mdx-js/react'], factory) : | ||
(global = global || self, factory(global.mdx = {}, global.core, global.react, global.package_json, global.types, global.styled, global.react$1)); | ||
}(this, (function (exports, core, react, package_json, types, styled, react$1) { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@emotion/core'), require('react'), require('@emotion/core/package.json'), require('@emotion/styled'), require('@mdx-js/react')) : | ||
typeof define === 'function' && define.amd ? define(['exports', '@emotion/core', 'react', '@emotion/core/package.json', '@emotion/styled', '@mdx-js/react'], factory) : | ||
(global = global || self, factory(global.mdx = {}, global.core, global.react, global.package_json, global.styled, global.react$1)); | ||
}(this, (function (exports, core, react, package_json, styled, react$1) { | ||
styled = styled && Object.prototype.hasOwnProperty.call(styled, 'default') ? styled['default'] : styled; | ||
@@ -7,0 +7,0 @@ |
{ | ||
"name": "@theme-ui/mdx", | ||
"version": "0.4.0-rc.3", | ||
"version": "0.4.0-rc.5", | ||
"source": "src/index.ts", | ||
@@ -20,4 +20,4 @@ "main": "dist/index.js", | ||
"devDependencies": { | ||
"@theme-ui/core": "^0.4.0-rc.3", | ||
"@theme-ui/css": "^0.4.0-rc.3" | ||
"@theme-ui/core": "^0.4.0-rc.5", | ||
"@theme-ui/css": "^0.4.0-rc.5" | ||
}, | ||
@@ -33,3 +33,3 @@ "peerDependencies": { | ||
}, | ||
"gitHead": "2c3fea31b3e8fd892968bef49bd6407d8999a848" | ||
"gitHead": "73f152a13647cae8f7e27c22fc9efd4a76e3c955" | ||
} |
@@ -93,2 +93,6 @@ import { jsx, IntrinsicSxElements } from '@theme-ui/core' | ||
// opt out of typechecking whenever `as` prop is used | ||
interface AnyComponentProps extends JSX.IntrinsicAttributes { | ||
[key: string]: unknown | ||
} | ||
export type WithPoorAsProp< | ||
@@ -99,6 +103,6 @@ Props, | ||
as?: As | ||
} & (As extends undefined ? Props : { [key: string]: unknown }) | ||
} & (As extends undefined ? Props : AnyComponentProps) | ||
export interface ThemedComponent<Name extends ElementType> { | ||
<As extends ElementType | undefined>( | ||
<As extends ElementType | undefined = undefined>( | ||
props: WithPoorAsProp<ComponentProps<Name>, As> | ||
@@ -105,0 +109,0 @@ ): JSX.Element |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
177052
1756
0