Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@egjs/grid

Package Overview
Dependencies
Maintainers
9
Versions
94
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@egjs/grid - npm Package Compare versions

Comparing version 1.10.0-beta.0 to 1.10.0-beta.1

dist/grid.cjs.js

6

declaration/ContainerManager.d.ts
import Component from "@egjs/component";
import { DestroyOptions, SizeRect } from "./types";
import { OnResizeWatcherResize } from "./ResizeWatcher";
export interface ContainerManagerOptions {

@@ -9,2 +10,3 @@ horizontal?: boolean;

useResizeObserver?: boolean;
useObserveChildren?: boolean;
}

@@ -15,3 +17,3 @@ export interface ContainerManagerStatus {

export interface ContainerManagerEvents {
resize: void;
resize: OnResizeWatcherResize;
}

@@ -26,2 +28,4 @@ export declare class ContainerManager extends Component<ContainerManagerEvents> {

getRect(): SizeRect;
observeChildren(children: Element[]): void;
unobserveChildren(children: Element[]): void;
setRect(rect: SizeRect): void;

@@ -28,0 +32,0 @@ getInlineSize(): number;

2

declaration/index.d.ts

@@ -13,3 +13,3 @@ import Grid from "./Grid";

export * from "./consts";
export { GetterSetter, withGridMethods, withMethods, } from "./utils";
export { GetterSetter, withGridMethods, withMethods, getMountedElements, getUpdatedItems, } from "./utils";
export default Grid;

@@ -9,3 +9,15 @@ import { SizeRect } from "./types";

rectBox?: "border-box" | "content-box";
childrenRectBox?: "border-box" | "content-box";
}
export interface OnResizeWatcherResize {
isResizeContainer: boolean;
childEntries: ResizeWatcherEntry[];
}
export interface ResizeWatcherEntry {
target: Element;
size?: {
inlineSize: number;
blockSize: number;
};
}
export declare class ResizeWatcher {

@@ -19,2 +31,3 @@ private _resizeTimer;

private _options;
private _updatedEntries;
constructor(container: HTMLElement | string, options?: ResizeWatherOptions);

@@ -24,7 +37,11 @@ getRect(): SizeRect;

resize(): void;
listen(callback: () => void): this;
observeChildren(children: Element[]): void;
unobserveChildren(children: Element[]): void;
listen(callback: (e: OnResizeWatcherResize) => void): this;
destroy(): void;
private _init;
private _onWindowResize;
private _onObserve;
private _scheduleResize;
private _onResize;
private _scheduleResize;
}

@@ -25,2 +25,3 @@ import { GRID_METHODS } from "./consts";

useResizeObserver?: boolean;
useObserveChildren?: boolean;
externalItemRenderer?: ItemRenderer | null;

@@ -27,0 +28,0 @@ externalContainerManager?: ContainerManager | null;

import Grid from "./Grid";
import { GRID_PROPERTY_TYPES } from "./consts";
import { GridItem } from "./GridItem";
import { ResizeWatcherEntry } from "./ResizeWatcher";
export declare function getKeys<T extends Record<string, any>>(obj: T): Array<keyof T>;
export declare function getUpdatedItems(items: GridItem[], entries: ResizeWatcherEntry[]): GridItem[];
export declare function getMountedItems(items: GridItem[]): GridItem[];
export declare function getMountedElements(items: GridItem[]): HTMLElement[];
export declare function isString(val: any): val is string;

@@ -5,0 +10,0 @@ export declare function isObject(val: any): val is object;

{
"name": "@egjs/grid",
"version": "1.10.0-beta.0",
"version": "1.10.0-beta.1",
"description": "A component that can arrange items according to the type of grids",

@@ -5,0 +5,0 @@ "main": "dist/grid.cjs.js",

@@ -23,3 +23,5 @@ /**

withMethods,
getMountedElements,
getUpdatedItems,
} from "./utils";
export default Grid;
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc