bits-ui 1.0.0-next.14 → 1.0.0-next.16

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.
@@ -661,7 +661,7 @@ class CommandItemState {
661
661
  this.id.current;
662
662
  this.#group?.id.current;
663
663
  if (!this.#forceMount.current) {
664
- untrack(() => {
664
+ return untrack(() => {
665
665
  return this.root.registerItem(this.id.current, this.#group?.id.current);
666
666
  });
667
667
  }
@@ -38,6 +38,7 @@ declare class PaginationRootState {
38
38
  start: number;
39
39
  end: number;
40
40
  };
41
+ currentPage: number;
41
42
  };
42
43
  props: {
43
44
  readonly id: string;
@@ -67,6 +67,7 @@ class PaginationRootState {
67
67
  snippetProps = $derived.by(() => ({
68
68
  pages: this.pages,
69
69
  range: this.range,
70
+ currentPage: this.page.current,
70
71
  }));
71
72
  props = $derived.by(() => ({
72
73
  id: this.id.current,
@@ -76,7 +76,7 @@ class PinInputRootState {
76
76
  });
77
77
  $effect(() => {
78
78
  let unsub = noop;
79
- untrack(() => {
79
+ return untrack(() => {
80
80
  const input = this.#inputRef.current;
81
81
  const container = this.#ref.current;
82
82
  if (!input || !container)
@@ -275,7 +275,7 @@ export class SelectContentState {
275
275
  });
276
276
  $effect(() => {
277
277
  this.root.open.current;
278
- untrack(() => {
278
+ return untrack(() => {
279
279
  let cleanup = [noop];
280
280
  afterTick(() => {
281
281
  const node = document.getElementById(this.id.current);
@@ -114,7 +114,7 @@ class TabsTriggerState {
114
114
  // we want to track the value & id
115
115
  const id = this.#id.current;
116
116
  const value = this.#value.current;
117
- untrack(() => {
117
+ return untrack(() => {
118
118
  const deregister = this.#root.registerTrigger(id, value);
119
119
  return () => {
120
120
  deregister();
@@ -113,9 +113,9 @@ export function useFocusScope({ id, loop, enabled, onOpenAutoFocus, onCloseAutoF
113
113
  return () => {
114
114
  if (!container)
115
115
  return;
116
- container.removeEventListener(AUTOFOCUS_ON_MOUNT, untrack(() => onOpenAutoFocus.current));
116
+ container.removeEventListener(AUTOFOCUS_ON_MOUNT, onOpenAutoFocus.current);
117
117
  const destroyEvent = new CustomEvent(AUTOFOCUS_ON_DESTROY, EVENT_OPTIONS);
118
- container.addEventListener(AUTOFOCUS_ON_DESTROY, untrack(() => onCloseAutoFocus.current));
118
+ container.addEventListener(AUTOFOCUS_ON_DESTROY, onCloseAutoFocus.current);
119
119
  container.dispatchEvent(destroyEvent);
120
120
  setTimeout(() => {
121
121
  if (!destroyEvent.defaultPrevented && previouslyFocusedElement) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bits-ui",
3
- "version": "1.0.0-next.14",
3
+ "version": "1.0.0-next.16",
4
4
  "license": "MIT",
5
5
  "repository": "github:huntabyte/bits-ui",
6
6
  "funding": "https://github.com/sponsors/huntabyte",