rspress-plugin-live2d 0.1.0 → 0.1.1-beta.0

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 ADDED
@@ -0,0 +1,9 @@
1
+ # rspress-plugin-live2d
2
+
3
+ ## 0.1.1-beta.0
4
+
5
+ ### Patch Changes
6
+
7
+ - 546dcf0: release beta
8
+ - Updated dependencies [546dcf0]
9
+ - rspress-plugin-devkit@0.1.1-beta.0
package/README.md CHANGED
@@ -38,4 +38,4 @@ export default defineConfig({
38
38
 
39
39
  ## Configure
40
40
 
41
- Find more models on [Model Resources](https://oml2d.com/guide/models.html).
41
+ Find more models and configuration on [On My Live2D](https://oml2d.com/guide/models.html).
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { type Options as OnMyLive2DOptions } from 'oh-my-live2d';
3
+ export interface Live2DWidgetProps extends OnMyLive2DOptions {
4
+ }
5
+ declare const Live2DWidget: React.FC<Live2DWidgetProps>;
6
+ export default Live2DWidget;
@@ -0,0 +1,9 @@
1
+ import { useEffect } from 'react';
2
+ import { loadOml2d } from 'oh-my-live2d';
3
+ const Live2DWidget = (options) => {
4
+ useEffect(() => {
5
+ loadOml2d(options);
6
+ }, []);
7
+ return null;
8
+ };
9
+ export default Live2DWidget;
@@ -0,0 +1,5 @@
1
+ import type { RspressPlugin } from '@rspress/shared';
2
+ import type { Live2DWidgetProps } from './components/Live2DWidget';
3
+ export interface RspressPluginLive2dOptions extends Live2DWidgetProps {
4
+ }
5
+ export default function rspressPluginLive2d(props?: RspressPluginLive2dOptions): RspressPlugin;
package/dist/index.js ADDED
@@ -0,0 +1,12 @@
1
+ import path from 'node:path';
2
+ export default function rspressPluginLive2d(props = {}) {
3
+ return {
4
+ name: 'rspress-plugin-live2d',
5
+ globalUIComponents: [
6
+ [
7
+ path.join(__dirname, 'components', 'Live2DWidget.tsx'),
8
+ (props !== null && props !== void 0 ? props : {}),
9
+ ],
10
+ ],
11
+ };
12
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rspress-plugin-live2d",
3
- "version": "0.1.0",
3
+ "version": "0.1.1-beta.0",
4
4
  "description": "Rspress plugin for file tree component.",
5
5
  "keywords": [
6
6
  "rspress",
@@ -19,15 +19,18 @@
19
19
  "author": "Linbudu <linbudu599@gmail.com> (https://github.com/linbudu599)",
20
20
  "main": "dist/index.js",
21
21
  "types": "dist/index.d.ts",
22
+ "publishConfig": {
23
+ "access": "public"
24
+ },
22
25
  "dependencies": {
23
- "@rspress/shared": "^1.16.2",
26
+ "@rspress/shared": "^1.17.1",
24
27
  "oh-my-live2d": "^0.15.2",
25
- "rspress-plugin-devkit": "^0.1.0"
28
+ "rspress-plugin-devkit": "^0.1.1-beta.0"
26
29
  },
27
30
  "devDependencies": {
28
- "@types/node": "^20.12.2",
29
- "@types/react": "^18.2.73",
30
- "typescript": "^5"
31
+ "@types/node": "^20.12.5",
32
+ "@types/react": "^18.2.74",
33
+ "typescript": "^5.4.4"
31
34
  },
32
35
  "peerDependencies": {
33
36
  "rspress": "*"
@@ -37,6 +40,6 @@
37
40
  "dev": "tsc -w",
38
41
  "docs:build": "rspress build",
39
42
  "docs:dev": "rspress dev",
40
- "prepublish": "npm run build"
43
+ "prepublish": "rm -rf dist && npm run build"
41
44
  }
42
45
  }