Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions packages/rspress-plugin-align-image/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# rspress-plugin-align-image

## 1.0.0

### Major Changes

- 732b475: feat: Compatible with V2 Rspress

### Patch Changes

- Updated dependencies [732b475]
- [email protected]

## 0.3.0

### Minor Changes
Expand Down
8 changes: 4 additions & 4 deletions packages/rspress-plugin-align-image/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"name": "rspress-plugin-align-image",
"version": "0.3.0",
"version": "1.0.0",
"description": "Rspress plugin for aligning images",
"type": "module",
"keywords": [
"rspress",
"plugin",
Expand Down Expand Up @@ -33,14 +34,13 @@
"docs:dev": "rspress dev"
},
"dependencies": {
"@rspress/shared": "^1.17.1",
"rspress-plugin-devkit": "workspace:^"
},
"devDependencies": {
"@types/node": "^20.12.5",
"typescript": "^5.4.4"
},
"peerDependencies": {
"rspress": "*"
"@rspress/core": "^2.0.0-rc.4 || ^2.0.0"
}
}
}
2 changes: 1 addition & 1 deletion packages/rspress-plugin-align-image/rspress.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as path from 'path';
import { defineConfig } from 'rspress/config';
import { defineConfig } from '@rspress/core';
import mermaid from './src';

export default defineConfig({
Expand Down
6 changes: 2 additions & 4 deletions packages/rspress-plugin-align-image/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
type HASTRoot,
type RehypePluginFactory,
} from 'rspress-plugin-devkit';
import type { RspressPlugin } from '@rspress/shared';
import type { RspressPlugin } from '@rspress/core';

export interface RspressPluginAlignImageOptions {
containerClassNames?: string[];
Expand All @@ -16,9 +16,7 @@ export default function rspressPluginAlignImage(
): RspressPlugin {
return {
name: 'rspress-plugin-align-image',
config(config) {
return new PresetConfigMutator(config).disableMdxRs().toConfig();
},
// config not needed for Rspress V2
markdown: {
rehypePlugins: [[rehypeAlignImage(), options]],
},
Expand Down
11 changes: 11 additions & 0 deletions packages/rspress-plugin-back-to-top/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# rspress-plugin-back-to-top

## 1.0.0

### Major Changes

- 732b475: feat: Compatible with V2 Rspress

### Patch Changes

- Updated dependencies [732b475]
- [email protected]

## 0.3.0

### Minor Changes
Expand Down
8 changes: 4 additions & 4 deletions packages/rspress-plugin-back-to-top/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
{
"name": "rspress-plugin-back-to-top",
"version": "0.3.0",
"version": "1.0.0",
"files": [
"dist"
],
"description": "Rspress plugin that add a back to top button to your site.",
"type": "module",
"keywords": [
"rspress",
"plugin",
Expand Down Expand Up @@ -32,7 +33,6 @@
"docs:dev": "rspress dev"
},
"dependencies": {
"@rspress/shared": "^1.17.1",
"rspress-plugin-devkit": "workspace:^",
"throttle-debounce": "^5.0.0"
},
Expand All @@ -45,6 +45,6 @@
"typescript": "^5.4.4"
},
"peerDependencies": {
"rspress": "*"
"@rspress/core": "^2.0.0-rc.4 || ^2.0.0"
}
}
}
2 changes: 1 addition & 1 deletion packages/rspress-plugin-back-to-top/rspress.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as path from 'path';
import { defineConfig } from 'rspress/config';
import { defineConfig } from '@rspress/core';
import back2Top from './src';

export default defineConfig({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React, { useState, useEffect } from 'react';
import { useDark } from 'rspress/runtime';
// @ts-ignore - requires moduleResolution: bundler
import { useDark } from '@rspress/core/runtime';

import { throttle } from 'throttle-debounce';

Expand Down
2 changes: 1 addition & 1 deletion packages/rspress-plugin-back-to-top/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import path from 'node:path';

import { PresetConfigMutator } from 'rspress-plugin-devkit';

import type { RspressPlugin } from '@rspress/shared';
import type { RspressPlugin } from '@rspress/core';
import type { Back2TopProps } from './components/Back2Top';

export const componentsPath = path.join(__dirname, './components');
Expand Down
6 changes: 6 additions & 0 deletions packages/rspress-plugin-devkit/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# rspress-plugin-devkit

## 1.0.0

### Major Changes

- 732b475: feat: Compatible with V2 Rspress

## 0.3.0

### Minor Changes
Expand Down
36 changes: 18 additions & 18 deletions packages/rspress-plugin-devkit/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{
"name": "rspress-plugin-devkit",
"version": "0.3.0",
"version": "1.0.0",
"files": [
"dist"
],
"type": "module",
"description": "Rspress plugin develop kit.",
"keywords": [
"rspress",
Expand All @@ -30,31 +31,30 @@
"dev": "tsc -w"
},
"dependencies": {
"@rspress/shared": "^1.17.1",
"@types/estree-jsx": "^1.0.5",
"@types/hast": "^2.3.4",
"@types/mdast": "^3.0.15",
"@types/node": "^20.12.5",
"clsx": "^2.1.0",
"lodash-es": "^4.17.21",
"mdast-util-from-markdown": "^1.3.1",
"mdast-util-mdx-jsx": "^3.1.2",
"@types/hast": "^3.0.4",
"@types/mdast": "^4.0.4",
"@types/node": "^25.0.3",
"clsx": "^2.1.1",
"lodash-es": "^4.17.22",
"mdast-util-from-markdown": "^2.0.2",
"mdast-util-mdx-jsx": "^3.2.0",
"mdast-util-mdxjs-esm": "^2.0.1",
"mdast-util-to-markdown": "^1.5.0",
"mdast-util-to-markdown": "^2.1.2",
"mdast-util-to-string": "^4.0.0",
"remark-mdc": "1.2.0",
"ts-morph": "^22.0.0",
"unified": "^10.1.2",
"remark-mdc": "^3.10.0",
"ts-morph": "^27.0.2",
"unified": "^11.0.5",
"unist-util-visit": "^5.0.0",
"unist-util-visit-parents": "^6.0.1",
"unist-util-visit-parents": "^6.0.2",
"util-ts-types": "^1.0.0",
"vfile": "^5.3.7",
"vfile-reporter": "^7.0.5"
"vfile": "^6.0.3",
"vfile-reporter": "^8.1.1"
},
"devDependencies": {
"@types/lodash-es": "^4.17.12"
},
"peerDependencies": {
"rspress": "*"
"@rspress/core": "^2.0.0-rc.4 || ^2.0.0"
}
}
}
8 changes: 1 addition & 7 deletions packages/rspress-plugin-devkit/src/ConfigMutator/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { RspressPlugin } from '@rspress/shared';
import type { RspressPlugin } from '@rspress/core';

type PluginConfigMutatorInput = Parameters<
NonNullable<RspressPlugin['config']>
Expand Down Expand Up @@ -27,10 +27,4 @@ export class PresetConfigMutator {

return this;
}

public disableMdxRs(): PresetConfigMutator {
this.config.markdown ??= {};
this.config.markdown.mdxRs = false;
return this;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ export class RemarkCodeBlockToGlobalComponentPluginFactory extends RemarkPluginF
parent!.children.splice(
index,
1,
// @ts-expect-error
MdxJsxElementFactory.createMdxJsxFlowElementNode(code.value, {
componentName: getComponentName(componentPath),
propsProvider,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { uniqArray } from '../Utils/uniqArray';

import type { RspressPlugin } from '@rspress/shared';
import type { RspressPlugin } from '@rspress/core';
import type { Content } from 'mdast';
import type { Dictionary } from 'util-ts-types';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ export class RemarkInsertComponentPluginFactory extends RemarkPluginFactoryBase
switch (position) {
case 'pre':
return (
// @ts-expect-error
tree.children.findLastIndex((node) => node.type === 'mdxjsEsm') +
1
);
Expand Down Expand Up @@ -66,7 +65,6 @@ export class RemarkInsertComponentPluginFactory extends RemarkPluginFactoryBase
tree.children.splice(
insertIndex,
0,
// @ts-expect-error
MdxJsxElementFactory.createMdxJsxFlowElementNode<any>(
{},
{
Expand Down
11 changes: 11 additions & 0 deletions packages/rspress-plugin-directives/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# rspress-plugin-directives

## 1.0.0

### Major Changes

- 732b475: feat: Compatible with V2 Rspress

### Patch Changes

- Updated dependencies [732b475]
- [email protected]

## 0.3.0

### Minor Changes
Expand Down
8 changes: 4 additions & 4 deletions packages/rspress-plugin-directives/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"name": "rspress-plugin-directives",
"version": "0.3.0",
"version": "1.0.0",
"description": "Rspress plugin for custom directives transformation.",
"type": "module",
"files": [
"dist"
],
Expand Down Expand Up @@ -32,14 +33,13 @@
"docs:dev": "rspress dev"
},
"dependencies": {
"@rspress/shared": "^1.17.1",
"rspress-plugin-devkit": "workspace:^"
},
"devDependencies": {
"@types/node": "^20.12.5",
"typescript": "^5.4.4"
},
"peerDependencies": {
"rspress": "*"
"@rspress/core": "^2.0.0-rc.4 || ^2.0.0"
}
}
}
2 changes: 1 addition & 1 deletion packages/rspress-plugin-directives/rspress.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as path from 'path';
import { defineConfig } from 'rspress/config';
import { defineConfig } from '@rspress/core';
import directives from './src';

export default defineConfig({
Expand Down
6 changes: 2 additions & 4 deletions packages/rspress-plugin-directives/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
type RemarkDirectiveTransformer,
} from 'rspress-plugin-devkit';

import type { RspressPlugin } from '@rspress/shared';
import type { RspressPlugin } from '@rspress/core';

type RspressPluginDirectivesOptions = MaybeArray<
RemarkDirectiveTransformer<
Expand All @@ -33,9 +33,7 @@ export default function rspressPluginDirectives(

return {
name: 'rspress-plugin-directives',
config(config) {
return new PresetConfigMutator(config).disableMdxRs().toConfig();
},
// config not needed for Rspress V2
markdown: {
remarkPlugins: [
remarkParseDirective,
Expand Down
11 changes: 11 additions & 0 deletions packages/rspress-plugin-file-tree/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# rspress-plugin-file-tree

## 1.0.0

### Major Changes

- 732b475: feat: Compatible with V2 Rspress

### Patch Changes

- Updated dependencies [732b475]
- [email protected]

## 0.4.0

### Minor Changes
Expand Down
Loading