Skip to content

Commit

Permalink
Merge pull request #84 from artsy/rename-to-fresnel
Browse files Browse the repository at this point in the history
Rename library to Fresnel.
  • Loading branch information
alloy committed May 24, 2019
2 parents 362320e + a57fb0d commit 68b9bc6
Show file tree
Hide file tree
Showing 16 changed files with 81 additions and 77 deletions.
88 changes: 44 additions & 44 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
# v2.0.3 (Wed May 22 2019)
# rrm-v2.0.3 (Wed May 22 2019)

#### 🐛 Bug Fix

- [Media] Suppress hydration warning when not matching breakpoint. [#83](https://github.com/artsy/react-responsive-media/pull/83) ([@alloy](https://github.com/alloy))
- [Media] Suppress hydration warning when not matching breakpoint. [#83](https://github.com/artsy/fresnel/pull/83) ([@alloy](https://github.com/alloy))

#### Authors: 1

- Eloy Durán ([@alloy](https://github.com/alloy))

---

# v2.0.2 (Wed May 22 2019)
# rrm-v2.0.2 (Wed May 22 2019)

#### 🐛 Bug Fix

- Make `interactions` optional [#82](https://github.com/artsy/react-responsive-media/pull/82) ([@damassi](https://github.com/damassi))
- Make `interactions` optional [#82](https://github.com/artsy/fresnel/pull/82) ([@damassi](https://github.com/damassi))

#### 🏠 Internal

- Update to renovate lib workflow [#79](https://github.com/artsy/react-responsive-media/pull/79) ([@zephraph](https://github.com/zephraph))
- Update dependency @artsy/auto-config to v1 [#76](https://github.com/artsy/react-responsive-media/pull/76) ([@renovate-bot](https://github.com/renovate-bot))
- Update dependency @artsy/auto-config to v0.1.2 [#75](https://github.com/artsy/react-responsive-media/pull/75) ([@renovate-bot](https://github.com/renovate-bot))
- Update to renovate lib workflow [#79](https://github.com/artsy/fresnel/pull/79) ([@zephraph](https://github.com/zephraph))
- Update dependency @artsy/auto-config to v1 [#76](https://github.com/artsy/fresnel/pull/76) ([@renovate-bot](https://github.com/renovate-bot))
- Update dependency @artsy/auto-config to v0.1.2 [#75](https://github.com/artsy/fresnel/pull/75) ([@renovate-bot](https://github.com/renovate-bot))

#### Authors: 3

Expand All @@ -30,45 +30,45 @@

---

# v2.0.1 (Tue Apr 23 2019)
# rrm-v2.0.1 (Tue Apr 23 2019)

#### 🐛 Bug Fix

- Update dependency auto-release-cli to v2.1.4 [#49](https://github.com/artsy/react-responsive-media/pull/49) ([@renovate-bot](https://github.com/renovate-bot))
- Update dependency auto-release-cli to v2.1.4 [#49](https://github.com/artsy/fresnel/pull/49) ([@renovate-bot](https://github.com/renovate-bot))

#### 🏠 Internal

- Update dependency @artsy/detect-responsive-traits to v0.0.4 [#74](https://github.com/artsy/react-responsive-media/pull/74) ([@renovate-bot](https://github.com/renovate-bot))
- Update yarn orb to v0.2.0 [#73](https://github.com/artsy/react-responsive-media/pull/73) ([@renovate-bot](https://github.com/renovate-bot))
- Update yarn orb to v0.1.8 [#72](https://github.com/artsy/react-responsive-media/pull/72) ([@renovate-bot](https://github.com/renovate-bot))
- Update yarn orb to v0.1.7 [#71](https://github.com/artsy/react-responsive-media/pull/71) ([@renovate-bot](https://github.com/renovate-bot))
- Update yarn orb to v0.1.6 [#70](https://github.com/artsy/react-responsive-media/pull/70) ([@renovate-bot](https://github.com/renovate-bot))
- Update dependency @artsy/auto-config to v0.1.0 [#69](https://github.com/artsy/react-responsive-media/pull/69) ([@renovate-bot](https://github.com/renovate-bot))
- Pin dependency @artsy/auto-config to 0.0.8 [#68](https://github.com/artsy/react-responsive-media/pull/68) ([@renovate-bot](https://github.com/renovate-bot))
- Use shared auto-config [#67](https://github.com/artsy/react-responsive-media/pull/67) ([@zephraph](https://github.com/zephraph))
- Update yarn orb to v0.1.5 [#65](https://github.com/artsy/react-responsive-media/pull/65) ([@renovate-bot](https://github.com/renovate-bot))
- Update yarn orb to v0.1.4 [#64](https://github.com/artsy/react-responsive-media/pull/64) ([@renovate-bot](https://github.com/renovate-bot))
- Update yarn orb to v0.1.1 [#63](https://github.com/artsy/react-responsive-media/pull/63) ([@renovate-bot](https://github.com/renovate-bot))
- Fix CI failures by using yarn orb [#62](https://github.com/artsy/react-responsive-media/pull/62) ([@zephraph](https://github.com/zephraph))
- Update dependency @artsy/detect-responsive-traits to v0.0.2 [#60](https://github.com/artsy/react-responsive-media/pull/60) ([@renovate-bot](https://github.com/renovate-bot))
- Don't release trivial changes [#61](https://github.com/artsy/react-responsive-media/pull/61) ([@zephraph](https://github.com/zephraph))
- Make trivial considered an internal change [#59](https://github.com/artsy/react-responsive-media/pull/59) ([@zephraph](https://github.com/zephraph))
- Remove auto-release-cli as a dependency [#58](https://github.com/artsy/react-responsive-media/pull/58) ([@zephraph](https://github.com/zephraph))
- Update yarn orb to v0.1.0 [#57](https://github.com/artsy/react-responsive-media/pull/57) ([@renovate-bot](https://github.com/renovate-bot))
- Update dependency auto-release-cli to v2.4.1 [#56](https://github.com/artsy/react-responsive-media/pull/56) ([@renovate-bot](https://github.com/renovate-bot))
- Update dependency auto-release-cli to v2.4.0 [#55](https://github.com/artsy/react-responsive-media/pull/55) ([@renovate-bot](https://github.com/renovate-bot))
- Update dependency auto-release-cli to v2.3.2 [#54](https://github.com/artsy/react-responsive-media/pull/54) ([@renovate-bot](https://github.com/renovate-bot))
- Update dependency auto-release-cli to v2.3.1 [#53](https://github.com/artsy/react-responsive-media/pull/53) ([@renovate-bot](https://github.com/renovate-bot))
- Update yarn orb to v0.0.8 [#52](https://github.com/artsy/react-responsive-media/pull/52) ([@renovate-bot](https://github.com/renovate-bot))
- Update dependency auto-release-cli to v2.3.0 [#51](https://github.com/artsy/react-responsive-media/pull/51) ([@renovate-bot](https://github.com/renovate-bot))
- Update dependency auto-release-cli to v2.2.0 [#50](https://github.com/artsy/react-responsive-media/pull/50) ([@renovate-bot](https://github.com/renovate-bot))
- Update dependency auto-release-cli to v2.1.3 [#48](https://github.com/artsy/react-responsive-media/pull/48) ([@renovate-bot](https://github.com/renovate-bot))
- Update yarn orb to v0.0.7 [#47](https://github.com/artsy/react-responsive-media/pull/47) ([@renovate-bot](https://github.com/renovate-bot))
- Update dependency auto-release-cli to v2 [#46](https://github.com/artsy/react-responsive-media/pull/46) ([@renovate-bot](https://github.com/renovate-bot))
- Pin dependencies [#43](https://github.com/artsy/react-responsive-media/pull/43) ([@renovate-bot](https://github.com/renovate-bot))
- Update yarn orb to v0.0.5 [#44](https://github.com/artsy/react-responsive-media/pull/44) ([@renovate-bot](https://github.com/renovate-bot))
- Configure Renovate [#41](https://github.com/artsy/react-responsive-media/pull/41) ([@renovate-bot](https://github.com/renovate-bot) [@zephraph](https://github.com/zephraph))
- Update .autorc to fit v2 [#42](https://github.com/artsy/react-responsive-media/pull/42) ([@zephraph](https://github.com/zephraph))
- Update dependency @artsy/detect-responsive-traits to v0.0.4 [#74](https://github.com/artsy/fresnel/pull/74) ([@renovate-bot](https://github.com/renovate-bot))
- Update yarn orb to v0.2.0 [#73](https://github.com/artsy/fresnel/pull/73) ([@renovate-bot](https://github.com/renovate-bot))
- Update yarn orb to v0.1.8 [#72](https://github.com/artsy/fresnel/pull/72) ([@renovate-bot](https://github.com/renovate-bot))
- Update yarn orb to v0.1.7 [#71](https://github.com/artsy/fresnel/pull/71) ([@renovate-bot](https://github.com/renovate-bot))
- Update yarn orb to v0.1.6 [#70](https://github.com/artsy/fresnel/pull/70) ([@renovate-bot](https://github.com/renovate-bot))
- Update dependency @artsy/auto-config to v0.1.0 [#69](https://github.com/artsy/fresnel/pull/69) ([@renovate-bot](https://github.com/renovate-bot))
- Pin dependency @artsy/auto-config to 0.0.8 [#68](https://github.com/artsy/fresnel/pull/68) ([@renovate-bot](https://github.com/renovate-bot))
- Use shared auto-config [#67](https://github.com/artsy/fresnel/pull/67) ([@zephraph](https://github.com/zephraph))
- Update yarn orb to v0.1.5 [#65](https://github.com/artsy/fresnel/pull/65) ([@renovate-bot](https://github.com/renovate-bot))
- Update yarn orb to v0.1.4 [#64](https://github.com/artsy/fresnel/pull/64) ([@renovate-bot](https://github.com/renovate-bot))
- Update yarn orb to v0.1.1 [#63](https://github.com/artsy/fresnel/pull/63) ([@renovate-bot](https://github.com/renovate-bot))
- Fix CI failures by using yarn orb [#62](https://github.com/artsy/fresnel/pull/62) ([@zephraph](https://github.com/zephraph))
- Update dependency @artsy/detect-responsive-traits to v0.0.2 [#60](https://github.com/artsy/fresnel/pull/60) ([@renovate-bot](https://github.com/renovate-bot))
- Don't release trivial changes [#61](https://github.com/artsy/fresnel/pull/61) ([@zephraph](https://github.com/zephraph))
- Make trivial considered an internal change [#59](https://github.com/artsy/fresnel/pull/59) ([@zephraph](https://github.com/zephraph))
- Remove auto-release-cli as a dependency [#58](https://github.com/artsy/fresnel/pull/58) ([@zephraph](https://github.com/zephraph))
- Update yarn orb to v0.1.0 [#57](https://github.com/artsy/fresnel/pull/57) ([@renovate-bot](https://github.com/renovate-bot))
- Update dependency auto-release-cli to v2.4.1 [#56](https://github.com/artsy/fresnel/pull/56) ([@renovate-bot](https://github.com/renovate-bot))
- Update dependency auto-release-cli to v2.4.0 [#55](https://github.com/artsy/fresnel/pull/55) ([@renovate-bot](https://github.com/renovate-bot))
- Update dependency auto-release-cli to v2.3.2 [#54](https://github.com/artsy/fresnel/pull/54) ([@renovate-bot](https://github.com/renovate-bot))
- Update dependency auto-release-cli to v2.3.1 [#53](https://github.com/artsy/fresnel/pull/53) ([@renovate-bot](https://github.com/renovate-bot))
- Update yarn orb to v0.0.8 [#52](https://github.com/artsy/fresnel/pull/52) ([@renovate-bot](https://github.com/renovate-bot))
- Update dependency auto-release-cli to v2.3.0 [#51](https://github.com/artsy/fresnel/pull/51) ([@renovate-bot](https://github.com/renovate-bot))
- Update dependency auto-release-cli to v2.2.0 [#50](https://github.com/artsy/fresnel/pull/50) ([@renovate-bot](https://github.com/renovate-bot))
- Update dependency auto-release-cli to v2.1.3 [#48](https://github.com/artsy/fresnel/pull/48) ([@renovate-bot](https://github.com/renovate-bot))
- Update yarn orb to v0.0.7 [#47](https://github.com/artsy/fresnel/pull/47) ([@renovate-bot](https://github.com/renovate-bot))
- Update dependency auto-release-cli to v2 [#46](https://github.com/artsy/fresnel/pull/46) ([@renovate-bot](https://github.com/renovate-bot))
- Pin dependencies [#43](https://github.com/artsy/fresnel/pull/43) ([@renovate-bot](https://github.com/renovate-bot))
- Update yarn orb to v0.0.5 [#44](https://github.com/artsy/fresnel/pull/44) ([@renovate-bot](https://github.com/renovate-bot))
- Configure Renovate [#41](https://github.com/artsy/fresnel/pull/41) ([@renovate-bot](https://github.com/renovate-bot) [@zephraph](https://github.com/zephraph))
- Update .autorc to fit v2 [#42](https://github.com/artsy/fresnel/pull/42) ([@zephraph](https://github.com/zephraph))

#### ⚠️ Pushed to master

Expand All @@ -82,13 +82,13 @@

---

# 1.0.13 (Sun Jan 06 2019)
# rrm-v1.0.13 (Sun Jan 06 2019)

#### 🐛 Bug Fix

- Add auto-release [#40](https://github.com/artsy/react-responsive-media/pull/40) ([@damassi](https://github.com/damassi) [@zephraph](https://github.com/zephraph))
- [tsc] Enable strict mode [#39](https://github.com/artsy/react-responsive-media/pull/39) ([@alloy](https://github.com/alloy))
- [example] More expansive device detection and not load hidden imaged [#38](https://github.com/artsy/react-responsive-media/pull/38) ([@alloy](https://github.com/alloy))
- Add auto-release [#40](https://github.com/artsy/fresnel/pull/40) ([@damassi](https://github.com/damassi) [@zephraph](https://github.com/zephraph))
- [tsc] Enable strict mode [#39](https://github.com/artsy/fresnel/pull/39) ([@alloy](https://github.com/alloy))
- [example] More expansive device detection and not load hidden imaged [#38](https://github.com/artsy/fresnel/pull/38) ([@alloy](https://github.com/alloy))

#### Authors: 3

Expand Down
28 changes: 16 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
# @artsy/react-responsive-media
# @artsy/fresnel

[![CircleCI][ci-icon]][ci] [![npm version][npm-icon]][npm]

> The Fresnel equations describe the reflection of light when incident on an
> interface between different optical media.
https://en.wikipedia.org/wiki/Fresnel_equations

## Installation

```sh
yarn add @artsy/react-responsive-media
yarn add @artsy/fresnel
```

**Table of Contents**
Expand Down Expand Up @@ -43,15 +48,15 @@ directly in CSS/HTML:
<div class="my-container" />
```

By hooking into a breakpoint definition, `@artsy/react-responsive-media` takes
this declarative approach and brings it into the React world.
By hooking into a breakpoint definition, `@artsy/fresnel` takes this declarative
approach and brings it into the React world.

## Basic Example

```tsx
import React from "react"
import ReactDOM from "react-dom"
import { createMedia } from "@artsy/react-responsive-media"
import { createMedia } from "@artsy/fresnel"

const { MediaContextProvider, Media } = createMedia({
breakpoints: {
Expand Down Expand Up @@ -536,14 +541,13 @@ then use the `Skip Release` tag along side the appropriate version tag.
</details>
[ci]: https://circleci.com/gh/artsy/react-responsive-media
[ci-icon]: https://circleci.com/gh/artsy/react-responsive-media.svg?style=shield
[npm]: https://www.npmjs.com/package/@artsy/react-responsive-media
[npm-icon]: https://badge.fury.io/js/%40artsy%2Freact-responsive-media.svg
[ci]: https://circleci.com/gh/artsy/fresnel
[ci-icon]: https://circleci.com/gh/artsy/fresnel.svg?style=shield
[npm]: https://www.npmjs.com/package/@artsy/fresnel
[npm-icon]: https://badge.fury.io/js/%40artsy%2Ffresnel.svg
[react-responsive]: https://github.com/contra/react-responsive
[react-media]: https://github.com/ReactTraining/react-media
[match-media-api]:
https://developer.mozilla.org/en-US/docs/Web/API/Window/matchMedia
[new-issue]: https://github.com/artsy/react-responsive-media/issues/new
[release-tags]:
https://github.com/artsy/react-responsive-media/blob/master/package.json
[new-issue]: https://github.com/artsy/fresnel/issues/new
[release-tags]: https://github.com/artsy/fresnel/blob/master/package.json
2 changes: 1 addition & 1 deletion examples/basic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"start": "babel-node --extensions '.ts,.tsx,.js,.jsx' src/server.tsx"
},
"dependencies": {
"@artsy/react-responsive-media": "^2.0.3",
"@artsy/fresnel": "^0.0.1",
"@babel/node": "^7.4.5",
"express": "^4.17.0",
"react": "^16.8.6",
Expand Down
2 changes: 1 addition & 1 deletion examples/basic/src/client.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react"
import ReactDOM from "react-dom"
import { createMedia } from "@artsy/react-responsive-media"
import { createMedia } from "@artsy/fresnel"

const ExampleAppMedia = createMedia({
breakpoints: {
Expand Down
2 changes: 1 addition & 1 deletion examples/gatsby/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"version": "0.1.0",
"author": "Artsy Inc",
"dependencies": {
"@artsy/react-responsive-media": "^2.0.3",
"@artsy/fresnel": "^0.0.1",
"gatsby": "^2.5.7",
"gatsby-plugin-typescript": "^2.0.14",
"react": "^16.8.6",
Expand Down
2 changes: 1 addition & 1 deletion examples/gatsby/src/Media.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createMedia } from "@artsy/react-responsive-media"
import { createMedia } from "@artsy/fresnel"

const ExampleAppMedia = createMedia({
breakpoints: {
Expand Down
2 changes: 1 addition & 1 deletion examples/kitchen-sink/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"start": "babel-node --extensions '.ts,.tsx,.js,.jsx' src/server.tsx"
},
"dependencies": {
"@artsy/react-responsive-media": "^2.0.3",
"@artsy/fresnel": "^0.0.1",
"@babel/node": "^7.4.5",
"express": "^4.17.0",
"react": "^16.8.6",
Expand Down
4 changes: 2 additions & 2 deletions examples/kitchen-sink/src/Media.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createMedia } from "@artsy/react-responsive-media"
import { createMedia } from "@artsy/fresnel"

const ExampleAppMedia = createMedia({
breakpoints: {
Expand All @@ -24,4 +24,4 @@ export const {
SortedBreakpoints,
} = ExampleAppMedia

export const SSRStyleID = "ssr-rrm-style"
export const SSRStyleID = "ssr-fresnel-style"
2 changes: 1 addition & 1 deletion examples/kitchen-sink/src/server.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ app.get("/client-only", (_req, res) => {
})

/**
* Misc things that are not of interest for demonstrating react-responsive-media
* Misc things that are not of interest for demonstrating fresnel
*/

// TODO: Simplify this hideous typing.
Expand Down
2 changes: 1 addition & 1 deletion examples/ssr-rendering/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"start": "babel-node --extensions '.ts,.tsx,.js,.jsx' src/server.tsx"
},
"dependencies": {
"@artsy/react-responsive-media": "^2.0.3",
"@artsy/fresnel": "^0.0.1",
"@babel/node": "^7.4.5",
"express": "^4.17.0",
"react": "^16.8.6",
Expand Down
2 changes: 1 addition & 1 deletion examples/ssr-rendering/src/Media.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createMedia } from "@artsy/react-responsive-media"
import { createMedia } from "@artsy/fresnel"

const ExampleAppMedia = createMedia({
breakpoints: {
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@artsy/react-responsive-media",
"version": "2.0.3",
"description": "A declarative SSR-compatible approach to CSS media query based responsive layouts.",
"name": "@artsy/fresnel",
"version": "0.0.1",
"description": "An SSR compatible approach to CSS media query based responsive layouts for React.",
"main": "dist/index.js",
"files": [
"dist"
Expand Down Expand Up @@ -29,17 +29,17 @@
},
"repository": {
"type": "git",
"url": "git+ssh://git@github.com/artsy/react-responsive-media.git"
"url": "git+ssh://git@github.com/artsy/fresnel.git"
},
"authors": [
"Eloy Durán <eloy.de.enige@gmail.com>",
"Art.sy Inc"
],
"license": "MIT",
"bugs": {
"url": "https://github.com/artsy/react-responsive-media/issues"
"url": "https://github.com/artsy/fresnel/issues"
},
"homepage": "https://github.com/artsy/react-responsive-media#readme",
"homepage": "https://github.com/artsy/fresnel#readme",
"peerDependencies": {
"react": "^16.3.0"
},
Expand Down
2 changes: 1 addition & 1 deletion renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"@artsy:lib"
],
"ignoreDeps": [
"@artsy/react-responsive-media"
"@artsy/fresnel"
],
"assignees": [
"zephraph"
Expand Down
4 changes: 2 additions & 2 deletions src/Media.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ export function createMedia<
}

console.warn(
"[@artsy/react-responsive-media] " +
"[@artsy/fresnel] " +
"`at` is being used with the largest breakpoint. " +
"Consider using `<Media greaterThanOrEqual=" +
`"${largestBreakpoint}">\` to account for future ` +
Expand Down Expand Up @@ -419,7 +419,7 @@ export function createMedia<
} else {
return (
<div
className={`rrm-container ${className}`}
className={`fresnel-container ${className}`}
suppressHydrationWarning={!renderChildren}
>
{renderChildren ? props.children : null}
Expand Down
2 changes: 1 addition & 1 deletion src/MediaQueries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export class MediaQueries<B extends string> {
public toStyle = () => {
return [
// Don’t add any size to the layout
".rrm-container{margin:0;padding:0;}",
".fresnel-container{margin:0;padding:0;}",
...this._breakpoints.toRuleSets(),
...this._interactions.toRuleSets(),
].join("\n")
Expand Down
2 changes: 1 addition & 1 deletion src/Utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export function createClassName(
...components: Array<string | [string, string]>
) {
return [
"rrm",
"fresnel",
...components.reduce(
(acc: string[], breakpoint) =>
Array.isArray(breakpoint)
Expand Down

0 comments on commit 68b9bc6

Please sign in to comment.