@esmalley/ts-utils 1.0.1 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (99) hide show
  1. package/dist/cjs/Arithmetic.d.ts.map +1 -0
  2. package/dist/cjs/Arithmetic.js +9 -0
  3. package/dist/cjs/Arrayifier.d.ts.map +1 -0
  4. package/dist/cjs/Arrayifier.js +69 -0
  5. package/dist/cjs/CSV.d.ts.map +1 -0
  6. package/dist/cjs/CSV.js +39 -0
  7. package/dist/cjs/Color.d.ts.map +1 -0
  8. package/dist/cjs/Color.js +348 -0
  9. package/dist/cjs/Dates.d.ts.map +1 -0
  10. package/dist/cjs/Dates.js +358 -0
  11. package/dist/cjs/Kontororu/Socket.d.ts.map +1 -0
  12. package/dist/cjs/Kontororu/Socket.js +221 -0
  13. package/dist/cjs/Kontororu.d.ts.map +1 -0
  14. package/dist/cjs/Kontororu.js +27 -0
  15. package/dist/cjs/Objector.d.ts.map +1 -0
  16. package/dist/cjs/Objector.js +124 -0
  17. package/dist/cjs/Sorter.d.ts.map +1 -0
  18. package/dist/cjs/Sorter.js +32 -0
  19. package/dist/cjs/Style.d.ts.map +1 -0
  20. package/dist/cjs/Style.js +475 -0
  21. package/dist/cjs/Text.d.ts.map +1 -0
  22. package/dist/cjs/Text.js +39 -0
  23. package/dist/{Theme.d.ts.map → cjs/Theme.d.ts.map} +1 -1
  24. package/dist/cjs/Theme.js +507 -0
  25. package/dist/cjs/Toaster.d.ts.map +1 -0
  26. package/dist/cjs/Toaster.js +49 -0
  27. package/dist/cjs/index.d.ts.map +1 -0
  28. package/dist/cjs/index.js +27 -0
  29. package/dist/cjs/package.json +1 -0
  30. package/dist/esm/Arithmetic.d.ts +4 -0
  31. package/dist/esm/Arithmetic.d.ts.map +1 -0
  32. package/dist/esm/Arrayifier.d.ts +29 -0
  33. package/dist/esm/Arrayifier.d.ts.map +1 -0
  34. package/dist/esm/CSV.d.ts +10 -0
  35. package/dist/esm/CSV.d.ts.map +1 -0
  36. package/dist/esm/Color.d.ts +93 -0
  37. package/dist/esm/Color.d.ts.map +1 -0
  38. package/dist/esm/Dates.d.ts +51 -0
  39. package/dist/esm/Dates.d.ts.map +1 -0
  40. package/dist/esm/Kontororu/Socket.d.ts +44 -0
  41. package/dist/esm/Kontororu/Socket.d.ts.map +1 -0
  42. package/dist/esm/Kontororu.d.ts +8 -0
  43. package/dist/esm/Kontororu.d.ts.map +1 -0
  44. package/dist/esm/Objector.d.ts +32 -0
  45. package/dist/esm/Objector.d.ts.map +1 -0
  46. package/dist/esm/Sorter.d.ts +8 -0
  47. package/dist/esm/Sorter.d.ts.map +1 -0
  48. package/dist/esm/Style.d.ts +63 -0
  49. package/dist/esm/Style.d.ts.map +1 -0
  50. package/dist/esm/Text.d.ts +5 -0
  51. package/dist/esm/Text.d.ts.map +1 -0
  52. package/dist/esm/Theme.d.ts +1413 -0
  53. package/dist/esm/Theme.d.ts.map +1 -0
  54. package/dist/esm/Toaster.d.ts +24 -0
  55. package/dist/esm/Toaster.d.ts.map +1 -0
  56. package/dist/esm/index.d.ts +12 -0
  57. package/dist/esm/index.d.ts.map +1 -0
  58. package/package.json +8 -5
  59. package/dist/Arithmetic.d.ts.map +0 -1
  60. package/dist/Arrayifier.d.ts.map +0 -1
  61. package/dist/CSV.d.ts.map +0 -1
  62. package/dist/Color.d.ts.map +0 -1
  63. package/dist/Dates.d.ts.map +0 -1
  64. package/dist/Kontororu/Socket.d.ts.map +0 -1
  65. package/dist/Kontororu.d.ts.map +0 -1
  66. package/dist/Objector.d.ts.map +0 -1
  67. package/dist/Sorter.d.ts.map +0 -1
  68. package/dist/Style.d.ts.map +0 -1
  69. package/dist/Text.d.ts.map +0 -1
  70. package/dist/Toaster.d.ts.map +0 -1
  71. package/dist/index.d.ts.map +0 -1
  72. /package/dist/{Arithmetic.d.ts → cjs/Arithmetic.d.ts} +0 -0
  73. /package/dist/{Arrayifier.d.ts → cjs/Arrayifier.d.ts} +0 -0
  74. /package/dist/{CSV.d.ts → cjs/CSV.d.ts} +0 -0
  75. /package/dist/{Color.d.ts → cjs/Color.d.ts} +0 -0
  76. /package/dist/{Dates.d.ts → cjs/Dates.d.ts} +0 -0
  77. /package/dist/{Kontororu → cjs/Kontororu}/Socket.d.ts +0 -0
  78. /package/dist/{Kontororu.d.ts → cjs/Kontororu.d.ts} +0 -0
  79. /package/dist/{Objector.d.ts → cjs/Objector.d.ts} +0 -0
  80. /package/dist/{Sorter.d.ts → cjs/Sorter.d.ts} +0 -0
  81. /package/dist/{Style.d.ts → cjs/Style.d.ts} +0 -0
  82. /package/dist/{Text.d.ts → cjs/Text.d.ts} +0 -0
  83. /package/dist/{Theme.d.ts → cjs/Theme.d.ts} +0 -0
  84. /package/dist/{Toaster.d.ts → cjs/Toaster.d.ts} +0 -0
  85. /package/dist/{index.d.ts → cjs/index.d.ts} +0 -0
  86. /package/dist/{Arithmetic.js → esm/Arithmetic.js} +0 -0
  87. /package/dist/{Arrayifier.js → esm/Arrayifier.js} +0 -0
  88. /package/dist/{CSV.js → esm/CSV.js} +0 -0
  89. /package/dist/{Color.js → esm/Color.js} +0 -0
  90. /package/dist/{Dates.js → esm/Dates.js} +0 -0
  91. /package/dist/{Kontororu → esm/Kontororu}/Socket.js +0 -0
  92. /package/dist/{Kontororu.js → esm/Kontororu.js} +0 -0
  93. /package/dist/{Objector.js → esm/Objector.js} +0 -0
  94. /package/dist/{Sorter.js → esm/Sorter.js} +0 -0
  95. /package/dist/{Style.js → esm/Style.js} +0 -0
  96. /package/dist/{Text.js → esm/Text.js} +0 -0
  97. /package/dist/{Theme.js → esm/Theme.js} +0 -0
  98. /package/dist/{Toaster.js → esm/Toaster.js} +0 -0
  99. /package/dist/{index.js → esm/index.js} +0 -0
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Everything to help with CSV generation
3
+ */
4
+ export declare class CSV {
5
+ /**
6
+ * Convert an object to a CSV file and then download it
7
+ */
8
+ static download(data: Record<string, Record<string, unknown>>): void;
9
+ }
10
+ //# sourceMappingURL=CSV.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CSV.d.ts","sourceRoot":"","sources":["../../src/CSV.ts"],"names":[],"mappings":"AACA;;GAEG;AACH,qBAAa,GAAG;IACd;;OAEG;WACW,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GAAG,IAAI;CAiC5E"}
@@ -0,0 +1,93 @@
1
+ export declare class Color {
2
+ /**
3
+ * A linear interpolator for hexadecimal colors
4
+ * @param {string} a
5
+ * @param {string} b
6
+ * @param {number} amount
7
+ * @example
8
+ * // returns #7F7F7F
9
+ * lerpColor('#000000', '#ffffff', 0.5)
10
+ * @return {string}
11
+ */
12
+ static lerpColor(a: string, b: string, amount: number): string;
13
+ /**
14
+ * Get a color that will look readable based on a background color
15
+ */
16
+ static getTextColor(color: string, backgroundColor: string, debug?: boolean): string;
17
+ static getContrastRatio(rgb1: [number, number, number], rgb2: [number, number, number]): number;
18
+ /**
19
+ * Take a hex (#fff) and an amount and darken the color, return a hex
20
+ * @param {string} hex
21
+ * @param {number} amount
22
+ * @return {string} hex
23
+ */
24
+ /**
25
+ * Take a hex (#fff) and an amount and lighten the color, return a hex
26
+ * @param {string} hex
27
+ * @param {number} amount
28
+ * @return {string} hex
29
+ */
30
+ /**
31
+ * Mixes the color with black to create a Shade.
32
+ * Prevents the "muddy/brown" look of HSL darkening.
33
+ * @param {string} hex - The color to darken
34
+ * @param {number} amount - 0 to 1 (e.g. 0.1 is 10% darker)
35
+ * @return {string} hex
36
+ */
37
+ static darken(hex: string, amount?: number): string;
38
+ /**
39
+ * Mixes the color with white to create a Tint.
40
+ * cleaner and less "washed out" than HSL lightness adjustment.
41
+ * @param {string} hex - The color to lighten
42
+ * @param {number} amount - 0 to 1 (e.g. 0.1 is 10% lighter)
43
+ * @return {string} hex
44
+ */
45
+ static lighten(hex: string, amount?: number): string;
46
+ static shadeColor(hex: string, percent: number): string;
47
+ /**
48
+ * Are 2 colors similar to each other?
49
+ * @param {string} color1
50
+ * @param {string} color2
51
+ * @param {number} threshold
52
+ * @return {boolean}
53
+ */
54
+ static areColorsSimilar(color1: string, color2: string, threshold?: number): boolean;
55
+ /**
56
+ * Inverts a hex color
57
+ * @param {string} hex
58
+ * @return {string} hex
59
+ */
60
+ static invertColor(hex: string): string;
61
+ /**
62
+ * Takes a hex (#fff) and returns an rgba with the provided alpha
63
+ * @param {string} hex
64
+ * @param {number} alpha
65
+ * @return {string} rgba()
66
+ */
67
+ static alphaColor(hex: string, alpha: number): string;
68
+ /**
69
+ * Gets analogous colors
70
+ * @param {string} hex
71
+ * @return {Array<string>}
72
+ */
73
+ static getAnalogousColors(hex: string): string[];
74
+ /**
75
+ * Convert hex to rgb
76
+ * @param {string} hex
77
+ * @return {Array} rgb
78
+ */
79
+ static hexToRgb(hex: string): Array<number>;
80
+ /**
81
+ * Convert rgb to hex
82
+ * @param {number} r
83
+ * @param {number} g
84
+ * @param {number} b
85
+ * @return {string}
86
+ */
87
+ private static rgbToHex;
88
+ private static rgbToHsl;
89
+ private static hslToRgb;
90
+ private static calculateBrightness;
91
+ private static colorDistance;
92
+ }
93
+ //# sourceMappingURL=Color.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Color.d.ts","sourceRoot":"","sources":["../../src/Color.ts"],"names":[],"mappings":"AAIA,qBAAa,KAAK;IAKhB;;;;;;;;;OASG;WACW,SAAS,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM;IAkBrE;;OAEG;WACW,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,EAAE,KAAK,UAAQ;WAoFlE,gBAAgB,CAAC,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM;IAiBtG;;;;;OAKG;IAWH;;;;;OAKG;IAWH;;;;;;OAMG;WACW,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,GAAE,MAAY,GAAG,MAAM;IAa/D;;;;;;OAMG;WACW,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,GAAE,MAAY,GAAG,MAAM;WAalD,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM;IAWrD;;;;;;OAMG;WACW,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,SAAK;IAM7E;;;;OAIG;WACW,WAAW,CAAC,GAAG,EAAE,MAAM;IAYrC;;;;;OAKG;WACW,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM;IAO5D;;;;OAIG;WACW,kBAAkB,CAAC,GAAG,EAAE,MAAM;IAmB5C;;;;OAIG;WACW,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;IAwBlD;;;;;;OAMG;IACH,OAAO,CAAC,MAAM,CAAC,QAAQ;IAIvB,OAAO,CAAC,MAAM,CAAC,QAAQ;IAyBvB,OAAO,CAAC,MAAM,CAAC,QAAQ;IA8BvB,OAAO,CAAC,MAAM,CAAC,mBAAmB;IAKlC,OAAO,CAAC,MAAM,CAAC,aAAa;CAU7B"}
@@ -0,0 +1,51 @@
1
+ export declare class Dates {
2
+ static parse(str?: Date | string | number | undefined | null, utc?: boolean): Date;
3
+ static utc(date: Date | string | number): Date;
4
+ static getMonthsShort(): string[];
5
+ static getMonths(): string[];
6
+ static getDaysShort(): string[];
7
+ static getDays(): string[];
8
+ /**
9
+ * Format a date using php syntax
10
+ *
11
+ | Token | Meaning | Example |
12
+ | ----- | ------------------------- | ------- |
13
+ | `Y` | 4-digit year | 2025 |
14
+ | `y` | 2-digit year | 25 |
15
+ | `m` | 2-digit month | 03 |
16
+ | `n` | month (no leading zero) | 3 |
17
+ | `d` | day (2-digit) | 09 |
18
+ | `j` | day (no leading zero) | 9 |
19
+ | `S` | Ordinal suffix | th |
20
+ | `H` | 24-hour | 14 |
21
+ | `G` | 24-hour (no leading zero) | 14 |
22
+ | `h` | 12-hour | 02 |
23
+ | `g` | 12-hour (no leading zero) | 2 |
24
+ | `i` | minutes | 05 |
25
+ | `s` | seconds | 09 |
26
+ | `A` | AM/PM | PM |
27
+ | `a` | am/pm | pm |
28
+ | `w` | day of week (0–6) | 1 |
29
+ | `N` | day of week (1–7) | 2 |
30
+ | `M` | short month name | Mar |
31
+ | `F` | full month name | March |
32
+ | `D` | short weekday | Mon |
33
+ | `l` | full weekday | Monday |
34
+ */
35
+ static format(dateInput: Date | string, format: string): string;
36
+ static add(date: Date | string, amount: number, unit: 'years' | 'months' | 'days' | 'hours' | 'minutes'): Date;
37
+ static subtract(date: Date | string, amount: number, unit: 'years' | 'months' | 'days' | 'hours' | 'minutes'): Date;
38
+ static fromNow(date: Date | string): string;
39
+ /**
40
+ * Find the closest date in an array of dates
41
+ */
42
+ static getClosestDate(dateToMatch: string | Date, datesArray: string[]): string | null;
43
+ static getTodayEST(): string;
44
+ static getStartOfDay(date: Date | string): Date;
45
+ static getStartOfMonth(date: Date | string): Date;
46
+ static getStartOfGrid(date: Date | string): Date;
47
+ static isSameDay(date1: Date | string, date2: Date | string): boolean;
48
+ static isBeforeDay(date1: Date | string, date2: Date | string): boolean;
49
+ static isAfterDay(date1: Date | string, date2: Date | string): boolean;
50
+ }
51
+ //# sourceMappingURL=Dates.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Dates.d.ts","sourceRoot":"","sources":["../../src/Dates.ts"],"names":[],"mappings":"AAIA,qBAAa,KAAK;WAYF,KAAK,CACjB,GAAG,CAAC,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,GAAG,IAAI,EAC/C,GAAG,UAAQ,GACV,IAAI;WA8FO,GAAG,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI;WAKvC,cAAc,IAAI,MAAM,EAAE;WAI1B,SAAS,IAAI,MAAM,EAAE;WAIrB,YAAY,IAAI,MAAM,EAAE;WAIxB,OAAO,IAAI,MAAM,EAAE;IAIjC;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;WACW,MAAM,CAAC,SAAS,EAAE,IAAI,GAAG,MAAM,EAAE,MAAM,EAAE,MAAM;WAgG/C,GAAG,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS;WAkChG,QAAQ,CACpB,IAAI,EAAE,IAAI,GAAG,MAAM,EACnB,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,OAAO,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS;WAK3C,OAAO,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM;IA6BzC;;OAEG;WACW,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,GAAG,MAAM,GAAG,IAAI;WA+B/E,WAAW;WAIX,aAAa,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM;WAMjC,eAAe,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM;WAOnC,cAAc,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM;WAWlC,SAAS,CAAC,KAAK,EAAE,IAAI,GAAG,MAAM,EAAE,KAAK,EAAE,IAAI,GAAG,MAAM;WAepD,WAAW,CAAC,KAAK,EAAE,IAAI,GAAG,MAAM,EAAE,KAAK,EAAE,IAAI,GAAG,MAAM;WAQtD,UAAU,CAAC,KAAK,EAAE,IAAI,GAAG,MAAM,EAAE,KAAK,EAAE,IAAI,GAAG,MAAM;CAMpE"}
@@ -0,0 +1,44 @@
1
+ import { Kontororu } from '@/Kontororu.js';
2
+ type SocketMessage = {
3
+ type: 'subscribe' | 'unsubscribe' | 'data' | 'heartbeat';
4
+ table: string;
5
+ id: string;
6
+ };
7
+ declare class Socket extends Kontororu {
8
+ private ws?;
9
+ private connection_state;
10
+ private protocol;
11
+ private url;
12
+ private session_id?;
13
+ private message_queue;
14
+ private reconnect_attempts;
15
+ private should_reconnect;
16
+ private reconnect_timeout?;
17
+ private last_heartbeat_timestamp;
18
+ private readonly HEARTBEAT_INTERVAL_MS;
19
+ private readonly SUSPENSION_THRESHOLD_MS;
20
+ private readonly DISCONNECT_THRESHOLD_MS;
21
+ constructor();
22
+ connect(session_id: string): void;
23
+ /**
24
+ * Send message if the websocket is open,
25
+ * otherwise add it to the message queue
26
+ */
27
+ message({ type, table, id }: SocketMessage): void;
28
+ disconnect(): void;
29
+ /**
30
+ * Update the connection state, dispatch an event if it actually changed.
31
+ */
32
+ private update_connection_state;
33
+ /**
34
+ * Helper to determine if we need to fetch missing data
35
+ */
36
+ private check_staleness;
37
+ private handle_open;
38
+ private handle_message;
39
+ private handle_close;
40
+ private handle_error;
41
+ }
42
+ export declare const socket: Socket;
43
+ export {};
44
+ //# sourceMappingURL=Socket.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Socket.d.ts","sourceRoot":"","sources":["../../../src/Kontororu/Socket.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAS3C,KAAK,aAAa,GAAG;IACnB,IAAI,EAAE,WAAW,GAAG,aAAa,GAAG,MAAM,GAAG,WAAW,CAAC;IACzD,KAAK,EAAE,MAAM,CAAC;IACd,EAAE,EAAE,MAAM,CAAC;CACZ,CAAA;AAUD,cAAM,MAAO,SAAQ,SAAS;IAC5B,OAAO,CAAC,EAAE,CAAC,CAAY;IAEvB,OAAO,CAAC,gBAAgB,CAAgC;IAExD,OAAO,CAAC,QAAQ,CAA4I;IAE5J,OAAO,CAAC,GAAG,CAAoE;IAE/E,OAAO,CAAC,UAAU,CAAC,CAAS;IAE5B,OAAO,CAAC,aAAa,CAAuB;IAG5C,OAAO,CAAC,kBAAkB,CAAa;IACvC,OAAO,CAAC,gBAAgB,CAAQ;IAChC,OAAO,CAAC,iBAAiB,CAAC,CAAiB;IAG3C,OAAO,CAAC,wBAAwB,CAAsB;IAEtD,OAAO,CAAC,QAAQ,CAAC,qBAAqB,CAAQ;IAE9C,OAAO,CAAC,QAAQ,CAAC,uBAAuB,CAA2C;IAEnF,OAAO,CAAC,QAAQ,CAAC,uBAAuB,CAA2C;;IAyC5E,OAAO,CAAC,UAAU,EAAE,MAAM;IA+BjC;;;OAGG;IACI,OAAO,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,aAAa;IAa1C,UAAU;IAYjB;;OAEG;IACH,OAAO,CAAC,uBAAuB;IAmB/B;;OAEG;IACH,OAAO,CAAC,eAAe;IAuBvB,OAAO,CAAC,WAAW;IA+BnB,OAAO,CAAC,cAAc;IA+BtB,OAAO,CAAC,YAAY;IAkBpB,OAAO,CAAC,YAAY;CAMrB;AAED,eAAO,MAAM,MAAM,QAAe,CAAC"}
@@ -0,0 +1,8 @@
1
+ export declare class Kontororu extends EventTarget {
2
+ constructor();
3
+ private listeners;
4
+ addEventListener(type: string, listener: (...args: unknown[]) => void): void;
5
+ removeEventListener(type: string, listener: (...args: unknown[]) => void): void;
6
+ getListeners(type: string): ((...args: unknown[]) => void)[];
7
+ }
8
+ //# sourceMappingURL=Kontororu.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Kontororu.d.ts","sourceRoot":"","sources":["../../src/Kontororu.ts"],"names":[],"mappings":"AAGA,qBAAa,SAAU,SAAQ,WAAW;;IAMxC,OAAO,CAAC,SAAS,CAEf;IAEF,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI;IASrE,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI;IAQxE,YAAY,CAAC,IAAI,EAAE,MAAM,cApBS,OAAO,EAAE,KAAK,IAAI;CAuBrD"}
@@ -0,0 +1,32 @@
1
+ type Merge<T, U> = Omit<T, keyof U> & U;
2
+ type MergeAll<T extends object[]> = T extends [infer First, ...infer Rest] ? First extends object ? Rest extends object[] ? Merge<First, MergeAll<Rest>> : First : unknown : unknown;
3
+ /**
4
+ * Class to manipulate objects
5
+ */
6
+ export declare class Objector {
7
+ static deepClone<T>(obj: T, memo?: WeakMap<any, any>): T;
8
+ /**
9
+ * Deeply merges one or more source objects into a target object.
10
+ *
11
+ * - Each property from the sources is deep-cloned before being assigned.
12
+ * - Existing properties in the target are overwritten by matching keys in later sources.
13
+ * - Does not use spread or Object.assign.
14
+ * - Mutates and returns the target object.
15
+ *
16
+ * @template T - The type of the target object.
17
+ * @param {T} target - The object to extend.
18
+ * @param {...U[]} sources - One or more source objects whose properties will be copied to the target.
19
+ * @returns {T & U} The mutated target object containing all deep-cloned properties from the sources.
20
+ *
21
+ * @throws {TypeError} If the target is null or undefined.
22
+ *
23
+ * @example
24
+ * const target = { a: 1 };
25
+ * const source = { b: { nested: 2 } };
26
+ * Objector.extender(target, source);
27
+ * // target is now { a: 1, b: { nested: 2 } }
28
+ */
29
+ static extender<T extends object, U extends object[]>(target: T, ...sources: U): MergeAll<[T, ...U]>;
30
+ }
31
+ export {};
32
+ //# sourceMappingURL=Objector.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Objector.d.ts","sourceRoot":"","sources":["../../src/Objector.ts"],"names":[],"mappings":"AAEA,KAAK,KAAK,CAAC,CAAC,EAAE,CAAC,IAAI,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC;AAExC,KAAK,QAAQ,CAAC,CAAC,SAAS,MAAM,EAAE,IAC9B,CAAC,SAAS,CAAC,MAAM,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,GAClC,KAAK,SAAS,MAAM,GAClB,IAAI,SAAS,MAAM,EAAE,GACnB,KAAK,CAAC,KAAK,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAC,GAC5B,KAAK,GACP,OAAO,GACT,OAAO,CAAC;AAEd;;GAEG;AACH,qBAAa,QAAQ;WAKL,SAAS,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,oBAA0B,GAAG,CAAC;IAwErE;;;;;;;;;;;;;;;;;;;;OAoBG;WACW,QAAQ,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,SAAS,MAAM,EAAE,EACzD,MAAM,EAAE,CAAC,EACT,GAAG,OAAO,EAAE,CAAC,GACZ,QAAQ,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC;CA+BvB"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Table sorting helper utility
3
+ */
4
+ export declare class Sorter {
5
+ static descendingComparator(a: Record<string, string | number>, b: Record<string, string | number>, orderBy: string, direction_?: string): number;
6
+ static getComparator(order: string, orderBy: string, direction?: string): (a: Record<string, string | number>, b: Record<string, string | number>) => number;
7
+ }
8
+ //# sourceMappingURL=Sorter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Sorter.d.ts","sourceRoot":"","sources":["../../src/Sorter.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,qBAAa,MAAM;WACH,oBAAoB,CAAC,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM;WAsB1I,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,KAAK,MAAM;CAKpK"}
@@ -0,0 +1,63 @@
1
+ /**
2
+ * Class to get the style
3
+ * Has base CSS functions
4
+ */
5
+ export declare class Style {
6
+ static getStyle(): {
7
+ zIndex: {
8
+ appBar: number;
9
+ drawer: number;
10
+ fab: number;
11
+ calendar: number;
12
+ mobileStepper: number;
13
+ modal: number;
14
+ toast: number;
15
+ speedDial: number;
16
+ tooltip: number;
17
+ };
18
+ };
19
+ static getZIndex(): {
20
+ appBar: number;
21
+ drawer: number;
22
+ fab: number;
23
+ calendar: number;
24
+ mobileStepper: number;
25
+ modal: number;
26
+ toast: number;
27
+ speedDial: number;
28
+ tooltip: number;
29
+ };
30
+ static getNavBar(): {
31
+ width: string;
32
+ display: string;
33
+ justifyContent: string;
34
+ zIndex: number;
35
+ position: string;
36
+ overflowX: string;
37
+ overflowY: string;
38
+ scrollbarWidth: string;
39
+ };
40
+ static getShadow(depth: number): string;
41
+ /**
42
+ *
43
+ *
44
+ *
45
+ *
46
+ * Below is all the CSS injection from js
47
+ *
48
+ *
49
+ *
50
+ */
51
+ /**
52
+ * Call this to add css as a style-sheet, so you can do css selectors like hover td {} etc
53
+ */
54
+ static getStyleClassName(cssString: string | object, debug?: boolean): string;
55
+ static getCSS(): string;
56
+ static flush(): void;
57
+ private static styleCache;
58
+ private static cssMap;
59
+ private static hashCSS;
60
+ private static injectStyle;
61
+ private static processCSS;
62
+ }
63
+ //# sourceMappingURL=Style.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Style.d.ts","sourceRoot":"","sources":["../../src/Style.ts"],"names":[],"mappings":"AAQA;;;GAGG;AACH,qBAAa,KAAK;WACF,QAAQ;;;;;;;;;;;;;WAMR,SAAS;;;;;;;;;;;WAcT,SAAS;;;;;;;;;;WAaT,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;IAoC9C;;;;;;;;;OASG;IAEH;;OAEG;WACW,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,EAAE,KAAK,UAAQ;WAa3D,MAAM,IAAI,MAAM;WAMhB,KAAK,IAAI,IAAI;IAK3B,OAAO,CAAC,MAAM,CAAC,UAAU,CAA0B;IAEnD,OAAO,CAAC,MAAM,CAAC,MAAM,CAAqB;IAE1C,OAAO,CAAC,MAAM,CAAC,OAAO;IAqDtB,OAAO,CAAC,MAAM,CAAC,WAAW;IAsB1B,OAAO,CAAC,MAAM,CAAC,UAAU;CAsW1B"}
@@ -0,0 +1,5 @@
1
+ export declare class Text {
2
+ static levenshtein(a: string, b: string): number;
3
+ static toSentenceCase(str: string): string;
4
+ }
5
+ //# sourceMappingURL=Text.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../../src/Text.ts"],"names":[],"mappings":"AACA,qBAAa,IAAI;WACD,WAAW,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM;WAgCzC,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM;CAWlD"}