@dative-gpi/foundation-shared-components 1.0.181-fix-sandbox-connectivity → 1.0.182-acknowledge-range

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,41 +1,41 @@
1
- import { onBeforeUnmount, computed } from 'vue';
1
+ import { onBeforeUnmount, ref, readonly } from 'vue';
2
2
 
3
3
  export const useAnimationFrame = (callback: () => void) => {
4
- let animationId: number | null = null;
5
- let isActive = false;
4
+ let animationId: number | null = null;
5
+ const isActive = ref(false);
6
6
 
7
- const start = () => {
8
- if (isActive) {
9
- return;
7
+ const start = () => {
8
+ if (isActive.value) {
9
+ return;
10
+ }
11
+ isActive.value = true;
12
+
13
+ const animate = () => {
14
+ if (!isActive.value) {
15
+ return;
10
16
  }
11
- isActive = true;
12
-
13
- const animate = () => {
14
- if (!isActive) {
15
- return;
16
- }
17
17
 
18
- callback();
19
- animationId = requestAnimationFrame(animate);
20
- };
18
+ callback();
21
19
  animationId = requestAnimationFrame(animate);
22
20
  };
21
+ animationId = requestAnimationFrame(animate);
22
+ };
23
23
 
24
- const stop = () => {
25
- isActive = false;
26
- if (animationId !== null) {
27
- cancelAnimationFrame(animationId);
28
- animationId = null;
29
- }
30
- };
24
+ const stop = () => {
25
+ isActive.value = false;
26
+ if (animationId !== null) {
27
+ cancelAnimationFrame(animationId);
28
+ animationId = null;
29
+ }
30
+ };
31
31
 
32
- onBeforeUnmount(() => {
33
- stop();
34
- });
32
+ onBeforeUnmount(() => {
33
+ stop();
34
+ });
35
35
 
36
- return {
37
- start,
38
- stop,
39
- isActive: computed(() => isActive)
40
- };
41
- };
36
+ return {
37
+ start,
38
+ stop,
39
+ isActive: readonly(isActive)
40
+ };
41
+ };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dative-gpi/foundation-shared-components",
3
3
  "sideEffects": false,
4
- "version": "1.0.181-fix-sandbox-connectivity",
4
+ "version": "1.0.182-acknowledge-range",
5
5
  "description": "",
6
6
  "publishConfig": {
7
7
  "access": "public"
@@ -10,8 +10,8 @@
10
10
  "author": "",
11
11
  "license": "ISC",
12
12
  "dependencies": {
13
- "@dative-gpi/foundation-shared-domain": "1.0.181-fix-sandbox-connectivity",
14
- "@dative-gpi/foundation-shared-services": "1.0.181-fix-sandbox-connectivity"
13
+ "@dative-gpi/foundation-shared-domain": "1.0.182-acknowledge-range",
14
+ "@dative-gpi/foundation-shared-services": "1.0.182-acknowledge-range"
15
15
  },
16
16
  "peerDependencies": {
17
17
  "@dative-gpi/bones-ui": "^1.0.0",
@@ -35,5 +35,5 @@
35
35
  "sass": "1.71.1",
36
36
  "sass-loader": "13.3.2"
37
37
  },
38
- "gitHead": "953ddcfdd3728cda9d1da39d665c3a2944ec56d5"
38
+ "gitHead": "255d8d6d0944cf3006faa97438b0c51068cb4006"
39
39
  }