@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
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Vue 3 Composition API integration for CommentKit
|
|
3
|
+
* Uses the shared adapter bridge for method delegations.
|
|
4
|
+
*/
|
|
5
|
+
import { type Ref, type ShallowRef, type VNode } from "vue";
|
|
6
|
+
import { CommentKitCore } from "../core/comment-kit-core";
|
|
7
|
+
import { type AdapterMethods } from "../adapters/bridge";
|
|
8
|
+
import type { ApiError, Comment, CommentKitConfig, CommentKitState, DrawingData, ScreenshotResult, User } from "../core/types";
|
|
9
|
+
export interface VueCommentKitOptions extends CommentKitConfig {
|
|
10
|
+
onReady?: () => void;
|
|
11
|
+
onError?: (error: ApiError) => void;
|
|
12
|
+
}
|
|
13
|
+
export interface VueCommentKitReturn extends AdapterMethods {
|
|
14
|
+
state: Ref<CommentKitState | null>;
|
|
15
|
+
isReady: Ref<boolean>;
|
|
16
|
+
isLoading: Ref<boolean>;
|
|
17
|
+
error: Ref<ApiError | null>;
|
|
18
|
+
core: ShallowRef<CommentKitCore | null>;
|
|
19
|
+
isAuthenticated: Ref<boolean>;
|
|
20
|
+
isOverlayVisible: Ref<boolean>;
|
|
21
|
+
isSidebarVisible: Ref<boolean>;
|
|
22
|
+
currentUser: Ref<User | null>;
|
|
23
|
+
comments: Ref<Comment[]>;
|
|
24
|
+
activeTool: Ref<string | null>;
|
|
25
|
+
otpStep: Ref<string>;
|
|
26
|
+
otpEmail: Ref<string | null>;
|
|
27
|
+
pendingMutationCount: Ref<number>;
|
|
28
|
+
isOnline: Ref<boolean>;
|
|
29
|
+
selectedComment: Ref<Comment | null>;
|
|
30
|
+
connectionStatus: Ref<string>;
|
|
31
|
+
panelView: Ref<string>;
|
|
32
|
+
isShortcutsOverlayVisible: Ref<boolean>;
|
|
33
|
+
activeDrawing: Ref<DrawingData | null>;
|
|
34
|
+
activeScreenshot: Ref<ScreenshotResult | null>;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Vue composable for CommentKit.
|
|
38
|
+
*
|
|
39
|
+
* Accepts either a plain options object or a getter over reactive sources
|
|
40
|
+
* (e.g. `() => ({ apiKey: props.apiKey, ... })`). With a getter, changes to
|
|
41
|
+
* `apiKey`/`baseUrl`/`enabled`/`ui` destroy and re-create the core — parity
|
|
42
|
+
* with the React adapter. A plain object is captured once (no reactivity).
|
|
43
|
+
*
|
|
44
|
+
* `isReady` becomes true once the core is created and the first state
|
|
45
|
+
* snapshot has arrived (aligned across all adapters); the `onReady` callback
|
|
46
|
+
* still fires on first authentication.
|
|
47
|
+
*/
|
|
48
|
+
export declare function useCommentKit(options: VueCommentKitOptions | (() => VueCommentKitOptions)): VueCommentKitReturn;
|
|
49
|
+
export declare const CommentKit: {
|
|
50
|
+
name: string;
|
|
51
|
+
props: {
|
|
52
|
+
apiKey: {
|
|
53
|
+
type: StringConstructor;
|
|
54
|
+
required: boolean;
|
|
55
|
+
};
|
|
56
|
+
baseUrl: {
|
|
57
|
+
type: StringConstructor;
|
|
58
|
+
default: undefined;
|
|
59
|
+
};
|
|
60
|
+
enabled: {
|
|
61
|
+
default: undefined;
|
|
62
|
+
};
|
|
63
|
+
screenshotProvider: {
|
|
64
|
+
type: FunctionConstructor;
|
|
65
|
+
default: undefined;
|
|
66
|
+
};
|
|
67
|
+
ui: {
|
|
68
|
+
type: ObjectConstructor;
|
|
69
|
+
default: undefined;
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
emits: string[];
|
|
73
|
+
setup(props: Record<string, unknown>, { emit, slots, }: {
|
|
74
|
+
emit: (event: string, ...args: unknown[]) => void;
|
|
75
|
+
slots: Record<string, (() => VNode[]) | undefined>;
|
|
76
|
+
}): () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
77
|
+
[key: string]: any;
|
|
78
|
+
}>;
|
|
79
|
+
};
|
|
80
|
+
export declare const CommentKitPlugin: {
|
|
81
|
+
install(app: {
|
|
82
|
+
component: (name: string, component: unknown) => void;
|
|
83
|
+
provide: (key: string, value: unknown) => void;
|
|
84
|
+
}): void;
|
|
85
|
+
};
|
|
86
|
+
export type { AgentCommentContext, AgentContextExport, AgentContextOptions, AgentElementContext, ApiError, Comment, CommentKitConfig, CommentKitEvents, CommentKitState, ConnectionStatus, DevGrabAttachment, DevGrabAttachmentPathSource, DevGrabOptions, DrawingData, DrawingPath, EventListener, PanelView, Position, ScreenshotResult, StateSlice, TaskChecklistItem, TextSelection, Unsubscribe, User, } from "../core/types";
|
|
87
|
+
export default CommentKit;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { createContext as e, useContext as t } from "react";
|
|
2
|
+
var n = e(null), r = !1;
|
|
3
|
+
function i() {
|
|
4
|
+
let e = t(n);
|
|
5
|
+
return e === null && !r && typeof process < "u" && process.env.NODE_ENV !== "production" && (r = !0, console.warn("[CommentKit] useShadowRoot() returned null — a portal primitive (Popover/Dialog/Select/etc.) is rendering outside <ShadowRootContext.Provider>. Portalled content will fall back to document.body, where ck-* styles are not present.")), e;
|
|
6
|
+
}
|
|
7
|
+
export { i as n, n as t };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescriptor, r = Object.getOwnPropertyNames, i = Object.getPrototypeOf, a = Object.prototype.hasOwnProperty, o = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), s = (e, i, o, s) => {
|
|
2
|
+
if (i && typeof i == "object" || typeof i == "function") for (var c = r(i), l = 0, u = c.length, d; l < u; l++) d = c[l], !a.call(e, d) && d !== o && t(e, d, {
|
|
3
|
+
get: ((e) => i[e]).bind(null, d),
|
|
4
|
+
enumerable: !(s = n(i, d)) || s.enumerable
|
|
5
|
+
});
|
|
6
|
+
return e;
|
|
7
|
+
}, c = (n, r, a) => (a = n == null ? {} : e(i(n)), s(r || !n || !n.__esModule ? t(a, "default", {
|
|
8
|
+
value: n,
|
|
9
|
+
enumerable: !0
|
|
10
|
+
}) : a, n));
|
|
11
|
+
export { c as n, o as t };
|