@hyperfrontend/immutable-api-utils 0.0.2 → 0.1.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 (188) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/README.md +65 -4
  3. package/built-in-copy/array/index.cjs.js +40 -0
  4. package/built-in-copy/array/index.cjs.js.map +1 -0
  5. package/built-in-copy/array/index.d.ts +40 -0
  6. package/built-in-copy/array/index.d.ts.map +1 -0
  7. package/built-in-copy/array/index.esm.js +35 -0
  8. package/built-in-copy/array/index.esm.js.map +1 -0
  9. package/built-in-copy/console/index.cjs.js +130 -0
  10. package/built-in-copy/console/index.cjs.js.map +1 -0
  11. package/built-in-copy/console/index.d.ts +105 -0
  12. package/built-in-copy/console/index.d.ts.map +1 -0
  13. package/built-in-copy/console/index.esm.js +110 -0
  14. package/built-in-copy/console/index.esm.js.map +1 -0
  15. package/built-in-copy/date/index.cjs.js +49 -0
  16. package/built-in-copy/date/index.cjs.js.map +1 -0
  17. package/built-in-copy/date/index.d.ts +49 -0
  18. package/built-in-copy/date/index.d.ts.map +1 -0
  19. package/built-in-copy/date/index.esm.js +43 -0
  20. package/built-in-copy/date/index.esm.js.map +1 -0
  21. package/built-in-copy/encoding/index.cjs.js +67 -0
  22. package/built-in-copy/encoding/index.cjs.js.map +1 -0
  23. package/built-in-copy/encoding/index.d.ts +52 -0
  24. package/built-in-copy/encoding/index.d.ts.map +1 -0
  25. package/built-in-copy/encoding/index.esm.js +61 -0
  26. package/built-in-copy/encoding/index.esm.js.map +1 -0
  27. package/built-in-copy/error/index.cjs.js +122 -0
  28. package/built-in-copy/error/index.cjs.js.map +1 -0
  29. package/built-in-copy/error/index.d.ts +99 -0
  30. package/built-in-copy/error/index.d.ts.map +1 -0
  31. package/built-in-copy/error/index.esm.js +112 -0
  32. package/built-in-copy/error/index.esm.js.map +1 -0
  33. package/built-in-copy/function/index.cjs.js +61 -0
  34. package/built-in-copy/function/index.cjs.js.map +1 -0
  35. package/built-in-copy/function/index.d.ts +47 -0
  36. package/built-in-copy/function/index.d.ts.map +1 -0
  37. package/built-in-copy/function/index.esm.js +54 -0
  38. package/built-in-copy/function/index.esm.js.map +1 -0
  39. package/built-in-copy/json/index.cjs.js +34 -0
  40. package/built-in-copy/json/index.cjs.js.map +1 -0
  41. package/built-in-copy/json/index.d.ts +31 -0
  42. package/built-in-copy/json/index.d.ts.map +1 -0
  43. package/built-in-copy/json/index.esm.js +30 -0
  44. package/built-in-copy/json/index.esm.js.map +1 -0
  45. package/built-in-copy/map/index.cjs.js +44 -0
  46. package/built-in-copy/map/index.cjs.js.map +1 -0
  47. package/built-in-copy/map/index.d.ts +33 -0
  48. package/built-in-copy/map/index.d.ts.map +1 -0
  49. package/built-in-copy/map/index.esm.js +40 -0
  50. package/built-in-copy/map/index.esm.js.map +1 -0
  51. package/built-in-copy/math/index.cjs.js +317 -0
  52. package/built-in-copy/math/index.cjs.js.map +1 -0
  53. package/built-in-copy/math/index.d.ts +232 -0
  54. package/built-in-copy/math/index.d.ts.map +1 -0
  55. package/built-in-copy/math/index.esm.js +272 -0
  56. package/built-in-copy/math/index.esm.js.map +1 -0
  57. package/built-in-copy/messaging/index.cjs.js +123 -0
  58. package/built-in-copy/messaging/index.cjs.js.map +1 -0
  59. package/built-in-copy/messaging/index.d.ts +95 -0
  60. package/built-in-copy/messaging/index.d.ts.map +1 -0
  61. package/built-in-copy/messaging/index.esm.js +114 -0
  62. package/built-in-copy/messaging/index.esm.js.map +1 -0
  63. package/built-in-copy/number/index.cjs.js +141 -0
  64. package/built-in-copy/number/index.cjs.js.map +1 -0
  65. package/built-in-copy/number/index.d.ts +95 -0
  66. package/built-in-copy/number/index.d.ts.map +1 -0
  67. package/built-in-copy/number/index.esm.js +123 -0
  68. package/built-in-copy/number/index.esm.js.map +1 -0
  69. package/built-in-copy/object/index.cjs.js +174 -0
  70. package/built-in-copy/object/index.cjs.js.map +1 -0
  71. package/built-in-copy/object/index.d.ts +209 -0
  72. package/built-in-copy/object/index.d.ts.map +1 -0
  73. package/built-in-copy/object/index.esm.js +149 -0
  74. package/built-in-copy/object/index.esm.js.map +1 -0
  75. package/built-in-copy/promise/index.cjs.js +80 -0
  76. package/built-in-copy/promise/index.cjs.js.map +1 -0
  77. package/built-in-copy/promise/index.d.ts +63 -0
  78. package/built-in-copy/promise/index.d.ts.map +1 -0
  79. package/built-in-copy/promise/index.esm.js +70 -0
  80. package/built-in-copy/promise/index.esm.js.map +1 -0
  81. package/built-in-copy/reflect/index.cjs.js +101 -0
  82. package/built-in-copy/reflect/index.cjs.js.map +1 -0
  83. package/built-in-copy/reflect/index.d.ts +81 -0
  84. package/built-in-copy/reflect/index.d.ts.map +1 -0
  85. package/built-in-copy/reflect/index.esm.js +86 -0
  86. package/built-in-copy/reflect/index.esm.js.map +1 -0
  87. package/built-in-copy/regexp/index.cjs.js +37 -0
  88. package/built-in-copy/regexp/index.cjs.js.map +1 -0
  89. package/built-in-copy/regexp/index.d.ts +28 -0
  90. package/built-in-copy/regexp/index.d.ts.map +1 -0
  91. package/built-in-copy/regexp/index.esm.js +34 -0
  92. package/built-in-copy/regexp/index.esm.js.map +1 -0
  93. package/built-in-copy/set/index.cjs.js +36 -0
  94. package/built-in-copy/set/index.cjs.js.map +1 -0
  95. package/built-in-copy/set/index.d.ts +27 -0
  96. package/built-in-copy/set/index.d.ts.map +1 -0
  97. package/built-in-copy/set/index.esm.js +33 -0
  98. package/built-in-copy/set/index.esm.js.map +1 -0
  99. package/built-in-copy/string/index.cjs.js +46 -0
  100. package/built-in-copy/string/index.cjs.js.map +1 -0
  101. package/built-in-copy/string/index.d.ts +34 -0
  102. package/built-in-copy/string/index.d.ts.map +1 -0
  103. package/built-in-copy/string/index.esm.js +41 -0
  104. package/built-in-copy/string/index.esm.js.map +1 -0
  105. package/built-in-copy/symbol/index.cjs.js +123 -0
  106. package/built-in-copy/symbol/index.cjs.js.map +1 -0
  107. package/built-in-copy/symbol/index.d.ts +99 -0
  108. package/built-in-copy/symbol/index.d.ts.map +1 -0
  109. package/built-in-copy/symbol/index.esm.js +105 -0
  110. package/built-in-copy/symbol/index.esm.js.map +1 -0
  111. package/built-in-copy/timers/index.cjs.js +105 -0
  112. package/built-in-copy/timers/index.cjs.js.map +1 -0
  113. package/built-in-copy/timers/index.d.ts +73 -0
  114. package/built-in-copy/timers/index.d.ts.map +1 -0
  115. package/built-in-copy/timers/index.esm.js +96 -0
  116. package/built-in-copy/timers/index.esm.js.map +1 -0
  117. package/built-in-copy/typed-arrays/index.cjs.js +360 -0
  118. package/built-in-copy/typed-arrays/index.cjs.js.map +1 -0
  119. package/built-in-copy/typed-arrays/index.d.ts +321 -0
  120. package/built-in-copy/typed-arrays/index.d.ts.map +1 -0
  121. package/built-in-copy/typed-arrays/index.esm.js +321 -0
  122. package/built-in-copy/typed-arrays/index.esm.js.map +1 -0
  123. package/built-in-copy/url/index.cjs.js +103 -0
  124. package/built-in-copy/url/index.cjs.js.map +1 -0
  125. package/built-in-copy/url/index.d.ts +71 -0
  126. package/built-in-copy/url/index.d.ts.map +1 -0
  127. package/built-in-copy/url/index.esm.js +95 -0
  128. package/built-in-copy/url/index.esm.js.map +1 -0
  129. package/built-in-copy/weak-map/index.cjs.js +36 -0
  130. package/built-in-copy/weak-map/index.cjs.js.map +1 -0
  131. package/built-in-copy/weak-map/index.d.ts +27 -0
  132. package/built-in-copy/weak-map/index.d.ts.map +1 -0
  133. package/built-in-copy/weak-map/index.esm.js +33 -0
  134. package/built-in-copy/weak-map/index.esm.js.map +1 -0
  135. package/built-in-copy/weak-set/index.cjs.js +36 -0
  136. package/built-in-copy/weak-set/index.cjs.js.map +1 -0
  137. package/built-in-copy/weak-set/index.d.ts +27 -0
  138. package/built-in-copy/weak-set/index.d.ts.map +1 -0
  139. package/built-in-copy/weak-set/index.esm.js +33 -0
  140. package/built-in-copy/weak-set/index.esm.js.map +1 -0
  141. package/built-in-copy/websocket/index.cjs.js +50 -0
  142. package/built-in-copy/websocket/index.cjs.js.map +1 -0
  143. package/built-in-copy/websocket/index.d.ts +37 -0
  144. package/built-in-copy/websocket/index.d.ts.map +1 -0
  145. package/built-in-copy/websocket/index.esm.js +43 -0
  146. package/built-in-copy/websocket/index.esm.js.map +1 -0
  147. package/bundle/index.iife.js +1167 -5
  148. package/bundle/index.iife.js.map +1 -1
  149. package/bundle/index.iife.min.js +1 -1
  150. package/bundle/index.iife.min.js.map +1 -1
  151. package/bundle/index.umd.js +1167 -5
  152. package/bundle/index.umd.js.map +1 -1
  153. package/bundle/index.umd.min.js +1 -1
  154. package/bundle/index.umd.min.js.map +1 -1
  155. package/index.cjs.js +1167 -5
  156. package/index.cjs.js.map +1 -1
  157. package/index.d.ts +32 -3
  158. package/index.d.ts.map +1 -1
  159. package/index.esm.js +1151 -6
  160. package/index.esm.js.map +1 -1
  161. package/lib/locked-prop-descriptors.d.ts.map +1 -0
  162. package/lib/locked-props.d.ts.map +1 -0
  163. package/{locked.d.ts → lib/locked.d.ts} +12 -1
  164. package/lib/locked.d.ts.map +1 -0
  165. package/locked/index.cjs.js +107 -0
  166. package/locked/index.cjs.js.map +1 -0
  167. package/locked/index.d.ts +2 -0
  168. package/locked/index.d.ts.map +1 -0
  169. package/locked/index.esm.js +105 -0
  170. package/locked/index.esm.js.map +1 -0
  171. package/locked-prop-descriptors/index.cjs.js +11 -0
  172. package/locked-prop-descriptors/index.cjs.js.map +1 -0
  173. package/locked-prop-descriptors/index.d.ts +2 -0
  174. package/locked-prop-descriptors/index.d.ts.map +1 -0
  175. package/locked-prop-descriptors/index.esm.js +9 -0
  176. package/locked-prop-descriptors/index.esm.js.map +1 -0
  177. package/locked-props/index.cjs.js +32 -0
  178. package/locked-props/index.cjs.js.map +1 -0
  179. package/locked-props/index.d.ts +2 -0
  180. package/locked-props/index.d.ts.map +1 -0
  181. package/locked-props/index.esm.js +30 -0
  182. package/locked-props/index.esm.js.map +1 -0
  183. package/package.json +149 -14
  184. package/locked-prop-descriptors.d.ts.map +0 -1
  185. package/locked-props.d.ts.map +0 -1
  186. package/locked.d.ts.map +0 -1
  187. /package/{locked-prop-descriptors.d.ts → lib/locked-prop-descriptors.d.ts} +0 -0
  188. /package/{locked-props.d.ts → lib/locked-props.d.ts} +0 -0
@@ -0,0 +1,123 @@
1
+ 'use strict';
2
+
3
+ /**
4
+ * Safe copies of Symbol built-in and well-known symbols.
5
+ *
6
+ * These references are captured at module initialization time to protect against
7
+ * prototype pollution attacks. Import only what you need for tree-shaking.
8
+ *
9
+ * @module @hyperfrontend/immutable-api-utils/built-in-copy/symbol
10
+ */
11
+ // Capture references at module initialization time
12
+ const _Symbol = globalThis.Symbol;
13
+ const _freeze = globalThis.Object.freeze;
14
+ /**
15
+ * (Safe copy) Creates a new Symbol with optional description.
16
+ * Use this instead of `Symbol()`.
17
+ *
18
+ * @param description - Optional description for the symbol.
19
+ * @returns A new Symbol.
20
+ */
21
+ const createSymbol = (description) => _Symbol(description);
22
+ /**
23
+ * (Safe copy) Returns a Symbol object from the global symbol registry.
24
+ */
25
+ const symbolFor = _Symbol.for;
26
+ /**
27
+ * (Safe copy) Returns a key from the global symbol registry.
28
+ */
29
+ const symbolKeyFor = _Symbol.keyFor;
30
+ // Well-known symbols (captured)
31
+ /**
32
+ * (Safe copy) A method that returns the default iterator for an object.
33
+ */
34
+ const symbolIterator = _Symbol.iterator;
35
+ /**
36
+ * (Safe copy) A method that returns the default async iterator for an object.
37
+ */
38
+ const symbolAsyncIterator = _Symbol.asyncIterator;
39
+ /**
40
+ * (Safe copy) A method that converts an object to a primitive value.
41
+ */
42
+ const symbolToStringTag = _Symbol.toStringTag;
43
+ /**
44
+ * (Safe copy) A method that determines if a constructor object recognizes an object as its instance.
45
+ */
46
+ const symbolHasInstance = _Symbol.hasInstance;
47
+ /**
48
+ * (Safe copy) A Boolean value indicating if an object should be flattened to its array elements.
49
+ */
50
+ const symbolIsConcatSpreadable = _Symbol.isConcatSpreadable;
51
+ /**
52
+ * (Safe copy) A method that matches against a string.
53
+ */
54
+ const symbolMatch = _Symbol.match;
55
+ /**
56
+ * (Safe copy) A method that returns an index within a string that matches the regular expression.
57
+ */
58
+ const symbolMatchAll = _Symbol.matchAll;
59
+ /**
60
+ * (Safe copy) A method that replaces matched substrings of a string.
61
+ */
62
+ const symbolReplace = _Symbol.replace;
63
+ /**
64
+ * (Safe copy) A method that returns the index within a string that matches the regular expression.
65
+ */
66
+ const symbolSearch = _Symbol.search;
67
+ /**
68
+ * (Safe copy) A method that splits a string at the indices that match a regular expression.
69
+ */
70
+ const symbolSplit = _Symbol.split;
71
+ /**
72
+ * (Safe copy) A function valued property that is the constructor function that is used to create derived objects.
73
+ */
74
+ const symbolSpecies = _Symbol.species;
75
+ /**
76
+ * (Safe copy) A method that converts an object to a primitive value.
77
+ */
78
+ const symbolToPrimitive = _Symbol.toPrimitive;
79
+ /**
80
+ * (Safe copy) An Object whose own property names are property names that are excluded from the with environment bindings.
81
+ */
82
+ const symbolUnscopables = _Symbol.unscopables;
83
+ /**
84
+ * (Safe copy) Namespace object containing Symbol utilities and well-known symbols.
85
+ * Note: Importing this imports all symbols in this namespace (no tree-shaking).
86
+ */
87
+ const Symbol = _freeze({
88
+ create: createSymbol,
89
+ for: symbolFor,
90
+ keyFor: symbolKeyFor,
91
+ iterator: symbolIterator,
92
+ asyncIterator: symbolAsyncIterator,
93
+ toStringTag: symbolToStringTag,
94
+ hasInstance: symbolHasInstance,
95
+ isConcatSpreadable: symbolIsConcatSpreadable,
96
+ match: symbolMatch,
97
+ matchAll: symbolMatchAll,
98
+ replace: symbolReplace,
99
+ search: symbolSearch,
100
+ split: symbolSplit,
101
+ species: symbolSpecies,
102
+ toPrimitive: symbolToPrimitive,
103
+ unscopables: symbolUnscopables,
104
+ });
105
+
106
+ exports.Symbol = Symbol;
107
+ exports.createSymbol = createSymbol;
108
+ exports.symbolAsyncIterator = symbolAsyncIterator;
109
+ exports.symbolFor = symbolFor;
110
+ exports.symbolHasInstance = symbolHasInstance;
111
+ exports.symbolIsConcatSpreadable = symbolIsConcatSpreadable;
112
+ exports.symbolIterator = symbolIterator;
113
+ exports.symbolKeyFor = symbolKeyFor;
114
+ exports.symbolMatch = symbolMatch;
115
+ exports.symbolMatchAll = symbolMatchAll;
116
+ exports.symbolReplace = symbolReplace;
117
+ exports.symbolSearch = symbolSearch;
118
+ exports.symbolSpecies = symbolSpecies;
119
+ exports.symbolSplit = symbolSplit;
120
+ exports.symbolToPrimitive = symbolToPrimitive;
121
+ exports.symbolToStringTag = symbolToStringTag;
122
+ exports.symbolUnscopables = symbolUnscopables;
123
+ //# sourceMappingURL=index.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs.js","sources":["../../../../../../../../../../../libs/utils/immutable-api/src/built-in-copy/symbol/index.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;;;;;;;AAOG;AAEH;AACA,MAAM,OAAO,GAAG,UAAU,CAAC,MAAM;AACjC,MAAM,OAAO,GAAG,UAAU,CAAC,MAAM,CAAC,MAAM;AAExC;;;;;;AAMG;AACI,MAAM,YAAY,GAAG,CAAC,WAA6B,KAAa,OAAO,CAAC,WAAW;AAE1F;;AAEG;AACI,MAAM,SAAS,GAAG,OAAO,CAAC;AAEjC;;AAEG;AACI,MAAM,YAAY,GAAG,OAAO,CAAC;AAEpC;AACA;;AAEG;AACI,MAAM,cAAc,GAAG,OAAO,CAAC;AAEtC;;AAEG;AACI,MAAM,mBAAmB,GAAG,OAAO,CAAC;AAE3C;;AAEG;AACI,MAAM,iBAAiB,GAAG,OAAO,CAAC;AAEzC;;AAEG;AACI,MAAM,iBAAiB,GAAG,OAAO,CAAC;AAEzC;;AAEG;AACI,MAAM,wBAAwB,GAAG,OAAO,CAAC;AAEhD;;AAEG;AACI,MAAM,WAAW,GAAG,OAAO,CAAC;AAEnC;;AAEG;AACI,MAAM,cAAc,GAAG,OAAO,CAAC;AAEtC;;AAEG;AACI,MAAM,aAAa,GAAG,OAAO,CAAC;AAErC;;AAEG;AACI,MAAM,YAAY,GAAG,OAAO,CAAC;AAEpC;;AAEG;AACI,MAAM,WAAW,GAAG,OAAO,CAAC;AAEnC;;AAEG;AACI,MAAM,aAAa,GAAG,OAAO,CAAC;AAErC;;AAEG;AACI,MAAM,iBAAiB,GAAG,OAAO,CAAC;AAEzC;;AAEG;AACI,MAAM,iBAAiB,GAAG,OAAO,CAAC;AAEzC;;;AAGG;AACI,MAAM,MAAM,GAAG,OAAO,CAAQ;AACnC,IAAA,MAAM,EAAE,YAAY;AACpB,IAAA,GAAG,EAAE,SAAS;AACd,IAAA,MAAM,EAAE,YAAY;AACpB,IAAA,QAAQ,EAAE,cAAc;AACxB,IAAA,aAAa,EAAE,mBAAmB;AAClC,IAAA,WAAW,EAAE,iBAAiB;AAC9B,IAAA,WAAW,EAAE,iBAAiB;AAC9B,IAAA,kBAAkB,EAAE,wBAAwB;AAC5C,IAAA,KAAK,EAAE,WAAW;AAClB,IAAA,QAAQ,EAAE,cAAc;AACxB,IAAA,OAAO,EAAE,aAAa;AACtB,IAAA,MAAM,EAAE,YAAY;AACpB,IAAA,KAAK,EAAE,WAAW;AAClB,IAAA,OAAO,EAAE,aAAa;AACtB,IAAA,WAAW,EAAE,iBAAiB;AAC9B,IAAA,WAAW,EAAE,iBAAiB;AAC/B,CAAA;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,99 @@
1
+ /**
2
+ * Safe copies of Symbol built-in and well-known symbols.
3
+ *
4
+ * These references are captured at module initialization time to protect against
5
+ * prototype pollution attacks. Import only what you need for tree-shaking.
6
+ *
7
+ * @module @hyperfrontend/immutable-api-utils/built-in-copy/symbol
8
+ */
9
+ /**
10
+ * (Safe copy) Creates a new Symbol with optional description.
11
+ * Use this instead of `Symbol()`.
12
+ *
13
+ * @param description - Optional description for the symbol.
14
+ * @returns A new Symbol.
15
+ */
16
+ export declare const createSymbol: (description?: string | number) => symbol;
17
+ /**
18
+ * (Safe copy) Returns a Symbol object from the global symbol registry.
19
+ */
20
+ export declare const symbolFor: (key: string) => symbol;
21
+ /**
22
+ * (Safe copy) Returns a key from the global symbol registry.
23
+ */
24
+ export declare const symbolKeyFor: (sym: symbol) => string | undefined;
25
+ /**
26
+ * (Safe copy) A method that returns the default iterator for an object.
27
+ */
28
+ export declare const symbolIterator: symbol;
29
+ /**
30
+ * (Safe copy) A method that returns the default async iterator for an object.
31
+ */
32
+ export declare const symbolAsyncIterator: symbol;
33
+ /**
34
+ * (Safe copy) A method that converts an object to a primitive value.
35
+ */
36
+ export declare const symbolToStringTag: symbol;
37
+ /**
38
+ * (Safe copy) A method that determines if a constructor object recognizes an object as its instance.
39
+ */
40
+ export declare const symbolHasInstance: symbol;
41
+ /**
42
+ * (Safe copy) A Boolean value indicating if an object should be flattened to its array elements.
43
+ */
44
+ export declare const symbolIsConcatSpreadable: symbol;
45
+ /**
46
+ * (Safe copy) A method that matches against a string.
47
+ */
48
+ export declare const symbolMatch: symbol;
49
+ /**
50
+ * (Safe copy) A method that returns an index within a string that matches the regular expression.
51
+ */
52
+ export declare const symbolMatchAll: symbol;
53
+ /**
54
+ * (Safe copy) A method that replaces matched substrings of a string.
55
+ */
56
+ export declare const symbolReplace: symbol;
57
+ /**
58
+ * (Safe copy) A method that returns the index within a string that matches the regular expression.
59
+ */
60
+ export declare const symbolSearch: symbol;
61
+ /**
62
+ * (Safe copy) A method that splits a string at the indices that match a regular expression.
63
+ */
64
+ export declare const symbolSplit: symbol;
65
+ /**
66
+ * (Safe copy) A function valued property that is the constructor function that is used to create derived objects.
67
+ */
68
+ export declare const symbolSpecies: symbol;
69
+ /**
70
+ * (Safe copy) A method that converts an object to a primitive value.
71
+ */
72
+ export declare const symbolToPrimitive: symbol;
73
+ /**
74
+ * (Safe copy) An Object whose own property names are property names that are excluded from the with environment bindings.
75
+ */
76
+ export declare const symbolUnscopables: symbol;
77
+ /**
78
+ * (Safe copy) Namespace object containing Symbol utilities and well-known symbols.
79
+ * Note: Importing this imports all symbols in this namespace (no tree-shaking).
80
+ */
81
+ export declare const Symbol: Readonly<{
82
+ readonly create: (description?: string | number) => symbol;
83
+ readonly for: (key: string) => symbol;
84
+ readonly keyFor: (sym: symbol) => string | undefined;
85
+ readonly iterator: symbol;
86
+ readonly asyncIterator: symbol;
87
+ readonly toStringTag: symbol;
88
+ readonly hasInstance: symbol;
89
+ readonly isConcatSpreadable: symbol;
90
+ readonly match: symbol;
91
+ readonly matchAll: symbol;
92
+ readonly replace: symbol;
93
+ readonly search: symbol;
94
+ readonly split: symbol;
95
+ readonly species: symbol;
96
+ readonly toPrimitive: symbol;
97
+ readonly unscopables: symbol;
98
+ }>;
99
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../../../libs/utils/immutable-api/src/built-in-copy/symbol/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAMH;;;;;;GAMG;AACH,eAAO,MAAM,YAAY,GAAI,cAAc,MAAM,GAAG,MAAM,KAAG,MAA8B,CAAA;AAE3F;;GAEG;AACH,eAAO,MAAM,SAAS,yBAAc,CAAA;AAEpC;;GAEG;AACH,eAAO,MAAM,YAAY,qCAAiB,CAAA;AAG1C;;GAEG;AACH,eAAO,MAAM,cAAc,QAAmB,CAAA;AAE9C;;GAEG;AACH,eAAO,MAAM,mBAAmB,QAAwB,CAAA;AAExD;;GAEG;AACH,eAAO,MAAM,iBAAiB,QAAsB,CAAA;AAEpD;;GAEG;AACH,eAAO,MAAM,iBAAiB,QAAsB,CAAA;AAEpD;;GAEG;AACH,eAAO,MAAM,wBAAwB,QAA6B,CAAA;AAElE;;GAEG;AACH,eAAO,MAAM,WAAW,QAAgB,CAAA;AAExC;;GAEG;AACH,eAAO,MAAM,cAAc,QAAmB,CAAA;AAE9C;;GAEG;AACH,eAAO,MAAM,aAAa,QAAkB,CAAA;AAE5C;;GAEG;AACH,eAAO,MAAM,YAAY,QAAiB,CAAA;AAE1C;;GAEG;AACH,eAAO,MAAM,WAAW,QAAgB,CAAA;AAExC;;GAEG;AACH,eAAO,MAAM,aAAa,QAAkB,CAAA;AAE5C;;GAEG;AACH,eAAO,MAAM,iBAAiB,QAAsB,CAAA;AAEpD;;GAEG;AACH,eAAO,MAAM,iBAAiB,QAAsB,CAAA;AAEpD;;;GAGG;AACH,eAAO,MAAM,MAAM;oCAlFwB,MAAM,GAAG,MAAM,KAAG,MAAM;;;;;;;;;;;;;;;;EAmGjE,CAAA"}
@@ -0,0 +1,105 @@
1
+ /**
2
+ * Safe copies of Symbol built-in and well-known symbols.
3
+ *
4
+ * These references are captured at module initialization time to protect against
5
+ * prototype pollution attacks. Import only what you need for tree-shaking.
6
+ *
7
+ * @module @hyperfrontend/immutable-api-utils/built-in-copy/symbol
8
+ */
9
+ // Capture references at module initialization time
10
+ const _Symbol = globalThis.Symbol;
11
+ const _freeze = globalThis.Object.freeze;
12
+ /**
13
+ * (Safe copy) Creates a new Symbol with optional description.
14
+ * Use this instead of `Symbol()`.
15
+ *
16
+ * @param description - Optional description for the symbol.
17
+ * @returns A new Symbol.
18
+ */
19
+ const createSymbol = (description) => _Symbol(description);
20
+ /**
21
+ * (Safe copy) Returns a Symbol object from the global symbol registry.
22
+ */
23
+ const symbolFor = _Symbol.for;
24
+ /**
25
+ * (Safe copy) Returns a key from the global symbol registry.
26
+ */
27
+ const symbolKeyFor = _Symbol.keyFor;
28
+ // Well-known symbols (captured)
29
+ /**
30
+ * (Safe copy) A method that returns the default iterator for an object.
31
+ */
32
+ const symbolIterator = _Symbol.iterator;
33
+ /**
34
+ * (Safe copy) A method that returns the default async iterator for an object.
35
+ */
36
+ const symbolAsyncIterator = _Symbol.asyncIterator;
37
+ /**
38
+ * (Safe copy) A method that converts an object to a primitive value.
39
+ */
40
+ const symbolToStringTag = _Symbol.toStringTag;
41
+ /**
42
+ * (Safe copy) A method that determines if a constructor object recognizes an object as its instance.
43
+ */
44
+ const symbolHasInstance = _Symbol.hasInstance;
45
+ /**
46
+ * (Safe copy) A Boolean value indicating if an object should be flattened to its array elements.
47
+ */
48
+ const symbolIsConcatSpreadable = _Symbol.isConcatSpreadable;
49
+ /**
50
+ * (Safe copy) A method that matches against a string.
51
+ */
52
+ const symbolMatch = _Symbol.match;
53
+ /**
54
+ * (Safe copy) A method that returns an index within a string that matches the regular expression.
55
+ */
56
+ const symbolMatchAll = _Symbol.matchAll;
57
+ /**
58
+ * (Safe copy) A method that replaces matched substrings of a string.
59
+ */
60
+ const symbolReplace = _Symbol.replace;
61
+ /**
62
+ * (Safe copy) A method that returns the index within a string that matches the regular expression.
63
+ */
64
+ const symbolSearch = _Symbol.search;
65
+ /**
66
+ * (Safe copy) A method that splits a string at the indices that match a regular expression.
67
+ */
68
+ const symbolSplit = _Symbol.split;
69
+ /**
70
+ * (Safe copy) A function valued property that is the constructor function that is used to create derived objects.
71
+ */
72
+ const symbolSpecies = _Symbol.species;
73
+ /**
74
+ * (Safe copy) A method that converts an object to a primitive value.
75
+ */
76
+ const symbolToPrimitive = _Symbol.toPrimitive;
77
+ /**
78
+ * (Safe copy) An Object whose own property names are property names that are excluded from the with environment bindings.
79
+ */
80
+ const symbolUnscopables = _Symbol.unscopables;
81
+ /**
82
+ * (Safe copy) Namespace object containing Symbol utilities and well-known symbols.
83
+ * Note: Importing this imports all symbols in this namespace (no tree-shaking).
84
+ */
85
+ const Symbol = _freeze({
86
+ create: createSymbol,
87
+ for: symbolFor,
88
+ keyFor: symbolKeyFor,
89
+ iterator: symbolIterator,
90
+ asyncIterator: symbolAsyncIterator,
91
+ toStringTag: symbolToStringTag,
92
+ hasInstance: symbolHasInstance,
93
+ isConcatSpreadable: symbolIsConcatSpreadable,
94
+ match: symbolMatch,
95
+ matchAll: symbolMatchAll,
96
+ replace: symbolReplace,
97
+ search: symbolSearch,
98
+ split: symbolSplit,
99
+ species: symbolSpecies,
100
+ toPrimitive: symbolToPrimitive,
101
+ unscopables: symbolUnscopables,
102
+ });
103
+
104
+ export { Symbol, createSymbol, symbolAsyncIterator, symbolFor, symbolHasInstance, symbolIsConcatSpreadable, symbolIterator, symbolKeyFor, symbolMatch, symbolMatchAll, symbolReplace, symbolSearch, symbolSpecies, symbolSplit, symbolToPrimitive, symbolToStringTag, symbolUnscopables };
105
+ //# sourceMappingURL=index.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.esm.js","sources":["../../../../../../../../../../../libs/utils/immutable-api/src/built-in-copy/symbol/index.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAA;;;;;;;AAOG;AAEH;AACA,MAAM,OAAO,GAAG,UAAU,CAAC,MAAM;AACjC,MAAM,OAAO,GAAG,UAAU,CAAC,MAAM,CAAC,MAAM;AAExC;;;;;;AAMG;AACI,MAAM,YAAY,GAAG,CAAC,WAA6B,KAAa,OAAO,CAAC,WAAW;AAE1F;;AAEG;AACI,MAAM,SAAS,GAAG,OAAO,CAAC;AAEjC;;AAEG;AACI,MAAM,YAAY,GAAG,OAAO,CAAC;AAEpC;AACA;;AAEG;AACI,MAAM,cAAc,GAAG,OAAO,CAAC;AAEtC;;AAEG;AACI,MAAM,mBAAmB,GAAG,OAAO,CAAC;AAE3C;;AAEG;AACI,MAAM,iBAAiB,GAAG,OAAO,CAAC;AAEzC;;AAEG;AACI,MAAM,iBAAiB,GAAG,OAAO,CAAC;AAEzC;;AAEG;AACI,MAAM,wBAAwB,GAAG,OAAO,CAAC;AAEhD;;AAEG;AACI,MAAM,WAAW,GAAG,OAAO,CAAC;AAEnC;;AAEG;AACI,MAAM,cAAc,GAAG,OAAO,CAAC;AAEtC;;AAEG;AACI,MAAM,aAAa,GAAG,OAAO,CAAC;AAErC;;AAEG;AACI,MAAM,YAAY,GAAG,OAAO,CAAC;AAEpC;;AAEG;AACI,MAAM,WAAW,GAAG,OAAO,CAAC;AAEnC;;AAEG;AACI,MAAM,aAAa,GAAG,OAAO,CAAC;AAErC;;AAEG;AACI,MAAM,iBAAiB,GAAG,OAAO,CAAC;AAEzC;;AAEG;AACI,MAAM,iBAAiB,GAAG,OAAO,CAAC;AAEzC;;;AAGG;AACI,MAAM,MAAM,GAAG,OAAO,CAAQ;AACnC,IAAA,MAAM,EAAE,YAAY;AACpB,IAAA,GAAG,EAAE,SAAS;AACd,IAAA,MAAM,EAAE,YAAY;AACpB,IAAA,QAAQ,EAAE,cAAc;AACxB,IAAA,aAAa,EAAE,mBAAmB;AAClC,IAAA,WAAW,EAAE,iBAAiB;AAC9B,IAAA,WAAW,EAAE,iBAAiB;AAC9B,IAAA,kBAAkB,EAAE,wBAAwB;AAC5C,IAAA,KAAK,EAAE,WAAW;AAClB,IAAA,QAAQ,EAAE,cAAc;AACxB,IAAA,OAAO,EAAE,aAAa;AACtB,IAAA,MAAM,EAAE,YAAY;AACpB,IAAA,KAAK,EAAE,WAAW;AAClB,IAAA,OAAO,EAAE,aAAa;AACtB,IAAA,WAAW,EAAE,iBAAiB;AAC9B,IAAA,WAAW,EAAE,iBAAiB;AAC/B,CAAA;;;;"}
@@ -0,0 +1,105 @@
1
+ 'use strict';
2
+
3
+ /**
4
+ * Safe copies of Timer/Scheduling built-in functions.
5
+ *
6
+ * These references are captured at module initialization time to protect against
7
+ * prototype pollution attacks. Import only what you need for tree-shaking.
8
+ *
9
+ * @module @hyperfrontend/immutable-api-utils/built-in-copy/timers
10
+ */
11
+ // Capture references at module initialization time
12
+ const _setTimeout = globalThis.setTimeout;
13
+ const _setInterval = globalThis.setInterval;
14
+ const _clearTimeout = globalThis.clearTimeout;
15
+ const _clearInterval = globalThis.clearInterval;
16
+ const _queueMicrotask = globalThis.queueMicrotask;
17
+ const _requestAnimationFrame = typeof globalThis.requestAnimationFrame === 'function' ? globalThis.requestAnimationFrame : undefined;
18
+ const _cancelAnimationFrame = typeof globalThis.cancelAnimationFrame === 'function' ? globalThis.cancelAnimationFrame : undefined;
19
+ const _freeze = globalThis.Object.freeze;
20
+ /**
21
+ * (Safe copy) Sets a timer which executes a function once the timer expires.
22
+ *
23
+ * @param callback - Function to call when the timer elapses.
24
+ * @param delay - Time in milliseconds before executing.
25
+ * @param args - Additional arguments to pass to the callback.
26
+ * @returns A numeric ID for the timer.
27
+ */
28
+ const setTimeout = (callback, delay, ...args) => _setTimeout(callback, delay, ...args);
29
+ /**
30
+ * (Safe copy) Repeatedly calls a function with a fixed time delay between each call.
31
+ *
32
+ * @param callback - Function to call at each interval.
33
+ * @param delay - Time in milliseconds between calls.
34
+ * @param args - Additional arguments to pass to the callback.
35
+ * @returns A numeric ID for the interval.
36
+ */
37
+ const setInterval = (callback, delay, ...args) => _setInterval(callback, delay, ...args);
38
+ /**
39
+ * (Safe copy) Cancels a timeout previously established by setTimeout.
40
+ *
41
+ * @param id - The identifier of the timeout to cancel.
42
+ */
43
+ const clearTimeout = (id) => {
44
+ _clearTimeout(id);
45
+ };
46
+ /**
47
+ * (Safe copy) Cancels a timed, repeating action previously established by setInterval.
48
+ *
49
+ * @param id - The identifier of the interval to cancel.
50
+ */
51
+ const clearInterval = (id) => {
52
+ _clearInterval(id);
53
+ };
54
+ /**
55
+ * (Safe copy) Queues a microtask to be executed before control returns to the event loop.
56
+ *
57
+ * @param callback - Function to execute.
58
+ */
59
+ const queueMicrotask = (callback) => {
60
+ _queueMicrotask(callback);
61
+ };
62
+ /**
63
+ * (Safe copy) Requests the browser to call a function before the next repaint.
64
+ * Available only in browser environments.
65
+ *
66
+ * @param callback - Function to call before repaint.
67
+ * @returns A request ID or undefined if not available.
68
+ */
69
+ const requestAnimationFrame = _requestAnimationFrame
70
+ ? (callback) => _requestAnimationFrame(callback)
71
+ : undefined;
72
+ /**
73
+ * (Safe copy) Cancels an animation frame request previously scheduled.
74
+ * Available only in browser environments.
75
+ *
76
+ * @param handle - The ID value returned by requestAnimationFrame.
77
+ */
78
+ const cancelAnimationFrame = _cancelAnimationFrame
79
+ ? (handle) => {
80
+ _cancelAnimationFrame(handle);
81
+ }
82
+ : undefined;
83
+ /**
84
+ * (Safe copy) Namespace object containing all Timer/Scheduling functions.
85
+ * Note: Importing this imports all methods in this namespace (no tree-shaking).
86
+ */
87
+ const Timers = _freeze({
88
+ setTimeout,
89
+ setInterval,
90
+ clearTimeout,
91
+ clearInterval,
92
+ queueMicrotask,
93
+ requestAnimationFrame,
94
+ cancelAnimationFrame,
95
+ });
96
+
97
+ exports.Timers = Timers;
98
+ exports.cancelAnimationFrame = cancelAnimationFrame;
99
+ exports.clearInterval = clearInterval;
100
+ exports.clearTimeout = clearTimeout;
101
+ exports.queueMicrotask = queueMicrotask;
102
+ exports.requestAnimationFrame = requestAnimationFrame;
103
+ exports.setInterval = setInterval;
104
+ exports.setTimeout = setTimeout;
105
+ //# sourceMappingURL=index.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs.js","sources":["../../../../../../../../../../../libs/utils/immutable-api/src/built-in-copy/timers/index.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;;;;;;;AAOG;AAEH;AACA,MAAM,WAAW,GAAG,UAAU,CAAC,UAAU;AACzC,MAAM,YAAY,GAAG,UAAU,CAAC,WAAW;AAC3C,MAAM,aAAa,GAAG,UAAU,CAAC,YAAY;AAC7C,MAAM,cAAc,GAAG,UAAU,CAAC,aAAa;AAC/C,MAAM,eAAe,GAAG,UAAU,CAAC,cAAc;AACjD,MAAM,sBAAsB,GAAG,OAAO,UAAU,CAAC,qBAAqB,KAAK,UAAU,GAAG,UAAU,CAAC,qBAAqB,GAAG,SAAS;AACpI,MAAM,qBAAqB,GAAG,OAAO,UAAU,CAAC,oBAAoB,KAAK,UAAU,GAAG,UAAU,CAAC,oBAAoB,GAAG,SAAS;AACjI,MAAM,OAAO,GAAG,UAAU,CAAC,MAAM,CAAC,MAAM;AAExC;;;;;;;AAOG;MACU,UAAU,GAAG,CACxB,QAAkC,EAClC,KAAc,EACd,GAAG,IAAW,KAC+B,WAAW,CAAC,QAAQ,EAAE,KAAK,EAAE,GAAG,IAAI;AAEnF;;;;;;;AAOG;MACU,WAAW,GAAG,CACzB,QAAkC,EAClC,KAAc,EACd,GAAG,IAAW,KACgC,YAAY,CAAC,QAAQ,EAAE,KAAK,EAAE,GAAG,IAAI;AAErF;;;;AAIG;AACI,MAAM,YAAY,GAAG,CAAC,EAAwD,KAAU;IAC7F,aAAa,CAAC,EAAE,CAAC;AACnB;AAEA;;;;AAIG;AACI,MAAM,aAAa,GAAG,CAAC,EAAyD,KAAU;IAC/F,cAAc,CAAC,EAAE,CAAC;AACpB;AAEA;;;;AAIG;AACI,MAAM,cAAc,GAAG,CAAC,QAAsB,KAAU;IAC7D,eAAe,CAAC,QAAQ,CAAC;AAC3B;AAEA;;;;;;AAMG;AACI,MAAM,qBAAqB,GAAG;MACjC,CAAC,QAA8B,KAAa,sBAAsB,CAAC,QAAQ;MAC3E;AAEJ;;;;;AAKG;AACI,MAAM,oBAAoB,GAAG;AAClC,MAAE,CAAC,MAAc,KAAU;QACvB,qBAAqB,CAAC,MAAM,CAAC;IAC/B;MACA;AAEJ;;;AAGG;AACI,MAAM,MAAM,GAAG,OAAO,CAAQ;IACnC,UAAU;IACV,WAAW;IACX,YAAY;IACZ,aAAa;IACb,cAAc;IACd,qBAAqB;IACrB,oBAAoB;AACrB,CAAA;;;;;;;;;;;"}
@@ -0,0 +1,73 @@
1
+ /**
2
+ * Safe copies of Timer/Scheduling built-in functions.
3
+ *
4
+ * These references are captured at module initialization time to protect against
5
+ * prototype pollution attacks. Import only what you need for tree-shaking.
6
+ *
7
+ * @module @hyperfrontend/immutable-api-utils/built-in-copy/timers
8
+ */
9
+ /**
10
+ * (Safe copy) Sets a timer which executes a function once the timer expires.
11
+ *
12
+ * @param callback - Function to call when the timer elapses.
13
+ * @param delay - Time in milliseconds before executing.
14
+ * @param args - Additional arguments to pass to the callback.
15
+ * @returns A numeric ID for the timer.
16
+ */
17
+ export declare const setTimeout: <TArgs extends unknown[]>(callback: (...args: TArgs) => void, delay?: number, ...args: TArgs) => ReturnType<typeof globalThis.setTimeout>;
18
+ /**
19
+ * (Safe copy) Repeatedly calls a function with a fixed time delay between each call.
20
+ *
21
+ * @param callback - Function to call at each interval.
22
+ * @param delay - Time in milliseconds between calls.
23
+ * @param args - Additional arguments to pass to the callback.
24
+ * @returns A numeric ID for the interval.
25
+ */
26
+ export declare const setInterval: <TArgs extends unknown[]>(callback: (...args: TArgs) => void, delay?: number, ...args: TArgs) => ReturnType<typeof globalThis.setInterval>;
27
+ /**
28
+ * (Safe copy) Cancels a timeout previously established by setTimeout.
29
+ *
30
+ * @param id - The identifier of the timeout to cancel.
31
+ */
32
+ export declare const clearTimeout: (id: ReturnType<typeof globalThis.setTimeout> | undefined) => void;
33
+ /**
34
+ * (Safe copy) Cancels a timed, repeating action previously established by setInterval.
35
+ *
36
+ * @param id - The identifier of the interval to cancel.
37
+ */
38
+ export declare const clearInterval: (id: ReturnType<typeof globalThis.setInterval> | undefined) => void;
39
+ /**
40
+ * (Safe copy) Queues a microtask to be executed before control returns to the event loop.
41
+ *
42
+ * @param callback - Function to execute.
43
+ */
44
+ export declare const queueMicrotask: (callback: VoidFunction) => void;
45
+ /**
46
+ * (Safe copy) Requests the browser to call a function before the next repaint.
47
+ * Available only in browser environments.
48
+ *
49
+ * @param callback - Function to call before repaint.
50
+ * @returns A request ID or undefined if not available.
51
+ */
52
+ export declare const requestAnimationFrame: (callback: FrameRequestCallback) => number;
53
+ /**
54
+ * (Safe copy) Cancels an animation frame request previously scheduled.
55
+ * Available only in browser environments.
56
+ *
57
+ * @param handle - The ID value returned by requestAnimationFrame.
58
+ */
59
+ export declare const cancelAnimationFrame: (handle: number) => void;
60
+ /**
61
+ * (Safe copy) Namespace object containing all Timer/Scheduling functions.
62
+ * Note: Importing this imports all methods in this namespace (no tree-shaking).
63
+ */
64
+ export declare const Timers: Readonly<{
65
+ readonly setTimeout: <TArgs extends unknown[]>(callback: (...args: TArgs) => void, delay?: number, ...args: TArgs) => ReturnType<typeof globalThis.setTimeout>;
66
+ readonly setInterval: <TArgs extends unknown[]>(callback: (...args: TArgs) => void, delay?: number, ...args: TArgs) => ReturnType<typeof globalThis.setInterval>;
67
+ readonly clearTimeout: (id: ReturnType<typeof globalThis.setTimeout> | undefined) => void;
68
+ readonly clearInterval: (id: ReturnType<typeof globalThis.setInterval> | undefined) => void;
69
+ readonly queueMicrotask: (callback: VoidFunction) => void;
70
+ readonly requestAnimationFrame: (callback: FrameRequestCallback) => number;
71
+ readonly cancelAnimationFrame: (handle: number) => void;
72
+ }>;
73
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../../../libs/utils/immutable-api/src/built-in-copy/timers/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAYH;;;;;;;GAOG;AACH,eAAO,MAAM,UAAU,GAAI,KAAK,SAAS,OAAO,EAAE,EAChD,UAAU,CAAC,GAAG,IAAI,EAAE,KAAK,KAAK,IAAI,EAClC,QAAQ,MAAM,EACd,GAAG,MAAM,KAAK,KACb,UAAU,CAAC,OAAO,UAAU,CAAC,UAAU,CAA0C,CAAA;AAEpF;;;;;;;GAOG;AACH,eAAO,MAAM,WAAW,GAAI,KAAK,SAAS,OAAO,EAAE,EACjD,UAAU,CAAC,GAAG,IAAI,EAAE,KAAK,KAAK,IAAI,EAClC,QAAQ,MAAM,EACd,GAAG,MAAM,KAAK,KACb,UAAU,CAAC,OAAO,UAAU,CAAC,WAAW,CAA2C,CAAA;AAEtF;;;;GAIG;AACH,eAAO,MAAM,YAAY,GAAI,IAAI,UAAU,CAAC,OAAO,UAAU,CAAC,UAAU,CAAC,GAAG,SAAS,KAAG,IAEvF,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,aAAa,GAAI,IAAI,UAAU,CAAC,OAAO,UAAU,CAAC,WAAW,CAAC,GAAG,SAAS,KAAG,IAEzF,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,cAAc,GAAI,UAAU,YAAY,KAAG,IAEvD,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB,aACnB,oBAAoB,KAAG,MACzB,CAAA;AAEb;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,WACpB,MAAM,KAAG,IAGT,CAAA;AAEb;;;GAGG;AACH,eAAO,MAAM,MAAM;0BA1EQ,KAAK,SAAS,OAAO,EAAE,YACtC,CAAC,GAAG,IAAI,EAAE,KAAK,KAAK,IAAI,UAC1B,MAAM,WACL,KAAK,KACb,UAAU,CAAC,OAAO,UAAU,CAAC,UAAU,CAAC;2BAUf,KAAK,SAAS,OAAO,EAAE,YACvC,CAAC,GAAG,IAAI,EAAE,KAAK,KAAK,IAAI,UAC1B,MAAM,WACL,KAAK,KACb,UAAU,CAAC,OAAO,UAAU,CAAC,WAAW,CAAC;gCAOX,UAAU,CAAC,OAAO,UAAU,CAAC,UAAU,CAAC,GAAG,SAAS,KAAG,IAAI;iCAS1D,UAAU,CAAC,OAAO,UAAU,CAAC,WAAW,CAAC,GAAG,SAAS,KAAG,IAAI;wCASrD,YAAY,KAAG,IAAI;+CAY7C,oBAAoB,KAAG,MAAM;4CAU/B,MAAM,KAAG,IAAI;EAiBxB,CAAA"}
@@ -0,0 +1,96 @@
1
+ /**
2
+ * Safe copies of Timer/Scheduling built-in functions.
3
+ *
4
+ * These references are captured at module initialization time to protect against
5
+ * prototype pollution attacks. Import only what you need for tree-shaking.
6
+ *
7
+ * @module @hyperfrontend/immutable-api-utils/built-in-copy/timers
8
+ */
9
+ // Capture references at module initialization time
10
+ const _setTimeout = globalThis.setTimeout;
11
+ const _setInterval = globalThis.setInterval;
12
+ const _clearTimeout = globalThis.clearTimeout;
13
+ const _clearInterval = globalThis.clearInterval;
14
+ const _queueMicrotask = globalThis.queueMicrotask;
15
+ const _requestAnimationFrame = typeof globalThis.requestAnimationFrame === 'function' ? globalThis.requestAnimationFrame : undefined;
16
+ const _cancelAnimationFrame = typeof globalThis.cancelAnimationFrame === 'function' ? globalThis.cancelAnimationFrame : undefined;
17
+ const _freeze = globalThis.Object.freeze;
18
+ /**
19
+ * (Safe copy) Sets a timer which executes a function once the timer expires.
20
+ *
21
+ * @param callback - Function to call when the timer elapses.
22
+ * @param delay - Time in milliseconds before executing.
23
+ * @param args - Additional arguments to pass to the callback.
24
+ * @returns A numeric ID for the timer.
25
+ */
26
+ const setTimeout = (callback, delay, ...args) => _setTimeout(callback, delay, ...args);
27
+ /**
28
+ * (Safe copy) Repeatedly calls a function with a fixed time delay between each call.
29
+ *
30
+ * @param callback - Function to call at each interval.
31
+ * @param delay - Time in milliseconds between calls.
32
+ * @param args - Additional arguments to pass to the callback.
33
+ * @returns A numeric ID for the interval.
34
+ */
35
+ const setInterval = (callback, delay, ...args) => _setInterval(callback, delay, ...args);
36
+ /**
37
+ * (Safe copy) Cancels a timeout previously established by setTimeout.
38
+ *
39
+ * @param id - The identifier of the timeout to cancel.
40
+ */
41
+ const clearTimeout = (id) => {
42
+ _clearTimeout(id);
43
+ };
44
+ /**
45
+ * (Safe copy) Cancels a timed, repeating action previously established by setInterval.
46
+ *
47
+ * @param id - The identifier of the interval to cancel.
48
+ */
49
+ const clearInterval = (id) => {
50
+ _clearInterval(id);
51
+ };
52
+ /**
53
+ * (Safe copy) Queues a microtask to be executed before control returns to the event loop.
54
+ *
55
+ * @param callback - Function to execute.
56
+ */
57
+ const queueMicrotask = (callback) => {
58
+ _queueMicrotask(callback);
59
+ };
60
+ /**
61
+ * (Safe copy) Requests the browser to call a function before the next repaint.
62
+ * Available only in browser environments.
63
+ *
64
+ * @param callback - Function to call before repaint.
65
+ * @returns A request ID or undefined if not available.
66
+ */
67
+ const requestAnimationFrame = _requestAnimationFrame
68
+ ? (callback) => _requestAnimationFrame(callback)
69
+ : undefined;
70
+ /**
71
+ * (Safe copy) Cancels an animation frame request previously scheduled.
72
+ * Available only in browser environments.
73
+ *
74
+ * @param handle - The ID value returned by requestAnimationFrame.
75
+ */
76
+ const cancelAnimationFrame = _cancelAnimationFrame
77
+ ? (handle) => {
78
+ _cancelAnimationFrame(handle);
79
+ }
80
+ : undefined;
81
+ /**
82
+ * (Safe copy) Namespace object containing all Timer/Scheduling functions.
83
+ * Note: Importing this imports all methods in this namespace (no tree-shaking).
84
+ */
85
+ const Timers = _freeze({
86
+ setTimeout,
87
+ setInterval,
88
+ clearTimeout,
89
+ clearInterval,
90
+ queueMicrotask,
91
+ requestAnimationFrame,
92
+ cancelAnimationFrame,
93
+ });
94
+
95
+ export { Timers, cancelAnimationFrame, clearInterval, clearTimeout, queueMicrotask, requestAnimationFrame, setInterval, setTimeout };
96
+ //# sourceMappingURL=index.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.esm.js","sources":["../../../../../../../../../../../libs/utils/immutable-api/src/built-in-copy/timers/index.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAA;;;;;;;AAOG;AAEH;AACA,MAAM,WAAW,GAAG,UAAU,CAAC,UAAU;AACzC,MAAM,YAAY,GAAG,UAAU,CAAC,WAAW;AAC3C,MAAM,aAAa,GAAG,UAAU,CAAC,YAAY;AAC7C,MAAM,cAAc,GAAG,UAAU,CAAC,aAAa;AAC/C,MAAM,eAAe,GAAG,UAAU,CAAC,cAAc;AACjD,MAAM,sBAAsB,GAAG,OAAO,UAAU,CAAC,qBAAqB,KAAK,UAAU,GAAG,UAAU,CAAC,qBAAqB,GAAG,SAAS;AACpI,MAAM,qBAAqB,GAAG,OAAO,UAAU,CAAC,oBAAoB,KAAK,UAAU,GAAG,UAAU,CAAC,oBAAoB,GAAG,SAAS;AACjI,MAAM,OAAO,GAAG,UAAU,CAAC,MAAM,CAAC,MAAM;AAExC;;;;;;;AAOG;MACU,UAAU,GAAG,CACxB,QAAkC,EAClC,KAAc,EACd,GAAG,IAAW,KAC+B,WAAW,CAAC,QAAQ,EAAE,KAAK,EAAE,GAAG,IAAI;AAEnF;;;;;;;AAOG;MACU,WAAW,GAAG,CACzB,QAAkC,EAClC,KAAc,EACd,GAAG,IAAW,KACgC,YAAY,CAAC,QAAQ,EAAE,KAAK,EAAE,GAAG,IAAI;AAErF;;;;AAIG;AACI,MAAM,YAAY,GAAG,CAAC,EAAwD,KAAU;IAC7F,aAAa,CAAC,EAAE,CAAC;AACnB;AAEA;;;;AAIG;AACI,MAAM,aAAa,GAAG,CAAC,EAAyD,KAAU;IAC/F,cAAc,CAAC,EAAE,CAAC;AACpB;AAEA;;;;AAIG;AACI,MAAM,cAAc,GAAG,CAAC,QAAsB,KAAU;IAC7D,eAAe,CAAC,QAAQ,CAAC;AAC3B;AAEA;;;;;;AAMG;AACI,MAAM,qBAAqB,GAAG;MACjC,CAAC,QAA8B,KAAa,sBAAsB,CAAC,QAAQ;MAC3E;AAEJ;;;;;AAKG;AACI,MAAM,oBAAoB,GAAG;AAClC,MAAE,CAAC,MAAc,KAAU;QACvB,qBAAqB,CAAC,MAAM,CAAC;IAC/B;MACA;AAEJ;;;AAGG;AACI,MAAM,MAAM,GAAG,OAAO,CAAQ;IACnC,UAAU;IACV,WAAW;IACX,YAAY;IACZ,aAAa;IACb,cAAc;IACd,qBAAqB;IACrB,oBAAoB;AACrB,CAAA;;;;"}