@tensor_1/react 2.31.0 → 2.33.0
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 +367 -0
- package/dist/SchedulingCalendar-C4XVbqZr.d.ts +339 -0
- package/dist/attachment-labels.d.ts +16 -0
- package/dist/attachment-labels.js +9 -0
- package/dist/calendar-model.d.ts +141 -1
- package/dist/calendar-model.js +200 -11
- package/dist/chart-preset.cjs +127 -7
- package/dist/chart-preset.d.cts +2 -2
- package/dist/chart-preset.d.ts +1 -0
- package/dist/chart-preset.js +6 -1
- package/dist/chart-theme-Cl0IrkKQ.d.cts +112 -0
- package/dist/chart-theme.d.ts +51 -0
- package/dist/chart-theme.js +99 -0
- package/dist/chart.cjs +127 -7
- package/dist/chart.d.cts +2 -2
- package/dist/chart.d.ts +1 -0
- package/dist/chart.js +6 -2
- package/dist/components/Alert.d.ts +17 -1
- package/dist/components/Alert.js +9 -4
- package/dist/components/AlertDismiss.d.ts +14 -0
- package/dist/components/AlertDismiss.js +11 -0
- package/dist/components/Attachment.d.ts +15 -12
- package/dist/components/Attachment.js +17 -17
- package/dist/components/AttachmentParts.d.ts +24 -0
- package/dist/components/AttachmentParts.js +20 -0
- package/dist/components/Chart.d.ts +1 -0
- package/dist/components/Chart.js +6 -1
- package/dist/components/ChartCore.d.ts +6 -1
- package/dist/components/ChartCore.js +23 -5
- package/dist/components/Chip.d.ts +17 -2
- package/dist/components/Chip.js +35 -11
- package/dist/components/ChipRemove.d.ts +17 -0
- package/dist/components/ChipRemove.js +13 -0
- package/dist/components/CollapsibleParts.d.ts +29 -0
- package/dist/components/CollapsibleParts.js +20 -0
- package/dist/components/CollapsibleSection.d.ts +30 -3
- package/dist/components/CollapsibleSection.js +7 -11
- package/dist/components/CollapsibleSectionState.d.ts +1 -1
- package/dist/components/CollapsibleSectionState.js +54 -27
- package/dist/components/DashboardGrid.d.ts +60 -0
- package/dist/components/DashboardGrid.js +40 -0
- package/dist/components/DateRangePicker.d.ts +7 -1
- package/dist/components/DateRangePicker.js +5 -1
- package/dist/components/DescriptionList.d.ts +12 -1
- package/dist/components/DescriptionList.js +5 -5
- package/dist/components/Dialogs.d.ts +24 -3
- package/dist/components/Dialogs.js +74 -16
- package/dist/components/FileUpload.d.ts +10 -2
- package/dist/components/FileUpload.js +10 -4
- package/dist/components/FilterEditor.d.ts +4 -0
- package/dist/components/FilterEditor.js +13 -2
- package/dist/components/Heartbeat.d.ts +31 -0
- package/dist/components/Heartbeat.js +28 -0
- package/dist/components/Menu.d.ts +53 -5
- package/dist/components/Menu.js +104 -4
- package/dist/components/Meter.d.ts +7 -3
- package/dist/components/Meter.js +2 -1
- package/dist/components/Popover.d.ts +21 -2
- package/dist/components/Popover.js +94 -17
- package/dist/components/Prose.d.ts +6 -2
- package/dist/components/Prose.js +1 -1
- package/dist/components/RuleBuilder.d.ts +52 -4
- package/dist/components/RuleBuilder.js +109 -24
- package/dist/components/SchedulingCalendar.d.ts +4 -110
- package/dist/components/SchedulingCalendar.js +299 -63
- package/dist/components/SchedulingTimeGrid.d.ts +4 -0
- package/dist/components/SchedulingTimeGrid.js +521 -0
- package/dist/components/SchedulingTimeline.d.ts +2 -1
- package/dist/components/Segmented.d.ts +17 -3
- package/dist/components/Segmented.js +59 -5
- package/dist/components/Select.d.ts +66 -2
- package/dist/components/Select.js +800 -10
- package/dist/components/Spinner.d.ts +2 -1
- package/dist/components/Spinner.js +1 -1
- package/dist/components/StatusPill.d.ts +8 -2
- package/dist/components/StatusPill.js +2 -2
- package/dist/components/Steps.d.ts +28 -4
- package/dist/components/Steps.js +46 -16
- package/dist/components/TableControls.js +4 -3
- package/dist/components/Tabs.d.ts +7 -2
- package/dist/components/Tabs.js +14 -1
- package/dist/components/TextDiff.d.ts +49 -0
- package/dist/components/TextDiff.js +124 -0
- package/dist/{emoji-image-6mPZ15Zy.d.cts → emoji-image-DjCKpdwE.d.cts} +1 -1
- package/dist/emoji.cjs +169 -27
- package/dist/emoji.d.cts +3 -3
- package/dist/file-model.d.ts +22 -3
- package/dist/file-model.js +6 -4
- package/dist/filter-model.d.ts +26 -2
- package/dist/filter-model.js +13 -1
- package/dist/hooks/useAnchoredPosition.d.ts +24 -1
- package/dist/hooks/useAnchoredPosition.js +58 -8
- package/dist/hooks/useVirtualRows.d.ts +17 -2
- package/dist/hooks/useVirtualRows.js +6 -5
- package/dist/icons/Icon.d.ts +14 -14
- package/dist/index.cjs +4888 -1714
- package/dist/index.d.cts +1871 -658
- package/dist/index.d.ts +16 -9
- package/dist/index.js +67 -4
- package/dist/labels-context.d.ts +29 -1
- package/dist/{overlay-position-Cjv5E7mn.d.cts → overlay-position-2Afke51l.d.cts} +20 -0
- package/dist/overlay-position.d.ts +20 -0
- package/dist/overlay-position.js +17 -2
- package/dist/rich-text.cjs +169 -27
- package/dist/rich-text.d.cts +3 -3
- package/dist/rule-builder-model.d.ts +34 -2
- package/dist/rule-builder-model.js +48 -12
- package/dist/scheduling-calendar-model.d.ts +169 -0
- package/dist/scheduling-calendar-model.js +176 -0
- package/dist/select-model.d.ts +80 -0
- package/dist/select-model.js +109 -0
- package/dist/table-engine.d.ts +7 -0
- package/dist/table-engine.js +2 -1
- package/dist/text-diff-model.d.ts +71 -0
- package/dist/text-diff-model.js +261 -0
- package/package.json +1 -1
- package/dist/ChartCore-DzWe10bN.d.cts +0 -59
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
3
3
|
import { shouldVirtualize, virtualWindow } from "../table-engine.js";
|
|
4
|
-
function useVirtualRows(rows, { rowHeight, overscan = 6, threshold = 100 }) {
|
|
4
|
+
function useVirtualRows(rows, { rowHeight, overscan = 6, threshold = 100, estimatedViewportHeight = 0, enabled = true }) {
|
|
5
5
|
const containerRef = useRef(null);
|
|
6
6
|
const [viewport, setViewport] = useState({ scrollTop: 0, height: 0 });
|
|
7
7
|
useLayoutEffect(() => {
|
|
@@ -29,10 +29,11 @@ function useVirtualRows(rows, { rowHeight, overscan = 6, threshold = 100 }) {
|
|
|
29
29
|
if (frame) cancelAnimationFrame(frame);
|
|
30
30
|
};
|
|
31
31
|
}, []);
|
|
32
|
-
const
|
|
32
|
+
const height = viewport.height > 0 ? viewport.height : Math.max(0, estimatedViewportHeight);
|
|
33
|
+
const virtualized = enabled && height > 0 && shouldVirtualize(rows.length, threshold);
|
|
33
34
|
const window = useMemo(
|
|
34
|
-
() =>
|
|
35
|
-
[
|
|
35
|
+
() => virtualized ? virtualWindow(viewport.scrollTop, height, rowHeight, rows.length, overscan) : { start: 0, end: rows.length, padTop: 0, padBottom: 0, total: rows.length * rowHeight },
|
|
36
|
+
[virtualized, overscan, rowHeight, rows.length, height, viewport.scrollTop]
|
|
36
37
|
);
|
|
37
38
|
const visibleRows = useMemo(() => rows.slice(window.start, window.end), [rows, window.start, window.end]);
|
|
38
39
|
return {
|
|
@@ -42,7 +43,7 @@ function useVirtualRows(rows, { rowHeight, overscan = 6, threshold = 100 }) {
|
|
|
42
43
|
padTop: window.padTop,
|
|
43
44
|
padBottom: window.padBottom,
|
|
44
45
|
totalHeight: window.total,
|
|
45
|
-
virtualized
|
|
46
|
+
virtualized
|
|
46
47
|
};
|
|
47
48
|
}
|
|
48
49
|
export {
|
package/dist/icons/Icon.d.ts
CHANGED
|
@@ -5,13 +5,22 @@ import { IconNode, UixIcon, IconProps } from './types.js';
|
|
|
5
5
|
/** Renders a glyph as an inline SVG; the props contract shared by every icon. */
|
|
6
6
|
declare function renderIcon(node: IconNode, { size, tone, label, strokeWidth, className, style, ...rest }: IconProps, ref?: unknown): react.ReactElement<{
|
|
7
7
|
string?: number | string | undefined | undefined;
|
|
8
|
-
|
|
8
|
+
filter?: string | undefined | undefined;
|
|
9
|
+
values?: string | undefined | undefined;
|
|
10
|
+
fill: string;
|
|
11
|
+
color?: string | undefined | undefined;
|
|
12
|
+
fontStyle?: number | string | undefined | undefined;
|
|
13
|
+
fontWeight?: number | string | undefined | undefined;
|
|
14
|
+
fontSize?: number | string | undefined | undefined;
|
|
15
|
+
fontFamily?: string | undefined | undefined;
|
|
16
|
+
width?: number | string | undefined | undefined;
|
|
17
|
+
height?: number | string | undefined | undefined;
|
|
9
18
|
type?: string | undefined | undefined;
|
|
10
|
-
id?: string | undefined | undefined;
|
|
11
|
-
name?: string | undefined | undefined;
|
|
12
19
|
z?: number | string | undefined | undefined;
|
|
13
|
-
color?: string | undefined | undefined;
|
|
14
20
|
opacity?: number | string | undefined | undefined;
|
|
21
|
+
r?: number | string | undefined | undefined;
|
|
22
|
+
id?: string | undefined | undefined;
|
|
23
|
+
name?: string | undefined | undefined;
|
|
15
24
|
x?: number | string | undefined | undefined;
|
|
16
25
|
y?: number | string | undefined | undefined;
|
|
17
26
|
cursor?: number | string | undefined | undefined;
|
|
@@ -19,11 +28,6 @@ declare function renderIcon(node: IconNode, { size, tone, label, strokeWidth, cl
|
|
|
19
28
|
clipPath?: string | undefined | undefined;
|
|
20
29
|
radius?: number | string | undefined | undefined;
|
|
21
30
|
media?: string | undefined | undefined;
|
|
22
|
-
fontStyle?: number | string | undefined | undefined;
|
|
23
|
-
fontWeight?: number | string | undefined | undefined;
|
|
24
|
-
fontSize?: number | string | undefined | undefined;
|
|
25
|
-
fontFamily?: string | undefined | undefined;
|
|
26
|
-
height?: number | string | undefined | undefined;
|
|
27
31
|
suppressHydrationWarning?: boolean | undefined | undefined;
|
|
28
32
|
lang?: string | undefined | undefined;
|
|
29
33
|
tabIndex?: number | undefined | undefined;
|
|
@@ -250,12 +254,10 @@ declare function renderIcon(node: IconNode, { size, tone, label, strokeWidth, cl
|
|
|
250
254
|
local?: number | string | undefined | undefined;
|
|
251
255
|
hanging?: number | string | undefined | undefined;
|
|
252
256
|
unicode?: number | string | undefined | undefined;
|
|
253
|
-
fill: string;
|
|
254
257
|
clip?: number | string | undefined | undefined;
|
|
255
258
|
stroke: string;
|
|
256
|
-
filter?: string | undefined | undefined;
|
|
257
|
-
values?: string | undefined | undefined;
|
|
258
259
|
offset?: number | string | undefined | undefined;
|
|
260
|
+
capHeight?: number | string | undefined | undefined;
|
|
259
261
|
dy?: number | string | undefined | undefined;
|
|
260
262
|
dx?: number | string | undefined | undefined;
|
|
261
263
|
transform?: string | undefined | undefined;
|
|
@@ -265,7 +267,6 @@ declare function renderIcon(node: IconNode, { size, tone, label, strokeWidth, cl
|
|
|
265
267
|
method?: string | undefined | undefined;
|
|
266
268
|
min?: number | string | undefined | undefined;
|
|
267
269
|
target?: string | undefined | undefined;
|
|
268
|
-
width?: number | string | undefined | undefined;
|
|
269
270
|
crossOrigin?: "" | "anonymous" | "use-credentials" | undefined;
|
|
270
271
|
accentHeight?: number | string | undefined | undefined;
|
|
271
272
|
additive?: "replace" | "sum" | undefined | undefined;
|
|
@@ -286,7 +287,6 @@ declare function renderIcon(node: IconNode, { size, tone, label, strokeWidth, cl
|
|
|
286
287
|
bias?: number | string | undefined | undefined;
|
|
287
288
|
by?: number | string | undefined | undefined;
|
|
288
289
|
calcMode?: number | string | undefined | undefined;
|
|
289
|
-
capHeight?: number | string | undefined | undefined;
|
|
290
290
|
clipPathUnits?: number | string | undefined | undefined;
|
|
291
291
|
clipRule?: number | string | undefined | undefined;
|
|
292
292
|
colorInterpolation?: number | string | undefined | undefined;
|