@commentkit/comment-kit 0.6.9 → 0.7.1
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 +63 -4
- package/LICENSE +18 -2
- package/README.md +133 -88
- package/SECURITY.md +48 -0
- package/dist/THIRD_PARTY_NOTICES.txt +284 -0
- package/dist/angular.es.js +25 -12
- package/dist/comment-kit.es.js +25 -13
- package/dist/demo.es.js +148 -70
- package/dist/headless.es.js +3 -3
- package/dist/preact.es.js +3 -3
- package/dist/qwik.es.js +1 -110
- package/dist/qwik.qwik.mjs +114 -0
- package/dist/react.es.js +3 -3
- package/dist/shared/annotation-icons-Dh-bmNYK.js +172 -0
- package/dist/shared/annotation-toolbar-cGC1p-SP.js +1093 -0
- package/dist/shared/attachment-refresh-CzQFXHkL.js +94 -0
- package/dist/shared/{bridge-DRE03N9X.js → bridge-CJoGYngu.js} +6 -3
- package/dist/shared/{button-group-CHfMRXyA.js → button-group-CWdKaOlC.js} +14 -16
- package/dist/shared/capture-colors-CxSLsU5-.js +74 -0
- package/dist/shared/comment-drawing-canvas-DdXlMgbF.js +124 -0
- package/dist/shared/comment-icon-Dg9ZWpz-.js +608 -0
- package/dist/shared/comment-image-lightbox-B7iHjnAz.js +190 -0
- package/dist/shared/comment-images-content-D7YNUgo5.js +214 -0
- package/dist/shared/{comment-kit-core-D0kY00St.js → comment-kit-core-C862uNAm.js} +1371 -853
- package/dist/shared/comment-kit-ui-0vd-DY4S.js +19977 -0
- package/dist/shared/comment-screenshot-annotator-DcaSSuWB.js +151 -0
- package/dist/shared/comment-screenshot-overlay-D_nFoJmM.js +207 -0
- package/dist/shared/{dev-export-panel-BLngcr5q.js → dev-export-panel-pWBlhlse.js} +8 -8
- package/dist/shared/dev-grab-eQ9EgEGY.js +210 -0
- package/dist/shared/dist-De294MVF.js +623 -0
- package/dist/shared/{element-selector-CtFzgHvq.js → element-selector-DC-_XJ0k.js} +350 -305
- package/dist/shared/{icons-BSHCWYO1.js → icons-nzMOLzrm.js} +2 -3
- package/dist/shared/{mount-ui-CVivB_eQ.js → mount-ui-B68j8r6I.js} +4 -4
- package/dist/shared/{pusher-BEl7Qn-8.js → pusher-C1FHQGXV.js} +1 -1
- package/dist/shared/realtime-Diqz7G_y.js +317 -0
- package/dist/shared/realtime-recovery-DJ_adc-H.js +135 -0
- package/dist/shared/{separator-DusFNTs-.js → separator-XDBsaWyw.js} +891 -785
- package/dist/shared/{shadow-root-CmYXiSRR.js → shadow-root-CrO75sED.js} +1 -1
- package/dist/shared/styles-C9Jwvm0Q.js +2 -0
- package/dist/shared/useRender-D1z_X_BY.js +5 -0
- package/dist/shared/{useValueChanged-DQXLia-2.js → useValueChanged-CrzfD8l-.js} +15 -15
- package/dist/shared/{validation-C7QG8j7Z.js → validation-D-8u4M7I.js} +14 -1
- package/dist/shared/{websocket-manager-BTRqNTB7.js → websocket-manager-CFak_YHy.js} +148 -89
- package/dist/solid.es.js +3 -3
- package/dist/svelte.es.js +3 -3
- package/dist/types/adapters/bridge.d.ts +9 -12
- package/dist/types/angular/index.d.ts +15 -5
- package/dist/types/core/api-client.d.ts +24 -18
- package/dist/types/core/comment-kit-core.d.ts +28 -11
- package/dist/types/core/local-demo.d.ts +1 -0
- package/dist/types/core/types.d.ts +103 -0
- package/dist/types/core/websocket-manager.d.ts +12 -0
- package/dist/types/core/write-access.d.ts +9 -0
- package/dist/types/headless.d.ts +1 -1
- package/dist/types/index.d.ts +8 -4
- package/dist/types/qwik/index.d.ts +4 -1
- package/dist/vue.es.js +3 -3
- package/docs/api-reference.md +378 -0
- package/docs/local-demo.md +60 -0
- package/package.json +17 -6
- package/dist/shared/annotation-toolbar-pX17NLmJ.js +0 -1104
- package/dist/shared/clamp-CcFVX0vC.js +0 -55
- package/dist/shared/comment-drawing-canvas-CYu5SwRf.js +0 -126
- package/dist/shared/comment-image-lightbox-0VdAs2iT.js +0 -178
- package/dist/shared/comment-kit-ui-D2j2gvnm.js +0 -16685
- package/dist/shared/comment-screenshot-annotator-BuojwviY.js +0 -137
- package/dist/shared/comment-screenshot-overlay-BZX0Vcb8.js +0 -144
- package/dist/shared/dev-grab-pDAfH2lr.js +0 -203
- package/dist/shared/local-demo-context-BohlYbHt.js +0 -6
- package/dist/shared/realtime-BG_t_ze7.js +0 -281
- package/dist/shared/resolveAriaLabelledBy-CIKpnjNJ.js +0 -669
- package/dist/shared/styles-D_FEJZ9G.js +0 -2
- package/dist/shared/useLabelableId-DGbfdMi_.js +0 -155
package/CHANGELOG.md
CHANGED
|
@@ -5,28 +5,87 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
-
## [
|
|
8
|
+
## [0.7.1] - 2026-10-16
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- Restore secure realtime WebSocket connections and authorize presence using the current SDK session. Keep numeric channel identities separate from project URL slugs, and discard authorization responses after reconnecting, switching accounts, or disconnecting.
|
|
13
|
+
- Normalize nullable author fields from Laravel broadcasts and retry failed channel authorization without duplicating subscriptions.
|
|
14
|
+
- Fetch oversized comment and reply updates through the authenticated API when the backend sends a compact refresh event. Reconcile missed changes after authorized resubscription while retaining loaded pages, filters, the selected thread and drafts; ignore stale reads and retry transient failures within a bounded window.
|
|
15
|
+
- Match current-page comments to query-string URLs, keeping the panel and page markers consistent during SPA navigation.
|
|
16
|
+
- Clear text-selection tools when their live DOM range collapses after host content is removed.
|
|
17
|
+
- Let an open widget popup handle Escape before closing the underlying comments panel.
|
|
18
|
+
- Preserve the configured deployment branch for new feedback independently of the branch being viewed, including highlight, drawing, screenshot and offline creation.
|
|
19
|
+
- Restore the production toolbar and pins after submitting a comment, while preserving deliberate visibility changes and cancellation. Hide saved highlight targets during placement so they cannot intercept new pins on the same text.
|
|
20
|
+
- Capture pages using OKLCH, Display P3 and other modern CSS colors by normalizing only the temporary screenshot clone. Keep the converter lazy, preserve redaction, and leave the host page unchanged.
|
|
21
|
+
- Save Element-tool attachments and device context through the shared composer flow. Retain failed drafts for retry and prevent canceled uploads from creating feedback afterward.
|
|
22
|
+
- Confirm comment and reply saves using their own operation results. Concurrent realtime comments cannot clear a rejected draft, and another reply being removed cannot make a successful reply appear to fail.
|
|
23
|
+
- Include full thread, attachment, annotation and deployment context in agent handoffs. Identify incomplete loaded snapshots and treat feedback as untrusted data; do not resolve another page's element against the current document.
|
|
24
|
+
- Preserve a reader's scroll position when new replies arrive while they are reading older messages.
|
|
25
|
+
- Expose authorized reply deletion with confirmation and keep parent and reply identifiers separate.
|
|
26
|
+
- Apply backend read-only capabilities to comment mutations, uploads and offline replay. Distinguish an expired plan from project settings and individual storage or tool limits.
|
|
27
|
+
- Keep a visible sign-in action for read-only projects, so members can still authenticate to read and export feedback. Resume retained offline edits when write access returns.
|
|
28
|
+
- Explain that panel search and filters cover loaded comments, and keep pagination available when a search has no matches yet.
|
|
29
|
+
- Refresh expired private attachment links without discarding loaded pages, the open lightbox or local drafts. Replace broken documentation links with the hosted developer guide and terms.
|
|
30
|
+
|
|
31
|
+
### Changed
|
|
32
|
+
|
|
33
|
+
- Enforce the existing statement, branch, function, and line coverage targets in CI and the npm publication checks. Expand lifecycle, offline, tool, authentication, and browser workflow regressions without reducing coverage scope or thresholds.
|
|
34
|
+
|
|
35
|
+
## [0.7.0] - 2026-10-16
|
|
9
36
|
|
|
10
37
|
### Added
|
|
11
38
|
|
|
39
|
+
- Automated packed-archive checks for public documentation, license notices, version consistency and excluded development artifacts.
|
|
40
|
+
- A coordinated release checklist and expanded browser/framework consumer verification before publishing.
|
|
41
|
+
|
|
42
|
+
- A complete, hashed inventory of all 477 reference files with per-file UI, logic, and API audit results in five-file batches.
|
|
43
|
+
- Persistent reply quotes, reply reactions, composer file uploads, checklist and assignee creation, and parent metadata editing.
|
|
44
|
+
- Stored resolution/completion timestamps with readable labels, idempotent transitions and correct clearing when replies reopen a thread.
|
|
45
|
+
- Authenticated project context for real members, roles, storage usage and saved branches, plus `branch`, `setBranch()` and `reloadProjectContext()` integration APIs.
|
|
46
|
+
|
|
12
47
|
- A dedicated `@commentkit/comment-kit/headless` entry for the engine and protocol types without React, widget mounting, or browser global registration.
|
|
13
48
|
- A dedicated `@commentkit/comment-kit/demo` entry for the private browser-local sandbox. The original root export remains as a deprecated lazy wrapper.
|
|
14
49
|
- Package, initial-load, first-open, and tool-activation size budgets, plus isolated consumer checks for the packed artifact.
|
|
15
50
|
- A complete development stylesheet and dependency guards that preserve all 46 primitive families while checking production CSS coverage.
|
|
16
51
|
- An interactive `/design-system` catalog with all 46 primitive families, 111 examples, local brand fonts, light/dark modes, RTL, and mobile browser coverage. Gallery assets remain excluded from npm.
|
|
17
52
|
|
|
53
|
+
- A `/design-system/product` preview for the assembled widget, with real product components, production CSS, local fixtures and save-failure simulation.
|
|
54
|
+
- Read-only source comparisons for 39 main product states across desktop/mobile and light/dark themes, plus optional tools and primitive states.
|
|
55
|
+
|
|
18
56
|
### Changed
|
|
19
57
|
|
|
20
58
|
- Build all framework entries together, sharing the engine, UI, styles, and lazy Pusher chunk. Remove private implementation declarations from the published archive while retaining public type dependencies.
|
|
21
59
|
- Load the full widget on activation and specialist tools when used. Preserve access gates, drafts, dialogs, cleanup, and retry/cancel behavior.
|
|
22
|
-
- Exclude
|
|
60
|
+
- Exclude currently unused primitive styles from production; retain their complete source and parity coverage in the catalog. Load tool styles inside the widget's Shadow DOM with their tools.
|
|
23
61
|
- Upgrade development dependencies, including Base UI 1.9, TypeScript 7, Vite+ 1.3, Vitest 5, React 19.3, and the framework test runtimes. Use standard V8 coverage instead of the custom compatibility provider.
|
|
24
62
|
- Mark React and ReactDOM as optional npm peers for headless installations. **Built-in UI consumers must explicitly install matching React and ReactDOM 18+ versions**, including vanilla and non-React adapters.
|
|
25
63
|
- Allow the React client entry to be imported directly from a Next.js server layout; the widget mounts after hydration. A mandatory `next/dynamic` workaround is no longer needed.
|
|
26
|
-
- Reduce
|
|
64
|
+
- Reduce initial SDK loading with shared lazy bundles. The performance audit records the original 262.8 KB React initial gzip and the measurements before this feature port; the full port audit records the current build. External peers are excluded from browser estimates.
|
|
65
|
+
|
|
66
|
+
- Adopt Message/Bubble/MessageScroller replies, Attachment/AspectRatio media, Combobox assignees and Item settings rows. Keep current-user alignment, actual SDK shortcuts and real backend actions.
|
|
27
67
|
|
|
28
68
|
### Fixed
|
|
29
69
|
|
|
70
|
+
- Reconcile dependent offline edits, deletions and reply reactions without restoring removed comments or losing newer optimistic changes.
|
|
71
|
+
- Build an optimizer-compatible Qwik library, preserve the legacy hook alias, and keep the hook's bridge methods usable after client resumption.
|
|
72
|
+
- Avoid WebKit resize loops in nested assignee filters and History API limits during rapid gallery navigation.
|
|
73
|
+
- Return keyboard focus to the actual attachment thumbnail after closing saved-image or draft-preview lightboxes, including Safari pointer interactions.
|
|
74
|
+
- Prepare production Angular dependency injection without requiring the JIT compiler.
|
|
75
|
+
- Ignore obsolete authentication responses after OTP cancellation, account replacement, logout or destruction, including late 401 responses from a previous session.
|
|
76
|
+
- Forward vanilla attachment targets and expose the scoped Escape-release callback consistently with the core API.
|
|
77
|
+
- Correct SvelteKit/Nuxt lifecycle examples and include customer-facing API and security documentation in the npm archive.
|
|
78
|
+
|
|
79
|
+
- Fetch project-wide comments for the All tab, paginate within the selected branch, and retrieve shared-link targets beyond the first page.
|
|
80
|
+
- Keep drafts and successful uploads across failed saves; preserve quote, mention and branch metadata through offline replay and local-demo reloads.
|
|
81
|
+
- Ignore stale responses after logout, account changes, branch changes or link navigation; derive realtime reaction ownership for the recipient.
|
|
82
|
+
- Preserve drawing gestures, screenshot provider/crop/export behavior, nested highlight offsets and mobile tool containment.
|
|
83
|
+
|
|
84
|
+
- Include highlight and drawing threads in the sidebar, keep the panel aligned with the dragged toolbar, and collapse list filters on scroll with keyboard focus recovery.
|
|
85
|
+
- Keep nested Select/Combobox menus above the docked panel and mobile sheet.
|
|
86
|
+
- Preserve reply/edit drafts after failed saves, guard IME submission and draft length, invoke supplied upload cancellation/retry callbacks, and restore lightbox navigation and thumbnail reopen selection.
|
|
87
|
+
- Pass actual thread status to Resolve/Reopen controls and keep same-name assignees distinct by ID.
|
|
88
|
+
|
|
30
89
|
- Prevent a redundant remote-cursor CSS import from emitting an unscoped document stylesheet.
|
|
31
90
|
- Keep tool loading failures recoverable without resurrecting canceled or destroyed widgets.
|
|
32
91
|
- Preserve link semantics for navigation controls after the Base UI upgrade.
|
|
@@ -335,7 +394,7 @@ End-to-end build smoke tests against a freshly scaffolded app per framework (ins
|
|
|
335
394
|
- Keyboard shortcuts
|
|
336
395
|
- Environment-scoped comments
|
|
337
396
|
|
|
338
|
-
[
|
|
397
|
+
[0.7.0]: https://github.com/commentkit/comment-kit/pull/2
|
|
339
398
|
[0.6.1]: https://github.com/commentkit/comment-kit/compare/v0.6.0...v0.6.1
|
|
340
399
|
[0.6.0]: https://github.com/commentkit/comment-kit/compare/v0.5.3...v0.6.0
|
|
341
400
|
[0.5.3]: https://github.com/commentkit/comment-kit/compare/v0.5.2...v0.5.3
|
package/LICENSE
CHANGED
|
@@ -4,12 +4,28 @@ This software is provided under a proprietary license. You may use this
|
|
|
4
4
|
package solely in connection with CommentKit's hosted services and in
|
|
5
5
|
accordance with the CommentKit Terms of Service.
|
|
6
6
|
|
|
7
|
+
For that permitted use, you may install and copy the SDK, process it with
|
|
8
|
+
ordinary application build tools (including bundling, transpiling, tree-shaking
|
|
9
|
+
and minifying), and include the resulting SDK code in websites or applications
|
|
10
|
+
you own or are authorized to operate. You may deliver that embedded code to
|
|
11
|
+
end users solely as necessary for those websites or applications to use
|
|
12
|
+
CommentKit's hosted services. Preserve this license and applicable third-party
|
|
13
|
+
notices with the distributed application or its accompanying notices.
|
|
14
|
+
|
|
15
|
+
This permission does not authorize distributing the SDK as a standalone product,
|
|
16
|
+
offering a competing service, or transferring ownership of the software.
|
|
17
|
+
|
|
7
18
|
You may NOT:
|
|
8
|
-
- Modify
|
|
9
|
-
-
|
|
19
|
+
- Modify or create derivative works except for the build processing permitted above
|
|
20
|
+
- Reverse-engineer this software except where applicable law permits it
|
|
21
|
+
- Redistribute, sublicense, or sell this software except for permitted embedding
|
|
10
22
|
- Use this software independently of CommentKit's services
|
|
11
23
|
- Remove or alter any proprietary notices
|
|
12
24
|
|
|
25
|
+
Third-party components and assets identified in dist/THIRD_PARTY_NOTICES.txt
|
|
26
|
+
remain subject to their own licenses. The restrictions above apply only to
|
|
27
|
+
CommentKit's proprietary code and do not limit rights granted by those licenses.
|
|
28
|
+
|
|
13
29
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
14
30
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
15
31
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
package/README.md
CHANGED
|
@@ -5,8 +5,8 @@ Drop-in SDK for React, Vue, Svelte, Angular, Solid.js, Qwik, Preact, and vanilla
|
|
|
5
5
|
|
|
6
6
|
[npm version](https://www.npmjs.com/package/@commentkit/comment-kit)
|
|
7
7
|
[downloads](https://www.npmjs.com/package/@commentkit/comment-kit)
|
|
8
|
-
[license](
|
|
9
|
-
[docs](https://commentkit.dev/
|
|
8
|
+
[license](./LICENSE)
|
|
9
|
+
[docs](https://commentkit.dev/developers)
|
|
10
10
|
|
|
11
11
|
---
|
|
12
12
|
|
|
@@ -36,7 +36,7 @@ Drop-in SDK for React, Vue, Svelte, Angular, Solid.js, Qwik, Preact, and vanilla
|
|
|
36
36
|
| **Hold-to-Activate** | Configure select mode to be active only while a modifier key is held (`Alt`, `Meta`, `Control`, `Shift`) |
|
|
37
37
|
| **Animation Freeze** | While selecting, all host-page CSS animations, transitions, and Web Animations API tweens pause |
|
|
38
38
|
| **Touch Mode** | Long-press opens the context menu on touch devices |
|
|
39
|
-
| **MCP
|
|
39
|
+
| **MCP Companion** | Separate repository companion for MCP integrations; public npm distribution is not yet available |
|
|
40
40
|
| **Keyboard Shortcuts** | Full keyboard navigation and tool shortcuts |
|
|
41
41
|
| **Shadow DOM Isolation** | UI is fully isolated from your app's styles |
|
|
42
42
|
| **Environment Scoping** | New comments are tagged to production, staging, preview, or dev |
|
|
@@ -62,17 +62,26 @@ npm install @commentkit/comment-kit react react-dom
|
|
|
62
62
|
|
|
63
63
|
Every adapter renders the same React widget. React and ReactDOM are optional in package metadata so a headless installation can omit them; **all built-in UI integrations still need both**. Keep existing compatible React versions rather than upgrading them just to install CommentKit. Your adapter's framework is also a peer dependency.
|
|
64
64
|
|
|
65
|
+
The package is ESM-only; use `import`, not CommonJS `require()`. For default screenshots and image captures, also install `html2canvas`, or supply a custom `screenshotProvider`:
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
npm install html2canvas
|
|
69
|
+
```
|
|
70
|
+
|
|
65
71
|
### 2. Get Your API Key
|
|
66
72
|
|
|
67
73
|
1. Sign up at [commentkit.dev](https://commentkit.dev)
|
|
68
74
|
2. Create an organization
|
|
69
75
|
3. Create a project inside the organization
|
|
70
|
-
4.
|
|
76
|
+
4. Add the website domains that may use this project to its **allowed domains**
|
|
77
|
+
5. Copy the **API key** from the project dashboard
|
|
71
78
|
|
|
72
|
-
Each project gets its own API key. The SDK reads
|
|
79
|
+
Each project gets its own browser-facing API key. The SDK reads the project ID, WebSocket configuration and features from the API automatically. An empty origin allowlist denies browser requests by default. The project key identifies the project; a verified user session is still required to read private context and mutate feedback. Never embed user Bearer tokens or server credentials in your application source.
|
|
73
80
|
|
|
74
81
|
### 3. Add to Your App
|
|
75
82
|
|
|
83
|
+
On localhost the toolbar is visible. On production, staging and preview sites, press **Cmd/Ctrl + Shift + K** to open sign-in, then verify your email with OTP. Mount one instance for the app and clean it up when its host unmounts.
|
|
84
|
+
|
|
76
85
|
**Next.js (App Router)**
|
|
77
86
|
|
|
78
87
|
Import the client entry directly from your layout. The published React entry retains its `"use client"` boundary, and browser UI mounting happens after hydration. A `next/dynamic` wrapper with `ssr: false` is no longer required.
|
|
@@ -173,25 +182,25 @@ const { isAuthenticated, comments, toggleOverlay } = useCommentKit({
|
|
|
173
182
|
Or register as a plugin:
|
|
174
183
|
|
|
175
184
|
```ts
|
|
176
|
-
// main.ts —
|
|
185
|
+
// main.ts — registers the <CommentKit> component
|
|
177
186
|
import { CommentKitPlugin } from "@commentkit/comment-kit/vue";
|
|
178
187
|
|
|
179
188
|
app.use(CommentKitPlugin);
|
|
180
189
|
```
|
|
181
190
|
|
|
191
|
+
Then mount `<CommentKit api-key="your-api-key" />` once in your root template.
|
|
192
|
+
|
|
182
193
|
**Nuxt 3 / Nuxt 4**
|
|
183
194
|
|
|
184
|
-
|
|
195
|
+
For a client-only Nuxt integration, use a component whose filename ends in `.client.vue`. Its setup registers the hook, and Nuxt handles client mounting.
|
|
185
196
|
|
|
186
197
|
```vue
|
|
187
198
|
<!-- components/CommentKitClient.client.vue -->
|
|
188
199
|
<script setup lang="ts">
|
|
189
|
-
import { onMounted } from "vue";
|
|
190
200
|
import { useCommentKit } from "@commentkit/comment-kit/vue";
|
|
191
201
|
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
});
|
|
202
|
+
// Register lifecycle hooks during setup; the .client.vue boundary handles SSR.
|
|
203
|
+
useCommentKit({ apiKey: "your-api-key" });
|
|
195
204
|
</script>
|
|
196
205
|
|
|
197
206
|
<template><div /></template>
|
|
@@ -227,18 +236,28 @@ onMounted(() => {
|
|
|
227
236
|
|
|
228
237
|
**SvelteKit**
|
|
229
238
|
|
|
230
|
-
|
|
239
|
+
For an explicit client-only SvelteKit integration, create the store after a dynamic import and return synchronous teardown from `onMount`. `useCommentKit` registers Svelte lifecycle hooks, so call it during component initialization rather than after an `await`.
|
|
231
240
|
|
|
232
241
|
```svelte
|
|
233
242
|
<!-- src/routes/+layout.svelte -->
|
|
234
243
|
<script lang="ts">
|
|
235
244
|
import { onMount } from "svelte";
|
|
236
|
-
import {
|
|
237
|
-
|
|
238
|
-
onMount(
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
245
|
+
import type { SvelteCommentKitStore } from "@commentkit/comment-kit/svelte";
|
|
246
|
+
|
|
247
|
+
onMount(() => {
|
|
248
|
+
let disposed = false;
|
|
249
|
+
let store: SvelteCommentKitStore | undefined;
|
|
250
|
+
|
|
251
|
+
void import("@commentkit/comment-kit/svelte")
|
|
252
|
+
.then(({ createCommentKitStore }) => {
|
|
253
|
+
if (!disposed) store = createCommentKitStore({ apiKey: "your-api-key" });
|
|
254
|
+
})
|
|
255
|
+
.catch((error) => console.error("CommentKit could not load", error));
|
|
256
|
+
|
|
257
|
+
return () => {
|
|
258
|
+
disposed = true;
|
|
259
|
+
store?.destroy();
|
|
260
|
+
};
|
|
242
261
|
});
|
|
243
262
|
</script>
|
|
244
263
|
|
|
@@ -265,11 +284,12 @@ export const appConfig = {
|
|
|
265
284
|
|
|
266
285
|
```typescript
|
|
267
286
|
// app.component.ts
|
|
287
|
+
import { Component, inject } from "@angular/core";
|
|
268
288
|
import { CommentKitService } from "@commentkit/comment-kit/angular";
|
|
269
289
|
|
|
270
|
-
@Component({
|
|
290
|
+
@Component({ selector: "app-root", standalone: true, template: "<main>Your app</main>" })
|
|
271
291
|
export class AppComponent {
|
|
272
|
-
|
|
292
|
+
private readonly commentKit = inject(CommentKitService);
|
|
273
293
|
|
|
274
294
|
// RxJS observables — auto-emit on state changes
|
|
275
295
|
comments$ = this.commentKit.comments$;
|
|
@@ -296,19 +316,27 @@ function App() {
|
|
|
296
316
|
|
|
297
317
|
```tsx
|
|
298
318
|
import { component$ } from "@builder.io/qwik";
|
|
299
|
-
import { useCommentKit
|
|
319
|
+
import { useCommentKit } from "@commentkit/comment-kit/qwik";
|
|
300
320
|
|
|
301
321
|
export default component$(() => {
|
|
302
|
-
//
|
|
303
|
-
//
|
|
304
|
-
const {
|
|
322
|
+
// The hook uses useVisibleTask$ to mount only on the client.
|
|
323
|
+
// The Shadow DOM widget still requires React and ReactDOM.
|
|
324
|
+
const { core, isReady } = useCommentKit({
|
|
305
325
|
apiKey: "your-api-key",
|
|
306
326
|
});
|
|
307
327
|
|
|
308
|
-
return
|
|
328
|
+
return (
|
|
329
|
+
<button disabled={!isReady.value} onClick$={() => core.value?.toggleOverlay()}>
|
|
330
|
+
Toggle comments
|
|
331
|
+
</button>
|
|
332
|
+
);
|
|
309
333
|
});
|
|
310
334
|
```
|
|
311
335
|
|
|
336
|
+
Call the hook inside `component$`. In Qwik event handlers, access methods through the destructured `core` signal as above; do not capture plain bridge callbacks across an `onClick$` boundary. `useCommentKit$` remains a deprecated compatibility alias.
|
|
337
|
+
|
|
338
|
+
Use Qwik's optimizer and its supported Vite version to build the host app. Qwik 1.20.2 has an upstream declaration error that requires `skipLibCheck: true`; CommentKit's consumer API expressions are still checked. Client-only function options such as `screenshotProvider` cannot survive server serialization; Qwik callbacks that must resume should use `onReady$` and `onError$`.
|
|
339
|
+
|
|
312
340
|
**Preact**
|
|
313
341
|
|
|
314
342
|
```tsx
|
|
@@ -364,10 +392,12 @@ Or use vanilla JS in any `.astro` page:
|
|
|
364
392
|
</script>
|
|
365
393
|
```
|
|
366
394
|
|
|
367
|
-
**Vanilla JavaScript**
|
|
395
|
+
**Vanilla JavaScript with a bundler**
|
|
396
|
+
|
|
397
|
+
The following package import is resolved by a bundler such as Vite. A standalone HTML page needs a browser-ready bundle or an import map for the SDK and its peers; browsers do not resolve bare npm package names by themselves.
|
|
368
398
|
|
|
369
399
|
```html
|
|
370
|
-
<!-- CommentKit
|
|
400
|
+
<!-- In a bundler-managed HTML entry, CommentKit mounts its widget on demand.
|
|
371
401
|
Theme follows .dark class on <html> or system preference.
|
|
372
402
|
Tooltips, dialogs, and panels are built-in. -->
|
|
373
403
|
<script type="module">
|
|
@@ -411,7 +441,7 @@ const demo = await createCommentKitDemo({ storageKey: "website-demo" });
|
|
|
411
441
|
// demo.reset() starts a fresh sandbox; demo.destroy() removes it.
|
|
412
442
|
```
|
|
413
443
|
|
|
414
|
-
The real widget uses a private browser store with a fixed 24-hour lifetime and a memory fallback when storage is unavailable. No project key, OTP, production API writes, uploads, or realtime connection is created. The demo UI needs React and ReactDOM. The old root `createCommentKitDemo` export remains as a deprecated lazy compatibility wrapper.
|
|
444
|
+
The real widget uses a private browser store with a fixed 24-hour lifetime and a memory fallback when storage is unavailable. No project key, OTP, production API writes, uploads, or realtime connection is created. The demo UI needs React and ReactDOM. Its complete lifecycle and limits are in the included [private-demo guide](./docs/local-demo.md). The old root `createCommentKitDemo` export remains as a deprecated lazy compatibility wrapper.
|
|
415
445
|
|
|
416
446
|
## Member Invite Links
|
|
417
447
|
|
|
@@ -464,11 +494,11 @@ Every framework and meta-framework gets the full CommentKit UI — identical too
|
|
|
464
494
|
|
|
465
495
|
**Svelte family** — `@commentkit/comment-kit/svelte`
|
|
466
496
|
|
|
467
|
-
| Framework / Tool | Notes
|
|
468
|
-
| ------------------------ |
|
|
469
|
-
| Svelte 5 | Vite, esbuild — same import
|
|
470
|
-
| SvelteKit |
|
|
471
|
-
| Laravel Inertia (Svelte) | Mount in `app.ts`
|
|
497
|
+
| Framework / Tool | Notes |
|
|
498
|
+
| ------------------------ | --------------------------------------------------------------------- |
|
|
499
|
+
| Svelte 5 | Vite, esbuild — same import |
|
|
500
|
+
| SvelteKit | Create the store in `onMount` and destroy it on cleanup (see snippet) |
|
|
501
|
+
| Laravel Inertia (Svelte) | Mount in `app.ts` |
|
|
472
502
|
|
|
473
503
|
**Angular family** — `@commentkit/comment-kit/angular`
|
|
474
504
|
|
|
@@ -488,10 +518,10 @@ Every framework and meta-framework gets the full CommentKit UI — identical too
|
|
|
488
518
|
|
|
489
519
|
**Qwik family** — `@commentkit/comment-kit/qwik`
|
|
490
520
|
|
|
491
|
-
| Framework / Tool | Notes
|
|
492
|
-
| ---------------- |
|
|
493
|
-
| Qwik |
|
|
494
|
-
| QwikCity | Same;
|
|
521
|
+
| Framework / Tool | Notes |
|
|
522
|
+
| ---------------- | ----------------------------------------------------------------------- |
|
|
523
|
+
| Qwik | Call `useCommentKit` inside `component$`; the hook owns client mounting |
|
|
524
|
+
| QwikCity | Same; use in the root component or a shared layout |
|
|
495
525
|
|
|
496
526
|
**Preact family** — `@commentkit/comment-kit/preact`
|
|
497
527
|
|
|
@@ -509,19 +539,19 @@ Every framework and meta-framework gets the full CommentKit UI — identical too
|
|
|
509
539
|
|
|
510
540
|
**Vanilla / Web Components / HTML-first** — `@commentkit/comment-kit`
|
|
511
541
|
|
|
512
|
-
| Framework / Tool | Notes
|
|
513
|
-
| -------------------------- |
|
|
514
|
-
| Plain HTML (no framework) |
|
|
515
|
-
| Web Components / Lit | Mount in `connectedCallback` of a host component
|
|
516
|
-
| Stencil | Mount in `componentDidLoad`
|
|
517
|
-
| Marko (eBay) | Mount in client init
|
|
518
|
-
| Alpine.js / Petite-Vue | `<script>` tag at end of `<body>`
|
|
519
|
-
| htmx | Same as plain HTML
|
|
520
|
-
| Stimulus / Hotwire (Rails) | Mount in a Stimulus controller's `connect()`
|
|
521
|
-
| Phoenix LiveView | Mount in a `hook.mounted()`
|
|
522
|
-
| Laravel Livewire | Mount in Livewire hook
|
|
523
|
-
| Laravel Filament | Drop the `<script>` into a custom page layout
|
|
524
|
-
| Mitosis | Mount in the compiled framework's init
|
|
542
|
+
| Framework / Tool | Notes |
|
|
543
|
+
| -------------------------- | --------------------------------------------------------------------- |
|
|
544
|
+
| Plain HTML (no framework) | Browser-ready bundle or import map, then `new CommentKit({ apiKey })` |
|
|
545
|
+
| Web Components / Lit | Mount in `connectedCallback` of a host component |
|
|
546
|
+
| Stencil | Mount in `componentDidLoad` |
|
|
547
|
+
| Marko (eBay) | Mount in client init |
|
|
548
|
+
| Alpine.js / Petite-Vue | `<script>` tag at end of `<body>` |
|
|
549
|
+
| htmx | Same as plain HTML |
|
|
550
|
+
| Stimulus / Hotwire (Rails) | Mount in a Stimulus controller's `connect()` |
|
|
551
|
+
| Phoenix LiveView | Mount in a `hook.mounted()` |
|
|
552
|
+
| Laravel Livewire | Mount in Livewire hook |
|
|
553
|
+
| Laravel Filament | Drop the `<script>` into a custom page layout |
|
|
554
|
+
| Mitosis | Mount in the compiled framework's init |
|
|
525
555
|
|
|
526
556
|
**WebView / hybrid shells** — `@commentkit/comment-kit` (vanilla), works the same as a normal page
|
|
527
557
|
|
|
@@ -561,7 +591,7 @@ Every framework and meta-framework gets the full CommentKit UI — identical too
|
|
|
561
591
|
| ? | Show shortcuts overlay |
|
|
562
592
|
| Esc | Close / deselect / exit mode |
|
|
563
593
|
|
|
564
|
-
>
|
|
594
|
+
> Tool shortcuts require authentication and a visible overlay or active tool, with no input focused. Cmd/Ctrl + Shift + K also opens sign-in before authentication. Cmd/Ctrl + C respects active text selections — system copy still wins when text is highlighted.
|
|
565
595
|
|
|
566
596
|
---
|
|
567
597
|
|
|
@@ -577,7 +607,7 @@ Every framework and meta-framework gets the full CommentKit UI — identical too
|
|
|
577
607
|
| `solid-js` | Only for Solid.js apps | `>=1.0.0` |
|
|
578
608
|
| `@builder.io/qwik` | Only for Qwik apps | `>=1.0.0` |
|
|
579
609
|
| `preact` | Only for Preact apps | `>=10.0.0` |
|
|
580
|
-
| `html2canvas` |
|
|
610
|
+
| `html2canvas` | For default screenshots; not needed with a custom `screenshotProvider` | `>=1.4.0` |
|
|
581
611
|
| `pusher-js` | Bundled — no install needed (inlined into the SDK for real-time) | — |
|
|
582
612
|
| `element-source` | Optional — enables file:line + component stack in agent context and dev grabs | `>=0.0.5` |
|
|
583
613
|
|
|
@@ -618,7 +648,7 @@ Source resolution kicks in when the optional `element-source` peer dep is instal
|
|
|
618
648
|
|
|
619
649
|
### 3. Bulk export of stakeholder comments (developer, local)
|
|
620
650
|
|
|
621
|
-
The toolbar's **Dev export** button (visible only on localhost) opens a side panel listing
|
|
651
|
+
The toolbar's **Dev export** button (visible only on localhost) opens a side panel listing loaded open stakeholder comments from production / staging / preview. Load additional pages in the comments panel before exporting a larger selection. Select N comments, click **Copy N for agent**, and the clipboard receives one bundled Markdown payload — each comment's content, replies, author, page URL, the stakeholder's screenshot, the element's resolved source location (looked up against the developer's local build), and the selector / XPath fallback.
|
|
622
652
|
|
|
623
653
|
```ts
|
|
624
654
|
await commentKit.copyAgentContext({
|
|
@@ -631,11 +661,9 @@ const prompt = await commentKit.formatAgentContextAsync({ includeResolved: false
|
|
|
631
661
|
|
|
632
662
|
### MCP server
|
|
633
663
|
|
|
634
|
-
The
|
|
664
|
+
The separate `comment-kit-mcp` companion implements `list_comments`, `get_comment`, and `search_comments` for MCP clients. It is not included in this SDK, and that package name is not currently available from the public npm registry. Do not use an `npx comment-kit-mcp` command until its distribution is published.
|
|
635
665
|
|
|
636
|
-
|
|
637
|
-
npx -y comment-kit-mcp
|
|
638
|
-
```
|
|
666
|
+
Contributors with access to the private repository can follow the [MCP development guide](https://github.com/commentkit/comment-kit/blob/main/mcp/README.md). Clipboard-based agent handoff works directly from the SDK and does not require this companion.
|
|
639
667
|
|
|
640
668
|
---
|
|
641
669
|
|
|
@@ -646,6 +674,7 @@ Most apps only need `apiKey`. Everything else is auto-configured.
|
|
|
646
674
|
```typescript
|
|
647
675
|
{
|
|
648
676
|
apiKey: "your-api-key", // required — from dashboard
|
|
677
|
+
branch: "main", // optional — tag new feedback and filter this branch
|
|
649
678
|
enabled: true, // optional — set false to disable completely
|
|
650
679
|
screenshotProvider: async (el) => {...}, // optional — replaces html2canvas
|
|
651
680
|
ui: {
|
|
@@ -664,12 +693,20 @@ Most apps only need `apiKey`. Everything else is auto-configured.
|
|
|
664
693
|
}
|
|
665
694
|
```
|
|
666
695
|
|
|
696
|
+
### Project context and branches
|
|
697
|
+
|
|
698
|
+
After authentication, the SDK retrieves the actual team members, roles, storage usage and saved branches from the backend. The panel's **All** tab spans project pages; **Page** filters loaded threads to the current path. Use **Load more comments** to retrieve additional records. Shared links retrieve their target even when it is not in the first page.
|
|
699
|
+
|
|
700
|
+
`core.setBranch("preview")` filters that branch and tags new comments. `core.setBranch(null)` shows all branches. `core.reloadProjectContext()` refreshes members and usage. These APIs require the backend upgrade described below; old untagged records stay visible under All branches. `core.reloadComments()` refreshes the first page of the active branch, while `loadMoreComments()` appends the next page.
|
|
701
|
+
|
|
702
|
+
The production composer uploads files before saving, reuses completed uploads when a save is retried, and sends description, checklist, assignee, mention and device context with the record. Reply quotes and reactions persist on the corresponding message. `ReplyOptions`, `ReplyTarget`, `CommentCreateOptions`, `CommentDeviceInfo` and `ProjectContext` are available from the headless entry.
|
|
703
|
+
|
|
667
704
|
### Realtime at scale
|
|
668
705
|
|
|
669
706
|
Live cursors are the one realtime feature whose cost grows with the number of
|
|
670
707
|
simultaneous viewers — each client can receive up to _(online peers × ~30fps)_
|
|
671
|
-
cursor events. The SDK
|
|
672
|
-
inbound
|
|
708
|
+
cursor events. The SDK bounds rendered cursor state and updates with three
|
|
709
|
+
inbound limits (per-peer ~30fps throttle, a distinct-cursor cap, and a global
|
|
673
710
|
per-second emit budget), and the online-users roster is capped at 500. For very
|
|
674
711
|
high-concurrency projects where cursor sharing isn't worth the bandwidth, set
|
|
675
712
|
`realtime.cursors: false` (stops outbound cursor whispers and drops inbound
|
|
@@ -688,27 +725,40 @@ To disable in production:
|
|
|
688
725
|
|
|
689
726
|
CommentKit is designed to be safe for production use on customer-facing websites.
|
|
690
727
|
|
|
691
|
-
| Concern | How CommentKit handles it
|
|
692
|
-
| ----------------------------- |
|
|
693
|
-
| **No telemetry** | The SDK sends
|
|
694
|
-
| **
|
|
695
|
-
| **No install scripts** | `
|
|
696
|
-
| **No dynamic code execution** | Zero `eval()`, `new Function()`, `innerHTML`, or `document.write`.
|
|
697
|
-
| **Shadow DOM isolation** |
|
|
698
|
-
| **Source maps disabled** | No `.map` files ship. No `sourceMappingURL` in built files.
|
|
699
|
-
| **OTP authentication** | All commenters verify via email OTP. No passwords stored.
|
|
700
|
-
| **Session persistence** | Sanctum Bearer token is kept in **sessionStorage** (tab-scoped) so in-tab refresh keeps auth and the offline queue can drain. Closing the tab clears the session; logout / auth-expiry also clear the offline queue. Prefer Bearer over `X-User-Email` (spoofable).
|
|
701
|
-
| **Origin allowlist** | Browser requests must match the project's `allowed_domains` (wildcards like `*.example.com` supported). Empty allowlists deny browser traffic unless the backend enables `COMMENTKIT_ALLOW_EMPTY_ALLOWED_DOMAINS`. Server/MCP clients may omit `Origin`.
|
|
702
|
-
| **
|
|
728
|
+
| Concern | How CommentKit handles it |
|
|
729
|
+
| ----------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
730
|
+
| **No telemetry** | The SDK sends no analytics or tracking events. Submitted feedback includes its author, page, content, attachments and optional browser/OS/viewport context. |
|
|
731
|
+
| **Network requests** | API calls use `api.commentkit.dev` by default or your configured `baseUrl`; realtime connects to the host returned by project configuration. Displayed attachments and avatars load their supplied URLs. Google Fonts is contacted only when you opt in via `ui.loadRemoteFonts: true`. |
|
|
732
|
+
| **No install scripts** | This package declares no `preinstall`, `install` or `postinstall` hooks. Build and publication checks are separate maintainer scripts. |
|
|
733
|
+
| **No dynamic code execution** | Zero `eval()`, `new Function()`, `innerHTML`, or `document.write`. |
|
|
734
|
+
| **Shadow DOM isolation** | Widget styles are scoped inside Shadow DOM. Annotation, element capture and screenshots intentionally inspect the host page to attach feedback; host permissions and browser restrictions still apply. |
|
|
735
|
+
| **Source maps disabled** | No `.map` files ship. No `sourceMappingURL` in built files. |
|
|
736
|
+
| **OTP authentication** | All commenters verify via email OTP. No passwords stored. |
|
|
737
|
+
| **Session persistence** | Sanctum Bearer token is kept in **sessionStorage** (tab-scoped) so in-tab refresh keeps auth and the offline queue can drain. Closing the tab clears the session; logout / auth-expiry also clear the offline queue. Prefer Bearer over `X-User-Email` (spoofable). |
|
|
738
|
+
| **Origin allowlist** | Browser requests must match the project's `allowed_domains` (wildcards like `*.example.com` supported). Empty allowlists deny browser traffic unless the backend enables `COMMENTKIT_ALLOW_EMPTY_ALLOWED_DOMAINS`. Server/MCP clients may omit `Origin`. |
|
|
739
|
+
| **Stored data** | Authenticated comments store author identity, feedback and submitted context. The SDK uses tab-scoped session storage and a bounded local retry queue; the private demo uses a separate expiring browser store. |
|
|
740
|
+
|
|
741
|
+
The retry queue uses project-scoped `localStorage` and binds each mutation to its authenticated user. It can outlive a tab; replay requires the same user to sign in again. Logout and expired sessions clear it. Browser storage is best-effort, and raw file uploads are not persisted for offline replay. Observe offline events to distinguish queued feedback from feedback saved on the server.
|
|
703
742
|
|
|
704
743
|
### Backend API contract (SDK ↔ backend-v2)
|
|
705
744
|
|
|
706
745
|
- Base path is `/api` (not `/api/v1`). Default host: `https://api.commentkit.dev/api`.
|
|
707
746
|
- Auth: `X-API-Key` on every route; user identity via `Authorization: Bearer` (Sanctum ability `sdk`). Prefer Bearer over `X-User-Email` (only honored when `COMMENTKIT_ALLOW_EMAIL_AUTH=true`).
|
|
708
|
-
- Attachments:
|
|
747
|
+
- Attachments: upload drafts to `POST .../files`, then pass `attachment_ids` on comment/reply create or update. Direct uploads may target an authorized `comment_id` or `reply_id`. Unlinked drafts do not appear on comments.
|
|
709
748
|
- MCP comment reads may use API key only when `COMMENTKIT_MACHINE_READ_ENABLED` is on; mutations still need Bearer.
|
|
710
749
|
- Realtime: bind `comment_completed` separately from `comment_updated`.
|
|
711
750
|
|
|
751
|
+
### Backend upgrade order
|
|
752
|
+
|
|
753
|
+
This release adds server-backed widget context, reply quotes/reactions, metadata and lifecycle timestamps. Customers using CommentKit’s hosted service only install the SDK after CommentKit has deployed its matching API. The following sequence is for operators of the backend-v2 deployment:
|
|
754
|
+
|
|
755
|
+
1. Prepare a database backup and the matching backend release. Apply its additive migrations with the backend release’s `php artisan migrate --force` command before routing traffic to new server code. Required migrations are `2026_10_16_105715_add_widget_context_to_comments_and_replies` and `2026_10_16_114945_add_status_timestamps_to_comments_table`.
|
|
756
|
+
2. Deploy that API, configure the project’s allowed domains, and verify OTP delivery, authenticated `/api/projects/{slug}/context`, comment/reply retrieval, attachments and realtime. Existing clients remain supported; historical lifecycle dates stay null.
|
|
757
|
+
3. Install the candidate SDK in staging. Verify create/reply/edit/reaction/resolve/reopen and reload against that deployed API with a dedicated test project. The private local demo does not exercise the API or migrations.
|
|
758
|
+
4. Release the website integration, then publish the new npm version only after the deployment checks and release approval. If the client must be rolled back, keep the additive schema in place; do not drop columns containing newly stored feedback.
|
|
759
|
+
|
|
760
|
+
An older API’s missing context route is tolerated during a rolling upgrade, but that fallback does not provide the new persistent workflows. Do not treat a working local demo as proof that the production backend is ready.
|
|
761
|
+
|
|
712
762
|
### Screenshot redaction
|
|
713
763
|
|
|
714
764
|
Screenshots mask `input[type="password"]` fields by default. To exclude any other sensitive element from capture, mark it with the `data-commentkit-redact` attribute — redacted elements are blanked out before the image leaves the browser.
|
|
@@ -735,14 +785,14 @@ Measured from the current development build on 2026-10-16; KB below means 1,000
|
|
|
735
785
|
|
|
736
786
|
| Measurement | Before | Current |
|
|
737
787
|
| ----------------------------------------------------- | -------: | -------: |
|
|
738
|
-
| React initial SDK code, gzip | 262.8 KB |
|
|
739
|
-
| React through first widget open, cumulative gzip | — |
|
|
740
|
-
| React with every reachable optional chunk, gzip | 289.3 KB |
|
|
741
|
-
| Compressed npm archive, all adapters and declarations | 2.33 MB |
|
|
788
|
+
| React initial SDK code, gzip | 262.8 KB | 42.2 KB |
|
|
789
|
+
| React through first widget open, cumulative gzip | — | 306.3 KB |
|
|
790
|
+
| React with every reachable optional chunk, gzip | 289.3 KB | 368.1 KB |
|
|
791
|
+
| Compressed npm archive, all adapters and declarations | 2.33 MB | 432.9 KB |
|
|
742
792
|
|
|
743
|
-
These are different measurements. Browser estimates sum each SDK chunk compressed with gzip level 9 and exclude React, ReactDOM, framework peers, `html2canvas`, and `element-source`. First-open size includes the initial code; it is not an additional
|
|
793
|
+
These are different measurements. Browser estimates sum each SDK chunk compressed with gzip level 9 and exclude React, ReactDOM, framework peers, `html2canvas`, and `element-source`. First-open size includes the initial code; it is not an additional 306.3 KB. The npm archive includes every adapter and is not a browser download. Host bundling, caching, and enabled realtime features affect actual requests. Archive size is approximate and changes with included documentation.
|
|
744
794
|
|
|
745
|
-
The initial React load is smaller because work is deferred; the complete optional feature set has not been removed. All 46
|
|
795
|
+
The initial React load is smaller because work is deferred; the complete optional feature set has not been removed. All 46 retained primitive families remain available; the main product screens now use their audited compositions. Contributors with repository access can read the [full port audit](https://github.com/commentkit/comment-kit/blob/main/docs/ui-full-port-audit.md) and [performance baseline](https://github.com/commentkit/comment-kit/blob/main/docs/package-performance-audit.md) for verification, limitations and reproduction commands. `npm run build` enforces the package and load-stage size budgets.
|
|
746
796
|
|
|
747
797
|
---
|
|
748
798
|
|
|
@@ -763,11 +813,7 @@ The initial React load is smaller because work is deferred; the complete optiona
|
|
|
763
813
|
|
|
764
814
|
## Browser Support
|
|
765
815
|
|
|
766
|
-
|
|
767
|
-
| ------------- | ------- |
|
|
768
|
-
| Chrome / Edge | 80+ |
|
|
769
|
-
| Firefox | 80+ |
|
|
770
|
-
| Safari | 14+ |
|
|
816
|
+
Use current evergreen Chrome, Edge, Firefox or Safari. The UI requires Shadow DOM, Pointer Events and modern CSS color functions (`oklch` and `color-mix`). The browser test matrix targets current Playwright Chromium, Firefox and WebKit engines; older browser versions are not validated.
|
|
771
817
|
|
|
772
818
|
The published package declares **Node.js >=18**. Developing or building this repository requires **Node.js 24.15+** for the current Vite+, TypeScript, and framework toolchain. That development requirement does not raise the React 18 UI peer minimum.
|
|
773
819
|
|
|
@@ -777,7 +823,7 @@ The published package declares **Node.js >=18**. Developing or building this rep
|
|
|
777
823
|
|
|
778
824
|
For custom integrations, events, selective subscriptions, and TypeScript types, see the [API Reference](./docs/api-reference.md).
|
|
779
825
|
|
|
780
|
-
|
|
826
|
+
The repository is private. Contributors with access can run `npm run dev` and open `/design-system` to inspect all 46 internal primitive families in light/dark mode and RTL. The [development catalog guide](https://github.com/commentkit/comment-kit/blob/main/dev/README.md) explains its 111 examples and browser checks; the [primitive audit](https://github.com/commentkit/comment-kit/blob/main/docs/ui-primitive-parity-audit.md) records comparisons with the React reference. Open `/design-system/product` for the assembled panel, thread, composer, filters and settings with local fixture data and a simulated failed-save option. The [product audit](https://github.com/commentkit/comment-kit/blob/main/docs/ui-product-port-audit.md) records source comparisons and supported behavior. The gallery and its local fonts are development assets, excluded from the published package.
|
|
781
827
|
|
|
782
828
|
---
|
|
783
829
|
|
|
@@ -789,10 +835,9 @@ CommentKit is proprietary software. See [LICENSE](./LICENSE) for details.
|
|
|
789
835
|
|
|
790
836
|
## Links
|
|
791
837
|
|
|
792
|
-
- [
|
|
793
|
-
- [
|
|
838
|
+
- [Developer guide](https://commentkit.dev/developers)
|
|
839
|
+
- [Sign in](https://commentkit.dev/auth/otp)
|
|
794
840
|
- [Changelog](./CHANGELOG.md)
|
|
795
|
-
- [GitHub](https://github.com/commentkit/comment-kit)
|
|
841
|
+
- [GitHub (private contributor repository)](https://github.com/commentkit/comment-kit)
|
|
796
842
|
- [npm](https://www.npmjs.com/package/@commentkit/comment-kit)
|
|
797
843
|
- [Twitter / X](https://x.com/commentkit)
|
|
798
|
-
- [Discord](https://discord.gg/commentkit)
|