@simple-table/react 3.6.6 → 3.6.8

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.md CHANGED
@@ -15,14 +15,14 @@
15
15
 
16
16
  Simple Table is available for the most popular frameworks:
17
17
 
18
- | Framework | Package | Version |
19
- |-----------|---------|---------|
20
- | **Vanilla JS** | [`simple-table-core`](https://www.npmjs.com/package/simple-table-core) | [![npm](https://img.shields.io/npm/v/simple-table-core.svg)](https://www.npmjs.com/package/simple-table-core) |
21
- | **React** | [`@simple-table/react`](https://www.npmjs.com/package/@simple-table/react) | [![npm](https://img.shields.io/npm/v/@simple-table/react.svg)](https://www.npmjs.com/package/@simple-table/react) |
22
- | **Vue 3** | [`@simple-table/vue`](https://www.npmjs.com/package/@simple-table/vue) | [![npm](https://img.shields.io/npm/v/@simple-table/vue.svg)](https://www.npmjs.com/package/@simple-table/vue) |
23
- | **Svelte** | [`@simple-table/svelte`](https://www.npmjs.com/package/@simple-table/svelte) | [![npm](https://img.shields.io/npm/v/@simple-table/svelte.svg)](https://www.npmjs.com/package/@simple-table/svelte) |
24
- | **Solid** | [`@simple-table/solid`](https://www.npmjs.com/package/@simple-table/solid) | [![npm](https://img.shields.io/npm/v/@simple-table/solid.svg)](https://www.npmjs.com/package/@simple-table/solid) |
25
- | **Angular** | [`@simple-table/angular`](https://www.npmjs.com/package/@simple-table/angular) | [![npm](https://img.shields.io/npm/v/@simple-table/angular.svg)](https://www.npmjs.com/package/@simple-table/angular) |
18
+ | Framework | Package | Version |
19
+ | -------------- | ------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------- |
20
+ | **Vanilla JS** | [`simple-table-core`](https://www.npmjs.com/package/simple-table-core) | [![npm](https://img.shields.io/npm/v/simple-table-core.svg)](https://www.npmjs.com/package/simple-table-core) |
21
+ | **React** | [`@simple-table/react`](https://www.npmjs.com/package/@simple-table/react) | [![npm](https://img.shields.io/npm/v/@simple-table/react.svg)](https://www.npmjs.com/package/@simple-table/react) |
22
+ | **Vue 3** | [`@simple-table/vue`](https://www.npmjs.com/package/@simple-table/vue) | [![npm](https://img.shields.io/npm/v/@simple-table/vue.svg)](https://www.npmjs.com/package/@simple-table/vue) |
23
+ | **Svelte** | [`@simple-table/svelte`](https://www.npmjs.com/package/@simple-table/svelte) | [![npm](https://img.shields.io/npm/v/@simple-table/svelte.svg)](https://www.npmjs.com/package/@simple-table/svelte) |
24
+ | **Solid** | [`@simple-table/solid`](https://www.npmjs.com/package/@simple-table/solid) | [![npm](https://img.shields.io/npm/v/@simple-table/solid.svg)](https://www.npmjs.com/package/@simple-table/solid) |
25
+ | **Angular** | [`@simple-table/angular`](https://www.npmjs.com/package/@simple-table/angular) | [![npm](https://img.shields.io/npm/v/@simple-table/angular.svg)](https://www.npmjs.com/package/@simple-table/angular) |
26
26
 
27
27
  ## Quick Start
28
28
 
@@ -133,13 +133,13 @@ For side projects and pre-revenue teams. Unlimited users per product license wit
133
133
 
134
134
  ### PRO - For Growing Businesses
135
135
 
136
- **$85/month** or **$850/year** (about 17% less than twelve monthly payments)
136
+ **$85/month** or **$850/year**
137
137
 
138
138
  For revenue-generating companies: priority email and Discord support, bug support for production issues, and the commercial EULA. Unlimited users per product license.
139
139
 
140
140
  ### ENTERPRISE - For teams that need hands-on support
141
141
 
142
- **$350/month** or **$3,500/year** (about 17% less than twelve monthly payments)
142
+ **$350/month** or **$3,500/year**
143
143
 
144
144
  Premium support with faster response times, direct access to core developers, feature request prioritization, and the commercial EULA. Unlimited users per product license.
145
145
 
@@ -1,7 +1,14 @@
1
1
  export type SectionId = "pinned-left" | "main" | "pinned-right";
2
2
  export type SectionPaneRole = "sticky" | "scrollbar" | "header" | "body";
3
3
  export interface SectionScrollControllerConfig {
4
+ /** Heavy body virtualization. Throttled to every {@link VIRTUALIZATION_THRESHOLD_PX}px. */
4
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;
5
12
  }
6
13
  /**
7
14
  * Single controller for horizontal scroll sync across all four panes per section:
@@ -18,6 +25,15 @@ export declare class SectionScrollController {
18
25
  private isSyncing;
19
26
  /** Last scrollLeft at which we ran main-section virtualization; used to run heavy ops only every N px. */
20
27
  private lastMainVirtualizationScrollLeft;
28
+ /**
29
+ * True while a touch-driven scroll (including post-release momentum) is in progress on a body
30
+ * pane. While true, we must not write scrollLeft to scroll-container followers (the horizontal
31
+ * scrollbar), because on iOS that cancels the body's inertial momentum. Such followers are
32
+ * reconciled once scrolling settles.
33
+ */
34
+ private isTouchScrolling;
35
+ /** Scroll-idle timer used to detect the end of a touch-driven scroll (incl. momentum). */
36
+ private touchSettleTimeoutId;
21
37
  constructor(config?: SectionScrollControllerConfig);
22
38
  updateConfig(config: Partial<SectionScrollControllerConfig>): void;
23
39
  /**
@@ -45,6 +61,18 @@ export declare class SectionScrollController {
45
61
  */
46
62
  restoreAll(): void;
47
63
  private addScrollListener;
64
+ /**
65
+ * Track touch-driven scrolling on a body pane. While a touch (and its post-release momentum) is
66
+ * active, scroll-container followers (the horizontal scrollbar) are not written, to preserve iOS
67
+ * momentum; they are reconciled when scrolling settles.
68
+ */
69
+ private addTouchTracking;
70
+ /**
71
+ * (Re)arm the scroll-idle timer that marks the end of a touch-driven scroll. When it fires (no
72
+ * scroll for the idle window, i.e. momentum has stopped), reconcile scroll-container followers
73
+ * (the scrollbar) to the final position, which we deliberately skipped during the touch scroll.
74
+ */
75
+ private scheduleTouchSettle;
48
76
  private removeScrollListener;
49
77
  destroy(): void;
50
78
  }
@@ -19,7 +19,7 @@ export interface CachedHeaderPosition {
19
19
  height: number;
20
20
  }
21
21
  export declare const getHeaderPositionCache: (container: HTMLElement) => Map<string, CachedHeaderPosition>;
22
- export declare const REVERT_TO_PREVIOUS_HEADERS_DELAY = 1500;
22
+ export declare const REVERT_TO_PREVIOUS_HEADERS_DELAY = 150;
23
23
  export declare const throttle: (callback: () => void, limit: number) => void;
24
24
  export declare const addTrackedEventListener: (element: HTMLElement, event: string, handler: EventListener, options?: AddEventListenerOptions) => void;
25
25
  /** Header tooltips are portaled under .simple-table-root; remove them when header DOM is torn down
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simple-table/react",
3
- "version": "3.6.6",
3
+ "version": "3.6.8",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/index.es.js",
6
6
  "types": "dist/types/react/src/index.d.ts",
@@ -29,7 +29,7 @@
29
29
  "react-dom": ">=18.0.0"
30
30
  },
31
31
  "dependencies": {
32
- "simple-table-core": "3.6.6"
32
+ "simple-table-core": "3.6.8"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@rollup/plugin-alias": "^4.0.4",