@maas/vue-equipment 1.0.0-beta.80 → 1.0.0-beta.81

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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@maas/vue-equipment/nuxt",
3
3
  "configKey": "vueEquipment",
4
- "version": "1.0.0-beta.79",
4
+ "version": "1.0.0-beta.80",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "unknown"
@@ -41,6 +41,7 @@ export function useTrayDrag(args) {
41
41
  const emitter = useMagicEmitter();
42
42
  const {
43
43
  dimension,
44
+ contentExtent,
44
45
  maxInset,
45
46
  mapSnapPoint,
46
47
  mappedSnapPoints,
@@ -477,10 +478,16 @@ export function useTrayDrag(args) {
477
478
  duration: payload.duration
478
479
  });
479
480
  }
480
- async function applyInitial() {
481
+ const pendingInitialSides = /* @__PURE__ */ new Set();
482
+ async function applyInitial(sides) {
481
483
  await getSizes();
482
484
  const { transition } = state.options.initial;
483
- for (const side of draggableSides.value) {
485
+ for (const side of sides ?? draggableSides.value) {
486
+ pendingInitialSides.delete(side);
487
+ if (!contentExtent(side)) {
488
+ pendingInitialSides.add(side);
489
+ continue;
490
+ }
484
491
  const initial = state.options.initial.snapPoints?.[side] ?? openSnapPoint(side);
485
492
  if (initial === void 0) {
486
493
  continue;
@@ -544,6 +551,9 @@ export function useTrayDrag(args) {
544
551
  resizeObserverEl = useResizeObserver(elRef, () => {
545
552
  useThrottleFn(async () => {
546
553
  await getSizes();
554
+ if (pendingInitialSides.size) {
555
+ await applyInitial([...pendingInitialSides]);
556
+ }
547
557
  for (const side of draggableSides.value) {
548
558
  const active = state.activeSnapPoint[side];
549
559
  if (active !== void 0) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@maas/vue-equipment",
3
3
  "description": "Our Frontend Toolkit, Free and Open Source",
4
- "version": "1.0.0-beta.80",
4
+ "version": "1.0.0-beta.81",
5
5
  "contributors": [
6
6
  {
7
7
  "name": "Robin Scholz",