tool-shack 0.0.28 → 0.0.29

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 (78) hide show
  1. package/README.md +0 -0
  2. package/dist/browser/index.d.ts +1 -0
  3. package/dist/browser/interfaces/isTouchSupported.d.ts +1 -0
  4. package/dist/browser/isPushNotificationSupported.d.ts +1 -0
  5. package/dist/browser/isScrollBehaviorSupported.d.ts +1 -0
  6. package/dist/browser/isShareSupported.d.ts +1 -0
  7. package/dist/browser/isTabFocused.d.ts +1 -0
  8. package/dist/browser/isTouchSupported.d.ts +1 -0
  9. package/dist/browser/preferColorScheme.d.ts +1 -0
  10. package/dist/browser/scrollToElement.d.ts +1 -0
  11. package/dist/browser/scrollToPosition.d.ts +1 -0
  12. package/dist/browser/tabFocusListener.d.ts +1 -0
  13. package/dist/dateTime/dateAsIso.d.ts +1 -0
  14. package/dist/dateTime/index.d.ts +1 -0
  15. package/dist/dateTime/interfaces/index.d.ts +1 -0
  16. package/dist/dateTime/interfaces/parseDuration.d.ts +1 -0
  17. package/dist/dateTime/parseDuration.d.ts +1 -0
  18. package/dist/dom/addAsyncEventListener.d.ts +1 -0
  19. package/dist/dom/addClickOutsideListener.d.ts +1 -0
  20. package/dist/dom/addEventListener.d.ts +1 -0
  21. package/dist/dom/appendAfter.d.ts +1 -0
  22. package/dist/dom/appendBefore.d.ts +1 -0
  23. package/dist/dom/createElement.d.ts +1 -0
  24. package/dist/dom/fireEvent.d.ts +1 -0
  25. package/dist/dom/getElementOffset.d.ts +1 -0
  26. package/dist/dom/index.d.ts +1 -0
  27. package/dist/dom/interfaces/createElement.d.ts +1 -0
  28. package/dist/dom/interfaces/index.d.ts +1 -0
  29. package/dist/general/index.d.ts +1 -0
  30. package/dist/general/isEmpty.d.ts +1 -0
  31. package/dist/general/isNil.d.ts +1 -0
  32. package/dist/general/isValidJson.d.ts +1 -0
  33. package/dist/index.d.ts +1 -0
  34. package/dist/schedule/index.d.ts +1 -0
  35. package/dist/schedule/runAnimation.d.ts +1 -0
  36. package/dist/schedule/runAsync.d.ts +1 -0
  37. package/dist/string/byteSize.d.ts +1 -0
  38. package/dist/string/escapeHTML.d.ts +1 -0
  39. package/dist/string/index.d.ts +1 -0
  40. package/dist/string/removeDiacritics.d.ts +1 -0
  41. package/dist/string/slugify.d.ts +1 -0
  42. package/dist/string/truncate.d.ts +1 -0
  43. package/package.json +4 -4
  44. package/src/browser/interfaces/isTouchSupported.ts +0 -0
  45. package/src/browser/isPushNotificationSupported.ts +0 -0
  46. package/src/browser/isScrollBehaviorSupported.ts +0 -0
  47. package/src/browser/isShareSupported.ts +0 -0
  48. package/src/browser/isTabFocused.ts +0 -0
  49. package/src/browser/isTouchSupported.ts +0 -0
  50. package/src/browser/preferColorScheme.ts +0 -0
  51. package/src/browser/tabFocusListener.ts +0 -0
  52. package/src/dateTime/dateAsIso.ts +0 -0
  53. package/src/dateTime/index.ts +0 -0
  54. package/src/dateTime/interfaces/index.ts +0 -0
  55. package/src/dateTime/interfaces/parseDuration.ts +0 -0
  56. package/src/dateTime/parseDuration.ts +0 -0
  57. package/src/dom/addAsyncEventListener.ts +0 -0
  58. package/src/dom/addClickOutsideListener.ts +0 -0
  59. package/src/dom/addEventListener.ts +0 -0
  60. package/src/dom/appendAfter.ts +0 -0
  61. package/src/dom/appendBefore.ts +0 -0
  62. package/src/dom/createElement.ts +0 -0
  63. package/src/dom/fireEvent.ts +0 -0
  64. package/src/dom/interfaces/index.ts +0 -0
  65. package/src/general/index.ts +0 -0
  66. package/src/general/isEmpty.ts +0 -0
  67. package/src/general/isNil.ts +0 -0
  68. package/src/general/isValidJson.ts +0 -0
  69. package/src/index.ts +0 -0
  70. package/src/schedule/index.ts +0 -0
  71. package/src/schedule/runAnimation.ts +0 -0
  72. package/src/schedule/runAsync.ts +0 -0
  73. package/src/string/byteSize.ts +0 -0
  74. package/src/string/escapeHTML.ts +0 -0
  75. package/src/string/index.ts +0 -0
  76. package/src/string/removeDiacritics.ts +0 -0
  77. package/src/string/slugify.ts +0 -0
  78. package/src/string/truncate.ts +0 -0
package/README.md CHANGED
File without changes
@@ -7,3 +7,4 @@ export * from './preferColorScheme.js';
7
7
  export * from './scrollToElement.js';
8
8
  export * from './scrollToPosition.js';
9
9
  export * from './tabFocusListener.js';
10
+ //# sourceMappingURL=index.d.ts.map
@@ -1,3 +1,4 @@
1
1
  export interface IExtendedWindow extends Window {
2
2
  DocumentTouch: any;
3
3
  }
4
+ //# sourceMappingURL=isTouchSupported.d.ts.map
@@ -4,3 +4,4 @@
4
4
  * @returns Boolean indicating if user's browser supports push notifications
5
5
  */
6
6
  export declare const isPushNotificationSupported: () => boolean;
7
+ //# sourceMappingURL=isPushNotificationSupported.d.ts.map
@@ -4,3 +4,4 @@
4
4
  * @returns Boolean indicating if user's browser supports setting scroll behavior
5
5
  */
6
6
  export declare const isScrollBehaviorSupported: () => boolean;
7
+ //# sourceMappingURL=isScrollBehaviorSupported.d.ts.map
@@ -4,3 +4,4 @@
4
4
  * @returns Boolean indicating if user's browser supports navigator share
5
5
  */
6
6
  export declare const isShareSupported: () => boolean;
7
+ //# sourceMappingURL=isShareSupported.d.ts.map
@@ -4,3 +4,4 @@
4
4
  * @returns Boolean indicating if current browser tab is in focus
5
5
  */
6
6
  export declare const isTabFocused: () => boolean;
7
+ //# sourceMappingURL=isTabFocused.d.ts.map
@@ -4,3 +4,4 @@
4
4
  * @returns Boolean indicating if user's browser supports touch events
5
5
  */
6
6
  export declare const isTouchSupported: () => boolean;
7
+ //# sourceMappingURL=isTouchSupported.d.ts.map
@@ -16,3 +16,4 @@ export declare const preferDarkColorScheme: () => boolean;
16
16
  * @returns String indicating prefered light color scheme ('light') or dark color scheme ('dark')
17
17
  */
18
18
  export declare const preferColorScheme: () => "light" | "dark";
19
+ //# sourceMappingURL=preferColorScheme.d.ts.map
@@ -7,3 +7,4 @@
7
7
  * @returns void
8
8
  */
9
9
  export declare const scrollToElement: (element: HTMLElement, offset?: number, smoothScroll?: boolean) => void;
10
+ //# sourceMappingURL=scrollToElement.d.ts.map
@@ -8,3 +8,4 @@
8
8
  * @returns void
9
9
  */
10
10
  export declare const scrollToPosition: (x: number, y: number, smoothScroll?: boolean, target?: Window | HTMLElement) => void;
11
+ //# sourceMappingURL=scrollToPosition.d.ts.map
@@ -6,3 +6,4 @@
6
6
  * @returns void
7
7
  */
8
8
  export declare const tabFocusListener: (focusCallback?: () => void, blurCallback?: () => void) => void;
9
+ //# sourceMappingURL=tabFocusListener.d.ts.map
@@ -5,3 +5,4 @@
5
5
  * @returns ISO format with timezone
6
6
  */
7
7
  export declare const dateAsIso: (date: Date) => string;
8
+ //# sourceMappingURL=dateAsIso.d.ts.map
@@ -1,3 +1,4 @@
1
1
  export * from './interfaces/index.js';
2
2
  export * from './dateAsIso.js';
3
3
  export * from './parseDuration.js';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -1 +1,2 @@
1
1
  export * from './parseDuration.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -5,3 +5,4 @@ export interface IDuration {
5
5
  seconds: number;
6
6
  milliseconds: number;
7
7
  }
8
+ //# sourceMappingURL=parseDuration.d.ts.map
@@ -6,3 +6,4 @@ import { IDuration } from './interfaces/parseDuration.js';
6
6
  * @returns Object containing days, hours, minutes, seconds and milliseconds of provided duration
7
7
  */
8
8
  export declare const parseDuration: (durationInMs: number) => IDuration;
9
+ //# sourceMappingURL=parseDuration.d.ts.map
@@ -7,3 +7,4 @@
7
7
  * @returns void
8
8
  */
9
9
  export declare const addAsyncEventListener: (elementSelector: string, listeners: Record<string, EventListener | EventListener[]>, acceptBubbling?: boolean) => void;
10
+ //# sourceMappingURL=addAsyncEventListener.d.ts.map
@@ -6,3 +6,4 @@
6
6
  * @returns void
7
7
  */
8
8
  export declare const addClickOutsideListener: (element: HTMLElement, fn: () => any) => void;
9
+ //# sourceMappingURL=addClickOutsideListener.d.ts.map
@@ -6,3 +6,4 @@
6
6
  * @returns void
7
7
  */
8
8
  export declare const addEventListener: (element: HTMLElement | HTMLElement[] | NodeListOf<HTMLElement> | HTMLCollectionOf<HTMLElement>, listeners: Record<string, EventListenerOrEventListenerObject | EventListenerOrEventListenerObject[]>) => void;
9
+ //# sourceMappingURL=addEventListener.d.ts.map
@@ -6,3 +6,4 @@
6
6
  * @returns Result of the action
7
7
  */
8
8
  export declare const appendAfter: (newNode: HTMLElement, referenceNode: HTMLElement) => boolean;
9
+ //# sourceMappingURL=appendAfter.d.ts.map
@@ -6,3 +6,4 @@
6
6
  * @returns Result of the action
7
7
  */
8
8
  export declare const appendBefore: (newNode: HTMLElement, referenceNode: HTMLElement) => boolean;
9
+ //# sourceMappingURL=appendBefore.d.ts.map
@@ -7,3 +7,4 @@ import { IExtendingElementProps } from './interfaces/createElement.js';
7
7
  * @returns Resulting Node element
8
8
  */
9
9
  export declare const createElement: <T = HTMLElement>(tagName: string, props?: Partial<Omit<T, "children" | "dataset" | "style">> & IExtendingElementProps) => T;
10
+ //# sourceMappingURL=createElement.d.ts.map
@@ -6,3 +6,4 @@
6
6
  * @returns Result of the action
7
7
  */
8
8
  export declare const fireEvent: (element: HTMLElement, eventType: string) => boolean;
9
+ //# sourceMappingURL=fireEvent.d.ts.map
@@ -8,3 +8,4 @@ export declare const getElementOffset: (element: HTMLElement) => {
8
8
  top: number;
9
9
  left: number;
10
10
  };
11
+ //# sourceMappingURL=getElementOffset.d.ts.map
@@ -7,3 +7,4 @@ export * from './appendBefore.js';
7
7
  export * from './createElement.js';
8
8
  export * from './fireEvent.js';
9
9
  export * from './getElementOffset.js';
10
+ //# sourceMappingURL=index.d.ts.map
@@ -7,3 +7,4 @@ export interface IExtendingElementProps {
7
7
  dataset?: Record<string, string>;
8
8
  style?: Record<string, string | number>;
9
9
  }
10
+ //# sourceMappingURL=createElement.d.ts.map
@@ -1 +1,2 @@
1
1
  export * from './createElement.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -1,3 +1,4 @@
1
1
  export * from './isEmpty.js';
2
2
  export * from './isNil.js';
3
3
  export * from './isValidJson.js';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -5,3 +5,4 @@
5
5
  * @returns Boolean indicating if given value is empty
6
6
  */
7
7
  export declare const isEmpty: (value: any) => boolean;
8
+ //# sourceMappingURL=isEmpty.d.ts.map
@@ -5,3 +5,4 @@
5
5
  * @returns Boolean indicating if value is equal to null or undefined
6
6
  */
7
7
  export declare const isNil: (value: any) => boolean;
8
+ //# sourceMappingURL=isNil.d.ts.map
@@ -5,3 +5,4 @@
5
5
  * @returns Boolean indicating if string value is a valid JSON
6
6
  */
7
7
  export declare const isValidJson: (value: string) => boolean;
8
+ //# sourceMappingURL=isValidJson.d.ts.map
package/dist/index.d.ts CHANGED
@@ -4,3 +4,4 @@ export * from './dom/index.js';
4
4
  export * from './general/index.js';
5
5
  export * from './schedule/index.js';
6
6
  export * from './string/index.js';
7
+ //# sourceMappingURL=index.d.ts.map
@@ -1,2 +1,3 @@
1
1
  export * from './runAnimation.js';
2
2
  export * from './runAsync.js';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -9,3 +9,4 @@ export declare const runAnimation: (fn: () => any, autoStart?: boolean) => {
9
9
  startAnimation: () => void;
10
10
  stopAnimation: () => void;
11
11
  };
12
+ //# sourceMappingURL=runAnimation.d.ts.map
@@ -5,3 +5,4 @@
5
5
  * @returns Promise of expected result
6
6
  */
7
7
  export declare const runAsync: <T>(fn: () => any) => Promise<T>;
8
+ //# sourceMappingURL=runAsync.d.ts.map
@@ -5,3 +5,4 @@
5
5
  * @returns Byte size of given string
6
6
  */
7
7
  export declare const byteSize: (value: string) => number;
8
+ //# sourceMappingURL=byteSize.d.ts.map
@@ -5,3 +5,4 @@
5
5
  * @returns Safe string with escaped HTML related characters
6
6
  */
7
7
  export declare const escapeHTML: (html: string) => string;
8
+ //# sourceMappingURL=escapeHTML.d.ts.map
@@ -3,3 +3,4 @@ export * from './escapeHTML.js';
3
3
  export * from './removeDiacritics.js';
4
4
  export * from './slugify.js';
5
5
  export * from './truncate.js';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -5,3 +5,4 @@
5
5
  * @returns ASCII string with removed diacritics & accents
6
6
  */
7
7
  export declare const removeDiacritics: (value: string) => string;
8
+ //# sourceMappingURL=removeDiacritics.d.ts.map
@@ -6,3 +6,4 @@
6
6
  * @returns Slugified string
7
7
  */
8
8
  export declare const slugify: (value: string, separator?: string) => string;
9
+ //# sourceMappingURL=slugify.d.ts.map
@@ -7,3 +7,4 @@
7
7
  * @returns Truncated value if needed otherwise original value
8
8
  */
9
9
  export declare const truncate: (value: string, maxLength: number, appendedString?: string) => string;
10
+ //# sourceMappingURL=truncate.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tool-shack",
3
- "version": "0.0.28",
3
+ "version": "0.0.29",
4
4
  "description": "Collection of usefull functions to ease work",
5
5
  "author": {
6
6
  "name": "David Myška",
@@ -41,10 +41,10 @@
41
41
  },
42
42
  "devDependencies": {
43
43
  "husky": "^9.1.7",
44
- "prettier": "^3.3.3",
44
+ "prettier": "^3.4.2",
45
45
  "pretty-quick": "^4.0.0",
46
- "typedoc": "^0.26.11",
47
- "typescript": "^5.6.3"
46
+ "typedoc": "^0.27.3",
47
+ "typescript": "^5.7.2"
48
48
  },
49
49
  "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
50
50
  }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/src/index.ts CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes