@commentkit/comment-kit 1.0.0-beta.0 → 1.0.0-beta.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 (49) hide show
  1. package/CHANGELOG.md +63 -0
  2. package/README.md +102 -8
  3. package/SECURITY.md +7 -2
  4. package/dist/npm/chunks/Guest-CKoV6pEK.js +157 -0
  5. package/dist/npm/chunks/MarkupEditor-DAo4qppg.js +199 -0
  6. package/dist/npm/chunks/Panel-BRBDHlGg.js +399 -0
  7. package/dist/npm/chunks/Shortcuts-CHMcrjAM.js +56 -0
  8. package/dist/npm/chunks/ThreadCard-D8FzIxbs.js +570 -0
  9. package/dist/npm/chunks/ar-D3SPpN1T.js +195 -0
  10. package/dist/npm/chunks/{client-D1vrh_5G.js → client-D1NizpDK.js} +86 -49
  11. package/dist/npm/chunks/de-C8eC6c6f.js +187 -0
  12. package/dist/npm/chunks/es-Bczf42tm.js +187 -0
  13. package/dist/npm/chunks/extension--it1LAj-.js +54 -0
  14. package/dist/npm/chunks/extension-XfuRGu2o.js +26 -0
  15. package/dist/npm/chunks/format-Bw_tNOh9.js +524 -0
  16. package/dist/npm/chunks/fr-BaQw-v2e.js +187 -0
  17. package/dist/npm/chunks/hi-BamV-yXv.js +187 -0
  18. package/dist/npm/chunks/{html2canvas-_mjSRP3G.js → html2canvas-DfGb8yka.js} +1145 -1132
  19. package/dist/npm/chunks/it-DC14_EjN.js +187 -0
  20. package/dist/npm/chunks/ja-B1mmTN7Y.js +187 -0
  21. package/dist/npm/chunks/mount-5fFig0k6.js +1447 -0
  22. package/dist/npm/chunks/nl-BfhqUsmX.js +187 -0
  23. package/dist/npm/chunks/privacy-DLhezjyi.js +30 -0
  24. package/dist/npm/chunks/pt-BR-CEPu4W5U.js +187 -0
  25. package/dist/npm/chunks/{pusher-DRKlokR8.js → pusher-BSsQoE1K.js} +1 -1
  26. package/dist/npm/chunks/realtime-CBRW9BB3.js +34 -0
  27. package/dist/npm/chunks/report-Dh4fxd4J.js +27 -0
  28. package/dist/npm/chunks/{rolldown-runtime-VHNaYcLd.js → rolldown-runtime-Y_bBpyJl.js} +10 -3
  29. package/dist/npm/chunks/src-DujplxfI.js +517 -0
  30. package/dist/npm/chunks/zh-CN-kgqjYwHQ.js +187 -0
  31. package/dist/npm/element.js +28 -11
  32. package/dist/npm/headless.js +2 -2
  33. package/dist/npm/index.js +3 -3
  34. package/dist/npm/react.js +12 -3
  35. package/dist/npm/svelte.js +12 -3
  36. package/dist/npm/types/adapters/react.d.ts +2 -0
  37. package/dist/npm/types/adapters/svelte.d.ts +1 -1
  38. package/dist/npm/types/adapters/vue.d.ts +72 -0
  39. package/dist/npm/types/core/api.d.ts +2 -0
  40. package/dist/npm/types/core/auth.d.ts +42 -3
  41. package/dist/npm/types/core/client.d.ts +15 -1
  42. package/dist/npm/types/core/types.d.ts +31 -6
  43. package/dist/npm/types/element.d.ts +4 -1
  44. package/dist/npm/types/index.d.ts +3 -1
  45. package/dist/npm/vue.js +46 -7
  46. package/package.json +8 -2
  47. package/dist/npm/chunks/mount-Ce1MZrcm.js +0 -2485
  48. package/dist/npm/chunks/realtime-5SvAvTUU.js +0 -23
  49. package/dist/npm/chunks/src-DJjfvVsa.js +0 -330
@@ -1,5 +1,5 @@
1
1
  import { CommentKitClient, SDK_VERSION } from "./core/client.js";
2
- import type { CommentKitEvents, CommentKitOptions, Session } from "./core/types.js";
2
+ import { type CommentKitEvents, type CommentKitOptions, type Session } from "./core/types.js";
3
3
  export type { Anchor, Attachment, Capabilities, CaptureInput, CommentKitEvents, CommentKitOptions, Environment, InboxItem, MarkupShape, Message, Page, Person, Position, Reaction, Session, Thread, ThreadPriority, ThreadStatus, WidgetConfig, } from "./core/types.js";
4
4
  export { CommentKitError } from "./core/types.js";
5
5
  export { SDK_VERSION };
@@ -8,6 +8,8 @@ export interface CommentKit {
8
8
  show(): Promise<void>;
9
9
  /** Hide the widget. Feedback stays on the server. */
10
10
  hide(): void;
11
+ /** Show the widget and open one conversation, by id or reference ("CK-12"). */
12
+ open(thread: string): Promise<void>;
11
13
  /** Open the sign-in window. Call from a click handler. */
12
14
  signIn(): Promise<boolean>;
13
15
  signOut(): Promise<void>;
package/dist/npm/vue.js CHANGED
@@ -1,7 +1,14 @@
1
- import { t as e } from "./chunks/src-DJjfvVsa.js";
1
+ import { t as e } from "./chunks/src-DujplxfI.js";
2
2
  import { defineComponent as t, onBeforeUnmount as n, onMounted as r } from "vue";
3
3
  //#region src/adapters/vue.ts
4
- var i = t({
4
+ function i(e) {
5
+ try {
6
+ return e();
7
+ } catch (e) {
8
+ return console.warn("[CommentKit] The widget could not start.", e), null;
9
+ }
10
+ }
11
+ var a = t({
5
12
  name: "CommentKit",
6
13
  props: {
7
14
  project: {
@@ -19,14 +26,46 @@ var i = t({
19
26
  endpoint: {
20
27
  type: String,
21
28
  default: void 0
29
+ },
30
+ deploymentUrl: {
31
+ type: String,
32
+ default: void 0
33
+ },
34
+ hideOnProduction: {
35
+ type: Boolean,
36
+ default: void 0
37
+ },
38
+ theme: {
39
+ type: String,
40
+ default: void 0
41
+ },
42
+ position: {
43
+ type: String,
44
+ default: void 0
45
+ },
46
+ redact: {
47
+ type: Array,
48
+ default: void 0
49
+ },
50
+ locale: {
51
+ type: String,
52
+ default: void 0
53
+ },
54
+ auth: {
55
+ type: String,
56
+ default: void 0
57
+ },
58
+ shortcuts: {
59
+ type: Boolean,
60
+ default: void 0
22
61
  }
23
62
  },
24
63
  setup(t) {
25
- let i = null;
26
- return r(() => i = e({ ...t })), n(() => i?.destroy()), () => null;
64
+ let a = null, o = () => Object.fromEntries(Object.entries(t).filter(([, e]) => e !== void 0));
65
+ return r(() => a = i(() => e(o()))), n(() => i(() => a?.destroy())), () => null;
27
66
  }
28
- }), a = { install(t, n) {
29
- typeof window < "u" && e(n);
67
+ }), o = { install(t, n) {
68
+ typeof window < "u" && i(() => e(n));
30
69
  } };
31
70
  //#endregion
32
- export { i as CommentKit, a as CommentKitPlugin, e as init };
71
+ export { a as CommentKit, o as CommentKitPlugin, e as init };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commentkit/comment-kit",
3
- "version": "1.0.0-beta.0",
3
+ "version": "1.0.0-beta.2",
4
4
  "description": "Figma-style comments for any website. Clients pin feedback with an automatic screenshot; developers see it on localhost and hand it to their AI agent.",
5
5
  "keywords": [
6
6
  "comments",
@@ -75,14 +75,20 @@
75
75
  "test:watch": "vp test watch",
76
76
  "test:coverage": "vp test run --coverage",
77
77
  "test:e2e": "playwright test",
78
+ "test:visual": "playwright test e2e/specs/visual.spec.ts --project=chromium",
79
+ "test:host-matrix": "node scripts/host-matrix.mjs",
78
80
  "typecheck": "tsc -p tsconfig.json",
79
81
  "check": "npm run typecheck && npm run test && npm run build",
80
82
  "prepublishOnly": "npm run check && node scripts/check-pack.mjs",
81
83
  "ci": "bash scripts/ci.sh",
82
- "contract:sync": "bash scripts/contract-sync.sh"
84
+ "contract:sync": "bash scripts/contract-sync.sh",
85
+ "changeset": "changeset",
86
+ "version": "changeset version",
87
+ "release:status": "changeset status --verbose"
83
88
  },
84
89
  "devDependencies": {
85
90
  "@axe-core/playwright": "4.13.0",
91
+ "@changesets/cli": "3.0.3",
86
92
  "@playwright/test": "1.64.1",
87
93
  "@types/react": "19.3.0",
88
94
  "@vitest/coverage-v8": "5.0.5",