From e06ec920f7a5d784e674c4c4b4e6d1da3dc7391d Mon Sep 17 00:00:00 2001 From: Piotr Russ Date: Mon, 16 Nov 2020 00:10:28 +0100 Subject: api, login, auth --- node_modules/style-loader/CHANGELOG.md | 220 ++++++++++ node_modules/style-loader/LICENSE | 20 + node_modules/style-loader/README.md | 464 +++++++++++++++++++++ node_modules/style-loader/index.js | 96 +++++ node_modules/style-loader/lib/addStyleUrl.js | 44 ++ node_modules/style-loader/lib/addStyles.js | 398 ++++++++++++++++++ node_modules/style-loader/lib/urls.js | 89 ++++ .../node_modules/schema-utils/CHANGELOG.md | 124 ++++++ .../style-loader/node_modules/schema-utils/LICENSE | 20 + .../node_modules/schema-utils/README.md | 130 ++++++ .../node_modules/schema-utils/package.json | 73 ++++ .../schema-utils/src/ValidationError.js | 25 ++ .../node_modules/schema-utils/src/index.js | 9 + .../schema-utils/src/validateOptions.js | 37 ++ node_modules/style-loader/options.json | 37 ++ node_modules/style-loader/package.json | 80 ++++ node_modules/style-loader/url.js | 39 ++ node_modules/style-loader/useable.js | 72 ++++ 18 files changed, 1977 insertions(+) create mode 100644 node_modules/style-loader/CHANGELOG.md create mode 100644 node_modules/style-loader/LICENSE create mode 100644 node_modules/style-loader/README.md create mode 100644 node_modules/style-loader/index.js create mode 100644 node_modules/style-loader/lib/addStyleUrl.js create mode 100644 node_modules/style-loader/lib/addStyles.js create mode 100644 node_modules/style-loader/lib/urls.js create mode 100644 node_modules/style-loader/node_modules/schema-utils/CHANGELOG.md create mode 100644 node_modules/style-loader/node_modules/schema-utils/LICENSE create mode 100644 node_modules/style-loader/node_modules/schema-utils/README.md create mode 100644 node_modules/style-loader/node_modules/schema-utils/package.json create mode 100644 node_modules/style-loader/node_modules/schema-utils/src/ValidationError.js create mode 100644 node_modules/style-loader/node_modules/schema-utils/src/index.js create mode 100644 node_modules/style-loader/node_modules/schema-utils/src/validateOptions.js create mode 100644 node_modules/style-loader/options.json create mode 100644 node_modules/style-loader/package.json create mode 100644 node_modules/style-loader/url.js create mode 100644 node_modules/style-loader/useable.js (limited to 'node_modules/style-loader') diff --git a/node_modules/style-loader/CHANGELOG.md b/node_modules/style-loader/CHANGELOG.md new file mode 100644 index 0000000..0a702f0 --- /dev/null +++ b/node_modules/style-loader/CHANGELOG.md @@ -0,0 +1,220 @@ +# Change Log + +All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + + +## [0.22.1](https://github.com/webpack-contrib/style-loader/compare/v0.22.0...v0.22.1) (2018-08-08) + + +### Bug Fixes + +* **addStyles:** use `var` instead of `const` (IE fix) ([#338](https://github.com/webpack-contrib/style-loader/issues/338)) ([1ca12ab](https://github.com/webpack-contrib/style-loader/commit/1ca12ab)) + + + + +# [0.22.0](https://github.com/webpack-contrib/style-loader/compare/v0.21.0...v0.22.0) (2018-08-07) + + +### Bug Fixes + +* insertInto and insertAt collaboration ([#325](https://github.com/webpack-contrib/style-loader/issues/325)) ([c7d8fec](https://github.com/webpack-contrib/style-loader/commit/c7d8fec)) + + +### Features + +* add support for __webpack_nonce__ ([#319](https://github.com/webpack-contrib/style-loader/issues/319)) ([fc24512](https://github.com/webpack-contrib/style-loader/commit/fc24512)) + + + + +# [0.21.0](https://github.com/webpack-contrib/style-loader/compare/v0.20.3...v0.21.0) (2018-04-18) + + +### Features + +* enable tag type configuration ([#316](https://github.com/webpack-contrib/style-loader/issues/316)) ([892cba5](https://github.com/webpack-contrib/style-loader/commit/892cba5)) + + + + +## [0.20.3](https://github.com/webpack-contrib/style-loader/compare/v0.20.2...v0.20.3) (2018-03-09) + + +### Bug Fixes + +* **package:** update `schema-utils` v0.4.3...0.4.5 (`dependencies`) ([#308](https://github.com/webpack-contrib/style-loader/issues/308)) ([9455888](https://github.com/webpack-contrib/style-loader/commit/9455888)) + + + + +## [0.20.2](https://github.com/webpack-contrib/style-loader/compare/v0.20.1...v0.20.2) (2018-02-15) + + +### Bug Fixes + +* **urls:** skip empty `url()` handling ([#304](https://github.com/webpack-contrib/style-loader/issues/304)) ([64f12dc](https://github.com/webpack-contrib/style-loader/commit/64f12dc)) + + + + +## [0.20.1](https://github.com/webpack-contrib/style-loader/compare/v0.20.0...v0.20.1) (2018-01-26) + + +### Bug Fixes + +* **index:** source code indentation ([#299](https://github.com/webpack-contrib/style-loader/issues/299)) ([b4642e7](https://github.com/webpack-contrib/style-loader/commit/b4642e7)) + + + + +# [0.20.0](https://github.com/webpack-contrib/style-loader/compare/v0.19.1...v0.20.0) (2018-01-26) + + +### Bug Fixes + +* **addStyles:** check if `HTMLIFrameElement` exist ([#296](https://github.com/webpack-contrib/style-loader/issues/296)) ([9b46128](https://github.com/webpack-contrib/style-loader/commit/9b46128)) +* **index:** enable HMR in case `locals` (`css-modules`) are unchanged ([#298](https://github.com/webpack-contrib/style-loader/issues/298)) ([3a4cb53](https://github.com/webpack-contrib/style-loader/commit/3a4cb53)) +* **options:** add `transform` option validation (`{String}`) ([23c3567](https://github.com/webpack-contrib/style-loader/commit/23c3567)) +* **options:** support passing a `{Function}` (`options.insertInto`) ([e0c4b19](https://github.com/webpack-contrib/style-loader/commit/e0c4b19)) + + +### Features + +* support passing a `{Function}` (`options.insertInto`) ([#279](https://github.com/webpack-contrib/style-loader/issues/279)) ([0eb8fe7](https://github.com/webpack-contrib/style-loader/commit/0eb8fe7)) + + + + +## [0.19.1](https://github.com/webpack/style-loader/compare/v0.19.0...v0.19.1) (2017-12-14) + + +### Bug Fixes + +* **addStyles:** correctly check `singleton` behavior when `{Boolean}` (`options.singleton`) ([#285](https://github.com/webpack/style-loader/issues/285)) ([2bfc93e](https://github.com/webpack/style-loader/commit/2bfc93e)) + + + + +# [0.19.0](https://github.com/webpack/style-loader/compare/v0.18.2...v0.19.0) (2017-10-03) + + +### Features + +* add option to enable/disable HMR (`options.hmr`) ([#264](https://github.com/webpack/style-loader/issues/264)) ([378e906](https://github.com/webpack/style-loader/commit/378e906)) +* add support for iframes (`options.insertInto`) ([#248](https://github.com/webpack/style-loader/issues/248)) ([25e8e89](https://github.com/webpack/style-loader/commit/25e8e89)) +* support 'before' insertions (`options.insertAt`) ([#253](https://github.com/webpack/style-loader/issues/253)) ([67120f8](https://github.com/webpack/style-loader/commit/67120f8)) + + + + +## [0.18.2](https://github.com/webpack/style-loader/compare/v0.18.1...v0.18.2) (2017-06-05) + + +### Bug Fixes + +* **url:** use `loaderUtils.stringifyRequest` to avoid invalidating hashes due to absolute paths ([#242](https://github.com/webpack/style-loader/issues/242)) ([97508ec](https://github.com/webpack/style-loader/commit/97508ec)) +* Add `null` check to `removeStyleElement` ([#245](https://github.com/webpack/style-loader/issues/245)) ([0a4845c](https://github.com/webpack/style-loader/commit/0a4845c)) + + + + +## [0.18.1](https://github.com/webpack/style-loader/compare/v0.18.0...v0.18.1) (2017-05-23) + + +### Bug Fixes + +* **addStyles:** revert merged loops ([#236](https://github.com/webpack/style-loader/issues/236)) ([fbd04b1](https://github.com/webpack/style-loader/commit/fbd04b1)) + + + + +# [0.18.0](https://github.com/webpack/style-loader/compare/v0.17.0...v0.18.0) (2017-05-22) + + +### Bug Fixes + +* stringify the options.transform request ([#230](https://github.com/webpack/style-loader/issues/230)) ([5888095](https://github.com/webpack/style-loader/commit/5888095)) + + +### Features + +* add options validation ([#224](https://github.com/webpack/style-loader/issues/224)) ([4b6b70d](https://github.com/webpack/style-loader/commit/4b6b70d)) + + + + +# [0.17.0](https://github.com/webpack/style-loader/compare/v0.16.1...v0.17.0) (2017-05-01) + + +### Features + +* add option.base ([#164](https://github.com/webpack/style-loader/issues/164)) ([e4ac886](https://github.com/webpack/style-loader/commit/e4ac886)) +* add option.transform ([#146](https://github.com/webpack/style-loader/issues/146)) ([1c3943f](https://github.com/webpack/style-loader/commit/1c3943f)) + + + + +## [0.16.1](https://github.com/webpack/style-loader/compare/v0.16.0...v0.16.1) (2017-03-28) + + +### Bug Fixes + +* negative refs ([#122](https://github.com/webpack/style-loader/issues/122)) ([f6f577a](https://github.com/webpack/style-loader/commit/f6f577a)) + + + + +# [0.16.0](https://github.com/webpack/style-loader/compare/v0.15.0...v0.16.0) (2017-03-22) + + +### Bug Fixes + +* **addStyles:** update for test for old IE versions ([#196](https://github.com/webpack/style-loader/issues/196)) ([1f68495](https://github.com/webpack/style-loader/commit/1f68495)) + + +### Features + +* Set custom attributes for tag in url mode ([#198](https://github.com/webpack/style-loader/issues/198)) ([2c4f427](https://github.com/webpack/style-loader/commit/2c4f427)) + + + + +# [0.15.0](https://github.com/webpack/style-loader/compare/v0.14.1...v0.15.0) (2017-03-21) + + +### Bug Fixes + +* match parens recursively on URLs to not fix embeded calls ([#192](https://github.com/webpack/style-loader/issues/192)) ([71e0908](https://github.com/webpack/style-loader/commit/71e0908)) + + +### Features + +* add insertInto option ([#135](https://github.com/webpack/style-loader/issues/135)) ([6636868](https://github.com/webpack/style-loader/commit/6636868)) + + + + +## [0.14.1](https://github.com/webpack/style-loader/compare/v0.14.0...v0.14.1) (2017-03-15) + + +### Bug Fixes + +* syntax error in IE10 and below because of `const` keyword ([#190](https://github.com/webpack/style-loader/issues/190)) ([01080cf](https://github.com/webpack/style-loader/commit/01080cf)) + + + + +# [0.14.0](https://github.com/webpack/style-loader/compare/v0.13.1...v0.14.0) (2017-03-15) + + +### Bug Fixes + +* Adds type attr. to the generated link element ([2a2f261](https://github.com/webpack/style-loader/commit/2a2f261)) +* **fixUrls:** add param to fix relative urls ([#186](https://github.com/webpack/style-loader/issues/186)) ([19959ee](https://github.com/webpack/style-loader/commit/19959ee)) +* **usable:** Export locals if available([#128](https://github.com/webpack/style-loader/issues/128)) ([e280cb6](https://github.com/webpack/style-loader/commit/e280cb6)) + + +### Features + +* **tag-attribute:** Add support for custom tag attribute ([995f3de](https://github.com/webpack/style-loader/commit/995f3de)) diff --git a/node_modules/style-loader/LICENSE b/node_modules/style-loader/LICENSE new file mode 100644 index 0000000..8c11fc7 --- /dev/null +++ b/node_modules/style-loader/LICENSE @@ -0,0 +1,20 @@ +Copyright JS Foundation and other contributors + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/style-loader/README.md b/node_modules/style-loader/README.md new file mode 100644 index 0000000..b472517 --- /dev/null +++ b/node_modules/style-loader/README.md @@ -0,0 +1,464 @@ +[![npm][npm]][npm-url] +[![node][node]][node-url] +[![deps][deps]][deps-url] +[![chat][chat]][chat-url] + +
+ + + +

Style Loader

+

Adds CSS to the DOM by injecting a <style> tag

+
+ +

Install

+ +```bash +npm install style-loader --save-dev +``` + +

Usage

+ +It's recommended to combine `style-loader` with the [`css-loader`](https://github.com/webpack/css-loader) + +**component.js** +```js +import style from './file.css' +``` + +**webpack.config.js** +```js +{ + module: { + rules: [ + { + test: /\.css$/, + use: [ + { loader: "style-loader" }, + { loader: "css-loader" } + ] + } + ] + } +} +``` + +#### `Locals (CSS Modules)` + +When using [local scoped CSS](https://github.com/webpack/css-loader#css-scope) the module exports the generated identifiers (locals). + +**component.js** +```js +import style from './file.css' + +style.className === "z849f98ca812" +``` + +### `Url` + +It's also possible to add a URL `` instead of inlining the CSS `{String}` with `` tag. + +```js +import url from 'file.css' +``` + +**webpack.config.js** +```js +{ + module: { + rules: [ + { + test: /\.css$/, + use: [ + { loader: "style-loader/url" }, + { loader: "file-loader" } + ] + } + ] + } +} +``` + +```html + +``` + +> :information_source: Source maps and assets referenced with `url`: when style loader is used with `{ options: { sourceMap: true } }` option, the CSS modules will be generated as `Blob`s, so relative paths don't work (they would be relative to `chrome:blob` or `chrome:devtools`). In order for assets to maintain correct paths setting `output.publicPath` property of webpack configuration must be set, so that absolute paths are generated. Alternatively you can enable the `convertToAbsoluteUrls` option mentioned above. + +### `Useable` + +The `style-loader` injects the styles lazily making them useable on-demand via `style.use()` / `style.unuse()` + +By convention the `Reference Counter API` should be bound to `.useable.css` and the `.css` should be loaded with basic `style-loader` usage.(similar to other file types, i.e. `.useable.less` and `.less`). + +**webpack.config.js** +```js +{ + module: { + rules: [ + { + test: /\.css$/, + use: [ + { loader: "style-loader" }, + { loader: "css-loader" }, + ], + }, + { + test: /\.useable\.css$/, + use: [ + { + loader: "style-loader/useable" + }, + { loader: "css-loader" }, + ], + }, + ], + }, +} +``` + +#### `Reference Counter API` + +**component.js** +```js +import style from './file.css' + +style.use(); // = style.ref(); +style.unuse(); // = style.unref(); +``` + +Styles are not added on `import/require()`, but instead on call to `use`/`ref`. Styles are removed from page if `unuse`/`unref` is called exactly as often as `use`/`ref`. + +:warning: Behavior is undefined when `unuse`/`unref` is called more often than `use`/`ref`. Don't do that. + +

Options

+ +|Name|Type|Default|Description| +|:--:|:--:|:-----:|:----------| +|**`hmr`**|`{Boolean}`|`true`|Enable/disable Hot Module Replacement (HMR), if disabled no HMR Code will be added (good for non local development/production)| +|**`base`** |`{Number}`|`true`|Set module ID base (DLLPlugin)| +|**`attrs`**|`{Object}`|`{}`|Add custom attrs to ``| +|**`transform`** |`{Function}`|`false`|Transform/Conditionally load CSS by passing a transform/condition function| +|**`insertAt`**|`{String\|Object}`|`bottom`|Inserts `` at the given position| +|**`insertInto`**|`{String\|Function}`|``|Inserts `` into the given position| +|**`singleton`**|`{Boolean}`|`undefined`|Reuses a single `` element, instead of adding/removing individual elements for each required module.| +|**`sourceMap`**|`{Boolean}`|`false`|Enable/Disable Sourcemaps| +|**`convertToAbsoluteUrls`**|`{Boolean}`|`false`|Converts relative URLs to absolute urls, when source maps are enabled| + +### `hmr` + +Enable/disable Hot Module Replacement (HMR), if disabled no HMR Code will be added. +This could be used for non local development and production. + +**webpack.config.js** +```js +{ + loader: 'style-loader', + options: { + hmr: false + } +} +``` + +### `base` + +This setting is primarily used as a workaround for [css clashes](https://github.com/webpack-contrib/style-loader/issues/163) when using one or more [DllPlugin](https://robertknight.github.io/posts/webpack-dll-plugins/)'s. `base` allows you to prevent either the *app*'s css (or *DllPlugin2*'s css) from overwriting *DllPlugin1*'s css by specifying a css module id base which is greater than the range used by *DllPlugin1* e.g.: + +**webpack.dll1.config.js** +```js +{ + test: /\.css$/, + use: [ + 'style-loader', + 'css-loader' + ] +} +``` + +**webpack.dll2.config.js** +```js +{ + test: /\.css$/, + use: [ + { loader: 'style-loader', options: { base: 1000 } }, + 'css-loader' + ] +} +``` + +**webpack.app.config.js** +``` +{ + test: /\.css$/, + use: [ + { loader: 'style-loader', options: { base: 2000 } }, + 'css-loader' + ] +} +``` + +### `attrs` + +If defined, style-loader will attach given attributes with their values on ` +``` + +#### `Url` + +**component.js** +```js +import link from './file.css' +``` + +**webpack.config.js** +```js +{ + test: /\.css$/, + use: [ + { loader: 'style-loader/url', options: { attrs: { id: 'id' } } } + { loader: 'file-loader' } + ] +} +``` + +### `transform` + +A `transform` is a function that can modify the css just before it is loaded into the page by the style-loader. +This function will be called on the css that is about to be loaded and the return value of the function will be loaded into the page instead of the original css. +If the return value of the `transform` function is falsy, the css will not be loaded into the page at all. + +**webpack.config.js** +```js +{ + loader: 'style-loader', + options: { + transform: 'path/to/transform.js' + } +} +``` + +**transform.js** +```js +module.exports = function (css) { + // Here we can change the original css + const transformed = css.replace('.classNameA', '.classNameB') + + return transformed +} +``` + +#### `Conditional` + +**webpack.config.js** +```js +{ + loader: 'style-loader', + options: { + transform: 'path/to/conditional.js' + } +} +``` + +**conditional.js** +```js +module.exports = function (css) { + // If the condition is matched load [and transform] the CSS + if (css.includes('something I want to check')) { + return css; + } + // If a falsy value is returned, the CSS won't be loaded + return false +} +``` + +### `insertAt` + +By default, the style-loader appends `` element, instead of adding/removing individual elements for each required module. + +> ℹ️ This option is on by default in IE9, which has strict limitations on the number of style tags allowed on a page. You can enable or disable it with the singleton option. + +**webpack.config.js** +```js +{ + loader: 'style-loader', + options: { + singleton: true + } +} +``` + +### `sourceMap` + +Enable/Disable source map loading + +**webpack.config.js** +```js +{ + loader: 'style-loader', + options: { + sourceMap: true + } +} +``` + +### `convertToAbsoluteUrls` + +If convertToAbsoluteUrls and sourceMaps are both enabled, relative urls will be converted to absolute urls right before the css is injected into the page. This resolves [an issue](https://github.com/webpack/style-loader/pull/96) where relative resources fail to load when source maps are enabled. You can enable it with the convertToAbsoluteUrls option. + +**webpack.config.js** +```js +{ + loader: 'style-loader', + options: { + sourceMap: true, + convertToAbsoluteUrls: true + } +} +``` + +

Maintainers

+ + + + + + + + + + + + + + + +
+ + +
+ Juho Vepsäläinen +
+
+ + +
+ Joshua Wiens +
+
+ + +
+ Artem Sapegin +
+
+ + +
+ Michael Ciniawsky +
+
+ + +
+ Alexander Krasnoyarov +
+
+ + +
+ Tobias Koppers +
+
+ + +
+ Kees Kluskens +
+
+ + +[npm]: https://img.shields.io/npm/v/style-loader.svg +[npm-url]: https://npmjs.com/package/style-loader + +[node]: https://img.shields.io/node/v/style-loader.svg +[node-url]: https://nodejs.org + +[deps]: https://david-dm.org/webpack/style-loader.svg +[deps-url]: https://david-dm.org/webpack/file-loader + +[chat]: https://badges.gitter.im/webpack/webpack.svg +[chat-url]: https://gitter.im/webpack/webpack diff --git a/node_modules/style-loader/index.js b/node_modules/style-loader/index.js new file mode 100644 index 0000000..7474e59 --- /dev/null +++ b/node_modules/style-loader/index.js @@ -0,0 +1,96 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ +var path = require("path"); + +var loaderUtils = require("loader-utils"); +var validateOptions = require('schema-utils'); + +module.exports = function () {}; + +module.exports.pitch = function (request) { + if (this.cacheable) this.cacheable(); + + var options = loaderUtils.getOptions(this) || {}; + + validateOptions(require('./options.json'), options, 'Style Loader') + + options.hmr = typeof options.hmr === 'undefined' ? true : options.hmr; + + // The variable is needed, because the function should be inlined. + // If is just stored it in options, JSON.stringify will quote + // the function and it would be just a string at runtime + var insertInto; + + if (typeof options.insertInto === "function") { + insertInto = options.insertInto.toString(); + } + + // We need to check if it a string, or variable will be "undefined" + // and the loader crashes + if (typeof options.insertInto === "string") { + insertInto = '"' + options.insertInto + '"'; + } + + var hmr = [ + // Hot Module Replacement, + "if(module.hot) {", + // When the styles change, update the