@design-edito/tools 0.3.10 → 0.3.12

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 (133) hide show
  1. package/agnostic/colors/index.d.ts +2 -2
  2. package/agnostic/colors/index.js +2 -2
  3. package/agnostic/css/clss/index.d.ts +53 -1
  4. package/agnostic/css/clss/index.js +1 -1
  5. package/agnostic/css/index.d.ts +1 -1
  6. package/agnostic/css/index.js +1 -1
  7. package/agnostic/html/hyper-json/smart-tags/coalesced/index.d.ts +15 -15
  8. package/agnostic/html/hyper-json/smart-tags/coalesced/index.js +15 -15
  9. package/agnostic/html/hyper-json/smart-tags/isolated/index.d.ts +6 -6
  10. package/agnostic/html/hyper-json/smart-tags/isolated/index.js +6 -6
  11. package/agnostic/index.d.ts +4 -4
  12. package/agnostic/index.js +4 -4
  13. package/agnostic/misc/assert/index.d.ts +3 -0
  14. package/agnostic/misc/index.d.ts +2 -2
  15. package/agnostic/misc/index.js +2 -2
  16. package/agnostic/misc/logs/index.d.ts +1 -1
  17. package/agnostic/misc/logs/index.js +1 -1
  18. package/agnostic/misc/logs/logger/index.d.ts +10 -0
  19. package/agnostic/misc/logs/logger/index.js +40 -10
  20. package/agnostic/misc/logs/styles/index.d.ts +1 -0
  21. package/agnostic/misc/logs/styles/index.js +27 -9
  22. package/agnostic/numbers/index.d.ts +2 -2
  23. package/agnostic/numbers/index.js +2 -2
  24. package/agnostic/objects/index.d.ts +2 -2
  25. package/agnostic/objects/index.js +2 -2
  26. package/agnostic/optim/index.d.ts +1 -1
  27. package/agnostic/optim/index.js +1 -1
  28. package/agnostic/random/index.d.ts +1 -1
  29. package/agnostic/random/index.js +1 -1
  30. package/agnostic/sanitization/index.d.ts +2 -2
  31. package/agnostic/sanitization/index.js +2 -2
  32. package/agnostic/strings/index.d.ts +1 -1
  33. package/agnostic/strings/index.js +1 -1
  34. package/agnostic/time/index.d.ts +1 -1
  35. package/agnostic/time/index.js +1 -1
  36. package/agnostic/time/transitions/index.d.ts +3 -3
  37. package/agnostic/time/transitions/index.js +4 -4
  38. package/components/BeforeAfter/index.controlled.d.ts +46 -0
  39. package/components/BeforeAfter/index.d.ts +55 -0
  40. package/components/BeforeAfter/index.js +40 -0
  41. package/components/BeforeAfter/utils.d.ts +4 -0
  42. package/components/Disclaimer/index.d.ts +45 -0
  43. package/components/Disclaimer/index.js +70 -0
  44. package/components/Disclaimer/styles.module.css +0 -0
  45. package/components/Drawer/index.d.ts +45 -0
  46. package/components/Drawer/index.js +82 -0
  47. package/components/Drawer/styles.module.css +0 -0
  48. package/components/EventListener/index.d.ts +20 -3
  49. package/components/EventListener/index.js +15 -22
  50. package/components/Gallery/index.d.ts +67 -0
  51. package/components/Gallery/index.js +173 -0
  52. package/components/Gallery/styles.module.css +33 -0
  53. package/components/Gallery/utils.d.ts +1 -0
  54. package/components/Image/index.d.ts +60 -0
  55. package/components/Image/index.js +99 -0
  56. package/components/Image/styles.module.css +0 -0
  57. package/components/IntersectionObserver/index.d.ts +48 -11
  58. package/components/IntersectionObserver/index.js +13 -22
  59. package/components/Paginator/index.d.ts +72 -0
  60. package/components/Paginator/index.js +116 -0
  61. package/components/Paginator/styles.module.css +9 -0
  62. package/components/ResizeObserver/index.d.ts +27 -0
  63. package/components/ResizeObserver/index.js +81 -0
  64. package/components/Scrllgngn/index.d.ts +123 -0
  65. package/components/Scrllgngn/index.js +175 -0
  66. package/components/Scrllgngn/styles.module.css +74 -0
  67. package/components/ScrollListener/index.d.ts +47 -0
  68. package/components/ScrollListener/index.js +110 -0
  69. package/components/ScrollListener/styles.module.css +0 -0
  70. package/components/ScrollListener/utils.d.ts +41 -0
  71. package/components/Sequencer/index.controlled.d.ts +78 -0
  72. package/components/Sequencer/index.d.ts +85 -0
  73. package/components/Sequencer/index.js +109 -0
  74. package/components/Sequencer/styles.module.css +0 -0
  75. package/components/ShadowRoot/index.d.ts +35 -0
  76. package/components/ShadowRoot/index.js +56 -0
  77. package/components/ShadowRoot/styles.module.css +0 -0
  78. package/components/Subtitles/index.d.ts +58 -0
  79. package/components/Subtitles/index.js +111 -0
  80. package/components/Subtitles/styles.module.css +0 -0
  81. package/components/Subtitles/types.d.ts +10 -0
  82. package/components/Subtitles/types.js +0 -0
  83. package/components/Subtitles/utils.d.ts +28 -0
  84. package/components/Theatre/index.d.ts +64 -0
  85. package/components/Theatre/index.js +97 -0
  86. package/components/Theatre/styles.module.css +0 -0
  87. package/components/UIModule/index.d.ts +85 -0
  88. package/components/UIModule/index.js +134 -0
  89. package/components/UIModule/styles.module.css +0 -0
  90. package/components/Video/index.d.ts +139 -0
  91. package/components/Video/index.js +385 -0
  92. package/components/Video/styles.module.css +0 -0
  93. package/components/Video/utils.d.ts +14 -0
  94. package/components/_WIP_AudioQuote/index.d.ts +1 -0
  95. package/components/_WIP_AudioQuote/index.js +0 -0
  96. package/components/_WIP_Icon/index.d.ts +1 -0
  97. package/components/_WIP_Icon/index.js +0 -0
  98. package/components/index.d.ts +18 -1
  99. package/components/index.js +18 -1
  100. package/components/public-classnames.d.ts +17 -3
  101. package/components/utils/index.d.ts +1 -0
  102. package/components/utils/index.js +12 -0
  103. package/components/utils/types.d.ts +3 -0
  104. package/components/utils/types.js +0 -0
  105. package/index.d.ts +1 -1
  106. package/index.js +1 -1
  107. package/node/@aws-s3/index.test.d.ts +1 -0
  108. package/node/@aws-s3/storage/file/index.d.ts +3 -3
  109. package/node/@aws-s3/storage/file/index.js +3 -3
  110. package/node/@google-cloud/storage/directory/index.d.ts +1 -1
  111. package/node/@google-cloud/storage/directory/index.js +1 -1
  112. package/node/@google-cloud/storage/file/index.d.ts +4 -4
  113. package/node/@google-cloud/storage/file/index.js +4 -4
  114. package/node/cloud-storage/operations/index.d.ts +1 -1
  115. package/node/cloud-storage/operations/index.js +1 -1
  116. package/node/ftps/directory/index.d.ts +1 -1
  117. package/node/ftps/directory/index.js +1 -1
  118. package/node/ftps/file/index.d.ts +1 -1
  119. package/node/ftps/file/index.js +1 -1
  120. package/node/images/index.d.ts +1 -1
  121. package/node/images/index.js +1 -1
  122. package/node/images/transform/operations/index.d.ts +4 -4
  123. package/node/images/transform/operations/index.js +4 -4
  124. package/node/index.d.ts +3 -3
  125. package/node/index.js +3 -3
  126. package/node/process/spawner/index.d.ts +61 -2
  127. package/node/process/spawner/index.js +6 -6
  128. package/node/sftp/file/index.d.ts +3 -3
  129. package/node/sftp/file/index.js +3 -3
  130. package/package.json +1051 -13
  131. package/components/Input/index.d.ts +0 -7
  132. package/components/Input/index.js +0 -29
  133. /package/components/{Input → BeforeAfter}/styles.module.css +0 -0
@@ -1,8 +1,8 @@
1
- export * as contrast from './contrast/index.js'
2
1
  export * as channels from './channels/index.js'
2
+ export * as contrast from './contrast/index.js'
3
3
  export * as convert from './convert/index.js'
4
- export * as grayscale from './grayscale/index.js'
5
4
  export * as distance from './distance/index.js'
5
+ export * as grayscale from './grayscale/index.js'
6
6
  export * as invert from './invert/index.js'
7
7
  export * as lerp from './lerp/index.js'
8
8
  export * as luminance from './luminance/index.js'
@@ -1,8 +1,8 @@
1
- export * as contrast from './contrast/index.js'
2
1
  export * as channels from './channels/index.js'
2
+ export * as contrast from './contrast/index.js'
3
3
  export * as convert from './convert/index.js'
4
- export * as grayscale from './grayscale/index.js'
5
4
  export * as distance from './distance/index.js'
5
+ export * as grayscale from './grayscale/index.js'
6
6
  export * as invert from './invert/index.js'
7
7
  export * as lerp from './lerp/index.js'
8
8
  export * as luminance from './luminance/index.js'
@@ -1,9 +1,61 @@
1
+ /**
2
+ * Object representing a CSS module mapping class names to hashed class strings.
3
+ */
1
4
  export type CssModuleObj = Readonly<Record<string, string>>;
5
+ /**
6
+ * Descriptor for modifiers.
7
+ * Can be:
8
+ * - a single string,
9
+ * - an array of strings,
10
+ * - an object mapping modifier names to boolean (only `true` modifiers are used).
11
+ */
2
12
  export type ModsDescriptor = string | string[] | Record<string, boolean | null | undefined>;
13
+ /**
14
+ * Descriptor for element names.
15
+ * Can be:
16
+ * - a single string,
17
+ * - `null`,
18
+ * - an array of strings or `null`.
19
+ */
3
20
  export type EltNamesDescriptor = string | null | Array<string | null>;
21
+ /**
22
+ * Options used to configure the `clss` function.
23
+ */
4
24
  export type Options = {
25
+ /** CSS module object containing class name mappings */
5
26
  cssModule: CssModuleObj;
27
+ /** Optional key for the root block in the CSS module */
6
28
  cssModuleRoot?: string;
7
29
  };
8
- export type ClssMaker = (eltNames: EltNamesDescriptor, modNames?: ModsDescriptor) => string;
30
+ /**
31
+ * Function to compute class names for elements and modifiers.
32
+ *
33
+ * @param eltNames - Element names or `null`. Can be a string, `null`, or array of strings/null.
34
+ * @param modNames - Modifier names. Can be a string, array of strings, or an object mapping modifiers to boolean.
35
+ * @returns A string containing all resolved public and private CSS classes.
36
+ *
37
+ * @example
38
+ * const classes = btnClss('icon', { active: true, disabled: false })
39
+ * // Returns: "button__icon button__icon--active _hash123 _hash456"
40
+ */
41
+ export type ClssMaker = (eltNames?: EltNamesDescriptor, modNames?: ModsDescriptor) => string;
42
+ /**
43
+ * Generates a `ClssMaker` function for a block or blocks.
44
+ *
45
+ * @param blockNames - A single block name or an array of block names.
46
+ * @param options - Optional configuration:
47
+ * - `cssModule`: Object mapping class names to their hashed equivalents (required if using CSS modules).
48
+ * - `cssModuleRoot`: Optional key for the root block in the CSS module (defaults to `'root'` if not provided).
49
+ * @returns {ClssMaker}
50
+ * A function to generate class names for elements and modifiers.
51
+ *
52
+ * The returned function (`ClssMaker`) parameters:
53
+ * - `eltNames`: Element names or `null`. Can be a string, `null`, or array of strings/null.
54
+ * - `modNames`: Modifier names. Can be a string, array of strings, or object mapping modifiers to boolean (`true` modifiers are included).
55
+ * - Returns a string containing all resolved public and private CSS classes, including element-specific and modifier-specific classes.
56
+ *
57
+ * @example
58
+ * const btnClss = clss('button', { cssModule: styles, cssModuleRoot: 'root' })
59
+ * const classes = btnClss('icon', { active: true, disabled: false })
60
+ */
9
61
  export declare function clss(blockNames: string | string[], options?: Options): ClssMaker;
@@ -1,7 +1,7 @@
1
1
  // src/agnostic/css/clss/index.ts
2
2
  function clss(blockNames, options) {
3
3
  const blockNamesArr = Array.isArray(blockNames) ? blockNames : [blockNames];
4
- return (eltNames, modNames = []) => {
4
+ return (eltNames = null, modNames = []) => {
5
5
  const eltNamesArr = Array.isArray(eltNames) ? eltNames : [eltNames];
6
6
  const modNamesArr = (Array.isArray(modNames) ? modNames : [modNames]).map((modName) => {
7
7
  if (typeof modName === "string") return modName;
@@ -1,6 +1,6 @@
1
1
  export * as bem from './bem/index.js'
2
2
  export * as clss from './clss/index.js'
3
3
  export * as generateNiceColor from './generate-nice-color/index.js'
4
- export * as scale from './scale/index.js'
5
4
  export * as isValidCssClassName from './is-valid-css-class-name/index.js'
5
+ export * as scale from './scale/index.js'
6
6
  export * as stylesSet from './styles-set/index.js'
@@ -1,6 +1,6 @@
1
1
  export * as bem from './bem/index.js'
2
2
  export * as clss from './clss/index.js'
3
3
  export * as generateNiceColor from './generate-nice-color/index.js'
4
- export * as scale from './scale/index.js'
5
4
  export * as isValidCssClassName from './is-valid-css-class-name/index.js'
5
+ export * as scale from './scale/index.js'
6
6
  export * as stylesSet from './styles-set/index.js'
@@ -2,51 +2,51 @@ export * as add from './add/index.js'
2
2
  export * as addclass from './addclass/index.js'
3
3
  export * as and from './and/index.js'
4
4
  export * as append from './append/index.js'
5
+ export * as at from './at/index.js'
5
6
  export * as call from './call/index.js'
7
+ export * as clone from './clone/index.js'
6
8
  export * as deleteproperties from './deleteproperties/index.js'
7
- export * as at from './at/index.js'
9
+ export * as equals from './equals/index.js'
8
10
  export * as getattribute from './getattribute/index.js'
11
+ export * as getproperty from './getproperty/index.js'
9
12
  export * as getproperties from './getproperties/index.js'
10
- export * as clone from './clone/index.js'
11
- export * as equals from './equals/index.js'
12
13
  export * as hjparse from './hjparse/index.js'
13
14
  export * as hjstringify from './hjstringify/index.js'
14
- export * as getproperty from './getproperty/index.js'
15
15
  export * as initialize from './initialize/index.js'
16
- export * as length from './length/index.js'
17
16
  export * as if from './if/index.js'
18
17
  export * as join from './join/index.js'
19
- export * as negate from './negate/index.js'
18
+ export * as length from './length/index.js'
20
19
  export * as map from './map/index.js'
20
+ export * as negate from './negate/index.js'
21
21
  export * as notrailing from './notrailing/index.js'
22
- export * as pickrandom from './pickrandom/index.js'
23
22
  export * as or from './or/index.js'
23
+ export * as populate from './populate/index.js'
24
+ export * as pickrandom from './pickrandom/index.js'
24
25
  export * as print from './print/index.js'
25
26
  export * as push from './push/index.js'
27
+ export * as pusheach from './pusheach/index.js'
26
28
  export * as recordtoarray from './recordtoarray/index.js'
27
- export * as populate from './populate/index.js'
28
29
  export * as removeattribute from './removeattribute/index.js'
29
- export * as pusheach from './pusheach/index.js'
30
30
  export * as removeclass from './removeclass/index.js'
31
31
  export * as renameproperty from './renameproperty/index.js'
32
32
  export * as replace from './replace/index.js'
33
- export * as setattribute from './setattribute/index.js'
34
33
  export * as select from './select/index.js'
34
+ export * as set from './set/index.js'
35
+ export * as setattribute from './setattribute/index.js'
35
36
  export * as setproperty from './setproperty/index.js'
36
37
  export * as sorton from './sorton/index.js'
37
- export * as set from './set/index.js'
38
38
  export * as split from './split/index.js'
39
39
  export * as spread from './spread/index.js'
40
- export * as toboolean from './toboolean/index.js'
40
+ export * as toarray from './toarray/index.js'
41
41
  export * as toelement from './toelement/index.js'
42
+ export * as toboolean from './toboolean/index.js'
42
43
  export * as toggleclass from './toggleclass/index.js'
43
44
  export * as tonodelist from './tonodelist/index.js'
44
- export * as toarray from './toarray/index.js'
45
45
  export * as tonull from './tonull/index.js'
46
46
  export * as tonumber from './tonumber/index.js'
47
47
  export * as torecord from './torecord/index.js'
48
48
  export * as toref from './toref/index.js'
49
- export * as transformselected from './transformselected/index.js'
50
49
  export * as tostring from './tostring/index.js'
51
- export * as trim from './trim/index.js'
52
50
  export * as totext from './totext/index.js'
51
+ export * as transformselected from './transformselected/index.js'
52
+ export * as trim from './trim/index.js'
@@ -2,51 +2,51 @@ export * as add from './add/index.js'
2
2
  export * as addclass from './addclass/index.js'
3
3
  export * as and from './and/index.js'
4
4
  export * as append from './append/index.js'
5
+ export * as at from './at/index.js'
5
6
  export * as call from './call/index.js'
7
+ export * as clone from './clone/index.js'
6
8
  export * as deleteproperties from './deleteproperties/index.js'
7
- export * as at from './at/index.js'
9
+ export * as equals from './equals/index.js'
8
10
  export * as getattribute from './getattribute/index.js'
11
+ export * as getproperty from './getproperty/index.js'
9
12
  export * as getproperties from './getproperties/index.js'
10
- export * as clone from './clone/index.js'
11
- export * as equals from './equals/index.js'
12
13
  export * as hjparse from './hjparse/index.js'
13
14
  export * as hjstringify from './hjstringify/index.js'
14
- export * as getproperty from './getproperty/index.js'
15
15
  export * as initialize from './initialize/index.js'
16
- export * as length from './length/index.js'
17
16
  export * as if from './if/index.js'
18
17
  export * as join from './join/index.js'
19
- export * as negate from './negate/index.js'
18
+ export * as length from './length/index.js'
20
19
  export * as map from './map/index.js'
20
+ export * as negate from './negate/index.js'
21
21
  export * as notrailing from './notrailing/index.js'
22
- export * as pickrandom from './pickrandom/index.js'
23
22
  export * as or from './or/index.js'
23
+ export * as populate from './populate/index.js'
24
+ export * as pickrandom from './pickrandom/index.js'
24
25
  export * as print from './print/index.js'
25
26
  export * as push from './push/index.js'
27
+ export * as pusheach from './pusheach/index.js'
26
28
  export * as recordtoarray from './recordtoarray/index.js'
27
- export * as populate from './populate/index.js'
28
29
  export * as removeattribute from './removeattribute/index.js'
29
- export * as pusheach from './pusheach/index.js'
30
30
  export * as removeclass from './removeclass/index.js'
31
31
  export * as renameproperty from './renameproperty/index.js'
32
32
  export * as replace from './replace/index.js'
33
- export * as setattribute from './setattribute/index.js'
34
33
  export * as select from './select/index.js'
34
+ export * as set from './set/index.js'
35
+ export * as setattribute from './setattribute/index.js'
35
36
  export * as setproperty from './setproperty/index.js'
36
37
  export * as sorton from './sorton/index.js'
37
- export * as set from './set/index.js'
38
38
  export * as split from './split/index.js'
39
39
  export * as spread from './spread/index.js'
40
- export * as toboolean from './toboolean/index.js'
40
+ export * as toarray from './toarray/index.js'
41
41
  export * as toelement from './toelement/index.js'
42
+ export * as toboolean from './toboolean/index.js'
42
43
  export * as toggleclass from './toggleclass/index.js'
43
44
  export * as tonodelist from './tonodelist/index.js'
44
- export * as toarray from './toarray/index.js'
45
45
  export * as tonull from './tonull/index.js'
46
46
  export * as tonumber from './tonumber/index.js'
47
47
  export * as torecord from './torecord/index.js'
48
48
  export * as toref from './toref/index.js'
49
- export * as transformselected from './transformselected/index.js'
50
49
  export * as tostring from './tostring/index.js'
51
- export * as trim from './trim/index.js'
52
50
  export * as totext from './totext/index.js'
51
+ export * as transformselected from './transformselected/index.js'
52
+ export * as trim from './trim/index.js'
@@ -1,14 +1,14 @@
1
1
  export * as any from './any/index.js'
2
- export * as array from './array/index.js'
2
+ export * as boolean from './boolean/index.js'
3
3
  export * as element from './element/index.js'
4
4
  export * as get from './get/index.js'
5
5
  export * as global from './global/index.js'
6
6
  export * as guess from './guess/index.js'
7
- export * as boolean from './boolean/index.js'
8
- export * as null from './null/index.js'
9
7
  export * as nodelist from './nodelist/index.js'
10
- export * as record from './record/index.js'
11
- export * as ref from './ref/index.js'
8
+ export * as null from './null/index.js'
9
+ export * as array from './array/index.js'
12
10
  export * as number from './number/index.js'
13
- export * as text from './text/index.js'
11
+ export * as ref from './ref/index.js'
12
+ export * as record from './record/index.js'
14
13
  export * as string from './string/index.js'
14
+ export * as text from './text/index.js'
@@ -1,14 +1,14 @@
1
1
  export * as any from './any/index.js'
2
- export * as array from './array/index.js'
2
+ export * as boolean from './boolean/index.js'
3
3
  export * as element from './element/index.js'
4
4
  export * as get from './get/index.js'
5
5
  export * as global from './global/index.js'
6
6
  export * as guess from './guess/index.js'
7
- export * as boolean from './boolean/index.js'
8
- export * as null from './null/index.js'
9
7
  export * as nodelist from './nodelist/index.js'
10
- export * as record from './record/index.js'
11
- export * as ref from './ref/index.js'
8
+ export * as null from './null/index.js'
9
+ export * as array from './array/index.js'
12
10
  export * as number from './number/index.js'
13
- export * as text from './text/index.js'
11
+ export * as ref from './ref/index.js'
12
+ export * as record from './record/index.js'
14
13
  export * as string from './string/index.js'
14
+ export * as text from './text/index.js'
@@ -1,16 +1,16 @@
1
1
  export * as arrays from './arrays/index.js'
2
- export * as colors from './colors/index.js'
3
2
  export * as booleans from './booleans/index.js'
3
+ export * as colors from './colors/index.js'
4
4
  export * as css from './css/index.js'
5
+ export * as errors from './errors/index.js'
5
6
  export * as html from './html/index.js'
6
7
  export * as misc from './misc/index.js'
7
- export * as errors from './errors/index.js'
8
+ export * as numbers from './numbers/index.js'
8
9
  export * as objects from './objects/index.js'
9
10
  export * as optim from './optim/index.js'
10
11
  export * as random from './random/index.js'
12
+ export * as regexps from './regexps/index.js'
11
13
  export * as sanitization from './sanitization/index.js'
12
14
  export * as strings from './strings/index.js'
13
15
  export * as time from './time/index.js'
14
16
  export * as typescript from './typescript/index.js'
15
- export * as regexps from './regexps/index.js'
16
- export * as numbers from './numbers/index.js'
package/agnostic/index.js CHANGED
@@ -1,16 +1,16 @@
1
1
  export * as arrays from './arrays/index.js'
2
- export * as colors from './colors/index.js'
3
2
  export * as booleans from './booleans/index.js'
3
+ export * as colors from './colors/index.js'
4
4
  export * as css from './css/index.js'
5
+ export * as errors from './errors/index.js'
5
6
  export * as html from './html/index.js'
6
7
  export * as misc from './misc/index.js'
7
- export * as errors from './errors/index.js'
8
+ export * as numbers from './numbers/index.js'
8
9
  export * as objects from './objects/index.js'
9
10
  export * as optim from './optim/index.js'
10
11
  export * as random from './random/index.js'
12
+ export * as regexps from './regexps/index.js'
11
13
  export * as sanitization from './sanitization/index.js'
12
14
  export * as strings from './strings/index.js'
13
15
  export * as time from './time/index.js'
14
16
  export * as typescript from './typescript/index.js'
15
- export * as regexps from './regexps/index.js'
16
- export * as numbers from './numbers/index.js'
@@ -1,5 +1,8 @@
1
1
  import * as Outcome from '../outcome/index.js';
2
2
  type Assertion = (() => boolean) | (() => Promise<boolean>) | boolean;
3
+ /**
4
+ * @deprecated
5
+ */
3
6
  export declare function assert(label: string, assertion: Assertion | Assertion[] | Map<string, Assertion> | Record<string, Assertion>): Promise<Outcome.Either<string, string>>;
4
7
  export declare function assertVerbose(label: string, assertion: Assertion | Assertion[] | Map<string, Assertion>): Promise<undefined | Outcome.Success<string>>;
5
8
  export {};
@@ -7,6 +7,6 @@ export * as isConstructorFunction from './is-constructor-function/index.js'
7
7
  export * as crossenv from './crossenv/index.js'
8
8
  export * as isNullish from './is-nullish/index.js'
9
9
  export * as logs from './logs/index.js'
10
- export * as outcome from './outcome/index.js'
11
- export * as loremIpsum from './lorem-ipsum/index.js'
12
10
  export * as normalizeExtension from './normalize-extension/index.js'
11
+ export * as loremIpsum from './lorem-ipsum/index.js'
12
+ export * as outcome from './outcome/index.js'
@@ -7,6 +7,6 @@ export * as isConstructorFunction from './is-constructor-function/index.js'
7
7
  export * as crossenv from './crossenv/index.js'
8
8
  export * as isNullish from './is-nullish/index.js'
9
9
  export * as logs from './logs/index.js'
10
- export * as outcome from './outcome/index.js'
11
- export * as loremIpsum from './lorem-ipsum/index.js'
12
10
  export * as normalizeExtension from './normalize-extension/index.js'
11
+ export * as loremIpsum from './lorem-ipsum/index.js'
12
+ export * as outcome from './outcome/index.js'
@@ -1,3 +1,3 @@
1
1
  export * as logger from './logger/index.js'
2
- export * as styles from './styles/index.js'
3
2
  export * as makeTextBlock from './make-text-block/index.js'
3
+ export * as styles from './styles/index.js'
@@ -1,3 +1,3 @@
1
1
  export * as logger from './logger/index.js'
2
- export * as styles from './styles/index.js'
3
2
  export * as makeTextBlock from './make-text-block/index.js'
3
+ export * as styles from './styles/index.js'
@@ -31,12 +31,22 @@ declare class Log<T extends ConsoleMethod = ConsoleMethod> {
31
31
  export declare class Logger {
32
32
  _private_threads: Map<string, Log<ConsoleMethod>[]>;
33
33
  constructor();
34
+ assert(thread?: string, ...args: ConsoleMethodsParams['assert']): void;
35
+ count(thread?: string, ...args: ConsoleMethodsParams['count']): void;
36
+ countReset(thread?: string, ...args: ConsoleMethodsParams['countReset']): void;
37
+ debug(thread?: string, ...args: ConsoleMethodsParams['debug']): void;
34
38
  dir(thread?: string, ...args: ConsoleMethodsParams['dir']): void;
39
+ dirxml(thread?: string, ...args: ConsoleMethodsParams['dirxml']): void;
35
40
  error(thread?: string, ...args: ConsoleMethodsParams['error']): void;
36
41
  group(thread?: string, ...args: ConsoleMethodsParams['group']): void;
42
+ groupCollapsed(thread?: string, ...args: ConsoleMethodsParams['groupCollapsed']): void;
37
43
  groupEnd(thread?: string, ...args: ConsoleMethodsParams['groupEnd']): void;
44
+ info(thread?: string, ...args: ConsoleMethodsParams['info']): void;
38
45
  log(thread?: string, ...args: ConsoleMethodsParams['log']): void;
39
46
  table(thread?: string, ...args: ConsoleMethodsParams['table']): void;
47
+ time(thread?: string, ...args: ConsoleMethodsParams['time']): void;
48
+ timeEnd(thread?: string, ...args: ConsoleMethodsParams['timeEnd']): void;
49
+ trace(thread?: string, ...args: ConsoleMethodsParams['trace']): void;
40
50
  warn(thread?: string, ...args: ConsoleMethodsParams['warn']): void;
41
51
  setLog<T extends ConsoleMethod>(threadName: string, type: T, data: ConsoleMethodsParams[T]): this;
42
52
  print(this: Logger, threadFilter?: string, withStack?: boolean): void;
@@ -32,45 +32,75 @@ var Log = class {
32
32
  var Logger = class {
33
33
  _private_threads = /* @__PURE__ */ new Map();
34
34
  constructor() {
35
+ this.assert = this.assert.bind(this);
36
+ this.count = this.count.bind(this);
37
+ this.countReset = this.countReset.bind(this);
38
+ this.debug = this.debug.bind(this);
35
39
  this.dir = this.dir.bind(this);
40
+ this.dirxml = this.dirxml.bind(this);
36
41
  this.error = this.error.bind(this);
37
42
  this.group = this.group.bind(this);
43
+ this.groupCollapsed = this.groupCollapsed.bind(this);
38
44
  this.groupEnd = this.groupEnd.bind(this);
45
+ this.info = this.info.bind(this);
39
46
  this.log = this.log.bind(this);
40
47
  this.table = this.table.bind(this);
48
+ this.time = this.time.bind(this);
49
+ this.timeEnd = this.timeEnd.bind(this);
50
+ this.trace = this.trace.bind(this);
41
51
  this.warn = this.warn.bind(this);
42
52
  this.setLog = this.setLog.bind(this);
43
53
  this.print = this.print.bind(this);
44
54
  this.printThreads = this.printThreads.bind(this);
45
55
  }
46
- // assert (thread: string = '', ...args: ConsoleMethodsParams['assert']) { this.setLog(thread, 'assert', args) }
47
- // count (thread: string = '', ...args: ConsoleMethodsParams['count']) { this.setLog(thread, 'count', args) }
48
- // countReset (thread: string = '', ...args: ConsoleMethodsParams['countReset']) { this.setLog(thread, 'countReset', args) }
49
- // debug (thread: string = '', ...args: ConsoleMethodsParams['debug']) { this.setLog(thread, 'debug', args) }
56
+ assert(thread = "", ...args) {
57
+ this.setLog(thread, "assert", args);
58
+ }
59
+ count(thread = "", ...args) {
60
+ this.setLog(thread, "count", args);
61
+ }
62
+ countReset(thread = "", ...args) {
63
+ this.setLog(thread, "countReset", args);
64
+ }
65
+ debug(thread = "", ...args) {
66
+ this.setLog(thread, "debug", args);
67
+ }
50
68
  dir(thread = "", ...args) {
51
69
  this.setLog(thread, "dir", args);
52
70
  }
53
- // dirxml (thread: string = '', ...args: ConsoleMethodsParams['dirxml']) { this.setLog(thread, 'dirxml', args) }
71
+ dirxml(thread = "", ...args) {
72
+ this.setLog(thread, "dirxml", args);
73
+ }
54
74
  error(thread = "", ...args) {
55
75
  this.setLog(thread, "error", args);
56
76
  }
57
77
  group(thread = "", ...args) {
58
78
  this.setLog(thread, "group", args);
59
79
  }
60
- // groupCollapsed (thread: string = '', ...args: ConsoleMethodsParams['groupCollapsed']) { this.setLog(thread, 'groupCollapsed', args) }
80
+ groupCollapsed(thread = "", ...args) {
81
+ this.setLog(thread, "groupCollapsed", args);
82
+ }
61
83
  groupEnd(thread = "", ...args) {
62
84
  this.setLog(thread, "groupEnd", args);
63
85
  }
64
- // info (thread: string = '', ...args: ConsoleMethodsParams['info']) { this.setLog(thread, 'info', args) }
86
+ info(thread = "", ...args) {
87
+ this.setLog(thread, "info", args);
88
+ }
65
89
  log(thread = "", ...args) {
66
90
  this.setLog(thread, "log", args);
67
91
  }
68
92
  table(thread = "", ...args) {
69
93
  this.setLog(thread, "table", args);
70
94
  }
71
- // time (thread: string = '', ...args: ConsoleMethodsParams['time']) { this.setLog(thread, 'time', args) }
72
- // timeEnd (thread: string = '', ...args: ConsoleMethodsParams['timeEnd']) { this.setLog(thread, 'timeEnd', args) }
73
- // trace (thread: string = '', ...args: ConsoleMethodsParams['trace']) { this.setLog(thread, 'trace', args) }
95
+ time(thread = "", ...args) {
96
+ this.setLog(thread, "time", args);
97
+ }
98
+ timeEnd(thread = "", ...args) {
99
+ this.setLog(thread, "timeEnd", args);
100
+ }
101
+ trace(thread = "", ...args) {
102
+ this.setLog(thread, "trace", args);
103
+ }
74
104
  warn(thread = "", ...args) {
75
105
  this.setLog(thread, "warn", args);
76
106
  }
@@ -8,4 +8,5 @@ export declare const styles: {
8
8
  success: (text: string) => string;
9
9
  error: (text: string) => string;
10
10
  warning: (text: string) => string;
11
+ italic: (text: string) => string;
11
12
  };
@@ -1,20 +1,38 @@
1
1
  // src/agnostic/misc/logs/styles/index.ts
2
- import chalk from "chalk";
3
2
  import { makeTextBlock } from "../make-text-block/index.js";
3
+ var ansi = {
4
+ reset: "\x1B[0m",
5
+ bold: "\x1B[1m",
6
+ italic: "\x1B[3m",
7
+ underline: "\x1B[4m",
8
+ fg: {
9
+ red: "\x1B[31m",
10
+ green: "\x1B[32m",
11
+ yellow: "\x1B[33m",
12
+ blue: "\x1B[34m",
13
+ gray: "\x1B[90m",
14
+ whiteBright: "\x1B[97m"
15
+ },
16
+ bg: {
17
+ red: "\x1B[41m"
18
+ }
19
+ };
20
+ var wrap = (...ansiCodes) => (text) => `${ansiCodes.join("")}${text}${ansi.reset}`;
4
21
  var styles = {
5
22
  regular: (text) => text,
6
- light: (text) => chalk.grey(text),
7
- danger: (text) => chalk.bold.bgRed.whiteBright(makeTextBlock(`/!\\
23
+ light: wrap(ansi.fg.gray),
24
+ danger: (text) => wrap(ansi.bold, ansi.bg.red, ansi.fg.whiteBright)(makeTextBlock(`/!\\
8
25
 
9
26
  ${text}
10
27
  `, 2, 6)),
11
- important: (text) => chalk.bold(text),
12
- title: (text) => `# ${chalk.bold.underline(`${text}
28
+ important: wrap(ansi.bold),
29
+ title: (text) => `# ${wrap(ansi.bold, ansi.underline)(`${text}
13
30
  `)}`,
14
- info: (text) => chalk.blueBright(text),
15
- success: (text) => chalk.greenBright(text),
16
- error: (text) => chalk.red(text),
17
- warning: (text) => chalk.yellow(text)
31
+ info: wrap(ansi.fg.blue),
32
+ success: wrap(ansi.fg.green),
33
+ error: wrap(ansi.fg.red),
34
+ warning: wrap(ansi.fg.yellow),
35
+ italic: wrap(ansi.italic)
18
36
  };
19
37
  export {
20
38
  styles
@@ -1,6 +1,6 @@
1
+ export * as absoluteModulo from './absolute-modulo/index.js'
1
2
  export * as approximateRational from './approximate-rational/index.js'
2
3
  export * as clamp from './clamp/index.js'
3
- export * as absoluteModulo from './absolute-modulo/index.js'
4
- export * as interpolate from './interpolate/index.js'
5
4
  export * as geometricProgressions from './geometric-progressions/index.js'
5
+ export * as interpolate from './interpolate/index.js'
6
6
  export * as round from './round/index.js'
@@ -1,6 +1,6 @@
1
+ export * as absoluteModulo from './absolute-modulo/index.js'
1
2
  export * as approximateRational from './approximate-rational/index.js'
2
3
  export * as clamp from './clamp/index.js'
3
- export * as absoluteModulo from './absolute-modulo/index.js'
4
- export * as interpolate from './interpolate/index.js'
5
4
  export * as geometricProgressions from './geometric-progressions/index.js'
5
+ export * as interpolate from './interpolate/index.js'
6
6
  export * as round from './round/index.js'
@@ -1,9 +1,9 @@
1
+ export * as deepGetProperty from './deep-get-property/index.js'
1
2
  export * as enums from './enums/index.js'
2
3
  export * as flattenGetters from './flatten-getters/index.js'
3
4
  export * as isObject from './is-object/index.js'
4
5
  export * as isRecord from './is-record/index.js'
5
- export * as deepGetProperty from './deep-get-property/index.js'
6
+ export * as recordFormat from './record-format/index.js'
6
7
  export * as recordMap from './record-map/index.js'
7
8
  export * as sortKeys from './sort-keys/index.js'
8
- export * as recordFormat from './record-format/index.js'
9
9
  export * as validation from './validation/index.js'
@@ -1,9 +1,9 @@
1
+ export * as deepGetProperty from './deep-get-property/index.js'
1
2
  export * as enums from './enums/index.js'
2
3
  export * as flattenGetters from './flatten-getters/index.js'
3
4
  export * as isObject from './is-object/index.js'
4
5
  export * as isRecord from './is-record/index.js'
5
- export * as deepGetProperty from './deep-get-property/index.js'
6
+ export * as recordFormat from './record-format/index.js'
6
7
  export * as recordMap from './record-map/index.js'
7
8
  export * as sortKeys from './sort-keys/index.js'
8
- export * as recordFormat from './record-format/index.js'
9
9
  export * as validation from './validation/index.js'
@@ -1,2 +1,2 @@
1
- export * as memoize from './memoize/index.js'
2
1
  export * as throttleDebounce from './throttle-debounce/index.js'
2
+ export * as memoize from './memoize/index.js'
@@ -1,2 +1,2 @@
1
- export * as memoize from './memoize/index.js'
2
1
  export * as throttleDebounce from './throttle-debounce/index.js'
2
+ export * as memoize from './memoize/index.js'
@@ -1,3 +1,3 @@
1
+ export * as uuid from './uuid/index.js'
1
2
  export * as hexChar from './hex-char/index.js'
2
3
  export * as random from './random/index.js'
3
- export * as uuid from './uuid/index.js'
@@ -1,3 +1,3 @@
1
+ export * as uuid from './uuid/index.js'
1
2
  export * as hexChar from './hex-char/index.js'
2
3
  export * as random from './random/index.js'
3
- export * as uuid from './uuid/index.js'
@@ -1,4 +1,4 @@
1
- export * as path from './path/index.js'
2
- export * as html from './html/index.js'
3
1
  export * as fileName from './file-name/index.js'
2
+ export * as html from './html/index.js'
3
+ export * as path from './path/index.js'
4
4
  export * as userInput from './user-input/index.js'