ag-common 0.0.894 → 0.0.896

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 (236) hide show
  1. package/LICENSE.md +2 -3
  2. package/README.md +2 -2
  3. package/dist/api/helpers/acm.d.ts +1 -1
  4. package/dist/api/helpers/acm.js +3 -3
  5. package/dist/api/helpers/api.d.ts +2 -2
  6. package/dist/api/helpers/api.js +26 -22
  7. package/dist/api/helpers/apigw.js +4 -4
  8. package/dist/api/helpers/aws.js +2 -2
  9. package/dist/api/helpers/cosmos/delete.d.ts +1 -1
  10. package/dist/api/helpers/cosmos/delete.js +15 -16
  11. package/dist/api/helpers/cosmos/get.d.ts +3 -3
  12. package/dist/api/helpers/cosmos/get.js +26 -32
  13. package/dist/api/helpers/cosmos/index.d.ts +3 -3
  14. package/dist/api/helpers/cosmos/index.js +1 -1
  15. package/dist/api/helpers/cosmos/utils.d.ts +1 -1
  16. package/dist/api/helpers/cosmos/utils.js +3 -7
  17. package/dist/api/helpers/cosmos/write.d.ts +1 -1
  18. package/dist/api/helpers/cosmos/write.js +11 -12
  19. package/dist/api/helpers/dynamo/delete.d.ts +1 -1
  20. package/dist/api/helpers/dynamo/delete.js +3 -3
  21. package/dist/api/helpers/dynamo/get.d.ts +2 -2
  22. package/dist/api/helpers/dynamo/get.js +20 -14
  23. package/dist/api/helpers/dynamo/index.d.ts +10 -38
  24. package/dist/api/helpers/dynamo/index.js +4 -4
  25. package/dist/api/helpers/dynamo/set.d.ts +1 -1
  26. package/dist/api/helpers/dynamo/set.js +10 -10
  27. package/dist/api/helpers/dynamo/types.d.ts +3 -3
  28. package/dist/api/helpers/dynamo/types.js +1 -1
  29. package/dist/api/helpers/enforceDynamoProvisionCap.d.ts +13 -1
  30. package/dist/api/helpers/enforceDynamoProvisionCap.js +3 -4
  31. package/dist/api/helpers/google/apikey.js +1 -1
  32. package/dist/api/helpers/google/gemini.d.ts +1 -1
  33. package/dist/api/helpers/google/gemini.js +43 -45
  34. package/dist/api/helpers/google/index.d.ts +2 -2
  35. package/dist/api/helpers/index.d.ts +17 -17
  36. package/dist/api/helpers/retryOnError.js +6 -11
  37. package/dist/api/helpers/s3.d.ts +9 -9
  38. package/dist/api/helpers/s3.js +19 -16
  39. package/dist/api/helpers/ses.d.ts +1 -1
  40. package/dist/api/helpers/ses.js +9 -9
  41. package/dist/api/helpers/sqs.d.ts +1 -1
  42. package/dist/api/helpers/sqs.js +1 -1
  43. package/dist/api/helpers/ssm.d.ts +1 -1
  44. package/dist/api/helpers/ssm.js +2 -2
  45. package/dist/api/helpers/ssmInfra/apigw.d.ts +6 -6
  46. package/dist/api/helpers/ssmInfra/apigw.js +6 -10
  47. package/dist/api/helpers/ssmInfra/dynamo.d.ts +2 -2
  48. package/dist/api/helpers/ssmInfra/dynamo.js +1 -1
  49. package/dist/api/helpers/ssmInfra/index.d.ts +4 -4
  50. package/dist/api/helpers/ssmInfra/s3.d.ts +3 -3
  51. package/dist/api/helpers/ssmInfra/s3.js +1 -1
  52. package/dist/api/helpers/ssmInfra/sqs.d.ts +3 -3
  53. package/dist/api/helpers/ssmInfra/sqs.js +1 -1
  54. package/dist/api/helpers/sts.d.ts +1 -1
  55. package/dist/api/helpers/sts.js +4 -4
  56. package/dist/api/helpers/validations.d.ts +2 -2
  57. package/dist/api/helpers/validations.js +14 -14
  58. package/dist/api/helpers/zod.d.ts +1 -1
  59. package/dist/api/helpers/zod.js +21 -27
  60. package/dist/api/index.d.ts +2 -2
  61. package/dist/api/types/aws.d.ts +0 -56
  62. package/dist/api/types/aws.js +0 -1
  63. package/dist/api/types/index.d.ts +1 -1
  64. package/dist/common/helpers/array.js +9 -10
  65. package/dist/common/helpers/async.js +2 -2
  66. package/dist/common/helpers/binary.d.ts +1 -1
  67. package/dist/common/helpers/binary.js +1 -1
  68. package/dist/common/helpers/csv.d.ts +4 -2
  69. package/dist/common/helpers/csv.js +8 -12
  70. package/dist/common/helpers/date.d.ts +2 -4
  71. package/dist/common/helpers/date.js +2 -2
  72. package/dist/common/helpers/email.js +2 -2
  73. package/dist/common/helpers/fetch.js +8 -8
  74. package/dist/common/helpers/generator.js +2 -2
  75. package/dist/common/helpers/groupBy.js +0 -2
  76. package/dist/common/helpers/hashCode.js +2 -6
  77. package/dist/common/helpers/headers.d.ts +20 -20
  78. package/dist/common/helpers/headers.js +38 -38
  79. package/dist/common/helpers/i18n.d.ts +2 -2
  80. package/dist/common/helpers/i18n.js +5 -6
  81. package/dist/common/helpers/index.d.ts +25 -25
  82. package/dist/common/helpers/log.d.ts +1 -1
  83. package/dist/common/helpers/log.js +30 -30
  84. package/dist/common/helpers/math.d.ts +2 -2
  85. package/dist/common/helpers/math.js +6 -6
  86. package/dist/common/helpers/memo.d.ts +1 -1
  87. package/dist/common/helpers/memo.js +1 -3
  88. package/dist/common/helpers/node-cache.d.ts +2 -2
  89. package/dist/common/helpers/node-cache.js +0 -1
  90. package/dist/common/helpers/object.d.ts +1 -1
  91. package/dist/common/helpers/object.js +16 -27
  92. package/dist/common/helpers/secondsInNearest.js +5 -5
  93. package/dist/common/helpers/stream.js +4 -6
  94. package/dist/common/helpers/string/base64.js +2 -2
  95. package/dist/common/helpers/string/chunk.js +1 -1
  96. package/dist/common/helpers/string/contains.js +1 -3
  97. package/dist/common/helpers/string/getExtendedStringSegment.js +1 -1
  98. package/dist/common/helpers/string/index.d.ts +11 -11
  99. package/dist/common/helpers/string/json.js +1 -1
  100. package/dist/common/helpers/string/redact.js +38 -39
  101. package/dist/common/helpers/string/trim.js +4 -4
  102. package/dist/common/helpers/string/truncate.js +1 -1
  103. package/dist/common/helpers/string/url.js +7 -8
  104. package/dist/common/helpers/withRetry.js +7 -7
  105. package/dist/common/helpers/xml.d.ts +7 -3
  106. package/dist/common/helpers/xml.js +33 -36
  107. package/dist/common/index.d.ts +2 -2
  108. package/dist/index.d.ts +3 -3
  109. package/dist/node/helpers/fetch.js +1 -2
  110. package/dist/node/helpers/fs.js +2 -2
  111. package/dist/node/helpers/index.d.ts +2 -2
  112. package/dist/node/index.d.ts +1 -1
  113. package/dist/ui/components/DarkMode/Base.d.ts +4 -4
  114. package/dist/ui/components/DarkMode/Base.js +26 -31
  115. package/dist/ui/components/DarkMode/index.d.ts +2 -2
  116. package/dist/ui/components/DarkMode/types.d.ts +5 -5
  117. package/dist/ui/components/HeadersRaw/index.d.ts +2 -2
  118. package/dist/ui/components/HeadersRaw/index.js +5 -5
  119. package/dist/ui/components/Markdown/index.d.ts +1 -1
  120. package/dist/ui/components/Markdown/index.js +10 -10
  121. package/dist/ui/components/index.d.ts +4 -4
  122. package/dist/ui/components/shadcn/accordion.d.ts +4 -4
  123. package/dist/ui/components/shadcn/accordion.js +6 -6
  124. package/dist/ui/components/shadcn/alert.d.ts +2 -2
  125. package/dist/ui/components/shadcn/alert.js +6 -6
  126. package/dist/ui/components/shadcn/avatar.d.ts +2 -2
  127. package/dist/ui/components/shadcn/avatar.js +4 -4
  128. package/dist/ui/components/shadcn/button.d.ts +4 -4
  129. package/dist/ui/components/shadcn/button.js +14 -14
  130. package/dist/ui/components/shadcn/card.d.ts +2 -2
  131. package/dist/ui/components/shadcn/card.js +6 -6
  132. package/dist/ui/components/shadcn/checkbox.d.ts +2 -2
  133. package/dist/ui/components/shadcn/checkbox.js +3 -3
  134. package/dist/ui/components/shadcn/dialog.d.ts +10 -10
  135. package/dist/ui/components/shadcn/dialog.js +9 -11
  136. package/dist/ui/components/shadcn/divider.d.ts +1 -1
  137. package/dist/ui/components/shadcn/divider.js +1 -1
  138. package/dist/ui/components/shadcn/dropdown-list.d.ts +1 -1
  139. package/dist/ui/components/shadcn/dropdown-list.js +5 -5
  140. package/dist/ui/components/shadcn/dropdown-menu.d.ts +6 -6
  141. package/dist/ui/components/shadcn/dropdown-menu.js +11 -11
  142. package/dist/ui/components/shadcn/index.d.ts +21 -21
  143. package/dist/ui/components/shadcn/input-selector.d.ts +1 -1
  144. package/dist/ui/components/shadcn/input-selector.js +10 -12
  145. package/dist/ui/components/shadcn/input.d.ts +1 -1
  146. package/dist/ui/components/shadcn/input.js +1 -1
  147. package/dist/ui/components/shadcn/label.d.ts +3 -3
  148. package/dist/ui/components/shadcn/label.js +2 -2
  149. package/dist/ui/components/shadcn/popover.d.ts +2 -2
  150. package/dist/ui/components/shadcn/popover.js +3 -3
  151. package/dist/ui/components/shadcn/radio-group.d.ts +2 -2
  152. package/dist/ui/components/shadcn/radio-group.js +2 -2
  153. package/dist/ui/components/shadcn/scroll-area.d.ts +2 -2
  154. package/dist/ui/components/shadcn/scroll-area.js +3 -5
  155. package/dist/ui/components/shadcn/select.d.ts +2 -2
  156. package/dist/ui/components/shadcn/select.js +12 -12
  157. package/dist/ui/components/shadcn/sheet.d.ts +12 -12
  158. package/dist/ui/components/shadcn/sheet.js +15 -15
  159. package/dist/ui/components/shadcn/switch.d.ts +2 -2
  160. package/dist/ui/components/shadcn/switch.js +3 -3
  161. package/dist/ui/components/shadcn/textarea.d.ts +1 -1
  162. package/dist/ui/components/shadcn/textarea.js +1 -1
  163. package/dist/ui/components/shadcn/toast.d.ts +2 -2
  164. package/dist/ui/components/shadcn/toast.js +25 -25
  165. package/dist/ui/helpers/cognito.d.ts +1 -1
  166. package/dist/ui/helpers/cookie/const.js +1 -1
  167. package/dist/ui/helpers/cookie/get.js +3 -4
  168. package/dist/ui/helpers/cookie/index.d.ts +5 -5
  169. package/dist/ui/helpers/cookie/raw.d.ts +1 -1
  170. package/dist/ui/helpers/cookie/raw.js +8 -9
  171. package/dist/ui/helpers/cookie/use.d.ts +1 -1
  172. package/dist/ui/helpers/cookie/use.js +4 -4
  173. package/dist/ui/helpers/date.js +8 -8
  174. package/dist/ui/helpers/debounce.js +1 -1
  175. package/dist/ui/helpers/dom.d.ts +1 -1
  176. package/dist/ui/helpers/dom.js +4 -14
  177. package/dist/ui/helpers/index.d.ts +26 -26
  178. package/dist/ui/helpers/jwt.d.ts +3 -3
  179. package/dist/ui/helpers/openDialog.d.ts +2 -2
  180. package/dist/ui/helpers/openDialog.js +8 -8
  181. package/dist/ui/helpers/plural.js +1 -1
  182. package/dist/ui/helpers/routes.d.ts +2 -2
  183. package/dist/ui/helpers/routes.js +14 -15
  184. package/dist/ui/helpers/serviceWorker.js +1 -1
  185. package/dist/ui/helpers/useContextMenu.d.ts +1 -1
  186. package/dist/ui/helpers/useContextMenu.js +9 -10
  187. package/dist/ui/helpers/useElementAttribute.js +3 -5
  188. package/dist/ui/helpers/useGranularHook.d.ts +1 -1
  189. package/dist/ui/helpers/useGranularHook.js +2 -3
  190. package/dist/ui/helpers/useInterval.d.ts +2 -2
  191. package/dist/ui/helpers/useInterval.js +2 -2
  192. package/dist/ui/helpers/useIsInViewport.d.ts +1 -1
  193. package/dist/ui/helpers/useIsInViewport.js +0 -1
  194. package/dist/ui/helpers/useLocalStorage.js +6 -6
  195. package/dist/ui/helpers/useLockBodyScroll.js +2 -2
  196. package/dist/ui/helpers/useOnClickOutside.d.ts +1 -1
  197. package/dist/ui/helpers/useOnClickOutside.js +3 -6
  198. package/dist/ui/helpers/useOnScroll.d.ts +1 -1
  199. package/dist/ui/helpers/useOnScroll.js +3 -4
  200. package/dist/ui/helpers/useOverloadPageSearch.js +8 -10
  201. package/dist/ui/helpers/useQueryString.js +7 -7
  202. package/dist/ui/helpers/useResize.js +5 -6
  203. package/dist/ui/helpers/useTimeout.js +1 -1
  204. package/dist/ui/helpers/useTooltip.d.ts +2 -2
  205. package/dist/ui/helpers/useTooltip.js +5 -7
  206. package/dist/ui/helpers/utils.d.ts +2 -2
  207. package/dist/ui/icons/Checkmark.d.ts +2 -2
  208. package/dist/ui/icons/Checkmark.js +1 -1
  209. package/dist/ui/icons/ChevronRight.d.ts +1 -1
  210. package/dist/ui/icons/Circle.d.ts +2 -2
  211. package/dist/ui/icons/Circle.js +1 -1
  212. package/dist/ui/icons/CircleDot.d.ts +2 -2
  213. package/dist/ui/icons/Cog.d.ts +2 -2
  214. package/dist/ui/icons/Computer.d.ts +2 -2
  215. package/dist/ui/icons/Door.d.ts +1 -1
  216. package/dist/ui/icons/Hamburger.d.ts +1 -1
  217. package/dist/ui/icons/HorizontalDots.d.ts +1 -1
  218. package/dist/ui/icons/House.d.ts +2 -2
  219. package/dist/ui/icons/Magnify.d.ts +2 -2
  220. package/dist/ui/icons/Magnify.js +1 -1
  221. package/dist/ui/icons/Moon.d.ts +2 -2
  222. package/dist/ui/icons/Pencil.d.ts +1 -1
  223. package/dist/ui/icons/Save.d.ts +1 -1
  224. package/dist/ui/icons/Sun.d.ts +1 -1
  225. package/dist/ui/icons/Sun.js +1 -1
  226. package/dist/ui/icons/Undo.d.ts +1 -1
  227. package/dist/ui/icons/UserOutline.d.ts +1 -1
  228. package/dist/ui/icons/Warning.d.ts +2 -2
  229. package/dist/ui/icons/Warning.js +1 -1
  230. package/dist/ui/icons/index.d.ts +32 -74
  231. package/dist/ui/index.d.ts +3 -3
  232. package/dist/ui/styles/colours.js +29 -29
  233. package/dist/ui/styles/common.d.ts +1 -1
  234. package/dist/ui/styles/common.js +10 -10
  235. package/dist/ui/styles/index.d.ts +3 -3
  236. package/package.json +65 -75
@@ -7,11 +7,11 @@ function useLockBodyScroll(enabled) {
7
7
  let originalStyle;
8
8
  if (enabled) {
9
9
  originalStyle = window.getComputedStyle(document.body).overflow;
10
- document.body.style.overflow = 'hidden';
10
+ document.body.style.overflow = "hidden";
11
11
  }
12
12
  return () => {
13
13
  if (enabled) {
14
- document.body.style.overflow = originalStyle || '';
14
+ document.body.style.overflow = originalStyle || "";
15
15
  }
16
16
  };
17
17
  }, [enabled]);
@@ -1,4 +1,4 @@
1
- import type { RefObject } from 'react';
1
+ import type { RefObject } from "react";
2
2
  type Event = MouseEvent | TouchEvent;
3
3
  export declare function useOnClickOutside<T extends HTMLElement = HTMLElement>(p: {
4
4
  ref: RefObject<T | null>;
@@ -1,5 +1,5 @@
1
- 'use client';
2
1
  "use strict";
2
+ "use client";
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.useOnClickOutside = useOnClickOutside;
5
5
  const react_1 = require("react");
@@ -7,9 +7,7 @@ const dom_1 = require("./dom");
7
7
  function useOnClickOutside(p, handler) {
8
8
  (0, react_1.useEffect)(() => {
9
9
  const listener = (event) => {
10
- const disabled = !p.disabled || typeof p.disabled === 'boolean'
11
- ? (p.disabled ?? false)
12
- : p.disabled();
10
+ const disabled = !p.disabled || typeof p.disabled === "boolean" ? (p.disabled ?? false) : p.disabled();
13
11
  if (disabled) {
14
12
  return;
15
13
  }
@@ -47,9 +45,8 @@ function useOnClickOutside(p, handler) {
47
45
  document.removeEventListener(`mousedown`, listener);
48
46
  document.removeEventListener(`touchstart`, listener);
49
47
  document.removeEventListener(`mousemove`, listener);
50
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
51
48
  }
52
- catch (e) {
49
+ catch {
53
50
  //
54
51
  }
55
52
  };
@@ -1,4 +1,4 @@
1
- import type { RefObject } from 'react';
1
+ import type { RefObject } from "react";
2
2
  export interface IScroll {
3
3
  y: number;
4
4
  x: number;
@@ -1,5 +1,5 @@
1
- 'use client';
2
1
  "use strict";
2
+ "use client";
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.useOnScroll = useOnScroll;
5
5
  const react_1 = require("react");
@@ -40,7 +40,7 @@ function useOnScroll({ onScroll, element, } = {}) {
40
40
  if (l) {
41
41
  setStartScrollTopY(l.y);
42
42
  }
43
- }, { key: 'onscroll', time: 20 });
43
+ }, { key: "onscroll", time: 20 });
44
44
  };
45
45
  (element?.current ?? document).addEventListener(`scroll`, listenDebounce, {
46
46
  passive: true,
@@ -48,9 +48,8 @@ function useOnScroll({ onScroll, element, } = {}) {
48
48
  return () => {
49
49
  try {
50
50
  (element?.current ?? document).removeEventListener(`scroll`, listenDebounce);
51
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
52
51
  }
53
- catch (e) {
52
+ catch {
54
53
  //
55
54
  }
56
55
  };
@@ -1,34 +1,32 @@
1
- 'use client';
2
1
  "use strict";
2
+ "use client";
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.useOverloadPageSearch = void 0;
5
5
  const react_1 = require("react");
6
6
  const useOverloadPageSearch = ({ disabled = false, onTrigger, }) => {
7
7
  (0, react_1.useEffect)(() => {
8
8
  const ctrlF = (e) => {
9
- const macSearch = e.metaKey && e.code === 'KeyF';
10
- const winSearch = e.ctrlKey && e.code === 'KeyF';
9
+ const macSearch = e.metaKey && e.code === "KeyF";
10
+ const winSearch = e.ctrlKey && e.code === "KeyF";
11
11
  if (winSearch || macSearch) {
12
12
  e.preventDefault();
13
13
  onTrigger();
14
14
  }
15
15
  };
16
16
  try {
17
- window.removeEventListener('keydown', ctrlF);
17
+ window.removeEventListener("keydown", ctrlF);
18
18
  if (!disabled) {
19
- window.addEventListener('keydown', ctrlF);
19
+ window.addEventListener("keydown", ctrlF);
20
20
  }
21
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
22
21
  }
23
- catch (e) {
22
+ catch {
24
23
  //
25
24
  }
26
25
  return () => {
27
26
  try {
28
- window.removeEventListener('keydown', ctrlF);
29
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
27
+ window.removeEventListener("keydown", ctrlF);
30
28
  }
31
- catch (e) {
29
+ catch {
32
30
  //
33
31
  }
34
32
  };
@@ -1,5 +1,5 @@
1
- 'use client';
2
1
  "use strict";
2
+ "use client";
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.useQueryStringSingle = exports.useQueryStringArray = exports.useQueryStringRaw = void 0;
5
5
  const react_1 = require("react");
@@ -23,13 +23,13 @@ const useQueryStringRaw = ({ name, queryValues, defaultValue, stringify, parse,
23
23
  else {
24
24
  delete qv[name];
25
25
  }
26
- const qs = '?' + (0, object_1.objectToString)(qv, '=', '&');
27
- if (typeof window !== 'undefined') {
26
+ const qs = "?" + (0, object_1.objectToString)(qv, "=", "&");
27
+ if (typeof window !== "undefined") {
28
28
  const loc = window.location.pathname + qs + window.location.hash;
29
- window.history.replaceState({}, '', loc);
29
+ window.history.replaceState({}, "", loc);
30
30
  }
31
31
  else {
32
- (0, log_1.info)('cant change url params on server');
32
+ (0, log_1.info)("cant change url params on server");
33
33
  }
34
34
  setStateRaw(v);
35
35
  };
@@ -51,8 +51,8 @@ const useQueryStringArray = ({ name, queryValues, defaultValue, }) => (0, export
51
51
  name,
52
52
  defaultValue,
53
53
  queryValues,
54
- stringify: (v) => (v.length === 0 ? undefined : v.join(',')),
55
- parse: (v) => (!v ? defaultValue : v.split(',')),
54
+ stringify: (v) => (v.length === 0 ? undefined : v.join(",")),
55
+ parse: (v) => (!v ? defaultValue : v.split(",")),
56
56
  });
57
57
  exports.useQueryStringArray = useQueryStringArray;
58
58
  /**
@@ -1,11 +1,11 @@
1
- 'use client';
2
1
  "use strict";
2
+ "use client";
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.useResize = useResize;
5
5
  const react_1 = require("react");
6
6
  const media_1 = require("../styles/media");
7
7
  function getWindowDimensions() {
8
- if (typeof window === 'undefined') {
8
+ if (typeof window === "undefined") {
9
9
  return undefined;
10
10
  }
11
11
  const width = window.innerWidth;
@@ -28,14 +28,13 @@ function useResize() {
28
28
  }
29
29
  setWindowDimensions(wd);
30
30
  }
31
- window.addEventListener('resize', handleResize);
31
+ window.addEventListener("resize", handleResize);
32
32
  handleResize();
33
33
  return () => {
34
34
  try {
35
- window.removeEventListener('resize', handleResize);
36
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
35
+ window.removeEventListener("resize", handleResize);
37
36
  }
38
- catch (e) {
37
+ catch {
39
38
  //
40
39
  }
41
40
  };
@@ -1,5 +1,5 @@
1
- 'use client';
2
1
  "use strict";
2
+ "use client";
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.useTimeout = useTimeout;
5
5
  const react_1 = require("react");
@@ -1,5 +1,5 @@
1
- import type { MouseEvent } from 'react';
2
- import type { JSX } from 'react';
1
+ import type { MouseEvent } from "react";
2
+ import type { JSX } from "react";
3
3
  interface IPos<T> {
4
4
  data: T;
5
5
  portalId: string;
@@ -97,7 +97,7 @@ const Comp = ({ pos, children, }) => {
97
97
  right,
98
98
  top,
99
99
  bottom,
100
- ...(!pos.hasParent && { position: 'fixed' }),
100
+ ...(!pos.hasParent && { position: "fixed" }),
101
101
  ...(!size && { zIndex: -1 }),
102
102
  } }, children(pos, size)));
103
103
  const e = document.querySelector(`#${pos.portalId}`);
@@ -107,26 +107,24 @@ const Comp = ({ pos, children, }) => {
107
107
  return Content;
108
108
  };
109
109
  const useTooltip = (p) => {
110
- const portalId = p?.portalId || 'ag-tooltip-portal';
110
+ const portalId = p?.portalId || "ag-tooltip-portal";
111
111
  const [pos, setPosRaw] = (0, react_1.useState)();
112
112
  (0, react_1.useEffect)(() => {
113
113
  if (document.querySelectorAll(`#${portalId}`).length > 0) {
114
114
  return;
115
115
  }
116
- const d = document.createElement('div');
116
+ const d = document.createElement("div");
117
117
  d.id = portalId;
118
118
  document.body.appendChild(d);
119
119
  return () => {
120
120
  try {
121
121
  document.querySelector(`#${portalId}`)?.remove();
122
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
123
122
  }
124
- catch (e) {
123
+ catch {
125
124
  //
126
125
  }
127
126
  };
128
- // eslint-disable-next-line react-hooks/exhaustive-deps
129
- }, []);
127
+ }, [portalId]);
130
128
  const setPos = (p) => {
131
129
  if (!p) {
132
130
  setPosRaw(undefined);
@@ -1,4 +1,4 @@
1
- import { cx } from 'class-variance-authority';
2
- import { type ClassValue } from 'clsx';
1
+ import { cx } from "class-variance-authority";
2
+ import { type ClassValue } from "clsx";
3
3
  export declare function cn(...inputs: ClassValue[]): string;
4
4
  export { cx };
@@ -1,5 +1,5 @@
1
- import type { CSSProperties } from 'react';
2
- import React from 'react';
1
+ import type { CSSProperties } from "react";
2
+ import React from "react";
3
3
  export declare const Checkmark: ({ style, }: {
4
4
  style?: {
5
5
  /** change the colour of the tick. default black */
@@ -6,5 +6,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.Checkmark = void 0;
7
7
  const react_1 = __importDefault(require("react"));
8
8
  const Checkmark = ({ style, }) => (react_1.default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "2 2 20 20", style: style },
9
- react_1.default.createElement("path", { fill: "none", stroke: style?.fill ?? '#000', strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M8 12.333 10.461 15 16 9m5 3a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z" })));
9
+ react_1.default.createElement("path", { fill: "none", stroke: style?.fill ?? "#000", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M8 12.333 10.461 15 16 9m5 3a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z" })));
10
10
  exports.Checkmark = Checkmark;
@@ -1,2 +1,2 @@
1
- import React from 'react';
1
+ import React from "react";
2
2
  export declare const ChevronRight: React.JSX.Element;
@@ -1,5 +1,5 @@
1
- import type { CSSProperties } from 'react';
2
- import React from 'react';
1
+ import type { CSSProperties } from "react";
2
+ import React from "react";
3
3
  export declare const Circle: ({ style, dotted, }: {
4
4
  style?: {
5
5
  /** change the colour of the circle. default black */
@@ -6,5 +6,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.Circle = void 0;
7
7
  const react_1 = __importDefault(require("react"));
8
8
  const Circle = ({ style, dotted = false, }) => (react_1.default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "2 2 20 20", style: style },
9
- react_1.default.createElement("path", { fill: "none", stroke: style?.fill ?? '#000', strokeLinecap: "round", strokeLinejoin: "round", strokeDasharray: !dotted ? '' : '4 4', strokeWidth: "2", d: "M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z" })));
9
+ react_1.default.createElement("path", { fill: "none", stroke: style?.fill ?? "#000", strokeLinecap: "round", strokeLinejoin: "round", strokeDasharray: !dotted ? "" : "4 4", strokeWidth: "2", d: "M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z" })));
10
10
  exports.Circle = Circle;
@@ -1,5 +1,5 @@
1
- import type { CSSProperties } from 'react';
2
- import React from 'react';
1
+ import type { CSSProperties } from "react";
2
+ import React from "react";
3
3
  export declare const CircleDot: ({ style }: {
4
4
  style?: CSSProperties;
5
5
  }) => React.JSX.Element;
@@ -1,5 +1,5 @@
1
- import type { CSSProperties } from 'react';
2
- import React from 'react';
1
+ import type { CSSProperties } from "react";
2
+ import React from "react";
3
3
  export declare const Cog: ({ style, }: {
4
4
  style?: {
5
5
  /** change the colour of the icon. default black */
@@ -1,5 +1,5 @@
1
- import type { CSSProperties } from 'react';
2
- import React from 'react';
1
+ import type { CSSProperties } from "react";
2
+ import React from "react";
3
3
  export declare const Computer: ({ style, }: {
4
4
  style?: {
5
5
  /** change the colour of the icon. default black */
@@ -1,2 +1,2 @@
1
- import React from 'react';
1
+ import React from "react";
2
2
  export declare const Door: React.JSX.Element;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import React from "react";
2
2
  export declare const Hamburger: ({ className }: {
3
3
  className?: string;
4
4
  }) => React.JSX.Element;
@@ -1,2 +1,2 @@
1
- import React from 'react';
1
+ import React from "react";
2
2
  export declare const HorizontalDots: React.JSX.Element;
@@ -1,5 +1,5 @@
1
- import type { CSSProperties } from 'react';
2
- import React from 'react';
1
+ import type { CSSProperties } from "react";
2
+ import React from "react";
3
3
  export declare const House: ({ style, }: {
4
4
  style?: {
5
5
  /** change the colour of the icon. default black */
@@ -1,5 +1,5 @@
1
- import type { CSSProperties } from 'react';
2
- import React from 'react';
1
+ import type { CSSProperties } from "react";
2
+ import React from "react";
3
3
  export declare const Magnify: ({ style, }: {
4
4
  style?: {
5
5
  /** change the colour of the icon. default black */
@@ -6,5 +6,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.Magnify = void 0;
7
7
  const react_1 = __importDefault(require("react"));
8
8
  const Magnify = ({ style, }) => (react_1.default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 490 490", style: style },
9
- react_1.default.createElement("path", { fill: "none", stroke: style?.fill ?? 'black', strokeWidth: "36", strokeLinecap: "round", d: "M280 278a153 153 0 1 0-2 2l170 170m-91-117 110 110-26 26-110-110" })));
9
+ react_1.default.createElement("path", { fill: "none", stroke: style?.fill ?? "black", strokeWidth: "36", strokeLinecap: "round", d: "M280 278a153 153 0 1 0-2 2l170 170m-91-117 110 110-26 26-110-110" })));
10
10
  exports.Magnify = Magnify;
@@ -1,5 +1,5 @@
1
- import type { CSSProperties } from 'react';
2
- import React from 'react';
1
+ import type { CSSProperties } from "react";
2
+ import React from "react";
3
3
  export declare const Moon: ({ style, }: {
4
4
  style?: {
5
5
  /** change the colour of the icon. default black */
@@ -1,2 +1,2 @@
1
- import React from 'react';
1
+ import React from "react";
2
2
  export declare const Pencil: () => React.JSX.Element;
@@ -1,2 +1,2 @@
1
- import React from 'react';
1
+ import React from "react";
2
2
  export declare const Save: () => React.JSX.Element;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import React from "react";
2
2
  export declare const Sun: (p?: {
3
3
  style?: {
4
4
  /** default black */
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.Sun = void 0;
7
7
  const react_1 = __importDefault(require("react"));
8
8
  const Sun = (p) => (react_1.default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" },
9
- react_1.default.createElement("g", { stroke: p?.style?.fill ?? 'black', strokeMiterlimit: "10", strokeWidth: "1.5", clipPath: "url(#a)" },
9
+ react_1.default.createElement("g", { stroke: p?.style?.fill ?? "black", strokeMiterlimit: "10", strokeWidth: "1.5", clipPath: "url(#a)" },
10
10
  react_1.default.createElement("path", { strokeLinecap: "round", d: "M5 12H1m22 0h-4M7.05 7.05 4.222 4.222m15.556 15.556L16.95 16.95m-9.9 0-2.828 2.828M19.778 4.222 16.95 7.05" }),
11
11
  react_1.default.createElement("path", { fillOpacity: "0", d: "M12 16a4 4 0 1 0 0-8 4 4 0 0 0 0 8Z" }),
12
12
  react_1.default.createElement("path", { strokeLinecap: "round", d: "M12 19v4m0-22v4" })),
@@ -1,2 +1,2 @@
1
- import React from 'react';
1
+ import React from "react";
2
2
  export declare const Undo: () => React.JSX.Element;
@@ -1,2 +1,2 @@
1
- import React from 'react';
1
+ import React from "react";
2
2
  export declare const UserOutline: React.JSX.Element;
@@ -1,5 +1,5 @@
1
- import type { CSSProperties } from 'react';
2
- import React from 'react';
1
+ import type { CSSProperties } from "react";
2
+ import React from "react";
3
3
  export declare const Warning: ({ style, className, }: {
4
4
  className?: string;
5
5
  style?: {
@@ -11,6 +11,6 @@ const Warning = ({ style, className, }) => (react_1.default.createElement("svg",
11
11
  react_1.default.createElement("linearGradient", { id: "a", x2: "0", y1: "45.47", y2: "-.599", gradientTransform: "matrix(1.31117 0 0 1.30239 737.39 159.91)", gradientUnits: "userSpaceOnUse" },
12
12
  react_1.default.createElement("stop", { stopColor: "none" }),
13
13
  react_1.default.createElement("stop", { offset: "1", stopColor: "none" }))),
14
- react_1.default.createElement("path", { fill: style?.fill ?? '#ffc515', stroke: "url(#a)", strokeWidth: "4px", d: "m797.94 212.01-25.607-48c-.736-1.333-2.068-2.074-3.551-2.074s-2.822.889-3.569 2.222l-25.417 48c-.598 1.185-.605 2.815.132 4s1.921 1.778 3.404 1.778h51.02c1.483 0 2.821-.741 3.42-1.926.747-1.185.753-2.667.165-4", transform: "translate(-627.02 -130.8) scale(.85714)" }),
14
+ react_1.default.createElement("path", { fill: style?.fill ?? "#ffc515", stroke: "url(#a)", strokeWidth: "4px", d: "m797.94 212.01-25.607-48c-.736-1.333-2.068-2.074-3.551-2.074s-2.822.889-3.569 2.222l-25.417 48c-.598 1.185-.605 2.815.132 4s1.921 1.778 3.404 1.778h51.02c1.483 0 2.821-.741 3.42-1.926.747-1.185.753-2.667.165-4", transform: "translate(-627.02 -130.8) scale(.85714)" }),
15
15
  react_1.default.createElement("path", { fillOpacity: ".75", stroke: "none", strokeWidth: ".90168", d: "M31.996 24.239a1.93 1.93 0 0 0-1.926 1.92v11.559c0 1.06.855 1.92 1.926 1.92a1.929 1.929 0 0 0 1.925-1.92v-11.56c0-1.06-.853-1.92-1.925-1.92zm0 19.249c-1.064 0-1.926.86-1.926 1.925 0 1.064.86 1.925 1.926 1.925 1.064 0 1.925-.86 1.925-1.925a1.922 1.922 0 0 0-1.925-1.925z" })));
16
16
  exports.Warning = Warning;
@@ -1,81 +1,39 @@
1
- import { Checkmark } from './Checkmark';
2
- import { ChevronRight } from './ChevronRight';
3
- import { Circle } from './Circle';
4
- import { CircleDot } from './CircleDot';
5
- import { Cog } from './Cog';
6
- import { Computer } from './Computer';
7
- import { Door } from './Door';
8
- import { Hamburger } from './Hamburger';
9
- import { HorizontalDots } from './HorizontalDots';
10
- import { House } from './House';
11
- import { Magnify } from './Magnify';
12
- import { Moon } from './Moon';
13
- import { Pencil } from './Pencil';
14
- import { Save } from './Save';
15
- import { Sun } from './Sun';
16
- import { Undo } from './Undo';
17
- import { UserOutline } from './UserOutline';
18
- import { Warning } from './Warning';
1
+ import { Checkmark } from "./Checkmark";
2
+ import { ChevronRight } from "./ChevronRight";
3
+ import { Circle } from "./Circle";
4
+ import { CircleDot } from "./CircleDot";
5
+ import { Cog } from "./Cog";
6
+ import { Computer } from "./Computer";
7
+ import { Door } from "./Door";
8
+ import { Hamburger } from "./Hamburger";
9
+ import { HorizontalDots } from "./HorizontalDots";
10
+ import { House } from "./House";
11
+ import { Magnify } from "./Magnify";
12
+ import { Moon } from "./Moon";
13
+ import { Pencil } from "./Pencil";
14
+ import { Save } from "./Save";
15
+ import { Sun } from "./Sun";
16
+ import { Undo } from "./Undo";
17
+ import { UserOutline } from "./UserOutline";
18
+ import { Warning } from "./Warning";
19
19
  declare const icons: {
20
- Cog: ({ style, }: {
21
- style?: {
22
- fill?: string;
23
- } & import("react").CSSProperties;
24
- }) => import("react").JSX.Element;
25
- Checkmark: ({ style, }: {
26
- style?: {
27
- fill?: string;
28
- } & import("react").CSSProperties;
29
- }) => import("react").JSX.Element;
20
+ Cog: typeof Cog;
21
+ Checkmark: typeof Checkmark;
30
22
  ChevronRight: import("react").JSX.Element;
31
- Circle: ({ style, dotted, }: {
32
- style?: {
33
- fill?: string;
34
- } & import("react").CSSProperties;
35
- dotted?: boolean;
36
- }) => import("react").JSX.Element;
37
- CircleDot: ({ style }: {
38
- style?: import("react").CSSProperties;
39
- }) => import("react").JSX.Element;
40
- Computer: ({ style, }: {
41
- style?: {
42
- fill?: string;
43
- } & import("react").CSSProperties;
44
- }) => import("react").JSX.Element;
23
+ Circle: typeof Circle;
24
+ CircleDot: typeof CircleDot;
25
+ Computer: typeof Computer;
45
26
  Door: import("react").JSX.Element;
46
- Hamburger: ({ className }: {
47
- className?: string;
48
- }) => import("react").JSX.Element;
49
- House: ({ style, }: {
50
- style?: {
51
- fill?: string;
52
- } & import("react").CSSProperties;
53
- }) => import("react").JSX.Element;
27
+ Hamburger: typeof Hamburger;
28
+ House: typeof House;
54
29
  HorizontalDots: import("react").JSX.Element;
55
- Magnify: ({ style, }: {
56
- style?: {
57
- fill?: string;
58
- } & import("react").CSSProperties;
59
- }) => import("react").JSX.Element;
60
- Moon: ({ style, }: {
61
- style?: {
62
- fill?: string;
63
- } & import("react").CSSProperties;
64
- }) => import("react").JSX.Element;
65
- Pencil: () => import("react").JSX.Element;
66
- Save: () => import("react").JSX.Element;
67
- Sun: (p?: {
68
- style?: {
69
- fill?: string;
70
- };
71
- }) => import("react").JSX.Element;
72
- Undo: () => import("react").JSX.Element;
30
+ Magnify: typeof Magnify;
31
+ Moon: typeof Moon;
32
+ Pencil: typeof Pencil;
33
+ Save: typeof Save;
34
+ Sun: typeof Sun;
35
+ Undo: typeof Undo;
73
36
  UserOutline: import("react").JSX.Element;
74
- Warning: ({ style, className, }: {
75
- className?: string;
76
- style?: {
77
- fill?: string;
78
- } & import("react").CSSProperties;
79
- }) => import("react").JSX.Element;
37
+ Warning: typeof Warning;
80
38
  };
81
39
  export { Checkmark, ChevronRight, Circle, CircleDot, Cog, Computer, Door, Hamburger, HorizontalDots, House, icons, Magnify, Moon, Pencil, Save, Sun, Undo, UserOutline, Warning, };
@@ -1,3 +1,3 @@
1
- export * from './components';
2
- export * from './helpers';
3
- export * from './icons';
1
+ export * from "./components";
2
+ export * from "./helpers";
3
+ export * from "./icons";