@airnauts/comments-client 0.1.0
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/LICENSE +21 -0
- package/README.md +30 -0
- package/dist/activation/storage.d.ts +4 -0
- package/dist/activation/storage.d.ts.map +1 -0
- package/dist/anchor/capture.d.ts +14 -0
- package/dist/anchor/capture.d.ts.map +1 -0
- package/dist/anchor/extract.d.ts +3 -0
- package/dist/anchor/extract.d.ts.map +1 -0
- package/dist/anchor/index.d.ts +4 -0
- package/dist/anchor/index.d.ts.map +1 -0
- package/dist/anchor/rematch.d.ts +46 -0
- package/dist/anchor/rematch.d.ts.map +1 -0
- package/dist/anchor/runtime.d.ts +33 -0
- package/dist/anchor/runtime.d.ts.map +1 -0
- package/dist/anchor/selectors.d.ts +5 -0
- package/dist/anchor/selectors.d.ts.map +1 -0
- package/dist/api/client.d.ts +24 -0
- package/dist/api/client.d.ts.map +1 -0
- package/dist/api/errors.d.ts +8 -0
- package/dist/api/errors.d.ts.map +1 -0
- package/dist/app/app.d.ts +9 -0
- package/dist/app/app.d.ts.map +1 -0
- package/dist/app/mount.d.ts +6 -0
- package/dist/app/mount.d.ts.map +1 -0
- package/dist/app/providers.d.ts +7 -0
- package/dist/app/providers.d.ts.map +1 -0
- package/dist/app/widget-css.generated.d.ts +2 -0
- package/dist/app/widget-css.generated.d.ts.map +1 -0
- package/dist/config.d.ts +17 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/error-boundary.d.ts +16 -0
- package/dist/error-boundary.d.ts.map +1 -0
- package/dist/gate.d.ts +15 -0
- package/dist/gate.d.ts.map +1 -0
- package/dist/identity/IdentityModal.d.ts +8 -0
- package/dist/identity/IdentityModal.d.ts.map +1 -0
- package/dist/identity/storage.d.ts +7 -0
- package/dist/identity/storage.d.ts.map +1 -0
- package/dist/index.d.ts +24 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +38617 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/cn.d.ts +3 -0
- package/dist/lib/cn.d.ts.map +1 -0
- package/dist/marker/MarkerLayer.d.ts +14 -0
- package/dist/marker/MarkerLayer.d.ts.map +1 -0
- package/dist/marker/useFocusPin.d.ts +15 -0
- package/dist/marker/useFocusPin.d.ts.map +1 -0
- package/dist/panel/PanelDrawer.d.ts +5 -0
- package/dist/panel/PanelDrawer.d.ts.map +1 -0
- package/dist/panel/PanelProvider.d.ts +11 -0
- package/dist/panel/PanelProvider.d.ts.map +1 -0
- package/dist/panel/PanelRow.d.ts +7 -0
- package/dist/panel/PanelRow.d.ts.map +1 -0
- package/dist/panel/controller.d.ts +14 -0
- package/dist/panel/controller.d.ts.map +1 -0
- package/dist/panel/navigate.d.ts +13 -0
- package/dist/panel/navigate.d.ts.map +1 -0
- package/dist/panel/state.d.ts +42 -0
- package/dist/panel/state.d.ts.map +1 -0
- package/dist/positioning/coords.d.ts +28 -0
- package/dist/positioning/coords.d.ts.map +1 -0
- package/dist/positioning/layer.d.ts +12 -0
- package/dist/positioning/layer.d.ts.map +1 -0
- package/dist/positioning/lifecycle.d.ts +9 -0
- package/dist/positioning/lifecycle.d.ts.map +1 -0
- package/dist/react.d.ts +9 -0
- package/dist/react.d.ts.map +1 -0
- package/dist/react.js +24 -0
- package/dist/react.js.map +1 -0
- package/dist/test-setup.d.ts +2 -0
- package/dist/test-setup.d.ts.map +1 -0
- package/dist/threads/ThreadsProvider.d.ts +15 -0
- package/dist/threads/ThreadsProvider.d.ts.map +1 -0
- package/dist/threads/controller.d.ts +38 -0
- package/dist/threads/controller.d.ts.map +1 -0
- package/dist/threads/relativeTime.d.ts +3 -0
- package/dist/threads/relativeTime.d.ts.map +1 -0
- package/dist/threads/state.d.ts +98 -0
- package/dist/threads/state.d.ts.map +1 -0
- package/dist/threads/useThreads.d.ts +19 -0
- package/dist/threads/useThreads.d.ts.map +1 -0
- package/dist/ui/Attachment.d.ts +9 -0
- package/dist/ui/Attachment.d.ts.map +1 -0
- package/dist/ui/CommentList.d.ts +9 -0
- package/dist/ui/CommentList.d.ts.map +1 -0
- package/dist/ui/Composer.d.ts +20 -0
- package/dist/ui/Composer.d.ts.map +1 -0
- package/dist/ui/DetachedThread.d.ts +10 -0
- package/dist/ui/DetachedThread.d.ts.map +1 -0
- package/dist/ui/Launcher.d.ts +10 -0
- package/dist/ui/Launcher.d.ts.map +1 -0
- package/dist/ui/Pin.d.ts +17 -0
- package/dist/ui/Pin.d.ts.map +1 -0
- package/dist/ui/ThreadCard.d.ts +11 -0
- package/dist/ui/ThreadCard.d.ts.map +1 -0
- package/dist/ui/ThreadPopover.d.ts +14 -0
- package/dist/ui/ThreadPopover.d.ts.map +1 -0
- package/dist/ui/avatar.d.ts +4 -0
- package/dist/ui/avatar.d.ts.map +1 -0
- package/dist/ui/toast.d.ts +8 -0
- package/dist/ui/toast.d.ts.map +1 -0
- package/package.json +94 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ThreadListItem } from '@airnauts/comments-core';
|
|
2
|
+
import type { ApiClient } from '../api/client';
|
|
3
|
+
import type { Identity } from '../identity/storage';
|
|
4
|
+
export type ThreadCardProps = {
|
|
5
|
+
item: ThreadListItem;
|
|
6
|
+
client: Pick<ApiClient, 'getThread' | 'addComment' | 'setThreadStatus' | 'upload'>;
|
|
7
|
+
identity: Identity | null;
|
|
8
|
+
onNeedIdentity: (resume: (who: Identity) => void) => void;
|
|
9
|
+
};
|
|
10
|
+
export declare function ThreadCard({ item, client, identity, onNeedIdentity }: ThreadCardProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
//# sourceMappingURL=ThreadCard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThreadCard.d.ts","sourceRoot":"","sources":["../../src/ui/ThreadCard.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAyB,cAAc,EAAE,MAAM,yBAAyB,CAAA;AACpF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AASnD,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,cAAc,CAAA;IACpB,MAAM,EAAE,IAAI,CAAC,SAAS,EAAE,WAAW,GAAG,YAAY,GAAG,iBAAiB,GAAG,QAAQ,CAAC,CAAA;IAClF,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAAA;IACzB,cAAc,EAAE,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,QAAQ,KAAK,IAAI,KAAK,IAAI,CAAA;CAC1D,CAAA;AAED,wBAAgB,UAAU,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,cAAc,EAAE,EAAE,eAAe,2CAkHrF"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ThreadListItem } from '@airnauts/comments-core';
|
|
2
|
+
import type { ApiClient } from '../api/client';
|
|
3
|
+
import type { Identity } from '../identity/storage';
|
|
4
|
+
import type { XY } from '../positioning/coords';
|
|
5
|
+
export type ThreadPopoverProps = {
|
|
6
|
+
item: ThreadListItem;
|
|
7
|
+
pin: XY;
|
|
8
|
+
client: Pick<ApiClient, 'getThread' | 'addComment' | 'setThreadStatus' | 'upload'>;
|
|
9
|
+
identity: Identity | null;
|
|
10
|
+
onNeedIdentity: (resume: (who: Identity) => void) => void;
|
|
11
|
+
focused?: boolean;
|
|
12
|
+
};
|
|
13
|
+
export declare function ThreadPopover({ item, pin, client, identity, onNeedIdentity, focused, }: ThreadPopoverProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
//# sourceMappingURL=ThreadPopover.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThreadPopover.d.ts","sourceRoot":"","sources":["../../src/ui/ThreadPopover.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAG7D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAE9C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AACnD,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,uBAAuB,CAAA;AAK/C,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,cAAc,CAAA;IACpB,GAAG,EAAE,EAAE,CAAA;IACP,MAAM,EAAE,IAAI,CAAC,SAAS,EAAE,WAAW,GAAG,YAAY,GAAG,iBAAiB,GAAG,QAAQ,CAAC,CAAA;IAClF,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAAA;IACzB,cAAc,EAAE,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,QAAQ,KAAK,IAAI,KAAK,IAAI,CAAA;IACzD,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAA;AAED,wBAAgB,aAAa,CAAC,EAC5B,IAAI,EACJ,GAAG,EACH,MAAM,EACN,QAAQ,EACR,cAAc,EACd,OAAO,GACR,EAAE,kBAAkB,2CAkCpB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"avatar.d.ts","sourceRoot":"","sources":["../../src/ui/avatar.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAA;AAErD,wBAAgB,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAS/C;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAIhD"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
type ToastFn = (message: string) => void;
|
|
3
|
+
export declare function useToast(): ToastFn;
|
|
4
|
+
export declare function ToastProvider({ children }: {
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=toast.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toast.d.ts","sourceRoot":"","sources":["../../src/ui/toast.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,SAAS,EAAqC,MAAM,OAAO,CAAA;AAKxF,KAAK,OAAO,GAAG,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;AAIxC,wBAAgB,QAAQ,IAAI,OAAO,CAElC;AAID,wBAAgB,aAAa,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,2CA6BlE"}
|
package/package.json
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@airnauts/comments-client",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Embeddable commenting widget and React wrapper for the Airnauts commenting tool.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"comments",
|
|
7
|
+
"commenting",
|
|
8
|
+
"annotations",
|
|
9
|
+
"feedback",
|
|
10
|
+
"airnauts",
|
|
11
|
+
"widget",
|
|
12
|
+
"react"
|
|
13
|
+
],
|
|
14
|
+
"license": "MIT",
|
|
15
|
+
"author": "Airnauts",
|
|
16
|
+
"homepage": "https://github.com/Airnauts/commenting-tool#readme",
|
|
17
|
+
"repository": {
|
|
18
|
+
"type": "git",
|
|
19
|
+
"url": "git+https://github.com/Airnauts/commenting-tool.git",
|
|
20
|
+
"directory": "packages/client"
|
|
21
|
+
},
|
|
22
|
+
"bugs": {
|
|
23
|
+
"url": "https://github.com/Airnauts/commenting-tool/issues"
|
|
24
|
+
},
|
|
25
|
+
"type": "module",
|
|
26
|
+
"exports": {
|
|
27
|
+
".": {
|
|
28
|
+
"types": "./dist/index.d.ts",
|
|
29
|
+
"import": "./dist/index.js"
|
|
30
|
+
},
|
|
31
|
+
"./react": {
|
|
32
|
+
"types": "./dist/react.d.ts",
|
|
33
|
+
"import": "./dist/react.js"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"files": [
|
|
37
|
+
"dist",
|
|
38
|
+
"!dist/.tsbuildinfo",
|
|
39
|
+
"README.md",
|
|
40
|
+
"LICENSE"
|
|
41
|
+
],
|
|
42
|
+
"publishConfig": {
|
|
43
|
+
"access": "public"
|
|
44
|
+
},
|
|
45
|
+
"dependencies": {
|
|
46
|
+
"@radix-ui/react-dialog": "^1.1.6",
|
|
47
|
+
"@radix-ui/react-popover": "^1.1.6",
|
|
48
|
+
"clsx": "^2.1.1",
|
|
49
|
+
"tailwind-merge": "^2.6.0",
|
|
50
|
+
"@airnauts/comments-core": "^0.1.0"
|
|
51
|
+
},
|
|
52
|
+
"peerDependencies": {
|
|
53
|
+
"react": "^19.0.0",
|
|
54
|
+
"react-dom": "^19.0.0"
|
|
55
|
+
},
|
|
56
|
+
"peerDependenciesMeta": {
|
|
57
|
+
"react": {
|
|
58
|
+
"optional": true
|
|
59
|
+
},
|
|
60
|
+
"react-dom": {
|
|
61
|
+
"optional": true
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"devDependencies": {
|
|
65
|
+
"@size-limit/preset-small-lib": "^11.1.6",
|
|
66
|
+
"@tailwindcss/cli": "^4.0.0",
|
|
67
|
+
"@testing-library/jest-dom": "^6.6.3",
|
|
68
|
+
"@testing-library/react": "^16.2.0",
|
|
69
|
+
"@types/react": "^19.0.0",
|
|
70
|
+
"@types/react-dom": "^19.0.0",
|
|
71
|
+
"@vitejs/plugin-react": "^4.3.4",
|
|
72
|
+
"jsdom": "^26.0.0",
|
|
73
|
+
"size-limit": "^11.1.6",
|
|
74
|
+
"tailwindcss": "^4.0.0",
|
|
75
|
+
"react": "^19.0.0",
|
|
76
|
+
"react-dom": "^19.0.0",
|
|
77
|
+
"@airnauts/comments-server": "0.1.0",
|
|
78
|
+
"@airnauts/comments-adapter-memory": "0.1.0"
|
|
79
|
+
},
|
|
80
|
+
"size-limit": [
|
|
81
|
+
{
|
|
82
|
+
"name": "@airnauts/comments-client (esm, brotli)",
|
|
83
|
+
"path": "dist/index.js",
|
|
84
|
+
"limit": "300 kB"
|
|
85
|
+
}
|
|
86
|
+
],
|
|
87
|
+
"scripts": {
|
|
88
|
+
"build:css": "node scripts/build-css.mjs",
|
|
89
|
+
"build": "pnpm build:css && rm -rf dist && tsup && tsc --build --force",
|
|
90
|
+
"typecheck": "tsc --build",
|
|
91
|
+
"test": "pnpm build:css && vitest run",
|
|
92
|
+
"size": "size-limit"
|
|
93
|
+
}
|
|
94
|
+
}
|