@siteping/widget 0.9.8 → 0.9.9

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/dist/types.d.ts CHANGED
@@ -82,6 +82,29 @@ export interface SitepingConfig {
82
82
  } | undefined;
83
83
  /** Called when the widget is skipped (production mode, mobile viewport) */
84
84
  onSkip?: (reason: "production" | "mobile") => void;
85
+ /**
86
+ * Pre-fill author identity from the host application — typically the
87
+ * currently signed-in user. When set, the widget uses these values
88
+ * directly and never shows the identity modal, even on first feedback.
89
+ *
90
+ * Use case: SSO-integrated apps where the end user is already
91
+ * authenticated by the host. Avoids the awkward "enter your name and
92
+ * email" prompt for users the host already knows.
93
+ *
94
+ * When unset (default), the widget falls back to localStorage and shows
95
+ * the modal on first feedback as before — existing behavior unchanged.
96
+ *
97
+ * Note: `config.identity` is **not** persisted to localStorage. It is
98
+ * read at widget init time, not on every render. Hosts that need live
99
+ * identity updates after sign-in/sign-out should currently remount the
100
+ * widget (e.g. via a React `key` on the wrapping component). See
101
+ * https://github.com/NeosiaNexus/SitePing/issues/85 for tracking a
102
+ * future enhancement that propagates identity updates without a remount.
103
+ */
104
+ identity?: {
105
+ name: string;
106
+ email: string;
107
+ } | undefined;
85
108
  /** Called when the feedback panel is opened. */
86
109
  onOpen?: () => void;
87
110
  /** Called when the feedback panel is closed. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@siteping/widget",
3
- "version": "0.9.8",
3
+ "version": "0.9.9",
4
4
  "description": "Feedback widget for client review during development — annotations, bugs, questions directly on the site",
5
5
  "type": "module",
6
6
  "sideEffects": false,