Skip to content

Commit

Permalink
Merge branch 'master' into react-jss/feature/hooks
Browse files Browse the repository at this point in the history
* master: (24 commits)
  Fix #1084 (#1085)
  Update size snapshots
  [jss-plugin-expand]Added the ability to expand the attributes for border-bottom (#1083)
  Update react-jss.md (#1078)
  Fix typspec for default unit plugin (#1077)
  Delete CNAME
  Create CNAME
  v10.0.0-alpha.16
  fix versions manually
  update changelog, make build
  Add local yarn version (#1071)
  update snapshots
  Update size-snapshots
  v10.0.0-alpha.15
  update changelog, make build
  Update to [email protected] (#1068)
  Improve IE 11 support (#1065)
  fix changelog
  v10.0.0-alpha.14
  [jss] Add support for multiple referenced keyframes (#1063)
  ...

# Conflicts:
#	packages/jss-plugin-default-unit/.size-snapshot.json
#	packages/jss-preset-default/.size-snapshot.json
#	packages/jss-starter-kit/.size-snapshot.json
#	packages/jss/.size-snapshot.json
#	packages/react-jss/.size-snapshot.json
#	packages/react-jss/src/types.js
#	packages/react-jss/src/withStyles.js
  • Loading branch information
Henri Beck committed Apr 14, 2019
2 parents cbef52d + 49be31e commit 9ee1369
Show file tree
Hide file tree
Showing 77 changed files with 173,754 additions and 364 deletions.
173,313 changes: 173,313 additions & 0 deletions .yarn/releases/yarn-1.15.2.js

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions .yarnrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1


lastUpdateCheck 1553377279244
yarn-path ".yarn/releases/yarn-1.15.2.js"
25 changes: 25 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,35 @@

### Bug fixes

- [jss-plugin-expand] Fix attributes spread for `border-bottom`, `border-top`, `border-left` and `border-right` ([#1083](https://github.com/cssinjs/jss/pull/1083))
- [jss-plugin-props-sort] Fix sorting in Node 11 ([#1084](https://github.com/cssinjs/jss/pull/1083))

## 10.0.0-alpha.16 (2019-3-24)

### Bug fixes

- [jss-plugin-camel-case] Fix some IE 11 regression ([#1065](https://github.com/cssinjs/jss/pull/1065))
- [jss-vendor-prefixer] Fix value prefixing, in particular `position: sticky` ([#1068](https://github.com/cssinjs/jss/pull/1068))

## 10.0.0-alpha.14 (2019-3-17)

### Improvements

- [jss] Add support for multiple referenced keyframes ([#1063](https://github.com/cssinjs/jss/pull/1063))

### Bug fixes

- [jss] Fix SSR aggregation regression ([#1064](https://github.com/cssinjs/jss/pull/1064))

## 10.0.0-alpha.13 (2019-3-12)

### Bug fixes

- [react-jss] Replace spaces inside the display name with hyphens ([#1049](https://github.com/cssinjs/jss/pull/1049))

### Improvements

- [jss] Remove VirtualRenderer and the option `virtual: true`. Now to simulate a non-browser environment, pass `create({Renderer: null})` when creating a Jss instance.
- [react-jss] Add dynamic rules to the static sheet ([#1048](https://github.com/cssinjs/jss/pull/1048))

## 10.0.0-alpha.12 (2019-2-27)
Expand Down
2 changes: 1 addition & 1 deletion docs/jss-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Options:

- `createGenerateId` - a function which returns a function which generates unique class names.
- `plugins` - an array of functions, will be passed to `jss.use`.
- `virtual` - if true, JSS will use VirtualRenderer.
- `Renderer` - if null, JSS will not render to DOM, or pass a custom Renderer.
- `insertionPoint` - string value of a DOM comment node which marks the start of sheets or a rendered DOM node. Sheets rendered by this Jss instance are inserted after this point sequentially.

**Note**: Each `jss.setup()` call will perform a shallow merge with the old options except for `plugins`. Passed `plugins` will get added to the existing plugins.
Expand Down
2 changes: 2 additions & 0 deletions docs/react-jss.md
Original file line number Diff line number Diff line change
Expand Up @@ -579,6 +579,8 @@ a `WithStyles` type which adds types for all of the injected props.
To use it, simply extend your existing props interface with
`WithStyles<typeof styles>`, where `styles` is your styles object.

> Note: To use WithStyles you must use react-jss version 10 or higher.
Example

```typescript
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"npmClient": "yarn",
"useWorkspaces": true,
"version": "10.0.0-alpha.12",
"version": "10.0.0-alpha.16",
"command": {
"publish": {
"allow-branch": ["master"]
Expand Down
4 changes: 2 additions & 2 deletions packages/jss-plugin-cache/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "jss-plugin-cache",
"description": "JSS plugin that caches the rules and delivers insane performance.",
"version": "10.0.0-alpha.12",
"version": "10.0.0-alpha.16",
"license": "MIT",
"homepage": "https://cssinjs.org/jss-plugin-cache",
"main": "dist/jss-plugin-cache.cjs.js",
Expand Down Expand Up @@ -39,6 +39,6 @@
},
"dependencies": {
"@babel/runtime": "^7.3.1",
"jss": "10.0.0-alpha.12"
"jss": "10.0.0-alpha.16"
}
}
2 changes: 1 addition & 1 deletion packages/jss-plugin-cache/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

> JSS plugin that caches the rules and delivers insane performance.
See our website [jss-plugin-cache](https://cssinjs.org/jss-plugin-cache?v=v10.0.0-alpha.12) for more information.
See our website [jss-plugin-cache](https://cssinjs.org/jss-plugin-cache?v=v10.0.0-alpha.16) for more information.

## Install

Expand Down
24 changes: 12 additions & 12 deletions packages/jss-plugin-camel-case/.size-snapshot.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
{
"dist/jss-plugin-camel-case.js": {
"bundled": 2383,
"minified": 856,
"gzipped": 486
"bundled": 2389,
"minified": 858,
"gzipped": 488
},
"dist/jss-plugin-camel-case.min.js": {
"bundled": 2383,
"minified": 856,
"gzipped": 486
"bundled": 2389,
"minified": 858,
"gzipped": 488
},
"dist/jss-plugin-camel-case.cjs.js": {
"bundled": 1703,
"minified": 735,
"gzipped": 393
"bundled": 1709,
"minified": 737,
"gzipped": 398
},
"dist/jss-plugin-camel-case.esm.js": {
"bundled": 1485,
"minified": 563,
"gzipped": 307,
"bundled": 1491,
"minified": 565,
"gzipped": 309,
"treeshaked": {
"rollup": {
"code": 29,
Expand Down
6 changes: 3 additions & 3 deletions packages/jss-plugin-camel-case/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "jss-plugin-camel-case",
"description": "JSS plugin that allows to write camel cased rule properties",
"version": "10.0.0-alpha.12",
"version": "10.0.0-alpha.16",
"license": "MIT",
"homepage": "https://cssinjs.org/jss-camel-case",
"main": "dist/jss-plugin-camel-case.cjs.js",
Expand Down Expand Up @@ -37,11 +37,11 @@
"check-snapshot": "node ../../scripts/match-snapshot.js"
},
"devDependencies": {
"jss-plugin-rule-value-function": "10.0.0-alpha.12"
"jss-plugin-rule-value-function": "10.0.0-alpha.16"
},
"dependencies": {
"@babel/runtime": "^7.3.1",
"hyphenate-style-name": "^1.0.3",
"jss": "10.0.0-alpha.12"
"jss": "10.0.0-alpha.16"
}
}
2 changes: 1 addition & 1 deletion packages/jss-plugin-camel-case/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

> JSS plugin that allows to write camel cased rule properties
See our website [jss-plugin-camel-case](https://cssinjs.org/jss-plugin-camel-case?v=v10.0.0-alpha.12) for more information.
See our website [jss-plugin-camel-case](https://cssinjs.org/jss-plugin-camel-case?v=v10.0.0-alpha.16) for more information.

## Install

Expand Down
4 changes: 2 additions & 2 deletions packages/jss-plugin-camel-case/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function convertCase(style) {
const converted = {}

for (const prop in style) {
const key = prop.startsWith('--') ? prop : hyphenate(prop)
const key = prop.indexOf('--') === 0 ? prop : hyphenate(prop)

converted[key] = style[prop]
}
Expand Down Expand Up @@ -44,7 +44,7 @@ export default function camelCase(): Plugin {
}

function onChangeValue(value, prop, rule) {
if (prop.startsWith('--')) {
if (prop.indexOf('--') === 0) {
return value
}

Expand Down
4 changes: 2 additions & 2 deletions packages/jss-plugin-compose/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "jss-plugin-compose",
"description": "JSS plugin for classes composition",
"version": "10.0.0-alpha.12",
"version": "10.0.0-alpha.16",
"license": "MIT",
"homepage": "https://cssinjs.org/jss-compose",
"main": "dist/jss-plugin-compose.cjs.js",
Expand Down Expand Up @@ -39,7 +39,7 @@
},
"dependencies": {
"@babel/runtime": "^7.3.1",
"jss": "10.0.0-alpha.12",
"jss": "10.0.0-alpha.16",
"tiny-warning": "^1.0.2"
}
}
2 changes: 1 addition & 1 deletion packages/jss-plugin-compose/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

> JSS plugin for classes composition
See our website [jss-plugin-compose](https://cssinjs.org/jss-plugin-compose?v=v10.0.0-alpha.12) for more information.
See our website [jss-plugin-compose](https://cssinjs.org/jss-plugin-compose?v=v10.0.0-alpha.16) for more information.

## Install

Expand Down
10 changes: 5 additions & 5 deletions packages/jss-plugin-default-unit/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "jss-plugin-default-unit",
"description": "JSS plugin that adds default custom unit to numeric values where needed",
"version": "10.0.0-alpha.12",
"version": "10.0.0-alpha.16",
"license": "MIT",
"homepage": "https://cssinjs.org/jss-default-unit",
"main": "dist/jss-plugin-default-unit.cjs.js",
Expand Down Expand Up @@ -39,12 +39,12 @@
"check-snapshot": "node ../../scripts/match-snapshot.js"
},
"devDependencies": {
"jss-plugin-expand": "10.0.0-alpha.12",
"jss-plugin-rule-value-function": "10.0.0-alpha.12",
"jss-plugin-rule-value-observable": "10.0.0-alpha.12"
"jss-plugin-expand": "10.0.0-alpha.16",
"jss-plugin-rule-value-function": "10.0.0-alpha.16",
"jss-plugin-rule-value-observable": "10.0.0-alpha.16"
},
"dependencies": {
"@babel/runtime": "^7.3.1",
"jss": "10.0.0-alpha.12"
"jss": "10.0.0-alpha.16"
}
}
2 changes: 1 addition & 1 deletion packages/jss-plugin-default-unit/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

> JSS plugin that adds default custom unit to numeric values where needed
See our website [jss-plugin-default-unit](https://cssinjs.org/jss-plugin-default-unit?v=v10.0.0-alpha.12) for more information.
See our website [jss-plugin-default-unit](https://cssinjs.org/jss-plugin-default-unit?v=v10.0.0-alpha.16) for more information.

## Install

Expand Down
2 changes: 1 addition & 1 deletion packages/jss-plugin-default-unit/src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ import {Plugin} from 'jss'

export type Options = {[key: string]: string}

export default function jssPluginSyntaxDefaultUnit(options: Options): Plugin
export default function jssPluginSyntaxDefaultUnit(options?: Options): Plugin
12 changes: 3 additions & 9 deletions packages/jss-plugin-default-unit/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
import type {Plugin} from 'jss'
import defaultUnits from './defaultUnits'

export type Options = {[key: string]: string}

/**
* Clones the object and adds a camel cased property version.
*/
Expand All @@ -20,18 +22,12 @@ const units = addCamelCasedVersion(defaultUnits)

/**
* Recursive deep style passing function
*
* @param {String} current property
* @param {(Object|Array|Number|String)} property value
* @param {Object} options
* @return {(Object|Array|Number|String)} resulting value
*/
function iterate(prop, value, options) {
function iterate(prop: string, value: any, options: Options) {
if (!value) return value

if (Array.isArray(value)) {
for (let i = 0; i < value.length; i++) {
// $FlowFixMe
value[i] = iterate(prop, value[i], options)
}
} else if (typeof value === 'object') {
Expand Down Expand Up @@ -61,8 +57,6 @@ function iterate(prop, value, options) {
return value
}

export type Options = {[key: string]: string}

/**
* Add unit to numeric values.
*/
Expand Down
24 changes: 12 additions & 12 deletions packages/jss-plugin-expand/.size-snapshot.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
{
"dist/jss-plugin-expand.js": {
"bundled": 11144,
"minified": 4116,
"gzipped": 1452
"bundled": 10469,
"minified": 4500,
"gzipped": 1511
},
"dist/jss-plugin-expand.min.js": {
"bundled": 11144,
"minified": 4116,
"gzipped": 1452
"bundled": 10469,
"minified": 4500,
"gzipped": 1511
},
"dist/jss-plugin-expand.cjs.js": {
"bundled": 10144,
"minified": 4283,
"gzipped": 1451
"bundled": 9489,
"minified": 4667,
"gzipped": 1509
},
"dist/jss-plugin-expand.esm.js": {
"bundled": 10062,
"minified": 4214,
"gzipped": 1406,
"bundled": 9407,
"minified": 4598,
"gzipped": 1464,
"treeshaked": {
"rollup": {
"code": 0,
Expand Down
6 changes: 3 additions & 3 deletions packages/jss-plugin-expand/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "jss-plugin-expand",
"description": "JSS plugin that gives you a better syntax than CSS.",
"version": "10.0.0-alpha.12",
"version": "10.0.0-alpha.16",
"license": "MIT",
"homepage": "https://cssinjs.org/jss-expand",
"main": "dist/jss-plugin-expand.cjs.js",
Expand Down Expand Up @@ -37,10 +37,10 @@
"check-snapshot": "node ../../scripts/match-snapshot.js"
},
"devDependencies": {
"jss-plugin-rule-value-observable": "10.0.0-alpha.12"
"jss-plugin-rule-value-observable": "10.0.0-alpha.16"
},
"dependencies": {
"@babel/runtime": "^7.3.1",
"jss": "10.0.0-alpha.12"
"jss": "10.0.0-alpha.16"
}
}
2 changes: 1 addition & 1 deletion packages/jss-plugin-expand/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

> JSS plugin that gives you a better syntax than CSS.
See our website [jss-plugin-expand](https://cssinjs.org/jss-plugin-expand?v=v10.0.0-alpha.12) for more information.
See our website [jss-plugin-expand](https://cssinjs.org/jss-plugin-expand?v=v10.0.0-alpha.16) for more information.

## Install

Expand Down
Loading

0 comments on commit 9ee1369

Please sign in to comment.