@modern-js/main-doc 2.31.0 → 2.31.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/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @modern-js/main-doc
2
2
 
3
+ ## 2.31.2
4
+
5
+ ### Patch Changes
6
+
7
+ - @modern-js/builder-doc@2.31.2
8
+
9
+ ## 2.31.1
10
+
11
+ ### Patch Changes
12
+
13
+ - 7c4698f: fix(main-doc): modify the correct NoSSR import mode
14
+
15
+ fix(main-doc): 修复 NoSSR 组件引入找不到
16
+
17
+ - @modern-js/builder-doc@2.31.1
18
+
3
19
  ## 2.31.0
4
20
 
5
21
  ### Patch Changes
@@ -8,7 +8,7 @@ The content wrapped by NoSSR will not be rendered at the server, nor will it be
8
8
  ## Usage
9
9
 
10
10
  ```tsx
11
- import { NoSSR } from '@modern-js/runtime';
11
+ import { NoSSR } from '@modern-js/runtime/ssr';
12
12
 
13
13
  export default () => <NoSSR>...</NoSSR>;
14
14
  ```
@@ -18,7 +18,7 @@ export default () => <NoSSR>...</NoSSR>;
18
18
  In the following code, the `Time` component is used to display the current time. Since the time obtained by server-side rendering and client side hydrate are diff, React will throw an exception. For this case, you can use `NoSSR` to optimize:
19
19
 
20
20
  ```tsx
21
- import { NoSSR } from '@modern-js/runtime';
21
+ import { NoSSR } from '@modern-js/runtime/ssr';
22
22
 
23
23
  function Time() {
24
24
  return (
@@ -8,7 +8,7 @@ title: NoSSR
8
8
  ## 使用姿势
9
9
 
10
10
  ```tsx
11
- import { NoSSR } from '@modern-js/runtime';
11
+ import { NoSSR } from '@modern-js/runtime/ssr';
12
12
 
13
13
  export default () => <NoSSR>...</NoSSR>;
14
14
  ```
@@ -18,7 +18,7 @@ export default () => <NoSSR>...</NoSSR>;
18
18
  下列代码中,`Time` 组件用于展示当前的时间,由于服务端渲染和客户端 hydrate 时获取到的时间是不一致的,React 就会抛出异常。针对这种情况可以使用 `NoSSR` 进行优化:
19
19
 
20
20
  ```tsx
21
- import { NoSSR } from '@modern-js/runtime';
21
+ import { NoSSR } from '@modern-js/runtime/ssr';
22
22
 
23
23
  function Time() {
24
24
  return (
package/package.json CHANGED
@@ -15,14 +15,14 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "2.31.0",
18
+ "version": "2.31.2",
19
19
  "publishConfig": {
20
20
  "registry": "https://registry.npmjs.org/",
21
21
  "access": "public",
22
22
  "provenance": true
23
23
  },
24
24
  "peerDependencies": {
25
- "@modern-js/builder-doc": "^2.31.0"
25
+ "@modern-js/builder-doc": "^2.31.2"
26
26
  },
27
27
  "devDependencies": {
28
28
  "classnames": "^2",
@@ -34,9 +34,9 @@
34
34
  "fs-extra": "^10",
35
35
  "@types/node": "^16",
36
36
  "@types/fs-extra": "^9",
37
- "@modern-js/builder-doc": "2.31.0",
38
- "@modern-js/doc-tools": "2.31.0",
39
- "@modern-js/doc-plugin-auto-sidebar": "2.31.0"
37
+ "@modern-js/builder-doc": "2.31.2",
38
+ "@modern-js/doc-tools": "2.31.2",
39
+ "@modern-js/doc-plugin-auto-sidebar": "2.31.2"
40
40
  },
41
41
  "scripts": {
42
42
  "dev": "modern dev",
@@ -13,6 +13,34 @@ export const useShowcases = (): ShowcaseItem[] => {
13
13
  const t = useI18n();
14
14
 
15
15
  return [
16
+ {
17
+ name: 'Tiktok Seller',
18
+ url: 'https://seller-us-accounts.tiktok.com/',
19
+ preview:
20
+ 'https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/showcase/tiktok-seller-showcase-08172.png',
21
+ type: 'framework',
22
+ },
23
+ {
24
+ name: 'Tiktok Streamer',
25
+ url: 'https://shop.tiktok.com/streamer/welcome',
26
+ preview:
27
+ 'https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/showcase/tiktok-steamer-showcase-08172.png',
28
+ type: 'framework',
29
+ },
30
+ {
31
+ name: 'Tiktok Shop Partner',
32
+ url: 'https://partner-us.tiktok.com/',
33
+ preview:
34
+ 'https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/showcase/tiktok-shop-partner-0817.png',
35
+ type: 'framework',
36
+ },
37
+ {
38
+ name: t('doubao'),
39
+ url: 'https://www.doubao.com/',
40
+ preview:
41
+ 'https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/showcase/doubao-showcase-0817.png',
42
+ type: 'framework',
43
+ },
16
44
  {
17
45
  name: t('volctrans'),
18
46
  url: 'https://translate.volcengine.com/',
package/src/i18n/enUS.ts CHANGED
@@ -49,6 +49,7 @@ export const EN_US = {
49
49
  changelog: 'Changelog',
50
50
 
51
51
  // Showcases
52
+ doubao: 'Doubao',
52
53
  writingo: 'Writingo',
53
54
  volctrans: 'Volctrans',
54
55
  shidianbaike: 'Shidian Baike',
package/src/i18n/zhCN.ts CHANGED
@@ -49,6 +49,7 @@ export const ZH_CN: Record<keyof typeof EN_US, string> = {
49
49
  changelog: '更新日志',
50
50
 
51
51
  // Showcase
52
+ doubao: '豆包',
52
53
  writingo: '火山写作',
53
54
  volctrans: '火山翻译',
54
55
  shidianbaike: '识典百科',