bits-ui 1.3.16 → 1.3.17

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.
@@ -55,10 +55,13 @@ declare class AvatarFallbackState {
55
55
  readonly opts: AvatarFallbackStateProps;
56
56
  readonly root: AvatarRootState;
57
57
  constructor(opts: AvatarFallbackStateProps, root: AvatarRootState);
58
+ style: {
59
+ display: string;
60
+ } | undefined;
58
61
  props: {
59
62
  readonly style: {
60
- readonly display: "none" | undefined;
61
- };
63
+ display: string;
64
+ } | undefined;
62
65
  readonly "data-status": AvatarImageLoadingStatus;
63
66
  readonly "data-avatar-fallback": "";
64
67
  };
@@ -77,10 +77,9 @@ class AvatarFallbackState {
77
77
  this.root = root;
78
78
  useRefById(opts);
79
79
  }
80
+ style = $derived.by(() => this.root.opts.loadingStatus.current === "loaded" ? { display: "none" } : undefined);
80
81
  props = $derived.by(() => ({
81
- style: {
82
- display: this.root.opts.loadingStatus.current === "loaded" ? "none" : undefined,
83
- },
82
+ style: this.style,
84
83
  "data-status": this.root.opts.loadingStatus.current,
85
84
  [AVATAR_FALLBACK_ATTR]: "",
86
85
  }));
@@ -19,7 +19,7 @@ class PaginationRootState {
19
19
  range = $derived.by(() => {
20
20
  const start = (this.opts.page.current - 1) * this.opts.perPage.current;
21
21
  const end = Math.min(start + this.opts.perPage.current, this.opts.count.current);
22
- return { start, end };
22
+ return { start: start + 1, end };
23
23
  });
24
24
  pages = $derived.by(() => getPageItems({
25
25
  page: this.opts.page.current,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bits-ui",
3
- "version": "1.3.16",
3
+ "version": "1.3.17",
4
4
  "license": "MIT",
5
5
  "repository": "github:huntabyte/bits-ui",
6
6
  "funding": "https://github.com/sponsors/huntabyte",