@commentkit/comment-kit 0.0.0-stage → 0.6.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.
- package/CHANGELOG.md +276 -0
- package/LICENSE +18 -0
- package/README.md +766 -2
- package/dist/angular/ShadowRootContext-2BrAO1qU.js +7 -0
- package/dist/angular/chunk-Cyg4N8Ue.js +11 -0
- package/dist/angular/comment-kit-ui-wEJfMh4T.js +9483 -0
- package/dist/angular/dom-ON-u4y6t.js +97 -0
- package/dist/angular/error-boundary-CxhCm8iF.js +21 -0
- package/dist/angular/limits-AEqOBweE.js +71 -0
- package/dist/angular/mount-ui-CxChSb8B.js +55 -0
- package/dist/angular/pusher-Vs-W-c8I.js +2504 -0
- package/dist/angular/realtime-CfJZMEAi.js +558 -0
- package/dist/angular/shadow-root-C7wgghDv.js +86 -0
- package/dist/angular/styles-CvndAWRF.js +2 -0
- package/dist/angular.es.js +3656 -0
- package/dist/comment-kit.es.js +3361 -0
- package/dist/core/ShadowRootContext--ArKkwbH.js +7 -0
- package/dist/core/chunk-t7YoJN_i.js +11 -0
- package/dist/core/comment-kit-ui-DjWARy4X.js +9483 -0
- package/dist/core/dom-x9svfpMk.js +223 -0
- package/dist/core/error-boundary-CN_BGsYl.js +21 -0
- package/dist/core/mount-ui-DrFjMJJu.js +55 -0
- package/dist/core/pusher-CizoY5NA.js +2504 -0
- package/dist/core/realtime-DYf6E_sN.js +278 -0
- package/dist/core/shadow-root-09zwHxly.js +86 -0
- package/dist/core/styles-D19zARBi.js +2 -0
- package/dist/core/websocket-manager-DorGPjR4.js +351 -0
- package/dist/preact/ShadowRootContext-CJWLIRy4.js +7 -0
- package/dist/preact/chunk-CZ0PdaaN.js +11 -0
- package/dist/preact/comment-kit-ui-BKi15Z4Q.js +9483 -0
- package/dist/preact/dom-BAV8grk_.js +97 -0
- package/dist/preact/error-boundary-B4-Bfy3g.js +21 -0
- package/dist/preact/limits-C3ZEKcL_.js +71 -0
- package/dist/preact/mount-ui-b9JcJQYE.js +55 -0
- package/dist/preact/pusher-BP4kCufH.js +2504 -0
- package/dist/preact/realtime-BFgP4BlB.js +558 -0
- package/dist/preact/shadow-root-DAhpHo_W.js +86 -0
- package/dist/preact/styles-Dwd4AJR8.js +2 -0
- package/dist/preact.es.js +3465 -0
- package/dist/qwik/ShadowRootContext-CTbULRKq.js +7 -0
- package/dist/qwik/chunk-CKKKzG2Q.js +11 -0
- package/dist/qwik/comment-kit-ui-CRmJhZlX.js +9483 -0
- package/dist/qwik/dom-BjJ-QroQ.js +97 -0
- package/dist/qwik/error-boundary-C4hlYQwS.js +21 -0
- package/dist/qwik/limits-DK35yjGY.js +71 -0
- package/dist/qwik/mount-ui-CaRrLb9u.js +55 -0
- package/dist/qwik/pusher-B1KgC4iB.js +2504 -0
- package/dist/qwik/realtime-DUhkZAVc.js +558 -0
- package/dist/qwik/shadow-root-tLjXys-_.js +86 -0
- package/dist/qwik/styles-BB1B91hh.js +2 -0
- package/dist/qwik.es.js +3458 -0
- package/dist/react/chunk--MHYZ-zp.js +12 -0
- package/dist/react/limits-Dflmuf1P.js +168 -0
- package/dist/react/pusher-3dki8s2l.js +2505 -0
- package/dist/react/realtime-C7h-Agwo.js +558 -0
- package/dist/react.es.js +13010 -0
- package/dist/solid/ShadowRootContext-BS6MCclL.js +7 -0
- package/dist/solid/chunk-B2NCWFvW.js +11 -0
- package/dist/solid/comment-kit-ui-Dw_67h_e.js +9483 -0
- package/dist/solid/dom-Bpw1A0oz.js +97 -0
- package/dist/solid/error-boundary-9mimpbZA.js +21 -0
- package/dist/solid/limits-B_69IbLl.js +71 -0
- package/dist/solid/mount-ui-bPWYgjmm.js +55 -0
- package/dist/solid/pusher-_RVNpj1f.js +2504 -0
- package/dist/solid/realtime-DK86zDCJ.js +558 -0
- package/dist/solid/shadow-root-D5nErAFI.js +86 -0
- package/dist/solid/styles-CtYBghRP.js +2 -0
- package/dist/solid.es.js +3446 -0
- package/dist/svelte/ShadowRootContext-DhByMr-q.js +7 -0
- package/dist/svelte/chunk-Pi70BKld.js +11 -0
- package/dist/svelte/comment-kit-ui-DhCWlEd8.js +9483 -0
- package/dist/svelte/dom-mfioQqLy.js +97 -0
- package/dist/svelte/error-boundary-C3GWI_IX.js +21 -0
- package/dist/svelte/limits-CURF22v3.js +71 -0
- package/dist/svelte/mount-ui-DtXWMEYn.js +55 -0
- package/dist/svelte/pusher-DN1BiUDw.js +2504 -0
- package/dist/svelte/realtime-zYOctwRk.js +558 -0
- package/dist/svelte/shadow-root-Cz-v-rYe.js +86 -0
- package/dist/svelte/styles-DKCGeARl.js +2 -0
- package/dist/svelte.es.js +3478 -0
- package/dist/types/adapters/bridge.d.ts +125 -0
- package/dist/types/adapters/errors.d.ts +3 -0
- package/dist/types/angular/index.d.ts +135 -0
- package/dist/types/core/agent-context.d.ts +17 -0
- package/dist/types/core/api-client.d.ts +137 -0
- package/dist/types/core/auth.d.ts +18 -0
- package/dist/types/core/comment-kit-core.d.ts +215 -0
- package/dist/types/core/comments.d.ts +43 -0
- package/dist/types/core/dev-grab.d.ts +14 -0
- package/dist/types/core/keyboard.d.ts +12 -0
- package/dist/types/core/limits.d.ts +52 -0
- package/dist/types/core/offline-queue.d.ts +23 -0
- package/dist/types/core/realtime.d.ts +9 -0
- package/dist/types/core/screenshot.d.ts +12 -0
- package/dist/types/core/session.d.ts +9 -0
- package/dist/types/core/source-resolver.d.ts +19 -0
- package/dist/types/core/state.d.ts +24 -0
- package/dist/types/core/types.d.ts +610 -0
- package/dist/types/core/websocket-manager.d.ts +107 -0
- package/dist/types/index.d.ts +85 -0
- package/dist/types/preact/index.d.ts +25 -0
- package/dist/types/qwik/index.d.ts +70 -0
- package/dist/types/react/client.d.ts +31 -0
- package/dist/types/react/comment-kit-ui.d.ts +9 -0
- package/dist/types/react/components/comment-fab.d.ts +34 -0
- package/dist/types/react/components/dev-export-panel.d.ts +10 -0
- package/dist/types/react/components/element-selector.d.ts +11 -0
- package/dist/types/react/components/live-region.d.ts +16 -0
- package/dist/types/react/components/screenshot-capture.d.ts +17 -0
- package/dist/types/react/components/status-indicator.d.ts +43 -0
- package/dist/types/react/error-boundary.d.ts +25 -0
- package/dist/types/react/index.d.ts +4 -0
- package/dist/types/react/is-local-host.d.ts +2 -0
- package/dist/types/react/mount-ui.d.ts +19 -0
- package/dist/types/react/shadow-root.d.ts +23 -0
- package/dist/types/react/shims/use-sync-external-store-with-selector.d.ts +4 -0
- package/dist/types/react/shims/use-sync-external-store.d.ts +1 -0
- package/dist/types/react/ui/lib/ShadowRootContext.d.ts +10 -0
- package/dist/types/react/ui/lib/cn.d.ts +12 -0
- package/dist/types/react/ui/primitives/alert-dialog/alert-dialog.d.ts +23 -0
- package/dist/types/react/ui/primitives/alert-dialog/index.d.ts +1 -0
- package/dist/types/react/ui/primitives/avatar/avatar.d.ts +10 -0
- package/dist/types/react/ui/primitives/avatar/index.d.ts +1 -0
- package/dist/types/react/ui/primitives/badge/badge.d.ts +5 -0
- package/dist/types/react/ui/primitives/badge/index.d.ts +1 -0
- package/dist/types/react/ui/primitives/button/button.d.ts +6 -0
- package/dist/types/react/ui/primitives/button/index.d.ts +1 -0
- package/dist/types/react/ui/primitives/card/card.d.ts +11 -0
- package/dist/types/react/ui/primitives/card/index.d.ts +1 -0
- package/dist/types/react/ui/primitives/checkbox/checkbox.d.ts +3 -0
- package/dist/types/react/ui/primitives/checkbox/index.d.ts +1 -0
- package/dist/types/react/ui/primitives/dialog/dialog.d.ts +17 -0
- package/dist/types/react/ui/primitives/dialog/index.d.ts +1 -0
- package/dist/types/react/ui/primitives/dropdown-menu/dropdown-menu.d.ts +29 -0
- package/dist/types/react/ui/primitives/dropdown-menu/index.d.ts +1 -0
- package/dist/types/react/ui/primitives/empty/empty.d.ts +10 -0
- package/dist/types/react/ui/primitives/empty/index.d.ts +1 -0
- package/dist/types/react/ui/primitives/field/field.d.ts +22 -0
- package/dist/types/react/ui/primitives/field/index.d.ts +1 -0
- package/dist/types/react/ui/primitives/hover-card/hover-card.d.ts +6 -0
- package/dist/types/react/ui/primitives/hover-card/index.d.ts +1 -0
- package/dist/types/react/ui/primitives/input/index.d.ts +1 -0
- package/dist/types/react/ui/primitives/input/input.d.ts +3 -0
- package/dist/types/react/ui/primitives/input-group/index.d.ts +1 -0
- package/dist/types/react/ui/primitives/input-group/input-group.d.ts +16 -0
- package/dist/types/react/ui/primitives/kbd/index.d.ts +1 -0
- package/dist/types/react/ui/primitives/kbd/kbd.d.ts +4 -0
- package/dist/types/react/ui/primitives/label/index.d.ts +1 -0
- package/dist/types/react/ui/primitives/label/label.d.ts +3 -0
- package/dist/types/react/ui/primitives/native-select/index.d.ts +1 -0
- package/dist/types/react/ui/primitives/native-select/native-select.d.ts +7 -0
- package/dist/types/react/ui/primitives/popover/index.d.ts +1 -0
- package/dist/types/react/ui/primitives/popover/popover.d.ts +9 -0
- package/dist/types/react/ui/primitives/preview/component-preview.d.ts +8 -0
- package/dist/types/react/ui/primitives/progress/index.d.ts +1 -0
- package/dist/types/react/ui/primitives/progress/progress.d.ts +7 -0
- package/dist/types/react/ui/primitives/radio-group/index.d.ts +1 -0
- package/dist/types/react/ui/primitives/radio-group/radio-group.d.ts +6 -0
- package/dist/types/react/ui/primitives/scroll-area/index.d.ts +1 -0
- package/dist/types/react/ui/primitives/scroll-area/scroll-area.d.ts +6 -0
- package/dist/types/react/ui/primitives/select/index.d.ts +1 -0
- package/dist/types/react/ui/primitives/select/select.d.ts +15 -0
- package/dist/types/react/ui/primitives/separator/index.d.ts +1 -0
- package/dist/types/react/ui/primitives/separator/separator.d.ts +3 -0
- package/dist/types/react/ui/primitives/sheet/index.d.ts +1 -0
- package/dist/types/react/ui/primitives/sheet/sheet.d.ts +14 -0
- package/dist/types/react/ui/primitives/skeleton/index.d.ts +1 -0
- package/dist/types/react/ui/primitives/skeleton/skeleton.d.ts +3 -0
- package/dist/types/react/ui/primitives/slider/index.d.ts +1 -0
- package/dist/types/react/ui/primitives/slider/slider.d.ts +7 -0
- package/dist/types/react/ui/primitives/sonner/index.d.ts +1 -0
- package/dist/types/react/ui/primitives/sonner/sonner.d.ts +4 -0
- package/dist/types/react/ui/primitives/spinner/index.d.ts +1 -0
- package/dist/types/react/ui/primitives/spinner/spinner.d.ts +3 -0
- package/dist/types/react/ui/primitives/switch/index.d.ts +1 -0
- package/dist/types/react/ui/primitives/switch/switch.d.ts +5 -0
- package/dist/types/react/ui/primitives/tabs/index.d.ts +1 -0
- package/dist/types/react/ui/primitives/tabs/tabs.d.ts +8 -0
- package/dist/types/react/ui/primitives/textarea/index.d.ts +1 -0
- package/dist/types/react/ui/primitives/textarea/textarea.d.ts +3 -0
- package/dist/types/react/ui/primitives/toggle/index.d.ts +1 -0
- package/dist/types/react/ui/primitives/toggle/toggle.d.ts +7 -0
- package/dist/types/react/ui/primitives/toggle-group/index.d.ts +1 -0
- package/dist/types/react/ui/primitives/toggle-group/toggle-group.d.ts +14 -0
- package/dist/types/react/ui/primitives/tooltip/index.d.ts +1 -0
- package/dist/types/react/ui/primitives/tooltip/tooltip.d.ts +7 -0
- package/dist/types/solid/index.d.ts +37 -0
- package/dist/types/svelte/index.d.ts +55 -0
- package/dist/types/utils/dom.d.ts +59 -0
- package/dist/types/utils/event-emitter.d.ts +11 -0
- package/dist/types/utils/freeze-animations.d.ts +8 -0
- package/dist/types/utils/text.d.ts +9 -0
- package/dist/types/utils/validation.d.ts +10 -0
- package/dist/types/vue/index.d.ts +87 -0
- package/dist/vue/ShadowRootContext-BQTcHNil.js +7 -0
- package/dist/vue/chunk-DHrubWSL.js +11 -0
- package/dist/vue/comment-kit-ui-BX1wDZ2c.js +9483 -0
- package/dist/vue/dom-eo0P9Z6Z.js +97 -0
- package/dist/vue/error-boundary-DW6uGR8U.js +21 -0
- package/dist/vue/limits-B6csdQeI.js +71 -0
- package/dist/vue/mount-ui-DdTYzv6J.js +55 -0
- package/dist/vue/pusher-cmjNbW6a.js +2504 -0
- package/dist/vue/realtime-YJKvS2eB.js +558 -0
- package/dist/vue/shadow-root-SLTVf5yk.js +86 -0
- package/dist/vue/styles-BrHt1-ia.js +2 -0
- package/dist/vue.es.js +3495 -0
- package/package.json +205 -4
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
## [0.6.1] - 2026-06-19
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- **Duplicate comments/replies on retry.** Optimistic creates and replies now send an `Idempotency-Key` (the client-generated temp id) on both the initial request and any offline-queue replay. A retried write — after a dropped response or a reload while offline — is deduplicated by the backend and returns the existing record instead of inserting a duplicate. (Requires backend support for the `Idempotency-Key` header.)
|
|
15
|
+
|
|
16
|
+
## [0.6.0] - 2026-06-19
|
|
17
|
+
|
|
18
|
+
### Added
|
|
19
|
+
|
|
20
|
+
- **Element grab composer: drafts, attachments, smarter overlay detection.** `grabElement` / `grabElements` accept new `DevGrabOptions` (`{ comment, attachments }`), re-exported from every adapter. Inline file attachment in the element-selector composer (image preview, name/path/size metadata, `pathSource` tagging). Comment drafts forwarded as a **Comment:** field in the grab payload. The element-selector tool now works pre-auth — "Grab for agent" no longer requires sign-in. `CommentKitConfig.baseUrl` is now public for self-hosted / staging / local API deployments.
|
|
21
|
+
- **Shell UX states.** Offline / pending-mutation status chip, an initial-fetch loading affordance, a polite `aria-live` region announcing new comments and connection changes to assistive tech, post-login composer resume, screenshot capture/upload progress + error surfacing, configurable toaster position, and an RTL pass.
|
|
22
|
+
- **Offline queue persistence.** The mutation queue survives a reload (persisted per project to `localStorage`) instead of silently discarding pending edits.
|
|
23
|
+
- **React adapter parity.** `useCommentKit` now exposes the full bridge method surface, derived selectors, and `isReady` / `isLoading` / `error`, reading state via `useSyncExternalStore`.
|
|
24
|
+
- **`ui.loadRemoteFonts`** opt-in flag — the Google-Fonts CDN request is no longer injected into the host page by default (privacy / CSP).
|
|
25
|
+
|
|
26
|
+
### Fixed
|
|
27
|
+
|
|
28
|
+
- **Security.** HTTPS enforced for non-loopback API/WS hosts; screenshots redact `input[type=password]` and `[data-commentkit-redact]` regions; generic file uploads validate MIME/size and block dangerous extensions; MCP server fences untrusted comment content against prompt injection and sends the correct `page_path` filter; invite token is stripped from the URL after capture.
|
|
29
|
+
- **Accessibility.** Removed `aria-hidden` from the Shadow-DOM host that was hiding the entire interactive widget from screen readers; priority badges now meet WCAG AA contrast; primitives forward orientation and refs; reduced-motion is respected.
|
|
30
|
+
- **Correctness.** Offline-queue mutex no longer double-executes mutations; optimistic temp IDs reconcile with server responses; realtime echoes dedup and no longer double-count the actor's own reactions; per-entity rollback no longer clobbers concurrent updates; validation limits centralized so payloads valid at one layer aren't dropped by the next; inbound peer cursors are rate-limited.
|
|
31
|
+
- **Framework adapters.** Angular and Svelte no longer construct the widget during SSR; Qwik uses `noSerialize`; Vue uses a render function instead of a runtime template string; pre-init event subscriptions are buffered instead of dropped; Angular gains the missing `grabElement` / agent-context methods; vanilla gains `toggleLoginModal`.
|
|
32
|
+
|
|
33
|
+
### Changed
|
|
34
|
+
|
|
35
|
+
- **Build / release.** Portable `build:strip` (no longer BSD-`sed`-only); `SDK_VERSION` injected from `package.json` at build time; `sideEffects` scoped so the vanilla auto-init isn't tree-shaken; CI workflow added (check + test + build + e2e + markdown lint); `README.md` and `docs/` are now tracked and shipped; added `SECURITY.md`. Published bundles remain **minified without sourcemaps** so proprietary source is not distributed.
|
|
36
|
+
|
|
37
|
+
## [0.5.3] - 2026-05-14
|
|
38
|
+
|
|
39
|
+
### Fixed
|
|
40
|
+
|
|
41
|
+
- **Next.js (App Router + Turbopack) builds without consumer-side `serverExternalPackages` config.** `pusher-js` is now lazy-loaded — its module body uses `self` + dynamic `require()`, which strict SSR bundlers evaluate at build time even for users who never enable realtime. Loading the entire `./core/realtime` module only when `initializeWebSocket()` is actually called keeps the non-realtime path zero-cost.
|
|
42
|
+
- **Vite chunk-name collisions across adapter builds.** Each `BUILD_TARGET` now writes its chunks into `dist/<target>/[name]-[hash].js`. Previously every target wrote to the same shared chunk filenames (`dom.js`, `mount-ui.js`, …) and the last build overwrote earlier outputs, leaving every adapter except the last referencing chunks with stale, mismatched export bindings (`MISSING_EXPORT` at consumer build time).
|
|
43
|
+
|
|
44
|
+
### Verified
|
|
45
|
+
|
|
46
|
+
End-to-end build smoke tests against a freshly scaffolded app per framework (installs the packed tarball, runs each framework's production build):
|
|
47
|
+
|
|
48
|
+
| Framework | Status |
|
|
49
|
+
| ---------------------------------- | ------------------------------------------------------------- |
|
|
50
|
+
| Vanilla TS (Vite) | ✓ |
|
|
51
|
+
| Vite + React | ✓ |
|
|
52
|
+
| Vite + Vue 3 | ✓ |
|
|
53
|
+
| Vite + Svelte | ✓ |
|
|
54
|
+
| Vite + Solid | ✓ |
|
|
55
|
+
| Vite + Preact | ✓ |
|
|
56
|
+
| Vite + Qwik City | ✓ |
|
|
57
|
+
| Next.js 16 (App Router, Turbopack) | ✓ — via `next/dynamic` + `{ ssr: false }` wrapper |
|
|
58
|
+
| Nuxt 3 | ✓ — via `.client.vue` filename suffix |
|
|
59
|
+
| SvelteKit 2 | ✓ — via `if (browser)` guard around dynamic import |
|
|
60
|
+
| Astro 5 + React | ✓ — via `client:only="react"` |
|
|
61
|
+
| Angular 21 standalone | ✓ — emits CommonJS-bailout warnings for React; build succeeds |
|
|
62
|
+
|
|
63
|
+
## [0.5.2] - 2026-05-14
|
|
64
|
+
|
|
65
|
+
### Added
|
|
66
|
+
|
|
67
|
+
- **Dist-exports smoke test** (`src/test/dist-exports.test.ts`). For every built adapter in `dist/`, asserts the public surface its README snippet relies on is present. Also asserts the React entry preserves its `"use client"` directive (required for Next.js Server Components) and that `package.json#exports` matches the built file layout. Catches build regressions before they ship.
|
|
68
|
+
|
|
69
|
+
### Docs
|
|
70
|
+
|
|
71
|
+
- **Exhaustive framework matrix in README.** Replaces the short "Works With" table with one table per adapter family (React, Vue, Svelte, Angular, Solid, Qwik, Preact, vanilla, WebView shells) and an explicit "Not supported" list (React Native, NativeScript, Ink, server-only runtimes). Covers Next.js, Remix, Gatsby, RedwoodJS, TanStack Start, Vinxi, Million, Blitz, Modern.js, Refine, Docusaurus, Nextra, Inertia (React/Vue/Svelte), Nuxt, Quasar, VitePress, VuePress, Vike, SvelteKit, Angular Standalone, Analog, Angular Universal, SolidStart, QwikCity, Fresh, Astro, Web Components, Lit, Stencil, Marko, Alpine, htmx, Stimulus, Livewire, Filament, Phoenix LiveView, Electron, Tauri, Capacitor, Cordova, Neutralinojs.
|
|
72
|
+
|
|
73
|
+
## [0.5.1] - 2026-05-14
|
|
74
|
+
|
|
75
|
+
### Removed
|
|
76
|
+
|
|
77
|
+
- **`comment-kit-cli` sub-package.** Integration is a one-line import — the README quick-start guides cover every supported framework. A standalone bootstrap CLI added maintenance surface without saving meaningful steps.
|
|
78
|
+
|
|
79
|
+
### Fixed
|
|
80
|
+
|
|
81
|
+
- **`grabElements` payload caps.** Multi-element grab now refuses to bundle more than 25 elements and stops embedding screenshots once the bundle exceeds 3 MB of inlined data URLs. Console warns when either cap is hit. Prevents unusable clipboard payloads and tab freezes on large selections.
|
|
82
|
+
- **README Astro snippet** now imports `CommentKit` from `comment-kit/react` in the frontmatter so the example actually renders.
|
|
83
|
+
- **Removed dead code** in `dev-grab.ts` (`originalClipboard` capture and stale comment).
|
|
84
|
+
- **`postcss` security advisory** (GHSA-qx2v-qp2m-jg93) resolved via `npm audit fix`.
|
|
85
|
+
- **`vp check`** now passes on every file; `prepublishOnly` no longer blocks.
|
|
86
|
+
|
|
87
|
+
## [0.5.0] - 2026-05-14
|
|
88
|
+
|
|
89
|
+
### Added
|
|
90
|
+
|
|
91
|
+
- **Element screenshot attached to clipboard on dev grab.** Single-element grabs now write an `image/png` MIME alongside `text/plain`, `text/html`, and the existing custom JSON MIME, via the async Clipboard API and `ClipboardItem`. Agents that accept image pastes (Claude Desktop, Cursor, Codex) receive both the Markdown context and the rendered element screenshot in one paste.
|
|
92
|
+
- **`copyTextAndImageToClipboard(text, blob)`** helper exported from the core. Falls back to text-only when `navigator.clipboard.write` or `ClipboardItem` are unavailable.
|
|
93
|
+
|
|
94
|
+
### Changed
|
|
95
|
+
|
|
96
|
+
- Multi-element bundles (shift+click, drag-rect, dev-export panel) inline their screenshots as Markdown data URLs since the clipboard can only carry one image MIME.
|
|
97
|
+
|
|
98
|
+
## [0.4.0] - 2026-05-14
|
|
99
|
+
|
|
100
|
+
### Added
|
|
101
|
+
|
|
102
|
+
- **Shift+click multi-select:** Hold Shift and click multiple elements to accumulate them in a selection bucket. A floating bar shows the count and exposes "Grab N for agent" + "Clear". ⌘C / Ctrl+C grabs the entire bucket in one bundled clipboard payload.
|
|
103
|
+
- **Drag-rect multi-select (marquee):** Pointer-down on empty space + drag draws a marquee. Every selectable element intersecting the rect is added to the multi-select bucket on release. Tiny drags are ignored as misclicks.
|
|
104
|
+
- **Context menu (right-click):** Right-clicking any element in select mode opens a five-item menu — Grab for agent, Add comment, Copy CSS selector, Copy XPath, Inspect (log to console). Escape closes the menu without deactivating the tool.
|
|
105
|
+
- **Hold-to-activate + activation key config:** New config `ui.activation: { mode: "toggle" | "hold", key: "Alt" | "Meta" | "Control" | "Shift" }`. In hold mode the select tool is active only while the configured modifier is held; release deactivates.
|
|
106
|
+
- **Animation / update freeze on grab:** While the select tool is active, all host-page CSS animations + CSS transitions + Web Animations API animations are paused. Restored automatically when the tool deactivates. Lives behind a depth counter so concurrent freezes compose cleanly.
|
|
107
|
+
- **Touch mode:** Long-press (≥550ms) on a touch device opens the context menu for the touched element, mirroring the right-click flow. Quick taps don't trigger.
|
|
108
|
+
- **`comment-kit-cli` package:** New sibling npm package. `npx comment-kit-cli init [--api-key ck_…]` auto-detects Next.js, Vite + (React|Vue|Svelte|Solid|Preact), Webpack + React, Remix, TanStack Start, or Astro, then prints the exact snippet for your framework's entry file and adds `comment-kit` to `devDependencies`. Also ships `remove` and `detect` commands.
|
|
109
|
+
|
|
110
|
+
- **Core method `blockEscape(): () => void`** lets overlay UIs claim Escape for themselves; the core's chain bails while any blocker is held.
|
|
111
|
+
- **Core method `grabElements(elements: Element[])`** — produces individual `DevGrabResult`s plus a single bundled Markdown payload that's copied to the clipboard. Mirrored on every framework adapter and on the vanilla `CommentKit` wrapper.
|
|
112
|
+
- **Event `agent:elements-grabbed`** with `{ count }`.
|
|
113
|
+
- **Type `DevGrabBundle`** exported alongside `DevGrabResult`.
|
|
114
|
+
|
|
115
|
+
## [0.3.1] - 2026-05-13
|
|
116
|
+
|
|
117
|
+
### Added
|
|
118
|
+
|
|
119
|
+
- **`getConfig()` and `getFeatures()`** on the vanilla `CommentKit` wrapper class for parity with the framework adapters.
|
|
120
|
+
- **Playwright e2e test harness** with new scripts `test:e2e`, `test:e2e:ui`, and `test:e2e:headed`.
|
|
121
|
+
|
|
122
|
+
### Fixed
|
|
123
|
+
|
|
124
|
+
- **`grabElement` guards against non-`Element` inputs.** Passing `{}`, `undefined`, or any non-`Element` value now returns `null` instead of throwing on `getBoundingClientRect`.
|
|
125
|
+
|
|
126
|
+
## [0.3.0] - 2026-05-13
|
|
127
|
+
|
|
128
|
+
### Added
|
|
129
|
+
|
|
130
|
+
- **Dev grab flow:** A "Grab for agent" action in the element-selector composer copies the selected element straight to the clipboard with screenshot + source-file location + HTML + selector + XPath. No backend roundtrip — built for local dev where iteration speed matters.
|
|
131
|
+
- **⌘C / Ctrl+C grab shortcut:** While the element-selector is active, ⌘C grabs the currently-hovered (or selected) element to the clipboard. Honors active text selections so the system copy command still wins when text is highlighted.
|
|
132
|
+
- **Source-file resolution via optional peer dep:** When the host installs the optional source-resolver peer dep, agent context exports now include `filePath:line:col` and a component stack for each comment whose element can be resolved. Falls back gracefully to selector + XPath when not installed.
|
|
133
|
+
- **Dev export panel (localhost only):** New side panel that lists open stakeholder comments with checkboxes and a single "Copy N for agent" button. Lets a developer pull comments left on production/staging and bundle them into one Markdown payload for their agent. Reuses each stakeholder's attached screenshot.
|
|
134
|
+
- **`comment-kit-mcp`:** New sibling npm package — a Model Context Protocol server that lets agents (Claude Desktop, Cursor, Claude Code, Codex CLI, Continue, Zed AI…) call `list_comments`, `get_comment`, and `search_comments` directly against your CommentKit project. See `mcp/README.md` for setup. Stdio transport, env-based credentials.
|
|
135
|
+
- **New core methods:** `getAgentContextAsync`, `formatAgentContextAsync`, `grabElement(element)` on `CommentKitCore`, mirrored on every adapter via the bridge and on the vanilla `CommentKit` class.
|
|
136
|
+
- **New events:** `agent:element-grabbed` (with `source` + `componentName`); `agent:context-copied` now also carries `sourceResolved: boolean`.
|
|
137
|
+
|
|
138
|
+
### Changed
|
|
139
|
+
|
|
140
|
+
- **`AgentContextExport`:** Adds `sourceResolved: boolean` indicating whether at least one comment had its source resolved via the optional peer dep. Agent markdown now prefers the resolved source line over the selector when both are available.
|
|
141
|
+
- **`AgentElementContext`:** Adds optional `source`, `stack`, and `componentName` fields when source resolution is available.
|
|
142
|
+
- **`AgentCommentContext`:** Adds optional `screenshotUrl` populated from the comment's attached screenshot.
|
|
143
|
+
- **`copyAgentContext`:** Now resolves async source enrichment before formatting + copying, so the payload your agent receives includes source-file locations when available.
|
|
144
|
+
|
|
145
|
+
### Docs
|
|
146
|
+
|
|
147
|
+
- New `mcp/README.md` with setup instructions for Claude Desktop, Cursor, and Claude Code.
|
|
148
|
+
|
|
149
|
+
## [0.2.0] - 2026-05-13
|
|
150
|
+
|
|
151
|
+
### Added
|
|
152
|
+
|
|
153
|
+
- **Agent handoff:** New `getAgentContext` / `formatAgentContext` / `copyAgentContext` methods on every framework adapter. Exports open comments with element context (selector, XPath, viewport position, resolved DOM metadata, replies) for paste-in handoff to Claude, Codex, Cursor, or any coding agent. A toolbar button surfaces it when there are unresolved comments. New `agent:context-copied` event.
|
|
154
|
+
- **Element selector tool:** New `"select"` tool — click any element on the host page to pin a comment to it. Visual outline on hover and selection, refreshes anchors on scroll/resize/DOM mutation, shows existing open anchored comments as marks.
|
|
155
|
+
- **Vanilla SDK surface:** `updateComment`, `createHighlight`, `createDrawing`, `setActiveDrawing`, `sendDrawingStroke`, `setActiveScreenshot`, `uploadFiles` now exposed on the `CommentKit` wrapper class for non-framework callers.
|
|
156
|
+
|
|
157
|
+
### Changed
|
|
158
|
+
|
|
159
|
+
- **Lifecycle:** Every public method on `CommentKitCore` and every adapter now early-returns after `destroy()`. Async UI mounts use lifecycle-ID checks so an in-flight mount cannot leak a host element after teardown or re-init.
|
|
160
|
+
- **State:** `getState()` returns a deep-cloned snapshot so consumers cannot mutate internal state. `select()` selectors continue to receive the live state object (do not mutate).
|
|
161
|
+
- **Selectors:** `generateSelector` now `CSS.escape`s ids and classes — fixes invalid selectors when an id contains `.`, `:`, or other CSS metacharacters.
|
|
162
|
+
- **Dependencies:** Pinned `@voidzero-dev/vite-plus-core` and `vite-plus-test` to `0.1.20` for build reproducibility.
|
|
163
|
+
|
|
164
|
+
### Fixed
|
|
165
|
+
|
|
166
|
+
- **Uploads:** Removed `image/svg+xml` from the allowed upload MIME list — SVG uploads can carry executable script.
|
|
167
|
+
- **Singleton:** Auto-init (`window.CommentKitConfig`) now destroys an existing instance before re-creating, instead of leaking it.
|
|
168
|
+
|
|
169
|
+
### Security
|
|
170
|
+
|
|
171
|
+
- **Trust-boundary validation:** Hardened inbound data from external sources — WebSocket presence/cursor/drawing payloads (with per-field length, range, and control-character checks), backend API responses (content-type and empty-body guards, error-details key allowlist and value clipping), and clipboard fallback paths.
|
|
172
|
+
- **Auth inputs:** Stricter normalization for email addresses, OTP codes, and invite tokens at the API client boundary.
|
|
173
|
+
- **Singleton listeners:** EventEmitter now warns past 100 listeners on a single event and rejects non-function listeners.
|
|
174
|
+
|
|
175
|
+
### Internal
|
|
176
|
+
|
|
177
|
+
- Consolidated validation helpers (`hasControlChars`, `isPlainObject`, `isSafeString`, `isFinitePercentage`, `isValidEmail`) into `src/utils/validation.ts`.
|
|
178
|
+
- Consolidated adapter error helpers (`toApiError`, `toMountError`) into `src/adapters/errors.ts`.
|
|
179
|
+
|
|
180
|
+
## [0.1.5] - 2026-04-06
|
|
181
|
+
|
|
182
|
+
### Added
|
|
183
|
+
|
|
184
|
+
- **Solid.js:** Full UI + reactive signals via `comment-kit/solid`
|
|
185
|
+
- **Qwik:** Full UI + Qwik signals via `comment-kit/qwik`
|
|
186
|
+
- **Preact:** Full UI + Preact hooks via `comment-kit/preact`
|
|
187
|
+
|
|
188
|
+
### Changed
|
|
189
|
+
|
|
190
|
+
- **Vue/Svelte/Angular:** Now include the full UI automatically — same toolbar, sidebar, and comments panel as React
|
|
191
|
+
|
|
192
|
+
## [0.1.4] - 2026-04-04
|
|
193
|
+
|
|
194
|
+
### Breaking Changes
|
|
195
|
+
|
|
196
|
+
- **Auth:** Replaced guest commenting with member invite links — all commenters must now verify via OTP
|
|
197
|
+
- **Config:** Simplified public configuration — all other settings are managed automatically
|
|
198
|
+
|
|
199
|
+
### Added
|
|
200
|
+
|
|
201
|
+
- **Member Invites:** Invite collaborators by email with OTP verification
|
|
202
|
+
- **Auto-Config:** SDK auto-configures project settings, real-time, and invite tokens — customers only need an API key
|
|
203
|
+
- **Replies:** Edit and delete replies on comments
|
|
204
|
+
- **Enabled Flag:** `enabled` config option to disable the widget entirely — zero overhead when off
|
|
205
|
+
|
|
206
|
+
### Changed
|
|
207
|
+
|
|
208
|
+
- **Environment:** Comments from all environments are shown by default — filter explicitly when needed
|
|
209
|
+
|
|
210
|
+
### Fixed
|
|
211
|
+
|
|
212
|
+
- **API Sync:** All responses properly handled across the full API surface
|
|
213
|
+
|
|
214
|
+
## [0.1.3] - 2026-04-04
|
|
215
|
+
|
|
216
|
+
### Fixed
|
|
217
|
+
|
|
218
|
+
- **Types:** Synced exports across all framework adapters
|
|
219
|
+
|
|
220
|
+
### Improved
|
|
221
|
+
|
|
222
|
+
- **Tests:** Raised test coverage
|
|
223
|
+
|
|
224
|
+
## [0.1.2] - 2026-04-04
|
|
225
|
+
|
|
226
|
+
### Fixed
|
|
227
|
+
|
|
228
|
+
- **Pagination:** Fixed concurrent load requests
|
|
229
|
+
- **Real-Time:** WebSocket events for replies and reactions now update local state
|
|
230
|
+
- **Mentions:** Fixed mention formatting round-trip
|
|
231
|
+
- **State:** Fixed optimistic update clearing unrelated loading state
|
|
232
|
+
|
|
233
|
+
## [0.1.1] - 2026-04-04
|
|
234
|
+
|
|
235
|
+
### Fixed
|
|
236
|
+
|
|
237
|
+
- **Security:** Hardened error responses, file upload validation, and authentication guards
|
|
238
|
+
- **Accessibility:** Improved screen reader support for skeleton and overlay components
|
|
239
|
+
- **UI:** Fixed rendering issues in several components
|
|
240
|
+
- **Packaging:** Included LICENSE file in published package
|
|
241
|
+
- **TypeScript:** Cleaned up type declarations and build output
|
|
242
|
+
|
|
243
|
+
## [0.1.0] - 2026-04-04
|
|
244
|
+
|
|
245
|
+
### Added
|
|
246
|
+
|
|
247
|
+
- Core comment engine with real-time collaboration
|
|
248
|
+
- Pin comments, text highlighting, drawing tools, and screenshots
|
|
249
|
+
- OTP-based passwordless authentication
|
|
250
|
+
- Offline support with automatic retry
|
|
251
|
+
- React, Vue, Svelte, Angular, and vanilla JS integrations
|
|
252
|
+
- Shadow DOM isolation with light/dark theme support
|
|
253
|
+
- Task workflows with status, priority, assignees, and checklists
|
|
254
|
+
- @Mentions with autocomplete
|
|
255
|
+
- Emoji reactions and threaded replies
|
|
256
|
+
- Deep linking via URL hash
|
|
257
|
+
- Keyboard shortcuts
|
|
258
|
+
- Environment-scoped comments
|
|
259
|
+
|
|
260
|
+
[Unreleased]: https://github.com/commentkit/comment-kit/compare/v0.6.1...HEAD
|
|
261
|
+
[0.6.1]: https://github.com/commentkit/comment-kit/compare/v0.6.0...v0.6.1
|
|
262
|
+
[0.6.0]: https://github.com/commentkit/comment-kit/compare/v0.5.3...v0.6.0
|
|
263
|
+
[0.5.3]: https://github.com/commentkit/comment-kit/compare/v0.5.2...v0.5.3
|
|
264
|
+
[0.5.2]: https://github.com/commentkit/comment-kit/compare/v0.5.1...v0.5.2
|
|
265
|
+
[0.5.1]: https://github.com/commentkit/comment-kit/compare/v0.5.0...v0.5.1
|
|
266
|
+
[0.5.0]: https://github.com/commentkit/comment-kit/compare/v0.4.0...v0.5.0
|
|
267
|
+
[0.4.0]: https://github.com/commentkit/comment-kit/compare/v0.3.1...v0.4.0
|
|
268
|
+
[0.3.1]: https://github.com/commentkit/comment-kit/compare/v0.3.0...v0.3.1
|
|
269
|
+
[0.3.0]: https://github.com/commentkit/comment-kit/compare/v0.2.0...v0.3.0
|
|
270
|
+
[0.2.0]: https://github.com/commentkit/comment-kit/compare/v0.1.5...v0.2.0
|
|
271
|
+
[0.1.5]: https://github.com/commentkit/comment-kit/compare/v0.1.4...v0.1.5
|
|
272
|
+
[0.1.4]: https://github.com/commentkit/comment-kit/compare/v0.1.3...v0.1.4
|
|
273
|
+
[0.1.3]: https://github.com/commentkit/comment-kit/compare/v0.1.2...v0.1.3
|
|
274
|
+
[0.1.2]: https://github.com/commentkit/comment-kit/compare/v0.1.1...v0.1.2
|
|
275
|
+
[0.1.1]: https://github.com/commentkit/comment-kit/compare/v0.1.0...v0.1.1
|
|
276
|
+
[0.1.0]: https://github.com/commentkit/comment-kit/releases/tag/v0.1.0
|
package/LICENSE
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
Copyright (c) 2026 CommentKit. All rights reserved.
|
|
2
|
+
|
|
3
|
+
This software is provided under a proprietary license. You may use this
|
|
4
|
+
package solely in connection with CommentKit's hosted services and in
|
|
5
|
+
accordance with the CommentKit Terms of Service.
|
|
6
|
+
|
|
7
|
+
You may NOT:
|
|
8
|
+
- Modify, reverse-engineer, or create derivative works of this software
|
|
9
|
+
- Redistribute, sublicense, or sell this software
|
|
10
|
+
- Use this software independently of CommentKit's services
|
|
11
|
+
- Remove or alter any proprietary notices
|
|
12
|
+
|
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
14
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
15
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
16
|
+
COMMENTKIT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
|
17
|
+
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
18
|
+
CONNECTION WITH THE SOFTWARE OR ITS USE.
|