@fictjs/runtime 0.0.12 → 0.0.13
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/dist/index.cjs +2330 -3203
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -141
- package/dist/index.d.ts +7 -141
- package/dist/index.dev.js +2526 -2836
- package/dist/index.dev.js.map +1 -1
- package/dist/index.js +2331 -3197
- package/dist/index.js.map +1 -1
- package/package.json +1 -6
- package/src/binding.ts +25 -422
- package/src/constants.ts +368 -344
- package/src/cycle-guard.ts +124 -97
- package/src/dom.ts +19 -25
- package/src/effect.ts +4 -0
- package/src/hooks.ts +9 -1
- package/src/index.ts +1 -19
- package/src/lifecycle.ts +13 -2
- package/src/list-helpers.ts +6 -65
- package/src/signal.ts +59 -39
- package/dist/slim.cjs +0 -3854
- package/dist/slim.cjs.map +0 -1
- package/dist/slim.d.cts +0 -504
- package/dist/slim.d.ts +0 -504
- package/dist/slim.js +0 -3802
- package/dist/slim.js.map +0 -1
- package/src/slim.ts +0 -69
package/src/constants.ts
CHANGED
|
@@ -5,6 +5,11 @@
|
|
|
5
5
|
* Borrowed from dom-expressions for comprehensive DOM support.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
+
const isDev =
|
|
9
|
+
typeof __DEV__ !== 'undefined'
|
|
10
|
+
? __DEV__
|
|
11
|
+
: typeof process === 'undefined' || process.env?.NODE_ENV !== 'production'
|
|
12
|
+
|
|
8
13
|
// ============================================================================
|
|
9
14
|
// Boolean Attributes
|
|
10
15
|
// ============================================================================
|
|
@@ -13,50 +18,52 @@
|
|
|
13
18
|
* Complete list of boolean attributes (lowercase)
|
|
14
19
|
* These attributes are set as empty strings when true, removed when false
|
|
15
20
|
*/
|
|
16
|
-
const booleans =
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
21
|
+
const booleans = isDev
|
|
22
|
+
? [
|
|
23
|
+
'allowfullscreen',
|
|
24
|
+
'async',
|
|
25
|
+
'alpha', // HTMLInputElement
|
|
26
|
+
'autofocus', // HTMLElement prop
|
|
27
|
+
'autoplay',
|
|
28
|
+
'checked',
|
|
29
|
+
'controls',
|
|
30
|
+
'default',
|
|
31
|
+
'disabled',
|
|
32
|
+
'formnovalidate',
|
|
33
|
+
'hidden', // HTMLElement prop
|
|
34
|
+
'indeterminate',
|
|
35
|
+
'inert', // HTMLElement prop
|
|
36
|
+
'ismap',
|
|
37
|
+
'loop',
|
|
38
|
+
'multiple',
|
|
39
|
+
'muted',
|
|
40
|
+
'nomodule',
|
|
41
|
+
'novalidate',
|
|
42
|
+
'open',
|
|
43
|
+
'playsinline',
|
|
44
|
+
'readonly',
|
|
45
|
+
'required',
|
|
46
|
+
'reversed',
|
|
47
|
+
'seamless', // HTMLIframeElement - non-standard
|
|
48
|
+
'selected',
|
|
49
|
+
// Experimental attributes
|
|
50
|
+
'adauctionheaders',
|
|
51
|
+
'browsingtopics',
|
|
52
|
+
'credentialless',
|
|
53
|
+
'defaultchecked',
|
|
54
|
+
'defaultmuted',
|
|
55
|
+
'defaultselected',
|
|
56
|
+
'defer',
|
|
57
|
+
'disablepictureinpicture',
|
|
58
|
+
'disableremoteplayback',
|
|
59
|
+
'preservespitch',
|
|
60
|
+
'shadowrootclonable',
|
|
61
|
+
'shadowrootcustomelementregistry',
|
|
62
|
+
'shadowrootdelegatesfocus',
|
|
63
|
+
'shadowrootserializable',
|
|
64
|
+
'sharedstoragewritable',
|
|
65
|
+
]
|
|
66
|
+
: []
|
|
60
67
|
|
|
61
68
|
export const BooleanAttributes = new Set<string>(booleans)
|
|
62
69
|
|
|
@@ -68,38 +75,42 @@ export const BooleanAttributes = new Set<string>(booleans)
|
|
|
68
75
|
* Properties that should be set via DOM property (not attribute)
|
|
69
76
|
* Includes camelCase versions of boolean attributes
|
|
70
77
|
*/
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
78
|
+
const properties = isDev
|
|
79
|
+
? [
|
|
80
|
+
// Core properties
|
|
81
|
+
'className',
|
|
82
|
+
'value',
|
|
75
83
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
84
|
+
// CamelCase booleans
|
|
85
|
+
'readOnly',
|
|
86
|
+
'noValidate',
|
|
87
|
+
'formNoValidate',
|
|
88
|
+
'isMap',
|
|
89
|
+
'noModule',
|
|
90
|
+
'playsInline',
|
|
83
91
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
92
|
+
// Experimental (camelCase)
|
|
93
|
+
'adAuctionHeaders',
|
|
94
|
+
'allowFullscreen',
|
|
95
|
+
'browsingTopics',
|
|
96
|
+
'defaultChecked',
|
|
97
|
+
'defaultMuted',
|
|
98
|
+
'defaultSelected',
|
|
99
|
+
'disablePictureInPicture',
|
|
100
|
+
'disableRemotePlayback',
|
|
101
|
+
'preservesPitch',
|
|
102
|
+
'shadowRootClonable',
|
|
103
|
+
'shadowRootCustomElementRegistry',
|
|
104
|
+
'shadowRootDelegatesFocus',
|
|
105
|
+
'shadowRootSerializable',
|
|
106
|
+
'sharedStorageWritable',
|
|
99
107
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
]
|
|
108
|
+
// All lowercase booleans
|
|
109
|
+
...booleans,
|
|
110
|
+
]
|
|
111
|
+
: []
|
|
112
|
+
|
|
113
|
+
export const Properties = new Set<string>(properties)
|
|
103
114
|
|
|
104
115
|
// ============================================================================
|
|
105
116
|
// Child Properties
|
|
@@ -132,104 +143,105 @@ export const Aliases: Record<string, string> = {
|
|
|
132
143
|
* Maps lowercase attribute names to their camelCase property equivalents
|
|
133
144
|
* Only for specific elements that have these properties
|
|
134
145
|
*/
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
class: 'className',
|
|
146
|
+
const PropAliases: Record<string, string | { $: string; [tagName: string]: string | number }> =
|
|
147
|
+
isDev
|
|
148
|
+
? {
|
|
149
|
+
// Direct mapping
|
|
150
|
+
class: 'className',
|
|
141
151
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
152
|
+
// Element-specific mappings
|
|
153
|
+
novalidate: {
|
|
154
|
+
$: 'noValidate',
|
|
155
|
+
FORM: 1,
|
|
156
|
+
},
|
|
157
|
+
formnovalidate: {
|
|
158
|
+
$: 'formNoValidate',
|
|
159
|
+
BUTTON: 1,
|
|
160
|
+
INPUT: 1,
|
|
161
|
+
},
|
|
162
|
+
ismap: {
|
|
163
|
+
$: 'isMap',
|
|
164
|
+
IMG: 1,
|
|
165
|
+
},
|
|
166
|
+
nomodule: {
|
|
167
|
+
$: 'noModule',
|
|
168
|
+
SCRIPT: 1,
|
|
169
|
+
},
|
|
170
|
+
playsinline: {
|
|
171
|
+
$: 'playsInline',
|
|
172
|
+
VIDEO: 1,
|
|
173
|
+
},
|
|
174
|
+
readonly: {
|
|
175
|
+
$: 'readOnly',
|
|
176
|
+
INPUT: 1,
|
|
177
|
+
TEXTAREA: 1,
|
|
178
|
+
},
|
|
169
179
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
}
|
|
180
|
+
// Experimental element-specific
|
|
181
|
+
adauctionheaders: {
|
|
182
|
+
$: 'adAuctionHeaders',
|
|
183
|
+
IFRAME: 1,
|
|
184
|
+
},
|
|
185
|
+
allowfullscreen: {
|
|
186
|
+
$: 'allowFullscreen',
|
|
187
|
+
IFRAME: 1,
|
|
188
|
+
},
|
|
189
|
+
browsingtopics: {
|
|
190
|
+
$: 'browsingTopics',
|
|
191
|
+
IMG: 1,
|
|
192
|
+
},
|
|
193
|
+
defaultchecked: {
|
|
194
|
+
$: 'defaultChecked',
|
|
195
|
+
INPUT: 1,
|
|
196
|
+
},
|
|
197
|
+
defaultmuted: {
|
|
198
|
+
$: 'defaultMuted',
|
|
199
|
+
AUDIO: 1,
|
|
200
|
+
VIDEO: 1,
|
|
201
|
+
},
|
|
202
|
+
defaultselected: {
|
|
203
|
+
$: 'defaultSelected',
|
|
204
|
+
OPTION: 1,
|
|
205
|
+
},
|
|
206
|
+
disablepictureinpicture: {
|
|
207
|
+
$: 'disablePictureInPicture',
|
|
208
|
+
VIDEO: 1,
|
|
209
|
+
},
|
|
210
|
+
disableremoteplayback: {
|
|
211
|
+
$: 'disableRemotePlayback',
|
|
212
|
+
AUDIO: 1,
|
|
213
|
+
VIDEO: 1,
|
|
214
|
+
},
|
|
215
|
+
preservespitch: {
|
|
216
|
+
$: 'preservesPitch',
|
|
217
|
+
AUDIO: 1,
|
|
218
|
+
VIDEO: 1,
|
|
219
|
+
},
|
|
220
|
+
shadowrootclonable: {
|
|
221
|
+
$: 'shadowRootClonable',
|
|
222
|
+
TEMPLATE: 1,
|
|
223
|
+
},
|
|
224
|
+
shadowrootdelegatesfocus: {
|
|
225
|
+
$: 'shadowRootDelegatesFocus',
|
|
226
|
+
TEMPLATE: 1,
|
|
227
|
+
},
|
|
228
|
+
shadowrootserializable: {
|
|
229
|
+
$: 'shadowRootSerializable',
|
|
230
|
+
TEMPLATE: 1,
|
|
231
|
+
},
|
|
232
|
+
sharedstoragewritable: {
|
|
233
|
+
$: 'sharedStorageWritable',
|
|
234
|
+
IFRAME: 1,
|
|
235
|
+
IMG: 1,
|
|
236
|
+
},
|
|
237
|
+
}
|
|
238
|
+
: {}
|
|
228
239
|
|
|
229
240
|
/**
|
|
230
241
|
* Get the property alias for a given attribute and tag name
|
|
231
242
|
*/
|
|
232
243
|
export function getPropAlias(prop: string, tagName: string): string | undefined {
|
|
244
|
+
if (!isDev) return undefined
|
|
233
245
|
const a = PropAliases[prop]
|
|
234
246
|
if (typeof a === 'object') {
|
|
235
247
|
return a[tagName] ? a['$'] : undefined
|
|
@@ -250,30 +262,34 @@ export const $$EVENTS = '_$FICT_DELEGATE'
|
|
|
250
262
|
* Events that should use event delegation for performance
|
|
251
263
|
* These events bubble and are commonly used across many elements
|
|
252
264
|
*/
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
265
|
+
const delegatedEvents = isDev
|
|
266
|
+
? [
|
|
267
|
+
'beforeinput',
|
|
268
|
+
'click',
|
|
269
|
+
'dblclick',
|
|
270
|
+
'contextmenu',
|
|
271
|
+
'focusin',
|
|
272
|
+
'focusout',
|
|
273
|
+
'input',
|
|
274
|
+
'keydown',
|
|
275
|
+
'keyup',
|
|
276
|
+
'mousedown',
|
|
277
|
+
'mousemove',
|
|
278
|
+
'mouseout',
|
|
279
|
+
'mouseover',
|
|
280
|
+
'mouseup',
|
|
281
|
+
'pointerdown',
|
|
282
|
+
'pointermove',
|
|
283
|
+
'pointerout',
|
|
284
|
+
'pointerover',
|
|
285
|
+
'pointerup',
|
|
286
|
+
'touchend',
|
|
287
|
+
'touchmove',
|
|
288
|
+
'touchstart',
|
|
289
|
+
]
|
|
290
|
+
: []
|
|
291
|
+
|
|
292
|
+
export const DelegatedEvents = new Set<string>(delegatedEvents)
|
|
277
293
|
|
|
278
294
|
// ============================================================================
|
|
279
295
|
// SVG Support
|
|
@@ -282,85 +298,89 @@ export const DelegatedEvents = new Set<string>([
|
|
|
282
298
|
/**
|
|
283
299
|
* SVG element names (excluding common ones that overlap with HTML)
|
|
284
300
|
*/
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
301
|
+
const svgElements = isDev
|
|
302
|
+
? [
|
|
303
|
+
'altGlyph',
|
|
304
|
+
'altGlyphDef',
|
|
305
|
+
'altGlyphItem',
|
|
306
|
+
'animate',
|
|
307
|
+
'animateColor',
|
|
308
|
+
'animateMotion',
|
|
309
|
+
'animateTransform',
|
|
310
|
+
'circle',
|
|
311
|
+
'clipPath',
|
|
312
|
+
'color-profile',
|
|
313
|
+
'cursor',
|
|
314
|
+
'defs',
|
|
315
|
+
'desc',
|
|
316
|
+
'ellipse',
|
|
317
|
+
'feBlend',
|
|
318
|
+
'feColorMatrix',
|
|
319
|
+
'feComponentTransfer',
|
|
320
|
+
'feComposite',
|
|
321
|
+
'feConvolveMatrix',
|
|
322
|
+
'feDiffuseLighting',
|
|
323
|
+
'feDisplacementMap',
|
|
324
|
+
'feDistantLight',
|
|
325
|
+
'feDropShadow',
|
|
326
|
+
'feFlood',
|
|
327
|
+
'feFuncA',
|
|
328
|
+
'feFuncB',
|
|
329
|
+
'feFuncG',
|
|
330
|
+
'feFuncR',
|
|
331
|
+
'feGaussianBlur',
|
|
332
|
+
'feImage',
|
|
333
|
+
'feMerge',
|
|
334
|
+
'feMergeNode',
|
|
335
|
+
'feMorphology',
|
|
336
|
+
'feOffset',
|
|
337
|
+
'fePointLight',
|
|
338
|
+
'feSpecularLighting',
|
|
339
|
+
'feSpotLight',
|
|
340
|
+
'feTile',
|
|
341
|
+
'feTurbulence',
|
|
342
|
+
'filter',
|
|
343
|
+
'font',
|
|
344
|
+
'font-face',
|
|
345
|
+
'font-face-format',
|
|
346
|
+
'font-face-name',
|
|
347
|
+
'font-face-src',
|
|
348
|
+
'font-face-uri',
|
|
349
|
+
'foreignObject',
|
|
350
|
+
'g',
|
|
351
|
+
'glyph',
|
|
352
|
+
'glyphRef',
|
|
353
|
+
'hkern',
|
|
354
|
+
'image',
|
|
355
|
+
'line',
|
|
356
|
+
'linearGradient',
|
|
357
|
+
'marker',
|
|
358
|
+
'mask',
|
|
359
|
+
'metadata',
|
|
360
|
+
'missing-glyph',
|
|
361
|
+
'mpath',
|
|
362
|
+
'path',
|
|
363
|
+
'pattern',
|
|
364
|
+
'polygon',
|
|
365
|
+
'polyline',
|
|
366
|
+
'radialGradient',
|
|
367
|
+
'rect',
|
|
368
|
+
'set',
|
|
369
|
+
'stop',
|
|
370
|
+
'svg',
|
|
371
|
+
'switch',
|
|
372
|
+
'symbol',
|
|
373
|
+
'text',
|
|
374
|
+
'textPath',
|
|
375
|
+
'tref',
|
|
376
|
+
'tspan',
|
|
377
|
+
'use',
|
|
378
|
+
'view',
|
|
379
|
+
'vkern',
|
|
380
|
+
]
|
|
381
|
+
: []
|
|
382
|
+
|
|
383
|
+
export const SVGElements = new Set<string>(svgElements)
|
|
364
384
|
|
|
365
385
|
/**
|
|
366
386
|
* SVG attribute namespaces
|
|
@@ -377,80 +397,84 @@ export const SVGNamespace: Record<string, string> = {
|
|
|
377
397
|
/**
|
|
378
398
|
* CSS properties that don't need a unit (like 'px')
|
|
379
399
|
*/
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
400
|
+
const unitlessList = isDev
|
|
401
|
+
? [
|
|
402
|
+
'animationIterationCount',
|
|
403
|
+
'animation-iteration-count',
|
|
404
|
+
'borderImageOutset',
|
|
405
|
+
'border-image-outset',
|
|
406
|
+
'borderImageSlice',
|
|
407
|
+
'border-image-slice',
|
|
408
|
+
'borderImageWidth',
|
|
409
|
+
'border-image-width',
|
|
410
|
+
'boxFlex',
|
|
411
|
+
'box-flex',
|
|
412
|
+
'boxFlexGroup',
|
|
413
|
+
'box-flex-group',
|
|
414
|
+
'boxOrdinalGroup',
|
|
415
|
+
'box-ordinal-group',
|
|
416
|
+
'columnCount',
|
|
417
|
+
'column-count',
|
|
418
|
+
'columns',
|
|
419
|
+
'flex',
|
|
420
|
+
'flexGrow',
|
|
421
|
+
'flex-grow',
|
|
422
|
+
'flexPositive',
|
|
423
|
+
'flex-positive',
|
|
424
|
+
'flexShrink',
|
|
425
|
+
'flex-shrink',
|
|
426
|
+
'flexNegative',
|
|
427
|
+
'flex-negative',
|
|
428
|
+
'flexOrder',
|
|
429
|
+
'flex-order',
|
|
430
|
+
'gridRow',
|
|
431
|
+
'grid-row',
|
|
432
|
+
'gridRowEnd',
|
|
433
|
+
'grid-row-end',
|
|
434
|
+
'gridRowSpan',
|
|
435
|
+
'grid-row-span',
|
|
436
|
+
'gridRowStart',
|
|
437
|
+
'grid-row-start',
|
|
438
|
+
'gridColumn',
|
|
439
|
+
'grid-column',
|
|
440
|
+
'gridColumnEnd',
|
|
441
|
+
'grid-column-end',
|
|
442
|
+
'gridColumnSpan',
|
|
443
|
+
'grid-column-span',
|
|
444
|
+
'gridColumnStart',
|
|
445
|
+
'grid-column-start',
|
|
446
|
+
'fontWeight',
|
|
447
|
+
'font-weight',
|
|
448
|
+
'lineClamp',
|
|
449
|
+
'line-clamp',
|
|
450
|
+
'lineHeight',
|
|
451
|
+
'line-height',
|
|
452
|
+
'opacity',
|
|
453
|
+
'order',
|
|
454
|
+
'orphans',
|
|
455
|
+
'tabSize',
|
|
456
|
+
'tab-size',
|
|
457
|
+
'widows',
|
|
458
|
+
'zIndex',
|
|
459
|
+
'z-index',
|
|
460
|
+
'zoom',
|
|
461
|
+
'fillOpacity',
|
|
462
|
+
'fill-opacity',
|
|
463
|
+
'floodOpacity',
|
|
464
|
+
'flood-opacity',
|
|
465
|
+
'stopOpacity',
|
|
466
|
+
'stop-opacity',
|
|
467
|
+
'strokeDasharray',
|
|
468
|
+
'stroke-dasharray',
|
|
469
|
+
'strokeDashoffset',
|
|
470
|
+
'stroke-dashoffset',
|
|
471
|
+
'strokeMiterlimit',
|
|
472
|
+
'stroke-miterlimit',
|
|
473
|
+
'strokeOpacity',
|
|
474
|
+
'stroke-opacity',
|
|
475
|
+
'strokeWidth',
|
|
476
|
+
'stroke-width',
|
|
477
|
+
]
|
|
478
|
+
: ['opacity', 'zIndex']
|
|
479
|
+
|
|
480
|
+
export const UnitlessStyles = new Set<string>(unitlessList)
|