Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace union member CSS with any to speed up type checking massively. #1

Open
wants to merge 9 commits into
base: canary
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ CSS-in-JS with near-zero runtime, SSR, multi-variant support, and a best-in-clas
Framework-agnostic implementation.

```sh
npm install @stitches/core
npm install @sigmacomputing/stitches-core
```

[Read more](https://github.com/stitchesjs/stitches/tree/main/packages/core)
Expand All @@ -27,7 +27,7 @@ npm install @stitches/core
React wrapper including the `styled` API.

```sh
npm install @stitches/react
npm install @sigmacomputing/stitches-react
```

[Read more](https://github.com/stitchesjs/stitches/tree/main/packages/react)
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"$schema": "./.vscode/package.schema.json",
"name": "stitches",
"name": "@sigmacomputing/stitches",
"version": "1.2.9",
"type": "module",
"license": "MIT",
"contributors": [
Expand All @@ -9,7 +10,7 @@
"Jonathan Neal"
],
"scripts": {
"build:test:types": "yarn workspace @stitches/test build",
"build:test:types": "yarn workspace @sigmacomputing/stitches-test build",
"build": "node .task/build.js",
"build:watch": "node .task/build.js --watch",
"lint": "node .task/lint.js",
Expand Down
12 changes: 6 additions & 6 deletions packages/core/README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# @stitches/core
# @sigmacomputing/stitches-core

**@stitches/core** is a framework-agnostic implementation of [stitches](https://stitches.dev), a CSS-in-JS library with a best-in-class developer experience.
**@sigmacomputing/stitches-core** is a framework-agnostic implementation of [stitches](https://stitches.dev), a CSS-in-JS library with a best-in-class developer experience.

<p><br /></p>

```sh
# with npm
npm install @stitches/core
npm install @sigmacomputing/stitches-core

# with yarn
yarn add @stitches/core
yarn add @sigmacomputing/stitches-core
```

<p><br /></p>
Expand All @@ -21,7 +21,7 @@ yarn add @stitches/core
```html
<script type="module">

import { css } from 'https://cdn.skypack.dev/@stitches/core'
import { css } from 'https://cdn.skypack.dev/@sigmacomputing/stitches-core'

</script>
```
Expand All @@ -33,7 +33,7 @@ import { css } from 'https://cdn.skypack.dev/@stitches/core'
<br />

```js
<script src="https://unpkg.com/@stitches/core/dist/index.global.js"></script>
<script src="https://unpkg.com/@sigmacomputing/stitches-core/dist/index.global.js"></script>
<script>

const { css } = stitches
Expand Down
6 changes: 3 additions & 3 deletions packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@stitches/core",
"version": "1.3.1-1",
"name": "@sigmacomputing/stitches-core",
"version": "1.3.1-7",
"description": "The modern CSS-in-JS library",
"type": "module",
"main": "dist/index.cjs",
Expand Down Expand Up @@ -41,7 +41,7 @@
"Jonathan Neal"
],
"publishConfig": {
"access": "public"
"access": "restricted"
},
"keywords": [
"component",
Expand Down
12 changes: 6 additions & 6 deletions packages/react/README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# @stitches/react
# @sigmacomputing/stitches-react

**@stitches/react** is a react implementation of [stitches](https://stitches.dev), a CSS-in-JS library with a best-in-class developer experience.
**@sigmacomputing/stitches-react** is a react implementation of [stitches](https://stitches.dev), a CSS-in-JS library with a best-in-class developer experience.

<p><br /></p>

```sh
# with npm
npm install @stitches/react
npm install @sigmacomputing/stitches-react

# with yarn
yarn add @stitches/react
yarn add @sigmacomputing/stitches-react
```

<p><br /></p>
Expand All @@ -21,7 +21,7 @@ yarn add @stitches/react
```html
<script type="module">

import { styled } from 'https://cdn.skypack.dev/@stitches/react'
import { styled } from 'https://cdn.skypack.dev/@sigmacomputing/stitches-react'

</script>
```
Expand All @@ -33,7 +33,7 @@ import { styled } from 'https://cdn.skypack.dev/@stitches/react'
<br />

```js
<script src="https://unpkg.com/@stitches/react/dist/index.global.js"></script>
<script src="https://unpkg.com/@sigmacomputing/stitches-react/dist/index.global.js"></script>
<script>

const { styled } = stitches
Expand Down
6 changes: 3 additions & 3 deletions packages/react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@stitches/react",
"version": "1.3.1-1",
"name": "@sigmacomputing/stitches-react",
"version": "1.3.1-7",
"description": "The modern CSS-in-JS library",
"type": "module",
"main": "dist/index.cjs",
Expand Down Expand Up @@ -47,7 +47,7 @@
"react": ">= 16.3.0"
},
"publishConfig": {
"access": "public"
"access": "restricted"
},
"keywords": [
"component",
Expand Down
6 changes: 3 additions & 3 deletions packages/stringify/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
**stringify** converts a JavaScript object to a CSS string, optionally replacing values if a [replacer](#replacer) function is specified.

```js
import { stringify } from '@stitches/stringify'
import { stringify } from '@sigmacomputing/stitches-stringify'

stringify({
body: {
Expand Down Expand Up @@ -39,13 +39,13 @@ The actual output will not be formatted as it appears here.
From NPM, add **stringify** to your project:

```bash
npm install @stitches/stringify
npm install @sigmacomputing/stitches-stringify
```

Use **stringify** to serialize your CSS:

```js
import { stringify } from '@stitches/stringify'
import { stringify } from '@sigmacomputing/stitches-stringify'

stringify({
body: {
Expand Down
6 changes: 3 additions & 3 deletions packages/stringify/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@stitches/stringify",
"version": "1.3.1-1",
"name": "@sigmacomputing/stitches-stringify",
"version": "1.3.1-7",
"description": "Converts an object into CSS",
"type": "module",
"main": "dist/index.cjs",
Expand Down Expand Up @@ -34,7 +34,7 @@
"Abdulhadi Alhallak <[email protected]>"
],
"publishConfig": {
"access": "public"
"access": "restricted"
},
"keywords": [
"css-in-js"
Expand Down
2 changes: 1 addition & 1 deletion packages/test/Issue-803-core.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { globalCss } from '@stitches/core'
import { globalCss } from '@sigmacomputing/stitches-core'

void globalCss({
"@font-face": {
Expand Down
2 changes: 1 addition & 1 deletion packages/test/Issue-803-react.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { globalCss } from '@stitches/react'
import { globalCss } from '@sigmacomputing/stitches-react'

void globalCss({
"@font-face": {
Expand Down
4 changes: 2 additions & 2 deletions packages/test/Issue-813-core.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// https://github.com/stitchesjs/stitches/issues/813
import { createStitches } from '@stitches/core'
import * as Stitches from '@stitches/core'
import { createStitches } from '@sigmacomputing/stitches-core'
import * as Stitches from '@sigmacomputing/stitches-core'

export const { config, css } = createStitches({
theme: {
Expand Down
4 changes: 2 additions & 2 deletions packages/test/Issue-813-react.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// https://github.com/stitchesjs/stitches/issues/813
import { createStitches } from '@stitches/react'
import * as Stitches from '@stitches/react'
import { createStitches } from '@sigmacomputing/stitches-react'
import * as Stitches from '@sigmacomputing/stitches-react'

export const { config, styled } = createStitches({
theme: {
Expand Down
32 changes: 16 additions & 16 deletions packages/test/built-types/Issue-813-core.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as Stitches from '@stitches/core';
import * as Stitches from '@sigmacomputing/stitches-core';
export declare const config: {
prefix: "";
media: {};
Expand All @@ -7,56 +7,56 @@ export declare const config: {
primary: string;
};
};
themeMap: import("@stitches/core/types/config").DefaultThemeMap;
themeMap: import("@sigmacomputing/stitches-core/types/config").DefaultThemeMap;
utils: {
bg: (value: Stitches.PropertyValue<'backgroundColor'>) => {
color: import("@stitches/core/types/css-util").WithPropertyValue<"backgroundColor">;
color: import("@sigmacomputing/stitches-core/types/css-util").WithPropertyValue<"backgroundColor">;
};
c: (value: Stitches.ScaleValue<'colors'>) => {
color: import("@stitches/core/types/css-util").WithScaleValue<"colors">;
color: import("@sigmacomputing/stitches-core/types/css-util").WithScaleValue<"colors">;
};
};
}, css: {
withConfig: (config: {
componentId?: string | undefined;
displayName?: string | undefined;
shouldForwardStitchesProp?: ((prop: "css" | (string & {})) => boolean | void) | undefined;
}) => import("@stitches/core/types/stitches").CssFunctionType<{}, {
}) => import("@sigmacomputing/stitches-core/types/stitches").CssFunctionType<{}, {
colors: {
primary: string;
};
}, import("@stitches/core/types/config").DefaultThemeMap, {
}, import("@sigmacomputing/stitches-core/types/config").DefaultThemeMap, {
bg: (value: Stitches.PropertyValue<'backgroundColor'>) => {
color: import("@stitches/core/types/css-util").WithPropertyValue<"backgroundColor">;
color: import("@sigmacomputing/stitches-core/types/css-util").WithPropertyValue<"backgroundColor">;
};
c: (value: Stitches.ScaleValue<'colors'>) => {
color: import("@stitches/core/types/css-util").WithScaleValue<"colors">;
color: import("@sigmacomputing/stitches-core/types/css-util").WithScaleValue<"colors">;
};
}>;
} & import("@stitches/core/types/stitches").CssFunctionType<{}, {
} & import("@sigmacomputing/stitches-core/types/stitches").CssFunctionType<{}, {
colors: {
primary: string;
};
}, import("@stitches/core/types/config").DefaultThemeMap, {
}, import("@sigmacomputing/stitches-core/types/config").DefaultThemeMap, {
bg: (value: Stitches.PropertyValue<'backgroundColor'>) => {
color: import("@stitches/core/types/css-util").WithPropertyValue<"backgroundColor">;
color: import("@sigmacomputing/stitches-core/types/css-util").WithPropertyValue<"backgroundColor">;
};
c: (value: Stitches.ScaleValue<'colors'>) => {
color: import("@stitches/core/types/css-util").WithScaleValue<"colors">;
color: import("@sigmacomputing/stitches-core/types/css-util").WithScaleValue<"colors">;
};
}>;
export declare const colorValue1: Stitches.PropertyValue<'backgroundColor', typeof config>;
export declare const colorValue2: Stitches.PropertyValue<'backgroundColor', typeof config>;
export declare const colorToken: Stitches.ScaleValue<'colors', typeof config>;
export declare const box: import("@stitches/core/types/styled-component").CssComponent<never, {}, {}, import("@stitches/core/types/css-util").CSS<{}, {
export declare const box: import("@sigmacomputing/stitches-core/types/styled-component").CssComponent<never, {}, {}, import("@sigmacomputing/stitches-core/types/css-util").CSS<{}, {
colors: {
primary: string;
};
}, import("@stitches/core/types/config").DefaultThemeMap, {
}, import("@sigmacomputing/stitches-core/types/config").DefaultThemeMap, {
bg: (value: Stitches.PropertyValue<'backgroundColor'>) => {
color: import("@stitches/core/types/css-util").WithPropertyValue<"backgroundColor">;
color: import("@sigmacomputing/stitches-core/types/css-util").WithPropertyValue<"backgroundColor">;
};
c: (value: Stitches.ScaleValue<'colors'>) => {
color: import("@stitches/core/types/css-util").WithScaleValue<"colors">;
color: import("@sigmacomputing/stitches-core/types/css-util").WithScaleValue<"colors">;
};
}>>;
32 changes: 16 additions & 16 deletions packages/test/built-types/Issue-813-react.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as Stitches from '@stitches/react';
import * as Stitches from '@sigmacomputing/stitches-react';
export declare const config: {
prefix: "";
media: {};
Expand All @@ -7,56 +7,56 @@ export declare const config: {
primary: string;
};
};
themeMap: import("@stitches/react/types/config").DefaultThemeMap;
themeMap: import("@sigmacomputing/stitches-react/types/config").DefaultThemeMap;
utils: {
bg: (value: Stitches.PropertyValue<'backgroundColor'>) => {
color: import("@stitches/react/types/css-util").WithPropertyValue<"backgroundColor">;
color: import("@sigmacomputing/stitches-react/types/css-util").WithPropertyValue<"backgroundColor">;
};
c: (value: Stitches.ScaleValue<'colors'>) => {
color: import("@stitches/react/types/css-util").WithScaleValue<"colors">;
color: import("@sigmacomputing/stitches-react/types/css-util").WithScaleValue<"colors">;
};
};
}, styled: {
withConfig: (config: {
componentId?: string | undefined;
displayName?: string | undefined;
shouldForwardStitchesProp?: ((prop: "css" | (string & {})) => boolean | void) | undefined;
}) => import("@stitches/react/types/stitches").StyledFunctionType<{}, {
}) => import("@sigmacomputing/stitches-react/types/stitches").StyledFunctionType<{}, {
colors: {
primary: string;
};
}, import("@stitches/react/types/config").DefaultThemeMap, {
}, import("@sigmacomputing/stitches-react/types/config").DefaultThemeMap, {
bg: (value: Stitches.PropertyValue<'backgroundColor'>) => {
color: import("@stitches/react/types/css-util").WithPropertyValue<"backgroundColor">;
color: import("@sigmacomputing/stitches-react/types/css-util").WithPropertyValue<"backgroundColor">;
};
c: (value: Stitches.ScaleValue<'colors'>) => {
color: import("@stitches/react/types/css-util").WithScaleValue<"colors">;
color: import("@sigmacomputing/stitches-react/types/css-util").WithScaleValue<"colors">;
};
}>;
} & import("@stitches/react/types/stitches").StyledFunctionType<{}, {
} & import("@sigmacomputing/stitches-react/types/stitches").StyledFunctionType<{}, {
colors: {
primary: string;
};
}, import("@stitches/react/types/config").DefaultThemeMap, {
}, import("@sigmacomputing/stitches-react/types/config").DefaultThemeMap, {
bg: (value: Stitches.PropertyValue<'backgroundColor'>) => {
color: import("@stitches/react/types/css-util").WithPropertyValue<"backgroundColor">;
color: import("@sigmacomputing/stitches-react/types/css-util").WithPropertyValue<"backgroundColor">;
};
c: (value: Stitches.ScaleValue<'colors'>) => {
color: import("@stitches/react/types/css-util").WithScaleValue<"colors">;
color: import("@sigmacomputing/stitches-react/types/css-util").WithScaleValue<"colors">;
};
}>;
export declare const colorValue1: Stitches.PropertyValue<'backgroundColor', typeof config>;
export declare const colorValue2: Stitches.PropertyValue<'backgroundColor', typeof config>;
export declare const colorToken: Stitches.ScaleValue<'colors', typeof config>;
export declare const Box: import("@stitches/react/types/styled-component").StyledComponent<"div", {}, {}, import("@stitches/react/types/css-util").CSS<{}, {
export declare const Box: import("@sigmacomputing/stitches-react/types/styled-component").StyledComponent<"div", {}, {}, import("@sigmacomputing/stitches-react/types/css-util").CSS<{}, {
colors: {
primary: string;
};
}, import("@stitches/react/types/config").DefaultThemeMap, {
}, import("@sigmacomputing/stitches-react/types/config").DefaultThemeMap, {
bg: (value: Stitches.PropertyValue<'backgroundColor'>) => {
color: import("@stitches/react/types/css-util").WithPropertyValue<"backgroundColor">;
color: import("@sigmacomputing/stitches-react/types/css-util").WithPropertyValue<"backgroundColor">;
};
c: (value: Stitches.ScaleValue<'colors'>) => {
color: import("@stitches/react/types/css-util").WithScaleValue<"colors">;
color: import("@sigmacomputing/stitches-react/types/css-util").WithScaleValue<"colors">;
};
}>>;
Loading