@maas/vue-equipment 1.0.0-beta.5 → 1.0.0-beta.6

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.4",
4
+ "version": "1.0.0-beta.5",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "0.8.4",
7
7
  "unbuild": "unknown"
@@ -17,7 +17,7 @@ export default /* @__PURE__ */ _defineComponent({
17
17
  },
18
18
  setup(__props) {
19
19
  const scrollReturn = inject(MagicScrollReturn, void 0);
20
- const scrollTarget = inject(MagicScrollTarget);
20
+ const scrollTarget = inject(MagicScrollTarget, void 0);
21
21
  if (!scrollTarget) {
22
22
  console.error("MagicScrollScene must be used within a MagicScrollProvider");
23
23
  }
@@ -9,6 +9,7 @@ export function useScrollApi(params) {
9
9
  const parentRect = ref(void 0);
10
10
  const start = ref(0);
11
11
  const end = ref(0);
12
+ const { width: windowWidth, height: windowHeight } = useWindowSize();
12
13
  function splitLocation(location) {
13
14
  return {
14
15
  child: location.match(/^[a-z]+/)[0],
@@ -56,7 +57,11 @@ export function useScrollApi(params) {
56
57
  }
57
58
  function getCalculations() {
58
59
  childRect.value = toValue(child)?.getBoundingClientRect();
59
- parentRect.value = toValue(parent) ? toValue(parent)?.getBoundingClientRect() : { ...useWindowSize(), top: 0 };
60
+ parentRect.value = toValue(parent) ? toValue(parent)?.getBoundingClientRect() : {
61
+ width: windowWidth.value,
62
+ height: windowHeight.value,
63
+ top: 0
64
+ };
60
65
  start.value = getOffsetTop(splitLocation(from));
61
66
  end.value = getOffsetTop(splitLocation(to));
62
67
  }
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.5",
4
+ "version": "1.0.0-beta.6",
5
5
  "contributors": [
6
6
  {
7
7
  "name": "Robin Scholz",