@alwatr/delay 5.4.0 → 5.5.1

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/CHANGELOG.md CHANGED
@@ -3,6 +3,26 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [5.5.1](https://github.com/Alwatr/nanolib/compare/@alwatr/delay@5.5.0...@alwatr/delay@5.5.1) (2025-03-18)
7
+
8
+ ### Bug Fixes
9
+
10
+ * **delay:** specify type for getGlobalThis in polyfill.ts ([57fa717](https://github.com/Alwatr/nanolib/commit/57fa7173f6b040f7d4e536ecb18cf41fbaf218ea)) by @alimd
11
+
12
+ ### Dependencies update
13
+
14
+ * bump the development-dependencies group with 9 updates ([7290aa3](https://github.com/Alwatr/nanolib/commit/7290aa3b52ce66ca237d2a12d28a7687b113f83d)) by @dependabot[bot]
15
+
16
+ ## [5.5.0](https://github.com/Alwatr/nanolib/compare/@alwatr/delay@5.4.0...@alwatr/delay@5.5.0) (2025-03-06)
17
+
18
+ ### Miscellaneous Chores
19
+
20
+ * update username casing in changelog entries ([9722ac9](https://github.com/Alwatr/nanolib/commit/9722ac9a078438a4e8ebfa5826ea70e0e3a52ca6)) by @
21
+
22
+ ### Dependencies update
23
+
24
+ * bump the development-dependencies group across 1 directory with 11 updates ([720c395](https://github.com/Alwatr/nanolib/commit/720c3954da55c929fe8fb16957121f4c51fb7f0c)) by @dependabot[bot]
25
+
6
26
  ## [5.4.0](https://github.com/Alwatr/nanolib/compare/@alwatr/delay@1.0.8...@alwatr/delay@5.4.0) (2025-02-18)
7
27
 
8
28
  ### Dependencies update
@@ -83,7 +103,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
83
103
 
84
104
  ### Dependencies update
85
105
 
86
- * update ([4434ba6](https://github.com/Alwatr/nanolib/commit/4434ba67c3f576bb1a0c307fbdb263c43cd9733a)) by @AliMD
106
+ * update ([4434ba6](https://github.com/Alwatr/nanolib/commit/4434ba67c3f576bb1a0c307fbdb263c43cd9733a)) by @alimd
87
107
 
88
108
  ## [1.0.7](https://github.com/Alwatr/nanolib/compare/@alwatr/delay@1.0.6...@alwatr/delay@1.0.7) (2024-10-25)
89
109
 
@@ -112,7 +132,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
112
132
 
113
133
  ### Miscellaneous Chores
114
134
 
115
- - include LICENSE and LEGAL files to publish ([09f366f](https://github.com/Alwatr/nanolib/commit/09f366f680bfa9fb26acb2cd1ccbc68c5a9e9ad8)) by @AliMD
135
+ - include LICENSE and LEGAL files to publish ([09f366f](https://github.com/Alwatr/nanolib/commit/09f366f680bfa9fb26acb2cd1ccbc68c5a9e9ad8)) by @alimd
116
136
 
117
137
  ## [1.0.3](https://github.com/Alwatr/nanolib/compare/@alwatr/delay@1.0.2...@alwatr/delay@1.0.3) (2024-10-11)
118
138
 
@@ -136,15 +156,15 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
136
156
 
137
157
  ### Code Refactoring
138
158
 
139
- - **delay:** update delay package to use @alwatr/parse-duration for duration delays ([cca1be2](https://github.com/Alwatr/nanolib/commit/cca1be2dcfeec6dce388562ef867b81af1823b62)) by @AliMD
140
- - **delay:** update untilIdle function to accept Duration instead of DurationString ([b3a5c32](https://github.com/Alwatr/nanolib/commit/b3a5c322a1b59833693149da644c7d2eddd6a374)) by @AliMD
141
- - update Dictionary type definitions ([c94cbc4](https://github.com/Alwatr/nanolib/commit/c94cbc4523864e2cc47828ccf5508b68945ac2b8)) by @AliMD
142
- - use new type-helper global types and remove all import types ([08b5d08](https://github.com/Alwatr/nanolib/commit/08b5d08c03c7c315382337239de0426462f384b8)) by @AliMD
143
- - **wait:** rename package to delay ([cf8c45c](https://github.com/Alwatr/nanolib/commit/cf8c45cf3f5b61fdd4b1b1c7f744c4eb3e230016)) by @AliMD
159
+ - **delay:** update delay package to use @alwatr/parse-duration for duration delays ([cca1be2](https://github.com/Alwatr/nanolib/commit/cca1be2dcfeec6dce388562ef867b81af1823b62)) by @alimd
160
+ - **delay:** update untilIdle function to accept Duration instead of DurationString ([b3a5c32](https://github.com/Alwatr/nanolib/commit/b3a5c322a1b59833693149da644c7d2eddd6a374)) by @alimd
161
+ - update Dictionary type definitions ([c94cbc4](https://github.com/Alwatr/nanolib/commit/c94cbc4523864e2cc47828ccf5508b68945ac2b8)) by @alimd
162
+ - use new type-helper global types and remove all import types ([08b5d08](https://github.com/Alwatr/nanolib/commit/08b5d08c03c7c315382337239de0426462f384b8)) by @alimd
163
+ - **wait:** rename package to delay ([cf8c45c](https://github.com/Alwatr/nanolib/commit/cf8c45cf3f5b61fdd4b1b1c7f744c4eb3e230016)) by @alimd
144
164
 
145
165
  ### Miscellaneous Chores
146
166
 
147
- - fix versions ([497a6d8](https://github.com/Alwatr/nanolib/commit/497a6d81ae5989e566e96d498fc5f1b6c80193ae)) by @AliMD
167
+ - fix versions ([497a6d8](https://github.com/Alwatr/nanolib/commit/497a6d81ae5989e566e96d498fc5f1b6c80193ae)) by @alimd
148
168
 
149
169
  ## [1.1.16](https://github.com/Alwatr/nanolib/compare/@alwatr/delay@1.1.15...@alwatr/delay@1.1.16) (2024-09-21)
150
170
 
@@ -155,7 +175,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
155
175
  ### Dependencies update
156
176
 
157
177
  - bump the development-dependencies group across 1 directory with 10 updates ([9ed98ff](https://github.com/Alwatr/nanolib/commit/9ed98ffd0668d5a36e255c82edab3af53bffda8f)) by @dependabot[bot]
158
- - update ([c36ed50](https://github.com/Alwatr/nanolib/commit/c36ed50f68da2f5608ccd96119963a16cfacb4ce)) by @AliMD
178
+ - update ([c36ed50](https://github.com/Alwatr/nanolib/commit/c36ed50f68da2f5608ccd96119963a16cfacb4ce)) by @alimd
159
179
 
160
180
  ## [1.1.14](https://github.com/Alwatr/nanolib/compare/@alwatr/delay@1.1.13...@alwatr/delay@1.1.14) (2024-08-31)
161
181
 
@@ -167,7 +187,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
167
187
 
168
188
  ### Dependencies update
169
189
 
170
- - update all dependencies ([1e0c30e](https://github.com/Alwatr/nanolib/commit/1e0c30e6a3a8e19deb5185814e24ab6c08dca573)) by @AliMD
190
+ - update all dependencies ([1e0c30e](https://github.com/Alwatr/nanolib/commit/1e0c30e6a3a8e19deb5185814e24ab6c08dca573)) by @alimd
171
191
 
172
192
  ## [1.1.12](https://github.com/Alwatr/nanolib/compare/@alwatr/delay@1.1.11...@alwatr/delay@1.1.12) (2024-07-04)
173
193
 
@@ -179,7 +199,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
179
199
 
180
200
  ### Dependencies update
181
201
 
182
- - upgrade ([6dbd300](https://github.com/Alwatr/nanolib/commit/6dbd300642c9bcc9e7d0b281e244bf1b06eb1c38)) by @AliMD
202
+ - upgrade ([6dbd300](https://github.com/Alwatr/nanolib/commit/6dbd300642c9bcc9e7d0b281e244bf1b06eb1c38)) by @alimd
183
203
 
184
204
  ## [1.1.10](https://github.com/Alwatr/nanolib/compare/@alwatr/delay@1.1.9...@alwatr/delay@1.1.10) (2024-04-25)
185
205
 
@@ -193,11 +213,11 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
193
213
 
194
214
  ### Bug Fixes
195
215
 
196
- - exported types by add .js extensions to all imports ([fc3d83e](https://github.com/Alwatr/nanolib/commit/fc3d83e8f375da97ba276314b2e6966aa82c9b3f)) by @AliMD
216
+ - exported types by add .js extensions to all imports ([fc3d83e](https://github.com/Alwatr/nanolib/commit/fc3d83e8f375da97ba276314b2e6966aa82c9b3f)) by @alimd
197
217
 
198
218
  ### Miscellaneous Chores
199
219
 
200
- - **deps:** update ([1a45030](https://github.com/Alwatr/nanolib/commit/1a450305440b710a300787d4ca24b1ed8c6a39d7)) by @AliMD
220
+ - **deps:** update ([1a45030](https://github.com/Alwatr/nanolib/commit/1a450305440b710a300787d4ca24b1ed8c6a39d7)) by @alimd
201
221
 
202
222
  ## [1.1.7](https://github.com/Alwatr/nanolib/compare/@alwatr/delay@1.1.6...@alwatr/delay@1.1.7) (2024-01-24)
203
223
 
@@ -223,7 +243,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
223
243
 
224
244
  ### Bug Fixes
225
245
 
226
- - **wait:** requestIdleCallback polyfill ([d41180d](https://github.com/Alwatr/nanolib/commit/d41180dc2f0c313eb86f05f60050e57e891897c3)) by @AliMD
246
+ - **wait:** requestIdleCallback polyfill ([d41180d](https://github.com/Alwatr/nanolib/commit/d41180dc2f0c313eb86f05f60050e57e891897c3)) by @alimd
227
247
 
228
248
  ## [1.1.1](https://github.com/Alwatr/nanolib/compare/@alwatr/delay@1.1.0...@alwatr/delay@1.1.1) (2023-12-27)
229
249
 
@@ -234,7 +254,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
234
254
  ### Bug Fixes
235
255
 
236
256
  - deps ([34cd4fe](https://github.com/Alwatr/nanolib/commit/34cd4fead81b309765144a24add67e3f63bca127)) by @njfamirm
237
- - **wait:** polyfill ([6a0f5fb](https://github.com/Alwatr/nanolib/commit/6a0f5fb5f0ae369d832760c026c26428689d258d)) by @AliMD
257
+ - **wait:** polyfill ([6a0f5fb](https://github.com/Alwatr/nanolib/commit/6a0f5fb5f0ae369d832760c026c26428689d258d)) by @alimd
238
258
  - **wait:** polyfill check ([cd9befa](https://github.com/Alwatr/nanolib/commit/cd9befa0ae01090016eb16befc08d1ce17ba881d)) by @njfamirm
239
259
 
240
260
  ### Features
package/dist/main.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /* @alwatr/delay v5.4.0 */
1
+ /* @alwatr/delay v5.5.1 */
2
2
  "use strict";
3
3
  var __defProp = Object.defineProperty;
4
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -36,7 +36,7 @@ var requestIdleCallbackFallback = (callback, options) => setTimeout(callback, op
36
36
  var requestIdleCallback = /* @__PURE__ */ (() => win.requestIdleCallback || win.webkitRequestIdleCallback || win.mozRequestIdleCallback || requestIdleCallbackFallback)();
37
37
 
38
38
  // src/main.ts
39
- __dev_mode__: import_package_tracer.packageTracer.add("@alwatr/delay", "5.4.0");
39
+ __dev_mode__: import_package_tracer.packageTracer.add("@alwatr/delay", "5.5.1");
40
40
  var delay = {
41
41
  /**
42
42
  * Delays execution for a specified duration (in milliseconds).
package/dist/main.cjs.map CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/main.ts", "../src/polyfill.ts"],
4
- "sourcesContent": ["import {packageTracer} from '@alwatr/package-tracer';\nimport {parseDuration, type Duration} from '@alwatr/parse-duration';\n\n__dev_mode__: packageTracer.add(__package_name__, __package_version__);\n\nimport {requestAnimationFrame, requestIdleCallback} from './polyfill.js';\n\n/**\n * A utility module to help manage asynchronous operations and waiting for events or timeouts.\n */\nexport const delay = {\n /**\n * Delays execution for a specified duration (in milliseconds).\n *\n * @param duration - The duration to wait (in milliseconds). Use `0` to yield control to the event loop.\n * @returns A Promise that resolves after the specified duration.\n *\n * @example\n * ```typescript\n * await delay.by('1m'); // Wait for 1 minute\n * ```\n */\n by: (duration: Duration): Promise<void> =>\n new Promise((resolve) => setTimeout(resolve, parseDuration(duration))),\n\n /**\n * Delays execution until the next animation frame.\n *\n * @returns A Promise that resolves with the current timestamp when the next animation frame is fired.\n *\n * @example\n * ```typescript\n * const timestamp = await delay.untilNextAnimationFrame();\n * ```\n */\n untilNextAnimationFrame: (): Promise<DOMHighResTimeStamp> =>\n new Promise((resolve) => requestAnimationFrame(resolve)),\n\n /**\n * Delays execution until the browser's idle period or the specified timeout.\n *\n * @param timeout - Optional timeout (in milliseconds) for the idle callback.\n * @returns A Promise that resolves with the IdleDeadline object when the browser is idle or the timeout is reached.\n *\n * @example\n * ```typescript\n * const deadline = await delay.untilIdle();\n * ```\n */\n untilIdle: (timeout?: Duration): Promise<IdleDeadline> =>\n new Promise((resolve) => requestIdleCallback(resolve, timeout === undefined ? undefined : {\n timeout: parseDuration(timeout)\n })),\n\n /**\n * Delays execution until a specific DOM event occurs on an HTMLElement.\n *\n * @param element - The HTMLElement to listen for the event on.\n * @param eventName - The name of the DOM event to wait for.\n * @template T The event map type.\n * @returns A Promise that resolves with the event object when the specified event occurs.\n *\n * @example\n * ```typescript\n * const clickEvent = await delay.untilDomEvent(document.body, 'click');\n * ```\n */\n untilDomEvent: <T extends keyof HTMLElementEventMap>(\n element: HTMLElement,\n eventName: T\n ): Promise<HTMLElementEventMap[T]> =>\n new Promise((resolve) =>\n element.addEventListener(eventName, resolve, { once: true, passive: true })\n ),\n\n /**\n * Delays execution until a specific event occurs on an object with an `addEventListener` method.\n *\n * @param target - The target object to listen for the event on.\n * @param eventName - The name of the event to wait for.\n * @returns A Promise that resolves with the event object when the specified event occurs.\n *\n * @example\n * ```typescript\n * const server = http.createServer();\n * const requestEvent = await delay.untilEvent(server, 'request');\n * ```\n */\n untilEvent: (target: HasAddEventListener, eventName: string): Promise<Event> =>\n new Promise((resolve) =>\n target.addEventListener(eventName, resolve, { once: true, passive: true })\n ),\n\n /**\n * Yields control to the event loop immediately.\n *\n * Uses `setImmediate` if available, falls back to `queueMicrotask`, and then to `setTimeout(0)`.\n *\n * @returns A Promise that resolves immediately after yielding control to the event loop.\n *\n * @example\n * ```typescript\n * await delay.immediate();\n * ```\n */\n immediate: (): Promise<void> => {\n if (typeof setImmediate !== 'function') {\n if (typeof queueMicrotask === 'function') {\n return delay.nextMicrotask();\n }\n\n // else\n return delay.by(0);\n }\n return new Promise((resolve) => setImmediate(resolve));\n },\n\n /**\n * Delays execution until the next microtask queue is empty\n *\n * @returns A Promise that resolves when the next microtask queue is empty.\n *\n * @example\n * ```typescript\n * await delay.nextMicrotask();\n * ```\n */\n nextMicrotask: (): Promise<void> => {\n if (typeof queueMicrotask !== 'function') {\n if (typeof setImmediate === 'function') {\n return delay.immediate();\n }\n\n // else\n return delay.by(0);\n }\n return new Promise((resolve) => queueMicrotask(resolve));\n },\n} as const;\n", "import {getGlobalThis, type GlobalThis} from '@alwatr/global-this';\n\nexport const win = /* #__PURE__ */ getGlobalThis();\n\n// prettier-ignore\nconst requestAnimationFrameFallback =\n (callback: FrameRequestCallback): ReturnType<typeof setTimeout> =>\n setTimeout(() => callback(Date.now()), 1000 / 60);\n\nexport const requestAnimationFrame: GlobalThis['requestAnimationFrame'] = /* #__PURE__ */ (() =>\n win.requestAnimationFrame || win.webkitRequestAnimationFrame || win.mozRequestAnimationFrame || requestAnimationFrameFallback)();\n\n// prettier-ignore\nconst requestIdleCallbackFallback =\n (callback: () => void, options?: IdleRequestOptions): ReturnType<typeof setTimeout> =>\n setTimeout(callback, options?.timeout ?? 2000);\n\nexport const requestIdleCallback: GlobalThis['requestIdleCallback'] = /* #__PURE__ */ (() =>\n win.requestIdleCallback || win.webkitRequestIdleCallback || win.mozRequestIdleCallback || requestIdleCallbackFallback)();\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BAA4B;AAC5B,4BAA2C;;;ACD3C,yBAA6C;AAEtC,IAAM,MAAsB,sDAAc;AAGjD,IAAM,gCACJ,CAAC,aACC,WAAW,MAAM,SAAS,KAAK,IAAI,CAAC,GAAG,MAAO,EAAE;AAE7C,IAAM,wBAA8E,uBACzF,IAAI,yBAAyB,IAAI,+BAA+B,IAAI,4BAA4B,+BAA+B;AAGjI,IAAM,8BACJ,CAAC,UAAsB,YACrB,WAAW,UAAU,SAAS,WAAW,GAAI;AAE1C,IAAM,sBAA0E,uBACrF,IAAI,uBAAuB,IAAI,6BAA6B,IAAI,0BAA0B,6BAA6B;;;ADfzH,aAAc,qCAAc,IAAI,iBAAkB,OAAmB;AAO9D,IAAM,QAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAYnB,IAAI,CAAC,aACH,IAAI,QAAQ,CAAC,YAAY,WAAW,aAAS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YAAY;AACxC,UAAI,OAAO,iBAAiB,YAAY;AACtC,eAAO,MAAM,UAAU;AAAA,MACzB;AAGA,aAAO,MAAM,GAAG,CAAC;AAAA,IACnB;AACA,WAAO,IAAI,QAAQ,CAAC,YAAY,eAAe,OAAO,CAAC;AAAA,EACzD;AACF;",
4
+ "sourcesContent": ["import {packageTracer} from '@alwatr/package-tracer';\nimport {parseDuration, type Duration} from '@alwatr/parse-duration';\n\n__dev_mode__: packageTracer.add(__package_name__, __package_version__);\n\nimport {requestAnimationFrame, requestIdleCallback} from './polyfill.js';\n\n/**\n * A utility module to help manage asynchronous operations and waiting for events or timeouts.\n */\nexport const delay = {\n /**\n * Delays execution for a specified duration (in milliseconds).\n *\n * @param duration - The duration to wait (in milliseconds). Use `0` to yield control to the event loop.\n * @returns A Promise that resolves after the specified duration.\n *\n * @example\n * ```typescript\n * await delay.by('1m'); // Wait for 1 minute\n * ```\n */\n by: (duration: Duration): Promise<void> =>\n new Promise((resolve) => setTimeout(resolve, parseDuration(duration))),\n\n /**\n * Delays execution until the next animation frame.\n *\n * @returns A Promise that resolves with the current timestamp when the next animation frame is fired.\n *\n * @example\n * ```typescript\n * const timestamp = await delay.untilNextAnimationFrame();\n * ```\n */\n untilNextAnimationFrame: (): Promise<DOMHighResTimeStamp> =>\n new Promise((resolve) => requestAnimationFrame(resolve)),\n\n /**\n * Delays execution until the browser's idle period or the specified timeout.\n *\n * @param timeout - Optional timeout (in milliseconds) for the idle callback.\n * @returns A Promise that resolves with the IdleDeadline object when the browser is idle or the timeout is reached.\n *\n * @example\n * ```typescript\n * const deadline = await delay.untilIdle();\n * ```\n */\n untilIdle: (timeout?: Duration): Promise<IdleDeadline> =>\n new Promise((resolve) => requestIdleCallback(resolve, timeout === undefined ? undefined : {\n timeout: parseDuration(timeout)\n })),\n\n /**\n * Delays execution until a specific DOM event occurs on an HTMLElement.\n *\n * @param element - The HTMLElement to listen for the event on.\n * @param eventName - The name of the DOM event to wait for.\n * @template T The event map type.\n * @returns A Promise that resolves with the event object when the specified event occurs.\n *\n * @example\n * ```typescript\n * const clickEvent = await delay.untilDomEvent(document.body, 'click');\n * ```\n */\n untilDomEvent: <T extends keyof HTMLElementEventMap>(\n element: HTMLElement,\n eventName: T\n ): Promise<HTMLElementEventMap[T]> =>\n new Promise((resolve) =>\n element.addEventListener(eventName, resolve, { once: true, passive: true })\n ),\n\n /**\n * Delays execution until a specific event occurs on an object with an `addEventListener` method.\n *\n * @param target - The target object to listen for the event on.\n * @param eventName - The name of the event to wait for.\n * @returns A Promise that resolves with the event object when the specified event occurs.\n *\n * @example\n * ```typescript\n * const server = http.createServer();\n * const requestEvent = await delay.untilEvent(server, 'request');\n * ```\n */\n untilEvent: (target: HasAddEventListener, eventName: string): Promise<Event> =>\n new Promise((resolve) =>\n target.addEventListener(eventName, resolve, { once: true, passive: true })\n ),\n\n /**\n * Yields control to the event loop immediately.\n *\n * Uses `setImmediate` if available, falls back to `queueMicrotask`, and then to `setTimeout(0)`.\n *\n * @returns A Promise that resolves immediately after yielding control to the event loop.\n *\n * @example\n * ```typescript\n * await delay.immediate();\n * ```\n */\n immediate: (): Promise<void> => {\n if (typeof setImmediate !== 'function') {\n if (typeof queueMicrotask === 'function') {\n return delay.nextMicrotask();\n }\n\n // else\n return delay.by(0);\n }\n return new Promise((resolve) => setImmediate(resolve));\n },\n\n /**\n * Delays execution until the next microtask queue is empty\n *\n * @returns A Promise that resolves when the next microtask queue is empty.\n *\n * @example\n * ```typescript\n * await delay.nextMicrotask();\n * ```\n */\n nextMicrotask: (): Promise<void> => {\n if (typeof queueMicrotask !== 'function') {\n if (typeof setImmediate === 'function') {\n return delay.immediate();\n }\n\n // else\n return delay.by(0);\n }\n return new Promise((resolve) => queueMicrotask(resolve));\n },\n} as const;\n", "import {getGlobalThis, type GlobalThis} from '@alwatr/global-this';\n\nexport const win = /* #__PURE__ */ getGlobalThis<DictionaryOpt<unknown>>();\n\n// prettier-ignore\nconst requestAnimationFrameFallback =\n (callback: FrameRequestCallback): ReturnType<typeof setTimeout> =>\n setTimeout(() => callback(Date.now()), 1000 / 60);\n\nexport const requestAnimationFrame: GlobalThis['requestAnimationFrame'] = /* #__PURE__ */ (() =>\n win.requestAnimationFrame || win.webkitRequestAnimationFrame || win.mozRequestAnimationFrame || requestAnimationFrameFallback)();\n\n// prettier-ignore\nconst requestIdleCallbackFallback =\n (callback: () => void, options?: IdleRequestOptions): ReturnType<typeof setTimeout> =>\n setTimeout(callback, options?.timeout ?? 2000);\n\nexport const requestIdleCallback: GlobalThis['requestIdleCallback'] = /* #__PURE__ */ (() =>\n win.requestIdleCallback || win.webkitRequestIdleCallback || win.mozRequestIdleCallback || requestIdleCallbackFallback)();\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BAA4B;AAC5B,4BAA2C;;;ACD3C,yBAA6C;AAEtC,IAAM,MAAsB,sDAAsC;AAGzE,IAAM,gCACJ,CAAC,aACC,WAAW,MAAM,SAAS,KAAK,IAAI,CAAC,GAAG,MAAO,EAAE;AAE7C,IAAM,wBAA8E,uBACzF,IAAI,yBAAyB,IAAI,+BAA+B,IAAI,4BAA4B,+BAA+B;AAGjI,IAAM,8BACJ,CAAC,UAAsB,YACrB,WAAW,UAAU,SAAS,WAAW,GAAI;AAE1C,IAAM,sBAA0E,uBACrF,IAAI,uBAAuB,IAAI,6BAA6B,IAAI,0BAA0B,6BAA6B;;;ADfzH,aAAc,qCAAc,IAAI,iBAAkB,OAAmB;AAO9D,IAAM,QAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAYnB,IAAI,CAAC,aACH,IAAI,QAAQ,CAAC,YAAY,WAAW,aAAS,qCAAc,QAAQ,CAAC,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAYvE,yBAAyB,MACvB,IAAI,QAAQ,CAAC,Y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AQ,CAAC,YAAY,eAAe,OAAO,CAAC;AAAA,EACzD;AACF;",
6
6
  "names": []
7
7
  }
package/dist/main.mjs CHANGED
@@ -1,4 +1,4 @@
1
- /* @alwatr/delay v5.4.0 */
1
+ /* @alwatr/delay v5.5.1 */
2
2
 
3
3
  // src/main.ts
4
4
  import { packageTracer } from "@alwatr/package-tracer";
@@ -13,7 +13,7 @@ var requestIdleCallbackFallback = (callback, options) => setTimeout(callback, op
13
13
  var requestIdleCallback = /* @__PURE__ */ (() => win.requestIdleCallback || win.webkitRequestIdleCallback || win.mozRequestIdleCallback || requestIdleCallbackFallback)();
14
14
 
15
15
  // src/main.ts
16
- __dev_mode__: packageTracer.add("@alwatr/delay", "5.4.0");
16
+ __dev_mode__: packageTracer.add("@alwatr/delay", "5.5.1");
17
17
  var delay = {
18
18
  /**
19
19
  * Delays execution for a specified duration (in milliseconds).
package/dist/main.mjs.map CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/main.ts", "../src/polyfill.ts"],
4
- "sourcesContent": ["import {packageTracer} from '@alwatr/package-tracer';\nimport {parseDuration, type Duration} from '@alwatr/parse-duration';\n\n__dev_mode__: packageTracer.add(__package_name__, __package_version__);\n\nimport {requestAnimationFrame, requestIdleCallback} from './polyfill.js';\n\n/**\n * A utility module to help manage asynchronous operations and waiting for events or timeouts.\n */\nexport const delay = {\n /**\n * Delays execution for a specified duration (in milliseconds).\n *\n * @param duration - The duration to wait (in milliseconds). Use `0` to yield control to the event loop.\n * @returns A Promise that resolves after the specified duration.\n *\n * @example\n * ```typescript\n * await delay.by('1m'); // Wait for 1 minute\n * ```\n */\n by: (duration: Duration): Promise<void> =>\n new Promise((resolve) => setTimeout(resolve, parseDuration(duration))),\n\n /**\n * Delays execution until the next animation frame.\n *\n * @returns A Promise that resolves with the current timestamp when the next animation frame is fired.\n *\n * @example\n * ```typescript\n * const timestamp = await delay.untilNextAnimationFrame();\n * ```\n */\n untilNextAnimationFrame: (): Promise<DOMHighResTimeStamp> =>\n new Promise((resolve) => requestAnimationFrame(resolve)),\n\n /**\n * Delays execution until the browser's idle period or the specified timeout.\n *\n * @param timeout - Optional timeout (in milliseconds) for the idle callback.\n * @returns A Promise that resolves with the IdleDeadline object when the browser is idle or the timeout is reached.\n *\n * @example\n * ```typescript\n * const deadline = await delay.untilIdle();\n * ```\n */\n untilIdle: (timeout?: Duration): Promise<IdleDeadline> =>\n new Promise((resolve) => requestIdleCallback(resolve, timeout === undefined ? undefined : {\n timeout: parseDuration(timeout)\n })),\n\n /**\n * Delays execution until a specific DOM event occurs on an HTMLElement.\n *\n * @param element - The HTMLElement to listen for the event on.\n * @param eventName - The name of the DOM event to wait for.\n * @template T The event map type.\n * @returns A Promise that resolves with the event object when the specified event occurs.\n *\n * @example\n * ```typescript\n * const clickEvent = await delay.untilDomEvent(document.body, 'click');\n * ```\n */\n untilDomEvent: <T extends keyof HTMLElementEventMap>(\n element: HTMLElement,\n eventName: T\n ): Promise<HTMLElementEventMap[T]> =>\n new Promise((resolve) =>\n element.addEventListener(eventName, resolve, { once: true, passive: true })\n ),\n\n /**\n * Delays execution until a specific event occurs on an object with an `addEventListener` method.\n *\n * @param target - The target object to listen for the event on.\n * @param eventName - The name of the event to wait for.\n * @returns A Promise that resolves with the event object when the specified event occurs.\n *\n * @example\n * ```typescript\n * const server = http.createServer();\n * const requestEvent = await delay.untilEvent(server, 'request');\n * ```\n */\n untilEvent: (target: HasAddEventListener, eventName: string): Promise<Event> =>\n new Promise((resolve) =>\n target.addEventListener(eventName, resolve, { once: true, passive: true })\n ),\n\n /**\n * Yields control to the event loop immediately.\n *\n * Uses `setImmediate` if available, falls back to `queueMicrotask`, and then to `setTimeout(0)`.\n *\n * @returns A Promise that resolves immediately after yielding control to the event loop.\n *\n * @example\n * ```typescript\n * await delay.immediate();\n * ```\n */\n immediate: (): Promise<void> => {\n if (typeof setImmediate !== 'function') {\n if (typeof queueMicrotask === 'function') {\n return delay.nextMicrotask();\n }\n\n // else\n return delay.by(0);\n }\n return new Promise((resolve) => setImmediate(resolve));\n },\n\n /**\n * Delays execution until the next microtask queue is empty\n *\n * @returns A Promise that resolves when the next microtask queue is empty.\n *\n * @example\n * ```typescript\n * await delay.nextMicrotask();\n * ```\n */\n nextMicrotask: (): Promise<void> => {\n if (typeof queueMicrotask !== 'function') {\n if (typeof setImmediate === 'function') {\n return delay.immediate();\n }\n\n // else\n return delay.by(0);\n }\n return new Promise((resolve) => queueMicrotask(resolve));\n },\n} as const;\n", "import {getGlobalThis, type GlobalThis} from '@alwatr/global-this';\n\nexport const win = /* #__PURE__ */ getGlobalThis();\n\n// prettier-ignore\nconst requestAnimationFrameFallback =\n (callback: FrameRequestCallback): ReturnType<typeof setTimeout> =>\n setTimeout(() => callback(Date.now()), 1000 / 60);\n\nexport const requestAnimationFrame: GlobalThis['requestAnimationFrame'] = /* #__PURE__ */ (() =>\n win.requestAnimationFrame || win.webkitRequestAnimationFrame || win.mozRequestAnimationFrame || requestAnimationFrameFallback)();\n\n// prettier-ignore\nconst requestIdleCallbackFallback =\n (callback: () => void, options?: IdleRequestOptions): ReturnType<typeof setTimeout> =>\n setTimeout(callback, options?.timeout ?? 2000);\n\nexport const requestIdleCallback: GlobalThis['requestIdleCallback'] = /* #__PURE__ */ (() =>\n win.requestIdleCallback || win.webkitRequestIdleCallback || win.mozRequestIdleCallback || requestIdleCallbackFallback)();\n"],
5
- "mappings": ";;;AAAA,SAAQ,qBAAoB;AAC5B,SAAQ,qBAAmC;;;ACD3C,SAAQ,qBAAqC;AAEtC,IAAM,MAAsB,8BAAc;AAGjD,IAAM,gCACJ,CAAC,aACC,WAAW,MAAM,SAAS,KAAK,IAAI,CAAC,GAAG,MAAO,EAAE;AAE7C,IAAM,wBAA8E,uBACzF,IAAI,yBAAyB,IAAI,+BAA+B,IAAI,4BAA4B,+BAA+B;AAGjI,IAAM,8BACJ,CAAC,UAAsB,YACrB,WAAW,UAAU,SAAS,WAAW,GAAI;AAE1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AAmB,YAAY;AACxC,eAAO,MAAM,cAAc;AAAA,MAC7B;AAGA,aAAO,MAAM,GAAG,CAAC;AAAA,IACnB;AACA,WAAO,IAAI,QAAQ,CAAC,YAAY,aAAa,OAAO,CAAC;AAAA,EACvD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAYA,eAAe,MAAqB;AAClC,QAAI,OAAO,mBAAmB,YAAY;AACxC,UAAI,OAAO,iBAAiB,YAAY;AACtC,eAAO,MAAM,UAAU;AAAA,MACzB;AAGA,aAAO,MAAM,GAAG,CAAC;AAAA,IACnB;AACA,WAAO,IAAI,QAAQ,CAAC,YAAY,eAAe,OAAO,CAAC;AAAA,EACzD;AACF;",
4
+ "sourcesContent": ["import {packageTracer} from '@alwatr/package-tracer';\nimport {parseDuration, type Duration} from '@alwatr/parse-duration';\n\n__dev_mode__: packageTracer.add(__package_name__, __package_version__);\n\nimport {requestAnimationFrame, requestIdleCallback} from './polyfill.js';\n\n/**\n * A utility module to help manage asynchronous operations and waiting for events or timeouts.\n */\nexport const delay = {\n /**\n * Delays execution for a specified duration (in milliseconds).\n *\n * @param duration - The duration to wait (in milliseconds). Use `0` to yield control to the event loop.\n * @returns A Promise that resolves after the specified duration.\n *\n * @example\n * ```typescript\n * await delay.by('1m'); // Wait for 1 minute\n * ```\n */\n by: (duration: Duration): Promise<void> =>\n new Promise((resolve) => setTimeout(resolve, parseDuration(duration))),\n\n /**\n * Delays execution until the next animation frame.\n *\n * @returns A Promise that resolves with the current timestamp when the next animation frame is fired.\n *\n * @example\n * ```typescript\n * const timestamp = await delay.untilNextAnimationFrame();\n * ```\n */\n untilNextAnimationFrame: (): Promise<DOMHighResTimeStamp> =>\n new Promise((resolve) => requestAnimationFrame(resolve)),\n\n /**\n * Delays execution until the browser's idle period or the specified timeout.\n *\n * @param timeout - Optional timeout (in milliseconds) for the idle callback.\n * @returns A Promise that resolves with the IdleDeadline object when the browser is idle or the timeout is reached.\n *\n * @example\n * ```typescript\n * const deadline = await delay.untilIdle();\n * ```\n */\n untilIdle: (timeout?: Duration): Promise<IdleDeadline> =>\n new Promise((resolve) => requestIdleCallback(resolve, timeout === undefined ? undefined : {\n timeout: parseDuration(timeout)\n })),\n\n /**\n * Delays execution until a specific DOM event occurs on an HTMLElement.\n *\n * @param element - The HTMLElement to listen for the event on.\n * @param eventName - The name of the DOM event to wait for.\n * @template T The event map type.\n * @returns A Promise that resolves with the event object when the specified event occurs.\n *\n * @example\n * ```typescript\n * const clickEvent = await delay.untilDomEvent(document.body, 'click');\n * ```\n */\n untilDomEvent: <T extends keyof HTMLElementEventMap>(\n element: HTMLElement,\n eventName: T\n ): Promise<HTMLElementEventMap[T]> =>\n new Promise((resolve) =>\n element.addEventListener(eventName, resolve, { once: true, passive: true })\n ),\n\n /**\n * Delays execution until a specific event occurs on an object with an `addEventListener` method.\n *\n * @param target - The target object to listen for the event on.\n * @param eventName - The name of the event to wait for.\n * @returns A Promise that resolves with the event object when the specified event occurs.\n *\n * @example\n * ```typescript\n * const server = http.createServer();\n * const requestEvent = await delay.untilEvent(server, 'request');\n * ```\n */\n untilEvent: (target: HasAddEventListener, eventName: string): Promise<Event> =>\n new Promise((resolve) =>\n target.addEventListener(eventName, resolve, { once: true, passive: true })\n ),\n\n /**\n * Yields control to the event loop immediately.\n *\n * Uses `setImmediate` if available, falls back to `queueMicrotask`, and then to `setTimeout(0)`.\n *\n * @returns A Promise that resolves immediately after yielding control to the event loop.\n *\n * @example\n * ```typescript\n * await delay.immediate();\n * ```\n */\n immediate: (): Promise<void> => {\n if (typeof setImmediate !== 'function') {\n if (typeof queueMicrotask === 'function') {\n return delay.nextMicrotask();\n }\n\n // else\n return delay.by(0);\n }\n return new Promise((resolve) => setImmediate(resolve));\n },\n\n /**\n * Delays execution until the next microtask queue is empty\n *\n * @returns A Promise that resolves when the next microtask queue is empty.\n *\n * @example\n * ```typescript\n * await delay.nextMicrotask();\n * ```\n */\n nextMicrotask: (): Promise<void> => {\n if (typeof queueMicrotask !== 'function') {\n if (typeof setImmediate === 'function') {\n return delay.immediate();\n }\n\n // else\n return delay.by(0);\n }\n return new Promise((resolve) => queueMicrotask(resolve));\n },\n} as const;\n", "import {getGlobalThis, type GlobalThis} from '@alwatr/global-this';\n\nexport const win = /* #__PURE__ */ getGlobalThis<DictionaryOpt<unknown>>();\n\n// prettier-ignore\nconst requestAnimationFrameFallback =\n (callback: FrameRequestCallback): ReturnType<typeof setTimeout> =>\n setTimeout(() => callback(Date.now()), 1000 / 60);\n\nexport const requestAnimationFrame: GlobalThis['requestAnimationFrame'] = /* #__PURE__ */ (() =>\n win.requestAnimationFrame || win.webkitRequestAnimationFrame || win.mozRequestAnimationFrame || requestAnimationFrameFallback)();\n\n// prettier-ignore\nconst requestIdleCallbackFallback =\n (callback: () => void, options?: IdleRequestOptions): ReturnType<typeof setTimeout> =>\n setTimeout(callback, options?.timeout ?? 2000);\n\nexport const requestIdleCallback: GlobalThis['requestIdleCallback'] = /* #__PURE__ */ (() =>\n win.requestIdleCallback || win.webkitRequestIdleCallback || win.mozRequestIdleCallback || requestIdleCallbackFallback)();\n"],
5
+ "mappings": ";;;AAAA,SAAQ,qBAAoB;AAC5B,SAAQ,qBAAmC;;;ACD3C,SAAQ,qBAAqC;AAEtC,IAAM,MAAsB,8BAAsC;AAGzE,IAAM,gCACJ,CAAC,aACC,WAAW,MAAM,SAAS,KAAK,IAAI,CAAC,GAAG,MAAO,EAAE;AAE7C,IAAM,wBAA8E,uBACzF,IAAI,yBAAyB,IAAI,+BAA+B,IAAI,4BAA4B,+BAA+B;AAGjI,IAAM,8BACJ,CAAC,UAAsB,YACrB,WAAW,UAAU,SAAS,WAAW,GAAI;AAE1C,IAAM,sBAA0E,uBACrF,IAAI,uBAAuB,IAAI,6BAA6B,IAAI,0BAA0B,6BAA6B;;;ADfzH,aAAc,eAAc,IAAI,iBAAkB,OAAmB;AAO9D,IAAM,QAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;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AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAYA,eAAe,MAAqB;AAClC,QAAI,OAAO,mBAAmB,YAAY;AACxC,UAAI,OAAO,iBAAiB,YAAY;AACtC,eAAO,MAAM,UAAU;AAAA,MACzB;AAGA,aAAO,MAAM,GAAG,CAAC;AAAA,IACnB;AACA,WAAO,IAAI,QAAQ,CAAC,YAAY,eAAe,OAAO,CAAC;AAAA,EACzD;AACF;",
6
6
  "names": []
7
7
  }
@@ -1 +1 @@
1
- {"version":3,"file":"polyfill.d.ts","sourceRoot":"","sources":["../src/polyfill.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,KAAK,UAAU,EAAC,MAAM,qBAAqB,CAAC;AAEnE,eAAO,MAAM,GAAG,4CAAkC,CAAC;AAOnD,eAAO,MAAM,qBAAqB,EAAE,UAAU,CAAC,uBAAuB,CAC4D,CAAC;AAOnI,eAAO,MAAM,mBAAmB,EAAE,UAAU,CAAC,qBAAqB,CACwD,CAAC"}
1
+ {"version":3,"file":"polyfill.d.ts","sourceRoot":"","sources":["../src/polyfill.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,KAAK,UAAU,EAAC,MAAM,qBAAqB,CAAC;AAEnE,eAAO,MAAM,GAAG,4CAA0D,CAAC;AAO3E,eAAO,MAAM,qBAAqB,EAAE,UAAU,CAAC,uBAAuB,CAC4D,CAAC;AAOnI,eAAO,MAAM,mBAAmB,EAAE,UAAU,CAAC,qBAAqB,CACwD,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alwatr/delay",
3
- "version": "5.4.0",
3
+ "version": "5.5.1",
4
4
  "description": "Comprehensive toolkit for managing asynchronous operations.",
5
5
  "author": "S. Ali Mihandoost <ali.mihandoost@gmail.com>",
6
6
  "keywords": [
@@ -67,17 +67,17 @@
67
67
  "clean": "rm -rfv dist *.tsbuildinfo"
68
68
  },
69
69
  "dependencies": {
70
- "@alwatr/global-this": "^5.4.0",
71
- "@alwatr/package-tracer": "^5.4.0",
72
- "@alwatr/parse-duration": "^5.4.0"
70
+ "@alwatr/global-this": "^5.5.1",
71
+ "@alwatr/package-tracer": "^5.5.1",
72
+ "@alwatr/parse-duration": "^5.5.1"
73
73
  },
74
74
  "devDependencies": {
75
- "@alwatr/nano-build": "^5.4.0",
75
+ "@alwatr/nano-build": "^5.5.1",
76
76
  "@alwatr/prettier-config": "^5.0.0",
77
77
  "@alwatr/tsconfig-base": "^5.0.0",
78
- "@alwatr/type-helper": "^5.3.0",
79
- "@types/node": "^22.13.4",
80
- "typescript": "^5.7.3"
78
+ "@alwatr/type-helper": "^5.4.0",
79
+ "@types/node": "^22.13.10",
80
+ "typescript": "^5.8.2"
81
81
  },
82
- "gitHead": "074be0d0fe780bf929e163045f8f598cd2697636"
82
+ "gitHead": "21cb1fe0f26a580944d9e72a313fc99308cd8be7"
83
83
  }