@gesslar/toolkit 3.14.0 → 3.14.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 (61) hide show
  1. package/package.json +10 -9
  2. package/types/browser/index.d.ts +13 -0
  3. package/types/browser/index.d.ts.map +1 -0
  4. package/types/browser/lib/Collection.d.ts +248 -0
  5. package/types/browser/lib/Collection.d.ts.map +1 -0
  6. package/types/browser/lib/Data.d.ts +250 -0
  7. package/types/browser/lib/Data.d.ts.map +1 -0
  8. package/types/browser/lib/Disposer.d.ts +33 -0
  9. package/types/browser/lib/Disposer.d.ts.map +1 -0
  10. package/types/browser/lib/HTML.d.ts +40 -0
  11. package/types/browser/lib/HTML.d.ts.map +1 -0
  12. package/types/browser/lib/Notify.d.ts +60 -0
  13. package/types/browser/lib/Notify.d.ts.map +1 -0
  14. package/types/browser/lib/Promised.d.ts +119 -0
  15. package/types/browser/lib/Promised.d.ts.map +1 -0
  16. package/types/browser/lib/Sass.d.ts +63 -0
  17. package/types/browser/lib/Sass.d.ts.map +1 -0
  18. package/types/browser/lib/Tantrum.d.ts +52 -0
  19. package/types/browser/lib/Tantrum.d.ts.map +1 -0
  20. package/types/browser/lib/Time.d.ts +42 -0
  21. package/types/browser/lib/Time.d.ts.map +1 -0
  22. package/types/browser/lib/TypeSpec.d.ts +90 -0
  23. package/types/browser/lib/TypeSpec.d.ts.map +1 -0
  24. package/types/browser/lib/Util.d.ts +62 -0
  25. package/types/browser/lib/Util.d.ts.map +1 -0
  26. package/types/browser/lib/Valid.d.ts +33 -0
  27. package/types/browser/lib/Valid.d.ts.map +1 -0
  28. package/types/browser/lib/vendor/dompurify.esm.d.ts +29 -0
  29. package/types/browser/lib/vendor/dompurify.esm.d.ts.map +1 -0
  30. package/types/node/index.d.ts +21 -0
  31. package/types/node/index.d.ts.map +1 -0
  32. package/types/node/lib/Cache.d.ts +27 -0
  33. package/types/node/lib/Cache.d.ts.map +1 -0
  34. package/types/node/lib/DirectoryObject.d.ts +277 -0
  35. package/types/node/lib/DirectoryObject.d.ts.map +1 -0
  36. package/types/node/lib/FileObject.d.ts +209 -0
  37. package/types/node/lib/FileObject.d.ts.map +1 -0
  38. package/types/node/lib/FileSystem.d.ts +188 -0
  39. package/types/node/lib/FileSystem.d.ts.map +1 -0
  40. package/types/node/lib/Glog.d.ts +228 -0
  41. package/types/node/lib/Glog.d.ts.map +1 -0
  42. package/types/node/lib/Logger.d.ts +46 -0
  43. package/types/node/lib/Logger.d.ts.map +1 -0
  44. package/types/node/lib/Notify.d.ts +54 -0
  45. package/types/node/lib/Notify.d.ts.map +1 -0
  46. package/types/node/lib/Sass.d.ts +9 -0
  47. package/types/node/lib/Sass.d.ts.map +1 -0
  48. package/types/node/lib/Tantrum.d.ts +9 -0
  49. package/types/node/lib/Tantrum.d.ts.map +1 -0
  50. package/types/node/lib/TempDirectoryObject.d.ts +42 -0
  51. package/types/node/lib/TempDirectoryObject.d.ts.map +1 -0
  52. package/types/node/lib/Term.d.ts +127 -0
  53. package/types/node/lib/Term.d.ts.map +1 -0
  54. package/types/node/lib/Util.d.ts +100 -0
  55. package/types/node/lib/Util.d.ts.map +1 -0
  56. package/types/node/lib/VDirectoryObject.d.ts +132 -0
  57. package/types/node/lib/VDirectoryObject.d.ts.map +1 -0
  58. package/types/node/lib/VFileObject.d.ts +33 -0
  59. package/types/node/lib/VFileObject.d.ts.map +1 -0
  60. package/types/node/lib/Valid.d.ts +35 -0
  61. package/types/node/lib/Valid.d.ts.map +1 -0
@@ -0,0 +1,60 @@
1
+ declare const _default: {
2
+ /** @type {string} Display name for debugging. */
3
+ name: string;
4
+ /**
5
+ * Emits a CustomEvent without expecting a return value.
6
+ *
7
+ * @param {string} type - Event name to dispatch.
8
+ * @param {unknown} [payload] - Value assigned to `event.detail`.
9
+ * @param {boolean | NotifyEventOptions} [options] - CustomEvent options or boolean to set `bubbles`.
10
+ * @returns {void}
11
+ */
12
+ emit(type: string, payload?: unknown, options?: boolean | NotifyEventOptions): void;
13
+ /**
14
+ * Emits a CustomEvent and returns the detail for simple request/response flows.
15
+ *
16
+ * @param {string} type - Event name to dispatch.
17
+ * @param {unknown} [payload] - Value assigned to `event.detail`.
18
+ * @param {boolean | NotifyEventOptions} [options] - CustomEvent options or boolean to set `bubbles`.
19
+ * @returns {unknown} The detail placed on the CustomEvent.
20
+ */
21
+ request(type: string, payload?: unknown, options?: boolean | NotifyEventOptions): unknown;
22
+ /**
23
+ * Registers a listener for the given event type on an HTMLElement (or
24
+ * window, if not specified).
25
+ *
26
+ * @param {string} type - Event name to listen for.
27
+ * @param {(evt: Notify) => void} handler - Listener callback.
28
+ * @param {HTMLElement | Window} [element] - The object to which to attach the handler. Default is window.
29
+ * @param {boolean | object} [options] - Options to pass to addEventListener.
30
+ * @returns {() => void} Dispose function to unregister the handler.
31
+ */
32
+ on(type: string, handler: (evt: /*elided*/ any) => void, element?: HTMLElement | Window, options?: boolean | object): () => void;
33
+ /**
34
+ * Removes a previously registered listener for the given event type.
35
+ *
36
+ * @param {string} type - Event name to remove.
37
+ * @param {(evt: Notify) => void} handler - Listener callback to detach.
38
+ * @param {HTMLElement | Window} [element] - The object from which to remove the handler. Default is window.
39
+ * @param {boolean | object} [options] - Options to pass to removeEventListener.
40
+ * @returns {void}
41
+ */
42
+ off(type: string, handler: (evt: /*elided*/ any) => void, element?: HTMLElement | Window, options?: boolean | object): void;
43
+ "__#private@#buildEventInit"(detail: any, options: any): any;
44
+ };
45
+ export default _default;
46
+ export type NotifyEventOptions = {
47
+ /**
48
+ * - Whether the event bubbles up the DOM tree.
49
+ */
50
+ bubbles?: boolean;
51
+ /**
52
+ * - Whether the event can be canceled.
53
+ */
54
+ cancelable?: boolean;
55
+ /**
56
+ * - Whether the event can cross the shadow DOM boundary.
57
+ */
58
+ composed?: boolean;
59
+ };
60
+ //# sourceMappingURL=Notify.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Notify.d.ts","sourceRoot":"","sources":["../../../src/browser/lib/Notify.js"],"names":[],"mappings":";IAaE,iDAAiD;UAAtC,MAAM;IAGjB;;;;;;;OAOG;eAJQ,MAAM,YACN,OAAO,YACP,OAAO,GAAG,kBAAkB,GAC1B,IAAI;IAOjB;;;;;;;OAOG;kBAJQ,MAAM,YACN,OAAO,YACP,OAAO,GAAG,kBAAkB,GAC1B,OAAO;IASpB;;;;;;;;;OASG;aALQ,MAAM,WACN,CAAC,GAAG,gBAAQ,KAAK,IAAI,YACrB,WAAW,GAAG,MAAM,YACpB,OAAO,GAAG,MAAM,GACd,MAAM,IAAI;IAcvB;;;;;;;;OAQG;cALQ,MAAM,WACN,CAAC,GAAG,gBAAQ,KAAK,IAAI,YACrB,WAAW,GAAG,MAAM,YACpB,OAAO,GAAG,MAAM,GACd,IAAI;;;;;;;;cAjEL,OAAO;;;;iBACP,OAAO;;;;eACP,OAAO"}
@@ -0,0 +1,119 @@
1
+ /**
2
+ * Utility class providing helper functions for working with Promises,
3
+ * including settling, filtering, and extracting values from promise results.
4
+ */
5
+ export default class Promised {
6
+ /**
7
+ * Asynchronously awaits all promises in parallel.
8
+ * Wrapper around Promise.all for consistency with other utility methods.
9
+ *
10
+ * @param {Array<Promise<unknown>>} promises - Array of promises to await
11
+ * @returns {Promise<Array<unknown>>} Results of all promises
12
+ */
13
+ static await(promises: Array<Promise<unknown>>): Promise<Array<unknown>>;
14
+ /**
15
+ * Settles all promises (both fulfilled and rejected) in parallel.
16
+ * Wrapper around Promise.allSettled for consistency with other utility methods.
17
+ *
18
+ * @param {Array<Promise<unknown>>} promises - Array of promises to settle
19
+ * @returns {Promise<Array<{status: 'fulfilled'|'rejected', value?: unknown, reason?: unknown}>>} Results of all settled promises with status and value/reason
20
+ */
21
+ static settle(promises: Array<Promise<unknown>>): Promise<Array<{
22
+ status: "fulfilled" | "rejected";
23
+ value?: unknown;
24
+ reason?: unknown;
25
+ }>>;
26
+ /**
27
+ * Checks if any result in the settled promise array is rejected.
28
+ *
29
+ * @param {Array<{status: 'fulfilled'|'rejected', value?: unknown, reason?: unknown}>} settled - Array of settled promise results
30
+ * @returns {boolean} True if any result is rejected, false otherwise
31
+ */
32
+ static hasRejected(settled: Array<{
33
+ status: "fulfilled" | "rejected";
34
+ value?: unknown;
35
+ reason?: unknown;
36
+ }>): boolean;
37
+ /**
38
+ * Checks if any result in the settled promise array is fulfilled.
39
+ *
40
+ * @param {Array<{status: 'fulfilled'|'rejected', value?: unknown, reason?: unknown}>} settled - Array of settled promise results
41
+ * @returns {boolean} True if any result is fulfilled, false otherwise
42
+ */
43
+ static hasFulfilled(settled: Array<{
44
+ status: "fulfilled" | "rejected";
45
+ value?: unknown;
46
+ reason?: unknown;
47
+ }>): boolean;
48
+ /**
49
+ * Filters and returns all rejected results from a settled promise array.
50
+ *
51
+ * @param {Array<{status: 'fulfilled'|'rejected', value?: unknown, reason?: unknown}>} settled - Array of settled promise results
52
+ * @returns {Array<{status: 'rejected', reason: unknown}>} Array of rejected results
53
+ */
54
+ static rejected(settled: Array<{
55
+ status: "fulfilled" | "rejected";
56
+ value?: unknown;
57
+ reason?: unknown;
58
+ }>): Array<{
59
+ status: "rejected";
60
+ reason: unknown;
61
+ }>;
62
+ /**
63
+ * Filters and returns all fulfilled results from a settled promise array.
64
+ *
65
+ * @param {Array<{status: 'fulfilled'|'rejected', value?: unknown, reason?: unknown}>} result - Array of settled promise results
66
+ * @returns {Array<{status: 'fulfilled', value: unknown}>} Array of fulfilled results
67
+ */
68
+ static fulfilled(result: Array<{
69
+ status: "fulfilled" | "rejected";
70
+ value?: unknown;
71
+ reason?: unknown;
72
+ }>): Array<{
73
+ status: "fulfilled";
74
+ value: unknown;
75
+ }>;
76
+ /**
77
+ * Extracts the rejection reasons from a settled promise array.
78
+ *
79
+ * @param {Array<{status: 'fulfilled'|'rejected', value?: unknown, reason?: unknown}>} settled - Array of settled promise results
80
+ * @returns {Array<unknown>} Array of rejection reasons
81
+ */
82
+ static reasons(settled: Array<{
83
+ status: "fulfilled" | "rejected";
84
+ value?: unknown;
85
+ reason?: unknown;
86
+ }>): Array<unknown>;
87
+ /**
88
+ * Extracts the values from fulfilled results in a settled promise array.
89
+ *
90
+ * @param {Array<{status: 'fulfilled'|'rejected', value?: unknown, reason?: unknown}>} settled - Array of settled promise results
91
+ * @returns {Array<unknown>} Array of fulfilled values
92
+ */
93
+ static values(settled: Array<{
94
+ status: "fulfilled" | "rejected";
95
+ value?: unknown;
96
+ reason?: unknown;
97
+ }>): Array<unknown>;
98
+ /**
99
+ * Throws a Tantrum containing all rejection reasons from settled promises.
100
+ *
101
+ * @param {string} message - Error message. Defaults to "GIGO"
102
+ * @param {Array<{status: 'fulfilled'|'rejected', value?: unknown, reason?: unknown}>} settled - Array of settled promise results
103
+ * @throws {Tantrum} Throws a Tantrum error with rejection reasons
104
+ */
105
+ static throw(message: string, settled: Array<{
106
+ status: "fulfilled" | "rejected";
107
+ value?: unknown;
108
+ reason?: unknown;
109
+ }>): void;
110
+ /**
111
+ * Returns the first promise to resolve or reject from an array of promises.
112
+ * Wrapper around Promise.race for consistency with other utility methods.
113
+ *
114
+ * @param {Array<Promise<unknown>>} promises - Array of promises to race
115
+ * @returns {Promise<unknown>} Result of the first settled promise
116
+ */
117
+ static race(promises: Array<Promise<unknown>>): Promise<unknown>;
118
+ }
119
+ //# sourceMappingURL=Promised.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Promised.d.ts","sourceRoot":"","sources":["../../../src/browser/lib/Promised.js"],"names":[],"mappings":"AAEA;;;GAGG;AACH;IACE;;;;;;OAMG;IACH,uBAHW,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,GACrB,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAInC;IAED;;;;;;OAMG;IACH,wBAHW,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,GACrB,OAAO,CAAC,KAAK,CAAC;QAAC,MAAM,EAAE,WAAW,GAAC,UAAU,CAAC;QAAC,KAAK,CAAC,EAAE,OAAO,CAAC;QAAC,MAAM,CAAC,EAAE,OAAO,CAAA;KAAC,CAAC,CAAC,CAI/F;IAED;;;;;OAKG;IACH,4BAHW,KAAK,CAAC;QAAC,MAAM,EAAE,WAAW,GAAC,UAAU,CAAC;QAAC,KAAK,CAAC,EAAE,OAAO,CAAC;QAAC,MAAM,CAAC,EAAE,OAAO,CAAA;KAAC,CAAC,GACxE,OAAO,CAInB;IAED;;;;;OAKG;IACH,6BAHW,KAAK,CAAC;QAAC,MAAM,EAAE,WAAW,GAAC,UAAU,CAAC;QAAC,KAAK,CAAC,EAAE,OAAO,CAAC;QAAC,MAAM,CAAC,EAAE,OAAO,CAAA;KAAC,CAAC,GACxE,OAAO,CAInB;IAED;;;;;OAKG;IACH,yBAHW,KAAK,CAAC;QAAC,MAAM,EAAE,WAAW,GAAC,UAAU,CAAC;QAAC,KAAK,CAAC,EAAE,OAAO,CAAC;QAAC,MAAM,CAAC,EAAE,OAAO,CAAA;KAAC,CAAC,GACxE,KAAK,CAAC;QAAC,MAAM,EAAE,UAAU,CAAC;QAAC,MAAM,EAAE,OAAO,CAAA;KAAC,CAAC,CAIxD;IAED;;;;;OAKG;IACH,yBAHW,KAAK,CAAC;QAAC,MAAM,EAAE,WAAW,GAAC,UAAU,CAAC;QAAC,KAAK,CAAC,EAAE,OAAO,CAAC;QAAC,MAAM,CAAC,EAAE,OAAO,CAAA;KAAC,CAAC,GACxE,KAAK,CAAC;QAAC,MAAM,EAAE,WAAW,CAAC;QAAC,KAAK,EAAE,OAAO,CAAA;KAAC,CAAC,CAIxD;IAED;;;;;OAKG;IACH,wBAHW,KAAK,CAAC;QAAC,MAAM,EAAE,WAAW,GAAC,UAAU,CAAC;QAAC,KAAK,CAAC,EAAE,OAAO,CAAC;QAAC,MAAM,CAAC,EAAE,OAAO,CAAA;KAAC,CAAC,GACxE,KAAK,CAAC,OAAO,CAAC,CAO1B;IAED;;;;;OAKG;IACH,uBAHW,KAAK,CAAC;QAAC,MAAM,EAAE,WAAW,GAAC,UAAU,CAAC;QAAC,KAAK,CAAC,EAAE,OAAO,CAAC;QAAC,MAAM,CAAC,EAAE,OAAO,CAAA;KAAC,CAAC,GACxE,KAAK,CAAC,OAAO,CAAC,CAO1B;IAED;;;;;;OAMG;IACH,sBAJW,MAAM,WACN,KAAK,CAAC;QAAC,MAAM,EAAE,WAAW,GAAC,UAAU,CAAC;QAAC,KAAK,CAAC,EAAE,OAAO,CAAC;QAAC,MAAM,CAAC,EAAE,OAAO,CAAA;KAAC,CAAC,QAQpF;IAED;;;;;;OAMG;IACH,sBAHW,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,GACrB,OAAO,CAAC,OAAO,CAAC,CAI5B;CACF"}
@@ -0,0 +1,63 @@
1
+ /**
2
+ * Custom error class for toolkit errors.
3
+ * Provides error chaining, trace management, and formatted error reporting.
4
+ */
5
+ export default class Sass extends Error {
6
+ /**
7
+ * Creates an Sass from an existing Error object with additional
8
+ * trace message.
9
+ *
10
+ * @param {Error} error - The original error object
11
+ * @param {string} message - Additional trace message to add
12
+ * @returns {Sass} New Sass instance with trace from the original error
13
+ * @throws {Sass} If the first parameter is not an Error instance
14
+ */
15
+ static from(error: Error, message: string): Sass;
16
+ /**
17
+ * Factory method to create or enhance Sass instances.
18
+ * If error parameter is provided, enhances existing Sass or wraps
19
+ * other errors. Otherwise creates a new Sass instance.
20
+ *
21
+ * @param {string} message - The error message
22
+ * @param {Error|Sass|Tantrum} [error] - Optional existing error to wrap or enhance
23
+ * @returns {Sass} New or enhanced Sass instance
24
+ */
25
+ static "new"(message: string, error?: Error | Sass | Tantrum): Sass;
26
+ /**
27
+ * Creates a new Sass instance.
28
+ *
29
+ * @param {string} message - The error message
30
+ * @param {...unknown} [arg] - Additional arguments passed to parent Error constructor
31
+ */
32
+ constructor(message: string, ...arg?: unknown[]);
33
+ /**
34
+ * Adds a message to the beginning of the trace array.
35
+ *
36
+ * @param {string} message - The trace message to add
37
+ */
38
+ set trace(message: string);
39
+ /**
40
+ * Gets the error trace array.
41
+ *
42
+ * @returns {Array<string>} Array of trace messages
43
+ */
44
+ get trace(): Array<string>;
45
+ /**
46
+ * Adds a trace message and returns this instance for chaining.
47
+ *
48
+ * @param {string} message - The trace message to add
49
+ * @returns {this} This Sass instance for method chaining
50
+ */
51
+ addTrace(message: string): this;
52
+ /**
53
+ * Reports the error to the console with formatted output.
54
+ * Optionally includes detailed stack trace information.
55
+ *
56
+ * @param {boolean} [nerdMode] - Whether to include detailed stack trace
57
+ * @param {boolean} [isNested] - Whether this is a nested error report
58
+ */
59
+ report(nerdMode?: boolean, isNested?: boolean): void;
60
+ #private;
61
+ }
62
+ import Tantrum from "./Tantrum.js";
63
+ //# sourceMappingURL=Sass.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Sass.d.ts","sourceRoot":"","sources":["../../../src/browser/lib/Sass.js"],"names":[],"mappings":"AAeA;;;GAGG;AACH;IAgIE;;;;;;;;OAQG;IACH,mBALW,KAAK,WACL,MAAM,GACJ,IAAI,CAahB;IAED;;;;;;;;OAQG;IACH,sBAJW,MAAM,UACN,KAAK,GAAC,IAAI,GAAC,OAAO,GAChB,IAAI,CAchB;IAvKD;;;;;OAKG;IACH,qBAHW,MAAM,WACH,OAAO,EAAA,EAMpB;IAWD;;;;OAIG;IACH,mBAFW,MAAM,EAIhB;IAhBD;;;;OAIG;IACH,aAFa,KAAK,CAAC,MAAM,CAAC,CAIzB;IAWD;;;;;OAKG;IACH,kBAHW,MAAM,GACJ,IAAI,CAShB;IAED;;;;;;OAMG;IACH,kBAHW,OAAO,aACP,OAAO,QAyCjB;;CA6EF;oBAjLmB,cAAc"}
@@ -0,0 +1,52 @@
1
+ /**
2
+ * Custom aggregate error class that extends AggregateError.
3
+ * Automatically wraps plain errors in Sass instances for consistent reporting.
4
+ */
5
+ export default class Tantrum extends AggregateError {
6
+ /**
7
+ * Factory method to create a Tantrum instance.
8
+ *
9
+ * @param {string} message - The aggregate error message
10
+ * @param {Array<Error|Sass>} errors - Array of errors to aggregate
11
+ * @returns {Tantrum} New Tantrum instance
12
+ */
13
+ static "new"(message: string, errors?: Array<Error | Sass>): Tantrum;
14
+ /**
15
+ * Creates a new Tantrum instance.
16
+ *
17
+ * @param {string} message - The aggregate error message
18
+ * @param {Array<Error|Sass>} errors - Array of errors to aggregate
19
+ * @param {Sass} sass - Sass constructor
20
+ */
21
+ constructor(message: string, errors?: Array<Error | Sass>, sass?: Sass);
22
+ /**
23
+ * Adds a trace message and returns this instance for chaining.
24
+ *
25
+ * @param {string} message - The trace message to add
26
+ * @param {Error|Sass} [_error] - Optional error (currently unused, reserved for future use)
27
+ * @returns {this} This Tantrum instance for method chaining
28
+ */
29
+ addTrace(message: string, _error?: Error | Sass): this;
30
+ /**
31
+ * Adds a message to the beginning of the trace array.
32
+ *
33
+ * @param {string} message - The trace message to add
34
+ */
35
+ set trace(message: string);
36
+ /**
37
+ * Gets the error trace array.
38
+ *
39
+ * @returns {Array<string>} Array of trace messages
40
+ */
41
+ get trace(): Array<string>;
42
+ /**
43
+ * Reports all aggregated errors to the console with formatted output.
44
+ *
45
+ * @param {boolean} [nerdMode] - Whether to include detailed stack traces
46
+ * @param {boolean} [isNested] - Whether this is a nested error report
47
+ */
48
+ report(nerdMode?: boolean, isNested?: boolean): void;
49
+ #private;
50
+ }
51
+ import Sass from "./Sass.js";
52
+ //# sourceMappingURL=Tantrum.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Tantrum.d.ts","sourceRoot":"","sources":["../../../src/browser/lib/Tantrum.js"],"names":[],"mappings":"AAaA;;;GAGG;AACH;IAwFE;;;;;;OAMG;IACH,sBAJW,MAAM,WACN,KAAK,CAAC,KAAK,GAAC,IAAI,CAAC,GACf,OAAO,CAOnB;IAhGD;;;;;;OAMG;IACH,qBAJW,MAAM,WACN,KAAK,CAAC,KAAK,GAAC,IAAI,CAAC,SACjB,IAAI,EAkBd;IAED;;;;;;OAMG;IACH,kBAJW,MAAM,WACN,KAAK,GAAC,IAAI,GACR,IAAI,CAShB;IAWD;;;;OAIG;IACH,mBAFW,MAAM,EAIhB;IAhBD;;;;OAIG;IACH,aAFa,KAAK,CAAC,MAAM,CAAC,CAIzB;IAWD;;;;;OAKG;IACH,kBAHW,OAAO,aACP,OAAO,QAmBjB;;CAeF;iBA3GgB,WAAW"}
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Utility class for timing operations and promise-based delays.
3
+ * Provides methods for creating cancellable timeout promises.
4
+ */
5
+ export default class Time {
6
+ /**
7
+ * Creates a promise that resolves after a specified delay.
8
+ * The returned promise includes a timerId property that can be used with cancel().
9
+ *
10
+ * @param {number} delay - Delay in milliseconds before resolving (must be >= 0)
11
+ * @param {unknown} [value] - Optional value to resolve with after the delay
12
+ * @returns {Promise<unknown> & {timerId: number}} Promise that resolves with the value after delay, extended with timerId property
13
+ * @throws {Sass} If delay is not a number or is negative
14
+ * @example
15
+ * // Wait 1 second then continue
16
+ * await Time.after(1000)
17
+ *
18
+ * // Wait 1 second then get a value
19
+ * const result = await Time.after(1000, 'done')
20
+ *
21
+ * // Create a cancellable delay
22
+ * const promise = Time.after(5000, 'data')
23
+ * Time.cancel(promise) // Cancel before it resolves
24
+ */
25
+ static after(delay: number, value?: unknown): Promise<unknown> & {
26
+ timerId: number;
27
+ };
28
+ /**
29
+ * Cancels a promise created by Time.after() by clearing its timeout.
30
+ * If the promise has already resolved or is not a Time.after() promise, this is a no-op.
31
+ *
32
+ * @param {Promise<unknown> & {timerId?: number}} promise - Promise returned from Time.after() to cancel
33
+ * @returns {void}
34
+ * @example
35
+ * const promise = Time.after(5000, 'data')
36
+ * Time.cancel(promise) // Prevents the promise from resolving
37
+ */
38
+ static cancel(promise: Promise<unknown> & {
39
+ timerId?: number;
40
+ }): void;
41
+ }
42
+ //# sourceMappingURL=Time.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Time.d.ts","sourceRoot":"","sources":["../../../src/browser/lib/Time.js"],"names":[],"mappings":"AAEA;;;GAGG;AACH;IACE;;;;;;;;;;;;;;;;;;OAkBG;IACH,oBAfW,MAAM,UACN,OAAO,GACL,OAAO,CAAC,OAAO,CAAC,GAAG;QAAC,OAAO,EAAE,MAAM,CAAA;KAAC,CAwBhD;IAED;;;;;;;;;OASG;IACH,uBANW,OAAO,CAAC,OAAO,CAAC,GAAG;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAC,GACnC,IAAI,CAQhB;CACF"}
@@ -0,0 +1,90 @@
1
+ /**
2
+ * Type specification class for parsing and validating complex type definitions.
3
+ * Supports union types, array types, and validation options.
4
+ */
5
+ export default class TypeSpec {
6
+ /**
7
+ * Creates a new TypeSpec instance.
8
+ *
9
+ * @param {string} string - The type specification string (e.g., "string|number", "object[]")
10
+ * @param {unknown} options - Additional parsing options
11
+ */
12
+ constructor(string: string, options: unknown);
13
+ specs: any[];
14
+ length: number;
15
+ stringRepresentation: string;
16
+ /**
17
+ * Returns a string representation of the type specification.
18
+ *
19
+ * @returns {string} The type specification as a string (e.g., "string|number[]")
20
+ */
21
+ toString(): string;
22
+ /**
23
+ * Returns a JSON representation of the TypeSpec.
24
+ *
25
+ * @returns {unknown} Object containing specs, length, and string representation
26
+ */
27
+ toJSON(): unknown;
28
+ /**
29
+ * Executes a provided function once for each type specification.
30
+ *
31
+ * @param {function(unknown): void} callback - Function to execute for each spec
32
+ */
33
+ forEach(callback: (arg0: unknown) => void): void;
34
+ /**
35
+ * Tests whether all type specifications pass the provided test function.
36
+ *
37
+ * @param {function(unknown): boolean} callback - Function to test each spec
38
+ * @returns {boolean} True if all specs pass the test
39
+ */
40
+ every(callback: (arg0: unknown) => boolean): boolean;
41
+ /**
42
+ * Tests whether at least one type specification passes the provided test function.
43
+ *
44
+ * @param {function(unknown): boolean} callback - Function to test each spec
45
+ * @returns {boolean} True if at least one spec passes the test
46
+ */
47
+ some(callback: (arg0: unknown) => boolean): boolean;
48
+ /**
49
+ * Creates a new array with all type specifications that pass the provided test function.
50
+ *
51
+ * @param {function(unknown): boolean} callback - Function to test each spec
52
+ * @returns {Array<unknown>} New array with filtered specs
53
+ */
54
+ filter(callback: (arg0: unknown) => boolean): Array<unknown>;
55
+ /**
56
+ * Creates a new array populated with the results of calling the provided function on every spec.
57
+ *
58
+ * @param {function(unknown): unknown} callback - Function to call on each spec
59
+ * @returns {Array<unknown>} New array with mapped values
60
+ */
61
+ map(callback: (arg0: unknown) => unknown): Array<unknown>;
62
+ /**
63
+ * Executes a reducer function on each spec, resulting in a single output value.
64
+ *
65
+ * @param {function(unknown, unknown): unknown} callback - Function to execute on each spec
66
+ * @param {unknown} initialValue - Initial value for the accumulator
67
+ * @returns {unknown} The final accumulated value
68
+ */
69
+ reduce(callback: (arg0: unknown, arg1: unknown) => unknown, initialValue: unknown): unknown;
70
+ /**
71
+ * Returns the first type specification that satisfies the provided testing function.
72
+ *
73
+ * @param {function(unknown): boolean} callback - Function to test each spec
74
+ * @returns {object|undefined} The first spec that matches, or undefined
75
+ */
76
+ find(callback: (arg0: unknown) => boolean): object | undefined;
77
+ /**
78
+ * Tests whether a value matches any of the type specifications.
79
+ * Handles array types, union types, and empty value validation.
80
+ *
81
+ * @param {unknown} value - The value to test against the type specifications
82
+ * @param {unknown} options - Validation options
83
+ * @param {boolean} options.allowEmpty - Whether empty values are allowed
84
+ * @returns {boolean} True if the value matches any type specification
85
+ */
86
+ matches(value: unknown, options: unknown): boolean;
87
+ match(value: any, options: any): unknown[];
88
+ #private;
89
+ }
90
+ //# sourceMappingURL=TypeSpec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TypeSpec.d.ts","sourceRoot":"","sources":["../../../src/browser/lib/TypeSpec.js"],"names":[],"mappings":"AAWA;;;GAGG;AACH;IAGE;;;;;OAKG;IACH,oBAHW,MAAM,WACN,OAAO,EAUjB;IAJC,aAAwB;IACxB,eAAgC;IAChC,6BAA2C;IAI7C;;;;OAIG;IACH,YAFa,MAAM,CAQlB;IAED;;;;OAIG;IACH,UAFa,OAAO,CASnB;IAED;;;;OAIG;IACH,kBAFW,CAAS,IAAO,EAAP,OAAO,KAAG,IAAI,QAIjC;IAED;;;;;OAKG;IACH,gBAHW,CAAS,IAAO,EAAP,OAAO,KAAG,OAAO,GACxB,OAAO,CAInB;IAED;;;;;OAKG;IACH,eAHW,CAAS,IAAO,EAAP,OAAO,KAAG,OAAO,GACxB,OAAO,CAInB;IAED;;;;;OAKG;IACH,iBAHW,CAAS,IAAO,EAAP,OAAO,KAAG,OAAO,GACxB,KAAK,CAAC,OAAO,CAAC,CAI1B;IAED;;;;;OAKG;IACH,cAHW,CAAS,IAAO,EAAP,OAAO,KAAG,OAAO,GACxB,KAAK,CAAC,OAAO,CAAC,CAI1B;IAED;;;;;;OAMG;IACH,iBAJW,CAAS,IAAO,EAAP,OAAO,EAAE,IAAO,EAAP,OAAO,KAAG,OAAO,gBACnC,OAAO,GACL,OAAO,CAInB;IAED;;;;;OAKG;IACH,eAHW,CAAS,IAAO,EAAP,OAAO,KAAG,OAAO,GACxB,MAAM,GAAC,SAAS,CAI5B;IAED;;;;;;;;OAQG;IACH,eALW,OAAO,WACP,OAAO,GAEL,OAAO,CAInB;IAED,2CA6DC;;CAmDF"}
@@ -0,0 +1,62 @@
1
+ /**
2
+ * Utility class providing common helper functions for string manipulation,
3
+ * timing, and option parsing.
4
+ */
5
+ export default class Util {
6
+ /**
7
+ * Capitalizes the first letter of a string.
8
+ *
9
+ * @param {string} text - The text to capitalize
10
+ * @returns {string} Text with first letter capitalized
11
+ */
12
+ static capitalize(text: string): string;
13
+ /**
14
+ * Measure wall-clock time for an async function.
15
+ *
16
+ * @template T
17
+ * @param {() => Promise<T>} fn - Thunk returning a promise.
18
+ * @returns {Promise<{result: T, cost: number}>} Object containing result and elapsed ms (number, 1 decimal).
19
+ */
20
+ static time<T>(fn: () => Promise<T>): Promise<{
21
+ result: T;
22
+ cost: number;
23
+ }>;
24
+ /**
25
+ * Right-align a string inside a fixed width (left pad with spaces).
26
+ * If the string exceeds width it is returned unchanged.
27
+ *
28
+ * @param {string|number} text - Text to align.
29
+ * @param {number} width - Target field width (default 80).
30
+ * @returns {string} Padded string.
31
+ */
32
+ static rightAlignText(text: string | number, width?: number): string;
33
+ /**
34
+ * Centre-align a string inside a fixed width (pad with spaces on left).
35
+ * If the string exceeds width it is returned unchanged.
36
+ *
37
+ * @param {string|number} text - Text to align.
38
+ * @param {number} width - Target field width (default 80).
39
+ * @returns {string} Padded string with text centred.
40
+ */
41
+ static centreAlignText(text: string | number, width?: number): string;
42
+ /**
43
+ * Determine the Levenshtein distance between two string values
44
+ *
45
+ * @param {string} a The first value for comparison.
46
+ * @param {string} b The second value for comparison.
47
+ * @returns {number} The Levenshtein distance
48
+ */
49
+ static levenshteinDistance(a: string, b: string): number;
50
+ /**
51
+ * Determine the closest match between a string and allowed values
52
+ * from the Levenshtein distance.
53
+ *
54
+ * @param {string} input The input string to resolve
55
+ * @param {Array<string>} allowedValues The values which are permitted
56
+ * @param {number} [threshold] Max edit distance for a "close match"
57
+ * @returns {string} Suggested, probable match.
58
+ */
59
+ static findClosestMatch(input: string, allowedValues: Array<string>, threshold?: number): string;
60
+ static regexify(input: any, trim?: boolean, flags?: any[]): RegExp;
61
+ }
62
+ //# sourceMappingURL=Util.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Util.d.ts","sourceRoot":"","sources":["../../../src/browser/lib/Util.js"],"names":[],"mappings":"AAGA;;;GAGG;AACH;IACE;;;;;OAKG;IACH,wBAHW,MAAM,GACJ,MAAM,CAYlB;IAED;;;;;;OAMG;IACH,YAJa,CAAC,MACH,MAAM,OAAO,CAAC,CAAC,CAAC,GACd,OAAO,CAAC;QAAC,MAAM,EAAE,CAAC,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAC,CAAC,CAQ9C;IAED;;;;;;;OAOG;IACH,4BAJW,MAAM,GAAC,MAAM,UACb,MAAM,GACJ,MAAM,CAWlB;IAED;;;;;;;OAOG;IACH,6BAJW,MAAM,GAAC,MAAM,UACb,MAAM,GACJ,MAAM,CAalB;IAED;;;;;;OAMG;IACH,8BAJW,MAAM,KACN,MAAM,GACJ,MAAM,CAsBlB;IAED;;;;;;;;OAQG;IACH,+BALW,MAAM,iBACN,KAAK,CAAC,MAAM,CAAC,cACb,MAAM,GACJ,MAAM,CAwBlB;IAED,mEAiBC;CACF"}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Validation utility class providing type checking and assertion methods.
3
+ */
4
+ export default class Valid {
5
+ /**
6
+ * Validates a value against a type. Uses Data.isType.
7
+ *
8
+ * @param {unknown} value - The value to validate
9
+ * @param {string} type - The expected type in the form of "object", "object[]", "object|object[]"
10
+ * @param {object} [options] - Additional options for validation.
11
+ */
12
+ static type(value: unknown, type: string, options?: object): void;
13
+ /**
14
+ * Asserts a condition
15
+ *
16
+ * @param {boolean} condition - The condition to assert
17
+ * @param {string} message - The message to display if the condition is not
18
+ * met
19
+ * @param {number} [arg] - The argument to display if the condition is not
20
+ * met (optional)
21
+ */
22
+ static assert(condition: boolean, message: string, arg?: number): void;
23
+ static "__#private@#restrictedProto": string[];
24
+ /**
25
+ * Protects against prototype pollution by checking keys for dangerous property names.
26
+ * Throws if any restricted prototype properties are found in the keys array.
27
+ *
28
+ * @param {Array<string>} keys - Array of property keys to validate
29
+ * @throws {Sass} If any key matches restricted prototype properties (__proto__, constructor, prototype)
30
+ */
31
+ static prototypePollutionProtection(keys: Array<string>): void;
32
+ }
33
+ //# sourceMappingURL=Valid.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Valid.d.ts","sourceRoot":"","sources":["../../../src/browser/lib/Valid.js"],"names":[],"mappings":"AAWA;;GAEG;AACH;IACE;;;;;;OAMG;IACH,mBAJW,OAAO,QACP,MAAM,YACN,MAAM,QAQhB;IAED;;;;;;;;OAQG;IACH,yBANW,OAAO,WACP,MAAM,QAEN,MAAM,QAkBhB;IAED,+CAAmE;IAEnE;;;;;;OAMG;IACH,0CAHW,KAAK,CAAC,MAAM,CAAC,QAYvB;CACF"}
@@ -0,0 +1,29 @@
1
+ export { purify as default };
2
+ declare function purify(root: any): {
3
+ (root: any): /*elided*/ any;
4
+ version: string;
5
+ removed: any[];
6
+ isSupported: boolean;
7
+ sanitize(dirty: any, ...args: any[]): any;
8
+ setConfig(...args: any[]): void;
9
+ clearConfig(): void;
10
+ isValidAttribute(tag: any, attr: any, value: any): boolean;
11
+ addHook(entryPoint: any, hookFunction: any): void;
12
+ removeHook(entryPoint: any, hookFunction: any): any;
13
+ removeHooks(entryPoint: any): void;
14
+ removeAllHooks(): void;
15
+ };
16
+ declare namespace purify {
17
+ let version: string;
18
+ let removed: any[];
19
+ let isSupported: boolean;
20
+ function sanitize(dirty: any, ...args: any[]): any;
21
+ function setConfig(...args: any[]): void;
22
+ function clearConfig(): void;
23
+ function isValidAttribute(tag: any, attr: any, value: any): boolean;
24
+ function addHook(entryPoint: any, hookFunction: any): void;
25
+ function removeHook(entryPoint: any, hookFunction: any): any;
26
+ function removeHooks(entryPoint: any): void;
27
+ function removeAllHooks(): void;
28
+ }
29
+ //# sourceMappingURL=dompurify.esm.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dompurify.esm.d.ts","sourceRoot":"","sources":["../../../../src/browser/lib/vendor/dompurify.esm.js"],"names":[],"mappings":";AA0UE;;;;;;;;;;;;;EAA+C;;;;;IA+9B/C,mDAiJC;IACD,yCAIC;IACD,6BAGC;IACD,oEAUC;IACD,2DAMC;IACD,6DAQC;IACD,4CAEC;IACD,gCAEC"}
@@ -0,0 +1,21 @@
1
+ export { default as Collection } from "../browser/lib/Collection.js";
2
+ export { default as Data } from "../browser/lib/Data.js";
3
+ export { default as Promised } from "../browser/lib/Promised.js";
4
+ export { default as Time } from "../browser/lib/Time.js";
5
+ export { default as Type } from "../browser/lib/TypeSpec.js";
6
+ export { default as Valid } from "./lib/Valid.js";
7
+ export { default as Sass } from "./lib/Sass.js";
8
+ export { default as Tantrum } from "./lib/Tantrum.js";
9
+ export { default as Util } from "./lib/Util.js";
10
+ export { default as Cache } from "./lib/Cache.js";
11
+ export { default as DirectoryObject } from "./lib/DirectoryObject.js";
12
+ export { default as FileObject } from "./lib/FileObject.js";
13
+ export { default as FS } from "./lib/FileSystem.js";
14
+ export { default as Glog } from "./lib/Glog.js";
15
+ export { default as Notify } from "./lib/Notify.js";
16
+ export { default as TempDirectoryObject } from "./lib/TempDirectoryObject.js";
17
+ export { default as Term } from "./lib/Term.js";
18
+ export { default as VFileObject } from "./lib/VFileObject.js";
19
+ export { default as VDirectoryObject } from "./lib/VDirectoryObject.js";
20
+ export { default as Disposer, Disposer as DisposerClass } from "../browser/lib/Disposer.js";
21
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/node/index.js"],"names":[],"mappings":""}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * File system cache with automatic invalidation based on modification time.
3
+ * Provides intelligent caching of parsed JSON5/YAML files with mtime-based
4
+ * cache invalidation to optimize performance for repeated file access.
5
+ *
6
+ * The cache eliminates redundant file reads and parsing when multiple processes
7
+ * access the same dependency files, while ensuring data freshness through
8
+ * modification time checking.
9
+ */
10
+ export default class Cache {
11
+ /**
12
+ * Loads and caches parsed file data with automatic invalidation based on
13
+ * modification time.
14
+ *
15
+ * Implements a sophisticated caching strategy that checks file modification
16
+ * times to determine whether cached data is still valid, ensuring data
17
+ * freshness while optimizing performance for repeated file access during
18
+ * parallel processing.
19
+ *
20
+ * @param {import("./FileObject.js").FileObject} fileObject - The file object to load and cache
21
+ * @returns {Promise<unknown>} The parsed file data (JSON5 or YAML)
22
+ * @throws {Sass} If the file cannot be found or accessed
23
+ */
24
+ loadCachedData(fileObject: import("./FileObject.js").FileObject): Promise<unknown>;
25
+ #private;
26
+ }
27
+ //# sourceMappingURL=Cache.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Cache.d.ts","sourceRoot":"","sources":["../../../src/node/lib/Cache.js"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AACH;IAoBE;;;;;;;;;;;;OAYG;IACH,2BAJW,OAAO,iBAAiB,EAAE,UAAU,GAClC,OAAO,CAAC,OAAO,CAAC,CA6B5B;;CACF"}