
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
@context-action/chunk-grid
Advanced tools
Headless vanilla TypeScript library for infinite scroll data visualization with chunk-based rendering
Headless vanilla TypeScript library for infinite scroll data visualization with chunk-based rendering.
npm install @context-action/chunk-grid
# or
pnpm add @context-action/chunk-grid
# or
yarn add @context-action/chunk-grid
import { ChunkGridSystem, AxisManager } from '@context-action/chunk-grid'
// Create axis managers
const xAxis = new AxisManager(
Array.from({ length: 100 }, (_, i) => ({
id: `col-${i}`,
index: i,
size: 100,
visible: true,
data: { label: `Column ${i}` }
}))
)
const yAxis = new AxisManager(
Array.from({ length: 100 }, (_, i) => ({
id: `row-${i}`,
index: i,
size: 40,
visible: true,
data: { label: `Row ${i}` }
}))
)
// Create grid system
const grid = new ChunkGridSystem({
container: document.getElementById('grid-container')!,
viewportWidth: 900,
viewportHeight: 600,
xAxisManager: xAxis,
yAxisManager: yAxis,
dataProvider: {
async getCellData(xRange, yRange) {
const cells = []
for (let y = yRange.start; y <= yRange.end; y++) {
for (let x = xRange.start; x <= xRange.end; x++) {
cells.push({
x, y,
content: { text: `${x},${y}` }
})
}
}
return cells
}
},
cellRenderer: (cell) => {
const el = document.createElement('div')
el.className = 'cell'
el.textContent = cell.content.text
return el
}
})
grid.initialize()
<script src="https://unpkg.com/@context-action/chunk-grid"></script>
<script>
const { ChunkGridSystem, AxisManager } = DataViewer
// ... use as above
</script>
The grid uses a camera-based coordinate system:
import { CollapsibleAxisManager } from '@context-action/chunk-grid'
const yAxis = new CollapsibleAxisManager([
{ id: 'team-1', index: 0, size: 40, visible: true, collapsible: true, data: {} },
{ id: 'member-1', index: 1, size: 40, visible: true, parentId: 'team-1', data: {} },
{ id: 'member-2', index: 2, size: 40, visible: true, parentId: 'team-1', data: {} },
])
// Collapse/expand
yAxis.collapse('team-1') // Hides member-1, member-2
yAxis.expand('team-1') // Shows them again
yAxis.toggle('team-1') // Toggle state
import { GridScrollbar } from '@context-action/chunk-grid'
const scrollbar = new GridScrollbar(
{
container: viewport,
horizontalHeight: 12,
verticalWidth: 12,
},
{ onScroll: (x, y) => grid.scrollToPixel(x, y) },
{
viewportSize: grid.getViewportSize(),
totalSize: grid.getTotalSize(),
position: grid.getPixelPosition(),
}
)
import { GridAxisRenderer } from '@context-action/chunk-grid'
const header = new GridAxisRenderer({
container: headerElement,
axis: 'x',
axisManager: xAxis,
cellRenderer: (cell) => {
const el = document.createElement('div')
el.textContent = cell.data.label
return el
}
})
| Class | Description |
|---|---|
ChunkGridSystem | Main entry point for grid rendering |
AxisManager | Manages axis cells with O(log n) position lookup |
CollapsibleAxisManager | Extends AxisManager with hierarchy support |
GridScrollbar | Scrollbar component with drag support |
GridAxisRenderer | Header/sidebar rendering component |
// Navigation
grid.scrollToPixel(x, y)
grid.scrollToCell(cellX, cellY)
grid.getPixelPosition()
// Hit testing
grid.hitTest(clientX, clientY) // Returns { pixel, cell, chunk, viewport }
// Bounds
grid.setPixelBounds(bounds)
grid.applyPixelBoundsFromAxis()
// Buffer configuration
grid.updateBufferConfig({ bufferSize: 2, predictiveBuffer: true })
// Events
grid.on('scroll', (state) => {})
grid.on('chunkTransition', (from, to) => {})
MIT
FAQs
Headless vanilla TypeScript library for infinite scroll data visualization with chunk-based rendering
We found that @context-action/chunk-grid demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.