npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@vgridex/plugin-shift-range-selection

v0.0.1

Published

Shift-click rectangular range selection plugin for VGridex.

Readme

@vgridex/plugin-shift-range-selection

Shift range selection adds Excel-like Shift + click selection to VGridex. Users can click one cell as an anchor, then hold Shift and click another cell to select the rectangular range between them.

Shift 范围选择为 VGridex 提供类似 Excel 的 Shift + 点击能力。用户先点击一个单元格作为锚点,再按住 Shift 点击另一个单元格,即可选中两者之间的矩形区域。

Installation / 安装

pnpm add @vgridex/core @vgridex/plugin-shift-range-selection

Usage / 使用方式

<template>
  <VGridex ref="tableRef" :rowColumnConfig="rowColumnConfig" />
</template>

<script setup lang="ts">
import { onMounted, ref } from 'vue'
import VGridex from '@vgridex/core'
import '@vgridex/core/style.css'
import { clickSelectPlugin } from '@vgridex/plugin-click-selection'
import { shiftRangeSelectPlugin } from '@vgridex/plugin-shift-range-selection'

const tableRef = ref<InstanceType<typeof VGridex> | null>(null)

onMounted(() => {
  tableRef.value?.use(clickSelectPlugin)
  tableRef.value?.use(shiftRangeSelectPlugin)
})
</script>

Interaction / 交互说明

  • Click a cell to set the anchor.
  • 单击单元格会设置范围选择的锚点。
  • Hold Shift and click another cell to select the rectangle from the anchor to the clicked cell.
  • 按住 Shift 点击另一个单元格,会选中从锚点到目标单元格之间的矩形区域。
  • Repeating Shift + click changes the range while keeping the same anchor.
  • 连续执行 Shift + 点击会基于同一个锚点更新范围。
  • A normal click updates the anchor.
  • 普通点击会更新锚点。

Examples / 交互示例

Basic range selection / 基础范围选择:

Initial selection: none
初始选区:无

Click 0-0
点击 0-0
=> anchor: 0-0
=> 锚点:0-0

Shift + click 2-1
Shift + 点击 2-1
=> selected: [0-0, 0-1, 1-0, 1-1, 2-0, 2-1]
=> 当前选区:[0-0, 0-1, 1-0, 1-1, 2-0, 2-1]

Update the range with the same anchor / 基于同一锚点更新范围:

Current anchor: 0-0
当前锚点:0-0

Shift + click 1-2
Shift + 点击 1-2
=> selected: [0-0, 0-1, 0-2, 1-0, 1-1, 1-2]
=> 当前选区:[0-0, 0-1, 0-2, 1-0, 1-1, 1-2]

Click 3-3
点击 3-3
=> anchor: 3-3
=> 锚点更新为:3-3

Common Combinations / 常见搭配

  • Use with @vgridex/plugin-click-selection; it provides the normal click behavior that establishes the anchor.
  • 需要搭配 @vgridex/plugin-click-selection 使用,它负责普通点击行为和锚点建立。
  • Use with @vgridex/plugin-drag-selection when users also need mouse drag ranges.
  • 如果还需要鼠标拖拽范围选择,可以搭配 @vgridex/plugin-drag-selection
  • Use @vgridex/preset-basic-plugins if you want the recommended selection stack.
  • 如果希望使用推荐的完整选择插件组合,可以直接使用 @vgridex/preset-basic-plugins

Notes / 注意事项

Shift range selection replaces the current selection with the anchor-to-target rectangle. For non-contiguous cells, combine it with modifier-click from @vgridex/plugin-click-selection.

Shift 范围选择会用锚点到目标单元格之间的矩形区域替换当前选区。如果需要不连续选区,可以搭配 @vgridex/plugin-click-selection 的修饰键点击能力。

Links / 链接

  • Repository / 仓库:https://github.com/DraxWu/web-excel-table
  • Issues / 问题反馈:https://github.com/DraxWu/web-excel-table/issues