@mujian/js-sdk 0.0.6-beta.mjv.67 → 0.1.0-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.
Files changed (36) hide show
  1. package/dist/events/index.d.ts +25 -5
  2. package/dist/index.d.ts +41 -2
  3. package/dist/index.js +143 -184
  4. package/dist/lite.d.ts +73 -0
  5. package/dist/lite.js +124 -0
  6. package/dist/modules/ai/chat/chat.d.ts +18 -26
  7. package/dist/modules/ai/chat/index.d.ts +1 -1
  8. package/dist/modules/ai/chat/message/index.d.ts +7 -16
  9. package/dist/modules/ai/chat/settings/index.d.ts +1 -2
  10. package/dist/modules/ai/chat/settings/persona.d.ts +0 -8
  11. package/dist/modules/ai/openai/chat.d.ts +0 -3
  12. package/dist/modules/ai/openai/completions.d.ts +0 -2
  13. package/dist/modules/ai/openai/images.d.ts +0 -2
  14. package/dist/modules/ai/openai/responses.d.ts +0 -2
  15. package/dist/modules/config.d.ts +17 -0
  16. package/dist/react/chat/useChat/index.d.ts +27 -5
  17. package/dist/react/chat/useChat/inner/chatStreaming.d.ts +8 -4
  18. package/dist/react/chat/useChat/inner/stream.d.ts +25 -2
  19. package/dist/react/chat/useChat/message.d.ts +27 -38
  20. package/dist/react/components/MdRenderer/index.d.ts +3 -2
  21. package/dist/react/components/MujianProvider/index.d.ts +4 -0
  22. package/dist/react/components/Thread/MessageItem.d.ts +6 -0
  23. package/dist/react/components/index.d.ts +1 -1
  24. package/dist/react/index.d.ts +1 -0
  25. package/dist/react/mjEngine/index.d.ts +48 -0
  26. package/dist/react.js +446 -343
  27. package/dist/types/index.d.ts +1 -0
  28. package/dist/umd/index.js +1 -791
  29. package/dist/umd/lite.js +2 -0
  30. package/dist/umd/lite.js.LICENSE.txt +7 -0
  31. package/dist/umd/react.css +1 -343
  32. package/dist/umd/react.js +95 -8807
  33. package/dist/umd/react.js.LICENSE.txt +1 -1
  34. package/dist/utils/is-network-error.d.ts +1 -0
  35. package/package.json +14 -6
  36. package/dist/modules/ai/chat/settings/model.d.ts +0 -24
@@ -1,4 +1,4 @@
1
- /*! @license DOMPurify 3.2.7 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.7/LICENSE */
1
+ /*! @license DOMPurify 3.3.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.3/LICENSE */
2
2
 
3
3
  /*! showdown v 2.1.0 - 21-04-2022 */
4
4
 
@@ -0,0 +1 @@
1
+ export default function isNetworkError(message: string): boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mujian/js-sdk",
3
- "version": "0.0.6-beta.mjv.67",
3
+ "version": "0.1.0-beta.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -14,6 +14,10 @@
14
14
  "types": "./dist/react/index.d.ts",
15
15
  "import": "./dist/react.js"
16
16
  },
17
+ "./lite": {
18
+ "types": "./dist/lite.d.ts",
19
+ "import": "./dist/lite.js"
20
+ },
17
21
  "./react.css": {
18
22
  "import": "./dist/react.css"
19
23
  }
@@ -39,14 +43,15 @@
39
43
  "upload:doc": "node upload.js"
40
44
  },
41
45
  "devDependencies": {
46
+ "@types/lodash-es": "4.17.12",
42
47
  "openai": "^6.9.1",
43
48
  "rimraf": "^6.0.1",
44
49
  "@rsbuild/core": "~1.5.12",
45
- "rspress": "^1.40.2",
50
+ "@rspress/core": "^2.0.19",
46
51
  "jsdom": "^26.1.0",
47
- "@rspress/plugin-typedoc": "^1.45.8",
48
- "@rspress/plugin-api-docgen": "^1.45.8",
49
- "@rspress/plugin-preview": "^1.45.8",
52
+ "@rspress/plugin-typedoc": "^2.0.19",
53
+ "@rspress/plugin-api-docgen": "^2.0.19",
54
+ "@rspress/plugin-preview": "^2.0.19",
50
55
  "@mujian/rspress-plugin-sakana-widget": "workspace:",
51
56
  "rspress-plugin-mermaid": "0.3.0",
52
57
  "rspress-plugin-align-image": "0.3.0",
@@ -83,7 +88,10 @@
83
88
  "showdown": "^2.1.0",
84
89
  "postmate": "^1.5.2",
85
90
  "ahooks": "~3.9.5",
86
- "virtua": "~0.45.2"
91
+ "lodash-es": "4.17.21",
92
+ "virtua": "~0.51.0",
93
+ "immer": "~11.1.8",
94
+ "zod": "^4.3.5"
87
95
  },
88
96
  "peerDependencies": {
89
97
  "react": "~19.1.1",
@@ -1,24 +0,0 @@
1
- import type { MujianSdk } from '../../../../index.ts';
2
- import type { ModelInfo } from '../../../../types';
3
- /**
4
- * 获取当前激活的模型
5
- * @returns 模型ID
6
- */
7
- export declare const getActive: (
8
- /** @hidden */
9
- this: MujianSdk) => Promise<string>;
10
- /**
11
- * 设置当前激活的模型
12
- * @param modelId
13
- * @returns 模型ID
14
- */
15
- export declare const setActive: (
16
- /** @hidden */
17
- this: MujianSdk, modelId: string) => Promise<string>;
18
- /**
19
- * 获取模型列表
20
- * @returns 模型列表
21
- */
22
- export declare const getAll: (
23
- /** @hidden */
24
- this: MujianSdk) => Promise<ModelInfo[]>;