@rspress/plugin-medium-zoom 1.41.0 → 1.41.2
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/dist/index.d.ts +5 -5
- package/dist/index.js +8 -8
- package/package.json +5 -7
- package/src/env.d.ts +1 -0
- package/src/modern-app-env.d.ts +0 -1
package/dist/index.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
import { PluggableList } from 'unified';
|
2
|
-
import { RsbuildConfig } from '@rsbuild/core';
|
3
|
-
import { RsbuildPlugin } from '@rsbuild/core';
|
1
|
+
import type { PluggableList } from 'unified';
|
2
|
+
import type { RsbuildConfig } from '@rsbuild/core';
|
3
|
+
import type { RsbuildPlugin } from '@rsbuild/core';
|
4
4
|
import type { ZoomOptions } from 'medium-zoom';
|
5
5
|
|
6
6
|
/**
|
@@ -14,7 +14,7 @@ declare interface AdditionalPage {
|
|
14
14
|
filepath?: string;
|
15
15
|
}
|
16
16
|
|
17
|
-
declare interface
|
17
|
+
declare interface DefaultThemeConfig {
|
18
18
|
/**
|
19
19
|
* Whether to enable dark mode.
|
20
20
|
* @default true
|
@@ -514,7 +514,7 @@ declare type SSGConfig = boolean | {
|
|
514
514
|
strict?: boolean;
|
515
515
|
};
|
516
516
|
|
517
|
-
declare interface UserConfig<ThemeConfig =
|
517
|
+
declare interface UserConfig<ThemeConfig = DefaultThemeConfig> {
|
518
518
|
/**
|
519
519
|
* The root directory of the site.
|
520
520
|
* @default 'docs'
|
package/dist/index.js
CHANGED
@@ -1,19 +1,19 @@
|
|
1
1
|
import * as __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__ from "node:path";
|
2
2
|
import * as __WEBPACK_EXTERNAL_MODULE_node_url_e96de089__ from "node:url";
|
3
3
|
function slash(str) {
|
4
|
-
return str.replace(/\\/g,
|
4
|
+
return str.replace(/\\/g, '/');
|
5
5
|
}
|
6
6
|
function normalizePosixPath(id) {
|
7
7
|
const path = slash(id);
|
8
|
-
const isAbsolutePath = path.startsWith(
|
9
|
-
const parts = path.split(
|
8
|
+
const isAbsolutePath = path.startsWith('/');
|
9
|
+
const parts = path.split('/');
|
10
10
|
const normalizedParts = [];
|
11
|
-
for (const part of parts)if (
|
12
|
-
else if (
|
13
|
-
if (normalizedParts.length > 0 &&
|
14
|
-
else if (isAbsolutePath) normalizedParts.push(
|
11
|
+
for (const part of parts)if ('.' === part || '' === part) ;
|
12
|
+
else if ('..' === part) {
|
13
|
+
if (normalizedParts.length > 0 && '..' !== normalizedParts[normalizedParts.length - 1]) normalizedParts.pop();
|
14
|
+
else if (isAbsolutePath) normalizedParts.push('..');
|
15
15
|
} else normalizedParts.push(part);
|
16
|
-
let normalizedPath = normalizedParts.join(
|
16
|
+
let normalizedPath = normalizedParts.join('/');
|
17
17
|
if (isAbsolutePath) normalizedPath = `/${normalizedPath}`;
|
18
18
|
return normalizedPath;
|
19
19
|
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@rspress/plugin-medium-zoom",
|
3
|
-
"version": "1.41.
|
3
|
+
"version": "1.41.2",
|
4
4
|
"description": "A plugin for rspress to zoom images in docs.",
|
5
5
|
"bugs": "https://github.com/web-infra-dev/rspress/issues",
|
6
6
|
"repository": {
|
@@ -29,17 +29,16 @@
|
|
29
29
|
"devDependencies": {
|
30
30
|
"@microsoft/api-extractor": "^7.49.2",
|
31
31
|
"@modern-js/tsconfig": "2.64.0",
|
32
|
-
"@rslib/core": "0.4.
|
32
|
+
"@rslib/core": "0.4.1",
|
33
33
|
"@types/node": "^18.11.17",
|
34
34
|
"@types/react": "^18.3.18",
|
35
35
|
"@types/react-dom": "^18.3.5",
|
36
36
|
"react": "^18.3.1",
|
37
37
|
"typescript": "^5.5.3",
|
38
|
-
"
|
39
|
-
"@rspress/shared": "1.41.0"
|
38
|
+
"@rspress/shared": "1.41.2"
|
40
39
|
},
|
41
40
|
"peerDependencies": {
|
42
|
-
"@rspress/runtime": "^1.41.
|
41
|
+
"@rspress/runtime": "^1.41.2"
|
43
42
|
},
|
44
43
|
"engines": {
|
45
44
|
"node": ">=14.17.6"
|
@@ -53,7 +52,6 @@
|
|
53
52
|
"scripts": {
|
54
53
|
"build": "rslib build",
|
55
54
|
"dev": "rslib build -w",
|
56
|
-
"reset": "rimraf ./**/node_modules"
|
57
|
-
"test": "vitest run --passWithNoTests"
|
55
|
+
"reset": "rimraf ./**/node_modules"
|
58
56
|
}
|
59
57
|
}
|
package/src/env.d.ts
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
/// <reference types='@rslib/core/types' />
|
package/src/modern-app-env.d.ts
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
/// <reference types='@modern-js/module-tools/types' />
|