@commentkit/comment-kit 2.0.0 → 2.1.0
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 +57 -0
- package/README.md +123 -19
- package/SECURITY.md +2 -2
- package/dist/node/cli/api.js +61 -15
- package/dist/node/cli/credentials.js +8 -0
- package/dist/node/cli/doctor.js +152 -25
- package/dist/node/cli/init.js +349 -35
- package/dist/node/cli/main.js +310 -69
- package/dist/node/cli/mcp.js +187 -6
- package/dist/node/cli/website.js +140 -0
- package/dist/node/shared/dashboard-places.js +33 -0
- package/dist/node/types/next.d.ts +4 -4
- package/dist/npm/THIRD_PARTY_NOTICES.txt +47 -0
- package/dist/npm/chunks/{AgentSend-DxRJIYiz.js → AgentSend-pA7Ufvye.js} +16 -16
- package/dist/npm/chunks/Checklist-Cn9skOYK.js +269 -0
- package/dist/npm/chunks/Composer-D7H-pzGa.js +734 -0
- package/dist/npm/chunks/DatePicker-Nta5a1xD.js +161 -0
- package/dist/npm/chunks/{Guest-vvNPz8h-.js → Guest-Bi7hlzhs.js} +63 -59
- package/dist/npm/chunks/{MarkupEditor-VCOXh9d2.js → MarkupEditor-WU3USeTk.js} +46 -39
- package/dist/npm/chunks/Panel-DhAzbUbC.js +1210 -0
- package/dist/npm/chunks/{Settings-BGoZS2iV.js → Settings-BmKqPX40.js} +91 -90
- package/dist/npm/chunks/{Shortcuts-B2OMvczr.js → Shortcuts-Bl-c0Sez.js} +25 -23
- package/dist/npm/chunks/SignInFirst-CmGvSYkQ.js +35 -0
- package/dist/npm/chunks/{StyleEditor-CJ_d8Huf.js → StyleEditor-D6fUnlwq.js} +10 -10
- package/dist/npm/chunks/{StylePanel-yQzHHlY7.js → StylePanel-C-Gikxt1.js} +61 -61
- package/dist/npm/chunks/TaskFields-CaKi523b.js +617 -0
- package/dist/npm/chunks/ThreadCard-d_3pUB5V.js +1142 -0
- package/dist/npm/chunks/Viewer-BULQsi9-.js +115 -0
- package/dist/npm/chunks/{agent-C1OQzBAm.js → agent-DHdhIJ3s.js} +1 -1
- package/dist/npm/chunks/{ar-CAJ3XT8e.js → ar-B5UszrQp.js} +53 -12
- package/dist/npm/chunks/card-bits-cV8GdFWX.js +55 -0
- package/dist/npm/chunks/{client-kNAo2TTG.js → client-Cv8ddtuM.js} +13 -11
- package/dist/npm/chunks/{confetti-CkBdSu19.js → confetti-B9zlyILU.js} +1 -1
- package/dist/npm/chunks/{context-B8UAzve0.js → context-CsHnabaA.js} +1 -1
- package/dist/npm/chunks/{de-Dl18G48t.js → de-BE0Aaq8u.js} +53 -12
- package/dist/npm/chunks/{dialog-GO04oC3D.js → dialog-DvdIkCW0.js} +1 -1
- package/dist/npm/chunks/{dpop-U48QIQd7.js → dpop-CwW9ifkq.js} +1 -1
- package/dist/npm/chunks/entrance-Bn_5M9uO.js +90 -0
- package/dist/npm/chunks/{es-Dxk79lS9.js → es-BQviao4d.js} +53 -12
- package/dist/npm/chunks/{extension-E81hWyiT.js → extension-CnQTDC1j.js} +2 -2
- package/dist/npm/chunks/{extension-CKFpPWmi.js → extension-DXhz81XD.js} +1 -1
- package/dist/npm/chunks/{files-DyD5BZgp.js → files-DLEr_wmh.js} +2 -2
- package/dist/npm/chunks/{fr-8BebGKYD.js → fr-C5gu6A06.js} +53 -12
- package/dist/npm/chunks/{hi-BIN6Yy_p.js → hi-DXfQ5EvY.js} +53 -12
- package/dist/npm/chunks/{i18n-DOBt8e9U.js → i18n-Mgs9VOuk.js} +63 -58
- package/dist/npm/chunks/icons-_C6ZWmBY.js +141 -0
- package/dist/npm/chunks/{identify-CN-3xzqL.js → identify-BnQGJOa0.js} +4 -4
- package/dist/npm/chunks/{it-Cr6EwpPQ.js → it-BPHt13FV.js} +53 -12
- package/dist/npm/chunks/{ja-Iy3s5aur.js → ja-BkCqyKR0.js} +52 -11
- package/dist/npm/chunks/late-words-D4Oo_yhJ.js +57 -0
- package/dist/npm/chunks/{live-CelVeZfP.js → live-DXcxj_Af.js} +28 -22
- package/dist/npm/chunks/{nl-B84WHqqe.js → nl-DZxdLLMU.js} +53 -12
- package/dist/npm/chunks/{page-key-DepmJzC1.js → page-key-UqAozdZi.js} +1 -1
- package/dist/npm/chunks/{pick-yTyqtxN0.js → pick-C20RVUas.js} +1 -1
- package/dist/npm/chunks/{pkce-ChKGSW_4.js → pkce-BPvWoBrr.js} +1 -1
- package/dist/npm/chunks/{pt-BR-DOkdlfoe.js → pt-BR-lA9mJ05F.js} +53 -12
- package/dist/npm/chunks/{report-CrIqQZDI.js → report-BjUgUNnT.js} +1 -1
- package/dist/npm/chunks/show-BinoJyED.js +97 -0
- package/dist/npm/chunks/signin-C2jjsxz9.js +101 -0
- package/dist/npm/chunks/{source-pXVve2Cx.js → source-NuflODx3.js} +1 -1
- package/dist/npm/chunks/src-9o2Ocq8d.js +221 -0
- package/dist/npm/chunks/start-Cbx6rMrr.js +1904 -0
- package/dist/npm/chunks/states-DLMCvwes.js +3 -0
- package/dist/npm/chunks/{upload-MgPYqPyE.js → upload-C4NpM-jE.js} +1 -1
- package/dist/npm/chunks/uploads-CY4bDbaI.js +1236 -0
- package/dist/npm/chunks/{wrap-Bl0gbnFa.js → wrap-D-xTKIzj.js} +20 -20
- package/dist/npm/chunks/{zh-CN-Z5fQCb7G.js → zh-CN-yqaDHwBx.js} +53 -12
- package/dist/npm/element.js +7 -1
- package/dist/npm/headless.js +2 -2
- package/dist/npm/index.js +2 -2
- package/dist/npm/react.js +1 -1
- package/dist/npm/svelte.js +1 -1
- package/dist/npm/types/adapters/vue.d.ts +12 -0
- package/dist/npm/types/core/auth.d.ts +1 -0
- package/dist/npm/types/core/client.d.ts +5 -1
- package/dist/npm/types/core/types.d.ts +19 -4
- package/dist/npm/vue.js +5 -1
- package/package.json +4 -1
- package/dist/npm/chunks/Checklist-CnlfeSbc.js +0 -282
- package/dist/npm/chunks/Composer-B1bBVszY.js +0 -725
- package/dist/npm/chunks/Panel-F37vIL1K.js +0 -1206
- package/dist/npm/chunks/TaskFields-fmy6_HtK.js +0 -289
- package/dist/npm/chunks/ThreadCard-D51slKST.js +0 -1113
- package/dist/npm/chunks/Viewer-BOBadqmC.js +0 -111
- package/dist/npm/chunks/card-bits-CAnzrqx3.js +0 -53
- package/dist/npm/chunks/late-words-B2bmZceJ.js +0 -12
- package/dist/npm/chunks/show-BgVC8gWY.js +0 -97
- package/dist/npm/chunks/signin-Dd1rb2BP.js +0 -75
- package/dist/npm/chunks/src-BTMy4Gyc.js +0 -208
- package/dist/npm/chunks/start-DtVlpt7p.js +0 -1878
- package/dist/npm/chunks/states-sfTbjZz8.js +0 -3
- package/dist/npm/chunks/uploads-D49mywwz.js +0 -1146
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { _ as e, c as t, d as n, f as r, m as i, u as a } from "./i18n-Mgs9VOuk.js";
|
|
2
|
+
import { A as o, _ as s, c } from "./start-Cbx6rMrr.js";
|
|
3
3
|
// src/ui/MarkupEditor.tsx
|
|
4
|
-
c(".ck-markup{z-index:calc(var(--ck-z) + 2);-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);background:#0a0a0c4d;flex-direction:column;justify-content:center;align-items:center;gap:12px;padding:16px;display:flex;position:fixed;top:0;bottom:0;left:0;right:0}.ck-markup canvas{border-radius:var(--ck-radius-md);cursor:crosshair;touch-action:none;background:#fff;max-width:min(100%,1100px);max-height:calc(100dvh - 110px);box-shadow:0 0 0 1px #0000000d,0 20px 50px #00000040}.ck-label-box .ck-input{width:200px;font-weight:600}.ck-markup .ck-markup-tools{background:var(--ck-bg);border-radius:var(--ck-radius-pill);max-width:100%;box-shadow:var(--ck-shadow);border:1px solid #0000;flex-wrap:wrap;justify-content:center;align-items:center;gap:4px;padding:4px;display:flex}.ck-markup .ck-markup-group{align-items:center;gap:4px;padding:0 4px;display:flex}.ck-markup .ck-markup-group+.ck-markup-group{border-inline-start:1px solid var(--ck-hairline);margin-inline-start:4px;padding-inline-start:8px}.ck-markup .ck-tool{border-radius:var(--ck-radius-pill);width:32px;height:32px;color:var(--ck-text-muted);transition:background-color var(--ck-fast), color var(--ck-fast), scale var(--ck-fast) ease-out;background:0 0;border:0;place-items:center;padding:0;display:grid}.ck-markup .ck-tool[aria-pressed=true]{background:var(--ck-accent-soft);color:var(--ck-accent-text)}.ck-markup .ck-tool:active,.ck-markup .ck-icon-btn:active:not([aria-disabled=true]){scale:.96}.ck-markup .ck-dot{width:16px;height:16px;box-shadow:inset 0 0 0 1px var(--ck-hairline);border-radius:50%;display:block}.ck-markup .ck-tool[aria-pressed=true] .ck-dot{box-shadow:0 0 0 2px var(--ck-bg), 0 0 0 4px currentColor}.ck-markup .ck-width{gap:8px;width:152px}.ck-markup .ck-width input{min-width:0;accent-color:var(--ck-accent
|
|
4
|
+
c(".ck-markup{z-index:calc(var(--ck-z) + 2);-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);background:#0a0a0c4d;flex-direction:column;justify-content:center;align-items:center;gap:12px;padding:16px;display:flex;position:fixed;top:0;bottom:0;left:0;right:0}.ck-markup canvas{border-radius:var(--ck-radius-md);cursor:crosshair;touch-action:none;background:#fff;max-width:min(100%,1100px);max-height:calc(100dvh - 110px);box-shadow:0 0 0 1px #0000000d,0 20px 50px #00000040}.ck-label-box .ck-input{width:200px;font-weight:600}.ck-markup .ck-markup-tools{background:var(--ck-bg);border-radius:var(--ck-radius-pill);max-width:100%;box-shadow:var(--ck-shadow);border:1px solid #0000;flex-wrap:wrap;justify-content:center;align-items:center;gap:4px;padding:4px;display:flex}.ck-markup .ck-markup-group{align-items:center;gap:4px;padding:0 4px;display:flex}.ck-markup .ck-markup-group+.ck-markup-group{border-inline-start:1px solid var(--ck-hairline);margin-inline-start:4px;padding-inline-start:8px}.ck-markup .ck-tool{border-radius:var(--ck-radius-pill);width:32px;height:32px;color:var(--ck-text-muted);transition:background-color var(--ck-fast), color var(--ck-fast), scale var(--ck-fast) ease-out;background:0 0;border:0;place-items:center;padding:0;display:grid}.ck-markup .ck-tool[aria-pressed=true]{background:var(--ck-accent-soft);color:var(--ck-accent-text)}.ck-markup .ck-tool:active,.ck-markup .ck-icon-btn:active:not([aria-disabled=true]){scale:.96}.ck-markup .ck-dot{width:16px;height:16px;box-shadow:inset 0 0 0 1px var(--ck-hairline);border-radius:50%;display:block}.ck-markup .ck-tool[aria-pressed=true] .ck-dot{box-shadow:0 0 0 2px var(--ck-bg), 0 0 0 4px currentColor}.ck-markup .ck-width{gap:8px;width:152px}.ck-markup .ck-width input{min-width:0;accent-color:var(--ck-accent);cursor:pointer;flex:1}.ck-markup .ck-width span{width:32px;font-size:var(--ck-fs-sm);color:var(--ck-text-muted);font-variant-numeric:tabular-nums;text-align:end;flex:none}.ck-markup .ck-btn-group{display:inline-flex}.ck-markup .ck-icon-btn{border:1px solid var(--ck-control);background:var(--ck-bg);width:32px;height:32px;color:var(--ck-text);transition:background-color var(--ck-fast), scale var(--ck-fast) ease-out;place-items:center;padding:0;display:grid}.ck-markup .ck-icon-btn+.ck-icon-btn{margin-inline-start:-1px}.ck-markup .ck-icon-btn:first-child:not(:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-top-left-radius:var(--ck-radius-sm);border-bottom-left-radius:var(--ck-radius-sm)}.ck-markup .ck-icon-btn:first-child:not(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-top-left-radius:var(--ck-radius-sm);border-bottom-left-radius:var(--ck-radius-sm)}.ck-markup .ck-icon-btn:first-child:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:var(--ck-radius-sm);border-bottom-right-radius:var(--ck-radius-sm)}.ck-markup .ck-icon-btn:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:var(--ck-radius-sm);border-bottom-right-radius:var(--ck-radius-sm)}.ck-markup .ck-icon-btn:last-child:not(:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-top-right-radius:var(--ck-radius-sm);border-bottom-right-radius:var(--ck-radius-sm)}.ck-markup .ck-icon-btn:last-child:not(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-top-right-radius:var(--ck-radius-sm);border-bottom-right-radius:var(--ck-radius-sm)}.ck-markup .ck-icon-btn:last-child:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:var(--ck-radius-sm);border-bottom-left-radius:var(--ck-radius-sm)}.ck-markup .ck-icon-btn:last-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:var(--ck-radius-sm);border-bottom-left-radius:var(--ck-radius-sm)}.ck-markup .ck-icon-btn:focus-visible{z-index:1;position:relative}.ck-markup .ck-icon-btn[aria-disabled=true]{opacity:.5;cursor:default}.ck-markup .ck-icon-btn.ck-primary{border-color:var(--ck-accent);background:var(--ck-accent);color:var(--ck-accent-ink);position:relative}.ck-markup .ck-label-box{z-index:1;border-radius:var(--ck-radius-md);background:var(--ck-bg);box-shadow:var(--ck-shadow);border:1px solid #0000;align-items:center;gap:4px;padding:4px;display:flex;position:fixed}.ck-markup .ck-label-box .ck-input{border-radius:var(--ck-radius-sm);height:32px}.ck-markup .ck-label-box .ck-chip{flex:none;height:32px}@media (hover:hover){.ck-markup .ck-icon-btn:hover:not([aria-disabled=true]):not(.ck-primary){background:var(--ck-bg-hover)}.ck-markup .ck-tool:hover{background:var(--ck-bg-hover);color:var(--ck-text)}}@media (forced-colors:active){.ck-markup .ck-tool[aria-pressed=true]{color:highlighttext;background:highlight}}@media (pointer:coarse){.ck-markup .ck-tool,.ck-markup .ck-icon-btn{width:44px;height:44px}}@media (max-width:520px){.ck-markup .ck-markup-tools{border-radius:var(--ck-radius)}}");
|
|
5
5
|
var l = /* @__PURE__ */ new WeakSet(), u = [
|
|
6
6
|
"pen",
|
|
7
7
|
"line",
|
|
@@ -56,7 +56,7 @@ function h({ d: e }) {
|
|
|
56
56
|
});
|
|
57
57
|
}
|
|
58
58
|
function g({ image: s, onDone: c, onCancel: g }) {
|
|
59
|
-
let b = i(null), [x, S] =
|
|
59
|
+
let b = i(null), [x, S] = e(null), [C, w] = e("pen"), [T, E] = e(d[0]), [D, O] = e(3), [k, A] = e({
|
|
60
60
|
steps: [[]],
|
|
61
61
|
at: 0
|
|
62
62
|
}), j = k.steps[k.at], M = (e) => A((t) => ({
|
|
@@ -68,8 +68,13 @@ function g({ image: s, onDone: c, onCancel: g }) {
|
|
|
68
68
|
})), P = () => A((e) => ({
|
|
69
69
|
...e,
|
|
70
70
|
at: Math.min(e.steps.length - 1, e.at + 1)
|
|
71
|
-
})), F = i(null), [I, L] =
|
|
72
|
-
|
|
71
|
+
})), F = i(null), [I, L] = e(null), R = i(null), z = i(null);
|
|
72
|
+
r(() => {
|
|
73
|
+
let e = z.current?.getRootNode()?.activeElement ?? document.activeElement;
|
|
74
|
+
return () => {
|
|
75
|
+
e instanceof HTMLElement && e.isConnected && e.focus({ preventScroll: !0 });
|
|
76
|
+
};
|
|
77
|
+
}, []), r(() => (R.current ?? z.current)?.focus({ preventScroll: !0 }), [!!I]);
|
|
73
78
|
let B = () => {
|
|
74
79
|
let e = I?.text.trim().slice(0, 500);
|
|
75
80
|
I && e && M([...j, {
|
|
@@ -80,7 +85,7 @@ function g({ image: s, onDone: c, onCancel: g }) {
|
|
|
80
85
|
width: _(b.current, D)
|
|
81
86
|
}]), z.current?.focus({ preventScroll: !0 }), L(null);
|
|
82
87
|
};
|
|
83
|
-
|
|
88
|
+
n(() => {
|
|
84
89
|
let e = !0, t = null;
|
|
85
90
|
return createImageBitmap(s).then((n) => e ? S(t = n) : n.close()), () => {
|
|
86
91
|
if (e = !1, t) {
|
|
@@ -88,7 +93,7 @@ function g({ image: s, onDone: c, onCancel: g }) {
|
|
|
88
93
|
S((t) => t === e ? null : t), l.add(e), e.close();
|
|
89
94
|
}
|
|
90
95
|
};
|
|
91
|
-
}, [s]),
|
|
96
|
+
}, [s]), n(() => V(), [x, j]);
|
|
92
97
|
let V = (e) => {
|
|
93
98
|
let t = b.current;
|
|
94
99
|
if (!t || !x || l.has(x)) return;
|
|
@@ -141,7 +146,7 @@ function g({ image: s, onDone: c, onCancel: g }) {
|
|
|
141
146
|
tabIndex: -1,
|
|
142
147
|
role: "dialog",
|
|
143
148
|
"aria-modal": "true",
|
|
144
|
-
"aria-label":
|
|
149
|
+
"aria-label": t("markup"),
|
|
145
150
|
"data-commentkit-ui": !0,
|
|
146
151
|
onKeyDown: (e) => {
|
|
147
152
|
if (e.key === "Tab") {
|
|
@@ -156,34 +161,34 @@ function g({ image: s, onDone: c, onCancel: g }) {
|
|
|
156
161
|
/* @__PURE__ */ a("div", {
|
|
157
162
|
class: "ck-markup-tools",
|
|
158
163
|
role: "group",
|
|
159
|
-
"aria-label":
|
|
164
|
+
"aria-label": t("markup"),
|
|
160
165
|
children: [
|
|
161
166
|
/* @__PURE__ */ a("div", {
|
|
162
167
|
class: "ck-markup-group",
|
|
163
168
|
role: "group",
|
|
164
|
-
"aria-label":
|
|
165
|
-
children: u.map((
|
|
169
|
+
"aria-label": t("markupTools"),
|
|
170
|
+
children: u.map((e) => /* @__PURE__ */ a("button", {
|
|
166
171
|
class: "ck-tool",
|
|
167
|
-
"aria-pressed": C ===
|
|
168
|
-
"aria-label":
|
|
169
|
-
title:
|
|
170
|
-
onClick: () => w(
|
|
171
|
-
children: /* @__PURE__ */ a(h, { d: p[
|
|
172
|
+
"aria-pressed": C === e,
|
|
173
|
+
"aria-label": t(`tool_${e}`),
|
|
174
|
+
title: t(`tool_${e}`),
|
|
175
|
+
onClick: () => w(e),
|
|
176
|
+
children: /* @__PURE__ */ a(h, { d: p[e] })
|
|
172
177
|
}))
|
|
173
178
|
}),
|
|
174
179
|
/* @__PURE__ */ a("div", {
|
|
175
180
|
class: "ck-markup-group",
|
|
176
181
|
role: "group",
|
|
177
|
-
"aria-label":
|
|
178
|
-
children: d.map((
|
|
182
|
+
"aria-label": t("markupColors"),
|
|
183
|
+
children: d.map((e, n) => /* @__PURE__ */ a("button", {
|
|
179
184
|
class: "ck-tool",
|
|
180
|
-
"aria-pressed": T ===
|
|
181
|
-
"aria-label":
|
|
182
|
-
title:
|
|
183
|
-
onClick: () => E(
|
|
185
|
+
"aria-pressed": T === e,
|
|
186
|
+
"aria-label": t(f[n]),
|
|
187
|
+
title: t(f[n]),
|
|
188
|
+
onClick: () => E(e),
|
|
184
189
|
children: /* @__PURE__ */ a("span", {
|
|
185
190
|
class: "ck-dot",
|
|
186
|
-
style: { background:
|
|
191
|
+
style: { background: e }
|
|
187
192
|
})
|
|
188
193
|
}))
|
|
189
194
|
}),
|
|
@@ -195,22 +200,22 @@ function g({ image: s, onDone: c, onCancel: g }) {
|
|
|
195
200
|
max: 12,
|
|
196
201
|
step: 1,
|
|
197
202
|
value: D,
|
|
198
|
-
"aria-label":
|
|
203
|
+
"aria-label": t("markupSize"),
|
|
199
204
|
onInput: (e) => O(Number(e.target.value))
|
|
200
205
|
}), /* @__PURE__ */ a("span", { children: [D, "px"] })]
|
|
201
206
|
}),
|
|
202
207
|
/* @__PURE__ */ a("div", {
|
|
203
208
|
class: "ck-markup-group",
|
|
204
209
|
role: "group",
|
|
205
|
-
"aria-label":
|
|
210
|
+
"aria-label": t("markupHistory"),
|
|
206
211
|
children: /* @__PURE__ */ a("span", {
|
|
207
212
|
class: "ck-btn-group",
|
|
208
213
|
children: [
|
|
209
214
|
/* @__PURE__ */ a("button", {
|
|
210
215
|
class: "ck-icon-btn",
|
|
211
216
|
"aria-disabled": k.at === 0 || void 0,
|
|
212
|
-
"aria-label":
|
|
213
|
-
title: `${
|
|
217
|
+
"aria-label": t("undo"),
|
|
218
|
+
title: `${t("undo")} (${v()} Z)`,
|
|
214
219
|
"aria-keyshortcuts": "Meta+Z",
|
|
215
220
|
onClick: N,
|
|
216
221
|
children: /* @__PURE__ */ a(h, { d: m.undo })
|
|
@@ -218,8 +223,8 @@ function g({ image: s, onDone: c, onCancel: g }) {
|
|
|
218
223
|
/* @__PURE__ */ a("button", {
|
|
219
224
|
class: "ck-icon-btn",
|
|
220
225
|
"aria-disabled": k.at === k.steps.length - 1 || void 0,
|
|
221
|
-
"aria-label":
|
|
222
|
-
title: `${
|
|
226
|
+
"aria-label": t("redo"),
|
|
227
|
+
title: `${t("redo")} (${v()} Shift Z)`,
|
|
223
228
|
"aria-keyshortcuts": "Meta+Shift+Z",
|
|
224
229
|
onClick: P,
|
|
225
230
|
children: /* @__PURE__ */ a(h, { d: m.redo })
|
|
@@ -227,8 +232,8 @@ function g({ image: s, onDone: c, onCancel: g }) {
|
|
|
227
232
|
/* @__PURE__ */ a("button", {
|
|
228
233
|
class: "ck-icon-btn",
|
|
229
234
|
"aria-disabled": !j.length || void 0,
|
|
230
|
-
"aria-label":
|
|
231
|
-
title:
|
|
235
|
+
"aria-label": t("clearAll"),
|
|
236
|
+
title: t("clearAll"),
|
|
232
237
|
onClick: () => j.length && M([]),
|
|
233
238
|
children: /* @__PURE__ */ a(h, { d: m.clear })
|
|
234
239
|
})
|
|
@@ -241,15 +246,15 @@ function g({ image: s, onDone: c, onCancel: g }) {
|
|
|
241
246
|
class: "ck-btn-group",
|
|
242
247
|
children: [/* @__PURE__ */ a("button", {
|
|
243
248
|
class: "ck-icon-btn",
|
|
244
|
-
"aria-label":
|
|
245
|
-
title: `${
|
|
249
|
+
"aria-label": t("cancel"),
|
|
250
|
+
title: `${t("cancel")} (Esc)`,
|
|
246
251
|
onClick: g,
|
|
247
252
|
children: /* @__PURE__ */ a(h, { d: m.cancel })
|
|
248
253
|
}), /* @__PURE__ */ a("button", {
|
|
249
254
|
class: "ck-icon-btn ck-primary",
|
|
250
255
|
"aria-disabled": !j.length && !I?.text.trim() || void 0,
|
|
251
|
-
"aria-label":
|
|
252
|
-
title: !j.length && !I?.text.trim() ?
|
|
256
|
+
"aria-label": t("markupDone"),
|
|
257
|
+
title: !j.length && !I?.text.trim() ? t("markupEmpty") : t("markupDone"),
|
|
253
258
|
onClick: () => (j.length || I?.text.trim()) && K(),
|
|
254
259
|
children: /* @__PURE__ */ a(h, { d: m.save })
|
|
255
260
|
})]
|
|
@@ -259,6 +264,8 @@ function g({ image: s, onDone: c, onCancel: g }) {
|
|
|
259
264
|
}),
|
|
260
265
|
/* @__PURE__ */ a("canvas", {
|
|
261
266
|
ref: b,
|
|
267
|
+
role: "img",
|
|
268
|
+
"aria-label": t("markup"),
|
|
262
269
|
onPointerDown: U,
|
|
263
270
|
onPointerMove: W,
|
|
264
271
|
onPointerUp: G
|
|
@@ -271,8 +278,8 @@ function g({ image: s, onDone: c, onCancel: g }) {
|
|
|
271
278
|
class: "ck-input",
|
|
272
279
|
maxLength: 500,
|
|
273
280
|
value: I.text,
|
|
274
|
-
placeholder:
|
|
275
|
-
"aria-label":
|
|
281
|
+
placeholder: t("markupTextPrompt"),
|
|
282
|
+
"aria-label": t("markupTextPrompt"),
|
|
276
283
|
style: { color: T },
|
|
277
284
|
onInput: (e) => L({
|
|
278
285
|
...I,
|
|
@@ -285,7 +292,7 @@ function g({ image: s, onDone: c, onCancel: g }) {
|
|
|
285
292
|
class: "ck-chip ck-primary",
|
|
286
293
|
onMouseDown: (e) => e.preventDefault(),
|
|
287
294
|
onClick: B,
|
|
288
|
-
children:
|
|
295
|
+
children: t("markupTextAdd")
|
|
289
296
|
})]
|
|
290
297
|
}) : null
|
|
291
298
|
]
|