@tooark/motion 1.2.2 → 1.4.0

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/README.md CHANGED
@@ -9,7 +9,7 @@ Opt-in animation helpers on the Motion library, calibrated by the Tooark motion
9
9
 
10
10
  ---
11
11
 
12
- ## Contents
12
+ ## 📑 Contents
13
13
 
14
14
  - [Overview](#-overview)
15
15
  - [Installation](#-installation)
@@ -18,6 +18,8 @@ Opt-in animation helpers on the Motion library, calibrated by the Tooark motion
18
18
  - [Usage examples](#-usage-examples)
19
19
  - [Dependencies](#-dependencies)
20
20
  - [Contributing](#-contributing)
21
+ - [Help & Security](#-help--security)
22
+ - [Support](#-support)
21
23
  - [License](#-license)
22
24
 
23
25
  ---
@@ -93,6 +95,30 @@ const dispose = arkSwipe(row, {
93
95
  });
94
96
  ```
95
97
 
98
+ ### In React, Vue and Angular
99
+
100
+ The helpers are plain functions, so no wrapper is needed: call them after the elements exist and call the returned stop/dispose function when the component goes away. Pass elements from a ref rather than a selector, since a selector searches the whole `document` and would also animate other instances of the component.
101
+
102
+ ```tsx
103
+ // React
104
+ useEffect(() => arkReveal(listRef.current!.querySelectorAll(":scope > li"), { preset: "fade", once: true }), []);
105
+ ```
106
+
107
+ ```ts
108
+ // Vue
109
+ let stop = () => {};
110
+ onMounted(() => (stop = arkSwipe(row.value!, { axis: "x", onSwipe: archive })));
111
+ onBeforeUnmount(() => stop());
112
+
113
+ // Angular
114
+ ngAfterViewInit(): void {
115
+ this.stop = arkReveal(this.list.nativeElement.querySelectorAll(":scope > li"), { preset: "fade" });
116
+ }
117
+ ngOnDestroy(): void {
118
+ this.stop?.();
119
+ }
120
+ ```
121
+
96
122
  ---
97
123
 
98
124
  ## 📋 Dependencies
@@ -101,8 +127,8 @@ Installed automatically unless marked as peer; peer dependencies are yours to in
101
127
 
102
128
  | Package | Version | Description |
103
129
  | ---------------------------------------------------------------- | ------- | ---------------------------------------------------------------- |
104
- | [`@tooark/core`](https://www.npmjs.com/package/@tooark/core) | ^1.2.2 | Types, i18n, toast/announce services, motion and overlay helpers |
105
- | [`@tooark/tokens`](https://www.npmjs.com/package/@tooark/tokens) | ^1.2.2 | Design tokens (colors, sizes, motion) and primitive types |
130
+ | [`@tooark/core`](https://www.npmjs.com/package/@tooark/core) | ^1.4.0 | Types, i18n, toast/announce services, motion and overlay helpers |
131
+ | [`@tooark/tokens`](https://www.npmjs.com/package/@tooark/tokens) | ^1.4.0 | Design tokens (colors, sizes, motion) and primitive types |
106
132
  | [`motion`](https://www.npmjs.com/package/motion) | ^13.4.4 | Motion animation library (spring physics, scroll, gestures) |
107
133
  | [`tslib`](https://www.npmjs.com/package/tslib) | ^2.8.1 | TypeScript runtime helpers |
108
134
 
@@ -114,6 +140,24 @@ Contributions are welcome! Open issues and pull requests in the [Tooark/web-comp
114
140
 
115
141
  ---
116
142
 
143
+ ## 🆘 Help & Security
144
+
145
+ - ❓ **Questions, bugs, feature ideas** — see [SUPPORT.md](https://github.com/Tooark/web-components/blob/main/SUPPORT.md) for the right channel
146
+ - 🔒 **Security vulnerabilities** — do **not** open a public issue; follow [SECURITY.md](https://github.com/Tooark/web-components/blob/main/SECURITY.md)
147
+
148
+ ---
149
+
150
+ ## 💖 Support
151
+
152
+ If this project helps your workflow, consider supporting its development:
153
+
154
+ - 💙 [GitHub Sponsors](https://github.com/sponsors/paulosfjunior)
155
+ - ☕ [Ko-fi](https://ko-fi.com/paulosfjunior)
156
+
157
+ Every contribution helps keep the project maintained and improving. Thank you! 🙏
158
+
159
+ ---
160
+
117
161
  ## 📄 License
118
162
 
119
163
  This project is licensed under the Apache License 2.0. See the [LICENSE](https://github.com/Tooark/web-components/blob/main/LICENSE) file for details.
package/README.pt-BR.md CHANGED
@@ -9,7 +9,7 @@ Helpers opt-in de animação sobre a lib Motion, calibrados pelos tokens de moti
9
9
 
10
10
  ---
11
11
 
12
- ## Conteúdo
12
+ ## 📑 Conteúdo
13
13
 
14
14
  - [Visão Geral](#-visão-geral)
15
15
  - [Instalação](#-instalação)
@@ -18,6 +18,8 @@ Helpers opt-in de animação sobre a lib Motion, calibrados pelos tokens de moti
18
18
  - [Exemplos de Uso](#-exemplos-de-uso)
19
19
  - [Dependências](#-dependências)
20
20
  - [Contribuição](#-contribuição)
21
+ - [Ajuda & Segurança](#-ajuda--segurança)
22
+ - [Apoie](#-apoie)
21
23
  - [Licença](#-licença)
22
24
 
23
25
  ---
@@ -93,6 +95,30 @@ const dispose = arkSwipe(linha, {
93
95
  });
94
96
  ```
95
97
 
98
+ ### Em React, Vue e Angular
99
+
100
+ Os helpers são funções comuns, então não precisam de wrapper: chame depois que os elementos existem e chame a função de parar/dispose devolvida quando o componente sai. Passe elementos de uma ref em vez de um seletor, porque um seletor procura no `document` inteiro e animaria também as outras instâncias do componente.
101
+
102
+ ```tsx
103
+ // React
104
+ useEffect(() => arkReveal(listRef.current!.querySelectorAll(":scope > li"), { preset: "fade", once: true }), []);
105
+ ```
106
+
107
+ ```ts
108
+ // Vue
109
+ let stop = () => {};
110
+ onMounted(() => (stop = arkSwipe(row.value!, { axis: "x", onSwipe: archive })));
111
+ onBeforeUnmount(() => stop());
112
+
113
+ // Angular
114
+ ngAfterViewInit(): void {
115
+ this.stop = arkReveal(this.list.nativeElement.querySelectorAll(":scope > li"), { preset: "fade" });
116
+ }
117
+ ngOnDestroy(): void {
118
+ this.stop?.();
119
+ }
120
+ ```
121
+
96
122
  ---
97
123
 
98
124
  ## 📋 Dependências
@@ -101,8 +127,8 @@ Instaladas automaticamente, salvo as marcadas como peer, que ficam por sua conta
101
127
 
102
128
  | Pacote | Versão | Descrição |
103
129
  | ---------------------------------------------------------------- | ------- | -------------------------------------------------------------------- |
104
- | [`@tooark/core`](https://www.npmjs.com/package/@tooark/core) | ^1.2.2 | Tipos, i18n, serviços de toast/announce, motion e helpers de overlay |
105
- | [`@tooark/tokens`](https://www.npmjs.com/package/@tooark/tokens) | ^1.2.2 | Design tokens (cores, tamanhos, motion) e tipos primitivos |
130
+ | [`@tooark/core`](https://www.npmjs.com/package/@tooark/core) | ^1.4.0 | Tipos, i18n, serviços de toast/announce, motion e helpers de overlay |
131
+ | [`@tooark/tokens`](https://www.npmjs.com/package/@tooark/tokens) | ^1.4.0 | Design tokens (cores, tamanhos, motion) e tipos primitivos |
106
132
  | [`motion`](https://www.npmjs.com/package/motion) | ^13.4.4 | Biblioteca de animação Motion (spring, scroll, gestos) |
107
133
  | [`tslib`](https://www.npmjs.com/package/tslib) | ^2.8.1 | Helpers de runtime do TypeScript |
108
134
 
@@ -114,6 +140,24 @@ Contribuições são bem-vindas! Abra issues e pull requests no repositório [To
114
140
 
115
141
  ---
116
142
 
143
+ ## 🆘 Ajuda & Segurança
144
+
145
+ - ❓ **Dúvidas, bugs e ideias** — veja o [SUPPORT.md](https://github.com/Tooark/web-components/blob/main/SUPPORT.md) para escolher o canal certo
146
+ - 🔒 **Vulnerabilidades de segurança** — **não** abra issue pública; siga o [SECURITY.md](https://github.com/Tooark/web-components/blob/main/SECURITY.md)
147
+
148
+ ---
149
+
150
+ ## 💖 Apoie
151
+
152
+ Se este projeto ajuda no seu dia a dia, considere apoiar o desenvolvimento:
153
+
154
+ - 💙 [GitHub Sponsors](https://github.com/sponsors/paulosfjunior)
155
+ - ☕ [Ko-fi](https://ko-fi.com/paulosfjunior)
156
+
157
+ Cada contribuição ajuda a manter o projeto ativo e em evolução. Obrigado! 🙏
158
+
159
+ ---
160
+
117
161
  ## 📄 Licença
118
162
 
119
163
  Este projeto está licenciado sob a licença Apache 2.0. Veja o arquivo [LICENSE](https://github.com/Tooark/web-components/blob/main/LICENSE) para mais detalhes.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tooark/motion",
3
- "version": "1.2.2",
3
+ "version": "1.4.0",
4
4
  "description": "Tooark Motion — opt-in animation helpers (stagger, scroll reveal, FLIP, swipe) on top of the Motion lib, with design system tokens",
5
5
  "keywords": [
6
6
  "tooark",
@@ -66,8 +66,8 @@
66
66
  "registry": "https://registry.npmjs.org/"
67
67
  },
68
68
  "dependencies": {
69
- "@tooark/core": "^1.2.2",
70
- "@tooark/tokens": "^1.2.2",
69
+ "@tooark/core": "^1.4.0",
70
+ "@tooark/tokens": "^1.4.0",
71
71
  "motion": "^13.4.4",
72
72
  "tslib": "^2.8.1"
73
73
  },