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