@useclickly/react 0.2.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 ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Clickly contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,70 @@
1
+ # @useclickly/react
2
+
3
+ > Click-to-annotate dev toolbar for React. Generates prompts your AI coding agent can actually act on.
4
+
5
+ Drop `<Clickly />` into your React app (dev only). A small floating action button appears in the bottom-right. Open it, click any element, write a comment — copy a perfectly-formatted markdown prompt into Claude Code / Cursor / Codex.
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ npm install -D @useclickly/react
11
+ # or: pnpm add -D @useclickly/react
12
+ # or: yarn add -D @useclickly/react
13
+ ```
14
+
15
+ ## Use
16
+
17
+ ```tsx
18
+ import { Clickly } from "@useclickly/react";
19
+
20
+ export default function App() {
21
+ return (
22
+ <>
23
+ <YourApp />
24
+ {process.env.NODE_ENV === "development" && <Clickly />}
25
+ </>
26
+ );
27
+ }
28
+ ```
29
+
30
+ That's it.
31
+
32
+ ## Features
33
+
34
+ - **Click any element** → annotation popup with comment box
35
+ - **Multi-select** — shift-click to pin elements, hit `Annotate (N)` when done
36
+ - **Area drag** — press `3`, drag a rectangle, every intersecting element gets pinned
37
+ - **Persistent numbered pins** on every annotated element
38
+ - **CSS selectors + DOM paths + computed styles** captured automatically
39
+ - **Auto-copy markdown** to clipboard on every Add
40
+ - **AFS 1.1 schema** — wire-compatible with Agentation, parseable by any MCP-aware agent
41
+ - **Crosshair cursor + text-select disabled** while inspecting
42
+ - **Shadow DOM** for zero CSS leakage in either direction
43
+ - **`"use client"` baked in** — Next.js App Router just works
44
+
45
+ ## Keyboard shortcuts
46
+
47
+ | Key | Action |
48
+ |---|---|
49
+ | `⌘/Ctrl + Shift + F` | Toggle the toolbar |
50
+ | `1` / `2` / `3` | Switch mode (single / multi / area) |
51
+ | `Enter` | Open the popup with all pinned elements |
52
+ | `Esc` | Cancel popup · or clear pins · or collapse toolbar |
53
+ | `C` | Copy all annotations as markdown |
54
+ | `X` | Clear all annotations |
55
+
56
+ ## Requirements
57
+
58
+ - React 18+ or 19+
59
+ - Browser environment (no SSR; component returns `null` server-side)
60
+ - Desktop only — touch / mobile is not optimised
61
+
62
+ ## Links
63
+
64
+ - Main repo and docs: [github.com/clickly/clickly](https://github.com/clickly/clickly)
65
+ - AFS 1.1 schema: see `@useclickly/core`
66
+ - MCP server (for agent integration): see `@useclickly/mcp-server`
67
+
68
+ ## License
69
+
70
+ MIT