@symbo.ls/shorthand 2.34.35 → 3.2.7

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.
@@ -0,0 +1,592 @@
1
+ const propToAbbr = {
2
+ // ── Core DOMQL Properties ──
3
+ attr: "at",
4
+ childExtends: "cex",
5
+ childExtendsRecursive: "cexr",
6
+ childProps: "cp",
7
+ children: "ch",
8
+ childrenAs: "cha",
9
+ class: "cl",
10
+ content: "cnt",
11
+ context: "ctx",
12
+ data: "dt",
13
+ extends: "ext",
14
+ hide: "hd",
15
+ html: "htm",
16
+ if: "if",
17
+ ignoreChildExtend: "icex",
18
+ key: "ky",
19
+ query: "qy",
20
+ routes: "rt",
21
+ scope: "scp",
22
+ show: "shw",
23
+ state: "st",
24
+ style: "sy",
25
+ tag: "tg",
26
+ text: "tx",
27
+ // ── Symbols Shorthand Props ──
28
+ align: "aln",
29
+ boxSize: "bsz",
30
+ flow: "fl",
31
+ heightRange: "hr",
32
+ horizontalInset: "hi",
33
+ round: "rnd",
34
+ shadow: "shd",
35
+ size: "sz",
36
+ templateColumns: "tcol",
37
+ verticalInset: "vi",
38
+ widthRange: "wr",
39
+ wrap: "wrp",
40
+ // ── Box / Sizing ──
41
+ aspectRatio: "ar",
42
+ blockSize: "bks",
43
+ boxSizing: "bxs",
44
+ height: "h",
45
+ inlineSize: "ins",
46
+ margin: "m",
47
+ marginBottom: "mb",
48
+ marginLeft: "ml",
49
+ marginRight: "mr",
50
+ marginTop: "mt",
51
+ maxBlockSize: "mxbs",
52
+ maxHeight: "mxh",
53
+ maxInlineSize: "mxis",
54
+ maxWidth: "mxw",
55
+ minBlockSize: "mnbs",
56
+ minHeight: "mnh",
57
+ minInlineSize: "mnis",
58
+ minWidth: "mnw",
59
+ padding: "p",
60
+ paddingBottom: "pb",
61
+ paddingInline: "pil",
62
+ paddingLeft: "pl",
63
+ paddingRight: "pr",
64
+ paddingTop: "pt",
65
+ width: "w",
66
+ // ── Flexbox ──
67
+ alignContent: "ac",
68
+ alignItems: "ai",
69
+ alignSelf: "as",
70
+ flex: "fx",
71
+ flexBasis: "fxb",
72
+ flexDirection: "fxd",
73
+ flexFlow: "fxf",
74
+ flexGrow: "fxg",
75
+ flexShrink: "fxs",
76
+ flexWrap: "fxw",
77
+ gap: "g",
78
+ justifyContent: "jc",
79
+ justifyItems: "ji",
80
+ justifySelf: "js",
81
+ order: "od",
82
+ placeContent: "pcn",
83
+ placeItems: "pit",
84
+ placeSelf: "psl",
85
+ rowGap: "rg",
86
+ // ── Grid ──
87
+ columnGap: "cg",
88
+ gridArea: "ga",
89
+ gridAutoColumns: "gac",
90
+ gridAutoFlow: "gaf",
91
+ gridAutoRows: "gar",
92
+ gridColumn: "gc",
93
+ gridColumnEnd: "gce",
94
+ gridColumnStart: "gcs",
95
+ gridRow: "gr",
96
+ gridRowEnd: "gre",
97
+ gridRowStart: "grs",
98
+ gridTemplateAreas: "gta",
99
+ gridTemplateColumns: "gtc",
100
+ gridTemplateRows: "gtr",
101
+ // ── Position ──
102
+ bottom: "bot",
103
+ float: "flt",
104
+ inset: "ist",
105
+ left: "lft",
106
+ position: "pos",
107
+ right: "rgt",
108
+ top: "tp",
109
+ zIndex: "zi",
110
+ // ── Display / Visibility ──
111
+ clear: "clr",
112
+ contain: "ctn",
113
+ cursor: "cur",
114
+ display: "d",
115
+ opacity: "op",
116
+ overflow: "ov",
117
+ overflowX: "ovx",
118
+ overflowY: "ovy",
119
+ pointerEvents: "pe",
120
+ resize: "rsz",
121
+ userSelect: "us",
122
+ visibility: "vis",
123
+ // ── Color / Theme ──
124
+ background: "bg",
125
+ backgroundAttachment: "bga",
126
+ backgroundBlendMode: "bgbm",
127
+ backgroundClip: "bgcl",
128
+ backgroundColor: "bgc",
129
+ backgroundImage: "bgi",
130
+ backgroundOrigin: "bgo",
131
+ backgroundPosition: "bgp",
132
+ backgroundPositionX: "bgpx",
133
+ backgroundPositionY: "bgpy",
134
+ backgroundRepeat: "bgr",
135
+ backgroundRepeatX: "bgrx",
136
+ backgroundRepeatY: "bgry",
137
+ backgroundSize: "bgs",
138
+ color: "c",
139
+ theme: "thm",
140
+ themeModifier: "thmm",
141
+ // ── Border ──
142
+ border: "bd",
143
+ borderBottom: "bdb",
144
+ borderBottomLeftRadius: "bdblr",
145
+ borderBottomRightRadius: "bdbrr",
146
+ borderCollapse: "bdcl",
147
+ borderColor: "bdc",
148
+ borderImage: "bdi",
149
+ borderImageOutset: "bdio",
150
+ borderImageRepeat: "bdir",
151
+ borderImageSlice: "bdis",
152
+ borderImageSource: "bdisrc",
153
+ borderImageWidth: "bdiw",
154
+ borderLeft: "bdl",
155
+ borderRadius: "bdr",
156
+ borderRight: "bdrg",
157
+ borderSpacing: "bdsp",
158
+ borderStyle: "bdst",
159
+ borderTop: "bdt",
160
+ borderTopLeftRadius: "bdtlr",
161
+ borderTopRightRadius: "bdtrr",
162
+ borderWidth: "bdw",
163
+ // ── Outline ──
164
+ outline: "ol",
165
+ outlineColor: "olc",
166
+ outlineOffset: "olo",
167
+ outlineStyle: "ols",
168
+ outlineWidth: "olw",
169
+ // ── Shadow ──
170
+ boxShadow: "bxsh",
171
+ textShadow: "txsh",
172
+ // ── Typography ──
173
+ direction: "dir",
174
+ fontDisplay: "fdi",
175
+ fontFamily: "ff",
176
+ fontFeatureSettings: "ffs",
177
+ fontKerning: "fk",
178
+ fontOpticalSizing: "fos",
179
+ fontPalette: "fpl",
180
+ fontSize: "fs",
181
+ fontSizeAdjust: "fsa",
182
+ fontSmooth: "fsm",
183
+ fontStretch: "fsr",
184
+ fontStyle: "fsy",
185
+ fontSynthesis: "fsyn",
186
+ fontVariant: "fv",
187
+ fontVariationSettings: "fvs",
188
+ fontWeight: "fw",
189
+ hyphens: "hyp",
190
+ letterSpacing: "ls",
191
+ lineHeight: "lh",
192
+ tabSize: "tsz",
193
+ textAlign: "ta",
194
+ textDecoration: "td",
195
+ textDecorationColor: "tdc",
196
+ textDecorationLine: "tdl",
197
+ textDecorationStyle: "tds",
198
+ textIndent: "ti",
199
+ textOverflow: "tov",
200
+ textStroke: "tsk",
201
+ textTransform: "tt",
202
+ unicodeBidi: "ub",
203
+ verticalAlign: "va",
204
+ whiteSpace: "ws",
205
+ wordBreak: "wbr",
206
+ wordSpacing: "wsp",
207
+ wordWrap: "wwr",
208
+ writingMode: "wm",
209
+ // ── List / Table ──
210
+ captionSide: "cps",
211
+ counterIncrement: "ci",
212
+ counterReset: "cr",
213
+ emptyCells: "ec",
214
+ listStyle: "lst",
215
+ listStyleImage: "lsi",
216
+ listStylePosition: "lsp",
217
+ listStyleType: "lsty",
218
+ quotes: "qt",
219
+ tableLayout: "tl",
220
+ // ── Column ──
221
+ columnCount: "cc",
222
+ columnFill: "cf",
223
+ columnRule: "crl",
224
+ columnRuleColor: "crlc",
225
+ columnRuleStyle: "crls",
226
+ columnRuleWidth: "crlw",
227
+ columnSpan: "cspn",
228
+ columnWidth: "cwi",
229
+ columns: "col",
230
+ // ── Filter / Effects ──
231
+ backdropFilter: "bdf",
232
+ boxDecorationBreak: "bxdb",
233
+ clipPath: "cpth",
234
+ filter: "fil",
235
+ isolation: "iso",
236
+ mixBlendMode: "mbm",
237
+ objectFit: "obf",
238
+ objectPosition: "obp",
239
+ perspective: "prs",
240
+ perspectiveOrigin: "prso",
241
+ willChange: "wc",
242
+ // ── Transform ──
243
+ transform: "tf",
244
+ transformOrigin: "tfo",
245
+ transformStyle: "tfs",
246
+ // ── Transition ──
247
+ transition: "trn",
248
+ transitionDelay: "trnd",
249
+ transitionDuration: "trndr",
250
+ transitionProperty: "trnp",
251
+ transitionTimingFunction: "trntf",
252
+ // ── Animation ──
253
+ animation: "an",
254
+ animationDelay: "and",
255
+ animationDirection: "andr",
256
+ animationDuration: "andur",
257
+ animationFillMode: "anfm",
258
+ animationIterationCount: "anic",
259
+ animationName: "ann",
260
+ animationPlayState: "anps",
261
+ animationTimingFunction: "antf",
262
+ // ── Scroll ──
263
+ scrollBehavior: "sb",
264
+ scrollMargin: "smr",
265
+ scrollMarginBottom: "smrb",
266
+ scrollMarginLeft: "smrl",
267
+ scrollMarginRight: "smrr",
268
+ scrollMarginTop: "smrt",
269
+ scrollPadding: "spd",
270
+ scrollPaddingBottom: "spdb",
271
+ scrollPaddingLeft: "spdl",
272
+ scrollPaddingRight: "spdr",
273
+ scrollPaddingTop: "spdt",
274
+ scrollSnapAlign: "ssa",
275
+ scrollSnapStop: "sss",
276
+ scrollSnapType: "sst",
277
+ // ── Page Break ──
278
+ breakAfter: "bka",
279
+ breakBefore: "bkb",
280
+ breakInside: "bki",
281
+ pageBreakAfter: "pbka",
282
+ pageBreakBefore: "pbkb",
283
+ pageBreakInside: "pbki",
284
+ // ── HTML Attributes: Global ──
285
+ accessKey: "ack",
286
+ className: "cn",
287
+ contentEditable: "ced",
288
+ contextMenu: "cmu",
289
+ draggable: "drg",
290
+ hidden: "hid",
291
+ id: "id",
292
+ is: "is",
293
+ lang: "lng",
294
+ nonce: "nnc",
295
+ spellCheck: "spc",
296
+ tabIndex: "tbi",
297
+ title: "ttl",
298
+ translate: "trl",
299
+ // ── HTML Attributes: Form ──
300
+ accept: "acp",
301
+ acceptCharset: "accs",
302
+ action: "act",
303
+ autoComplete: "atc",
304
+ autoFocus: "atf",
305
+ capture: "cap",
306
+ challenge: "chg",
307
+ checked: "chk",
308
+ cols: "cls",
309
+ colSpan: "csn",
310
+ controls: "ctl",
311
+ default: "def",
312
+ defer: "dfr",
313
+ disabled: "dis",
314
+ encType: "ect",
315
+ form: "frm",
316
+ formAction: "fac",
317
+ formEncType: "fect",
318
+ formMethod: "fme",
319
+ formNoValidate: "fnv",
320
+ formTarget: "ftg",
321
+ high: "hgh",
322
+ inputMode: "imd",
323
+ kind: "knd",
324
+ label: "lbl",
325
+ list: "lis",
326
+ loop: "lp",
327
+ low: "lw",
328
+ max: "mx",
329
+ maxLength: "mxl",
330
+ method: "mtd",
331
+ min: "mn",
332
+ minLength: "mnl",
333
+ multiple: "mul",
334
+ muted: "mut",
335
+ name: "nm",
336
+ open: "opn",
337
+ optimum: "opt",
338
+ pattern: "ptn",
339
+ placeholder: "phd",
340
+ readOnly: "ro",
341
+ required: "req",
342
+ reversed: "rev",
343
+ rows: "rws",
344
+ rowSpan: "rsn",
345
+ selected: "sel",
346
+ span: "spn",
347
+ start: "srt",
348
+ step: "stp",
349
+ type: "typ",
350
+ value: "val",
351
+ // ── HTML Attributes: Link / Navigation ──
352
+ download: "dl",
353
+ href: "hrf",
354
+ hrefLang: "hrl",
355
+ ping: "png",
356
+ referrerPolicy: "rfp",
357
+ rel: "rl",
358
+ target: "tgt",
359
+ // ── HTML Attributes: Media ──
360
+ allow: "alw",
361
+ allowFullScreen: "afs",
362
+ allowPaymentRequest: "apr",
363
+ alt: "alt",
364
+ cellPadding: "cpg",
365
+ cellSpacing: "csg",
366
+ cite: "cit",
367
+ coords: "crd",
368
+ crossOrigin: "cor",
369
+ dateTime: "dtm",
370
+ fetchPriority: "fpr",
371
+ headers: "hds",
372
+ httpEquiv: "hte",
373
+ integrity: "itg",
374
+ isMap: "ism",
375
+ keyType: "kty",
376
+ loading: "ldg",
377
+ manifest: "mft",
378
+ media: "mda",
379
+ poster: "pst",
380
+ preload: "prl",
381
+ radioGroup: "rdg",
382
+ sandbox: "sbx",
383
+ scoped: "scod",
384
+ seamless: "sml",
385
+ shape: "shp",
386
+ sizes: "szs",
387
+ src: "src",
388
+ srcDoc: "srd",
389
+ srcLang: "srl",
390
+ srcSet: "srs",
391
+ useMap: "ump",
392
+ // ── HTML Attributes: ARIA ──
393
+ ariaActiveDescendant: "aad",
394
+ ariaAtomic: "aat",
395
+ ariaBusy: "abu",
396
+ ariaChecked: "achk",
397
+ ariaControls: "acl",
398
+ ariaCurrent: "acr",
399
+ ariaDescribedBy: "adb",
400
+ ariaDetails: "adt",
401
+ ariaDisabled: "adis",
402
+ ariaDropEffect: "ade",
403
+ ariaErrorMessage: "aem",
404
+ ariaExpanded: "aexp",
405
+ ariaGrabbed: "agr",
406
+ ariaHasPopup: "ahp",
407
+ ariaHidden: "ahid",
408
+ ariaInvalid: "ainv",
409
+ ariaLabel: "alb",
410
+ ariaLabelledBy: "alby",
411
+ ariaLive: "alv",
412
+ ariaModal: "amod",
413
+ ariaMultiSelectable: "ams",
414
+ ariaOrientation: "aor",
415
+ ariaOwns: "aow",
416
+ ariaPosInSet: "apis",
417
+ ariaPressed: "aprs",
418
+ ariaReadOnly: "aro",
419
+ ariaRelevant: "arl",
420
+ ariaRequired: "areq",
421
+ ariaSelected: "asel",
422
+ ariaSetSize: "assz",
423
+ ariaValueMax: "avmx",
424
+ ariaValueMin: "avmn",
425
+ ariaValueNow: "avn",
426
+ role: "role",
427
+ // ── Events: Lifecycle ──
428
+ onInit: "@in",
429
+ onRender: "@rn",
430
+ onUpdate: "@up",
431
+ onStateChange: "@sc",
432
+ onStateUpdate: "@su",
433
+ // ── Events: Mouse ──
434
+ onClick: "@ck",
435
+ onContextMenu: "@cm",
436
+ onDblClick: "@dc",
437
+ onMouseDown: "@md",
438
+ onMouseEnter: "@me",
439
+ onMouseLeave: "@ml",
440
+ onMouseMove: "@mm",
441
+ onMouseOut: "@mo",
442
+ onMouseOver: "@mv",
443
+ onMouseUp: "@mu",
444
+ // ── Events: Keyboard ──
445
+ onKeyDown: "@kd",
446
+ onKeyPress: "@kp",
447
+ onKeyUp: "@ku",
448
+ // ── Events: Focus ──
449
+ onBlur: "@bl",
450
+ onFocus: "@fc",
451
+ onFocusIn: "@fi",
452
+ onFocusOut: "@fo",
453
+ // ── Events: Form ──
454
+ onBeforeInput: "@bi",
455
+ onChange: "@cg",
456
+ onFormData: "@fd",
457
+ onInput: "@ip",
458
+ onInvalid: "@iv",
459
+ onReset: "@rs",
460
+ onSearch: "@sr",
461
+ onSelect: "@sl",
462
+ onSubmit: "@sm",
463
+ // ── Events: Touch ──
464
+ onTouchCancel: "@tc",
465
+ onTouchEnd: "@te",
466
+ onTouchMove: "@tm",
467
+ onTouchStart: "@ts",
468
+ // ── Events: Pointer ──
469
+ onPointerCancel: "@pc",
470
+ onPointerDown: "@pd",
471
+ onPointerEnter: "@pe",
472
+ onPointerLeave: "@ple",
473
+ onPointerMove: "@pm",
474
+ onPointerOut: "@po",
475
+ onPointerOver: "@pov",
476
+ onPointerUp: "@pu",
477
+ // ── Events: Drag ──
478
+ onDrag: "@dg",
479
+ onDragEnd: "@dge",
480
+ onDragEnter: "@dgn",
481
+ onDragLeave: "@dgl",
482
+ onDragOver: "@dgo",
483
+ onDragStart: "@dgs",
484
+ onDrop: "@dp",
485
+ // ── Events: Scroll / Resize ──
486
+ onResize: "@rz",
487
+ onScroll: "@scl",
488
+ onWheel: "@wh",
489
+ // ── Events: Clipboard ──
490
+ onCopy: "@cy",
491
+ onCut: "@ct",
492
+ onPaste: "@pt",
493
+ // ── Events: Composition ──
494
+ onCompositionEnd: "@cpe",
495
+ onCompositionStart: "@cps",
496
+ onCompositionUpdate: "@cpu",
497
+ // ── Events: Animation / Transition ──
498
+ onAnimationEnd: "@ae",
499
+ onAnimationIteration: "@ai",
500
+ onAnimationStart: "@as",
501
+ onTransitionEnd: "@tre",
502
+ onTransitionStart: "@trs",
503
+ // ── Events: Media ──
504
+ onAbort: "@ab",
505
+ onCanPlay: "@cap",
506
+ onCanPlayThrough: "@cpt",
507
+ onDurationChange: "@duc",
508
+ onEmptied: "@em",
509
+ onEncrypted: "@enc",
510
+ onEnded: "@end",
511
+ onError: "@er",
512
+ onLoad: "@ld",
513
+ onLoadedData: "@ldd",
514
+ onLoadedMetadata: "@ldm",
515
+ onPause: "@pa",
516
+ onPlay: "@pl",
517
+ onPlaying: "@plg",
518
+ onProgress: "@prg",
519
+ onRateChange: "@rc",
520
+ onSeeked: "@sk",
521
+ onSeeking: "@skg",
522
+ onStalled: "@stl",
523
+ onSuspend: "@ssp",
524
+ onTimeUpdate: "@tu",
525
+ onVolumeChange: "@vc",
526
+ onWaiting: "@wt",
527
+ // ── Special / Advanced ──
528
+ icon: "ico",
529
+ iconText: "ict",
530
+ lookup: "lkp",
531
+ router: "rtr",
532
+ shapeModifier: "shpm"
533
+ };
534
+ const abbrToProp = /* @__PURE__ */ Object.create(null);
535
+ for (const prop in propToAbbr) {
536
+ abbrToProp[propToAbbr[prop]] = prop;
537
+ }
538
+ const seen = /* @__PURE__ */ Object.create(null);
539
+ for (const prop in propToAbbr) {
540
+ const abbr = propToAbbr[prop];
541
+ if (seen[abbr]) {
542
+ throw new Error(
543
+ `Duplicate abbreviation "${abbr}" for "${prop}" \u2014 already used by "${seen[abbr]}"`
544
+ );
545
+ }
546
+ seen[abbr] = prop;
547
+ }
548
+ const PRESERVE_VALUE_KEYS = /* @__PURE__ */ new Set([
549
+ "state",
550
+ "st",
551
+ "scope",
552
+ "scp",
553
+ "attr",
554
+ "at",
555
+ "style",
556
+ "sy",
557
+ "data",
558
+ "dt",
559
+ "context",
560
+ "ctx",
561
+ "query",
562
+ "qy",
563
+ "class",
564
+ "cl"
565
+ ]);
566
+ const SKIP_INLINE_KEYS = /* @__PURE__ */ new Set([
567
+ "text",
568
+ "tx",
569
+ "html",
570
+ "htm",
571
+ "content",
572
+ "cnt",
573
+ "placeholder",
574
+ "phd",
575
+ "src",
576
+ "href",
577
+ "hrf"
578
+ ]);
579
+ function isComponentKey(key) {
580
+ return /^[A-Z]/.test(key);
581
+ }
582
+ function isSelectorKey(key) {
583
+ return /^[:@.!$>&]/.test(key) || key.startsWith("> ");
584
+ }
585
+ export {
586
+ PRESERVE_VALUE_KEYS,
587
+ SKIP_INLINE_KEYS,
588
+ abbrToProp,
589
+ isComponentKey,
590
+ isSelectorKey,
591
+ propToAbbr
592
+ };