@commentkit/comment-kit 2.1.0 → 2.1.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.
Files changed (66) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/npm/chunks/{AgentSend-pA7Ufvye.js → AgentSend-DhG61w_r.js} +3 -3
  3. package/dist/npm/chunks/{Checklist-Cn9skOYK.js → Checklist-C2q5KzWe.js} +9 -8
  4. package/dist/npm/chunks/{Composer-D7H-pzGa.js → Composer-Dj0YAYOR.js} +32 -31
  5. package/dist/npm/chunks/{DatePicker-Nta5a1xD.js → DatePicker-TshUaQHj.js} +3 -3
  6. package/dist/npm/chunks/{Guest-Bi7hlzhs.js → Guest-bAxvxjbL.js} +6 -5
  7. package/dist/npm/chunks/{MarkupEditor-WU3USeTk.js → MarkupEditor-DnViTOOC.js} +9 -8
  8. package/dist/npm/chunks/{Panel-DhAzbUbC.js → Panel-C3_NURrp.js} +287 -286
  9. package/dist/npm/chunks/{Settings-BmKqPX40.js → Settings-BM7pWbwd.js} +19 -18
  10. package/dist/npm/chunks/{Shortcuts-Bl-c0Sez.js → Shortcuts-CFDTnP5H.js} +6 -6
  11. package/dist/npm/chunks/SignInFirst-CeiPhLx0.js +36 -0
  12. package/dist/npm/chunks/{StyleEditor-D6fUnlwq.js → StyleEditor-BUZrhAY6.js} +4 -4
  13. package/dist/npm/chunks/{StylePanel-C-Gikxt1.js → StylePanel-CFp-U7qa.js} +3 -3
  14. package/dist/npm/chunks/TaskFields-C4GddJTi.js +652 -0
  15. package/dist/npm/chunks/{ThreadCard-d_3pUB5V.js → ThreadCard-CwClbMNh.js} +48 -47
  16. package/dist/npm/chunks/{Viewer-BULQsi9-.js → Viewer-oM3stPeq.js} +3 -3
  17. package/dist/npm/chunks/{agent-DHdhIJ3s.js → agent-DfUu5BAp.js} +12 -12
  18. package/dist/npm/chunks/{ar-B5UszrQp.js → ar-DtfC6tHi.js} +2 -0
  19. package/dist/npm/chunks/{card-bits-cV8GdFWX.js → card-bits-BXOCnmcQ.js} +5 -5
  20. package/dist/npm/chunks/{client-Cv8ddtuM.js → client-BqcfSisZ.js} +7 -7
  21. package/dist/npm/chunks/{confetti-B9zlyILU.js → confetti-CM1XHlrM.js} +1 -1
  22. package/dist/npm/chunks/{context-CsHnabaA.js → context-0MfEgoip.js} +1 -1
  23. package/dist/npm/chunks/{de-BE0Aaq8u.js → de-CSyX5Cz-.js} +2 -0
  24. package/dist/npm/chunks/{dpop-CwW9ifkq.js → dpop-CHzhM9ud.js} +1 -1
  25. package/dist/npm/chunks/{entrance-Bn_5M9uO.js → entrance-D7kmBxF3.js} +29 -29
  26. package/dist/npm/chunks/{es-BQviao4d.js → es-D7SAi7fz.js} +2 -0
  27. package/dist/npm/chunks/{extension-DXhz81XD.js → extension-PWW2UQD7.js} +1 -1
  28. package/dist/npm/chunks/{extension-CnQTDC1j.js → extension-TF7pIF_W.js} +2 -2
  29. package/dist/npm/chunks/{files-DLEr_wmh.js → files-BkHuRlcW.js} +2 -2
  30. package/dist/npm/chunks/{fr-C5gu6A06.js → fr-CIr2nUyu.js} +2 -0
  31. package/dist/npm/chunks/{hi-DXfQ5EvY.js → hi-BTocxOL5.js} +2 -0
  32. package/dist/npm/chunks/{i18n-Mgs9VOuk.js → i18n-CDw_D17c.js} +10 -10
  33. package/dist/npm/chunks/{icons-_C6ZWmBY.js → icons-BJLm_C0M.js} +1 -1
  34. package/dist/npm/chunks/{identify-BnQGJOa0.js → identify-CoQ4rxaI.js} +1 -1
  35. package/dist/npm/chunks/{it-BPHt13FV.js → it-DCExRo0r.js} +2 -0
  36. package/dist/npm/chunks/{ja-BkCqyKR0.js → ja-CgWpTdWi.js} +2 -0
  37. package/dist/npm/chunks/{late-words-D4Oo_yhJ.js → late-words-QnNheaDY.js} +2 -0
  38. package/dist/npm/chunks/{live-DXcxj_Af.js → live-HKWO5Tsg.js} +23 -21
  39. package/dist/npm/chunks/{nl-DZxdLLMU.js → nl-DhTQ8oJ_.js} +2 -0
  40. package/dist/npm/chunks/{page-key-UqAozdZi.js → page-key-z6o1r8Uu.js} +1 -1
  41. package/dist/npm/chunks/{pick-C20RVUas.js → pick-Bai3lMZX.js} +1 -1
  42. package/dist/npm/chunks/{pkce-BPvWoBrr.js → pkce-B6VU0dtv.js} +1 -1
  43. package/dist/npm/chunks/{pt-BR-lA9mJ05F.js → pt-BR-DrO6LV4n.js} +2 -0
  44. package/dist/npm/chunks/{report-BjUgUNnT.js → report-D-yxx5uK.js} +1 -1
  45. package/dist/npm/chunks/sheet-77GHVTpR.js +18 -0
  46. package/dist/npm/chunks/{show-BinoJyED.js → show-C3bJFyaD.js} +12 -10
  47. package/dist/npm/chunks/{signin-C2jjsxz9.js → signin-Bq2KYFLY.js} +3 -3
  48. package/dist/npm/chunks/{source-NuflODx3.js → source-W_nJm3Ym.js} +1 -1
  49. package/dist/npm/chunks/{src-9o2Ocq8d.js → src-BFu9DgRc.js} +57 -52
  50. package/dist/npm/chunks/{start-Cbx6rMrr.js → start-Dgw3mSp8.js} +524 -513
  51. package/dist/npm/chunks/{upload-C4NpM-jE.js → upload-b0nY04eW.js} +1 -1
  52. package/dist/npm/chunks/{uploads-CY4bDbaI.js → uploads-Df4mLJ9O.js} +199 -198
  53. package/dist/npm/chunks/waiting-BRtT3ZZT.js +54 -0
  54. package/dist/npm/chunks/wrap-BuWw3zAq.js +69 -0
  55. package/dist/npm/chunks/{zh-CN-yqaDHwBx.js → zh-CN-Bb8UzT1V.js} +2 -0
  56. package/dist/npm/element.js +1 -1
  57. package/dist/npm/headless.js +2 -2
  58. package/dist/npm/index.js +2 -2
  59. package/dist/npm/react.js +1 -1
  60. package/dist/npm/svelte.js +1 -1
  61. package/dist/npm/types/core/client.d.ts +2 -0
  62. package/dist/npm/vue.js +1 -1
  63. package/package.json +1 -1
  64. package/dist/npm/chunks/SignInFirst-CmGvSYkQ.js +0 -35
  65. package/dist/npm/chunks/TaskFields-CaKi523b.js +0 -617
  66. package/dist/npm/chunks/wrap-D-xTKIzj.js +0 -69
@@ -1,10 +1,10 @@
1
- import { c as e } from "./start-Cbx6rMrr.js";
1
+ import { t as e } from "./sheet-77GHVTpR.js";
2
2
  // src/ui/entrance.ts
3
3
  e(".ck-ring{position:fixed;z-index:var(--ck-z);border-radius:var(--ck-radius-pill);outline:2px solid var(--ck-accent);pointer-events:none;opacity:0}.ck-sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}");
4
4
  var t = 140, n = 180, r = 420, i = 500, a = 1500, o = "cubic-bezier(0.22, 1, 0.36, 1)";
5
- function s(e, t, n) {
5
+ function s(e, t, n, r = !1) {
6
6
  try {
7
- return c(e, t, n);
7
+ return c(e, t, n, r);
8
8
  } catch {
9
9
  return e.dataset.entering = "done", {
10
10
  stop() {},
@@ -12,28 +12,28 @@ function s(e, t, n) {
12
12
  };
13
13
  }
14
14
  }
15
- function c(e, t, n) {
16
- let r = e.querySelector(".ck-bar") ?? e, i = matchMedia("(prefers-reduced-motion: reduce)").matches, s = e.getBoundingClientRect(), c = `translate(${Math.round(innerWidth / 2 - (s.left + s.width / 2))}px, ${Math.round(innerHeight * .4 - (s.top + s.height / 2))}px)`;
15
+ function c(e, t, n, r) {
16
+ let i = e.querySelector(".ck-bar") ?? e, s = matchMedia("(prefers-reduced-motion: reduce)").matches, c = e.getBoundingClientRect(), l = `translate(${Math.round(innerWidth / 2 - (c.left + c.width / 2))}px, ${Math.round(innerHeight * .4 - (c.top + c.height / 2))}px)`;
17
17
  e.dataset.entering = "run";
18
- let l = i ? e.animate([{ opacity: 0 }, { opacity: 1 }], {
18
+ let u = s || r ? e.animate([{ opacity: 0 }, { opacity: 1 }], {
19
19
  duration: 140,
20
20
  easing: "ease-out"
21
21
  }) : e.animate([
22
22
  {
23
23
  offset: 0,
24
24
  opacity: 0,
25
- transform: c,
25
+ transform: l,
26
26
  easing: "ease-out"
27
27
  },
28
28
  {
29
29
  offset: 140 / 740,
30
30
  opacity: 1,
31
- transform: c
31
+ transform: l
32
32
  },
33
33
  {
34
34
  offset: 320 / 740,
35
35
  opacity: 1,
36
- transform: c,
36
+ transform: l,
37
37
  easing: o
38
38
  },
39
39
  {
@@ -41,38 +41,38 @@ function c(e, t, n) {
41
41
  opacity: 1,
42
42
  transform: "none"
43
43
  }
44
- ], { duration: 740 }), u = null, d = null, f, p = new Promise((e) => f = e), m = !1, h = (t) => {
45
- if (!m) {
46
- m = !0;
47
- for (let [e, t] of _) removeEventListener(e, t, !0);
48
- t && l.finish(), d?.cancel(), u?.remove(), e.dataset.entering = "done", f();
44
+ ], { duration: 740 }), d = null, f = null, p, m = new Promise((e) => p = e), h = !1, g = (t) => {
45
+ if (!h) {
46
+ h = !0;
47
+ for (let [e, t] of v) removeEventListener(e, t, !0);
48
+ t && u.finish(), f?.cancel(), d?.remove(), e.dataset.entering = "done", p();
49
49
  }
50
- }, g = !1, _ = [
51
- ["pointerdown", (t) => t.composedPath().includes(e) ? (g = !0, l.pause(), d?.pause()) : h(!0)],
52
- ["pointerup", () => g && setTimeout(() => h(!0))],
53
- ["pointercancel", () => g && h(!0)],
50
+ }, _ = !1, v = [
51
+ ["pointerdown", (t) => t.composedPath().includes(e) ? (_ = !0, u.pause(), f?.pause()) : g(!0)],
52
+ ["pointerup", () => _ && setTimeout(() => g(!0))],
53
+ ["pointercancel", () => _ && g(!0)],
54
54
  ["keydown", (e) => {
55
55
  let t = e;
56
- !t.repeat && !/^(Shift|Control|Alt|Meta|OS)$/.test(t.key) && h(!0);
56
+ !t.repeat && !/^(Shift|Control|Alt|Meta|OS)$/.test(t.key) && g(!0);
57
57
  }]
58
58
  ];
59
- for (let [e, t] of _) addEventListener(e, t, !0);
60
- return l.onfinish = () => {
61
- if (m) return;
62
- let t = r.getBoundingClientRect(), n = e.getRootNode();
63
- u = document.createElement("div"), u.className = "ck-ring", u.setAttribute("aria-hidden", "true"), Object.assign(u.style, {
59
+ for (let [e, t] of v) addEventListener(e, t, !0);
60
+ return u.onfinish = () => {
61
+ if (h) return;
62
+ let t = i.getBoundingClientRect(), n = e.getRootNode();
63
+ d = document.createElement("div"), d.className = "ck-ring", d.setAttribute("aria-hidden", "true"), Object.assign(d.style, {
64
64
  left: `${t.left}px`,
65
65
  top: `${t.top}px`,
66
66
  width: `${t.width}px`,
67
67
  height: `${t.height}px`
68
- }), n.appendChild(u), d = i ? u.animate([
68
+ }), n.appendChild(d), f = s ? d.animate([
69
69
  { opacity: 1 },
70
70
  {
71
71
  opacity: 1,
72
72
  offset: a / 1800
73
73
  },
74
74
  { opacity: 0 }
75
- ], { duration: 1800 }) : u.animate([{
75
+ ], { duration: 1800 }) : d.animate([{
76
76
  opacity: 1,
77
77
  outlineOffset: "0px"
78
78
  }, {
@@ -81,10 +81,10 @@ function c(e, t, n) {
81
81
  }], {
82
82
  duration: 500,
83
83
  easing: "ease-out"
84
- }), d.onfinish = () => h(!1);
84
+ }), f.onfinish = () => g(!1);
85
85
  }, t && (e.querySelector(".ck-bar-btn")?.focus({ preventScroll: !0 }), n()), {
86
- stop: () => h(!0),
87
- done: p
86
+ stop: () => g(!0),
87
+ done: m
88
88
  };
89
89
  }
90
90
  export { t as FADE, n as HOLD, i as RING, a as STILL_RING, r as TRAVEL, s as enter };
@@ -442,6 +442,8 @@ var e = {
442
442
  signInToComment: "Inicia sesión para comentar",
443
443
  signInToCommentBody: "Los comentarios en {website} son para su equipo y los clientes que invita. Inicia sesión con tu cuenta de CommentKit y luego haz clic en lo que debería cambiar.",
444
444
  signInToCommentBodyTouch: "Los comentarios en {website} son para su equipo y los clientes que invita. Inicia sesión con tu cuenta de CommentKit y luego toca lo que debería cambiar.",
445
+ signInToSeeComments: "Inicia sesión para ver los comentarios",
446
+ signInToSeeCommentsBody: "Los comentarios en {website} son de su equipo y de los clientes que invita. Inicia sesión con tu cuenta de CommentKit para verlos.",
445
447
  signInToSend: "Inicia sesión para enviar",
446
448
  signInToSendTitle: "Inicia sesión para enviar esto",
447
449
  signInToSendBody: "Los comentarios en este sitio vienen de su equipo y de clientes invitados. Tu texto se queda aquí mientras inicias sesión."
@@ -1,5 +1,5 @@
1
1
  import { c as e, n as t, r as n } from "./privacy-BWUGlHw5.js";
2
- import { askExtension as r } from "./extension-CnQTDC1j.js";
2
+ import { askExtension as r } from "./extension-TF7pIF_W.js";
3
3
  // src/capture/extension.ts
4
4
  var i = 8e6, a = "[data-commentkit-host]", o = "#d4d4d8";
5
5
  function s(n = [], r = !1) {
@@ -1,5 +1,5 @@
1
- import { b as e } from "./client-Cv8ddtuM.js";
2
- import { t } from "./pkce-BPvWoBrr.js";
1
+ import { b as e } from "./client-BqcfSisZ.js";
2
+ import { t } from "./pkce-B6VU0dtv.js";
3
3
  // src/core/extension.ts
4
4
  var n = "commentkit:ext-request", r = "The CommentKit extension did not answer.", i = null, a = /* @__PURE__ */ new Map();
5
5
  function o() {
@@ -1,5 +1,5 @@
1
- import { a as e, c as t, n, r } from "./i18n-Mgs9VOuk.js";
2
- import { t as i } from "./late-words-D4Oo_yhJ.js";
1
+ import { a as e, c as t, n, r } from "./i18n-CDw_D17c.js";
2
+ import { t as i } from "./late-words-QnNheaDY.js";
3
3
  // src/core/contract-lists.ts
4
4
  var a = [
5
5
  "👍",
@@ -442,6 +442,8 @@ var e = {
442
442
  signInToComment: "Connectez-vous pour commenter",
443
443
  signInToCommentBody: "Les commentaires sur {website} sont réservés à son équipe et aux clients qu’elle invite. Connectez-vous avec votre compte CommentKit, puis cliquez sur l’endroit à modifier.",
444
444
  signInToCommentBodyTouch: "Les commentaires sur {website} sont réservés à son équipe et aux clients qu’elle invite. Connectez-vous avec votre compte CommentKit, puis touchez l’endroit à modifier.",
445
+ signInToSeeComments: "Connectez-vous pour voir les commentaires",
446
+ signInToSeeCommentsBody: "Les commentaires sur {website} viennent de son équipe et des clients qu’elle invite. Connectez-vous avec votre compte CommentKit pour les voir.",
445
447
  signInToSend: "Se connecter pour envoyer",
446
448
  signInToSendTitle: "Connectez-vous pour envoyer ceci",
447
449
  signInToSendBody: "Les commentaires sur ce site viennent de son équipe et de clients invités. Votre texte reste ici pendant la connexion."
@@ -442,6 +442,8 @@ var e = {
442
442
  signInToComment: "कमेंट करने के लिए साइन इन करें",
443
443
  signInToCommentBody: "{website} पर कमेंट उसकी टीम और उनके बुलाए क्लाइंट के लिए हैं। अपने CommentKit खाते से साइन इन करें, फिर उस जगह पर क्लिक करें जिसे बदलना है।",
444
444
  signInToCommentBodyTouch: "{website} पर कमेंट उसकी टीम और उनके बुलाए क्लाइंट के लिए हैं। अपने CommentKit खाते से साइन इन करें, फिर उस जगह पर टैप करें जिसे बदलना है।",
445
+ signInToSeeComments: "कमेंट देखने के लिए साइन इन करें",
446
+ signInToSeeCommentsBody: "{website} पर कमेंट उसकी टीम और उनके बुलाए क्लाइंट के हैं। उन्हें देखने के लिए अपने CommentKit खाते से साइन इन करें।",
445
447
  signInToSend: "भेजने के लिए साइन इन करें",
446
448
  signInToSendTitle: "इसे भेजने के लिए साइन इन करें",
447
449
  signInToSendBody: "इस वेबसाइट पर कमेंट उसकी टीम और बुलाए गए क्लाइंट से आते हैं। साइन इन करते समय आपका टेक्स्ट यहीं रहेगा।"
@@ -844,16 +844,16 @@ var Y = {
844
844
  "hi",
845
845
  "ar"
846
846
  ], Oe = {
847
- es: () => import("./es-BQviao4d.js"),
848
- fr: () => import("./fr-C5gu6A06.js"),
849
- de: () => import("./de-BE0Aaq8u.js"),
850
- "pt-BR": () => import("./pt-BR-lA9mJ05F.js"),
851
- it: () => import("./it-BPHt13FV.js"),
852
- nl: () => import("./nl-DZxdLLMU.js"),
853
- ja: () => import("./ja-BkCqyKR0.js"),
854
- "zh-CN": () => import("./zh-CN-yqaDHwBx.js"),
855
- hi: () => import("./hi-DXfQ5EvY.js"),
856
- ar: () => import("./ar-B5UszrQp.js")
847
+ es: () => import("./es-D7SAi7fz.js"),
848
+ fr: () => import("./fr-CIr2nUyu.js"),
849
+ de: () => import("./de-CSyX5Cz-.js"),
850
+ "pt-BR": () => import("./pt-BR-DrO6LV4n.js"),
851
+ it: () => import("./it-DCExRo0r.js"),
852
+ nl: () => import("./nl-DhTQ8oJ_.js"),
853
+ ja: () => import("./ja-CgWpTdWi.js"),
854
+ "zh-CN": () => import("./zh-CN-Bb8UzT1V.js"),
855
+ hi: () => import("./hi-BTocxOL5.js"),
856
+ ar: () => import("./ar-DtfC6tHi.js")
857
857
  }, X = /^(ar|he|iw|fa|ur|ps|yi|ckb|sd|ug|dv)(-|$)/i, Z = "en", Q = Y, $ = Promise.resolve();
858
858
  function ke(e) {
859
859
  let t = (e ?? "").trim().replace(/_/g, "-").toLowerCase();
@@ -1,4 +1,4 @@
1
- import { u as e } from "./i18n-Mgs9VOuk.js";
1
+ import { u as e } from "./i18n-CDw_D17c.js";
2
2
  // src/ui/icon-paths.ts
3
3
  var t = {
4
4
  paperclip: "M16 6l-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",
@@ -1,4 +1,4 @@
1
- import { _ as e, g as t, i as n, v as r } from "./client-Cv8ddtuM.js";
1
+ import { _ as e, g as t, i as n, v as r } from "./client-BqcfSisZ.js";
2
2
  import { t as i } from "./locale-D8Q4Q2Nt.js";
3
3
  // src/core/identify.ts
4
4
  var a = "See https://commentkit.dev/docs/identify", o = {
@@ -442,6 +442,8 @@ var e = {
442
442
  signInToComment: "Accedi per commentare",
443
443
  signInToCommentBody: "I commenti su {website} sono per il suo team e per i clienti che invita. Accedi con il tuo account CommentKit, poi fai clic sul punto da cambiare.",
444
444
  signInToCommentBodyTouch: "I commenti su {website} sono per il suo team e per i clienti che invita. Accedi con il tuo account CommentKit, poi tocca il punto da cambiare.",
445
+ signInToSeeComments: "Accedi per vedere i commenti",
446
+ signInToSeeCommentsBody: "I commenti su {website} sono del suo team e dei clienti che invita. Accedi con il tuo account CommentKit per vederli.",
445
447
  signInToSend: "Accedi per inviare",
446
448
  signInToSendTitle: "Accedi per inviarlo",
447
449
  signInToSendBody: "I commenti su questo sito arrivano dal suo team e dai clienti invitati. Il tuo testo resta qui mentre accedi."
@@ -442,6 +442,8 @@ var e = {
442
442
  signInToComment: "ログインしてコメント",
443
443
  signInToCommentBody: "{website} へのコメントは、そのチームと招待されたクライアント向けです。CommentKit アカウントでログインしてから、変更したい場所をクリックしてください。",
444
444
  signInToCommentBodyTouch: "{website} へのコメントは、そのチームと招待されたクライアント向けです。CommentKit アカウントでログインしてから、変更したい場所をタップしてください。",
445
+ signInToSeeComments: "ログインしてコメントを見る",
446
+ signInToSeeCommentsBody: "{website} のコメントは、そのチームと招待されたクライアントによるものです。表示するには CommentKit アカウントでログインしてください。",
445
447
  signInToSend: "ログインして送信",
446
448
  signInToSendTitle: "ログインして送信してください",
447
449
  signInToSendBody: "このサイトのコメントは、チームと招待されたクライアントからのものです。ログインしている間も、テキストはここに残ります。"
@@ -50,6 +50,8 @@ var t = /* @__PURE__ */ e({ LATE: () => n }), n = {
50
50
  signInToComment: "Sign in to comment",
51
51
  signInToCommentBody: "Comments on {website} are for its team and the clients they invite. Sign in with your CommentKit account, then click the spot that should change.",
52
52
  signInToCommentBodyTouch: "Comments on {website} are for its team and the clients they invite. Sign in with your CommentKit account, then tap the spot that should change.",
53
+ signInToSeeComments: "Sign in to see comments",
54
+ signInToSeeCommentsBody: "Comments on {website} are from its team and the clients they invite. Sign in with your CommentKit account to see them.",
53
55
  signInToSend: "Sign in to send",
54
56
  signInToSendTitle: "Sign in to send this",
55
57
  signInToSendBody: "Comments on this website come from its team and invited clients. Your text stays here while you sign in."
@@ -1,14 +1,14 @@
1
- import { o as e } from "./client-Cv8ddtuM.js";
1
+ import { o as e } from "./client-BqcfSisZ.js";
2
2
  import { a as t, i as n, n as r, r as i } from "./drafts-B0ctr1g9.js";
3
- import { f as a, u as o } from "./start-Cbx6rMrr.js";
3
+ import { f as a, l as o, u as s } from "./start-Dgw3mSp8.js";
4
4
  // src/ui/live.ts
5
- var s = 1500, c = 1e4;
6
- function l(e, t, n, r = Math.random) {
7
- let i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), o = (e) => a.set(e, Date.now()), l = [
5
+ var c = 1500, l = 1e4;
6
+ function u(e, t, n, r = Math.random) {
7
+ let i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), o = (e) => a.set(e, Date.now()), s = [
8
8
  e.on("thread:created", ({ thread: e }) => o(e.id)),
9
9
  e.on("thread:updated", ({ thread: e }) => o(e.id)),
10
10
  e.on("message:created", ({ message: e }) => o(e.thread_id))
11
- ], u = (t) => e.state.get().threads.some((e) => e.id === t), d = () => e.state.get().session?.realtime_key ?? null, f = (n) => t() === n.thread_id || u(n.thread_id) ? !0 : n.page_key == null ? n.page_path == null || n.page_path === h() : n.page_key === e.pageKey(), p = (r) => {
11
+ ], u = (t) => e.state.get().threads.some((e) => e.id === t), d = () => e.state.get().session?.realtime_key ?? null, f = (n) => t() === n.thread_id || u(n.thread_id) ? !0 : n.page_key == null ? n.page_path == null || n.page_path === g() : n.page_key === e.pageKey(), p = (r) => {
12
12
  i.delete(r), e.refreshThread(r), t() === r && !u(r) && n(r);
13
13
  };
14
14
  return {
@@ -19,29 +19,29 @@ function l(e, t, n, r = Math.random) {
19
19
  clearTimeout(i.get(n)), i.delete(n), e.state.set((e) => ({ threads: e.threads.filter((e) => e.id !== n) }));
20
20
  return;
21
21
  }
22
- let o = t.by ?? t.actor ?? null, l = a.get(n);
23
- o && o === d() && l !== void 0 && Date.now() - l < c || !i.has(n) && f(t) && i.set(n, setTimeout(() => p(n), Math.floor(r() * s)));
22
+ let o = t.by ?? t.actor ?? null, s = a.get(n);
23
+ o && o === d() && s !== void 0 && Date.now() - s < l || !i.has(n) && f(t) && i.set(n, setTimeout(() => p(n), Math.floor(r() * c)));
24
24
  },
25
25
  stop() {
26
26
  for (let e of i.values()) clearTimeout(e);
27
- i.clear(), l.forEach((e) => e());
27
+ i.clear(), s.forEach((e) => e());
28
28
  }
29
29
  };
30
30
  }
31
- var u = 6e4;
32
- function d(e, t) {
31
+ var d = 6e4;
32
+ function f(e, t) {
33
33
  let n = () => void 0, r = () => {
34
34
  e.state.get().session && (e.loadPageThreads().catch(n), e.inbox().catch(n), t());
35
35
  }, i = e.state.get().live, a = e.state.subscribe((e) => {
36
36
  e.live === "on" && i === "lost" && r(), i = e.live;
37
37
  }), o = 0, s = () => {
38
38
  document.hidden ? o || (o = Date.now()) : (o && Date.now() - o > 6e4 && r(), o = 0);
39
- }, c = setInterval(() => !document.hidden && e.state.get().live !== "on" && r(), u);
39
+ }, c = setInterval(() => !document.hidden && e.state.get().live !== "on" && r(), d);
40
40
  return addEventListener("online", r), document.addEventListener("visibilitychange", s), () => {
41
41
  a(), clearInterval(c), removeEventListener("online", r), document.removeEventListener("visibilitychange", s);
42
42
  };
43
43
  }
44
- function f(e, t, n, r, i, a) {
44
+ function p(e, t, n, r, i, a) {
45
45
  if (/^[0-9a-f-]{36}$/i.test(t)) return n(t);
46
46
  let o = t.trim().toUpperCase(), s = e.state.get().threads.find((e) => e.reference.toUpperCase() === o);
47
47
  if (s) return n(s.id);
@@ -54,7 +54,7 @@ function f(e, t, n, r, i, a) {
54
54
  t ? r(t.page.url, t.id, n) : i();
55
55
  }, a);
56
56
  }
57
- function p() {
57
+ function m() {
58
58
  let e = null;
59
59
  try {
60
60
  e = JSON.parse(n("commentkit:pending-compose") ?? "null");
@@ -62,16 +62,18 @@ function p() {
62
62
  n("commentkit:pending-compose", null), e?.draft?.anchor && n(a, "1");
63
63
  let t = i("commentkit:pending-thread");
64
64
  i("commentkit:pending-thread", null);
65
- let r = Number(n(o));
66
- n(o, null);
67
- let s = Date.now() - r < 6e5;
65
+ let r = (e) => {
66
+ let t = Number(n(e));
67
+ return n(e, null), Date.now() - t < 6e5;
68
+ };
68
69
  return {
69
70
  ...e?.draft?.anchor ? e : null,
70
71
  thread: t,
71
- comment: s
72
+ comment: r(o),
73
+ inbox: r(s)
72
74
  };
73
75
  }
74
- function m(e, a) {
76
+ function h(e, a) {
75
77
  t(a);
76
78
  let o = r(e), s = o.slice(0, o.indexOf("~") + 1);
77
79
  t(null);
@@ -84,8 +86,8 @@ function m(e, a) {
84
86
  "guest-details"
85
87
  ].forEach((e) => n(`commentkit:${e}`, null)), i("commentkit:pending-thread", null);
86
88
  }
87
- function h() {
89
+ function g() {
88
90
  let t = new URL(e());
89
91
  return t.pathname + (t.hash.startsWith("#/") ? t.hash : "");
90
92
  }
91
- export { d as catchUp, p as comeBack, m as forgetPerson, l as liveUpdates, f as openReference };
93
+ export { f as catchUp, m as comeBack, h as forgetPerson, u as liveUpdates, p as openReference };
@@ -442,6 +442,8 @@ var e = {
442
442
  signInToComment: "Log in om te reageren",
443
443
  signInToCommentBody: "Reacties op {website} zijn voor het team en de klanten die het uitnodigt. Log in met je CommentKit-account en klik daarna op de plek die moet veranderen.",
444
444
  signInToCommentBodyTouch: "Reacties op {website} zijn voor het team en de klanten die het uitnodigt. Log in met je CommentKit-account en tik daarna op de plek die moet veranderen.",
445
+ signInToSeeComments: "Log in om reacties te zien",
446
+ signInToSeeCommentsBody: "Reacties op {website} komen van het team en de klanten die het uitnodigt. Log in met je CommentKit-account om ze te zien.",
445
447
  signInToSend: "Log in om te versturen",
446
448
  signInToSendTitle: "Log in om dit te versturen",
447
449
  signInToSendBody: "Reacties op deze website komen van het team en uitgenodigde klanten. Je tekst blijft hier staan terwijl je inlogt."
@@ -1,4 +1,4 @@
1
- import { u as e } from "./client-Cv8ddtuM.js";
1
+ import { u as e } from "./client-BqcfSisZ.js";
2
2
  // src/core/page-key.ts
3
3
  var t = [
4
4
  "gclid",
@@ -105,7 +105,7 @@ function _() {
105
105
  }
106
106
  var v = null, y = !1;
107
107
  function b() {
108
- r(), !y && _() && (y = !0, import("./source-NuflODx3.js").then((e) => v = e.readSource, () => y = !1));
108
+ r(), !y && _() && (y = !0, import("./source-W_nJm3Ym.js").then((e) => v = e.readSource, () => y = !1));
109
109
  }
110
110
  function x(e) {
111
111
  let t = null;
@@ -1,4 +1,4 @@
1
- import { v as e, y as t } from "./client-Cv8ddtuM.js";
1
+ import { v as e, y as t } from "./client-BqcfSisZ.js";
2
2
  // src/core/pkce.ts
3
3
  async function n(n) {
4
4
  if (!crypto.subtle) throw new e(0, "insecure_context", "Sign-in needs this page to be on https.");
@@ -442,6 +442,8 @@ var e = {
442
442
  signInToComment: "Entre para comentar",
443
443
  signInToCommentBody: "Os comentários em {website} são para a equipe e os clientes que ela convida. Entre com sua conta CommentKit e depois clique no ponto que deve mudar.",
444
444
  signInToCommentBodyTouch: "Os comentários em {website} são para a equipe e os clientes que ela convida. Entre com sua conta CommentKit e depois toque no ponto que deve mudar.",
445
+ signInToSeeComments: "Entre para ver os comentários",
446
+ signInToSeeCommentsBody: "Os comentários em {website} são da equipe e dos clientes que ela convida. Entre com sua conta CommentKit para vê-los.",
445
447
  signInToSend: "Entrar para enviar",
446
448
  signInToSendTitle: "Entre para enviar isto",
447
449
  signInToSendBody: "Os comentários neste site vêm da equipe e de clientes convidados. Seu texto fica aqui enquanto você entra."
@@ -1,4 +1,4 @@
1
- import { d as e, i as t, n } from "./client-Cv8ddtuM.js";
1
+ import { d as e, i as t, n } from "./client-BqcfSisZ.js";
2
2
  // src/core/report.ts
3
3
  var r = 0;
4
4
  function i(r, i) {
@@ -0,0 +1,18 @@
1
+ // src/ui/sheet.ts
2
+ var e = [], t = null;
3
+ function n(n) {
4
+ t = n, n && e.forEach((e) => i(n, e));
5
+ }
6
+ function r(n) {
7
+ e.includes(n) || (e.push(n), t && i(t, n));
8
+ }
9
+ function i(e, t) {
10
+ if ("adoptedStyleSheets" in e && "replaceSync" in CSSStyleSheet.prototype) {
11
+ let n = new CSSStyleSheet();
12
+ n.replaceSync(t), e.adoptedStyleSheets = [...e.adoptedStyleSheets, n];
13
+ } else {
14
+ let n = document.createElement("style");
15
+ n.textContent = t, e.insertBefore(n, e.querySelector(".ck-root"));
16
+ }
17
+ }
18
+ export { n, r as t };
@@ -1,6 +1,6 @@
1
- import { a as e, i as t, n, o as r, r as i } from "./src-9o2Ocq8d.js";
2
- import { i as a, l as o, v as s } from "./client-Cv8ddtuM.js";
3
- import { n as c } from "./page-key-UqAozdZi.js";
1
+ import { a as e, i as t, n, o as r, r as i } from "./src-BFu9DgRc.js";
2
+ import { i as a, l as o, v as s } from "./client-BqcfSisZ.js";
3
+ import { n as c } from "./page-key-z6o1r8Uu.js";
4
4
  // src/core/show.ts
5
5
  var l;
6
6
  function u() {
@@ -23,10 +23,10 @@ async function m(i, a, o, s, m, v, y = () => void 0) {
23
23
  if (x && !i.auth.hasSession() && !e()) return y(), null;
24
24
  if (!a.enabled && !b && !x) return null;
25
25
  c.ignore(a.pages?.ignored_query_params);
26
- let S = n(() => import("./start-Cbx6rMrr.js").then((e) => e.t)), C = S.then((e) => e.setLocale(i.options.locale));
27
- if (S.catch(() => void 0), C.catch(() => void 0), await i.auth.completeRedirect().catch(() => !1), e() && await import("./extension-CnQTDC1j.js").then((e) => e.extensionHandoff(i.auth)).catch(() => !1), v && a.enabled && await import("./identify-BnQGJOa0.js").then((e) => e.identify(i, v, null, !0)).catch(() => !1), await i.loadSession().catch(() => null), i.state.get().session || h(i.options.project), x && !p(i)) return y(), null;
26
+ let S = n(() => import("./start-Dgw3mSp8.js").then((e) => e.t)), C = S.then((e) => e.setLocale(i.options.locale));
27
+ if (S.catch(() => void 0), C.catch(() => void 0), await i.auth.completeRedirect().catch(() => !1), e() && await import("./extension-TF7pIF_W.js").then((e) => e.extensionHandoff(i.auth)).catch(() => !1), v && a.enabled && await import("./identify-CoQ4rxaI.js").then((e) => e.identify(i, v, null, !0)).catch(() => !1), await i.loadSession().catch(() => null), i.state.get().session || h(i.options.project), x && !p(i)) return y(), null;
28
28
  let w = await S, { installDiagnostics: T, mountWidget: E } = w;
29
- if (x && Object.assign(w.en, (await import("./late-words-D4Oo_yhJ.js").then((e) => e.n)).LATE), await C, s()) return null;
29
+ if (x && Object.assign(w.en, (await import("./late-words-QnNheaDY.js").then((e) => e.n)).LATE), await C, s()) return null;
30
30
  let D = T({
31
31
  console: a.features.console_capture,
32
32
  network: a.features.network_capture,
@@ -39,11 +39,13 @@ async function m(i, a, o, s, m, v, y = () => void 0) {
39
39
  } catch (e) {
40
40
  throw D(), e;
41
41
  }
42
- let A = setTimeout(g, 3e4, null), j = _(i, b, m, y), M = i.state.get().config, N = i.state.subscribe((e) => {
43
- e.config && e.config !== M && c.ignore((M = e.config).pages?.ignored_query_params);
42
+ let A = setTimeout(g, 3e4, null), j = setTimeout(() => {
43
+ i.wait?.(), i.wait = void 0;
44
+ }, 1600), M = _(i, b, m, y), N = i.state.get().config, P = i.state.subscribe((e) => {
45
+ e.config && e.config !== N && c.ignore((N = e.config).pages?.ignored_query_params);
44
46
  });
45
47
  return i.emit("ready", { session: i.state.get().session }), Object.assign(() => {
46
- clearTimeout(A), j(), N();
48
+ clearTimeout(A), clearTimeout(j), i.wait?.(), M(), P();
47
49
  for (let e of [k, D]) try {
48
50
  e();
49
51
  } catch (e) {
@@ -82,7 +84,7 @@ function v(e, t) {
82
84
  console.warn(r ? `[CommentKit] The widget could not start: ${t.message} (${t.code}). See https://commentkit.dev/docs/errors#${t.code}` : "[CommentKit] The widget could not start; your page is not affected. See https://commentkit.dev/docs/troubleshooting", t), r && e.emit("error", { error: t }), (!r || t.status >= 500) && e.reportCrash(t, "start");
83
85
  }
84
86
  function y(e, t) {
85
- import("./report-BjUgUNnT.js").then((n) => n.reportStart(e, t)).catch(() => void 0);
87
+ import("./report-D-yxx5uK.js").then((n) => n.reportStart(e, t)).catch(() => void 0);
86
88
  }
87
89
  var b = "See https://commentkit.dev/docs/";
88
90
  function x(e, ...t) {
@@ -1,6 +1,6 @@
1
- import { b as e } from "./client-Cv8ddtuM.js";
2
- import { r as t } from "./page-key-UqAozdZi.js";
3
- import { t as n } from "./pkce-BPvWoBrr.js";
1
+ import { b as e } from "./client-BqcfSisZ.js";
2
+ import { r as t } from "./page-key-z6o1r8Uu.js";
3
+ import { t as n } from "./pkce-B6VU0dtv.js";
4
4
  import { t as r } from "./locale-D8Q4Q2Nt.js";
5
5
  // src/core/signin.ts
6
6
  function i(e = navigator.userAgent) {
@@ -1,4 +1,4 @@
1
- import { f as e } from "./client-Cv8ddtuM.js";
1
+ import { f as e } from "./client-BqcfSisZ.js";
2
2
  // src/anchor/source.ts
3
3
  var t = /^[A-Za-z_$][\w$.-]*$/, n = /* @__PURE__ */ new Set([
4
4
  "src",