@but212/atom-effect-jquery 0.23.0 → 0.24.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.
package/dist/index.d.ts CHANGED
@@ -220,6 +220,11 @@ export declare interface ListOptions<T> {
220
220
  empty?: ListRenderResult;
221
221
  /** Delegated event handlers attached to the container. */
222
222
  events?: Record<string, (item: T, index: number, e: JQuery.TriggeredEvent) => void>;
223
+ /**
224
+ * Custom equality checker to determine if an item has changed.
225
+ * Defaults to `shallowEqual`. If it returns false, the item is re-rendered (unless `update` is provided).
226
+ */
227
+ isEqual?: (a: T, b: T) => boolean;
223
228
  }
224
229
 
225
230
  /** Possible return types for render() / empty */
@@ -263,7 +268,7 @@ export { ReadonlyAtom }
263
268
  export declare const registry: BindingRegistry;
264
269
 
265
270
  export declare interface RenderRoute extends RouteLifecycle {
266
- render: (container: HTMLElement, route: string, params: Record<string, string>) => void;
271
+ render: (container: HTMLElement, route: string, params: Record<string, string>, onUnmount: (cleanupFn: () => void) => void, router: Router) => void;
267
272
  template?: never;
268
273
  }
269
274
 
@@ -284,9 +289,8 @@ export declare type RouteDefinition = TemplateRoute | RenderRoute;
284
289
 
285
290
  /** Shared route lifecycle hooks. */
286
291
  export declare interface RouteLifecycle {
287
- onEnter?: (params: Record<string, string>) => Record<string, string> | undefined;
288
- onLeave?: () => boolean | undefined;
289
- onParamsChange?: (params: Record<string, string>) => void;
292
+ onEnter?: (params: Record<string, string>, router: Router) => Record<string, string> | undefined;
293
+ onLeave?: (router: Router) => boolean | undefined;
290
294
  }
291
295
 
292
296
  export declare interface Router {
@@ -299,7 +303,7 @@ export declare interface Router {
299
303
  export declare interface TemplateRoute extends RouteLifecycle {
300
304
  template: string;
301
305
  render?: never;
302
- onMount?: ($content: JQuery) => void;
306
+ onMount?: ($content: JQuery, onUnmount: (cleanupFn: () => void) => void, router: Router) => void;
303
307
  }
304
308
 
305
309
  export { untracked }