voodoojs 0.4.6 → 0.6.0
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/{chunk-RJUNPXQF.js → chunk-4LR3IFPX.js} +2 -2
- package/dist/{chunk-4HQEOXTK.js → chunk-CNHNFTPC.js} +73 -69
- package/dist/{chunk-5CKGDARU.js → chunk-PHMBDPWH.js} +3 -3
- package/dist/essential.cjs +70 -66
- package/dist/essential.d.cts +1 -1
- package/dist/essential.d.ts +1 -1
- package/dist/essential.js +2 -2
- package/dist/gpu.cjs +18 -18
- package/dist/gpu.js +20 -20
- package/dist/index.cjs +273 -269
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +199 -199
- package/dist/{query-DQFRmu3u.d.ts → query-CC-_z7v0.d.ts} +33 -33
- package/dist/{query-CKJ4oSpG.d.cts → query-sEJXe_cO.d.cts} +33 -33
- package/dist/socket.d.cts +4 -4
- package/dist/socket.d.ts +4 -4
- package/dist/socket.js +3 -3
- package/dist/voodoo.core.js +39 -35
- package/dist/voodoo.core.min.js +15 -15
- package/dist/voodoo.full.js +268 -264
- package/dist/voodoo.full.min.js +74 -74
- package/dist/voodoo.js +71 -67
- package/dist/voodoo.min.js +22 -22
- package/package.json +1 -1
|
@@ -1046,86 +1046,86 @@ declare const core: {
|
|
|
1046
1046
|
http: {
|
|
1047
1047
|
defaults: HttpDefaults;
|
|
1048
1048
|
get<T = unknown>(url: string, options?: {
|
|
1049
|
-
responseType?: "auto" | "json" | "text" | "blob" | "arrayBuffer" | "formData" | undefined;
|
|
1050
|
-
headers?: Record<string, string> | undefined;
|
|
1051
|
-
credentials?: RequestCredentials | undefined;
|
|
1052
|
-
signal?: AbortSignal | undefined;
|
|
1053
1049
|
params?: Record<string, string | number | boolean | null | undefined> | undefined;
|
|
1050
|
+
headers?: Record<string, string> | undefined;
|
|
1054
1051
|
timeout?: number | undefined;
|
|
1055
1052
|
retry?: number | undefined;
|
|
1056
1053
|
retryDelay?: number | undefined;
|
|
1057
1054
|
retryUnsafe?: boolean | undefined;
|
|
1058
1055
|
cache?: number | undefined;
|
|
1056
|
+
signal?: AbortSignal | undefined;
|
|
1057
|
+
credentials?: RequestCredentials | undefined;
|
|
1058
|
+
responseType?: "auto" | "json" | "text" | "blob" | "arrayBuffer" | "formData" | undefined;
|
|
1059
1059
|
onProgress?: ((loaded: number, total: number) => void) | undefined;
|
|
1060
1060
|
offlineQueue?: boolean | undefined;
|
|
1061
1061
|
}): Promise<T>;
|
|
1062
1062
|
post<T = unknown>(url: string, body?: unknown, options?: {
|
|
1063
|
-
responseType?: "auto" | "json" | "text" | "blob" | "arrayBuffer" | "formData" | undefined;
|
|
1064
|
-
headers?: Record<string, string> | undefined;
|
|
1065
|
-
credentials?: RequestCredentials | undefined;
|
|
1066
|
-
signal?: AbortSignal | undefined;
|
|
1067
1063
|
params?: Record<string, string | number | boolean | null | undefined> | undefined;
|
|
1064
|
+
headers?: Record<string, string> | undefined;
|
|
1068
1065
|
timeout?: number | undefined;
|
|
1069
1066
|
retry?: number | undefined;
|
|
1070
1067
|
retryDelay?: number | undefined;
|
|
1071
1068
|
retryUnsafe?: boolean | undefined;
|
|
1072
1069
|
cache?: number | undefined;
|
|
1070
|
+
signal?: AbortSignal | undefined;
|
|
1071
|
+
credentials?: RequestCredentials | undefined;
|
|
1072
|
+
responseType?: "auto" | "json" | "text" | "blob" | "arrayBuffer" | "formData" | undefined;
|
|
1073
1073
|
onProgress?: ((loaded: number, total: number) => void) | undefined;
|
|
1074
1074
|
offlineQueue?: boolean | undefined;
|
|
1075
1075
|
}): Promise<T>;
|
|
1076
1076
|
put<T = unknown>(url: string, body?: unknown, options?: {
|
|
1077
|
-
responseType?: "auto" | "json" | "text" | "blob" | "arrayBuffer" | "formData" | undefined;
|
|
1078
|
-
headers?: Record<string, string> | undefined;
|
|
1079
|
-
credentials?: RequestCredentials | undefined;
|
|
1080
|
-
signal?: AbortSignal | undefined;
|
|
1081
1077
|
params?: Record<string, string | number | boolean | null | undefined> | undefined;
|
|
1078
|
+
headers?: Record<string, string> | undefined;
|
|
1082
1079
|
timeout?: number | undefined;
|
|
1083
1080
|
retry?: number | undefined;
|
|
1084
1081
|
retryDelay?: number | undefined;
|
|
1085
1082
|
retryUnsafe?: boolean | undefined;
|
|
1086
1083
|
cache?: number | undefined;
|
|
1084
|
+
signal?: AbortSignal | undefined;
|
|
1085
|
+
credentials?: RequestCredentials | undefined;
|
|
1086
|
+
responseType?: "auto" | "json" | "text" | "blob" | "arrayBuffer" | "formData" | undefined;
|
|
1087
1087
|
onProgress?: ((loaded: number, total: number) => void) | undefined;
|
|
1088
1088
|
offlineQueue?: boolean | undefined;
|
|
1089
1089
|
}): Promise<T>;
|
|
1090
1090
|
patch<T = unknown>(url: string, body?: unknown, options?: {
|
|
1091
|
-
responseType?: "auto" | "json" | "text" | "blob" | "arrayBuffer" | "formData" | undefined;
|
|
1092
|
-
headers?: Record<string, string> | undefined;
|
|
1093
|
-
credentials?: RequestCredentials | undefined;
|
|
1094
|
-
signal?: AbortSignal | undefined;
|
|
1095
1091
|
params?: Record<string, string | number | boolean | null | undefined> | undefined;
|
|
1092
|
+
headers?: Record<string, string> | undefined;
|
|
1096
1093
|
timeout?: number | undefined;
|
|
1097
1094
|
retry?: number | undefined;
|
|
1098
1095
|
retryDelay?: number | undefined;
|
|
1099
1096
|
retryUnsafe?: boolean | undefined;
|
|
1100
1097
|
cache?: number | undefined;
|
|
1098
|
+
signal?: AbortSignal | undefined;
|
|
1099
|
+
credentials?: RequestCredentials | undefined;
|
|
1100
|
+
responseType?: "auto" | "json" | "text" | "blob" | "arrayBuffer" | "formData" | undefined;
|
|
1101
1101
|
onProgress?: ((loaded: number, total: number) => void) | undefined;
|
|
1102
1102
|
offlineQueue?: boolean | undefined;
|
|
1103
1103
|
}): Promise<T>;
|
|
1104
1104
|
delete<T = unknown>(url: string, options?: {
|
|
1105
|
-
responseType?: "auto" | "json" | "text" | "blob" | "arrayBuffer" | "formData" | undefined;
|
|
1106
|
-
headers?: Record<string, string> | undefined;
|
|
1107
|
-
credentials?: RequestCredentials | undefined;
|
|
1108
|
-
signal?: AbortSignal | undefined;
|
|
1109
1105
|
params?: Record<string, string | number | boolean | null | undefined> | undefined;
|
|
1106
|
+
headers?: Record<string, string> | undefined;
|
|
1110
1107
|
timeout?: number | undefined;
|
|
1111
1108
|
retry?: number | undefined;
|
|
1112
1109
|
retryDelay?: number | undefined;
|
|
1113
1110
|
retryUnsafe?: boolean | undefined;
|
|
1114
1111
|
cache?: number | undefined;
|
|
1112
|
+
signal?: AbortSignal | undefined;
|
|
1113
|
+
credentials?: RequestCredentials | undefined;
|
|
1114
|
+
responseType?: "auto" | "json" | "text" | "blob" | "arrayBuffer" | "formData" | undefined;
|
|
1115
1115
|
onProgress?: ((loaded: number, total: number) => void) | undefined;
|
|
1116
1116
|
offlineQueue?: boolean | undefined;
|
|
1117
1117
|
}): Promise<T>;
|
|
1118
1118
|
head(url: string, options?: {
|
|
1119
|
-
responseType?: "auto" | "json" | "text" | "blob" | "arrayBuffer" | "formData" | undefined;
|
|
1120
|
-
headers?: Record<string, string> | undefined;
|
|
1121
|
-
credentials?: RequestCredentials | undefined;
|
|
1122
|
-
signal?: AbortSignal | undefined;
|
|
1123
1119
|
params?: Record<string, string | number | boolean | null | undefined> | undefined;
|
|
1120
|
+
headers?: Record<string, string> | undefined;
|
|
1124
1121
|
timeout?: number | undefined;
|
|
1125
1122
|
retry?: number | undefined;
|
|
1126
1123
|
retryDelay?: number | undefined;
|
|
1127
1124
|
retryUnsafe?: boolean | undefined;
|
|
1128
1125
|
cache?: number | undefined;
|
|
1126
|
+
signal?: AbortSignal | undefined;
|
|
1127
|
+
credentials?: RequestCredentials | undefined;
|
|
1128
|
+
responseType?: "auto" | "json" | "text" | "blob" | "arrayBuffer" | "formData" | undefined;
|
|
1129
1129
|
onProgress?: ((loaded: number, total: number) => void) | undefined;
|
|
1130
1130
|
offlineQueue?: boolean | undefined;
|
|
1131
1131
|
}): Promise<unknown>;
|
|
@@ -1141,16 +1141,16 @@ declare const core: {
|
|
|
1141
1141
|
error?: (e: Event) => void;
|
|
1142
1142
|
}): EventSource;
|
|
1143
1143
|
stream(url: string, onLine: (line: string) => void, options?: {
|
|
1144
|
-
responseType?: "auto" | "json" | "text" | "blob" | "arrayBuffer" | "formData" | undefined;
|
|
1145
|
-
headers?: Record<string, string> | undefined;
|
|
1146
|
-
credentials?: RequestCredentials | undefined;
|
|
1147
|
-
signal?: AbortSignal | undefined;
|
|
1148
1144
|
params?: Record<string, string | number | boolean | null | undefined> | undefined;
|
|
1145
|
+
headers?: Record<string, string> | undefined;
|
|
1149
1146
|
timeout?: number | undefined;
|
|
1150
1147
|
retry?: number | undefined;
|
|
1151
1148
|
retryDelay?: number | undefined;
|
|
1152
1149
|
retryUnsafe?: boolean | undefined;
|
|
1153
1150
|
cache?: number | undefined;
|
|
1151
|
+
signal?: AbortSignal | undefined;
|
|
1152
|
+
credentials?: RequestCredentials | undefined;
|
|
1153
|
+
responseType?: "auto" | "json" | "text" | "blob" | "arrayBuffer" | "formData" | undefined;
|
|
1154
1154
|
onProgress?: ((loaded: number, total: number) => void) | undefined;
|
|
1155
1155
|
offlineQueue?: boolean | undefined;
|
|
1156
1156
|
}): Promise<void>;
|
|
@@ -1342,8 +1342,8 @@ declare const core: {
|
|
|
1342
1342
|
*
|
|
1343
1343
|
* ```js
|
|
1344
1344
|
* V.query('.card')
|
|
1345
|
-
* .addClass('
|
|
1346
|
-
* .on('click', '.
|
|
1345
|
+
* .addClass('active')
|
|
1346
|
+
* .on('click', '.button', function () { V.query(this).closest('.card').remove() })
|
|
1347
1347
|
* ```
|
|
1348
1348
|
*/
|
|
1349
1349
|
/** Function executed when the document becomes ready. */
|
|
@@ -1566,10 +1566,10 @@ declare class VoodooCollection implements Iterable<HTMLElement> {
|
|
|
1566
1566
|
* HTML string, or function.
|
|
1567
1567
|
*
|
|
1568
1568
|
* ```js
|
|
1569
|
-
* V.query('#
|
|
1569
|
+
* V.query('#list li') // selector
|
|
1570
1570
|
* V.query(document.body) // element
|
|
1571
|
-
* V.query('<li>
|
|
1572
|
-
* V.query(() =>
|
|
1571
|
+
* V.query('<li>new</li>') // creates elements
|
|
1572
|
+
* V.query(() => start()) // equivalent to V.ready
|
|
1573
1573
|
* ```
|
|
1574
1574
|
*
|
|
1575
1575
|
* @param input selector, node, list, HTML or initialization function
|
|
@@ -1046,86 +1046,86 @@ declare const core: {
|
|
|
1046
1046
|
http: {
|
|
1047
1047
|
defaults: HttpDefaults;
|
|
1048
1048
|
get<T = unknown>(url: string, options?: {
|
|
1049
|
-
responseType?: "auto" | "json" | "text" | "blob" | "arrayBuffer" | "formData" | undefined;
|
|
1050
|
-
headers?: Record<string, string> | undefined;
|
|
1051
|
-
credentials?: RequestCredentials | undefined;
|
|
1052
|
-
signal?: AbortSignal | undefined;
|
|
1053
1049
|
params?: Record<string, string | number | boolean | null | undefined> | undefined;
|
|
1050
|
+
headers?: Record<string, string> | undefined;
|
|
1054
1051
|
timeout?: number | undefined;
|
|
1055
1052
|
retry?: number | undefined;
|
|
1056
1053
|
retryDelay?: number | undefined;
|
|
1057
1054
|
retryUnsafe?: boolean | undefined;
|
|
1058
1055
|
cache?: number | undefined;
|
|
1056
|
+
signal?: AbortSignal | undefined;
|
|
1057
|
+
credentials?: RequestCredentials | undefined;
|
|
1058
|
+
responseType?: "auto" | "json" | "text" | "blob" | "arrayBuffer" | "formData" | undefined;
|
|
1059
1059
|
onProgress?: ((loaded: number, total: number) => void) | undefined;
|
|
1060
1060
|
offlineQueue?: boolean | undefined;
|
|
1061
1061
|
}): Promise<T>;
|
|
1062
1062
|
post<T = unknown>(url: string, body?: unknown, options?: {
|
|
1063
|
-
responseType?: "auto" | "json" | "text" | "blob" | "arrayBuffer" | "formData" | undefined;
|
|
1064
|
-
headers?: Record<string, string> | undefined;
|
|
1065
|
-
credentials?: RequestCredentials | undefined;
|
|
1066
|
-
signal?: AbortSignal | undefined;
|
|
1067
1063
|
params?: Record<string, string | number | boolean | null | undefined> | undefined;
|
|
1064
|
+
headers?: Record<string, string> | undefined;
|
|
1068
1065
|
timeout?: number | undefined;
|
|
1069
1066
|
retry?: number | undefined;
|
|
1070
1067
|
retryDelay?: number | undefined;
|
|
1071
1068
|
retryUnsafe?: boolean | undefined;
|
|
1072
1069
|
cache?: number | undefined;
|
|
1070
|
+
signal?: AbortSignal | undefined;
|
|
1071
|
+
credentials?: RequestCredentials | undefined;
|
|
1072
|
+
responseType?: "auto" | "json" | "text" | "blob" | "arrayBuffer" | "formData" | undefined;
|
|
1073
1073
|
onProgress?: ((loaded: number, total: number) => void) | undefined;
|
|
1074
1074
|
offlineQueue?: boolean | undefined;
|
|
1075
1075
|
}): Promise<T>;
|
|
1076
1076
|
put<T = unknown>(url: string, body?: unknown, options?: {
|
|
1077
|
-
responseType?: "auto" | "json" | "text" | "blob" | "arrayBuffer" | "formData" | undefined;
|
|
1078
|
-
headers?: Record<string, string> | undefined;
|
|
1079
|
-
credentials?: RequestCredentials | undefined;
|
|
1080
|
-
signal?: AbortSignal | undefined;
|
|
1081
1077
|
params?: Record<string, string | number | boolean | null | undefined> | undefined;
|
|
1078
|
+
headers?: Record<string, string> | undefined;
|
|
1082
1079
|
timeout?: number | undefined;
|
|
1083
1080
|
retry?: number | undefined;
|
|
1084
1081
|
retryDelay?: number | undefined;
|
|
1085
1082
|
retryUnsafe?: boolean | undefined;
|
|
1086
1083
|
cache?: number | undefined;
|
|
1084
|
+
signal?: AbortSignal | undefined;
|
|
1085
|
+
credentials?: RequestCredentials | undefined;
|
|
1086
|
+
responseType?: "auto" | "json" | "text" | "blob" | "arrayBuffer" | "formData" | undefined;
|
|
1087
1087
|
onProgress?: ((loaded: number, total: number) => void) | undefined;
|
|
1088
1088
|
offlineQueue?: boolean | undefined;
|
|
1089
1089
|
}): Promise<T>;
|
|
1090
1090
|
patch<T = unknown>(url: string, body?: unknown, options?: {
|
|
1091
|
-
responseType?: "auto" | "json" | "text" | "blob" | "arrayBuffer" | "formData" | undefined;
|
|
1092
|
-
headers?: Record<string, string> | undefined;
|
|
1093
|
-
credentials?: RequestCredentials | undefined;
|
|
1094
|
-
signal?: AbortSignal | undefined;
|
|
1095
1091
|
params?: Record<string, string | number | boolean | null | undefined> | undefined;
|
|
1092
|
+
headers?: Record<string, string> | undefined;
|
|
1096
1093
|
timeout?: number | undefined;
|
|
1097
1094
|
retry?: number | undefined;
|
|
1098
1095
|
retryDelay?: number | undefined;
|
|
1099
1096
|
retryUnsafe?: boolean | undefined;
|
|
1100
1097
|
cache?: number | undefined;
|
|
1098
|
+
signal?: AbortSignal | undefined;
|
|
1099
|
+
credentials?: RequestCredentials | undefined;
|
|
1100
|
+
responseType?: "auto" | "json" | "text" | "blob" | "arrayBuffer" | "formData" | undefined;
|
|
1101
1101
|
onProgress?: ((loaded: number, total: number) => void) | undefined;
|
|
1102
1102
|
offlineQueue?: boolean | undefined;
|
|
1103
1103
|
}): Promise<T>;
|
|
1104
1104
|
delete<T = unknown>(url: string, options?: {
|
|
1105
|
-
responseType?: "auto" | "json" | "text" | "blob" | "arrayBuffer" | "formData" | undefined;
|
|
1106
|
-
headers?: Record<string, string> | undefined;
|
|
1107
|
-
credentials?: RequestCredentials | undefined;
|
|
1108
|
-
signal?: AbortSignal | undefined;
|
|
1109
1105
|
params?: Record<string, string | number | boolean | null | undefined> | undefined;
|
|
1106
|
+
headers?: Record<string, string> | undefined;
|
|
1110
1107
|
timeout?: number | undefined;
|
|
1111
1108
|
retry?: number | undefined;
|
|
1112
1109
|
retryDelay?: number | undefined;
|
|
1113
1110
|
retryUnsafe?: boolean | undefined;
|
|
1114
1111
|
cache?: number | undefined;
|
|
1112
|
+
signal?: AbortSignal | undefined;
|
|
1113
|
+
credentials?: RequestCredentials | undefined;
|
|
1114
|
+
responseType?: "auto" | "json" | "text" | "blob" | "arrayBuffer" | "formData" | undefined;
|
|
1115
1115
|
onProgress?: ((loaded: number, total: number) => void) | undefined;
|
|
1116
1116
|
offlineQueue?: boolean | undefined;
|
|
1117
1117
|
}): Promise<T>;
|
|
1118
1118
|
head(url: string, options?: {
|
|
1119
|
-
responseType?: "auto" | "json" | "text" | "blob" | "arrayBuffer" | "formData" | undefined;
|
|
1120
|
-
headers?: Record<string, string> | undefined;
|
|
1121
|
-
credentials?: RequestCredentials | undefined;
|
|
1122
|
-
signal?: AbortSignal | undefined;
|
|
1123
1119
|
params?: Record<string, string | number | boolean | null | undefined> | undefined;
|
|
1120
|
+
headers?: Record<string, string> | undefined;
|
|
1124
1121
|
timeout?: number | undefined;
|
|
1125
1122
|
retry?: number | undefined;
|
|
1126
1123
|
retryDelay?: number | undefined;
|
|
1127
1124
|
retryUnsafe?: boolean | undefined;
|
|
1128
1125
|
cache?: number | undefined;
|
|
1126
|
+
signal?: AbortSignal | undefined;
|
|
1127
|
+
credentials?: RequestCredentials | undefined;
|
|
1128
|
+
responseType?: "auto" | "json" | "text" | "blob" | "arrayBuffer" | "formData" | undefined;
|
|
1129
1129
|
onProgress?: ((loaded: number, total: number) => void) | undefined;
|
|
1130
1130
|
offlineQueue?: boolean | undefined;
|
|
1131
1131
|
}): Promise<unknown>;
|
|
@@ -1141,16 +1141,16 @@ declare const core: {
|
|
|
1141
1141
|
error?: (e: Event) => void;
|
|
1142
1142
|
}): EventSource;
|
|
1143
1143
|
stream(url: string, onLine: (line: string) => void, options?: {
|
|
1144
|
-
responseType?: "auto" | "json" | "text" | "blob" | "arrayBuffer" | "formData" | undefined;
|
|
1145
|
-
headers?: Record<string, string> | undefined;
|
|
1146
|
-
credentials?: RequestCredentials | undefined;
|
|
1147
|
-
signal?: AbortSignal | undefined;
|
|
1148
1144
|
params?: Record<string, string | number | boolean | null | undefined> | undefined;
|
|
1145
|
+
headers?: Record<string, string> | undefined;
|
|
1149
1146
|
timeout?: number | undefined;
|
|
1150
1147
|
retry?: number | undefined;
|
|
1151
1148
|
retryDelay?: number | undefined;
|
|
1152
1149
|
retryUnsafe?: boolean | undefined;
|
|
1153
1150
|
cache?: number | undefined;
|
|
1151
|
+
signal?: AbortSignal | undefined;
|
|
1152
|
+
credentials?: RequestCredentials | undefined;
|
|
1153
|
+
responseType?: "auto" | "json" | "text" | "blob" | "arrayBuffer" | "formData" | undefined;
|
|
1154
1154
|
onProgress?: ((loaded: number, total: number) => void) | undefined;
|
|
1155
1155
|
offlineQueue?: boolean | undefined;
|
|
1156
1156
|
}): Promise<void>;
|
|
@@ -1342,8 +1342,8 @@ declare const core: {
|
|
|
1342
1342
|
*
|
|
1343
1343
|
* ```js
|
|
1344
1344
|
* V.query('.card')
|
|
1345
|
-
* .addClass('
|
|
1346
|
-
* .on('click', '.
|
|
1345
|
+
* .addClass('active')
|
|
1346
|
+
* .on('click', '.button', function () { V.query(this).closest('.card').remove() })
|
|
1347
1347
|
* ```
|
|
1348
1348
|
*/
|
|
1349
1349
|
/** Function executed when the document becomes ready. */
|
|
@@ -1566,10 +1566,10 @@ declare class VoodooCollection implements Iterable<HTMLElement> {
|
|
|
1566
1566
|
* HTML string, or function.
|
|
1567
1567
|
*
|
|
1568
1568
|
* ```js
|
|
1569
|
-
* V.query('#
|
|
1569
|
+
* V.query('#list li') // selector
|
|
1570
1570
|
* V.query(document.body) // element
|
|
1571
|
-
* V.query('<li>
|
|
1572
|
-
* V.query(() =>
|
|
1571
|
+
* V.query('<li>new</li>') // creates elements
|
|
1572
|
+
* V.query(() => start()) // equivalent to V.ready
|
|
1573
1573
|
* ```
|
|
1574
1574
|
*
|
|
1575
1575
|
* @param input selector, node, list, HTML or initialization function
|
package/dist/socket.d.cts
CHANGED
|
@@ -18,8 +18,8 @@ export { R as RoomOptions, a as RoomState, h as Socket, i as SocketDefaults, j a
|
|
|
18
18
|
* 2 server ping
|
|
19
19
|
* 3 client pong
|
|
20
20
|
* 40 enter namespace
|
|
21
|
-
* 42["
|
|
22
|
-
* 421["
|
|
21
|
+
* 42["message",{"text":"hi"}] event
|
|
22
|
+
* 421["save",{...}] event requesting ack 1
|
|
23
23
|
* 431[{"ok":true}] ack 1 response
|
|
24
24
|
* ```
|
|
25
25
|
*
|
|
@@ -31,7 +31,7 @@ export { R as RoomOptions, a as RoomState, h as Socket, i as SocketDefaults, j a
|
|
|
31
31
|
* short list is: binary attachments (`45`/`46`), polling transport and upgrade,
|
|
32
32
|
* and namespaces other than `/`.
|
|
33
33
|
*/
|
|
34
|
-
/**
|
|
34
|
+
/** Engine.IO v4 packet codes. */
|
|
35
35
|
declare const ENGINE: {
|
|
36
36
|
readonly OPEN: "0";
|
|
37
37
|
readonly CLOSE: "1";
|
|
@@ -41,7 +41,7 @@ declare const ENGINE: {
|
|
|
41
41
|
readonly UPGRADE: "5";
|
|
42
42
|
readonly NOOP: "6";
|
|
43
43
|
};
|
|
44
|
-
/**
|
|
44
|
+
/** Socket.IO v5 packet types (v4 server protocol). */
|
|
45
45
|
declare const SIO: {
|
|
46
46
|
readonly CONNECT: 0;
|
|
47
47
|
readonly DISCONNECT: 1;
|
package/dist/socket.d.ts
CHANGED
|
@@ -18,8 +18,8 @@ export { R as RoomOptions, a as RoomState, h as Socket, i as SocketDefaults, j a
|
|
|
18
18
|
* 2 server ping
|
|
19
19
|
* 3 client pong
|
|
20
20
|
* 40 enter namespace
|
|
21
|
-
* 42["
|
|
22
|
-
* 421["
|
|
21
|
+
* 42["message",{"text":"hi"}] event
|
|
22
|
+
* 421["save",{...}] event requesting ack 1
|
|
23
23
|
* 431[{"ok":true}] ack 1 response
|
|
24
24
|
* ```
|
|
25
25
|
*
|
|
@@ -31,7 +31,7 @@ export { R as RoomOptions, a as RoomState, h as Socket, i as SocketDefaults, j a
|
|
|
31
31
|
* short list is: binary attachments (`45`/`46`), polling transport and upgrade,
|
|
32
32
|
* and namespaces other than `/`.
|
|
33
33
|
*/
|
|
34
|
-
/**
|
|
34
|
+
/** Engine.IO v4 packet codes. */
|
|
35
35
|
declare const ENGINE: {
|
|
36
36
|
readonly OPEN: "0";
|
|
37
37
|
readonly CLOSE: "1";
|
|
@@ -41,7 +41,7 @@ declare const ENGINE: {
|
|
|
41
41
|
readonly UPGRADE: "5";
|
|
42
42
|
readonly NOOP: "6";
|
|
43
43
|
};
|
|
44
|
-
/**
|
|
44
|
+
/** Socket.IO v5 packet types (v4 server protocol). */
|
|
45
45
|
declare const SIO: {
|
|
46
46
|
readonly CONNECT: 0;
|
|
47
47
|
readonly DISCONNECT: 1;
|
package/dist/socket.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { socketSupported, createSocket, socket } from './chunk-
|
|
2
|
-
export { ENGINE, SIO, createSocket, decodeEngine, decodeSocketIo, encodeSocketIo, engineURL, resolveSocketURL, socket, socketSupported } from './chunk-
|
|
3
|
-
import { evaluateIn, readAttr } from './chunk-
|
|
1
|
+
import { socketSupported, createSocket, socket } from './chunk-4LR3IFPX.js';
|
|
2
|
+
export { ENGINE, SIO, createSocket, decodeEngine, decodeSocketIo, encodeSocketIo, engineURL, resolveSocketURL, socket, socketSupported } from './chunk-4LR3IFPX.js';
|
|
3
|
+
import { evaluateIn, readAttr } from './chunk-PHMBDPWH.js';
|
|
4
4
|
import { reactive } from './chunk-NNU6WOOU.js';
|
|
5
5
|
import { warnAlias } from './chunk-A2UOVQBP.js';
|
|
6
6
|
import { parseDuration } from './chunk-234ZLC6W.js';
|
package/dist/voodoo.core.js
CHANGED
|
@@ -3332,7 +3332,7 @@ Suggestion: attribute expressions accept a single value. If the logic spans more
|
|
|
3332
3332
|
// src/store/index.ts
|
|
3333
3333
|
init_reactivity();
|
|
3334
3334
|
var stores = /* @__PURE__ */ new Map();
|
|
3335
|
-
var
|
|
3335
|
+
var version = ref(0);
|
|
3336
3336
|
var persistHandles = /* @__PURE__ */ new Map();
|
|
3337
3337
|
function store(name, definition, options = {}) {
|
|
3338
3338
|
const existing = stores.get(name);
|
|
@@ -3349,30 +3349,30 @@ Suggestion: attribute expressions accept a single value. If the logic spans more
|
|
|
3349
3349
|
return existing;
|
|
3350
3350
|
}
|
|
3351
3351
|
const key = typeof options.persist === "string" ? options.persist : `voodoo:store:${name}`;
|
|
3352
|
-
const
|
|
3353
|
-
const initial = Object.defineProperties({},
|
|
3352
|
+
const descriptors = Object.getOwnPropertyDescriptors(definition);
|
|
3353
|
+
const initial = Object.defineProperties({}, descriptors);
|
|
3354
3354
|
if (options.persist && typeof localStorage !== "undefined") {
|
|
3355
3355
|
try {
|
|
3356
3356
|
const saved = localStorage.getItem(key);
|
|
3357
3357
|
if (saved) {
|
|
3358
|
-
const
|
|
3359
|
-
for (const [
|
|
3360
|
-
if (
|
|
3361
|
-
initial[
|
|
3358
|
+
const parsed = JSON.parse(saved);
|
|
3359
|
+
for (const [field, value] of Object.entries(parsed)) {
|
|
3360
|
+
if (descriptors[field] && !("value" in descriptors[field])) continue;
|
|
3361
|
+
initial[field] = value;
|
|
3362
3362
|
}
|
|
3363
3363
|
}
|
|
3364
3364
|
} catch (e) {
|
|
3365
3365
|
}
|
|
3366
3366
|
}
|
|
3367
3367
|
const created = reactive(initial);
|
|
3368
|
-
for (const [prop,
|
|
3369
|
-
const value =
|
|
3368
|
+
for (const [prop, descriptor] of Object.entries(descriptors)) {
|
|
3369
|
+
const value = descriptor.value;
|
|
3370
3370
|
if (typeof value === "function") {
|
|
3371
3371
|
created[prop] = (...args) => value.apply(created, args);
|
|
3372
3372
|
}
|
|
3373
3373
|
}
|
|
3374
3374
|
stores.set(name, created);
|
|
3375
|
-
|
|
3375
|
+
version.value++;
|
|
3376
3376
|
if (options.persist && typeof localStorage !== "undefined") {
|
|
3377
3377
|
const stop2 = watch(
|
|
3378
3378
|
created,
|
|
@@ -3390,10 +3390,10 @@ Suggestion: attribute expressions accept a single value. If the logic spans more
|
|
|
3390
3390
|
}
|
|
3391
3391
|
function stripFunctions(source) {
|
|
3392
3392
|
const out = {};
|
|
3393
|
-
const
|
|
3393
|
+
const descriptors = Object.getOwnPropertyDescriptors(toRaw(source));
|
|
3394
3394
|
for (const [key, value] of Object.entries(source)) {
|
|
3395
3395
|
if (typeof value === "function") continue;
|
|
3396
|
-
if (
|
|
3396
|
+
if (descriptors[key] && !("value" in descriptors[key])) continue;
|
|
3397
3397
|
out[key] = value;
|
|
3398
3398
|
}
|
|
3399
3399
|
return out;
|
|
@@ -3402,11 +3402,11 @@ Suggestion: attribute expressions accept a single value. If the logic spans more
|
|
|
3402
3402
|
{},
|
|
3403
3403
|
{
|
|
3404
3404
|
get: (_t, key) => {
|
|
3405
|
-
void
|
|
3405
|
+
void version.value;
|
|
3406
3406
|
return stores.get(key);
|
|
3407
3407
|
},
|
|
3408
3408
|
has: (_t, key) => {
|
|
3409
|
-
void
|
|
3409
|
+
void version.value;
|
|
3410
3410
|
return stores.has(key);
|
|
3411
3411
|
},
|
|
3412
3412
|
ownKeys: () => [...stores.keys()],
|
|
@@ -4349,6 +4349,7 @@ Suggestion: attribute expressions accept a single value. If the logic spans more
|
|
|
4349
4349
|
element.setAttribute("data-type", type);
|
|
4350
4350
|
element.setAttribute("role", type === "error" ? "alert" : "status");
|
|
4351
4351
|
element.setAttribute("aria-live", type === "error" ? "assertive" : "polite");
|
|
4352
|
+
element.setAttribute("aria-atomic", "true");
|
|
4352
4353
|
let closed = false;
|
|
4353
4354
|
let timer = null;
|
|
4354
4355
|
const close = () => {
|
|
@@ -4680,11 +4681,12 @@ Suggestion: attribute expressions accept a single value. If the logic spans more
|
|
|
4680
4681
|
}
|
|
4681
4682
|
};
|
|
4682
4683
|
var THEME_KEY = "voodoo:theme";
|
|
4684
|
+
var picked = null;
|
|
4683
4685
|
var theme = {
|
|
4684
4686
|
/** Theme chosen by the user, or `system` when never set. */
|
|
4685
4687
|
get current() {
|
|
4686
|
-
var _a2;
|
|
4687
|
-
return (_a2 = storage.get(THEME_KEY)) != null ? _a2 : "system";
|
|
4688
|
+
var _a2, _b;
|
|
4689
|
+
return (_b = (_a2 = storage.get(THEME_KEY)) != null ? _a2 : picked) != null ? _b : "system";
|
|
4688
4690
|
},
|
|
4689
4691
|
/** Theme effectively applied, resolving `system`. */
|
|
4690
4692
|
get resolved() {
|
|
@@ -4694,6 +4696,7 @@ Suggestion: attribute expressions accept a single value. If the logic spans more
|
|
|
4694
4696
|
return matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
4695
4697
|
},
|
|
4696
4698
|
set(value) {
|
|
4699
|
+
picked = value;
|
|
4697
4700
|
storage.set(THEME_KEY, value);
|
|
4698
4701
|
this.apply();
|
|
4699
4702
|
},
|
|
@@ -4704,7 +4707,7 @@ Suggestion: attribute expressions accept a single value. If the logic spans more
|
|
|
4704
4707
|
},
|
|
4705
4708
|
/** `true` once the visitor has actually picked a theme. */
|
|
4706
4709
|
get chosen() {
|
|
4707
|
-
return storage.get(THEME_KEY) != null;
|
|
4710
|
+
return picked !== null || storage.get(THEME_KEY) != null;
|
|
4708
4711
|
},
|
|
4709
4712
|
/** Writes `data-theme` on the root element and notifies the page. */
|
|
4710
4713
|
apply() {
|
|
@@ -4728,7 +4731,8 @@ Suggestion: attribute expressions accept a single value. If the logic spans more
|
|
|
4728
4731
|
init() {
|
|
4729
4732
|
if (typeof document === "undefined") return;
|
|
4730
4733
|
this.apply();
|
|
4731
|
-
|
|
4734
|
+
if (typeof matchMedia === "undefined") return;
|
|
4735
|
+
matchMedia("(prefers-color-scheme: dark)").addEventListener("change", () => {
|
|
4732
4736
|
if (this.current === "system") this.apply();
|
|
4733
4737
|
});
|
|
4734
4738
|
}
|
|
@@ -5178,8 +5182,8 @@ Suggestion: attribute expressions accept a single value. If the logic spans more
|
|
|
5178
5182
|
defineDirective("text", ({ el, effect: effect2, evaluate: ev }) => {
|
|
5179
5183
|
effect2(() => {
|
|
5180
5184
|
el.textContent = stringify(ev());
|
|
5181
|
-
const
|
|
5182
|
-
if (
|
|
5185
|
+
const first = el.firstChild;
|
|
5186
|
+
if (first && first.nodeType === 3) markInitialized(first);
|
|
5183
5187
|
});
|
|
5184
5188
|
});
|
|
5185
5189
|
defineDirective("html", (ctx) => {
|
|
@@ -5385,10 +5389,10 @@ Suggestion: attribute expressions accept a single value. If the logic spans more
|
|
|
5385
5389
|
next.push({ key, scope: childScope, nodes, data: childScope.data });
|
|
5386
5390
|
});
|
|
5387
5391
|
if (batch.fragment.firstChild) (_a3 = anchor.parentNode) == null ? void 0 : _a3.insertBefore(batch.fragment, anchor);
|
|
5388
|
-
for (const [node,
|
|
5389
|
-
const
|
|
5392
|
+
for (const [node, rowScope] of batch.pending) walk(node, rowScope);
|
|
5393
|
+
const reused = new Set(next);
|
|
5390
5394
|
for (const block2 of blocks) {
|
|
5391
|
-
if (used.has(block2.key) &&
|
|
5395
|
+
if (used.has(block2.key) && reused.has(block2)) continue;
|
|
5392
5396
|
for (const node of block2.nodes) {
|
|
5393
5397
|
destroy(node);
|
|
5394
5398
|
node.remove();
|
|
@@ -5458,7 +5462,7 @@ Suggestion: attribute expressions accept a single value. If the logic spans more
|
|
|
5458
5462
|
"novalidate",
|
|
5459
5463
|
"inert"
|
|
5460
5464
|
]);
|
|
5461
|
-
var
|
|
5465
|
+
var URL_ATTRIBUTES = /* @__PURE__ */ new Set([
|
|
5462
5466
|
"href",
|
|
5463
5467
|
"src",
|
|
5464
5468
|
"action",
|
|
@@ -5467,15 +5471,15 @@ Suggestion: attribute expressions accept a single value. If the logic spans more
|
|
|
5467
5471
|
"ping",
|
|
5468
5472
|
"poster"
|
|
5469
5473
|
]);
|
|
5470
|
-
var
|
|
5471
|
-
function
|
|
5472
|
-
const
|
|
5473
|
-
return
|
|
5474
|
+
var SCHEME_NOISE = /[\s\x00-\x1f]/g;
|
|
5475
|
+
function isDangerousUrl(value) {
|
|
5476
|
+
const clean = value.replace(SCHEME_NOISE, "").toLowerCase();
|
|
5477
|
+
return clean.startsWith("javascript:") || clean.startsWith("vbscript:") || clean.startsWith("data:text/html") || clean.startsWith("data:application/xhtml");
|
|
5474
5478
|
}
|
|
5475
|
-
function applyBinding(el, name, value, asProp = false,
|
|
5479
|
+
function applyBinding(el, name, value, asProp = false, allowDangerous = false) {
|
|
5476
5480
|
if (name === "class") return applyClass(el, value);
|
|
5477
5481
|
if (name === "style") return applyStyle(el, value);
|
|
5478
|
-
if (config.sanitizeUrls && !
|
|
5482
|
+
if (config.sanitizeUrls && !allowDangerous && name === "srcdoc") {
|
|
5479
5483
|
warn2(
|
|
5480
5484
|
`:srcdoc refused in ${describeElement(el)}: the value becomes a document with active script inside the iframe, the same way v-html becomes markup. If the content is trusted, write :srcdoc.dangerous="..."; to turn off this protection on the entire application, set V.config.sanitizeUrls = false.`
|
|
5481
5485
|
);
|
|
@@ -5483,7 +5487,7 @@ Suggestion: attribute expressions accept a single value. If the logic spans more
|
|
|
5483
5487
|
return;
|
|
5484
5488
|
}
|
|
5485
5489
|
if (config.sanitizeUrls && !asProp) {
|
|
5486
|
-
if (
|
|
5490
|
+
if (URL_ATTRIBUTES.has(name) && typeof value === "string" && isDangerousUrl(value)) {
|
|
5487
5491
|
warn2(
|
|
5488
5492
|
`value refused in :${name} of ${describeElement(el)}: "${value.slice(0, 60)}" uses a scheme that executes code. Use an http(s) or relative address. To turn off this protection, set V.config.sanitizeUrls = false.`
|
|
5489
5493
|
);
|
|
@@ -5580,9 +5584,9 @@ Suggestion: attribute expressions accept a single value. If the logic spans more
|
|
|
5580
5584
|
}
|
|
5581
5585
|
if (arg === "key") return;
|
|
5582
5586
|
const asProp = !!modifiers.prop;
|
|
5583
|
-
const
|
|
5587
|
+
const allowDangerous = !!modifiers.dangerous;
|
|
5584
5588
|
effect2(() => {
|
|
5585
|
-
applyBinding(el, arg, ev(), asProp,
|
|
5589
|
+
applyBinding(el, arg, ev(), asProp, allowDangerous);
|
|
5586
5590
|
});
|
|
5587
5591
|
void expression;
|
|
5588
5592
|
},
|
|
@@ -6562,11 +6566,11 @@ Suggestion: attribute expressions accept a single value. If the logic spans more
|
|
|
6562
6566
|
Object.defineProperties(rootScope.data, Object.getOwnPropertyDescriptors(values));
|
|
6563
6567
|
return rootScope.data;
|
|
6564
6568
|
}
|
|
6565
|
-
var
|
|
6569
|
+
var version2 = "0.4.6";
|
|
6566
6570
|
var core = {
|
|
6567
6571
|
// Utilities first: Voodoo's own names can override.
|
|
6568
6572
|
...utils_exports,
|
|
6569
|
-
version,
|
|
6573
|
+
version: version2,
|
|
6570
6574
|
config,
|
|
6571
6575
|
// Reactivity
|
|
6572
6576
|
reactive,
|