@newhighsco/chipset 6.14.12 → 6.14.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@newhighsco/chipset",
3
3
  "description": "Shareable, theme-able component library by New High Score",
4
- "version": "6.14.12",
4
+ "version": "6.14.14",
5
5
  "author": "New High Score <hello@newhighsco.re>",
6
6
  "license": "ISC",
7
7
  "config": {
@@ -60,7 +60,7 @@
60
60
  "@newhighsco/prettier-config": "2.1.8",
61
61
  "@newhighsco/release-config": "1.3.15",
62
62
  "@newhighsco/storybook-preset": "4.5.62",
63
- "@newhighsco/stylelint-config": "3.1.33",
63
+ "@newhighsco/stylelint-config": "3.1.34",
64
64
  "@storybook/builder-webpack5": "6.5.16",
65
65
  "@storybook/manager-webpack5": "6.5.16",
66
66
  "@storybook/react": "6.5.16",
@@ -82,7 +82,7 @@
82
82
  "react-dom": "18.2.0",
83
83
  "sass-true": "7.0.0",
84
84
  "semantic-release": "20.1.0",
85
- "stylelint": "14.16.1",
85
+ "stylelint": "15.0.0",
86
86
  "webpack": "5.75.0"
87
87
  },
88
88
  "peerDependencies": {
@@ -5,7 +5,7 @@ import urlJoin from 'url-join'
5
5
  const getExternalUrl = url =>
6
6
  `https://api.allorigins.win/get?url=${encodeURIComponent(url)}`
7
7
 
8
- const { hostname } = window.location
8
+ const location = typeof window !== 'undefined' ? window.location : null
9
9
 
10
10
  const PROVIDERS = {
11
11
  facebook: {
@@ -28,7 +28,7 @@ const PROVIDERS = {
28
28
  const url = new URL('https://player.twitch.tv')
29
29
  url.search = new URLSearchParams({
30
30
  channel,
31
- parent: hostname,
31
+ parent: location?.hostname,
32
32
  autoplay: !!autoPlay,
33
33
  muted: !!muted
34
34
  })
@@ -38,7 +38,7 @@ const PROVIDERS = {
38
38
  getChatUrl: ({ channel, darkMode }) => {
39
39
  const url = new URL(`https://www.twitch.tv/embed/${channel}/chat`)
40
40
  url.search = new URLSearchParams({
41
- parent: hostname,
41
+ parent: location?.hostname,
42
42
  ...(darkMode && { darkpopout: '' })
43
43
  })
44
44
 
@@ -75,7 +75,7 @@ const PROVIDERS = {
75
75
  const url = new URL('https://www.youtube.com/live_chat')
76
76
  url.search = new URLSearchParams({
77
77
  v: channel,
78
- embed_domain: hostname,
78
+ embed_domain: location?.hostname,
79
79
  ...(darkMode && { dark_theme: 1 })
80
80
  })
81
81