@@ -87,6 +87,76 @@ const svelteAttributes: IAttributeData[] = [
87
87
'To get a reference to a DOM node, use bind:this. If used on a component, gets a reference to that component instance.'
88
88
}
89
89
] ;
90
+
91
+ // directives that takes a variable. Don't specify the variable here and let typescript handle it
92
+ const svelteDirectiveKeywords : IAttributeData [ ] = [
93
+ {
94
+ name : 'use:' ,
95
+ description : 'Actions are functions that are called when an element is mounted.' ,
96
+ references : [
97
+ {
98
+ name : 'Svelte.dev Reference' ,
99
+ url : 'https://svelte.dev/docs/svelte/use'
100
+ }
101
+ ]
102
+ } ,
103
+ {
104
+ name : 'transition:' ,
105
+ description :
106
+ 'A transition is triggered by an element entering or leaving the DOM as a result of a state change.' ,
107
+ references : [
108
+ {
109
+ name : 'Svelte.dev Reference' ,
110
+ url : 'https://svelte.dev/docs/svelte/transition'
111
+ }
112
+ ]
113
+ } ,
114
+ {
115
+ name : 'in:' ,
116
+ description :
117
+ 'The in: and out: directives are identical to transition:, except that the resulting transitions are not bidirectional.' ,
118
+ references : [
119
+ {
120
+ name : 'Svelte.dev Reference' ,
121
+ url : 'https://svelte.dev/docs/svelte/in-and-out'
122
+ }
123
+ ]
124
+ } ,
125
+ {
126
+ name : 'out:' ,
127
+ description :
128
+ 'The in: and out: directives are identical to transition:, except that the resulting transitions are not bidirectional.' ,
129
+ references : [
130
+ {
131
+ name : 'Svelte.dev Reference' ,
132
+ url : 'https://svelte.dev/docs/svelte/in-and-out'
133
+ }
134
+ ]
135
+ } ,
136
+ {
137
+ name : 'animate:' ,
138
+ description :
139
+ 'An animation is triggered when the contents of a keyed each block are re-ordered.' ,
140
+ references : [
141
+ {
142
+ name : 'Svelte.dev Reference' ,
143
+ url : 'https://svelte.dev/docs/svelte/animate'
144
+ }
145
+ ]
146
+ } ,
147
+ {
148
+ name : 'style:' ,
149
+ description :
150
+ 'The style: directive provides a shorthand for setting multiple styles on an element.' ,
151
+ references : [
152
+ {
153
+ name : 'Svelte.dev Reference' ,
154
+ url : 'https://svelte.dev/docs/svelte/style'
155
+ }
156
+ ]
157
+ }
158
+ ] ;
159
+
90
160
const sveltekitAttributes : IAttributeData [ ] = [
91
161
{
92
162
name : 'data-sveltekit-keepfocus' ,
@@ -422,6 +492,7 @@ export const svelteHtmlDataProvider = newHTMLDataProvider('svelte-builtin', {
422
492
version : 1 ,
423
493
globalAttributes : [
424
494
...htmlData . globalAttributes ! ,
495
+ ...svelteDirectiveKeywords ,
425
496
...svelteEvents ,
426
497
...svelteAttributes ,
427
498
...sveltekitAttributes
0 commit comments