@homebound/beam 4.45.0 → 4.45.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.
- package/dist/index.cjs +17 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +17 -14
- package/dist/index.js.map +1 -1
- package/dist/truss.css +0 -2
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -5888,6 +5888,8 @@ declare class RowState<R extends Kinded> {
|
|
|
5888
5888
|
get isSelected(): boolean;
|
|
5889
5889
|
/** This row's share of `TableState.selectedLeafRowCount`, see `GridDataRow.childrenCount`. */
|
|
5890
5890
|
get selectedLeafRowCount(): number;
|
|
5891
|
+
/** Whether a checked ancestor's `childrenCount` already includes this row. */
|
|
5892
|
+
private get isCountedByParent();
|
|
5891
5893
|
/** The UI state for checked/unchecked + "partially checked" for parents. */
|
|
5892
5894
|
get selectedState(): SelectedState;
|
|
5893
5895
|
/**
|
|
@@ -6035,7 +6037,7 @@ type GridDataRow<R extends Kinded> = {
|
|
|
6035
6037
|
selectable?: false;
|
|
6036
6038
|
/** Whether this row should infer its selected state based on its children's selected state */
|
|
6037
6039
|
inferSelectedState?: false;
|
|
6038
|
-
/** Total children, e.g. when they load lazily; a
|
|
6040
|
+
/** Total children, e.g. when they load lazily; a checked row counts as this many in `getSelectedLeafRowCount`. */
|
|
6039
6041
|
childrenCount?: number;
|
|
6040
6042
|
/** Whether this row is draggable, usually to allow drag & drop reordering of rows */
|
|
6041
6043
|
draggable?: boolean;
|
package/dist/index.d.ts
CHANGED
|
@@ -5888,6 +5888,8 @@ declare class RowState<R extends Kinded> {
|
|
|
5888
5888
|
get isSelected(): boolean;
|
|
5889
5889
|
/** This row's share of `TableState.selectedLeafRowCount`, see `GridDataRow.childrenCount`. */
|
|
5890
5890
|
get selectedLeafRowCount(): number;
|
|
5891
|
+
/** Whether a checked ancestor's `childrenCount` already includes this row. */
|
|
5892
|
+
private get isCountedByParent();
|
|
5891
5893
|
/** The UI state for checked/unchecked + "partially checked" for parents. */
|
|
5892
5894
|
get selectedState(): SelectedState;
|
|
5893
5895
|
/**
|
|
@@ -6035,7 +6037,7 @@ type GridDataRow<R extends Kinded> = {
|
|
|
6035
6037
|
selectable?: false;
|
|
6036
6038
|
/** Whether this row should infer its selected state based on its children's selected state */
|
|
6037
6039
|
inferSelectedState?: false;
|
|
6038
|
-
/** Total children, e.g. when they load lazily; a
|
|
6040
|
+
/** Total children, e.g. when they load lazily; a checked row counts as this many in `getSelectedLeafRowCount`. */
|
|
6039
6041
|
childrenCount?: number;
|
|
6040
6042
|
/** Whether this row is draggable, usually to allow drag & drop reordering of rows */
|
|
6041
6043
|
draggable?: boolean;
|
package/dist/index.js
CHANGED
|
@@ -8035,9 +8035,18 @@ var RowState = class {
|
|
|
8035
8035
|
}
|
|
8036
8036
|
/** This row's share of `TableState.selectedLeafRowCount`, see `GridDataRow.childrenCount`. */
|
|
8037
8037
|
get selectedLeafRowCount() {
|
|
8038
|
-
if (this.isReservedKind
|
|
8038
|
+
if (this.isReservedKind) return 0;
|
|
8039
|
+
const { childrenCount } = this.row;
|
|
8040
|
+
if (childrenCount !== void 0 && this.isSelected) return this.isCountedByParent ? 0 : childrenCount;
|
|
8041
|
+
if (!this.selected) return 0;
|
|
8039
8042
|
if (this.children?.some((c) => c.row.selectable !== false)) return 0;
|
|
8040
|
-
return this.
|
|
8043
|
+
return this.isCountedByParent ? 0 : 1;
|
|
8044
|
+
}
|
|
8045
|
+
/** Whether a checked ancestor's `childrenCount` already includes this row. */
|
|
8046
|
+
get isCountedByParent() {
|
|
8047
|
+
const { parent } = this;
|
|
8048
|
+
if (!parent || this.removed) return false;
|
|
8049
|
+
return parent.row.childrenCount !== void 0 && parent.isSelected || parent.isCountedByParent;
|
|
8041
8050
|
}
|
|
8042
8051
|
/** The UI state for checked/unchecked + "partially checked" for parents. */
|
|
8043
8052
|
get selectedState() {
|
|
@@ -26829,10 +26838,7 @@ function useScrollPinnedViewportBounds(anchorRef, enabled, getPinTopPx) {
|
|
|
26829
26838
|
const pinTopPx = getPinTopPxRef.current(el);
|
|
26830
26839
|
const isPinned = rect.top <= pinTopPx + 1;
|
|
26831
26840
|
const topPx = isPinned ? pinTopPx : Math.round(rect.top);
|
|
26832
|
-
|
|
26833
|
-
setBounds(
|
|
26834
|
-
(prev) => prev?.topPx === topPx && prev?.heightPx === heightPx && prev?.isPinned === isPinned ? prev : { topPx, heightPx, isPinned }
|
|
26835
|
-
);
|
|
26841
|
+
setBounds((prev) => prev?.topPx === topPx && prev?.isPinned === isPinned ? prev : { topPx, isPinned });
|
|
26836
26842
|
}, [anchorRef]);
|
|
26837
26843
|
useLayoutEffect10(() => {
|
|
26838
26844
|
getPinTopPxRef.current = getPinTopPx;
|
|
@@ -27007,13 +27013,9 @@ function DocumentScrollRightPane({
|
|
|
27007
27013
|
current: null
|
|
27008
27014
|
};
|
|
27009
27015
|
const paneBounds = useScrollPinnedViewportBounds(isFixedOverlay ? anchor : paneRef, paneLayoutActive && isFixedOverlay, stickyTableHeaderOffsetPx);
|
|
27010
|
-
const paneStyle =
|
|
27011
|
-
top: bannerHeightPx
|
|
27012
|
-
}
|
|
27013
|
-
top: paneBounds.topPx,
|
|
27014
|
-
height: paneBounds.heightPx,
|
|
27015
|
-
maxHeight: paneBounds.heightPx
|
|
27016
|
-
} : void 0;
|
|
27016
|
+
const paneStyle = {
|
|
27017
|
+
top: mobile ? bannerHeightPx : paneBounds?.topPx
|
|
27018
|
+
};
|
|
27017
27019
|
const pane = /* @__PURE__ */ jsx199(AnimatePresence3, { children: isRightPaneOpen && /* @__PURE__ */ jsx199(
|
|
27018
27020
|
motion3.div,
|
|
27019
27021
|
{
|
|
@@ -27037,6 +27039,7 @@ function DocumentScrollRightPane({
|
|
|
27037
27039
|
} : {
|
|
27038
27040
|
position: "fixed",
|
|
27039
27041
|
right: "r_0",
|
|
27042
|
+
bottom: "bot_0",
|
|
27040
27043
|
overflowY: "oya",
|
|
27041
27044
|
width: ["w_var", {
|
|
27042
27045
|
"--width": maybeCssVar51(__maybeInc20(paneWidthCss))
|
|
@@ -27053,7 +27056,7 @@ function DocumentScrollRightPane({
|
|
|
27053
27056
|
"--borderColor": "var(--b-surface-separator)"
|
|
27054
27057
|
}],
|
|
27055
27058
|
...!!paneBounds?.isPinned ? {
|
|
27056
|
-
transition: "
|
|
27059
|
+
transition: "transitionTop"
|
|
27057
27060
|
} : {}
|
|
27058
27061
|
}),
|
|
27059
27062
|
initial: {
|