xiaodao-spreader 0.1.30 → 0.1.31

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/README.ZH.md CHANGED
@@ -567,6 +567,19 @@ pnpm build:demo
567
567
 
568
568
  ---
569
569
 
570
+ ## 触屏与移动端交互
571
+
572
+ x-spreader 以触屏为第一交互:每个鼠标操作都有对称的触屏路径,并在真机验证。
573
+
574
+ - **点选 / 长按右键菜单**:点击单元格、行头、列头或左上角全选按钮完成选择;在当前选区内长按(450ms)弹出对应右键菜单(单元格 / 行 / 列 / 角落)。选区外长按回落为框选 / 表头拖拽多选,手势零冲突。
575
+ - **表头筛选箭头**:点击表头单元格上的箭头打开 AutoFilter 面板(`onTouchStart` 已补筛选按钮命中)。
576
+ - **列宽 / 行高拖拽**:触摸列头右缘或行头下缘(触屏放宽 8px 热区)拖拽改列宽 / 行高。
577
+ - **矩形框选**:单元格长按(450ms)后拖动绘制选区;行/列头长按后拖动扩展行/列选区。明显拖动(>8px)转滚动,轻点保持单选。
578
+ - **格式刷**:从源单元格复制样式后,触屏点目标区域即应用(对齐鼠标 `onMouseUp`)。
579
+ - **点外部提交编辑**:点空白画布或公式栏外即提交进行中的单元格 / 公式栏编辑(对齐鼠标 `onMouseDown`)。
580
+ - **底部 tab 栏**:长按 tab 按钮或 tab 栏空白区(450ms)弹出 tab 右键菜单。
581
+ - **点外部关闭浮层**:右键菜单与行高 / 列宽编辑面板(`dimPanel`)支持点外部关闭。它们监听 `touchstart`,因为 `onTouchStart` 调了 `preventDefault()` 会抑制桌面端依赖的合成 `click`/`mousedown`;其余 picker 均用 `pointerdown`,触屏原生关闭。
582
+
570
583
  ## 路线图
571
584
 
572
585
  ### 近期
@@ -585,6 +598,7 @@ pnpm build:demo
585
598
  - [ ] 行列分组与折叠
586
599
  - [x] 排序与筛选:按展示内容排序,含类 Excel「排序提醒」对话框(扩展选定区域 / 仅对选定区域排序);见 [排序与排序提醒](#功能特性)
587
600
  - [x] 自动筛选(AutoFilter):工具栏「筛选」/`Ctrl+Shift+L` 启用,表头下箭头、智能向下探测数据区、值/文本/数值/日期多类型筛选、清除单列与整体移除分离;见 [自动筛选(AutoFilter)](#自动筛选autofilter)
601
+ - [x] 触屏与移动端交互:选择 / 右键菜单 / 筛选 / 列宽行高 / 框选 / 格式刷 / tab 菜单均补齐对称触屏路径,浮层支持点外部关闭;见 [触屏与移动端交互](#触屏与移动端交互)
588
602
  - [ ] 单元格批注
589
603
  - [ ] 打印布局
590
604
 
package/README.md CHANGED
@@ -564,6 +564,19 @@ The project includes a GitHub Actions workflow (`.github/workflows/publish.yml`)
564
564
 
565
565
  ---
566
566
 
567
+ ## Touch & Mobile Interaction
568
+
569
+ x-spreader is touch-first: every mouse interaction has a symmetric touch path, verified on real mobile devices.
570
+
571
+ - **Tap to select / long-press for context menu**: tap a cell, row header, column header, or the corner select-all button to select; long-press (450ms) inside the current selection opens the right-click context menu (cell / row / column / corner). Long-press outside the selection falls back to range selection / header drag-multi-select, so gestures never conflict.
572
+ - **Header filter arrow**: tap the arrow on the header cell to open the AutoFilter panel (`onTouchStart` now hit-tests the filter button).
573
+ - **Resize columns / rows**: touch the right edge of a column header or bottom edge of a row header (8px hot zone, widened on touch) to drag width / height.
574
+ - **Range selection**: long-press a cell (450ms) then drag to draw a rectangular selection; long-press a row/column header then drag to expand the selection. A clear drag (>8px) switches to scrolling; a light tap keeps the single selection.
575
+ - **Format brush**: after copying a style from a source cell, tap the target range on touch to apply it (mirrors mouse `onMouseUp`).
576
+ - **Commit edit by tapping outside**: tapping empty canvas or outside the formula bar commits an in-progress cell / formula-bar edit (mirrors mouse `onMouseDown`).
577
+ - **Tab bar**: long-press a tab button or the empty tab-bar area (450ms) opens the tab right-click menu.
578
+ - **Popups close on outside tap**: the context menu and the row-height / column-width editor panel (`dimPanel`) close on outside tap. They listen on `touchstart` because `onTouchStart` calls `preventDefault()`, which suppresses the synthetic `click`/`mousedown` that desktop close-listeners rely on. All other pickers already use `pointerdown` and close correctly on touch.
579
+
567
580
  ## Roadmap
568
581
 
569
582
  ### Near-term
@@ -582,6 +595,7 @@ The project includes a GitHub Actions workflow (`.github/workflows/publish.yml`)
582
595
  - [ ] Column / row grouping and collapsing
583
596
  - [x] Sort & filter: sort by displayed content with Excel-style Sort Warning dialog (expand selection / current selection only); see [Sorting & Sort Warning](#features)
584
597
  - [x] Auto Filter (AutoFilter): toolbar "Filter" / `Ctrl+Shift+L` to enable, header drop-down arrows, intelligent downward data probing, value/text/number/date multi-type filters, separate clear-column vs remove-all; see [Auto Filter (AutoFilter)](#auto-filter-autofilter)
598
+ - [x] Touch & mobile interaction: symmetric touch paths for select / context menu / filter / resize / range select / format brush / tab menu; popups close on outside tap; see [Touch & Mobile Interaction](#touch--mobile-interaction)
585
599
  - [ ] Cell comments / notes
586
600
  - [ ] Print layout
587
601