gitalk-react 1.0.0-beta.4 → 1.0.0-beta.5
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 +4 -4
- package/README.md +3 -3
- package/dist/gitalk-dark.css +1 -1
- package/dist/gitalk-light.css +1 -1
- package/dist/gitalk.d.ts +2 -2
- package/dist/gitalk.js +2 -2
- package/dist/gitalk.umd.cjs +2 -2
- package/lib/gitalk.tsx +9 -3
- package/lib/themes/base.scss +4 -6
- package/lib/vite-env.d.ts +1 -0
- package/package.json +8 -5
package/lib/gitalk.tsx
CHANGED
|
@@ -46,7 +46,13 @@ import logger from "./utils/logger";
|
|
|
46
46
|
import { parseSearchQuery, stringifySearchQuery } from "./utils/query";
|
|
47
47
|
|
|
48
48
|
export interface GitalkProps
|
|
49
|
-
extends Omit<
|
|
49
|
+
extends Omit<
|
|
50
|
+
React.DetailedHTMLProps<
|
|
51
|
+
React.HTMLAttributes<HTMLDivElement>,
|
|
52
|
+
HTMLDivElement
|
|
53
|
+
>,
|
|
54
|
+
"id" | "title"
|
|
55
|
+
> {
|
|
50
56
|
/**
|
|
51
57
|
* GitHub Application Client ID.
|
|
52
58
|
*/
|
|
@@ -113,7 +119,7 @@ export interface GitalkProps
|
|
|
113
119
|
perPage?: number;
|
|
114
120
|
/**
|
|
115
121
|
* Comment sorting direction.
|
|
116
|
-
* Available values are last and first
|
|
122
|
+
* Available values are `last` and `first`.
|
|
117
123
|
*
|
|
118
124
|
* @default "last"
|
|
119
125
|
*/
|
|
@@ -1220,7 +1226,7 @@ const Gitalk: React.FC<GitalkProps> = (props) => {
|
|
|
1220
1226
|
value={{ language, polyglot, dateFnsLocaleMap: DATE_FNS_LOCALE_MAP }}
|
|
1221
1227
|
>
|
|
1222
1228
|
<div
|
|
1223
|
-
className={`gt-container
|
|
1229
|
+
className={`gt-container${isInputFocused ? " gt-input-focused" : ""} ${className}`}
|
|
1224
1230
|
{...restProps}
|
|
1225
1231
|
>
|
|
1226
1232
|
{alert && <div className="gt-error">{alert}</div>}
|
package/lib/themes/base.scss
CHANGED
|
@@ -568,7 +568,6 @@ $gt-breakpoint-mobile: 479px;
|
|
|
568
568
|
|
|
569
569
|
&::after {
|
|
570
570
|
position: fixed;
|
|
571
|
-
inset: 0 0 100%;
|
|
572
571
|
content: '';
|
|
573
572
|
opacity: 0;
|
|
574
573
|
}
|
|
@@ -577,12 +576,11 @@ $gt-breakpoint-mobile: 479px;
|
|
|
577
576
|
position: relative;
|
|
578
577
|
|
|
579
578
|
&::after {
|
|
579
|
+
inset: 0;
|
|
580
580
|
z-index: $gt-mask-z-index;
|
|
581
|
-
background: #
|
|
582
|
-
opacity: 0.
|
|
583
|
-
transition:
|
|
584
|
-
opacity 0.3s,
|
|
585
|
-
bottom 0s;
|
|
581
|
+
background: #171717;
|
|
582
|
+
opacity: 0.8;
|
|
583
|
+
transition: opacity ease 0.3s;
|
|
586
584
|
}
|
|
587
585
|
|
|
588
586
|
.gt-header-comment {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/// <reference types="vite/client" />
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gitalk-react",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.5",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "LolipopJ",
|
|
@@ -26,19 +26,22 @@
|
|
|
26
26
|
"require": "./dist/gitalk.umd.cjs"
|
|
27
27
|
},
|
|
28
28
|
"./gitalk.css": "./dist/gitalk-light.css",
|
|
29
|
+
"./light.css": "./dist/gitalk-light.css",
|
|
29
30
|
"./gitalk-light.css": "./dist/gitalk-light.css",
|
|
31
|
+
"./dark.css": "./dist/gitalk-dark.css",
|
|
30
32
|
"./gitalk-dark.css": "./dist/gitalk-dark.css"
|
|
31
33
|
},
|
|
32
34
|
"types": "./dist/gitalk.d.ts",
|
|
33
35
|
"scripts": {
|
|
34
|
-
"dev": "vite",
|
|
35
|
-
"build": "npm run build:
|
|
36
|
+
"dev": "vite --config vite.config.preview.ts",
|
|
37
|
+
"build": "npm run build:lib && npm run build:preview",
|
|
38
|
+
"build:lib": "npm run build:ts && npm run build:scss",
|
|
36
39
|
"build:ts": "tsc -b && vite build",
|
|
37
40
|
"build:scss": "vite build --config vite.config.scss.ts",
|
|
41
|
+
"build:preview": "vite build --config vite.config.preview.ts",
|
|
38
42
|
"lint": "npm run lint:ts && npm run lint:scss",
|
|
39
43
|
"lint:ts": "eslint . --fix",
|
|
40
|
-
"lint:scss": "stylelint
|
|
41
|
-
"preview": "vite preview"
|
|
44
|
+
"lint:scss": "stylelint **/*.scss --fix"
|
|
42
45
|
},
|
|
43
46
|
"dependencies": {
|
|
44
47
|
"ahooks": "^3.0.0",
|