@docusaurus/plugin-svgr 3.6.1 → 3.6.3-canary-6164
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/LICENSE +21 -0
- package/lib/index.d.ts +1 -2
- package/lib/index.js +1 -1
- package/lib/options.d.ts +2 -1
- package/lib/svgrLoader.d.ts +1 -1
- package/package.json +7 -6
- package/src/index.ts +1 -3
- package/src/options.ts +7 -1
- package/src/svgrLoader.ts +1 -1
- package/src/types.d.ts +0 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) Facebook, Inc. and its affiliates.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/lib/index.d.ts
CHANGED
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import type { LoadContext, Plugin } from '@docusaurus/types';
|
|
8
8
|
import type { PluginOptions, Options } from './options';
|
|
9
|
-
export
|
|
10
|
-
export default function pluginSVGR(context: LoadContext, options: PluginOptions): Plugin;
|
|
9
|
+
export default function pluginSVGR(_context: LoadContext, options: PluginOptions): Plugin;
|
|
11
10
|
export { validateOptions } from './options';
|
|
12
11
|
export type { PluginOptions, Options };
|
package/lib/index.js
CHANGED
|
@@ -9,7 +9,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
9
9
|
exports.validateOptions = void 0;
|
|
10
10
|
exports.default = pluginSVGR;
|
|
11
11
|
const svgrLoader_1 = require("./svgrLoader");
|
|
12
|
-
function pluginSVGR(
|
|
12
|
+
function pluginSVGR(_context, options) {
|
|
13
13
|
return {
|
|
14
14
|
name: 'docusaurus-plugin-svgr',
|
|
15
15
|
configureWebpack: (config, isServer) => {
|
package/lib/options.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { OptionValidationContext } from '@docusaurus/types';
|
|
2
|
-
|
|
2
|
+
export type SVGRConfig = any;
|
|
3
|
+
export type SVGOConfig = NonNullable<SVGRConfig['svgoConfig']>;
|
|
3
4
|
export type PluginOptions = {
|
|
4
5
|
svgrConfig: SVGRConfig;
|
|
5
6
|
};
|
package/lib/svgrLoader.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
|
-
import type { SVGRConfig } from './
|
|
7
|
+
import type { SVGRConfig } from './options';
|
|
8
8
|
import type { RuleSetRule } from 'webpack';
|
|
9
9
|
type Params = {
|
|
10
10
|
isServer: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docusaurus/plugin-svgr",
|
|
3
|
-
"version": "3.6.
|
|
3
|
+
"version": "3.6.3-canary-6164",
|
|
4
4
|
"description": "SVGR plugin for Docusaurus.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -18,10 +18,10 @@
|
|
|
18
18
|
},
|
|
19
19
|
"license": "MIT",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@docusaurus/core": "3.6.
|
|
22
|
-
"@docusaurus/types": "3.6.
|
|
23
|
-
"@docusaurus/utils": "3.6.
|
|
24
|
-
"@docusaurus/utils-validation": "3.6.
|
|
21
|
+
"@docusaurus/core": "3.6.3-canary-6164",
|
|
22
|
+
"@docusaurus/types": "3.6.3-canary-6164",
|
|
23
|
+
"@docusaurus/utils": "3.6.3-canary-6164",
|
|
24
|
+
"@docusaurus/utils-validation": "3.6.3-canary-6164",
|
|
25
25
|
"@svgr/core": "8.1.0",
|
|
26
26
|
"@svgr/webpack": "^8.1.0",
|
|
27
27
|
"tslib": "^2.6.0",
|
|
@@ -33,5 +33,6 @@
|
|
|
33
33
|
},
|
|
34
34
|
"engines": {
|
|
35
35
|
"node": ">=18.0"
|
|
36
|
-
}
|
|
36
|
+
},
|
|
37
|
+
"gitHead": "49e0b1965ff23b2ed4a3cf15c64269177baea7bc"
|
|
37
38
|
}
|
package/src/index.ts
CHANGED
|
@@ -9,10 +9,8 @@ import {createLoader} from './svgrLoader';
|
|
|
9
9
|
import type {LoadContext, Plugin} from '@docusaurus/types';
|
|
10
10
|
import type {PluginOptions, Options} from './options';
|
|
11
11
|
|
|
12
|
-
export type {SVGRConfig, SVGOConfig} from './types';
|
|
13
|
-
|
|
14
12
|
export default function pluginSVGR(
|
|
15
|
-
|
|
13
|
+
_context: LoadContext,
|
|
16
14
|
options: PluginOptions,
|
|
17
15
|
): Plugin {
|
|
18
16
|
return {
|
package/src/options.ts
CHANGED
|
@@ -6,7 +6,13 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import {Joi} from '@docusaurus/utils-validation';
|
|
8
8
|
import type {OptionValidationContext} from '@docusaurus/types';
|
|
9
|
-
|
|
9
|
+
|
|
10
|
+
// TODO unfortunately there's a SVGR TS error when skipLibCheck=false
|
|
11
|
+
// related to prettier, see https://github.com/gregberge/svgr/issues/904
|
|
12
|
+
// import type {Config as SVGRConfig} from '@svgr/core';
|
|
13
|
+
// export type {SVGRConfig};
|
|
14
|
+
export type SVGRConfig = any;
|
|
15
|
+
export type SVGOConfig = NonNullable<SVGRConfig['svgoConfig']>;
|
|
10
16
|
|
|
11
17
|
export type PluginOptions = {
|
|
12
18
|
svgrConfig: SVGRConfig;
|
package/src/svgrLoader.ts
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
import {getFileLoaderUtils} from '@docusaurus/utils';
|
|
9
9
|
|
|
10
|
-
import type {SVGRConfig, SVGOConfig} from './
|
|
10
|
+
import type {SVGRConfig, SVGOConfig} from './options';
|
|
11
11
|
import type {RuleSetRule} from 'webpack';
|
|
12
12
|
|
|
13
13
|
// TODO Docusaurus v4: change these defaults?
|