css-prefers-color-scheme 6.0.2 → 7.0.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,61 @@
1
1
  # Changes to Prefers Color Scheme
2
2
 
3
+ ### 7.0.1 (August 23, 2022)
4
+
5
+ - Fix: assign global browser polyfill to `window`, `self` or a blank object.
6
+
7
+ ### 7.0.0 (July 8, 2022)
8
+
9
+ [Read the full changelog](https://github.com/csstools/postcss-plugins/wiki/PostCSS-Preset-Env-8)
10
+
11
+ - Breaking: removed old CDN urls
12
+ - Breaking: remove `color-depth` queries fallback
13
+ - Breaking: remove 'no-preference' support as this was dropped from the spec
14
+ - Breaking: remove old global object
15
+ - Fix: case insensitive matching.
16
+
17
+ #### How to migrate :
18
+
19
+ ##### Re-build your CSS with the new version of the library.
20
+
21
+ ##### If you use a CDN url, please update it.
22
+
23
+ ```diff
24
+ - <script src="https://unpkg.com/css-prefers-color-scheme/browser"></script>
25
+ + <script src="https://unpkg.com/css-prefers-color-scheme/dist/browser-global.js"></script>
26
+ ```
27
+
28
+ ```diff
29
+ - <script src="https://unpkg.com/css-prefers-color-scheme/browser.min"></script>
30
+ + <script src="https://unpkg.com/css-prefers-color-scheme/dist/browser-global.js"></script>
31
+ ```
32
+
33
+ ##### Use `prefersColorSchemeInit` to initialize the polyfill in the browser.
34
+
35
+ ```diff
36
+ - initPrefersColorScheme()
37
+ + prefersColorSchemeInit()
38
+ ```
39
+
40
+ ##### Remove `@media (prefer-color-scheme: no-preference)` from your CSS.
41
+
42
+ `@media (prefers-color-scheme: no-preference)` was removed from the specification and should be equivalent to not having any media query.
43
+
44
+ ```diff
45
+ - @media (prefers-color-scheme: no-preference) {
46
+ - .some-selector {
47
+ - /* your styles ... */
48
+ - }
49
+ - }
50
+ + .some-selector {
51
+ + /* your styles ... */
52
+ + }
53
+ ```
54
+
55
+ ### 6.0.3 (January 31, 2022)
56
+
57
+ - Fix `preserve: false` option.
58
+
3
59
  ### 6.0.2 (January 2, 2022)
4
60
 
5
61
  - Removed Sourcemaps from package tarball.
package/README.md CHANGED
@@ -1,96 +1,329 @@
1
- # Prefers Color Scheme [<img src="https://jonathantneal.github.io/js-logo.svg" alt="" width="90" height="90" align="right">][Prefers Color Scheme]
1
+ # Prefers Color Scheme [<img src="https://postcss.github.io/postcss/logo.svg" alt="PostCSS Logo" width="90" height="90" align="right">][postcss]
2
2
 
3
- [![NPM Version][npm-img]][npm-url]
4
- [![Build Status][cli-img]][cli-url]
5
- [![Support Chat][git-img]][git-url]
3
+ [<img alt="npm version" src="https://img.shields.io/npm/v/css-prefers-color-scheme.svg" height="20">][npm-url] [<img alt="CSS Standard Status" src="https://cssdb.org/images/badges/prefers-color-scheme-query.svg" height="20">][css-url] [<img alt="Build Status" src="https://github.com/csstools/postcss-plugins/workflows/test/badge.svg" height="20">][cli-url] [<img alt="Discord" src="https://shields.io/badge/Discord-5865F2?logo=discord&logoColor=white">][discord]
6
4
 
7
- [Prefers Color Scheme] lets you use light and dark color schemes in all
8
- browsers, following the [Media Queries] specification.
5
+ [Prefers Color Scheme] lets you use light and dark color schemes in all browsers, following the [Media Queries] specification.
9
6
 
10
- [!['Can I use' table](https://caniuse.bitsofco.de/image/prefers-color-scheme.png)](https://caniuse.com/#feat=prefers-color-scheme)
7
+ ```pcss
8
+ @media (prefers-color-scheme: dark) {
9
+ :root {
10
+ --site-bgcolor: #1b1b1b;
11
+ --site-color: #fff;
12
+ }
13
+ }
14
+
15
+ @media (prefers-color-scheme: light) {
16
+ :root {
17
+ --site-bgcolor: #fff;
18
+ --site-color: #222;
19
+ }
20
+ }
21
+
22
+ /* becomes */
23
+
24
+ @media (color: 48842621) {
25
+ :root {
26
+ --site-bgcolor: #1b1b1b;
27
+ --site-color: #fff;
28
+ }
29
+ }
30
+
31
+ @media (prefers-color-scheme: dark) {
32
+ :root {
33
+ --site-bgcolor: #1b1b1b;
34
+ --site-color: #fff;
35
+ }
36
+ }
37
+
38
+ @media (color: 70318723) {
39
+ :root {
40
+ --site-bgcolor: #fff;
41
+ --site-color: #222;
42
+ }
43
+ }
44
+
45
+ @media (prefers-color-scheme: light) {
46
+ :root {
47
+ --site-bgcolor: #fff;
48
+ --site-color: #222;
49
+ }
50
+ }
51
+ ```
11
52
 
12
53
  ## Usage
13
54
 
14
- From the command line, transform CSS files that use `prefers-color-scheme`
15
- media queries:
55
+ Add [Prefers Color Scheme] to your project:
16
56
 
17
57
  ```bash
18
- npx css-prefers-color-scheme SOURCE.css TRANSFORMED.css
58
+ npm install postcss css-prefers-color-scheme --save-dev
59
+ ```
60
+
61
+ Use it as a [PostCSS] plugin:
62
+
63
+ ```js
64
+ const postcss = require('postcss');
65
+ const prefersColorScheme = require('css-prefers-color-scheme');
66
+
67
+ postcss([
68
+ prefersColorScheme(/* pluginOptions */)
69
+ ]).process(YOUR_CSS /*, processOptions */);
70
+ ```
71
+
72
+ [Prefers Color Scheme] runs in all Node environments, with special
73
+ instructions for:
74
+
75
+ | [Node](INSTALL.md#node) | [PostCSS CLI](INSTALL.md#postcss-cli) | [Webpack](INSTALL.md#webpack) | [Create React App](INSTALL.md#create-react-app) | [Gulp](INSTALL.md#gulp) | [Grunt](INSTALL.md#grunt) |
76
+ | --- | --- | --- | --- | --- | --- |
77
+
78
+ ## Options
79
+
80
+ ### preserve
81
+
82
+ The `preserve` option determines whether the original notation
83
+ is preserved. By default, it is preserved.
84
+
85
+ ```js
86
+ prefersColorScheme({ preserve: false })
19
87
  ```
20
88
 
21
- Next, use that transformed CSS with this script:
89
+ ```pcss
90
+ @media (prefers-color-scheme: dark) {
91
+ :root {
92
+ --site-bgcolor: #1b1b1b;
93
+ --site-color: #fff;
94
+ }
95
+ }
96
+
97
+ @media (prefers-color-scheme: light) {
98
+ :root {
99
+ --site-bgcolor: #fff;
100
+ --site-color: #222;
101
+ }
102
+ }
103
+
104
+ /* becomes */
105
+
106
+ @media (color: 48842621) {
107
+ :root {
108
+ --site-bgcolor: #1b1b1b;
109
+ --site-color: #fff;
110
+ }
111
+ }
112
+
113
+ @media (color: 70318723) {
114
+ :root {
115
+ --site-bgcolor: #fff;
116
+ --site-color: #222;
117
+ }
118
+ }
119
+ ```
120
+
121
+ ## Browser
122
+
123
+ ```js
124
+ // initialize prefersColorScheme (applies the current OS color scheme, if available)
125
+ import prefersColorSchemeInit from 'css-prefers-color-scheme/browser';
126
+ const prefersColorScheme = prefersColorSchemeInit();
127
+
128
+ // apply "dark" queries (you can also apply "light")
129
+ prefersColorScheme.scheme = 'dark';
130
+ ```
131
+
132
+ or
22
133
 
23
134
  ```html
24
- <link rel="stylesheet" href="TRANSFORMED.css">
25
- <script src="https://unpkg.com/css-prefers-color-scheme/dist/browser-global.js"></script>
26
- <script>
27
- colorScheme = initPrefersColorScheme('dark') // apply "dark" queries (you can change it afterward, too)
28
- </script>
135
+ <!-- When using a CDN url you will have to manually update the version number -->
136
+ <script src="https://unpkg.com/css-prefers-color-scheme@7.0.1/dist/browser-global.js"></script>
137
+ <script>prefersColorSchemeInit()</script>
29
138
  ```
30
139
 
31
- ⚠️ Please use a versioned url, like this : `https://unpkg.com/css-prefers-color-scheme@6.0.0/dist/browser-global.js`
140
+ ⚠️ Please use a versioned url, like this : `https://unpkg.com/css-prefers-color-scheme@7.0.1/dist/browser-global.js`
32
141
  Without the version, you might unexpectedly get a new major version of the library with breaking changes.
33
142
 
34
- ⚠️ If you were using an older version via a CDN, please update the entire url.
35
- The old URL will no longer work in a future release.
143
+ [Prefers Color Scheme] works in all major browsers, including Safari 6+ and
144
+ Internet Explorer 9+ without any additional polyfills.
36
145
 
37
- ## Usage
146
+ To maintain compatibility with browsers supporting `prefers-color-scheme`, the
147
+ library will remove `prefers-color-scheme` media queries in favor of
148
+ cross-browser compatible `color` media queries. This ensures a seamless
149
+ experience, even when JavaScript is unable to run.
38
150
 
39
- - First, transform `prefers-color-scheme` queries using this
40
- [PostCSS plugin](README-POSTCSS.md).
41
- - Next, apply light and dark color schemes everywhere using this
42
- [browser script](README-BROWSER.md).
151
+ ### Browser Usage
43
152
 
44
- ---
153
+ Use [Prefers Color Scheme] to activate your `prefers-color-scheme` queries:
45
154
 
46
- ## How does it work?
155
+ ```js
156
+ import prefersColorSchemeInit from 'css-prefers-color-scheme/browser';
157
+ const prefersColorScheme = prefersColorSchemeInit();
158
+ ```
159
+
160
+ By default, the current OS color scheme is applied if your browser supports it.
161
+ Otherwise, the light color scheme is applied. You may override this by passing
162
+ in a color scheme.
163
+
164
+ ```js
165
+ import prefersColorSchemeInit from 'css-prefers-color-scheme/browser';
166
+ const prefersColorScheme = prefersColorSchemeInit('dark');
167
+ ```
168
+
169
+ The `prefersColorScheme` object returns the following properties — `scheme`,
170
+ `hasNativeSupport`, `onChange`, and `removeListener`.
171
+
172
+ #### scheme
173
+
174
+ The `scheme` property returns the currently preferred color scheme, and it can
175
+ be changed.
176
+
177
+ ```js
178
+ import prefersColorSchemeInit from 'css-prefers-color-scheme/browser';
179
+ const prefersColorScheme = prefersColorSchemeInit();
47
180
 
48
- _This plugin used to work with `color-index` as detailed here : [color-index](https://github.com/csstools/css-prefers-color-scheme#how-does-it-work)._
49
- _This is deprecated but will continue to work for now._
50
- _`color` has better browser support and enables complex media queries._
181
+ // log the preferred color scheme
182
+ console.log(prefersColorScheme.scheme);
183
+
184
+ // apply "dark" queries
185
+ prefersColorScheme.scheme = 'dark';
186
+ ```
187
+
188
+ #### hasNativeSupport
189
+
190
+ The `hasNativeSupport` boolean represents whether `prefers-color-scheme` is
191
+ supported by the browser.
192
+
193
+ #### onChange
194
+
195
+ The optional `onChange` function is run when the preferred color scheme is
196
+ changed, either from the OS or manually.
197
+
198
+ #### removeListener
199
+
200
+ The `removeListener` function removes the native `prefers-color-scheme`
201
+ listener, which may or may not be applied, depending on your browser support.
202
+ This is provided to give you complete control over plugin cleanup.
203
+
204
+ #### debug
205
+
206
+ If styles are not applied you can enable debug mode to log exceptions.
207
+
208
+ ```js
209
+ import prefersColorSchemeInit from 'css-prefers-color-scheme/browser';
210
+ const prefersColorScheme = prefersColorSchemeInit('light', { debug: true });
211
+ ```
212
+
213
+ ```html
214
+ <script src="https://unpkg.com/css-prefers-color-scheme@7.0.1/dist/browser-global.js"></script>
215
+ <script>prefersColorSchemeInit('light', { debug: true })</script>
216
+ ```
217
+
218
+
219
+ ### Browser Dependencies
220
+
221
+ Web API's:
222
+
223
+ - [Window.matchMedia](https://developer.mozilla.org/en-US/docs/Web/API/Window/matchMedia)
224
+
225
+ ECMA Script:
226
+
227
+ - `Object.defineProperty`
228
+ - `Array.prototype.forEach`
229
+ - `Array.prototype.indexOf`
230
+ - `RegExp.prototype.exec`
231
+ - `String.prototype.match`
232
+ - `String.prototype.replace`
233
+
234
+ ## CORS
235
+
236
+ ⚠️ Applies to you if you load CSS from a different domain than the page.
237
+
238
+ In this case the CSS is treated as untrusted and will not be made available to the JavaScript polyfill.
239
+ The polyfill will not work without applying the correct configuration for CORS.
240
+
241
+ Example :
242
+
243
+ | page | css | CORS applies |
244
+ | --- | --- | --- |
245
+ | https://example.com/ | https://example.com/style.css | no |
246
+ | https://example.com/ | https://other.com/style.css | yes |
247
+
248
+
249
+ **You might see one of these error messages :**
250
+
251
+ Chrome :
252
+
253
+ > DOMException: Failed to read the 'cssRules' property from 'CSSStyleSheet': Cannot access rules
254
+
255
+ Safari :
256
+
257
+ > SecurityError: Not allowed to access cross-origin stylesheet
258
+
259
+ Firefox :
260
+
261
+ > DOMException: CSSStyleSheet.cssRules getter: Not allowed to access cross-origin stylesheet
262
+
263
+ To resolve CORS errors you need to take two steps :
264
+
265
+ - add an HTTP header `Access-Control-Allow-Origin: <your-value>` when serving your CSS file.
266
+ - add `crossorigin="anonymous"` to the `<link rel="stylesheet">` tag for your CSS file.
267
+
268
+ In a node server setting the HTTP header might look like this :
269
+
270
+ ```js
271
+ // http://localhost:8080 is the domain of your page!
272
+ res.setHeader('Access-Control-Allow-Origin', 'https://example.com');
273
+ ```
274
+
275
+ You can also configure a wildcard but please be aware that this might be a security risk.
276
+ It is better to only set the header for the domain you want to allow and only on the responses you want to allow.
277
+
278
+ HTML might look like this :
279
+
280
+ ```html
281
+ <link rel="stylesheet" href="https://example.com/styles.css" crossorigin="anonymous">
282
+ ```
283
+
284
+
285
+ ## How does it work?
51
286
 
52
- [Prefers Color Scheme] uses a [PostCSS plugin](README-POSTCSS.md) to transform
53
- `prefers-color-scheme` queries into `color` queries. This changes
54
- `prefers-color-scheme: dark` into `(color: 48842621)`,
55
- `prefers-color-scheme: light` into `(color: 70318723)`, and
56
- `prefers-color-scheme: no-preference` into `(color: 22511989)`.
287
+ [Prefers Color Scheme] is a [PostCSS] plugin that transforms `prefers-color-scheme` queries into `color` queries.
288
+ This changes `prefers-color-scheme: dark` into `(color: 48842621)` and `prefers-color-scheme: light` into `(color: 70318723)`.
57
289
 
58
290
  The frontend receives these `color` queries, which are understood in all
59
291
  major browsers going back to Internet Explorer 9.
60
292
  However, since browsers can only have a reasonably small number of bits per color,
61
293
  our color scheme values are ignored.
62
294
 
63
- [Prefers Color Scheme] uses a [browser script](README-BROWSER.md) to change
295
+ [Prefers Color Scheme] uses a [browser script](#browser) to change
64
296
  `(color: 48842621)` queries into `(max-color: 48842621)` in order to
65
297
  activate “dark mode” specific CSS, and it changes `(color: 70318723)` queries
66
298
  into `(max-color: 48842621)` to activate “light mode” specific CSS.
67
299
 
68
300
  ```css
69
301
  @media (color: 70318723) { /* prefers-color-scheme: light */
70
- body {
71
- background-color: white;
72
- color: black;
73
- }
302
+ body {
303
+ background-color: white;
304
+ color: black;
305
+ }
74
306
  }
75
307
  ```
76
308
 
77
309
  Since these media queries are accessible to `document.styleSheet`, no CSS
78
310
  parsing is required.
79
311
 
80
- ## Why does the fallback work this way?
312
+ ### Why does the fallback work this way?
81
313
 
82
314
  The value of `48` is chosen for dark mode because it is the keycode for `0`,
83
315
  the hexidecimal value of black. Likewise, `70` is chosen for light mode because
84
316
  it is the keycode for `f`, the hexidecimal value of white.
85
317
  These are suffixed with a random large number.
86
318
 
87
- [cli-img]: https://github.com/csstools/postcss-plugins/workflows/test/badge.svg
88
319
  [cli-url]: https://github.com/csstools/postcss-plugins/actions/workflows/test.yml?query=workflow/test
89
- [git-img]: https://img.shields.io/badge/support-chat-blue.svg
90
- [git-url]: https://gitter.im/postcss/postcss
91
- [npm-img]: https://img.shields.io/npm/v/css-prefers-color-scheme.svg
320
+ [css-url]: https://cssdb.org/#prefers-color-scheme-query
321
+ [discord]: https://discord.gg/bUadyRwkJS
92
322
  [npm-url]: https://www.npmjs.com/package/css-prefers-color-scheme
93
323
 
324
+ [Gulp PostCSS]: https://github.com/postcss/gulp-postcss
325
+ [Grunt PostCSS]: https://github.com/nDmitry/grunt-postcss
94
326
  [PostCSS]: https://github.com/postcss/postcss
327
+ [PostCSS Loader]: https://github.com/postcss/postcss-loader
95
328
  [Prefers Color Scheme]: https://github.com/csstools/postcss-plugins/tree/main/plugins/css-prefers-color-scheme
96
- [Media Queries]: https://drafts.csswg.org/mediaqueries-5/#descdef-media-prefers-color-scheme
329
+ [Media Queries]: https://www.w3.org/TR/mediaqueries-5/#prefers-color-scheme
@@ -1,100 +1,2 @@
1
- (function () {
2
-
3
- /* global document,window,matchMedia */
4
- var colorIndexRegExp = /((?:not )?all and )?(\(color-index: *(22|48|70)\))/i;
5
- var prefersColorSchemeRegExp = /prefers-color-scheme:/i;
6
-
7
- var prefersColorSchemeInit = function prefersColorSchemeInit(initialColorScheme) {
8
- var mediaQueryString = '(prefers-color-scheme: dark)';
9
- var mediaQueryList = window.matchMedia && matchMedia(mediaQueryString);
10
- var hasNativeSupport = mediaQueryList && mediaQueryList.media === mediaQueryString;
11
-
12
- var mediaQueryListener = function mediaQueryListener() {
13
- set(mediaQueryList.matches ? 'dark' : 'light');
14
- };
15
-
16
- var removeListener = function removeListener() {
17
- if (mediaQueryList) {
18
- mediaQueryList.removeListener(mediaQueryListener);
19
- }
20
- };
21
-
22
- var set = function set(colorScheme) {
23
- if (colorScheme !== currentColorScheme) {
24
- currentColorScheme = colorScheme;
25
-
26
- if (typeof result.onChange === 'function') {
27
- result.onChange();
28
- }
29
- }
30
-
31
- [].forEach.call(document.styleSheets || [], function (styleSheet) {
32
- // cssRules is a live list. Converting to an Array first.
33
- var rules = [];
34
- [].forEach.call(styleSheet.cssRules || [], function (cssRule) {
35
- rules.push(cssRule);
36
- });
37
- rules.forEach(function (cssRule) {
38
- var colorSchemeMatch = prefersColorSchemeRegExp.test(Object(cssRule.media).mediaText);
39
-
40
- if (colorSchemeMatch) {
41
- var index = [].indexOf.call(cssRule.parentStyleSheet.cssRules, cssRule);
42
- cssRule.parentStyleSheet.deleteRule(index);
43
- } else {
44
- var colorIndexMatch = (Object(cssRule.media).mediaText || '').match(colorIndexRegExp);
45
-
46
- if (colorIndexMatch) {
47
- // Old style which has poor browser support and can't handle complex media queries.
48
- cssRule.media.mediaText = ((/^dark$/i.test(colorScheme) ? colorIndexMatch[3] === '48' : /^light$/i.test(colorScheme) ? colorIndexMatch[3] === '70' : colorIndexMatch[3] === '22') ? 'not all and ' : '') + cssRule.media.mediaText.replace(colorIndexRegExp, '$2');
49
- } else {
50
- // New style which supports complex media queries.
51
- var colorDepthMatch = (Object(cssRule.media).mediaText || '').match(/\( *(?:color|max-color): *(48842621|70318723|22511989) *\)/i);
52
-
53
- if (colorDepthMatch && colorDepthMatch.length > 1) {
54
- if (/^dark$/i.test(colorScheme) && (colorDepthMatch[1] === '48842621' || colorDepthMatch[1] === '22511989')) {
55
- // No preference or preferred is dark and rule is dark.
56
- cssRule.media.mediaText = cssRule.media.mediaText.replace(/\( *color: *(?:48842621|70318723) *\)/i, "(max-color: " + colorDepthMatch[1] + ")");
57
- } else if (/^light$/i.test(colorScheme) && (colorDepthMatch[1] === '70318723' || colorDepthMatch[1] === '22511989')) {
58
- // No preference or preferred is light and rule is light.
59
- cssRule.media.mediaText = cssRule.media.mediaText.replace(/\( *color: *(?:48842621|22511989) *\)/i, "(max-color: " + colorDepthMatch[1] + ")");
60
- } else {
61
- cssRule.media.mediaText = cssRule.media.mediaText.replace(/\( *max-color: *(?:48842621|70318723|22511989) *\)/i, "(color: " + colorDepthMatch[1] + ")");
62
- }
63
- }
64
- }
65
- }
66
- });
67
- });
68
- };
69
-
70
- var result = Object.defineProperty({
71
- hasNativeSupport: hasNativeSupport,
72
- removeListener: removeListener
73
- }, 'scheme', {
74
- get: function get() {
75
- return currentColorScheme;
76
- },
77
- set: set
78
- }); // initialize the color scheme using the provided value, the system value, or light
79
-
80
- var currentColorScheme = initialColorScheme || (mediaQueryList && mediaQueryList.matches ? 'dark' : 'light');
81
- set(currentColorScheme); // listen for system changes
82
-
83
- if (mediaQueryList) {
84
- if ('addEventListener' in mediaQueryList) {
85
- mediaQueryList.addEventListener('change', mediaQueryListener);
86
- } else {
87
- mediaQueryList.addListener(mediaQueryListener);
88
- }
89
- }
90
-
91
- return result;
92
- };
93
-
94
- /* global self */
95
- self.prefersColorSchemeInit = prefersColorSchemeInit; // Legacy : there used to be a rollup config that exposed this function under a different name.
96
-
97
- self.initPrefersColorScheme = prefersColorSchemeInit;
98
-
99
- })();
1
+ !function(){var e=/prefers-color-scheme:/i,t=function(t,a){a||(a={}),a={debug:!!a.debug||!1};var i="(prefers-color-scheme: dark)",o="matchMedia"in window&&window.matchMedia(i),r=o&&o.media===i,c=function(){n(o&&o.matches?"dark":"light")},n=function(t){"dark"!==t&&"light"!==t&&(t=r&&o.matches?"dark":"light"),t!==l&&(l=t,"function"==typeof d.onChange&&d.onChange()),[].forEach.call(document.styleSheets||[],(function(i){try{var o=[];[].forEach.call(i.cssRules||[],(function(e){o.push(e)})),o.forEach((function(a){if(e.test(Object(a.media).mediaText)){var i=[].indexOf.call(a.parentStyleSheet.cssRules,a);a.parentStyleSheet.deleteRule(i)}else{var o=(Object(a.media).mediaText||"").match(/\( *(?:color|max-color): *(48842621|70318723) *\)/i);o&&o.length>1&&("dark"===t&&"48842621"===o[1]?a.media.mediaText=a.media.mediaText.replace(/\( *color: *(?:48842621) *\)/i,"(max-color: "+o[1]+")"):"light"===t&&"70318723"===o[1]?a.media.mediaText=a.media.mediaText.replace(/\( *color: *(?:70318723) *\)/i,"(max-color: "+o[1]+")"):a.media.mediaText=a.media.mediaText.replace(/\( *max-color: *(?:48842621|70318723) *\)/i,"(color: "+o[1]+")"))}}))}catch(e){a.debug&&console.error(e)}}))},d=Object.defineProperty({hasNativeSupport:r,removeListener:function(){o&&o.removeListener(c)}},"scheme",{get:function(){return l},set:n}),l=t||(o&&o.matches?"dark":"light");return n(l),o&&("addEventListener"in o?o.addEventListener("change",c):o.addListener(c)),d};("object"==typeof window&&window||"object"==typeof self&&self||{}).prefersColorSchemeInit=t}();
100
2
  //# sourceMappingURL=browser-global.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"browser-global.js","sources":["../src/browser.js","../src/browser-global.js"],"sourcesContent":["/* global document,window,matchMedia */\nconst colorIndexRegExp = /((?:not )?all and )?(\\(color-index: *(22|48|70)\\))/i;\nconst prefersColorSchemeRegExp = /prefers-color-scheme:/i;\n\nconst prefersColorSchemeInit = initialColorScheme => {\n\tconst mediaQueryString = '(prefers-color-scheme: dark)';\n\tconst mediaQueryList = window.matchMedia && matchMedia(mediaQueryString);\n\tconst hasNativeSupport = mediaQueryList && mediaQueryList.media === mediaQueryString;\n\tconst mediaQueryListener = () => {\n\t\tset(mediaQueryList.matches ? 'dark' : 'light');\n\t};\n\tconst removeListener = () => {\n\t\tif (mediaQueryList) {\n\t\t\tmediaQueryList.removeListener(mediaQueryListener);\n\t\t}\n\t};\n\tconst set = colorScheme => {\n\t\tif (colorScheme !== currentColorScheme) {\n\t\t\tcurrentColorScheme = colorScheme;\n\n\t\t\tif (typeof result.onChange === 'function') {\n\t\t\t\tresult.onChange();\n\t\t\t}\n\t\t}\n\n\t\t[].forEach.call(document.styleSheets || [], styleSheet => {\n\n\t\t\t// cssRules is a live list. Converting to an Array first.\n\t\t\tconst rules = [];\n\t\t\t[].forEach.call(styleSheet.cssRules || [], cssRule => {\n\t\t\t\trules.push(cssRule);\n\t\t\t});\n\n\t\t\trules.forEach(cssRule => {\n\t\t\t\tconst colorSchemeMatch = prefersColorSchemeRegExp.test(Object(cssRule.media).mediaText);\n\n\t\t\t\tif (colorSchemeMatch) {\n\t\t\t\t\tconst index = [].indexOf.call(cssRule.parentStyleSheet.cssRules, cssRule);\n\t\t\t\t\tcssRule.parentStyleSheet.deleteRule(index);\n\t\t\t\t} else {\n\t\t\t\t\tconst colorIndexMatch = (Object(cssRule.media).mediaText || '').match(colorIndexRegExp);\n\n\t\t\t\t\tif (colorIndexMatch) {\n\t\t\t\t\t\t// Old style which has poor browser support and can't handle complex media queries.\n\t\t\t\t\t\tcssRule.media.mediaText = (\n\t\t\t\t\t\t\t(/^dark$/i.test(colorScheme)\n\t\t\t\t\t\t\t\t? colorIndexMatch[3] === '48'\n\t\t\t\t\t\t\t\t: /^light$/i.test(colorScheme)\n\t\t\t\t\t\t\t\t\t? colorIndexMatch[3] === '70'\n\t\t\t\t\t\t\t\t\t: colorIndexMatch[3] === '22')\n\t\t\t\t\t\t\t\t? 'not all and '\n\t\t\t\t\t\t\t\t: ''\n\t\t\t\t\t\t) + cssRule.media.mediaText.replace(colorIndexRegExp, '$2');\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// New style which supports complex media queries.\n\t\t\t\t\t\tconst colorDepthMatch = (Object(cssRule.media).mediaText || '').match(/\\( *(?:color|max-color): *(48842621|70318723|22511989) *\\)/i);\n\t\t\t\t\t\tif (colorDepthMatch && colorDepthMatch.length > 1) {\n\t\t\t\t\t\t\tif (/^dark$/i.test(colorScheme) && (colorDepthMatch[1] === '48842621' || colorDepthMatch[1] === '22511989')) {\n\t\t\t\t\t\t\t\t// No preference or preferred is dark and rule is dark.\n\t\t\t\t\t\t\t\tcssRule.media.mediaText = cssRule.media.mediaText.replace(/\\( *color: *(?:48842621|70318723) *\\)/i, `(max-color: ${colorDepthMatch[1]})`);\n\t\t\t\t\t\t\t} else if (/^light$/i.test(colorScheme) && (colorDepthMatch[1] === '70318723' || colorDepthMatch[1] === '22511989')) {\n\t\t\t\t\t\t\t\t// No preference or preferred is light and rule is light.\n\t\t\t\t\t\t\t\tcssRule.media.mediaText = cssRule.media.mediaText.replace(/\\( *color: *(?:48842621|22511989) *\\)/i, `(max-color: ${colorDepthMatch[1]})`);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tcssRule.media.mediaText = cssRule.media.mediaText.replace(/\\( *max-color: *(?:48842621|70318723|22511989) *\\)/i, `(color: ${colorDepthMatch[1]})`);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t};\n\tconst result = Object.defineProperty(\n\t\t{ hasNativeSupport, removeListener },\n\t\t'scheme',\n\t\t{ get: () => currentColorScheme, set },\n\t);\n\n\t// initialize the color scheme using the provided value, the system value, or light\n\tlet currentColorScheme = initialColorScheme || (mediaQueryList && mediaQueryList.matches ? 'dark' : 'light');\n\n\tset(currentColorScheme);\n\n\t// listen for system changes\n\tif (mediaQueryList) {\n\t\tif ('addEventListener' in mediaQueryList) {\n\t\t\tmediaQueryList.addEventListener('change', mediaQueryListener);\n\t\t} else {\n\t\t\tmediaQueryList.addListener(mediaQueryListener);\n\t\t}\n\t}\n\n\treturn result;\n};\n\nexport default prefersColorSchemeInit;\n","/* global self */\nimport { default as prefersColorSchemeInit } from './browser';\nself.prefersColorSchemeInit = prefersColorSchemeInit;\n\n// Legacy : there used to be a rollup config that exposed this function under a different name.\nself.initPrefersColorScheme = prefersColorSchemeInit;\n"],"names":["colorIndexRegExp","prefersColorSchemeRegExp","prefersColorSchemeInit","initialColorScheme","mediaQueryString","mediaQueryList","window","matchMedia","hasNativeSupport","media","mediaQueryListener","set","matches","removeListener","colorScheme","currentColorScheme","result","onChange","forEach","call","document","styleSheets","styleSheet","rules","cssRules","cssRule","push","colorSchemeMatch","test","Object","mediaText","index","indexOf","parentStyleSheet","deleteRule","colorIndexMatch","match","replace","colorDepthMatch","length","defineProperty","get","addEventListener","addListener","self","initPrefersColorScheme"],"mappings":";;CAAA;CACA,IAAMA,gBAAgB,GAAG,qDAAzB;CACA,IAAMC,wBAAwB,GAAG,wBAAjC;;CAEA,IAAMC,sBAAsB,GAAG,SAAzBA,sBAAyB,CAAAC,kBAAkB,EAAI;CACpD,MAAMC,gBAAgB,GAAG,8BAAzB;CACA,MAAMC,cAAc,GAAGC,MAAM,CAACC,UAAP,IAAqBA,UAAU,CAACH,gBAAD,CAAtD;CACA,MAAMI,gBAAgB,GAAGH,cAAc,IAAIA,cAAc,CAACI,KAAf,KAAyBL,gBAApE;;CACA,MAAMM,kBAAkB,GAAG,SAArBA,kBAAqB,GAAM;CAChCC,IAAAA,GAAG,CAACN,cAAc,CAACO,OAAf,GAAyB,MAAzB,GAAkC,OAAnC,CAAH;CACA,GAFD;;CAGA,MAAMC,cAAc,GAAG,SAAjBA,cAAiB,GAAM;CAC5B,QAAIR,cAAJ,EAAoB;CACnBA,MAAAA,cAAc,CAACQ,cAAf,CAA8BH,kBAA9B;CACA;CACD,GAJD;;CAKA,MAAMC,GAAG,GAAG,SAANA,GAAM,CAAAG,WAAW,EAAI;CAC1B,QAAIA,WAAW,KAAKC,kBAApB,EAAwC;CACvCA,MAAAA,kBAAkB,GAAGD,WAArB;;CAEA,UAAI,OAAOE,MAAM,CAACC,QAAd,KAA2B,UAA/B,EAA2C;CAC1CD,QAAAA,MAAM,CAACC,QAAP;CACA;CACD;;CAED,OAAGC,OAAH,CAAWC,IAAX,CAAgBC,QAAQ,CAACC,WAAT,IAAwB,EAAxC,EAA4C,UAAAC,UAAU,EAAI;CAEzD;CACA,UAAMC,KAAK,GAAG,EAAd;CACA,SAAGL,OAAH,CAAWC,IAAX,CAAgBG,UAAU,CAACE,QAAX,IAAuB,EAAvC,EAA2C,UAAAC,OAAO,EAAI;CACrDF,QAAAA,KAAK,CAACG,IAAN,CAAWD,OAAX;CACA,O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,CAA3C;CAEAD,EAAAA,GAAG,CAACI,kBAAD,CAAH,CA7EoD;;CAgFpD,MAAIV,cAAJ,EAAoB;CACnB,QAAI,sBAAsBA,cAA1B,EAA0C;CACzCA,MAAAA,cAAc,CAACqC,gBAAf,CAAgC,QAAhC,EAA0ChC,kBAA1C;CACA,KAFD,MAEO;CACNL,MAAAA,cAAc,CAACsC,WAAf,CAA2BjC,kBAA3B;CACA;CACD;;CAED,SAAOM,MAAP;CACA,CAzFD;;CCJA;CAEA4B,IAAI,CAAC1C,sBAAL,GAA8BA,sBAA9B;;CAGA0C,IAAI,CAACC,sBAAL,GAA8B3C,sBAA9B;;;;;;"}
1
+ {"version":3,"file":"browser-global.js","sources":["../src/browser.js","../src/browser-global.js"],"sourcesContent":["/* global document,window */\nconst prefersColorSchemeRegExp = /prefers-color-scheme:/i;\n\nconst prefersColorSchemeInit = (initialColorScheme, options) => {\n\t// OPTIONS\n\t{\n\t\tif (!options) {\n\t\t\toptions = {};\n\t\t}\n\n\t\toptions = {\n\t\t\tdebug: (!!options.debug) || false,\n\t\t};\n\t}\n\n\tconst mediaQueryString = '(prefers-color-scheme: dark)';\n\tconst mediaQueryList = ('matchMedia' in window) && window.matchMedia(mediaQueryString);\n\tconst hasNativeSupport = mediaQueryList && mediaQueryList.media === mediaQueryString;\n\tconst mediaQueryListener = () => {\n\t\tset((mediaQueryList && mediaQueryList.matches) ? 'dark' : 'light');\n\t};\n\tconst removeListener = () => {\n\t\tif (mediaQueryList) {\n\t\t\tmediaQueryList.removeListener(mediaQueryListener);\n\t\t}\n\t};\n\tconst set = (colorScheme) => {\n\t\tif (colorScheme !== 'dark' && colorScheme !== 'light') {\n\t\t\tif (hasNativeSupport) {\n\t\t\t\tcolorScheme = mediaQueryList.matches ? 'dark' : 'light';\n\t\t\t} else {\n\t\t\t\tcolorScheme = 'light';\n\t\t\t}\n\t\t}\n\n\t\tif (colorScheme !== currentColorScheme) {\n\t\t\tcurrentColorScheme = colorScheme;\n\n\t\t\tif (typeof result.onChange === 'function') {\n\t\t\t\tresult.onChange();\n\t\t\t}\n\t\t}\n\n\t\t[].forEach.call(document.styleSheets || [], styleSheet => {\n\t\t\ttry {\n\t\t\t\t// cssRules is a live list. Converting to an Array first.\n\t\t\t\tconst rules = [];\n\t\t\t\t[].forEach.call(styleSheet.cssRules || [], cssRule => {\n\t\t\t\t\trules.push(cssRule);\n\t\t\t\t});\n\n\t\t\t\trules.forEach(cssRule => {\n\t\t\t\t\tconst colorSchemeMatch = prefersColorSchemeRegExp.test(Object(cssRule.media).mediaText);\n\n\t\t\t\t\tif (colorSchemeMatch) {\n\t\t\t\t\t\tconst index = [].indexOf.call(cssRule.parentStyleSheet.cssRules, cssRule);\n\t\t\t\t\t\tcssRule.parentStyleSheet.deleteRule(index);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// New style which supports complex media queries.\n\t\t\t\t\t\tconst colorDepthMatch = (Object(cssRule.media).mediaText || '').match(/\\( *(?:color|max-color): *(48842621|70318723) *\\)/i);\n\t\t\t\t\t\tif (colorDepthMatch && colorDepthMatch.length > 1) {\n\t\t\t\t\t\t\tif (colorScheme === 'dark' && (colorDepthMatch[1] === '48842621')) {\n\t\t\t\t\t\t\t\t// preferred is dark and rule is dark.\n\t\t\t\t\t\t\t\tcssRule.media.mediaText = cssRule.media.mediaText.replace(/\\( *color: *(?:48842621) *\\)/i, `(max-color: ${colorDepthMatch[1]})`);\n\t\t\t\t\t\t\t} else if (colorScheme === 'light' && (colorDepthMatch[1] === '70318723')) {\n\t\t\t\t\t\t\t\t// preferred is light and rule is light.\n\t\t\t\t\t\t\t\tcssRule.media.mediaText = cssRule.media.mediaText.replace(/\\( *color: *(?:70318723) *\\)/i, `(max-color: ${colorDepthMatch[1]})`);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tcssRule.media.mediaText = cssRule.media.mediaText.replace(/\\( *max-color: *(?:48842621|70318723) *\\)/i, `(color: ${colorDepthMatch[1]})`);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t} catch (e) {\n\t\t\t\tif (options.debug) {\n\t\t\t\t\tconsole.error(e);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t};\n\tconst result = Object.defineProperty(\n\t\t{ hasNativeSupport, removeListener },\n\t\t'scheme',\n\t\t{ get: () => currentColorScheme, set },\n\t);\n\n\t// initialize the color scheme using the provided value, the system value, or light\n\tlet currentColorScheme = initialColorScheme || (mediaQueryList && mediaQueryList.matches ? 'dark' : 'light');\n\n\tset(currentColorScheme);\n\n\t// listen for system changes\n\tif (mediaQueryList) {\n\t\tif ('addEventListener' in mediaQueryList) {\n\t\t\tmediaQueryList.addEventListener('change', mediaQueryListener);\n\t\t} else {\n\t\t\tmediaQueryList.addListener(mediaQueryListener);\n\t\t}\n\t}\n\n\treturn result;\n};\n\nexport default prefersColorSchemeInit;\n","/* global self,window */\nimport { default as prefersColorSchemeInit } from './browser';\n\n(function (global) {\n\tglobal.prefersColorSchemeInit = prefersColorSchemeInit;\n}('object' === typeof window && window || 'object' === typeof self && self || {}));\n"],"names":["prefersColorSchemeRegExp","prefersColorSchemeInit","initialColorScheme","options","debug","mediaQueryString","mediaQueryList","window","matchMedia","hasNativeSupport","media","mediaQueryListener","set","matches","colorScheme","currentColorScheme","result","onChange","forEach","call","document","styleSheets","styleSheet","rules","cssRules","cssRule","push","test","Object","mediaText","index","indexOf","parentStyleSheet","deleteRule","colorDepthMatch","match","length","replace","e","console","error","defineProperty","removeListener","get","addEventListener","addListener","self"],"mappings":"YACA,IAAMA,EAA2B,yBAE3BC,EAAyB,SAACC,EAAoBC,GAG7CA,IACJA,EAAU,CAAA,GAGXA,EAAU,CACTC,QAAUD,EAAQC,QAAU,GAI9B,IAAMC,EAAmB,+BACnBC,EAAkB,eAAgBC,QAAWA,OAAOC,WAAWH,GAC/DI,EAAmBH,GAAkBA,EAAeI,QAAUL,EAC9DM,EAAqB,WAC1BC,EAAKN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