gitalk-react 1.0.0-beta.2 → 1.0.0-beta.3

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/README-zh-CN.md CHANGED
@@ -1,7 +1,12 @@
1
+ 基于 Github 议题和 React 的现代评论组件。
2
+
1
3
  [ENGLISH](./README.md) | 简体中文
2
4
 
3
5
  # Gitalk React
4
6
 
7
+ [![NPM][npm-version-image]][npm-version-url]
8
+ [![gzip-size][gzip-size]][gzip-url]
9
+
5
10
  使用 TypeScript, React 和 Vite 重新实现 [Gitalk](https://github.com/gitalk/gitalk) —— 基于 Github 议题的评论组件。
6
11
 
7
12
  面向现代浏览器开发,专注于减少构建包的体积,提升开发与使用的体验。
@@ -81,7 +86,7 @@ Gitalk 依赖于 Github OAuth App 实现登录鉴权,您需要首先[注册一
81
86
 
82
87
  **必填项**。Gitalk 管理员列表。可以是 Github 仓库的拥有者和协作者:拥有对此仓库**写权限**的用户。
83
88
 
84
- ### id `string = location.href`
89
+ ### id `string = location.pathname`
85
90
 
86
91
  评论议题的唯一标识符,长度不能超过 50。
87
92
 
@@ -89,7 +94,7 @@ Gitalk 在创建评论议题时,自动将此参数作为评论议题的标签
89
94
 
90
95
  对于博客等类型的站点,推荐将页面的 `slug` 作为参数。
91
96
 
92
- ### number `number = -1`
97
+ ### number `number`
93
98
 
94
99
  评论议题的编号。
95
100
 
@@ -255,3 +260,8 @@ yarn build
255
260
  ## 许可证
256
261
 
257
262
  [MIT](./LICENSE)
263
+
264
+ [npm-version-image]: https://img.shields.io/npm/v/gitalk-react.svg?style=flat-square
265
+ [npm-version-url]: https://www.npmjs.com/package/gitalk-react
266
+ [gzip-size]: https://img.badgesize.io/https://unpkg.com/gitalk-react/dist/gitalk.umd.cjs?compression=gzip&style=flat-square
267
+ [gzip-url]: https://unpkg.com/gitalk-react/dist/gitalk.umd.cjs
package/README.md CHANGED
@@ -1,7 +1,12 @@
1
+ Modern comment component based on GitHub Issue and React.
2
+
1
3
  ENGLISH | [简体中文](./README-zh-CN.md)
2
4
 
3
5
  # Gitalk React
4
6
 
7
+ [![NPM][npm-version-image]][npm-version-url]
8
+ [![gzip-size][gzip-size]][gzip-url]
9
+
5
10
  Reimplementing [Gitalk](https://github.com/gitalk/gitalk) with TypeScript, React, and Vite — a comment component based on GitHub issues.
6
11
 
7
12
  Developed for modern browsers, focusing on reducing build size and enhancing development and usage experience.
@@ -81,7 +86,7 @@ When using the Gitalk component, fill in the necessary configuration items:
81
86
 
82
87
  **Required**. A list of Gitalk administrators. This can include users who have write access to this repository: owners and collaborators.
83
88
 
84
- ### id `string = location.href`
89
+ ### id `string = location.pathname`
85
90
 
86
91
  A unique identifier for the comment topic; length cannot exceed 50 characters.
87
92
 
@@ -89,7 +94,7 @@ When creating a comment topic, Gitalk automatically uses this parameter as a lab
89
94
 
90
95
  For blog-type sites, it is recommended to use the page's slug as this parameter.
91
96
 
92
- ### number `number = -1`
97
+ ### number `number`
93
98
 
94
99
  The number of the comment topic.
95
100
 
@@ -255,3 +260,8 @@ yarn build
255
260
  ## License
256
261
 
257
262
  [MIT](./LICENSE)
263
+
264
+ [npm-version-image]: https://img.shields.io/npm/v/gitalk-react.svg?style=flat-square
265
+ [npm-version-url]: https://www.npmjs.com/package/gitalk-react
266
+ [gzip-size]: https://img.badgesize.io/https://unpkg.com/gitalk-react/dist/gitalk.umd.cjs?compression=gzip&style=flat-square
267
+ [gzip-url]: https://unpkg.com/gitalk-react/dist/gitalk.umd.cjs
package/dist/gitalk.d.ts CHANGED
@@ -49,14 +49,12 @@ declare interface GitalkProps extends Omit<default_2.HTMLAttributes<HTMLDivEleme
49
49
  * The unique id of the page.
50
50
  * Length must less than 50.
51
51
  *
52
- * @default location.href
52
+ * @default location.pathname
53
53
  */
54
54
  id?: string;
55
55
  /**
56
56
  * The issue ID of the page.
57
57
  * If the number attribute is not defined, issue will be located using id.
58
- *
59
- * @default -1
60
58
  */
61
59
  number?: number;
62
60
  /**