@loupekit/shared 0.4.3-next.15 → 0.5.0-next.16

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/README.md CHANGED
@@ -49,7 +49,7 @@ npm i @loupekit/shared
49
49
 
50
50
  | Type | Purpose |
51
51
  | --- | --- |
52
- | **`Comment`** | A piece of visual feedback: body, author, status, element `anchor`, captured `context` (HTML + styles), screenshot URL, and for free-region comments — `kind: "region"` + a `region` rectangle. |
52
+ | **`Comment`** | A piece of visual feedback: body, author, status, element `anchor`, captured `context` (HTML + styles), screenshot URL. `kind` is `"element"`, `"region"` (+ a `region` rectangle), or `"free"` — a page-level note with no element and no screenshot, positioned via `offset`. |
53
53
  | **`Anchor`** | The multi-signal element fingerprint (tag, CSS path, XPath, testid, text, attributes, nth-of-type, rect, viewport) used to re-locate an element after a redeploy. |
54
54
  | **`ElementContext`** | The target's `outerHTML` + a curated slice of computed styles. |
55
55
  | **`RegionRect`** | A free-region rectangle in document coordinates, with optional element-relative fractions (`rel`) so regions track responsive reflow. |
package/dist/index.d.ts CHANGED
@@ -50,8 +50,11 @@ export interface RegionRect {
50
50
  * How a comment is pinned to the page:
51
51
  * - "element" (default) → anchored to a DOM element via its fingerprint.
52
52
  * - "region" → a free-form rectangle the user dragged out; carries `region`.
53
+ * - "free" → a page-level note dropped at a point, tied to no element and
54
+ * carrying no screenshot. Its drop point lives in `offset`,
55
+ * stored as a fraction of the document (x,y ∈ [0,1]).
53
56
  */
54
- export type CommentKind = "element" | "region";
57
+ export type CommentKind = "element" | "region" | "free";
55
58
  /** Device class the feedback was captured on, derived from the viewport width. */
56
59
  export type DeviceType = "mobile" | "tablet" | "desktop";
57
60
  /** Classify a viewport width into a device bucket (mobile < 768 ≤ tablet < 1024 ≤ desktop). */
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "email": "m.ashraf.saed@gmail.com",
6
6
  "url": "https://www.linkedin.com/in/mohamedashrafelsaed/"
7
7
  },
8
- "version": "0.4.3-next.15",
8
+ "version": "0.5.0-next.16",
9
9
  "description": "Canonical TypeScript types + helpers (normalizeUrl) shared across the Loupe visual-feedback platform.",
10
10
  "keywords": [
11
11
  "loupe",