@mtkruto/browser 0.127.0 → 0.129.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.
Files changed (157) hide show
  1. package/esm/0_deps.d.ts +4 -3
  2. package/esm/0_deps.d.ts.map +1 -1
  3. package/esm/0_deps.js +4 -3
  4. package/esm/3_types.d.ts +7 -0
  5. package/esm/3_types.d.ts.map +1 -1
  6. package/esm/3_types.js +7 -0
  7. package/esm/client/0_params.d.ts +12 -0
  8. package/esm/client/0_params.d.ts.map +1 -1
  9. package/esm/client/1_client_generic.d.ts +96 -19
  10. package/esm/client/1_client_generic.d.ts.map +1 -1
  11. package/esm/client/2_account_manager.d.ts +8 -1
  12. package/esm/client/2_account_manager.d.ts.map +1 -1
  13. package/esm/client/2_account_manager.js +38 -1
  14. package/esm/client/3_message_manager.d.ts +5 -1
  15. package/esm/client/3_message_manager.d.ts.map +1 -1
  16. package/esm/client/3_message_manager.js +21 -1
  17. package/esm/client/4_chat_manager.d.ts +4 -3
  18. package/esm/client/4_chat_manager.d.ts.map +1 -1
  19. package/esm/client/4_chat_manager.js +11 -3
  20. package/esm/client/4_context.d.ts +2 -2
  21. package/esm/client/4_context.d.ts.map +1 -1
  22. package/esm/client/6_client.d.ts +95 -18
  23. package/esm/client/6_client.d.ts.map +1 -1
  24. package/esm/client/6_client.js +121 -20
  25. package/esm/client/6_client_dispatcher.d.ts +96 -19
  26. package/esm/client/6_client_dispatcher.d.ts.map +1 -1
  27. package/esm/client/6_client_dispatcher.js +122 -21
  28. package/esm/types/0_calling_code.d.ts +27 -0
  29. package/esm/types/0_calling_code.d.ts.map +1 -0
  30. package/esm/types/0_calling_code.js +26 -0
  31. package/esm/types/0_timezone.d.ts +31 -0
  32. package/esm/types/0_timezone.d.ts.map +1 -0
  33. package/esm/types/0_timezone.js +26 -0
  34. package/esm/types/1_available_reactions.d.ts +54 -0
  35. package/esm/types/1_available_reactions.d.ts.map +1 -0
  36. package/esm/types/1_available_reactions.js +30 -0
  37. package/esm/types/1_chat_p.d.ts +1 -1
  38. package/esm/types/1_chat_p.d.ts.map +1 -1
  39. package/esm/types/1_chat_p.js +1 -1
  40. package/esm/types/1_country.d.ts +30 -0
  41. package/esm/types/1_country.d.ts.map +1 -0
  42. package/esm/types/1_country.js +30 -0
  43. package/esm/types/2_user.d.ts +1 -1
  44. package/esm/types/2_user.d.ts.map +1 -1
  45. package/esm/types/2_user.js +2 -2
  46. package/esm/types/3_app_support.d.ts +27 -0
  47. package/esm/types/3_app_support.d.ts.map +1 -0
  48. package/esm/types/3_app_support.js +24 -0
  49. package/esm/types/3_blocked_user.d.ts +31 -0
  50. package/esm/types/3_blocked_user.d.ts.map +1 -0
  51. package/esm/types/3_blocked_user.js +33 -0
  52. package/esm/types/4_blocked_user_list.d.ts +31 -0
  53. package/esm/types/4_blocked_user_list.d.ts.map +1 -0
  54. package/esm/types/4_blocked_user_list.js +25 -0
  55. package/package.json +1 -1
  56. package/script/0_deps.d.ts +4 -3
  57. package/script/0_deps.d.ts.map +1 -1
  58. package/script/0_deps.js +13 -12
  59. package/script/3_types.d.ts +7 -0
  60. package/script/3_types.d.ts.map +1 -1
  61. package/script/3_types.js +7 -0
  62. package/script/client/0_params.d.ts +12 -0
  63. package/script/client/0_params.d.ts.map +1 -1
  64. package/script/client/1_client_generic.d.ts +96 -19
  65. package/script/client/1_client_generic.d.ts.map +1 -1
  66. package/script/client/2_account_manager.d.ts +8 -1
  67. package/script/client/2_account_manager.d.ts.map +1 -1
  68. package/script/client/2_account_manager.js +37 -0
  69. package/script/client/3_message_manager.d.ts +5 -1
  70. package/script/client/3_message_manager.d.ts.map +1 -1
  71. package/script/client/3_message_manager.js +20 -0
  72. package/script/client/4_chat_manager.d.ts +4 -3
  73. package/script/client/4_chat_manager.d.ts.map +1 -1
  74. package/script/client/4_chat_manager.js +9 -1
  75. package/script/client/4_context.d.ts +2 -2
  76. package/script/client/4_context.d.ts.map +1 -1
  77. package/script/client/6_client.d.ts +95 -18
  78. package/script/client/6_client.d.ts.map +1 -1
  79. package/script/client/6_client.js +121 -20
  80. package/script/client/6_client_dispatcher.d.ts +96 -19
  81. package/script/client/6_client_dispatcher.d.ts.map +1 -1
  82. package/script/client/6_client_dispatcher.js +122 -21
  83. package/script/types/0_calling_code.d.ts +27 -0
  84. package/script/types/0_calling_code.d.ts.map +1 -0
  85. package/script/types/0_calling_code.js +29 -0
  86. package/script/types/0_timezone.d.ts +31 -0
  87. package/script/types/0_timezone.d.ts.map +1 -0
  88. package/script/types/0_timezone.js +29 -0
  89. package/script/types/1_available_reactions.d.ts +54 -0
  90. package/script/types/1_available_reactions.d.ts.map +1 -0
  91. package/script/types/1_available_reactions.js +33 -0
  92. package/script/types/1_chat_p.d.ts +1 -1
  93. package/script/types/1_chat_p.d.ts.map +1 -1
  94. package/script/types/1_chat_p.js +1 -1
  95. package/script/types/1_country.d.ts +30 -0
  96. package/script/types/1_country.d.ts.map +1 -0
  97. package/script/types/1_country.js +33 -0
  98. package/script/types/2_user.d.ts +1 -1
  99. package/script/types/2_user.d.ts.map +1 -1
  100. package/script/types/2_user.js +2 -2
  101. package/script/types/3_app_support.d.ts +27 -0
  102. package/script/types/3_app_support.d.ts.map +1 -0
  103. package/script/types/3_app_support.js +27 -0
  104. package/script/types/3_blocked_user.d.ts +31 -0
  105. package/script/types/3_blocked_user.d.ts.map +1 -0
  106. package/script/types/3_blocked_user.js +36 -0
  107. package/script/types/4_blocked_user_list.d.ts +31 -0
  108. package/script/types/4_blocked_user_list.d.ts.map +1 -0
  109. package/script/types/4_blocked_user_list.js +28 -0
  110. package/esm/deps/jsr.io/@std/async/1.2.0/_util.d.ts +0 -2
  111. package/esm/deps/jsr.io/@std/async/1.2.0/_util.d.ts.map +0 -1
  112. package/esm/deps/jsr.io/@std/async/1.2.0/_util.js +0 -6
  113. package/esm/deps/jsr.io/@std/async/1.2.0/abortable.d.ts +0 -107
  114. package/esm/deps/jsr.io/@std/async/1.2.0/abortable.d.ts.map +0 -1
  115. package/esm/deps/jsr.io/@std/async/1.2.0/abortable.js +0 -46
  116. package/esm/deps/jsr.io/@std/async/1.2.0/deadline.d.ts +0 -37
  117. package/esm/deps/jsr.io/@std/async/1.2.0/deadline.d.ts.map +0 -1
  118. package/esm/deps/jsr.io/@std/async/1.2.0/deadline.js +0 -41
  119. package/esm/deps/jsr.io/@std/async/1.2.0/debounce.d.ts +0 -44
  120. package/esm/deps/jsr.io/@std/async/1.2.0/debounce.d.ts.map +0 -1
  121. package/esm/deps/jsr.io/@std/async/1.2.0/debounce.js +0 -57
  122. package/esm/deps/jsr.io/@std/async/1.2.0/mod.d.ts +0 -22
  123. package/esm/deps/jsr.io/@std/async/1.2.0/mod.d.ts.map +0 -1
  124. package/esm/deps/jsr.io/@std/async/1.2.0/mod.js +0 -23
  125. package/esm/deps/jsr.io/@std/async/1.2.0/mux_async_iterator.d.ts +0 -111
  126. package/esm/deps/jsr.io/@std/async/1.2.0/mux_async_iterator.d.ts.map +0 -1
  127. package/esm/deps/jsr.io/@std/async/1.2.0/mux_async_iterator.js +0 -154
  128. package/esm/deps/jsr.io/@std/async/1.2.0/retry.d.ts +0 -155
  129. package/esm/deps/jsr.io/@std/async/1.2.0/retry.d.ts.map +0 -1
  130. package/esm/deps/jsr.io/@std/async/1.2.0/retry.js +0 -147
  131. package/esm/deps/jsr.io/@std/async/1.2.0/tee.d.ts +0 -43
  132. package/esm/deps/jsr.io/@std/async/1.2.0/tee.d.ts.map +0 -1
  133. package/esm/deps/jsr.io/@std/async/1.2.0/tee.js +0 -79
  134. package/script/deps/jsr.io/@std/async/1.2.0/_util.d.ts +0 -2
  135. package/script/deps/jsr.io/@std/async/1.2.0/_util.d.ts.map +0 -1
  136. package/script/deps/jsr.io/@std/async/1.2.0/_util.js +0 -9
  137. package/script/deps/jsr.io/@std/async/1.2.0/abortable.d.ts +0 -107
  138. package/script/deps/jsr.io/@std/async/1.2.0/abortable.d.ts.map +0 -1
  139. package/script/deps/jsr.io/@std/async/1.2.0/abortable.js +0 -49
  140. package/script/deps/jsr.io/@std/async/1.2.0/deadline.d.ts +0 -37
  141. package/script/deps/jsr.io/@std/async/1.2.0/deadline.d.ts.map +0 -1
  142. package/script/deps/jsr.io/@std/async/1.2.0/deadline.js +0 -44
  143. package/script/deps/jsr.io/@std/async/1.2.0/debounce.d.ts +0 -44
  144. package/script/deps/jsr.io/@std/async/1.2.0/debounce.d.ts.map +0 -1
  145. package/script/deps/jsr.io/@std/async/1.2.0/debounce.js +0 -60
  146. package/script/deps/jsr.io/@std/async/1.2.0/mod.d.ts +0 -22
  147. package/script/deps/jsr.io/@std/async/1.2.0/mod.d.ts.map +0 -1
  148. package/script/deps/jsr.io/@std/async/1.2.0/mod.js +0 -39
  149. package/script/deps/jsr.io/@std/async/1.2.0/mux_async_iterator.d.ts +0 -111
  150. package/script/deps/jsr.io/@std/async/1.2.0/mux_async_iterator.d.ts.map +0 -1
  151. package/script/deps/jsr.io/@std/async/1.2.0/mux_async_iterator.js +0 -158
  152. package/script/deps/jsr.io/@std/async/1.2.0/retry.d.ts +0 -155
  153. package/script/deps/jsr.io/@std/async/1.2.0/retry.d.ts.map +0 -1
  154. package/script/deps/jsr.io/@std/async/1.2.0/retry.js +0 -152
  155. package/script/deps/jsr.io/@std/async/1.2.0/tee.d.ts +0 -43
  156. package/script/deps/jsr.io/@std/async/1.2.0/tee.d.ts.map +0 -1
  157. package/script/deps/jsr.io/@std/async/1.2.0/tee.js +0 -82
@@ -1,82 +0,0 @@
1
- "use strict";
2
- // Copyright 2018-2026 the Deno authors. MIT license.
3
- // This module is browser compatible.
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.tee = tee;
6
- class Queue {
7
- #source;
8
- #queue;
9
- head;
10
- done;
11
- constructor(iterable) {
12
- this.#source = iterable[Symbol.asyncIterator]();
13
- this.#queue = {
14
- value: undefined,
15
- next: undefined,
16
- };
17
- this.head = this.#queue;
18
- this.done = false;
19
- }
20
- async next() {
21
- const result = await this.#source.next();
22
- if (!result.done) {
23
- const nextNode = {
24
- value: result.value,
25
- next: undefined,
26
- };
27
- this.#queue.next = nextNode;
28
- this.#queue = nextNode;
29
- }
30
- else {
31
- this.done = true;
32
- }
33
- }
34
- }
35
- /**
36
- * Branches the given async iterable into the `n` branches.
37
- *
38
- * @example Usage
39
- * ```ts
40
- * import { tee } from "@std/async/tee";
41
- * import { assertEquals } from "@std/assert";
42
- *
43
- * const gen = async function* gen() {
44
- * yield 1;
45
- * yield 2;
46
- * yield 3;
47
- * };
48
- *
49
- * const [branch1, branch2] = tee(gen());
50
- *
51
- * const result1 = await Array.fromAsync(branch1);
52
- * assertEquals(result1, [1, 2, 3]);
53
- *
54
- * const result2 = await Array.fromAsync(branch2);
55
- * assertEquals(result2, [1, 2, 3]);
56
- * ```
57
- *
58
- * @typeParam T The type of the provided async iterable and the returned async iterables.
59
- * @typeParam N The amount of branches to tee into.
60
- * @param iterable The iterable to tee.
61
- * @param n The amount of branches to tee into.
62
- * @returns The tuple where each element is an async iterable.
63
- */
64
- function tee(iterable, n = 2) {
65
- const queue = new Queue(iterable);
66
- async function* generator() {
67
- let buffer = queue.head;
68
- while (true) {
69
- if (buffer.next) {
70
- buffer = buffer.next;
71
- yield buffer.value;
72
- }
73
- else if (queue.done) {
74
- return;
75
- }
76
- else {
77
- await queue.next();
78
- }
79
- }
80
- }
81
- return Array.from({ length: n }).map(() => generator());
82
- }