@surdeddd/bottom-sheet 0.20.1 → 0.20.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.js CHANGED
@@ -836,23 +836,25 @@ var ScrimController = class {
836
836
  if (!progressChanged && this.backdropOpacitySentinel.value !== -1 && this.screenOpacitySentinel.value !== -1) {
837
837
  return;
838
838
  }
839
- if (this.backdrop && this.isTopSheet()) {
839
+ if (this.backdrop) {
840
840
  const [s, e] = this.backdropRange;
841
841
  const range = Math.max(e - s, RANGE_DIVISION_EPSILON);
842
842
  const backdropOpacity = Math.min(
843
843
  Math.max((progress - s) / range, 0),
844
844
  1
845
845
  );
846
- if (this.backdropOpacitySentinel.shouldWrite(
847
- backdropOpacity,
848
- OPACITY_WRITE_EPSILON
849
- )) {
850
- this.backdrop.style.opacity = String(backdropOpacity);
851
- }
852
- const nextPointer = backdropOpacity > POINTER_EVENTS_OPACITY_THRESHOLD ? "auto" : "none";
853
- if (nextPointer !== this.lastBackdropPointer) {
854
- this.backdrop.style.pointerEvents = nextPointer;
855
- this.lastBackdropPointer = nextPointer;
846
+ if (this.isTopSheet() || backdropOpacity === 0) {
847
+ if (this.backdropOpacitySentinel.shouldWrite(
848
+ backdropOpacity,
849
+ OPACITY_WRITE_EPSILON
850
+ )) {
851
+ this.backdrop.style.opacity = String(backdropOpacity);
852
+ }
853
+ const nextPointer = backdropOpacity > POINTER_EVENTS_OPACITY_THRESHOLD ? "auto" : "none";
854
+ if (nextPointer !== this.lastBackdropPointer) {
855
+ this.backdrop.style.pointerEvents = nextPointer;
856
+ this.lastBackdropPointer = nextPointer;
857
+ }
856
858
  }
857
859
  }
858
860
  if (this.screenComponent && this.scrimMode !== "off") {
@@ -853,17 +853,19 @@ class ScrimController {
853
853
  if (!progressChanged && this.backdropOpacitySentinel.value !== -1 && this.screenOpacitySentinel.value !== -1) {
854
854
  return;
855
855
  }
856
- if (this.backdrop && this.isTopSheet()) {
856
+ if (this.backdrop) {
857
857
  const [s, e] = this.backdropRange;
858
858
  const range = Math.max(e - s, RANGE_DIVISION_EPSILON);
859
859
  const backdropOpacity = Math.min(Math.max((progress - s) / range, 0), 1);
860
- if (this.backdropOpacitySentinel.shouldWrite(backdropOpacity, OPACITY_WRITE_EPSILON)) {
861
- this.backdrop.style.opacity = String(backdropOpacity);
862
- }
863
- const nextPointer = backdropOpacity > POINTER_EVENTS_OPACITY_THRESHOLD ? "auto" : "none";
864
- if (nextPointer !== this.lastBackdropPointer) {
865
- this.backdrop.style.pointerEvents = nextPointer;
866
- this.lastBackdropPointer = nextPointer;
860
+ if (this.isTopSheet() || backdropOpacity === 0) {
861
+ if (this.backdropOpacitySentinel.shouldWrite(backdropOpacity, OPACITY_WRITE_EPSILON)) {
862
+ this.backdrop.style.opacity = String(backdropOpacity);
863
+ }
864
+ const nextPointer = backdropOpacity > POINTER_EVENTS_OPACITY_THRESHOLD ? "auto" : "none";
865
+ if (nextPointer !== this.lastBackdropPointer) {
866
+ this.backdrop.style.pointerEvents = nextPointer;
867
+ this.lastBackdropPointer = nextPointer;
868
+ }
867
869
  }
868
870
  }
869
871
  if (this.screenComponent && this.scrimMode !== "off") {
@@ -851,17 +851,19 @@ class ScrimController {
851
851
  if (!progressChanged && this.backdropOpacitySentinel.value !== -1 && this.screenOpacitySentinel.value !== -1) {
852
852
  return;
853
853
  }
854
- if (this.backdrop && this.isTopSheet()) {
854
+ if (this.backdrop) {
855
855
  const [s, e] = this.backdropRange;
856
856
  const range = Math.max(e - s, RANGE_DIVISION_EPSILON);
857
857
  const backdropOpacity = Math.min(Math.max((progress - s) / range, 0), 1);
858
- if (this.backdropOpacitySentinel.shouldWrite(backdropOpacity, OPACITY_WRITE_EPSILON)) {
859
- this.backdrop.style.opacity = String(backdropOpacity);
860
- }
861
- const nextPointer = backdropOpacity > POINTER_EVENTS_OPACITY_THRESHOLD ? "auto" : "none";
862
- if (nextPointer !== this.lastBackdropPointer) {
863
- this.backdrop.style.pointerEvents = nextPointer;
864
- this.lastBackdropPointer = nextPointer;
858
+ if (this.isTopSheet() || backdropOpacity === 0) {
859
+ if (this.backdropOpacitySentinel.shouldWrite(backdropOpacity, OPACITY_WRITE_EPSILON)) {
860
+ this.backdrop.style.opacity = String(backdropOpacity);
861
+ }
862
+ const nextPointer = backdropOpacity > POINTER_EVENTS_OPACITY_THRESHOLD ? "auto" : "none";
863
+ if (nextPointer !== this.lastBackdropPointer) {
864
+ this.backdrop.style.pointerEvents = nextPointer;
865
+ this.lastBackdropPointer = nextPointer;
866
+ }
865
867
  }
866
868
  }
867
869
  if (this.screenComponent && this.scrimMode !== "off") {
package/dist/qwik.cjs CHANGED
@@ -841,23 +841,25 @@ var ScrimController = class {
841
841
  if (!progressChanged && this.backdropOpacitySentinel.value !== -1 && this.screenOpacitySentinel.value !== -1) {
842
842
  return;
843
843
  }
844
- if (this.backdrop && this.isTopSheet()) {
844
+ if (this.backdrop) {
845
845
  const [s, e] = this.backdropRange;
846
846
  const range = Math.max(e - s, RANGE_DIVISION_EPSILON);
847
847
  const backdropOpacity = Math.min(
848
848
  Math.max((progress - s) / range, 0),
849
849
  1
850
850
  );
851
- if (this.backdropOpacitySentinel.shouldWrite(
852
- backdropOpacity,
853
- OPACITY_WRITE_EPSILON
854
- )) {
855
- this.backdrop.style.opacity = String(backdropOpacity);
856
- }
857
- const nextPointer = backdropOpacity > POINTER_EVENTS_OPACITY_THRESHOLD ? "auto" : "none";
858
- if (nextPointer !== this.lastBackdropPointer) {
859
- this.backdrop.style.pointerEvents = nextPointer;
860
- this.lastBackdropPointer = nextPointer;
851
+ if (this.isTopSheet() || backdropOpacity === 0) {
852
+ if (this.backdropOpacitySentinel.shouldWrite(
853
+ backdropOpacity,
854
+ OPACITY_WRITE_EPSILON
855
+ )) {
856
+ this.backdrop.style.opacity = String(backdropOpacity);
857
+ }
858
+ const nextPointer = backdropOpacity > POINTER_EVENTS_OPACITY_THRESHOLD ? "auto" : "none";
859
+ if (nextPointer !== this.lastBackdropPointer) {
860
+ this.backdrop.style.pointerEvents = nextPointer;
861
+ this.lastBackdropPointer = nextPointer;
862
+ }
861
863
  }
862
864
  }
863
865
  if (this.screenComponent && this.scrimMode !== "off") {
package/dist/qwik.js CHANGED
@@ -839,23 +839,25 @@ var ScrimController = class {
839
839
  if (!progressChanged && this.backdropOpacitySentinel.value !== -1 && this.screenOpacitySentinel.value !== -1) {
840
840
  return;
841
841
  }
842
- if (this.backdrop && this.isTopSheet()) {
842
+ if (this.backdrop) {
843
843
  const [s, e] = this.backdropRange;
844
844
  const range = Math.max(e - s, RANGE_DIVISION_EPSILON);
845
845
  const backdropOpacity = Math.min(
846
846
  Math.max((progress - s) / range, 0),
847
847
  1
848
848
  );
849
- if (this.backdropOpacitySentinel.shouldWrite(
850
- backdropOpacity,
851
- OPACITY_WRITE_EPSILON
852
- )) {
853
- this.backdrop.style.opacity = String(backdropOpacity);
854
- }
855
- const nextPointer = backdropOpacity > POINTER_EVENTS_OPACITY_THRESHOLD ? "auto" : "none";
856
- if (nextPointer !== this.lastBackdropPointer) {
857
- this.backdrop.style.pointerEvents = nextPointer;
858
- this.lastBackdropPointer = nextPointer;
849
+ if (this.isTopSheet() || backdropOpacity === 0) {
850
+ if (this.backdropOpacitySentinel.shouldWrite(
851
+ backdropOpacity,
852
+ OPACITY_WRITE_EPSILON
853
+ )) {
854
+ this.backdrop.style.opacity = String(backdropOpacity);
855
+ }
856
+ const nextPointer = backdropOpacity > POINTER_EVENTS_OPACITY_THRESHOLD ? "auto" : "none";
857
+ if (nextPointer !== this.lastBackdropPointer) {
858
+ this.backdrop.style.pointerEvents = nextPointer;
859
+ this.lastBackdropPointer = nextPointer;
860
+ }
859
861
  }
860
862
  }
861
863
  if (this.screenComponent && this.scrimMode !== "off") {
package/dist/react.cjs CHANGED
@@ -848,23 +848,25 @@ var ScrimController = class {
848
848
  if (!progressChanged && this.backdropOpacitySentinel.value !== -1 && this.screenOpacitySentinel.value !== -1) {
849
849
  return;
850
850
  }
851
- if (this.backdrop && this.isTopSheet()) {
851
+ if (this.backdrop) {
852
852
  const [s, e] = this.backdropRange;
853
853
  const range = Math.max(e - s, RANGE_DIVISION_EPSILON);
854
854
  const backdropOpacity = Math.min(
855
855
  Math.max((progress - s) / range, 0),
856
856
  1
857
857
  );
858
- if (this.backdropOpacitySentinel.shouldWrite(
859
- backdropOpacity,
860
- OPACITY_WRITE_EPSILON
861
- )) {
862
- this.backdrop.style.opacity = String(backdropOpacity);
863
- }
864
- const nextPointer = backdropOpacity > POINTER_EVENTS_OPACITY_THRESHOLD ? "auto" : "none";
865
- if (nextPointer !== this.lastBackdropPointer) {
866
- this.backdrop.style.pointerEvents = nextPointer;
867
- this.lastBackdropPointer = nextPointer;
858
+ if (this.isTopSheet() || backdropOpacity === 0) {
859
+ if (this.backdropOpacitySentinel.shouldWrite(
860
+ backdropOpacity,
861
+ OPACITY_WRITE_EPSILON
862
+ )) {
863
+ this.backdrop.style.opacity = String(backdropOpacity);
864
+ }
865
+ const nextPointer = backdropOpacity > POINTER_EVENTS_OPACITY_THRESHOLD ? "auto" : "none";
866
+ if (nextPointer !== this.lastBackdropPointer) {
867
+ this.backdrop.style.pointerEvents = nextPointer;
868
+ this.lastBackdropPointer = nextPointer;
869
+ }
868
870
  }
869
871
  }
870
872
  if (this.screenComponent && this.scrimMode !== "off") {
package/dist/react.js CHANGED
@@ -846,23 +846,25 @@ var ScrimController = class {
846
846
  if (!progressChanged && this.backdropOpacitySentinel.value !== -1 && this.screenOpacitySentinel.value !== -1) {
847
847
  return;
848
848
  }
849
- if (this.backdrop && this.isTopSheet()) {
849
+ if (this.backdrop) {
850
850
  const [s, e] = this.backdropRange;
851
851
  const range = Math.max(e - s, RANGE_DIVISION_EPSILON);
852
852
  const backdropOpacity = Math.min(
853
853
  Math.max((progress - s) / range, 0),
854
854
  1
855
855
  );
856
- if (this.backdropOpacitySentinel.shouldWrite(
857
- backdropOpacity,
858
- OPACITY_WRITE_EPSILON
859
- )) {
860
- this.backdrop.style.opacity = String(backdropOpacity);
861
- }
862
- const nextPointer = backdropOpacity > POINTER_EVENTS_OPACITY_THRESHOLD ? "auto" : "none";
863
- if (nextPointer !== this.lastBackdropPointer) {
864
- this.backdrop.style.pointerEvents = nextPointer;
865
- this.lastBackdropPointer = nextPointer;
856
+ if (this.isTopSheet() || backdropOpacity === 0) {
857
+ if (this.backdropOpacitySentinel.shouldWrite(
858
+ backdropOpacity,
859
+ OPACITY_WRITE_EPSILON
860
+ )) {
861
+ this.backdrop.style.opacity = String(backdropOpacity);
862
+ }
863
+ const nextPointer = backdropOpacity > POINTER_EVENTS_OPACITY_THRESHOLD ? "auto" : "none";
864
+ if (nextPointer !== this.lastBackdropPointer) {
865
+ this.backdrop.style.pointerEvents = nextPointer;
866
+ this.lastBackdropPointer = nextPointer;
867
+ }
866
868
  }
867
869
  }
868
870
  if (this.screenComponent && this.scrimMode !== "off") {
package/dist/solid.cjs CHANGED
@@ -841,23 +841,25 @@ var ScrimController = class {
841
841
  if (!progressChanged && this.backdropOpacitySentinel.value !== -1 && this.screenOpacitySentinel.value !== -1) {
842
842
  return;
843
843
  }
844
- if (this.backdrop && this.isTopSheet()) {
844
+ if (this.backdrop) {
845
845
  const [s, e] = this.backdropRange;
846
846
  const range = Math.max(e - s, RANGE_DIVISION_EPSILON);
847
847
  const backdropOpacity = Math.min(
848
848
  Math.max((progress - s) / range, 0),
849
849
  1
850
850
  );
851
- if (this.backdropOpacitySentinel.shouldWrite(
852
- backdropOpacity,
853
- OPACITY_WRITE_EPSILON
854
- )) {
855
- this.backdrop.style.opacity = String(backdropOpacity);
856
- }
857
- const nextPointer = backdropOpacity > POINTER_EVENTS_OPACITY_THRESHOLD ? "auto" : "none";
858
- if (nextPointer !== this.lastBackdropPointer) {
859
- this.backdrop.style.pointerEvents = nextPointer;
860
- this.lastBackdropPointer = nextPointer;
851
+ if (this.isTopSheet() || backdropOpacity === 0) {
852
+ if (this.backdropOpacitySentinel.shouldWrite(
853
+ backdropOpacity,
854
+ OPACITY_WRITE_EPSILON
855
+ )) {
856
+ this.backdrop.style.opacity = String(backdropOpacity);
857
+ }
858
+ const nextPointer = backdropOpacity > POINTER_EVENTS_OPACITY_THRESHOLD ? "auto" : "none";
859
+ if (nextPointer !== this.lastBackdropPointer) {
860
+ this.backdrop.style.pointerEvents = nextPointer;
861
+ this.lastBackdropPointer = nextPointer;
862
+ }
861
863
  }
862
864
  }
863
865
  if (this.screenComponent && this.scrimMode !== "off") {
package/dist/solid.js CHANGED
@@ -839,23 +839,25 @@ var ScrimController = class {
839
839
  if (!progressChanged && this.backdropOpacitySentinel.value !== -1 && this.screenOpacitySentinel.value !== -1) {
840
840
  return;
841
841
  }
842
- if (this.backdrop && this.isTopSheet()) {
842
+ if (this.backdrop) {
843
843
  const [s, e] = this.backdropRange;
844
844
  const range = Math.max(e - s, RANGE_DIVISION_EPSILON);
845
845
  const backdropOpacity = Math.min(
846
846
  Math.max((progress - s) / range, 0),
847
847
  1
848
848
  );
849
- if (this.backdropOpacitySentinel.shouldWrite(
850
- backdropOpacity,
851
- OPACITY_WRITE_EPSILON
852
- )) {
853
- this.backdrop.style.opacity = String(backdropOpacity);
854
- }
855
- const nextPointer = backdropOpacity > POINTER_EVENTS_OPACITY_THRESHOLD ? "auto" : "none";
856
- if (nextPointer !== this.lastBackdropPointer) {
857
- this.backdrop.style.pointerEvents = nextPointer;
858
- this.lastBackdropPointer = nextPointer;
849
+ if (this.isTopSheet() || backdropOpacity === 0) {
850
+ if (this.backdropOpacitySentinel.shouldWrite(
851
+ backdropOpacity,
852
+ OPACITY_WRITE_EPSILON
853
+ )) {
854
+ this.backdrop.style.opacity = String(backdropOpacity);
855
+ }
856
+ const nextPointer = backdropOpacity > POINTER_EVENTS_OPACITY_THRESHOLD ? "auto" : "none";
857
+ if (nextPointer !== this.lastBackdropPointer) {
858
+ this.backdrop.style.pointerEvents = nextPointer;
859
+ this.lastBackdropPointer = nextPointer;
860
+ }
859
861
  }
860
862
  }
861
863
  if (this.screenComponent && this.scrimMode !== "off") {
@@ -842,23 +842,25 @@ var ScrimController = class {
842
842
  if (!progressChanged && this.backdropOpacitySentinel.value !== -1 && this.screenOpacitySentinel.value !== -1) {
843
843
  return;
844
844
  }
845
- if (this.backdrop && this.isTopSheet()) {
845
+ if (this.backdrop) {
846
846
  const [s, e] = this.backdropRange;
847
847
  const range = Math.max(e - s, RANGE_DIVISION_EPSILON);
848
848
  const backdropOpacity = Math.min(
849
849
  Math.max((progress - s) / range, 0),
850
850
  1
851
851
  );
852
- if (this.backdropOpacitySentinel.shouldWrite(
853
- backdropOpacity,
854
- OPACITY_WRITE_EPSILON
855
- )) {
856
- this.backdrop.style.opacity = String(backdropOpacity);
857
- }
858
- const nextPointer = backdropOpacity > POINTER_EVENTS_OPACITY_THRESHOLD ? "auto" : "none";
859
- if (nextPointer !== this.lastBackdropPointer) {
860
- this.backdrop.style.pointerEvents = nextPointer;
861
- this.lastBackdropPointer = nextPointer;
852
+ if (this.isTopSheet() || backdropOpacity === 0) {
853
+ if (this.backdropOpacitySentinel.shouldWrite(
854
+ backdropOpacity,
855
+ OPACITY_WRITE_EPSILON
856
+ )) {
857
+ this.backdrop.style.opacity = String(backdropOpacity);
858
+ }
859
+ const nextPointer = backdropOpacity > POINTER_EVENTS_OPACITY_THRESHOLD ? "auto" : "none";
860
+ if (nextPointer !== this.lastBackdropPointer) {
861
+ this.backdrop.style.pointerEvents = nextPointer;
862
+ this.lastBackdropPointer = nextPointer;
863
+ }
862
864
  }
863
865
  }
864
866
  if (this.screenComponent && this.scrimMode !== "off") {
@@ -0,0 +1 @@
1
+ export {};
@@ -840,23 +840,25 @@ var ScrimController = class {
840
840
  if (!progressChanged && this.backdropOpacitySentinel.value !== -1 && this.screenOpacitySentinel.value !== -1) {
841
841
  return;
842
842
  }
843
- if (this.backdrop && this.isTopSheet()) {
843
+ if (this.backdrop) {
844
844
  const [s, e] = this.backdropRange;
845
845
  const range = Math.max(e - s, RANGE_DIVISION_EPSILON);
846
846
  const backdropOpacity = Math.min(
847
847
  Math.max((progress - s) / range, 0),
848
848
  1
849
849
  );
850
- if (this.backdropOpacitySentinel.shouldWrite(
851
- backdropOpacity,
852
- OPACITY_WRITE_EPSILON
853
- )) {
854
- this.backdrop.style.opacity = String(backdropOpacity);
855
- }
856
- const nextPointer = backdropOpacity > POINTER_EVENTS_OPACITY_THRESHOLD ? "auto" : "none";
857
- if (nextPointer !== this.lastBackdropPointer) {
858
- this.backdrop.style.pointerEvents = nextPointer;
859
- this.lastBackdropPointer = nextPointer;
850
+ if (this.isTopSheet() || backdropOpacity === 0) {
851
+ if (this.backdropOpacitySentinel.shouldWrite(
852
+ backdropOpacity,
853
+ OPACITY_WRITE_EPSILON
854
+ )) {
855
+ this.backdrop.style.opacity = String(backdropOpacity);
856
+ }
857
+ const nextPointer = backdropOpacity > POINTER_EVENTS_OPACITY_THRESHOLD ? "auto" : "none";
858
+ if (nextPointer !== this.lastBackdropPointer) {
859
+ this.backdrop.style.pointerEvents = nextPointer;
860
+ this.lastBackdropPointer = nextPointer;
861
+ }
860
862
  }
861
863
  }
862
864
  if (this.screenComponent && this.scrimMode !== "off") {
@@ -838,23 +838,25 @@ var ScrimController = class {
838
838
  if (!progressChanged && this.backdropOpacitySentinel.value !== -1 && this.screenOpacitySentinel.value !== -1) {
839
839
  return;
840
840
  }
841
- if (this.backdrop && this.isTopSheet()) {
841
+ if (this.backdrop) {
842
842
  const [s, e] = this.backdropRange;
843
843
  const range = Math.max(e - s, RANGE_DIVISION_EPSILON);
844
844
  const backdropOpacity = Math.min(
845
845
  Math.max((progress - s) / range, 0),
846
846
  1
847
847
  );
848
- if (this.backdropOpacitySentinel.shouldWrite(
849
- backdropOpacity,
850
- OPACITY_WRITE_EPSILON
851
- )) {
852
- this.backdrop.style.opacity = String(backdropOpacity);
853
- }
854
- const nextPointer = backdropOpacity > POINTER_EVENTS_OPACITY_THRESHOLD ? "auto" : "none";
855
- if (nextPointer !== this.lastBackdropPointer) {
856
- this.backdrop.style.pointerEvents = nextPointer;
857
- this.lastBackdropPointer = nextPointer;
848
+ if (this.isTopSheet() || backdropOpacity === 0) {
849
+ if (this.backdropOpacitySentinel.shouldWrite(
850
+ backdropOpacity,
851
+ OPACITY_WRITE_EPSILON
852
+ )) {
853
+ this.backdrop.style.opacity = String(backdropOpacity);
854
+ }
855
+ const nextPointer = backdropOpacity > POINTER_EVENTS_OPACITY_THRESHOLD ? "auto" : "none";
856
+ if (nextPointer !== this.lastBackdropPointer) {
857
+ this.backdrop.style.pointerEvents = nextPointer;
858
+ this.lastBackdropPointer = nextPointer;
859
+ }
858
860
  }
859
861
  }
860
862
  if (this.screenComponent && this.scrimMode !== "off") {
package/dist/svelte.cjs CHANGED
@@ -862,23 +862,25 @@ var ScrimController = class {
862
862
  if (!progressChanged && this.backdropOpacitySentinel.value !== -1 && this.screenOpacitySentinel.value !== -1) {
863
863
  return;
864
864
  }
865
- if (this.backdrop && this.isTopSheet()) {
865
+ if (this.backdrop) {
866
866
  const [s, e] = this.backdropRange;
867
867
  const range = Math.max(e - s, RANGE_DIVISION_EPSILON);
868
868
  const backdropOpacity = Math.min(
869
869
  Math.max((progress - s) / range, 0),
870
870
  1
871
871
  );
872
- if (this.backdropOpacitySentinel.shouldWrite(
873
- backdropOpacity,
874
- OPACITY_WRITE_EPSILON
875
- )) {
876
- this.backdrop.style.opacity = String(backdropOpacity);
877
- }
878
- const nextPointer = backdropOpacity > POINTER_EVENTS_OPACITY_THRESHOLD ? "auto" : "none";
879
- if (nextPointer !== this.lastBackdropPointer) {
880
- this.backdrop.style.pointerEvents = nextPointer;
881
- this.lastBackdropPointer = nextPointer;
872
+ if (this.isTopSheet() || backdropOpacity === 0) {
873
+ if (this.backdropOpacitySentinel.shouldWrite(
874
+ backdropOpacity,
875
+ OPACITY_WRITE_EPSILON
876
+ )) {
877
+ this.backdrop.style.opacity = String(backdropOpacity);
878
+ }
879
+ const nextPointer = backdropOpacity > POINTER_EVENTS_OPACITY_THRESHOLD ? "auto" : "none";
880
+ if (nextPointer !== this.lastBackdropPointer) {
881
+ this.backdrop.style.pointerEvents = nextPointer;
882
+ this.lastBackdropPointer = nextPointer;
883
+ }
882
884
  }
883
885
  }
884
886
  if (this.screenComponent && this.scrimMode !== "off") {
package/dist/svelte.js CHANGED
@@ -840,23 +840,25 @@ var ScrimController = class {
840
840
  if (!progressChanged && this.backdropOpacitySentinel.value !== -1 && this.screenOpacitySentinel.value !== -1) {
841
841
  return;
842
842
  }
843
- if (this.backdrop && this.isTopSheet()) {
843
+ if (this.backdrop) {
844
844
  const [s, e] = this.backdropRange;
845
845
  const range = Math.max(e - s, RANGE_DIVISION_EPSILON);
846
846
  const backdropOpacity = Math.min(
847
847
  Math.max((progress - s) / range, 0),
848
848
  1
849
849
  );
850
- if (this.backdropOpacitySentinel.shouldWrite(
851
- backdropOpacity,
852
- OPACITY_WRITE_EPSILON
853
- )) {
854
- this.backdrop.style.opacity = String(backdropOpacity);
855
- }
856
- const nextPointer = backdropOpacity > POINTER_EVENTS_OPACITY_THRESHOLD ? "auto" : "none";
857
- if (nextPointer !== this.lastBackdropPointer) {
858
- this.backdrop.style.pointerEvents = nextPointer;
859
- this.lastBackdropPointer = nextPointer;
850
+ if (this.isTopSheet() || backdropOpacity === 0) {
851
+ if (this.backdropOpacitySentinel.shouldWrite(
852
+ backdropOpacity,
853
+ OPACITY_WRITE_EPSILON
854
+ )) {
855
+ this.backdrop.style.opacity = String(backdropOpacity);
856
+ }
857
+ const nextPointer = backdropOpacity > POINTER_EVENTS_OPACITY_THRESHOLD ? "auto" : "none";
858
+ if (nextPointer !== this.lastBackdropPointer) {
859
+ this.backdrop.style.pointerEvents = nextPointer;
860
+ this.lastBackdropPointer = nextPointer;
861
+ }
860
862
  }
861
863
  }
862
864
  if (this.screenComponent && this.scrimMode !== "off") {
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
package/dist/vue.cjs CHANGED
@@ -840,23 +840,25 @@ var ScrimController = class {
840
840
  if (!progressChanged && this.backdropOpacitySentinel.value !== -1 && this.screenOpacitySentinel.value !== -1) {
841
841
  return;
842
842
  }
843
- if (this.backdrop && this.isTopSheet()) {
843
+ if (this.backdrop) {
844
844
  const [s, e] = this.backdropRange;
845
845
  const range = Math.max(e - s, RANGE_DIVISION_EPSILON);
846
846
  const backdropOpacity = Math.min(
847
847
  Math.max((progress - s) / range, 0),
848
848
  1
849
849
  );
850
- if (this.backdropOpacitySentinel.shouldWrite(
851
- backdropOpacity,
852
- OPACITY_WRITE_EPSILON
853
- )) {
854
- this.backdrop.style.opacity = String(backdropOpacity);
855
- }
856
- const nextPointer = backdropOpacity > POINTER_EVENTS_OPACITY_THRESHOLD ? "auto" : "none";
857
- if (nextPointer !== this.lastBackdropPointer) {
858
- this.backdrop.style.pointerEvents = nextPointer;
859
- this.lastBackdropPointer = nextPointer;
850
+ if (this.isTopSheet() || backdropOpacity === 0) {
851
+ if (this.backdropOpacitySentinel.shouldWrite(
852
+ backdropOpacity,
853
+ OPACITY_WRITE_EPSILON
854
+ )) {
855
+ this.backdrop.style.opacity = String(backdropOpacity);
856
+ }
857
+ const nextPointer = backdropOpacity > POINTER_EVENTS_OPACITY_THRESHOLD ? "auto" : "none";
858
+ if (nextPointer !== this.lastBackdropPointer) {
859
+ this.backdrop.style.pointerEvents = nextPointer;
860
+ this.lastBackdropPointer = nextPointer;
861
+ }
860
862
  }
861
863
  }
862
864
  if (this.screenComponent && this.scrimMode !== "off") {
@@ -4996,7 +4998,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
4996
4998
  /* KEYED_FRAGMENT */
4997
4999
  ))], 8, ["to", "disabled"]);
4998
5000
  }
4999
- var BottomSheet_default = /* @__PURE__ */ export_helper_default(_sfc_main, [["render", _sfc_render], ["__file", "/Users/maksimkravcov/Projects/Personal/BottomSheet/src/vue/BottomSheet.vue"]]);
5001
+ var BottomSheet_default = /* @__PURE__ */ export_helper_default(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/BottomSheet/BottomSheet/src/vue/BottomSheet.vue"]]);
5000
5002
 
5001
5003
  exports.BottomSheet = BottomSheet_default;
5002
5004
  exports.useBottomSheet = useBottomSheet;
package/dist/vue.d.cts CHANGED
@@ -74,6 +74,11 @@ export function useBottomSheet<TId extends string = string>(
74
74
  opts: UseBottomSheetVueOptions<TId>,
75
75
  ): UseBottomSheetVueReturn<TId>;
76
76
 
77
+ export type BottomSheetInstance<TId extends string = string> = Omit<
78
+ UseBottomSheetVueReturn<TId>,
79
+ "sheetRef" | "handleRef" | "contentRef" | "backdropRef" | "screenRef"
80
+ >;
81
+
77
82
  export type VueAnchor<TId extends string = string> = Omit<
78
83
  AnchorOptions,
79
84
  "element"
@@ -96,7 +101,7 @@ export type BottomSheetProps<TId extends string = string> =
96
101
 
97
102
  export const BottomSheet: DefineComponent<
98
103
  BottomSheetProps,
99
- Record<string, never>,
104
+ BottomSheetInstance,
100
105
  Record<string, never>,
101
106
  Record<string, never>,
102
107
  Record<string, never>,
package/dist/vue.d.ts CHANGED
@@ -74,6 +74,11 @@ export function useBottomSheet<TId extends string = string>(
74
74
  opts: UseBottomSheetVueOptions<TId>,
75
75
  ): UseBottomSheetVueReturn<TId>;
76
76
 
77
+ export type BottomSheetInstance<TId extends string = string> = Omit<
78
+ UseBottomSheetVueReturn<TId>,
79
+ "sheetRef" | "handleRef" | "contentRef" | "backdropRef" | "screenRef"
80
+ >;
81
+
77
82
  export type VueAnchor<TId extends string = string> = Omit<
78
83
  AnchorOptions,
79
84
  "element"
@@ -96,7 +101,7 @@ export type BottomSheetProps<TId extends string = string> =
96
101
 
97
102
  export const BottomSheet: DefineComponent<
98
103
  BottomSheetProps,
99
- Record<string, never>,
104
+ BottomSheetInstance,
100
105
  Record<string, never>,
101
106
  Record<string, never>,
102
107
  Record<string, never>,