defuss 2.0.1 → 2.0.3

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.
Files changed (90) hide show
  1. package/dist/dom-11AL5tu8.cjs +2121 -0
  2. package/dist/dom-77kNwui3.mjs +2028 -0
  3. package/dist/dom-8PVikEgj.cjs +2102 -0
  4. package/dist/dom-B0seF_6L.mjs +2095 -0
  5. package/dist/dom-B1I0Ntr-.cjs +2128 -0
  6. package/dist/dom-B2s8h2Oe.cjs +2102 -0
  7. package/dist/dom-B3MC1bVG.mjs +2034 -0
  8. package/dist/dom-B3OUXCES.mjs +2070 -0
  9. package/dist/dom-BBBIovzv.mjs +2034 -0
  10. package/dist/dom-BEu4Sfd-.cjs +2117 -0
  11. package/dist/dom-BEzo1MUJ.cjs +2117 -0
  12. package/dist/dom-BJERuZjE.mjs +2090 -0
  13. package/dist/dom-BMlw6puj.mjs +2034 -0
  14. package/dist/dom-BUDmDmgY.cjs +2102 -0
  15. package/dist/dom-BawwQ--f.mjs +2049 -0
  16. package/dist/dom-Bei2KSCq.cjs +2142 -0
  17. package/dist/dom-BfPMu0dJ.mjs +2057 -0
  18. package/dist/dom-BxWLR_CU.mjs +2034 -0
  19. package/dist/dom-C-4x7pHa.cjs +2124 -0
  20. package/dist/dom-C1NIQBAt.cjs +2117 -0
  21. package/dist/dom-CCyoKmdi.mjs +2049 -0
  22. package/dist/dom-CDGc8hoY.mjs +2058 -0
  23. package/dist/dom-CFT2GRw6.mjs +2034 -0
  24. package/dist/dom-CNKp2T-z.cjs +2126 -0
  25. package/dist/dom-CSWaOL3c.mjs +2099 -0
  26. package/dist/dom-CfWHCMus.cjs +2164 -0
  27. package/dist/dom-Co1NqlV6.mjs +2059 -0
  28. package/dist/dom-CxRqR3pd.cjs +2102 -0
  29. package/dist/dom-D3TRLsDS.cjs +2102 -0
  30. package/dist/dom-DHKdnUMm.cjs +2118 -0
  31. package/dist/dom-DKQ6CnRq.mjs +2050 -0
  32. package/dist/dom-DLIPg3QY.mjs +1977 -0
  33. package/dist/dom-DLKmVfPz.mjs +2057 -0
  34. package/dist/dom-DNGWHS7t.cjs +2159 -0
  35. package/dist/dom-DPbGY8oU.mjs +2073 -0
  36. package/dist/dom-DTo7fRwx.mjs +2055 -0
  37. package/dist/dom-Daho4GPR.mjs +2053 -0
  38. package/dist/dom-Db15rsM1.mjs +2049 -0
  39. package/dist/dom-DgoG3lqb.cjs +2117 -0
  40. package/dist/dom-DmGkOplK.cjs +2127 -0
  41. package/dist/dom-DvHgqwJh.mjs +2046 -0
  42. package/dist/dom-EqEVp0-C.cjs +2033 -0
  43. package/dist/dom-NjCYLgPw.cjs +2126 -0
  44. package/dist/dom-UHntoboN.cjs +2139 -0
  45. package/dist/dom-Z-gE5GK8.cjs +2168 -0
  46. package/dist/dom-mlV6havt.mjs +2048 -0
  47. package/dist/dom-x3xpYktC.cjs +2114 -0
  48. package/dist/dom-yD0xCNhJ.cjs +2096 -0
  49. package/dist/index-B2aNqkPk.d.ts +1440 -0
  50. package/dist/index-B_CgmZnk.d.ts +1433 -0
  51. package/dist/index-CEtCW1xG.d.ts +1433 -0
  52. package/dist/index-CfTsJbfE.d.ts +1432 -0
  53. package/dist/{index-S3MRf--S.d.ts → index-Co0eiBV7.d.ts} +270 -198
  54. package/dist/index-CtUAjHuo.d.ts +1433 -0
  55. package/dist/index-CuzRXgFf.d.ts +1439 -0
  56. package/dist/index-DFuY8uu9.d.ts +1431 -0
  57. package/dist/index-Dhj90n6u.d.ts +1433 -0
  58. package/dist/index-DjCdylRj.d.ts +1438 -0
  59. package/dist/index-DyKry_9r.d.ts +1439 -0
  60. package/dist/index-FWrGRiCX.d.ts +1431 -0
  61. package/dist/index-wIzDVlFz.d.ts +1439 -0
  62. package/dist/index.cjs +397 -3
  63. package/dist/index.d.cts +27 -151
  64. package/dist/index.d.ts +27 -151
  65. package/dist/index.mjs +328 -3
  66. package/dist/render/client.cjs +97 -2
  67. package/dist/render/client.d.cts +2 -2
  68. package/dist/render/client.d.ts +2 -2
  69. package/dist/render/client.mjs +79 -2
  70. package/dist/render/index.cjs +21 -2
  71. package/dist/render/index.d.cts +1 -1
  72. package/dist/render/index.d.ts +1 -1
  73. package/dist/render/index.mjs +2 -2
  74. package/dist/render/server.cjs +94 -2
  75. package/dist/render/server.d.cts +2 -2
  76. package/dist/render/server.d.ts +2 -2
  77. package/dist/render/server.mjs +55 -2
  78. package/package.json +10 -17
  79. package/dist/dom-BWzRM0Rn.mjs +0 -2
  80. package/dist/dom-BWzRM0Rn.mjs.map +0 -1
  81. package/dist/dom-C5mY2MSs.cjs +0 -2
  82. package/dist/dom-C5mY2MSs.cjs.map +0 -1
  83. package/dist/index.cjs.map +0 -1
  84. package/dist/index.mjs.map +0 -1
  85. package/dist/render/client.cjs.map +0 -1
  86. package/dist/render/client.mjs.map +0 -1
  87. package/dist/render/index.cjs.map +0 -1
  88. package/dist/render/index.mjs.map +0 -1
  89. package/dist/render/server.cjs.map +0 -1
  90. package/dist/render/server.mjs.map +0 -1
@@ -1,20 +1,43 @@
1
1
  import * as CSS from 'csstype';
2
2
 
3
+ type MemoryProviderOptions = {};
4
+ interface MemoryStorage<T> extends PersistenceProviderImpl<T> {
5
+ backendApi: Omit<Omit<Storage, 'key'>, 'length'>;
6
+ }
7
+ interface WebStorage<T> extends PersistenceProviderImpl<T> {
8
+ backendApi: Storage;
9
+ }
10
+
11
+ type MiddlewareFn<T> = (key: string, value: T) => T;
12
+ /** a simple key/value persistence interface */
13
+ interface PersistenceProviderImpl<T> {
14
+ get: (key: string, defaultValue: T, middlewareFn?: MiddlewareFn<T>) => T;
15
+ set: (key: string, value: T, middlewareFn?: MiddlewareFn<T>) => void;
16
+ remove: (key: string) => void;
17
+ removeAll: () => void;
18
+ backendApi: any;
19
+ }
20
+ type PersistenceProviderType = "session" | "local" | "memory";
21
+ type PersistenceProviderOptions = MemoryProviderOptions;
22
+
3
23
  type Listener<T> = (newValue: T, oldValue?: T, changedKey?: string) => void;
4
24
  interface Store<T> {
5
25
  value: T;
6
26
  get: <D = T>(path?: string) => D;
7
27
  set: <D = T>(pathOrValue: string | D, value?: D) => void;
8
28
  subscribe: (listener: Listener<T>) => () => void;
29
+ persist: (key: string, provider?: PersistenceProviderType) => void;
30
+ restore: (key: string, provider?: PersistenceProviderType) => void;
9
31
  }
10
32
  declare const createStore: <T>(initialValue: T) => Store<T>;
11
33
 
12
- type Globals = Window & typeof globalThis;
34
+ type Globals = Performance & Window & typeof globalThis;
35
+ type NodeType = Node | Text | Element | Document | DocumentFragment | HTMLElement | SVGElement | null;
13
36
  interface CSSProperties extends CSS.Properties<string | number> {
14
37
  }
15
38
  interface FontFaceProperties {
16
39
  MozFontFeatureSettings?: CSS.Property.FontFeatureSettings;
17
- fontDisplay?: 'auto' | 'block' | 'fallback' | 'optional' | 'swap' | (string & {});
40
+ fontDisplay?: "auto" | "block" | "fallback" | "optional" | "swap" | (string & {});
18
41
  fontFamily?: CSS.Property.FontFamily;
19
42
  fontFeatureSettings?: CSS.Property.FontFeatureSettings;
20
43
  fontStretch?: CSS.Property.FontStretch;
@@ -28,115 +51,119 @@ interface FontFaceProperties {
28
51
  interface KeyFrameProperties {
29
52
  from?: Partial<CSSProperties>;
30
53
  to?: Partial<CSSProperties>;
31
- '0%'?: Partial<CSSProperties>;
32
- '1%'?: Partial<CSSProperties>;
33
- '2%'?: Partial<CSSProperties>;
34
- '3%'?: Partial<CSSProperties>;
35
- '4%'?: Partial<CSSProperties>;
36
- '5%'?: Partial<CSSProperties>;
37
- '6%'?: Partial<CSSProperties>;
38
- '7%'?: Partial<CSSProperties>;
39
- '8%'?: Partial<CSSProperties>;
40
- '9%'?: Partial<CSSProperties>;
41
- '10%'?: Partial<CSSProperties>;
42
- '11%'?: Partial<CSSProperties>;
43
- '12%'?: Partial<CSSProperties>;
44
- '13%'?: Partial<CSSProperties>;
45
- '14%'?: Partial<CSSProperties>;
46
- '15%'?: Partial<CSSProperties>;
47
- '16%'?: Partial<CSSProperties>;
48
- '17%'?: Partial<CSSProperties>;
49
- '18%'?: Partial<CSSProperties>;
50
- '19%'?: Partial<CSSProperties>;
51
- '20%'?: Partial<CSSProperties>;
52
- '21%'?: Partial<CSSProperties>;
53
- '22%'?: Partial<CSSProperties>;
54
- '23%'?: Partial<CSSProperties>;
55
- '24%'?: Partial<CSSProperties>;
56
- '25%'?: Partial<CSSProperties>;
57
- '26%'?: Partial<CSSProperties>;
58
- '27%'?: Partial<CSSProperties>;
59
- '28%'?: Partial<CSSProperties>;
60
- '29%'?: Partial<CSSProperties>;
61
- '30%'?: Partial<CSSProperties>;
62
- '31%'?: Partial<CSSProperties>;
63
- '32%'?: Partial<CSSProperties>;
64
- '33%'?: Partial<CSSProperties>;
65
- '34%'?: Partial<CSSProperties>;
66
- '35%'?: Partial<CSSProperties>;
67
- '36%'?: Partial<CSSProperties>;
68
- '37%'?: Partial<CSSProperties>;
69
- '38%'?: Partial<CSSProperties>;
70
- '39%'?: Partial<CSSProperties>;
71
- '40%'?: Partial<CSSProperties>;
72
- '41%'?: Partial<CSSProperties>;
73
- '42%'?: Partial<CSSProperties>;
74
- '43%'?: Partial<CSSProperties>;
75
- '44%'?: Partial<CSSProperties>;
76
- '45%'?: Partial<CSSProperties>;
77
- '46%'?: Partial<CSSProperties>;
78
- '47%'?: Partial<CSSProperties>;
79
- '48%'?: Partial<CSSProperties>;
80
- '49%'?: Partial<CSSProperties>;
81
- '50%'?: Partial<CSSProperties>;
82
- '51%'?: Partial<CSSProperties>;
83
- '52%'?: Partial<CSSProperties>;
84
- '53%'?: Partial<CSSProperties>;
85
- '54%'?: Partial<CSSProperties>;
86
- '55%'?: Partial<CSSProperties>;
87
- '56%'?: Partial<CSSProperties>;
88
- '57%'?: Partial<CSSProperties>;
89
- '58%'?: Partial<CSSProperties>;
90
- '59%'?: Partial<CSSProperties>;
91
- '60%'?: Partial<CSSProperties>;
92
- '61%'?: Partial<CSSProperties>;
93
- '62%'?: Partial<CSSProperties>;
94
- '63%'?: Partial<CSSProperties>;
95
- '64%'?: Partial<CSSProperties>;
96
- '65%'?: Partial<CSSProperties>;
97
- '66%'?: Partial<CSSProperties>;
98
- '67%'?: Partial<CSSProperties>;
99
- '68%'?: Partial<CSSProperties>;
100
- '69%'?: Partial<CSSProperties>;
101
- '70%'?: Partial<CSSProperties>;
102
- '71%'?: Partial<CSSProperties>;
103
- '72%'?: Partial<CSSProperties>;
104
- '73%'?: Partial<CSSProperties>;
105
- '74%'?: Partial<CSSProperties>;
106
- '75%'?: Partial<CSSProperties>;
107
- '76%'?: Partial<CSSProperties>;
108
- '77%'?: Partial<CSSProperties>;
109
- '78%'?: Partial<CSSProperties>;
110
- '79%'?: Partial<CSSProperties>;
111
- '80%'?: Partial<CSSProperties>;
112
- '81%'?: Partial<CSSProperties>;
113
- '82%'?: Partial<CSSProperties>;
114
- '83%'?: Partial<CSSProperties>;
115
- '84%'?: Partial<CSSProperties>;
116
- '85%'?: Partial<CSSProperties>;
117
- '86%'?: Partial<CSSProperties>;
118
- '87%'?: Partial<CSSProperties>;
119
- '88%'?: Partial<CSSProperties>;
120
- '89%'?: Partial<CSSProperties>;
121
- '90%'?: Partial<CSSProperties>;
122
- '91%'?: Partial<CSSProperties>;
123
- '92%'?: Partial<CSSProperties>;
124
- '93%'?: Partial<CSSProperties>;
125
- '94%'?: Partial<CSSProperties>;
126
- '95%'?: Partial<CSSProperties>;
127
- '96%'?: Partial<CSSProperties>;
128
- '97%'?: Partial<CSSProperties>;
129
- '98%'?: Partial<CSSProperties>;
130
- '99%'?: Partial<CSSProperties>;
131
- '100%'?: Partial<CSSProperties>;
54
+ "0%"?: Partial<CSSProperties>;
55
+ "1%"?: Partial<CSSProperties>;
56
+ "2%"?: Partial<CSSProperties>;
57
+ "3%"?: Partial<CSSProperties>;
58
+ "4%"?: Partial<CSSProperties>;
59
+ "5%"?: Partial<CSSProperties>;
60
+ "6%"?: Partial<CSSProperties>;
61
+ "7%"?: Partial<CSSProperties>;
62
+ "8%"?: Partial<CSSProperties>;
63
+ "9%"?: Partial<CSSProperties>;
64
+ "10%"?: Partial<CSSProperties>;
65
+ "11%"?: Partial<CSSProperties>;
66
+ "12%"?: Partial<CSSProperties>;
67
+ "13%"?: Partial<CSSProperties>;
68
+ "14%"?: Partial<CSSProperties>;
69
+ "15%"?: Partial<CSSProperties>;
70
+ "16%"?: Partial<CSSProperties>;
71
+ "17%"?: Partial<CSSProperties>;
72
+ "18%"?: Partial<CSSProperties>;
73
+ "19%"?: Partial<CSSProperties>;
74
+ "20%"?: Partial<CSSProperties>;
75
+ "21%"?: Partial<CSSProperties>;
76
+ "22%"?: Partial<CSSProperties>;
77
+ "23%"?: Partial<CSSProperties>;
78
+ "24%"?: Partial<CSSProperties>;
79
+ "25%"?: Partial<CSSProperties>;
80
+ "26%"?: Partial<CSSProperties>;
81
+ "27%"?: Partial<CSSProperties>;
82
+ "28%"?: Partial<CSSProperties>;
83
+ "29%"?: Partial<CSSProperties>;
84
+ "30%"?: Partial<CSSProperties>;
85
+ "31%"?: Partial<CSSProperties>;
86
+ "32%"?: Partial<CSSProperties>;
87
+ "33%"?: Partial<CSSProperties>;
88
+ "34%"?: Partial<CSSProperties>;
89
+ "35%"?: Partial<CSSProperties>;
90
+ "36%"?: Partial<CSSProperties>;
91
+ "37%"?: Partial<CSSProperties>;
92
+ "38%"?: Partial<CSSProperties>;
93
+ "39%"?: Partial<CSSProperties>;
94
+ "40%"?: Partial<CSSProperties>;
95
+ "41%"?: Partial<CSSProperties>;
96
+ "42%"?: Partial<CSSProperties>;
97
+ "43%"?: Partial<CSSProperties>;
98
+ "44%"?: Partial<CSSProperties>;
99
+ "45%"?: Partial<CSSProperties>;
100
+ "46%"?: Partial<CSSProperties>;
101
+ "47%"?: Partial<CSSProperties>;
102
+ "48%"?: Partial<CSSProperties>;
103
+ "49%"?: Partial<CSSProperties>;
104
+ "50%"?: Partial<CSSProperties>;
105
+ "51%"?: Partial<CSSProperties>;
106
+ "52%"?: Partial<CSSProperties>;
107
+ "53%"?: Partial<CSSProperties>;
108
+ "54%"?: Partial<CSSProperties>;
109
+ "55%"?: Partial<CSSProperties>;
110
+ "56%"?: Partial<CSSProperties>;
111
+ "57%"?: Partial<CSSProperties>;
112
+ "58%"?: Partial<CSSProperties>;
113
+ "59%"?: Partial<CSSProperties>;
114
+ "60%"?: Partial<CSSProperties>;
115
+ "61%"?: Partial<CSSProperties>;
116
+ "62%"?: Partial<CSSProperties>;
117
+ "63%"?: Partial<CSSProperties>;
118
+ "64%"?: Partial<CSSProperties>;
119
+ "65%"?: Partial<CSSProperties>;
120
+ "66%"?: Partial<CSSProperties>;
121
+ "67%"?: Partial<CSSProperties>;
122
+ "68%"?: Partial<CSSProperties>;
123
+ "69%"?: Partial<CSSProperties>;
124
+ "70%"?: Partial<CSSProperties>;
125
+ "71%"?: Partial<CSSProperties>;
126
+ "72%"?: Partial<CSSProperties>;
127
+ "73%"?: Partial<CSSProperties>;
128
+ "74%"?: Partial<CSSProperties>;
129
+ "75%"?: Partial<CSSProperties>;
130
+ "76%"?: Partial<CSSProperties>;
131
+ "77%"?: Partial<CSSProperties>;
132
+ "78%"?: Partial<CSSProperties>;
133
+ "79%"?: Partial<CSSProperties>;
134
+ "80%"?: Partial<CSSProperties>;
135
+ "81%"?: Partial<CSSProperties>;
136
+ "82%"?: Partial<CSSProperties>;
137
+ "83%"?: Partial<CSSProperties>;
138
+ "84%"?: Partial<CSSProperties>;
139
+ "85%"?: Partial<CSSProperties>;
140
+ "86%"?: Partial<CSSProperties>;
141
+ "87%"?: Partial<CSSProperties>;
142
+ "88%"?: Partial<CSSProperties>;
143
+ "89%"?: Partial<CSSProperties>;
144
+ "90%"?: Partial<CSSProperties>;
145
+ "91%"?: Partial<CSSProperties>;
146
+ "92%"?: Partial<CSSProperties>;
147
+ "93%"?: Partial<CSSProperties>;
148
+ "94%"?: Partial<CSSProperties>;
149
+ "95%"?: Partial<CSSProperties>;
150
+ "96%"?: Partial<CSSProperties>;
151
+ "97%"?: Partial<CSSProperties>;
152
+ "98%"?: Partial<CSSProperties>;
153
+ "99%"?: Partial<CSSProperties>;
154
+ "100%"?: Partial<CSSProperties>;
132
155
  }
133
156
  type RefUpdateFn<D> = (state: D) => void;
157
+ type RefUpdateRenderFn = (markup: RenderInput) => Promise<void>;
134
158
  interface Ref<NT = null | Node | Element | Text, ST = any> {
135
159
  current: NT;
136
160
  store?: Store<ST>;
137
161
  state?: ST;
138
- update: RefUpdateFn<ST>;
162
+ update: RefUpdateRenderFn;
163
+ updateState: RefUpdateFn<ST>;
139
164
  subscribe: (refUpdateFn: RefUpdateFn<ST>) => () => void;
165
+ persist: (key: string, provider?: PersistenceProviderType) => void;
166
+ restore: (key: string, provider?: PersistenceProviderType) => void;
140
167
  }
141
168
  interface VAttributes {
142
169
  ref?: Ref;
@@ -178,13 +205,13 @@ declare global {
178
205
  }
179
206
  interface SVGAttributes extends HTMLAttributes {
180
207
  accentHeight?: number | string;
181
- accumulate?: 'none' | 'sum';
182
- additive?: 'replace' | 'sum';
183
- alignmentBaseline?: 'auto' | 'baseline' | 'before-edge' | 'text-before-edge' | 'middle' | 'central' | 'after-edge' | 'text-after-edge' | 'ideographic' | 'alphabetic' | 'hanging' | 'mathematical' | 'inherit';
184
- allowReorder?: 'no' | 'yes';
208
+ accumulate?: "none" | "sum";
209
+ additive?: "replace" | "sum";
210
+ alignmentBaseline?: "auto" | "baseline" | "before-edge" | "text-before-edge" | "middle" | "central" | "after-edge" | "text-after-edge" | "ideographic" | "alphabetic" | "hanging" | "mathematical" | "inherit";
211
+ allowReorder?: "no" | "yes";
185
212
  alphabetic?: number | string;
186
213
  amplitude?: number | string;
187
- arabicForm?: 'initial' | 'medial' | 'terminal' | 'isolated';
214
+ arabicForm?: "initial" | "medial" | "terminal" | "isolated";
188
215
  ascent?: number | string;
189
216
  attributeName?: string;
190
217
  attributeType?: string;
@@ -204,7 +231,7 @@ declare global {
204
231
  clipPathUnits?: number | string;
205
232
  clipRule?: number | string;
206
233
  colorInterpolation?: number | string;
207
- colorInterpolationFilters?: 'auto' | 'sRGB' | 'linearRGB' | 'inherit';
234
+ colorInterpolationFilters?: "auto" | "sRGB" | "linearRGB" | "inherit";
208
235
  colorProfile?: number | string;
209
236
  colorRendering?: number | string;
210
237
  contentScriptType?: number | string;
@@ -231,7 +258,7 @@ declare global {
231
258
  externalResourcesRequired?: number | string;
232
259
  fill?: string;
233
260
  fillOpacity?: number | string;
234
- fillRule?: 'nonzero' | 'evenodd' | 'inherit';
261
+ fillRule?: "nonzero" | "evenodd" | "inherit";
235
262
  filter?: string;
236
263
  filterRes?: number | string;
237
264
  filterUnits?: number | string;
@@ -353,8 +380,8 @@ declare global {
353
380
  stroke?: string;
354
381
  strokeDasharray?: string | number;
355
382
  strokeDashoffset?: string | number;
356
- strokeLinecap?: 'butt' | 'round' | 'square' | 'inherit';
357
- strokeLinejoin?: 'miter' | 'round' | 'bevel' | 'inherit';
383
+ strokeLinecap?: "butt" | "round" | "square" | "inherit";
384
+ strokeLinejoin?: "miter" | "round" | "bevel" | "inherit";
358
385
  strokeMiterlimit?: string;
359
386
  strokeOpacity?: number | string;
360
387
  strokeWidth?: number | string;
@@ -1228,104 +1255,149 @@ type RenderResultNode = Element | Text | undefined;
1228
1255
  type RenderResult<T = RenderInput> = T extends Array<RenderNodeInput> ? Array<RenderResultNode> : RenderResultNode;
1229
1256
  type AllHTMLElements = HTMLElement & HTMLAnchorElement & HTMLAreaElement & HTMLAudioElement & HTMLBaseElement & HTMLBodyElement & HTMLBRElement & HTMLButtonElement & HTMLCanvasElement & HTMLDataElement & HTMLDataListElement & HTMLDetailsElement & HTMLDialogElement & HTMLDivElement & HTMLDListElement & HTMLEmbedElement & HTMLFieldSetElement & HTMLFormElement & HTMLHeadingElement & HTMLHeadElement & HTMLHtmlElement & HTMLHRElement & HTMLIFrameElement & HTMLImageElement & HTMLInputElement & HTMLLabelElement & HTMLLegendElement & HTMLLIElement & HTMLLinkElement & HTMLMapElement & HTMLMenuElement & HTMLMetaElement & HTMLMeterElement & HTMLModElement & HTMLOListElement & HTMLObjectElement & HTMLOptGroupElement & HTMLOptionElement & HTMLOutputElement & HTMLParagraphElement & HTMLPictureElement & HTMLPreElement & HTMLProgressElement & HTMLQuoteElement & HTMLScriptElement & HTMLSelectElement & HTMLSlotElement & HTMLSourceElement & HTMLSpanElement & HTMLStyleElement & HTMLTableCaptionElement & HTMLTableCellElement & HTMLTableColElement & HTMLTableElement & HTMLTableRowElement & HTMLTableSectionElement & HTMLTemplateElement & HTMLTextAreaElement & HTMLTimeElement & HTMLTitleElement & HTMLTrackElement & HTMLUListElement & HTMLUnknownElement & HTMLVideoElement & HTMLParamElement & HTMLFontElement & HTMLMarqueeElement & HTMLTableDataCellElement & HTMLTableHeaderCellElement;
1230
1257
 
1231
- type NodeType = Node | Text | Element | Document | DocumentFragment | HTMLElement | SVGElement;
1232
- type FormFieldValue = string | Date | File | boolean | number;
1258
+ type FormFieldValue = string | boolean;
1233
1259
  interface FormKeyValues {
1234
- [keyOrPath: string]: FormFieldValue;
1260
+ [keyOrPath: string]: FormFieldValue | FormFieldValue[];
1261
+ }
1262
+ interface Dimensions {
1263
+ width: number;
1264
+ height: number;
1265
+ outerWidth?: number;
1266
+ outerHeight?: number;
1267
+ }
1268
+ interface Position {
1269
+ top: number;
1270
+ left: number;
1235
1271
  }
1236
- interface DequeryOptions {
1237
- maxWaitMs?: number;
1272
+ type DOMPropValue = string | number | boolean | null;
1273
+ declare global {
1274
+ interface HTMLElement {
1275
+ _dequeryEvents?: Map<string, Set<EventListener>>;
1276
+ }
1277
+ }
1278
+ interface DequeryOptions<NT = DequerySyncMethodReturnType> {
1238
1279
  timeout?: number;
1239
- delay?: number;
1240
- initialEl?: NodeType;
1241
- state?: any;
1242
- verbose?: boolean;
1243
- onTimeGuardError?: (ms: number, call: Call) => void;
1280
+ autoStart?: boolean;
1281
+ autoStartDelay?: number;
1282
+ resultStack?: NT[];
1283
+ globals?: Partial<Globals>;
1244
1284
  }
1245
- declare const adefaultConfig: DequeryOptions;
1246
1285
  type ElementCreationOptions = JSX.HTMLAttributesLowerCase & JSX.HTMLAttributesLowerCase & {
1247
1286
  html?: string;
1248
1287
  text?: string;
1249
1288
  };
1250
- declare class Call {
1289
+ type DequerySyncMethodReturnType = Array<NodeType> | NodeType | string | boolean | null;
1290
+
1291
+ declare class Call<NT> {
1251
1292
  name: string;
1252
- fn: Function;
1293
+ fn: (...args: any[]) => Promise<NT>;
1253
1294
  args: any[];
1254
- constructor(fn: Function, ...args: any[]);
1255
- }
1256
- interface DequeryArrayLike {
1257
- [index: number]: NodeType;
1295
+ constructor(name: string, fn: (...args: any[]) => Promise<NT>, ...args: any[]);
1258
1296
  }
1259
- declare class CallChainImpl implements DequeryArrayLike {
1260
- [index: number]: NodeType;
1261
- options: DequeryOptions;
1262
- callStack: Array<Call>;
1263
- chainStack: Array<Array<Call>>;
1264
- elements: Array<NodeType>;
1265
- prevElements: Array<NodeType>;
1266
- stoppedWithError: boolean;
1267
- lastResult: any;
1297
+ declare const NonChainedReturnCallNames: string[];
1298
+ declare class CallChainImpl<NT = DequerySyncMethodReturnType> {
1299
+ [index: number]: NT;
1268
1300
  isResolved: boolean;
1269
- constructor(options?: DequeryOptions, isResolved?: boolean);
1270
- resetElements(): void;
1271
- getFirstElement(): NodeType;
1272
- createSubChain(clone?: boolean): CallChainImpl;
1273
- __init(selectorHtmlRefOrElementRef: string | NodeType | Ref<NodeType, any> | RenderInput, options: DequeryOptions | ElementCreationOptions): CallChainImpl;
1274
- debug(cb: (el: NodeType | Array<NodeType>) => void): this;
1275
- ref(ref: Ref<NodeType>): this;
1276
- query(selector: string): this;
1277
- all(): this;
1278
- get length(): number;
1279
- first(): this;
1280
- last(): this;
1281
- next(): this;
1282
- prev(): this;
1283
- find(selector: string): this;
1284
- parent(): this;
1285
- children(): this;
1286
- closest(selector: string): this;
1287
- filter(selector: string): this;
1288
- attr(name: string, value?: string): this;
1289
- prop(name: keyof AllHTMLElements, value?: any): this;
1290
- css(prop: string | CSSProperties, value?: string): this;
1291
- addClass(name: string | Array<string>): this;
1292
- removeClass(name: string | Array<string>): this;
1293
- hasClass(name: string): this;
1294
- toggleClass(name: string): this;
1295
- animateClass(name: string, duration: number): this;
1296
- empty(): this;
1297
- html(html: string): this;
1298
- jsx(vdom: RenderInput): this;
1299
- text(text: string): this;
1300
- update(input: string | RenderInput): this;
1301
- remove(): this;
1302
- replaceWith(content: string | RenderInput | NodeType | Ref<NodeType> | typeof DequeryChain): this;
1303
- append(content: string | NodeType | typeof DequeryChain): this;
1304
- appendTo(target: NodeType | Ref<NodeType> | string | typeof DequeryChain): this;
1305
- on(event: string, handler: EventListener): this;
1306
- off(event: string, handler: EventListener): this;
1307
- trigger(eventType: string): this;
1308
- val(val?: string | boolean): this;
1309
- map(cb: (el: NodeType, idx: number) => any): this;
1310
- toArray(): this;
1311
- data(name: string, val?: string): this;
1312
- form(formData?: Record<string, string | boolean>): this;
1313
- then(resolve: (value: any) => void, reject: (reason?: any) => void): void;
1301
+ options: DequeryOptions<NT>;
1302
+ elementCreationOptions: ElementCreationOptions;
1303
+ callStack: Call<NT>[];
1304
+ resultStack: NT[][];
1305
+ stackPointer: number;
1306
+ lastResolvedStackPointer: number;
1307
+ stoppedWithError: Error | null;
1308
+ lastResult: NT[] | CallChainImpl<NT> | CallChainImplThenable<NT>;
1309
+ length: number;
1310
+ chainStartTime: number;
1311
+ chainAsyncStartTime: number;
1312
+ chainAsyncFinishTime: number;
1313
+ document: Document;
1314
+ window: Window;
1315
+ performance: Performance;
1316
+ Parser: typeof DOMParser;
1317
+ constructor(options?: DequeryOptions<NT>);
1318
+ get globals(): Globals;
1319
+ get nodes(): NodeType[];
1320
+ [Symbol.iterator](): IterableIterator<NT>;
1321
+ getFirstElement(): PromiseLike<NT>;
1322
+ debug(cb: (chain: CallChainImpl<NT>) => void): CallChainImpl<NT> | CallChainImplThenable<NT>;
1323
+ ref(ref: Ref<NodeType>): CallChainImpl<NT> | CallChainImplThenable<NT>;
1324
+ query(selector: string): CallChainImpl<NT> | CallChainImplThenable<NT>;
1325
+ next(): CallChainImpl<NT> | CallChainImplThenable<NT>;
1326
+ prev(): CallChainImpl<NT> | CallChainImplThenable<NT>;
1327
+ find(selector: string): PromiseLike<CallChainImplThenable<NT>>;
1328
+ parent(): CallChainImpl<NT> | CallChainImplThenable<NT>;
1329
+ children(): CallChainImpl<NT> | CallChainImplThenable<NT>;
1330
+ closest(selector: string): CallChainImpl<NT> | CallChainImplThenable<NT>;
1331
+ first(): CallChainImpl<NT> | CallChainImplThenable<NT>;
1332
+ last(): CallChainImpl<NT> | CallChainImplThenable<NT>;
1333
+ attr(name: string, value: string): PromiseLike<CallChainImplThenable<NT>>;
1334
+ attr(name: string): PromiseLike<string | null>;
1335
+ prop<K extends keyof AllHTMLElements>(name: K, value: DOMPropValue): PromiseLike<CallChainImplThenable<NT>>;
1336
+ prop<K extends keyof AllHTMLElements>(name: K): PromiseLike<string>;
1337
+ css(prop: CSSProperties): PromiseLike<CallChainImplThenable<NT>>;
1338
+ css(prop: string, value: string): PromiseLike<CallChainImplThenable<NT>>;
1339
+ css(prop: string): PromiseLike<string>;
1340
+ addClass(name: string | Array<string>): PromiseLike<CallChainImplThenable<NT>>;
1341
+ removeClass(name: string | Array<string>): PromiseLike<CallChainImplThenable<NT>>;
1342
+ hasClass(name: string): PromiseLike<boolean>;
1343
+ toggleClass(name: string): PromiseLike<CallChainImplThenable<NT>>;
1344
+ animateClass(name: string, duration: number): PromiseLike<CallChainImplThenable<NT>>;
1345
+ empty(): PromiseLike<CallChainImplThenable<NT>>;
1346
+ html(): PromiseLike<string>;
1347
+ html(html: string): PromiseLike<CallChainImplThenable<NT>>;
1348
+ jsx(vdom: RenderInput): CallChainImplThenable<NT>;
1349
+ text(text?: string): PromiseLike<string>;
1350
+ remove(): CallChainImplThenable<NT>;
1351
+ replaceWith<T = NT>(content: string | RenderInput | NodeType | Ref<NodeType> | CallChainImpl<T> | CallChainImplThenable<T>): CallChainImplThenable<NT>;
1352
+ append<T = NT>(content: string | RenderInput | NodeType | Ref<NodeType> | CallChainImpl<T> | CallChainImplThenable<T>): CallChainImplThenable<NT>;
1353
+ appendTo<T = NT>(target: string | NodeType | Ref<NodeType> | CallChainImpl<T> | CallChainImplThenable<T>): CallChainImplThenable<NT>;
1354
+ update(input: string | RenderInput): CallChainImplThenable<NT>;
1355
+ on(event: string, handler: EventListener): CallChainImplThenable<NT>;
1356
+ off(event: string, handler?: EventListener): CallChainImplThenable<NT>;
1357
+ clearEvents(): CallChainImplThenable<NT>;
1358
+ trigger(eventType: string): CallChainImplThenable<NT>;
1359
+ position(): PromiseLike<Position>;
1360
+ offset(): PromiseLike<Position>;
1361
+ data(name: string, value?: string): PromiseLike<string | undefined>;
1362
+ val(val?: string | boolean): PromiseLike<string | boolean>;
1363
+ serialize(format?: "querystring" | "json"): PromiseLike<string>;
1364
+ form<T = FormKeyValues>(formData?: Record<string, string | boolean>): PromiseLike<T>;
1365
+ dimension(includeMarginOrPadding?: boolean, includePaddingIfMarginTrue?: boolean): PromiseLike<Dimensions>;
1366
+ isVisible(): PromiseLike<boolean>;
1367
+ isHidden(): PromiseLike<boolean>;
1368
+ scrollTo(xOrOptions: number | ScrollToOptions, y?: number): CallChainImplThenable<NT>;
1369
+ scrollBy(xOrOptions: number | ScrollToOptions, y?: number): CallChainImplThenable<NT>;
1370
+ scrollIntoView(options?: boolean | ScrollIntoViewOptions): CallChainImplThenable<NT>;
1371
+ map<T>(cb: (el: NT, idx: number) => T): PromiseLike<NT[]>;
1372
+ toArray(): PromiseLike<NT[]>;
1373
+ filter(selector: string): CallChainImplThenable<NT>;
1374
+ /** memory cleanup (chain becomes useless after calling this method) */
1375
+ dispose(): PromiseLike<void>;
1376
+ }
1377
+ declare class CallChainImplThenable<NT = DequerySyncMethodReturnType> extends CallChainImpl<NT> {
1378
+ constructor(options?: DequeryOptions<NT>, isResolved?: boolean);
1379
+ then(onfulfilled?: (value: CallChainImpl<NT>) => CallChainImpl<NT>, onrejected?: (reason: any) => any | PromiseLike<any>): Promise<any>;
1380
+ catch<TResult = never>(onrejected?: (reason: any) => TResult | PromiseLike<TResult>): Promise<any | TResult>;
1381
+ finally(onfinally?: () => void): Promise<any>;
1314
1382
  }
1315
- declare const DequeryChain: typeof CallChainImpl;
1316
- declare function dequery(selectorRefOrEl: string | NodeType | Ref<NodeType, any> | RenderInput, options?: DequeryOptions | ElementCreationOptions): CallChainImpl;
1383
+ declare function scrollHelper<T = NodeType>(methodName: "scrollTo" | "scrollBy", elements: T[], xOrOptions: number | ScrollToOptions, y?: number): T[];
1384
+ declare function getAllFormValues(chain: CallChainImpl<any>): FormKeyValues;
1385
+ declare function delayedAutoStart<NT = DequerySyncMethodReturnType>(chain: CallChainImplThenable<NT> | CallChainImpl<NT>): CallChainImplThenable<NT> | CallChainImpl<NT>;
1386
+ declare function dequery<NT = DequerySyncMethodReturnType>(selectorRefOrEl: string | NodeType | Ref<NodeType, any> | RenderInput | Function, options?: DequeryOptions<NT> & ElementCreationOptions): CallChainImplThenable<NT> | CallChainImpl<NT>;
1317
1387
  declare const $: typeof dequery;
1318
- declare const D: typeof dequery;
1319
- type Dequery = CallChainImpl;
1320
- declare function isDequery(obj: unknown): obj is Dequery;
1321
- declare function waitForWithPolling<T>(check: () => T | null | undefined, timeout: number, interval?: number): Promise<T>;
1322
- declare function waitForSelectorWithPolling(sel: string, timeout: number, interval?: number): Promise<Element>;
1323
- declare function waitForRefWithPolling<T>(ref: {
1324
- current: T | null;
1325
- }, timeout: number, interval?: number): Promise<T>;
1326
- declare function renderHTML(html: string, type?: DOMParserSupportedType): ChildNode[];
1327
- declare function sleep(ms: number): Promise<unknown>;
1328
- declare function runWithTimeGuard(timeout: number, fn: Function, args: any[], onError: (ms: number, call: Call) => void): Promise<any>;
1388
+ type Dequery = CallChainImplThenable | CallChainImpl;
1389
+ declare function isDequery(obj: unknown): obj is CallChainImplThenable | CallChainImpl;
1390
+ declare function isDequeryOptionsObject(o: object): boolean;
1391
+ declare function getDefaultDequeryOptions<NT>(): DequeryOptions<NT>;
1392
+ declare function mapArrayIndexAccess<NT = DequerySyncMethodReturnType>(source: CallChainImpl<NT>, target: CallChainImpl<NT>): void;
1393
+ declare function createCall<NT>(chain: CallChainImpl<NT>, methodName: string, handler: () => Promise<NT>): CallChainImplThenable<NT> | CallChainImpl<NT>;
1394
+ declare function createGetterSetterCall<NT, T, V>(chain: CallChainImpl<NT>, methodName: string, value: V | undefined, getter: () => T, setter: (value: V) => void): CallChainImplThenable<NT> | CallChainImpl<NT>;
1395
+ declare function createSubChain<NT = DequerySyncMethodReturnType>(source: CallChainImpl<NT>, Constructor?: typeof CallChainImpl | typeof CallChainImplThenable, isResolved?: boolean): CallChainImpl<NT> | CallChainImplThenable<NT>;
1396
+ declare function subChainForNextAwait<NT>(source: CallChainImpl<NT>): CallChainImplThenable<NT> | CallChainImpl<NT>;
1397
+ declare function runWithTimeGuard<NT>(timeout: number, fn: Function, args: any[], onError: (ms: number, call: Call<NT>) => void): Promise<any>;
1398
+ declare function renderNode<T = DequerySyncMethodReturnType>(input: string | RenderInput | NodeType | Ref<NodeType> | CallChainImpl<T> | CallChainImplThenable<T> | null | undefined, chain: CallChainImpl<any> | CallChainImplThenable<any>): Promise<NodeType | null>;
1399
+ declare function resolveNodes<T = DequerySyncMethodReturnType>(input: string | NodeType | Ref<NodeType> | CallChainImpl<T> | CallChainImplThenable<T>, timeout: number, document?: Document): Promise<NodeType[]>;
1400
+ declare function traverse<NT, R = NT>(chain: CallChainImpl<NT>, methodName: string, selector: (el: Element) => Element | Element[] | null | undefined): CallChainImplThenable<R> | CallChainImpl<R>;
1329
1401
 
1330
1402
  declare global {
1331
1403
  var __defuss_document: Document;
@@ -1356,4 +1428,4 @@ declare const jsxDEV: (type: VNodeType | Function | any, attributes: (JSX.HTMLAt
1356
1428
  declare const isRef: (obj: any) => obj is Ref<Element>;
1357
1429
  declare function createRef<ST = any, NT extends Node | Element | Text | null = HTMLElement>(refUpdateFn?: RefUpdateFn<ST>, defaultState?: ST): Ref<NT, ST>;
1358
1430
 
1359
- export { $, type AllHTMLElements as A, isJSX as B, type CSSProperties as C, type DomAbstractionImpl as D, Fragment as E, type FontFaceProperties as F, type Globals as G, jsxs as H, jsxDEV as I, isRef as J, type KeyFrameProperties as K, createRef as L, type FormFieldValue as M, type NodeType as N, type FormKeyValues as O, type ParentElementInput as P, type DequeryOptions as Q, type RenderInput as R, type SyncRenderInput as S, adefaultConfig as T, type ElementCreationOptions as U, type VAttributes as V, DequeryChain as W, dequery as X, D as Y, type Dequery as Z, isDequery as _, type RenderResult as a, waitForWithPolling as a0, waitForSelectorWithPolling as a1, waitForRefWithPolling as a2, renderHTML as a3, sleep as a4, runWithTimeGuard as a5, type Listener as a6, type Store as a7, createStore as a8, type ParentElementInputAsync as b, type RefUpdateFn as c, type Ref as d, type VNodeAttributes as e, type VNode as f, type VNodeType as g, type VNodeKey as h, type VNodeRefObject as i, type VNodeRefCallback as j, type VNodeRef as k, type VNodeChild as l, type VNodeChildren as m, type Children as n, type Props as o, type RenderNodeInput as p, type RenderResultNode as q, createInPlaceErrorMessageVNode as r, jsx as s, observeUnmount as t, handleLifecycleEventsForOnMount as u, getRenderer as v, type SyncRenderResult as w, renderIsomorphicSync as x, renderIsomorphicAsync as y, globalScopeDomApis as z };
1431
+ export { delayedAutoStart as $, type AllHTMLElements as A, globalScopeDomApis as B, type CSSProperties as C, type DomAbstractionImpl as D, isJSX as E, type FontFaceProperties as F, type Globals as G, Fragment as H, jsxs as I, jsxDEV as J, type KeyFrameProperties as K, isRef as L, createRef as M, type NodeType as N, type PersistenceProviderType as O, type ParentElementInput as P, type PersistenceProviderOptions as Q, type RenderInput as R, type SyncRenderInput as S, type PersistenceProviderImpl as T, Call as U, type VAttributes as V, NonChainedReturnCallNames as W, CallChainImpl as X, CallChainImplThenable as Y, scrollHelper as Z, getAllFormValues as _, type RenderResult as a, dequery as a0, $ as a1, type Dequery as a2, isDequery as a3, isDequeryOptionsObject as a4, getDefaultDequeryOptions as a5, mapArrayIndexAccess as a6, createCall as a7, createGetterSetterCall as a8, createSubChain as a9, subChainForNextAwait as aa, runWithTimeGuard as ab, renderNode as ac, resolveNodes as ad, traverse as ae, type MiddlewareFn as af, type MemoryStorage as ag, type WebStorage as ah, type Listener as ai, type Store as aj, createStore as ak, type ParentElementInputAsync as b, type RefUpdateFn as c, type RefUpdateRenderFn as d, type Ref as e, type VNodeAttributes as f, type VNode as g, type VNodeType as h, type VNodeKey as i, type VNodeRefObject as j, type VNodeRefCallback as k, type VNodeRef as l, type VNodeChild as m, type VNodeChildren as n, type Children as o, type Props as p, type RenderNodeInput as q, type RenderResultNode as r, createInPlaceErrorMessageVNode as s, jsx as t, observeUnmount as u, handleLifecycleEventsForOnMount as v, getRenderer as w, type SyncRenderResult as x, renderIsomorphicSync as y, renderIsomorphicAsync as z };