@af-utils/virtual-core
Advanced tools
Comparing version 0.0.2 to 0.0.3
@@ -1,4 +0,4 @@ | ||
export const raw = 7246; | ||
export const min = 4640; | ||
export const minGz = 2072; | ||
export const minBrotli = 1896; | ||
export const raw = 7261; | ||
export const min = 4655; | ||
export const minGz = 2073; | ||
export const minBrotli = 1899; |
@@ -1,4 +0,4 @@ | ||
export const raw = 7202; | ||
export const min = 4687; | ||
export const minGz = 2083; | ||
export const minBrotli = 1904; | ||
export const raw = 7217; | ||
export const min = 4702; | ||
export const minGz = 2085; | ||
export const minBrotli = 1913; |
@@ -11,22 +11,2 @@ /** | ||
* @public | ||
* Possible events, supported by {@link VirtualScroller.on} method | ||
*/ | ||
declare const Event_2: { | ||
/** {@link VirtualScroller.from} or {@link VirtualScroller.to} was changed */ | ||
readonly RANGE: 0; | ||
/** sum of all item sizes changed */ | ||
readonly SCROLL_SIZE: 1; | ||
/** at least one item size changed */ | ||
readonly SIZES: 2; | ||
}; | ||
/** | ||
* @public | ||
* {@link (Event:variable)} is exported as constant, so separate type is needed to emulate enum behavior | ||
*/ | ||
declare type Event_2 = (typeof Event_2)[keyof typeof Event_2]; | ||
export { Event_2 as Event } | ||
/** | ||
* @public | ||
* Scrollable container type | ||
@@ -109,3 +89,3 @@ */ | ||
*/ | ||
on(callBack: () => void, events: readonly Event_2[] | Event_2[]): () => void; | ||
on(callBack: () => void, events: readonly VirtualScrollerEvent[] | VirtualScrollerEvent[]): () => void; | ||
/** | ||
@@ -137,2 +117,3 @@ * Call all `event` subscribers | ||
* | ||
* @remarks | ||
* For example `5.3` stands for item at index `5` + `30%` of its size. | ||
@@ -229,2 +210,21 @@ * Used to remember scroll position before prepending elements. | ||
* @public | ||
* Possible events, supported by {@link VirtualScroller.on} method | ||
*/ | ||
export declare const VirtualScrollerEvent: { | ||
/** {@link VirtualScroller.from} or {@link VirtualScroller.to} was changed */ | ||
readonly RANGE: 0; | ||
/** sum of all item sizes changed */ | ||
readonly SCROLL_SIZE: 1; | ||
/** at least one item size changed */ | ||
readonly SIZES: 2; | ||
}; | ||
/** | ||
* @public | ||
* {@link (VirtualScrollerEvent:variable)} is exported as constant, so separate type is needed to emulate enum behavior | ||
*/ | ||
export declare type VirtualScrollerEvent = (typeof VirtualScrollerEvent)[keyof typeof VirtualScrollerEvent]; | ||
/** | ||
* @public | ||
* {@link VirtualScroller} constructor argument type | ||
@@ -231,0 +231,0 @@ */ |
@@ -219,3 +219,3 @@ const t = 2147483647, s = { | ||
export { s as Event, x as VirtualScroller, i as _ALL_EVENTS }; | ||
export { x as VirtualScroller, s as VirtualScrollerEvent, i as _ALL_EVENTS }; | ||
//# sourceMappingURL=index.js.map |
@@ -219,3 +219,3 @@ const t = 2147483647, s = { | ||
export { s as Event, x as VirtualScroller, i as _ALL_EVENTS }; | ||
export { x as VirtualScroller, s as VirtualScrollerEvent, i as _ALL_EVENTS }; | ||
//# sourceMappingURL=index.server.js.map |
@@ -16,3 +16,3 @@ export declare const DEFAULT_OVERSCAN_COUNT = 3; | ||
*/ | ||
export declare const Event: { | ||
export declare const VirtualScrollerEvent: { | ||
/** {@link VirtualScroller.from} or {@link VirtualScroller.to} was changed */ | ||
@@ -27,5 +27,5 @@ readonly RANGE: 0; | ||
* @public | ||
* {@link (Event:variable)} is exported as constant, so separate type is needed to emulate enum behavior | ||
* {@link (VirtualScrollerEvent:variable)} is exported as constant, so separate type is needed to emulate enum behavior | ||
*/ | ||
export type Event = (typeof Event)[keyof typeof Event]; | ||
export type VirtualScrollerEvent = (typeof VirtualScrollerEvent)[keyof typeof VirtualScrollerEvent]; | ||
/** @internal */ | ||
@@ -32,0 +32,0 @@ export declare const _ALL_EVENTS: readonly [0, 1, 2]; |
@@ -6,3 +6,3 @@ /** | ||
export { default as VirtualScroller } from "./models/VirtualScroller"; | ||
export { Event, _ALL_EVENTS } from "./constants"; | ||
export { VirtualScrollerEvent, _ALL_EVENTS } from "./constants"; | ||
export * from "./types"; |
@@ -1,2 +0,2 @@ | ||
import { type Event } from "../../constants"; | ||
import { VirtualScrollerEvent } from "../../constants"; | ||
import type { ScrollElement, VirtualScrollerInitialParams, VirtualScrollerRuntimeParams } from "../../../types"; | ||
@@ -76,3 +76,3 @@ /** | ||
*/ | ||
on(callBack: () => void, events: readonly Event[] | Event[]): () => void; | ||
on(callBack: () => void, events: readonly VirtualScrollerEvent[] | VirtualScrollerEvent[]): () => void; | ||
/** | ||
@@ -104,2 +104,3 @@ * Call all `event` subscribers | ||
* | ||
* @remarks | ||
* For example `5.3` stands for item at index `5` + `30%` of its size. | ||
@@ -106,0 +107,0 @@ * Used to remember scroll position before prepending elements. |
{ | ||
"name": "@af-utils/virtual-core", | ||
"private": false, | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "Model for rendering large scrollable data", | ||
@@ -6,0 +6,0 @@ "repository": "https://github.com/nowaalex/af-utils.git", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
115919
986