@devix-tecnologia/timeline-vue 3.2.1 → 3.3.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 +31 -0
- package/package.json +7 -2
package/README.md
CHANGED
|
@@ -18,6 +18,37 @@ Este é disponibiza componentes de linha do tempo de eventos utilizando Vue 3 e
|
|
|
18
18
|
yarn add @devix-tecnologia/timeline-vue
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
+
### Formas de Importação
|
|
22
|
+
|
|
23
|
+
A biblioteca oferece três formas de importação:
|
|
24
|
+
|
|
25
|
+
#### 1. Como Plugin Vue (instala todos componentes globalmente)
|
|
26
|
+
|
|
27
|
+
```ts
|
|
28
|
+
import { createApp } from 'vue'
|
|
29
|
+
import Timeline from '@devix-tecnologia/timeline-vue'
|
|
30
|
+
import '@devix-tecnologia/timeline-vue/dist/style.css'
|
|
31
|
+
|
|
32
|
+
const app = createApp(App)
|
|
33
|
+
app.use(Timeline)
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
#### 2. Componentes Individuais (tree-shaking automático)
|
|
37
|
+
|
|
38
|
+
```ts
|
|
39
|
+
import { Timeline, Tipos } from '@devix-tecnologia/timeline-vue'
|
|
40
|
+
import '@devix-tecnologia/timeline-vue/dist/style.css'
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
#### 3. Via Path `/components` (alternativa explícita)
|
|
44
|
+
|
|
45
|
+
```ts
|
|
46
|
+
import { Timeline, Tipos } from '@devix-tecnologia/timeline-vue/components'
|
|
47
|
+
import '@devix-tecnologia/timeline-vue/dist/style.css'
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
> 💡 **Dica:** As opções 2 e 3 são equivalentes e oferecem melhor tree-shaking. Use a opção 1 apenas se precisar de todos os componentes registrados globalmente.
|
|
51
|
+
|
|
21
52
|
### Exemplo de código
|
|
22
53
|
|
|
23
54
|
```ts
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devix-tecnologia/timeline-vue",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.3.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"repository": {
|
|
@@ -94,7 +94,12 @@
|
|
|
94
94
|
"module": "./dist/timeline-vue.es.js",
|
|
95
95
|
"exports": {
|
|
96
96
|
".": {
|
|
97
|
-
"import": "./dist/timeline-vue.es.js"
|
|
97
|
+
"import": "./dist/timeline-vue.es.js",
|
|
98
|
+
"types": "./dist/types/index.d.ts"
|
|
99
|
+
},
|
|
100
|
+
"./components": {
|
|
101
|
+
"import": "./dist/timeline-vue.es.js",
|
|
102
|
+
"types": "./dist/components/timeline/index.d.ts"
|
|
98
103
|
},
|
|
99
104
|
"./dist/style.css": "./dist/style.css"
|
|
100
105
|
},
|