@but212/atom-effect-jquery 0.21.2 → 0.21.3

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.d.ts CHANGED
@@ -160,6 +160,8 @@ declare interface RouteLifecycle {
160
160
  onEnter?: (params: Record<string, string>) => Record<string, string> | undefined;
161
161
  /** Called when leaving this route. Return false to prevent navigation. */
162
162
  onLeave?: () => boolean | undefined;
163
+ /** Called when the same route's query params change, instead of a full re-render. */
164
+ onParamsChange?: (params: Record<string, string>) => void;
163
165
  }
164
166
 
165
167
  /**
@@ -168,6 +170,8 @@ declare interface RouteLifecycle {
168
170
  export declare interface Router {
169
171
  /** Reactive atom containing current route name */
170
172
  currentRoute: WritableAtom<string>;
173
+ /** Reactive computed containing current query parameters */
174
+ queryParams: ReadonlyAtom<Record<string, string>>;
171
175
  /** Navigate to a different route */
172
176
  navigate: (route: string) => void;
173
177
  /** Cleanup and destroy the router */
@@ -181,6 +185,8 @@ declare interface TemplateRoute extends RouteLifecycle {
181
185
  /** Template selector (e.g., '#tmpl-home') */
182
186
  template: string;
183
187
  render?: never;
188
+ /** Called after template content is appended to the DOM. Receives a jQuery wrapper of the content. */
189
+ onMount?: ($content: JQuery) => void;
184
190
  }
185
191
 
186
192
  export { untracked }