@modern-js/main-doc 0.0.0-next-1680153170734 → 0.0.0-next-1680174843477

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 CHANGED
@@ -1,18 +1,18 @@
1
1
  # @modern-js/main-doc
2
2
 
3
- ## 0.0.0-next-1680153170734
3
+ ## 0.0.0-next-1680174843477
4
4
 
5
5
  ### Patch Changes
6
6
 
7
- - a8c08c3a2: feat: 添加 `source.transformImoprt`
7
+ - a8c08c3a23: feat: 添加 `source.transformImoprt`
8
8
 
9
9
  feat: add `source.transformImoprt`
10
10
 
11
- - 304c9505c: fix: translate some chinese to english in en docs
11
+ - 304c9505cb: fix: translate some chinese to english in en docs
12
12
  fix: 将部分英文文档中的中文翻译为英文
13
- - Updated dependencies [a8c08c3a2]
14
- - Updated dependencies [b71cef1d9]
15
- - @modern-js/builder-doc@0.0.0-next-1680153170734
13
+ - Updated dependencies [a8c08c3a23]
14
+ - Updated dependencies [b71cef1d98]
15
+ - @modern-js/builder-doc@0.0.0-next-1680174843477
16
16
 
17
17
  ## 2.10.0
18
18
 
@@ -2,6 +2,7 @@
2
2
  sidebar_position: 3
3
3
  title: Use Models
4
4
  ---
5
+
5
6
  # Use Models
6
7
 
7
8
  ## Using Models in Components
@@ -146,7 +147,7 @@ will always get the initial value of Input.
146
147
 
147
148
  :::
148
149
 
149
- `useStaticModel` is also suitable for use with animation libraries such as [react-three-fiber](https://github.com/pmndrs/react-three-fiber), because binding fast-changing states in animation component UI can easily cause [performance issues](https:/docs.pmnd.rs/react-three-fiber/advanced/pitfalls#never-bind-fast-state-reactive). In this case, you can choose to use `useStaticModel`, which only subscribes to the State but does not cause the view component to re-render. Here is a simplified example:
150
+ `useStaticModel` is also suitable for use with animation libraries such as [react-three-fiber](https://github.com/pmndrs/react-three-fiber), because binding fast-changing states in animation component UI can easily cause [performance issues](https://docs.pmnd.rs/react-three-fiber/advanced/pitfalls#never-bind-fast-state-reactive). In this case, you can choose to use `useStaticModel`, which only subscribes to the State but does not cause the view component to re-render. Here is a simplified example:
150
151
 
151
152
  ```ts
152
153
  function ThreeComponent() {
@@ -2,6 +2,7 @@
2
2
  sidebar_position: 3
3
3
  title: 使用 Model
4
4
  ---
5
+
5
6
  # 使用 Model
6
7
 
7
8
  ## 在组件内使用
@@ -147,7 +148,7 @@ function Search() {
147
148
 
148
149
  :::
149
150
 
150
- `useStaticModel` 还适合和 [react-three-fiber](https://github.com/pmndrs/react-three-fiber) 等动画库一起使用,因为在动画组件 UI 里绑定会快速变化的状态,容易引起[性能问题](https:/docs.pmnd.rs/react-three-fiber/advanced/pitfalls#never-bind-fast-state-reactive)。这种情况就可以选择使用 `useStaticModel`,它只会订阅状态,但不会引起视图组件的重新渲染。下面是一个简化示例:
151
+ `useStaticModel` 还适合和 [react-three-fiber](https://github.com/pmndrs/react-three-fiber) 等动画库一起使用,因为在动画组件 UI 里绑定会快速变化的状态,容易引起[性能问题](https://docs.pmnd.rs/react-three-fiber/advanced/pitfalls#never-bind-fast-state-reactive)。这种情况就可以选择使用 `useStaticModel`,它只会订阅状态,但不会引起视图组件的重新渲染。下面是一个简化示例:
151
152
 
152
153
  ```ts
153
154
  function ThreeComponent() {
package/modern.config.ts CHANGED
@@ -78,7 +78,8 @@ export default defineConfig({
78
78
  lang: 'zh',
79
79
  themeDir: path.join(__dirname, 'src'),
80
80
  markdown: {
81
- checkDeadLinks: process.env.NODE_ENV === 'production',
81
+ checkDeadLinks: true,
82
+ experimentalMdxRs: true,
82
83
  },
83
84
  head: [
84
85
  `
@@ -133,7 +134,7 @@ export default defineConfig({
133
134
  dataUriLimit: 0,
134
135
  },
135
136
  dev: {
136
- startUrl: true,
137
+ startUrl: false,
137
138
  },
138
139
  source: {
139
140
  alias: {
package/package.json CHANGED
@@ -11,13 +11,13 @@
11
11
  "modern",
12
12
  "modern.js"
13
13
  ],
14
- "version": "0.0.0-next-1680153170734",
14
+ "version": "0.0.0-next-1680174843477",
15
15
  "publishConfig": {
16
16
  "registry": "https://registry.npmjs.org/",
17
17
  "access": "public"
18
18
  },
19
19
  "peerDependencies": {
20
- "@modern-js/builder-doc": "0.0.0-next-1680153170734"
20
+ "@modern-js/builder-doc": "0.0.0-next-1680174843477"
21
21
  },
22
22
  "devDependencies": {
23
23
  "classnames": "^2",
@@ -29,9 +29,9 @@
29
29
  "fs-extra": "^10",
30
30
  "@types/node": "^16",
31
31
  "@types/fs-extra": "^9",
32
- "@modern-js/builder-doc": "0.0.0-next-1680153170734",
33
- "@modern-js/doc-tools": "0.0.0-next-1680153170734",
34
- "@modern-js/doc-plugin-auto-sidebar": "0.0.0-next-1680153170734"
32
+ "@modern-js/builder-doc": "0.0.0-next-1680174843477",
33
+ "@modern-js/doc-tools": "0.0.0-next-1680174843477",
34
+ "@modern-js/doc-plugin-auto-sidebar": "0.0.0-next-1680174843477"
35
35
  },
36
36
  "scripts": {
37
37
  "dev": "modern dev",