@commentkit/comment-kit 0.7.5 → 0.7.6

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 (39) hide show
  1. package/CHANGELOG.md +14 -1
  2. package/README.md +1 -1
  3. package/dist/angular.es.js +2 -2
  4. package/dist/comment-kit.es.js +3 -3
  5. package/dist/demo.es.js +2 -2
  6. package/dist/headless.es.js +2 -2
  7. package/dist/preact.es.js +2 -2
  8. package/dist/qwik.qwik.mjs +2 -2
  9. package/dist/react.es.js +2 -2
  10. package/dist/shared/{annotation-toolbar-DgqxkHy8.js → annotation-toolbar-RSrb0Nku.js} +110 -109
  11. package/dist/shared/{attachment-refresh-DRX7dKDI.js → attachment-refresh-CSTYwRW-.js} +1 -1
  12. package/dist/shared/{comment-drawing-canvas-hSdcLShI.js → comment-drawing-canvas-DbuXP54N.js} +2 -2
  13. package/dist/shared/{comment-image-lightbox-4zroOCCG.js → comment-image-lightbox-zlIGEVA-.js} +2 -2
  14. package/dist/shared/{comment-images-content-D4hTya6e.js → comment-images-content-aYbJb79_.js} +13 -13
  15. package/dist/shared/{comment-kit-core-D068rcdY.js → comment-kit-core-B0k7XsMz.js} +378 -346
  16. package/dist/shared/{comment-kit-ui-BDzNt0jv.js → comment-kit-ui-BXLJcZYQ.js} +5255 -5487
  17. package/dist/shared/{comment-screenshot-annotator-BGnu_NgP.js → comment-screenshot-annotator-ChWwYJzO.js} +2 -2
  18. package/dist/shared/{comment-screenshot-overlay-BCRmojWB.js → comment-screenshot-overlay-Bufg3rHz.js} +5 -5
  19. package/dist/shared/{dev-export-panel-CYmUKmIV.js → dev-export-panel-DAZenvgD.js} +4 -4
  20. package/dist/shared/{dev-grab-BYsCpsGI.js → dev-grab-O8q25zar.js} +2 -2
  21. package/dist/shared/{element-selector-79Oo5pit.js → element-selector-CYkwzfEr.js} +349 -347
  22. package/dist/shared/input-UPtAj0M6.js +111 -0
  23. package/dist/shared/{mount-ui-DuHk132g.js → mount-ui-BKaWBhKq.js} +4 -4
  24. package/dist/shared/{pusher-3jyUauYd.js → pusher-BUaiCkDJ.js} +1 -1
  25. package/dist/shared/{realtime-DspH16g5.js → realtime-C0Z8dXXH.js} +2 -2
  26. package/dist/shared/{screenshot-BIuEaRiu.js → screenshot-B-ZfFItT.js} +1 -1
  27. package/dist/shared/{shadow-root-3-yGIhMs.js → shadow-root-Cd3SLHyj.js} +1 -1
  28. package/dist/shared/{token-session-_Pi4fOEi.js → token-session-DplW5QDx.js} +2 -2
  29. package/dist/shared/useLabelableId-8n0QmH8N.js +154 -0
  30. package/dist/shared/{websocket-manager-CvgZSo_L.js → websocket-manager-798cRDyL.js} +2 -2
  31. package/dist/solid.es.js +2 -2
  32. package/dist/svelte.es.js +2 -2
  33. package/dist/types/core/api-client.d.ts +2 -0
  34. package/dist/types/core/comment-kit-core.d.ts +4 -2
  35. package/dist/types/core/types.d.ts +12 -5
  36. package/dist/types/core/write-access.d.ts +2 -0
  37. package/dist/vue.es.js +2 -2
  38. package/docs/api-reference.md +1 -1
  39. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  import { o as e, t, u as n } from "./button-D4GHW6oZ.js";
2
2
  import { t as r } from "./useRender-Uxk1OPK-.js";
3
- import { c as i, j as a, l as o, r as s } from "./comment-kit-ui-BDzNt0jv.js";
4
- import { n as c, r as l, t as u } from "./attachment-refresh-DRX7dKDI.js";
3
+ import { C as i, c as a, l as o, r as s } from "./comment-kit-ui-BXLJcZYQ.js";
4
+ import { n as c, r as l, t as u } from "./attachment-refresh-CSTYwRW-.js";
5
5
  import * as d from "react";
6
6
  import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
7
7
  var h = d.forwardRef(function({ ratio: t, className: n, style: r, ...i }, a) {
@@ -92,7 +92,7 @@ var x = d.forwardRef(function({ className: t, render: i, type: a, ...o }, s) {
92
92
  render: i,
93
93
  state: { slot: "attachment-trigger" }
94
94
  });
95
- }), S = () => import("./comment-image-lightbox-4zroOCCG.js"), C = 3;
95
+ }), S = () => import("./comment-image-lightbox-zlIGEVA-.js"), C = 3;
96
96
  function w(e) {
97
97
  return e.mimeType ? e.mimeType.startsWith("image/") : e.type === "screenshot" || e.type === "drawing" || e.thumbnail ? !0 : /^data:image\//i.test(e.url) || /\.(png|jpe?g|webp|gif|avif|svg)(?:[?#]|$)/i.test(e.filename ?? e.url);
98
98
  }
@@ -109,8 +109,8 @@ function T(e) {
109
109
  }
110
110
  }
111
111
  var E = d.memo(function({ images: e }) {
112
- let [t, n] = d.useState(!1), [r, i] = d.useState(0), o = d.useRef(null), s = e.filter(w), c = e.filter((e) => !w(e)), l = s.length > C ? s.length - C : 0, u = s.slice(0, C), h = d.useCallback((e) => {
113
- i(e), n(!0);
112
+ let [t, n] = d.useState(!1), [r, a] = d.useState(0), o = d.useRef(null), s = e.filter(w), c = e.filter((e) => !w(e)), l = s.length > C ? s.length - C : 0, u = s.slice(0, C), h = d.useCallback((e) => {
113
+ a(e), n(!0);
114
114
  }, []);
115
115
  return e.length === 0 ? null : /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ m("div", {
116
116
  className: "ck-comment-images",
@@ -125,7 +125,7 @@ var E = d.memo(function({ images: e }) {
125
125
  o.current = e, h(t);
126
126
  }
127
127
  }, e.id)), c.map((e) => /* @__PURE__ */ p(O, { file: e }, e.id))]
128
- }), /* @__PURE__ */ p(a, {
128
+ }), /* @__PURE__ */ p(i, {
129
129
  load: S,
130
130
  label: "image viewer",
131
131
  needed: t,
@@ -142,7 +142,7 @@ var E = d.memo(function({ images: e }) {
142
142
  })] });
143
143
  });
144
144
  function D({ image: e, index: t, more: n, onOpen: r }) {
145
- let a = l(e), s = e.filename ?? e.alt ?? `Image ${String(t + 1)}`;
145
+ let i = l(e), s = e.filename ?? e.alt ?? `Image ${String(t + 1)}`;
146
146
  return /* @__PURE__ */ m(g, {
147
147
  orientation: "vertical",
148
148
  children: [
@@ -151,15 +151,15 @@ function D({ image: e, index: t, more: n, onOpen: r }) {
151
151
  children: /* @__PURE__ */ p(h, {
152
152
  ratio: 1,
153
153
  className: "ck-comment-image-ratio",
154
- children: a.failed ? /* @__PURE__ */ p(u, {
155
- link: a,
154
+ children: i.failed ? /* @__PURE__ */ p(u, {
155
+ link: i,
156
156
  compact: !0
157
157
  }) : /* @__PURE__ */ p("img", {
158
158
  src: e.url,
159
159
  alt: s,
160
160
  className: "ck-comment-image",
161
- onError: a.onError
162
- }, `${e.url}:${a.attempt}`)
161
+ onError: i.onError
162
+ }, `${e.url}:${i.attempt}`)
163
163
  })
164
164
  }),
165
165
  n > 0 ? /* @__PURE__ */ m(o, {
@@ -172,7 +172,7 @@ function D({ image: e, index: t, more: n, onOpen: r }) {
172
172
  title: [
173
173
  e.type,
174
174
  e.filename,
175
- i(e.size)
175
+ a(e.size)
176
176
  ].filter(Boolean).join(" • ") || void 0,
177
177
  onClick: (e) => {
178
178
  e.stopPropagation(), r(e.currentTarget);
@@ -194,7 +194,7 @@ function O({ file: e }) {
194
194
  "aria-hidden": "true",
195
195
  children: [/* @__PURE__ */ p("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8l-6-6Z" }), /* @__PURE__ */ p("path", { d: "M14 2v6h6M8 13h8M8 17h5" })]
196
196
  }) }),
197
- /* @__PURE__ */ m(v, { children: [/* @__PURE__ */ p(y, { children: n }), /* @__PURE__ */ p(b, { children: t.refreshFailed ? "Could not refresh. Try again." : t.loading ? "Refreshing link…" : i(e.size) ?? "File" })] }),
197
+ /* @__PURE__ */ m(v, { children: [/* @__PURE__ */ p(y, { children: n }), /* @__PURE__ */ p(b, { children: t.refreshFailed ? "Could not refresh. Try again." : t.loading ? "Refreshing link…" : a(e.size) ?? "File" })] }),
198
198
  r ? /* @__PURE__ */ p(x, {
199
199
  render: /* @__PURE__ */ p("a", {
200
200
  href: r,