From 99e572aa91c66c8285f89e969ef612e01a0f0baf Mon Sep 17 00:00:00 2001 From: Tiago Gimenes Date: Fri, 25 Jun 2021 14:43:19 -0300 Subject: [PATCH] fix: jsx typings --- lerna.json | 5 ++++- .../package.json | 4 ++-- .../gatsby-plugin-pixel-facebook/package.json | 4 ++-- packages/gatsby-theme-store/package.json | 4 ++-- packages/store-ui/package.json | 2 +- packages/store-ui/src/typings/global.d.ts | 22 +++++++++++++++++++ 6 files changed, 33 insertions(+), 8 deletions(-) diff --git a/lerna.json b/lerna.json index 0b4421ed74..f82ce61f64 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "0.373.0-alpha.3", + "version": "0.373.0-alpha.4", "npmClient": "yarn", "useWorkspaces": true, "command": { @@ -7,5 +7,8 @@ "message": "Release: %v" } }, + "changelogPreset": { + "name": "conventionalcommits" + }, "packages": ["packages/*"] } diff --git a/packages/gatsby-plugin-google-tag-manager/package.json b/packages/gatsby-plugin-google-tag-manager/package.json index 1693047c99..320a41d5cb 100644 --- a/packages/gatsby-plugin-google-tag-manager/package.json +++ b/packages/gatsby-plugin-google-tag-manager/package.json @@ -1,6 +1,6 @@ { "name": "@vtex/gatsby-plugin-google-tag-manager", - "version": "0.373.0-alpha.3", + "version": "0.373.0-alpha.4", "repository": { "type": "git", "url": "https://github.com/vtex/faststore", @@ -23,7 +23,7 @@ ], "license": "MIT", "devDependencies": { - "@vtex/gatsby-theme-store": "^0.373.0-alpha.3", + "@vtex/gatsby-theme-store": "^0.373.0-alpha.4", "cross-env": "^7.0.2", "gatsby": "^3.1.1", "typescript": "^4.2.4" diff --git a/packages/gatsby-plugin-pixel-facebook/package.json b/packages/gatsby-plugin-pixel-facebook/package.json index 4034053cfd..d80fb0b415 100644 --- a/packages/gatsby-plugin-pixel-facebook/package.json +++ b/packages/gatsby-plugin-pixel-facebook/package.json @@ -1,6 +1,6 @@ { "name": "@vtex/gatsby-plugin-pixel-facebook", - "version": "0.373.0-alpha.3", + "version": "0.373.0-alpha.4", "description": "Gatsby plugin for using Facebook Pixel with Store Framework Jamstack", "repository": { "type": "git", @@ -23,7 +23,7 @@ ], "license": "MIT", "devDependencies": { - "@vtex/gatsby-theme-store": "^0.373.0-alpha.3", + "@vtex/gatsby-theme-store": "^0.373.0-alpha.4", "cross-env": "^7.0.2", "gatsby": "^3.1.1", "typescript": "^4.2.4" diff --git a/packages/gatsby-theme-store/package.json b/packages/gatsby-theme-store/package.json index d69d1f50b1..14d1312935 100644 --- a/packages/gatsby-theme-store/package.json +++ b/packages/gatsby-theme-store/package.json @@ -1,6 +1,6 @@ { "name": "@vtex/gatsby-theme-store", - "version": "0.373.0-alpha.3", + "version": "0.373.0-alpha.4", "description": "Gatsby theme for building ecommerce websites", "main": "index.js", "repository": { @@ -55,7 +55,7 @@ "@types/react-helmet-async": "^1.0.3", "@vtex/gatsby-plugin-i18n": "^0.371.21", "@vtex/store-sdk": "^0.371.21", - "@vtex/store-ui": "^0.373.0-alpha.3", + "@vtex/store-ui": "^0.373.0-alpha.4", "cross-env": "^7.0.2", "gatsby": "^3.1.1", "gatsby-plugin-next-seo": "^1.7.0", diff --git a/packages/store-ui/package.json b/packages/store-ui/package.json index 7a7b65f1bd..29bfb3c567 100644 --- a/packages/store-ui/package.json +++ b/packages/store-ui/package.json @@ -1,6 +1,6 @@ { "name": "@vtex/store-ui", - "version": "0.373.0-alpha.3", + "version": "0.373.0-alpha.4", "description": "A lightweight, css framework agnostic component library for React", "author": "emersonlaurentino", "license": "MIT", diff --git a/packages/store-ui/src/typings/global.d.ts b/packages/store-ui/src/typings/global.d.ts index 85fb5cc007..ef22db12b1 100644 --- a/packages/store-ui/src/typings/global.d.ts +++ b/packages/store-ui/src/typings/global.d.ts @@ -1,6 +1,28 @@ +import type { SxStyleProp } from 'theme-ui' +import type { SerializedStyles } from 'emotion' + +declare module 'react' { + interface DOMAttributes { + sx?: SxStyleProp + css?: SerializedStyles + } +} + export declare global { namespace globalThis { function requestIdleCallback(args: () => void): number function cancelIdleCallback(id: number): void } + + namespace JSX { + /** + * Do we need to modify `LibraryManagedAttributes` too, + * to make `className` props optional when `css` props is specified? + */ + + interface IntrinsicAttributes { + sx?: SxStyleProp + css?: SerializedStyles + } + } }