feedtack 0.5.0 → 1.0.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.
@@ -1,4 +1,5 @@
1
- declare const SCHEMA_VERSION = "1.0.0";
1
+ declare const SCHEMA_VERSION = "2.0.0";
2
+ type FeedtackScope = 'site' | 'page' | 'element';
2
3
  interface FeedtackUser {
3
4
  /** Unique identifier — used for attribution across pins, replies, resolutions, archives */
4
5
  id: string;
@@ -81,17 +82,19 @@ interface FeedtackDeviceMeta {
81
82
  platform: string;
82
83
  touchEnabled: boolean;
83
84
  }
84
- type FeedtackSentiment = 'satisfied' | 'dissatisfied' | null;
85
+ type FeedtackSentiment = 'good' | 'bad' | null;
85
86
  interface FeedtackPayload {
86
87
  schemaVersion: string;
87
88
  /** Unique feedback ID, e.g. ft_01j... */
88
89
  id: string;
89
90
  /** ISO 8601 UTC */
90
91
  timestamp: string;
92
+ /** Feedback scope: site-wide, page-level, or element-specific */
93
+ scope: FeedtackScope;
91
94
  submittedBy: FeedtackUser;
92
95
  comment: string;
93
96
  sentiment: FeedtackSentiment;
94
- /** At least one pin required */
97
+ /** Pins placed on the page. Empty for site/page scope. */
95
98
  pins: FeedtackPin[];
96
99
  page: FeedtackPageMeta;
97
100
  viewport: FeedtackViewportMeta;
@@ -127,6 +130,7 @@ interface FeedtackFilter {
127
130
  url?: string;
128
131
  pathname?: string;
129
132
  userId?: string;
133
+ scope?: FeedtackScope;
130
134
  }
131
135
 
132
136
  /** Plugin contract — implement this interface to create a custom feedtack backend */
@@ -164,4 +168,4 @@ interface FeedtackTheme {
164
168
  /** Maps FeedtackTheme fields to CSS custom properties on #feedtack-root */
165
169
  declare function themeToCSS(theme: FeedtackTheme): Record<string, string>;
166
170
 
167
- export { type AncestorNode as A, type FeedtackAdapter as F, SCHEMA_VERSION as S, type FeedtackPayload as a, type FeedtackReply as b, type FeedtackResolution as c, type FeedtackFilter as d, type FeedbackItem as e, type FeedtackDeviceMeta as f, type FeedtackPageMeta as g, type FeedtackViewportMeta as h, type FeedtackPinTarget as i, type FeedtackArchive as j, type FeedtackBoundingRect as k, type FeedtackPin as l, type FeedtackSentiment as m, type FeedtackTheme as n, type FeedtackUser as o, themeToCSS as t };
171
+ export { type AncestorNode as A, type FeedtackAdapter as F, SCHEMA_VERSION as S, type FeedtackPayload as a, type FeedtackReply as b, type FeedtackResolution as c, type FeedtackFilter as d, type FeedbackItem as e, type FeedtackDeviceMeta as f, type FeedtackPageMeta as g, type FeedtackViewportMeta as h, type FeedtackPinTarget as i, type FeedtackArchive as j, type FeedtackBoundingRect as k, type FeedtackPin as l, type FeedtackScope as m, type FeedtackSentiment as n, type FeedtackTheme as o, type FeedtackUser as p, themeToCSS as t };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "feedtack",
3
- "version": "0.5.0",
3
+ "version": "1.0.1",
4
4
  "description": "Click anywhere. Drop a pin. Get a payload a developer can act on.",
5
5
  "type": "module",
6
6
  "license": "MIT",