@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/index.global.js +1 -1
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/react.js +1 -1
- package/dist/react.js.map +1 -1
- package/dist/types.d.ts +23 -0
- package/package.json +1 -1
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