@siteping/widget 0.9.14 → 0.9.15

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
@@ -161,6 +161,28 @@ export interface SitepingConfig {
161
161
  * `instance.focusFeedback(id)` explicitly.
162
162
  */
163
163
  deepLink?: boolean | SitepingDeepLinkOptions | undefined;
164
+ /**
165
+ * Automatically re-fetch feedbacks when the page changes during client-side
166
+ * (SPA) navigation. Enabled by default.
167
+ *
168
+ * The widget is normally mounted once (singleton) inside a persistent layout
169
+ * — e.g. a Next.js App Router `layout.tsx`, which does NOT remount on
170
+ * client-side navigation. Without this, init runs a single time and both the
171
+ * panel list and the page markers stay frozen on the page where the widget
172
+ * first mounted. With it on, the widget patches the History API
173
+ * (`pushState`/`replaceState`, which SPA routers call instead of triggering
174
+ * `popstate`) and listens for `popstate`/`hashchange`, then re-fetches when
175
+ * the scope key (`getPageScope().url` + template) actually changes.
176
+ *
177
+ * This re-fetches data only — it deliberately does NOT re-focus or re-scroll
178
+ * to an annotation (deep-link focus stays initial-load only; see `deepLink`),
179
+ * so normal browsing is never interrupted by a surprise scroll.
180
+ *
181
+ * - `true` (default) — watch navigation and re-fetch on route change.
182
+ * - `false` — never touch the History API; hosts drive updates manually via
183
+ * `instance.refresh()`.
184
+ */
185
+ watchNavigation?: boolean | undefined;
164
186
  /**
165
187
  * Pre-fill author identity from the host application — typically the
166
188
  * currently signed-in user. When set, the widget uses these values
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@siteping/widget",
3
- "version": "0.9.14",
3
+ "version": "0.9.15",
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,