gitalk-react 1.0.0-beta.7 → 1.0.0-beta.8
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 +1 -1
- package/README.md +1 -1
- package/dist/gitalk.js +31 -30
- package/dist/gitalk.umd.cjs +6 -6
- package/lib/gitalk.tsx +2 -1
- package/package.json +1 -1
package/README-zh-CN.md
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
## 开发中的功能
|
|
23
23
|
|
|
24
24
|
- [ ] Feature: 支持在 Gitalk React 编辑自己发表的评论。
|
|
25
|
-
- [
|
|
25
|
+
- [x] Feature: 支持折叠过长的评论,允许点击展开该评论。
|
|
26
26
|
- [ ] refactor: 逐渐移除对非必要三方库的依赖。减少构建包的体积。
|
|
27
27
|
- [ ] test: 添加自动化测试流程。提升项目的健壮性。
|
|
28
28
|
- [x] chore: 部署[预览环境](https://lolipopj.github.io/gitalk-react/)。
|
package/README.md
CHANGED
|
@@ -22,7 +22,7 @@ Developed for modern browsers, focusing on reducing build size and enhancing dev
|
|
|
22
22
|
## Features in Development
|
|
23
23
|
|
|
24
24
|
- [ ] Feature: Support editing comments published by the user in Gitalk React.
|
|
25
|
-
- [
|
|
25
|
+
- [x] Feature: Support collapse overly long comments, allowing users to click to expand the comment.
|
|
26
26
|
- [ ] refactor: Gradually remove dependencies on non-essential third-party libraries to reduce build size.
|
|
27
27
|
- [ ] test: Add automated testing processes to enhance project robustness.
|
|
28
28
|
- [x] chore: Deploy [preview environment](https://lolipopj.github.io/gitalk-react/).
|
package/dist/gitalk.js
CHANGED
|
@@ -590,7 +590,7 @@ function Ns() {
|
|
|
590
590
|
var Q = G(G(ge));
|
|
591
591
|
q["%Error.prototype%"] = Q;
|
|
592
592
|
}
|
|
593
|
-
var
|
|
593
|
+
var Ae = function ge(U) {
|
|
594
594
|
var Z;
|
|
595
595
|
if (U === "%AsyncFunction%")
|
|
596
596
|
Z = R("async function () {}");
|
|
@@ -606,7 +606,7 @@ function Ns() {
|
|
|
606
606
|
V && G && (Z = G(V.prototype));
|
|
607
607
|
}
|
|
608
608
|
return q[U] = Z, Z;
|
|
609
|
-
},
|
|
609
|
+
}, Oe = {
|
|
610
610
|
__proto__: null,
|
|
611
611
|
"%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
|
|
612
612
|
"%ArrayPrototype%": ["Array", "prototype"],
|
|
@@ -659,7 +659,7 @@ function Ns() {
|
|
|
659
659
|
"%URIErrorPrototype%": ["URIError", "prototype"],
|
|
660
660
|
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
661
661
|
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
662
|
-
}, we = Et(),
|
|
662
|
+
}, we = Et(), Re = /* @__PURE__ */ Ls(), Xe = we.call(K, Array.prototype.concat), We = we.call(be, Array.prototype.splice), Ke = we.call(K, String.prototype.replace), Me = we.call(K, String.prototype.slice), ze = we.call(K, RegExp.prototype.exec), He = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, Be = /\\(\\)?/g, je = function(U) {
|
|
663
663
|
var Z = Me(U, 0, 1), B = Me(U, -1);
|
|
664
664
|
if (Z === "%" && B !== "%")
|
|
665
665
|
throw new i("invalid intrinsic syntax, expected closing `%`");
|
|
@@ -671,9 +671,9 @@ function Ns() {
|
|
|
671
671
|
}), V;
|
|
672
672
|
}, Ee = function(U, Z) {
|
|
673
673
|
var B = U, V;
|
|
674
|
-
if (Oe
|
|
674
|
+
if (Re(Oe, B) && (V = Oe[B], B = "%" + V[0] + "%"), Re(q, B)) {
|
|
675
675
|
var ee = q[B];
|
|
676
|
-
if (ee === Y && (ee =
|
|
676
|
+
if (ee === Y && (ee = Ae(B)), typeof ee > "u" && !Z)
|
|
677
677
|
throw new a("intrinsic " + U + " exists, but is not available. Please file an issue!");
|
|
678
678
|
return {
|
|
679
679
|
alias: V,
|
|
@@ -696,7 +696,7 @@ function Ns() {
|
|
|
696
696
|
var H = B[De], Ue = Me(H, 0, 1), Ge = Me(H, -1);
|
|
697
697
|
if ((Ue === '"' || Ue === "'" || Ue === "`" || Ge === '"' || Ge === "'" || Ge === "`") && Ue !== Ge)
|
|
698
698
|
throw new i("property names with quotes must have matching quotes");
|
|
699
|
-
if ((H === "constructor" || !se) && (Le = !0), V += "." + H, xe = "%" + V + "%",
|
|
699
|
+
if ((H === "constructor" || !se) && (Le = !0), V += "." + H, xe = "%" + V + "%", Re(q, xe))
|
|
700
700
|
J = q[xe];
|
|
701
701
|
else if (J != null) {
|
|
702
702
|
if (!(H in J)) {
|
|
@@ -708,7 +708,7 @@ function Ns() {
|
|
|
708
708
|
var Te = D(J, H);
|
|
709
709
|
se = !!Te, se && "get" in Te && !("originalValue" in Te.get) ? J = Te.get : J = J[H];
|
|
710
710
|
} else
|
|
711
|
-
se =
|
|
711
|
+
se = Re(J, H), J = J[H];
|
|
712
712
|
se && !Le && (q[xe] = J);
|
|
713
713
|
}
|
|
714
714
|
}
|
|
@@ -990,15 +990,15 @@ function fa() {
|
|
|
990
990
|
return y;
|
|
991
991
|
var z = y, be = _ || C, K = x || o, Y = typeof E == "number" ? { smart_count: E } : E;
|
|
992
992
|
if (Y.smart_count != null && y) {
|
|
993
|
-
var N = G || c, q = s.call(y, i), Q = k || "en",
|
|
993
|
+
var N = G || c, q = s.call(y, i), Q = k || "en", Ae = O(N, Q), Oe = p(
|
|
994
994
|
N,
|
|
995
|
-
|
|
995
|
+
Ae,
|
|
996
996
|
Y.smart_count
|
|
997
997
|
);
|
|
998
|
-
z = o.call(q[
|
|
998
|
+
z = o.call(q[Oe] || q[0], /^[^\S]*|[^\S]*$/g, "");
|
|
999
999
|
}
|
|
1000
|
-
return z = K.call(z, be, function(we,
|
|
1001
|
-
return !r(Y,
|
|
1000
|
+
return z = K.call(z, be, function(we, Re) {
|
|
1001
|
+
return !r(Y, Re) || Y[Re] == null ? we : Y[Re];
|
|
1002
1002
|
}), z;
|
|
1003
1003
|
}
|
|
1004
1004
|
function D(y) {
|
|
@@ -5566,7 +5566,7 @@ const Lp = {
|
|
|
5566
5566
|
weekStartsOn: 1,
|
|
5567
5567
|
firstWeekContainsDate: 4
|
|
5568
5568
|
}
|
|
5569
|
-
}, xm = "1.0.0-beta.
|
|
5569
|
+
}, xm = "1.0.0-beta.8", Lm = "https://lolipopj.github.io/gitalk-react", Hs = {
|
|
5570
5570
|
version: xm,
|
|
5571
5571
|
homepage: Lm
|
|
5572
5572
|
}, Nm = Hs.version, Im = Hs.homepage, fn = "en", Wm = ["Gitalk"], jm = {
|
|
@@ -6271,8 +6271,8 @@ function ei() {
|
|
|
6271
6271
|
return C = N, w = setTimeout(x, c), R ? E(N) : f;
|
|
6272
6272
|
}
|
|
6273
6273
|
function _(N) {
|
|
6274
|
-
var q = N - O, Q = N - C,
|
|
6275
|
-
return D ? s(
|
|
6274
|
+
var q = N - O, Q = N - C, Ae = c - q;
|
|
6275
|
+
return D ? s(Ae, h - Q) : Ae;
|
|
6276
6276
|
}
|
|
6277
6277
|
function G(N) {
|
|
6278
6278
|
var q = N - O, Q = N - C;
|
|
@@ -11415,10 +11415,10 @@ function Ny() {
|
|
|
11415
11415
|
}), this._queue.push({ task: m, args: l, resolve: b, reject: v }), this._tryToRun(), g;
|
|
11416
11416
|
}
|
|
11417
11417
|
};
|
|
11418
|
-
var
|
|
11419
|
-
version:
|
|
11420
|
-
},
|
|
11421
|
-
version:
|
|
11418
|
+
var Ae = Q, Oe = "2.19.5", we = {
|
|
11419
|
+
version: Oe
|
|
11420
|
+
}, Re = /* @__PURE__ */ Object.freeze({
|
|
11421
|
+
version: Oe,
|
|
11422
11422
|
default: we
|
|
11423
11423
|
}), Xe = () => console.log("You must import the full version of Bottleneck in order to use this feature."), We = () => console.log("You must import the full version of Bottleneck in order to use this feature."), Ke = () => console.log("You must import the full version of Bottleneck in order to use this feature."), Me, ze, He, Be, je, Ee;
|
|
11424
11424
|
Ee = i, Me = d, Be = Xe, He = We, je = Ke, ze = (function() {
|
|
@@ -11519,8 +11519,8 @@ function Ny() {
|
|
|
11519
11519
|
Promise
|
|
11520
11520
|
}, S;
|
|
11521
11521
|
}).call(r);
|
|
11522
|
-
var V = U, ee = () => console.log("You must import the full version of Bottleneck in order to use this feature."), xe = n(
|
|
11523
|
-
H = 10, Le = 5, pe = i, Ue = w, De = _, se = be, Ge = ee, Ne = d, Te = N, Ye =
|
|
11522
|
+
var V = U, ee = () => console.log("You must import the full version of Bottleneck in order to use this feature."), xe = n(Re), J, Le, Ne, De, se, H, Ue, Ge, Te, Ye, pe, lt = [].splice;
|
|
11523
|
+
H = 10, Le = 5, pe = i, Ue = w, De = _, se = be, Ge = ee, Ne = d, Te = N, Ye = Ae, J = (function() {
|
|
11524
11524
|
class S {
|
|
11525
11525
|
constructor(l = {}, ...g) {
|
|
11526
11526
|
var v, b;
|
|
@@ -12144,7 +12144,7 @@ const I = new eb({}), tb = (e) => {
|
|
|
12144
12144
|
), q = he(() => i.slice(0, 50), [i]), Q = he(
|
|
12145
12145
|
() => c.concat([q]),
|
|
12146
12146
|
[c, q]
|
|
12147
|
-
),
|
|
12147
|
+
), Ae = re(null), [Oe, we] = ke(""), [Re, Xe] = ke(!1), [We, Ke] = ke(0), [Me, ze] = ke(""), [He, Be] = ke(1), je = he(
|
|
12148
12148
|
() => h > 100 ? 100 : h < 0 ? 10 : h,
|
|
12149
12149
|
[h]
|
|
12150
12150
|
), [Ee, ge] = ke(f), U = he(
|
|
@@ -12407,7 +12407,7 @@ const I = new eb({}), tb = (e) => {
|
|
|
12407
12407
|
owner: n,
|
|
12408
12408
|
repo: o,
|
|
12409
12409
|
issue_number: P,
|
|
12410
|
-
body:
|
|
12410
|
+
body: Oe,
|
|
12411
12411
|
headers: {
|
|
12412
12412
|
accept: "application/vnd.github.v3.full+json"
|
|
12413
12413
|
}
|
|
@@ -12430,7 +12430,7 @@ const I = new eb({}), tb = (e) => {
|
|
|
12430
12430
|
},
|
|
12431
12431
|
{
|
|
12432
12432
|
manual: !0,
|
|
12433
|
-
ready: !!n && !!o && !!K && !!
|
|
12433
|
+
ready: !!n && !!o && !!K && !!Oe
|
|
12434
12434
|
}
|
|
12435
12435
|
);
|
|
12436
12436
|
Se(() => {
|
|
@@ -12547,9 +12547,9 @@ const I = new eb({}), tb = (e) => {
|
|
|
12547
12547
|
Xe(!1);
|
|
12548
12548
|
};
|
|
12549
12549
|
Se(() => {
|
|
12550
|
-
const P =
|
|
12550
|
+
const P = Ae.current;
|
|
12551
12551
|
P && (P.style.height = "auto", P.style.height = `${P.scrollHeight + 2}px`);
|
|
12552
|
-
}, [
|
|
12552
|
+
}, [Oe]);
|
|
12553
12553
|
const Oi = (P) => {
|
|
12554
12554
|
O && (P.metaKey || P.ctrlKey) && P.keyCode === 13 && b();
|
|
12555
12555
|
}, Ri = Pn(
|
|
@@ -12560,10 +12560,10 @@ const I = new eb({}), tb = (e) => {
|
|
|
12560
12560
|
const fe = X == null ? void 0 : X.login;
|
|
12561
12561
|
fe && ne.unshift(`@${fe}`), ne = ne.map(
|
|
12562
12562
|
(ie) => `> ${ie}`
|
|
12563
|
-
), we((ie) => (ie && ne.unshift("", ""), ne.push(""
|
|
12563
|
+
), we((ie) => (ie && ne.unshift("", ""), ne.push(""), `${ie}${ne.join(`
|
|
12564
12564
|
`)}`)), setTimeout(() => {
|
|
12565
12565
|
var ie;
|
|
12566
|
-
(ie =
|
|
12566
|
+
(ie = Ae.current) == null || ie.focus();
|
|
12567
12567
|
});
|
|
12568
12568
|
},
|
|
12569
12569
|
[]
|
|
@@ -12571,7 +12571,7 @@ const I = new eb({}), tb = (e) => {
|
|
|
12571
12571
|
return ab ? t && r ? o && n ? Array.isArray(s) && s.length > 0 ? /* @__PURE__ */ $(Tt.Provider, { value: xe, children: /* @__PURE__ */ ae(
|
|
12572
12572
|
"div",
|
|
12573
12573
|
{
|
|
12574
|
-
className: `gt-container${
|
|
12574
|
+
className: `gt-container${Re ? " gt-input-focused" : ""} ${z}`,
|
|
12575
12575
|
...be,
|
|
12576
12576
|
children: [
|
|
12577
12577
|
B && /* @__PURE__ */ $("div", { className: "gt-error", children: B }),
|
|
@@ -12591,7 +12591,8 @@ const I = new eb({}), tb = (e) => {
|
|
|
12591
12591
|
/* @__PURE__ */ $(
|
|
12592
12592
|
Pf,
|
|
12593
12593
|
{
|
|
12594
|
-
|
|
12594
|
+
ref: Ae,
|
|
12595
|
+
value: Oe,
|
|
12595
12596
|
onChange: (P) => we(P.target.value),
|
|
12596
12597
|
onFocus: _t,
|
|
12597
12598
|
onBlur: Ai,
|