simple-table-core 3.7.0 → 3.7.2

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.
@@ -3,12 +3,6 @@ export type SectionPaneRole = "sticky" | "scrollbar" | "header" | "body";
3
3
  export interface SectionScrollControllerConfig {
4
4
  /** Heavy body virtualization. Throttled to every {@link VIRTUALIZATION_THRESHOLD_PX}px. */
5
5
  onMainSectionScrollLeft?: (scrollLeft: number) => void;
6
- /**
7
- * Lightweight header re-render, run on every main-section scroll frame (not throttled) so the
8
- * header tracks the body fluidly during momentum. Re-rendering only the (few) header cells each
9
- * frame avoids the stepwise "stagger" that throttled header virtualization produces.
10
- */
11
- onMainSectionHeaderFrame?: (scrollLeft: number) => void;
12
6
  }
13
7
  /**
14
8
  * Single controller for horizontal scroll sync across all four panes per section:
@@ -20,6 +14,8 @@ export declare class SectionScrollController {
20
14
  private scrollLeftBySection;
21
15
  private panesBySection;
22
16
  private scrollHandlers;
17
+ /** Non-passive touchmove handlers on header panes that cancel iOS touch scrolling. */
18
+ private headerTouchMoveHandlers;
23
19
  private config;
24
20
  /** Guard to avoid re-entrancy when we programmatically set scrollLeft on other panes */
25
21
  private isSyncing;
@@ -71,6 +71,12 @@ export interface CellRenderContext {
71
71
  useOddEvenRowBackground?: boolean;
72
72
  rowGrouping?: string[];
73
73
  headers: HeaderObject[];
74
+ /**
75
+ * Accessor of the column whose body cells identify the row and should carry
76
+ * `role="rowheader"` (the first non-selection leaf column). Other data cells
77
+ * remain `role="gridcell"`.
78
+ */
79
+ rowHeaderAccessor?: Accessor;
74
80
  rowHeight: number;
75
81
  /** Number of header rows (for aria-rowindex: position + maxHeaderDepth + 1) */
76
82
  maxHeaderDepth?: number;
@@ -17,6 +17,13 @@ export declare const getAllChildHeaders: (header: HeaderObject) => HeaderObject[
17
17
  * Check if a header has collapsible children
18
18
  */
19
19
  export declare const hasCollapsibleChildren: (header: HeaderObject) => boolean;
20
+ /**
21
+ * Number of visible leaf (bottom-level) columns a header spans, for
22
+ * `aria-colspan` on grouped/nested header cells. Leaf headers that are hidden
23
+ * (`hide`) or suppressed by their parent's collapsed state are excluded so the
24
+ * announced span matches the columns actually rendered. Leaf headers return 1.
25
+ */
26
+ export declare const getHeaderColspan: (header: HeaderObject, rootHeaders: HeaderObject[], collapsedHeaders: Set<Accessor>) => number;
20
27
  /**
21
28
  * Get all leaf (bottom-level) headers that should be visible when a parent is collapsed
22
29
  * Uses flattenHeaders for consistent leaf detection
@@ -0,0 +1,83 @@
1
+ /**
2
+ * ARIA SEMANTICS TESTS
3
+ *
4
+ * These tests assert the ARIA state/relationship semantics that a non-native
5
+ * (role="grid") table must apply by hand: selection state, expansion/treegrid
6
+ * levels, grouped-header span, row headers, nested/state rows in the hierarchy,
7
+ * header rowspan, and collapsible column-header expansion.
8
+ */
9
+ import type { Meta } from "@storybook/html";
10
+ declare const meta: Meta;
11
+ export default meta;
12
+ export declare const SelectedRowsExposeAriaSelected: {
13
+ render: () => HTMLDivElement & {
14
+ _table?: import("../../src/index").SimpleTableVanilla | undefined;
15
+ };
16
+ play: ({ canvasElement }: {
17
+ canvasElement: HTMLElement;
18
+ }) => Promise<void>;
19
+ };
20
+ export declare const GridExposesAriaMultiselectable: {
21
+ render: () => HTMLDivElement & {
22
+ _table?: import("../../src/index").SimpleTableVanilla | undefined;
23
+ };
24
+ play: ({ canvasElement }: {
25
+ canvasElement: HTMLElement;
26
+ }) => Promise<void>;
27
+ };
28
+ export declare const ExpandableRowsExposeAriaExpandedOnRow: {
29
+ render: () => HTMLDivElement & {
30
+ _table?: import("../../src/index").SimpleTableVanilla | undefined;
31
+ };
32
+ play: ({ canvasElement }: {
33
+ canvasElement: HTMLElement;
34
+ }) => Promise<void>;
35
+ };
36
+ export declare const ExpandableGridExposesTreegridLevels: {
37
+ render: () => HTMLDivElement & {
38
+ _table?: import("../../src/index").SimpleTableVanilla | undefined;
39
+ };
40
+ play: ({ canvasElement }: {
41
+ canvasElement: HTMLElement;
42
+ }) => Promise<void>;
43
+ };
44
+ export declare const GroupedHeadersExposeAriaColspan: {
45
+ render: () => HTMLDivElement & {
46
+ _table?: import("../../src/index").SimpleTableVanilla | undefined;
47
+ };
48
+ play: ({ canvasElement }: {
49
+ canvasElement: HTMLElement;
50
+ }) => Promise<void>;
51
+ };
52
+ export declare const IdentityColumnExposesRowHeader: {
53
+ render: () => HTMLDivElement & {
54
+ _table?: import("../../src/index").SimpleTableVanilla | undefined;
55
+ };
56
+ play: ({ canvasElement }: {
57
+ canvasElement: HTMLElement;
58
+ }) => Promise<void>;
59
+ };
60
+ export declare const NestedTableRowsAreInRowHierarchy: {
61
+ render: () => HTMLDivElement & {
62
+ _table?: import("../../src/index").SimpleTableVanilla | undefined;
63
+ };
64
+ play: ({ canvasElement }: {
65
+ canvasElement: HTMLElement;
66
+ }) => Promise<void>;
67
+ };
68
+ export declare const LeafHeadersExposeRowSpan: {
69
+ render: () => HTMLDivElement & {
70
+ _table?: import("../../src/index").SimpleTableVanilla | undefined;
71
+ };
72
+ play: ({ canvasElement }: {
73
+ canvasElement: HTMLElement;
74
+ }) => Promise<void>;
75
+ };
76
+ export declare const CollapsibleColumnHeaderExposesAriaExpanded: {
77
+ render: () => HTMLDivElement & {
78
+ _table?: import("../../src/index").SimpleTableVanilla | undefined;
79
+ };
80
+ play: ({ canvasElement }: {
81
+ canvasElement: HTMLElement;
82
+ }) => Promise<void>;
83
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "simple-table-core",
3
- "version": "3.7.0",
3
+ "version": "3.7.2",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/index.es.js",
6
6
  "types": "dist/src/index.d.ts",