@design-edito/tools 0.3.10 → 0.3.11

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 (129) hide show
  1. package/agnostic/arrays/index.d.ts +1 -1
  2. package/agnostic/arrays/index.js +1 -1
  3. package/agnostic/colors/index.d.ts +2 -2
  4. package/agnostic/colors/index.js +2 -2
  5. package/agnostic/css/clss/index.d.ts +53 -1
  6. package/agnostic/css/clss/index.js +1 -1
  7. package/agnostic/css/index.d.ts +2 -2
  8. package/agnostic/css/index.js +2 -2
  9. package/agnostic/errors/index.d.ts +1 -1
  10. package/agnostic/errors/index.js +1 -1
  11. package/agnostic/html/hyper-json/smart-tags/coalesced/index.d.ts +20 -20
  12. package/agnostic/html/hyper-json/smart-tags/coalesced/index.js +20 -20
  13. package/agnostic/html/hyper-json/smart-tags/isolated/index.d.ts +4 -4
  14. package/agnostic/html/hyper-json/smart-tags/isolated/index.js +4 -4
  15. package/agnostic/index.d.ts +4 -4
  16. package/agnostic/index.js +4 -4
  17. package/agnostic/misc/assert/index.d.ts +3 -0
  18. package/agnostic/misc/crossenv/index.d.ts +1 -1
  19. package/agnostic/misc/crossenv/index.js +1 -1
  20. package/agnostic/misc/index.d.ts +5 -5
  21. package/agnostic/misc/index.js +5 -5
  22. package/agnostic/misc/logs/index.d.ts +1 -1
  23. package/agnostic/misc/logs/index.js +1 -1
  24. package/agnostic/misc/logs/logger/index.d.ts +10 -0
  25. package/agnostic/misc/logs/logger/index.js +40 -10
  26. package/agnostic/misc/logs/styles/index.d.ts +1 -0
  27. package/agnostic/misc/logs/styles/index.js +27 -9
  28. package/agnostic/numbers/index.d.ts +2 -2
  29. package/agnostic/numbers/index.js +2 -2
  30. package/agnostic/objects/index.d.ts +4 -4
  31. package/agnostic/objects/index.js +4 -4
  32. package/agnostic/sanitization/index.d.ts +1 -1
  33. package/agnostic/sanitization/index.js +1 -1
  34. package/agnostic/strings/index.d.ts +1 -1
  35. package/agnostic/strings/index.js +1 -1
  36. package/agnostic/time/index.d.ts +2 -2
  37. package/agnostic/time/index.js +2 -2
  38. package/agnostic/time/transitions/index.d.ts +3 -3
  39. package/agnostic/time/transitions/index.js +4 -4
  40. package/components/Disclaimer/index.d.ts +45 -0
  41. package/components/Disclaimer/index.js +70 -0
  42. package/components/Drawer/index.d.ts +45 -0
  43. package/components/Drawer/index.js +82 -0
  44. package/components/Drawer/styles.module.css +0 -0
  45. package/components/EventListener/index.d.ts +20 -3
  46. package/components/EventListener/index.js +15 -22
  47. package/components/Gallery/index.d.ts +67 -0
  48. package/components/Gallery/index.js +173 -0
  49. package/components/Gallery/styles.module.css +33 -0
  50. package/components/Gallery/utils.d.ts +1 -0
  51. package/components/Image/index.d.ts +60 -0
  52. package/components/Image/index.js +99 -0
  53. package/components/Image/styles.module.css +0 -0
  54. package/components/IntersectionObserver/index.d.ts +48 -11
  55. package/components/IntersectionObserver/index.js +13 -22
  56. package/components/Paginator/index.d.ts +72 -0
  57. package/components/Paginator/index.js +116 -0
  58. package/components/Paginator/styles.module.css +9 -0
  59. package/components/ResizeObserver/index.d.ts +27 -0
  60. package/components/ResizeObserver/index.js +81 -0
  61. package/components/Scrllgngn/index.d.ts +123 -0
  62. package/components/Scrllgngn/index.js +175 -0
  63. package/components/Scrllgngn/styles.module.css +74 -0
  64. package/components/Sequencer/index.controlled.d.ts +78 -0
  65. package/components/Sequencer/index.d.ts +85 -0
  66. package/components/Sequencer/index.js +109 -0
  67. package/components/Sequencer/styles.module.css +0 -0
  68. package/components/ShadowRoot/index.d.ts +35 -0
  69. package/components/ShadowRoot/index.js +56 -0
  70. package/components/ShadowRoot/styles.module.css +0 -0
  71. package/components/Subtitles/index.d.ts +58 -0
  72. package/components/Subtitles/index.js +111 -0
  73. package/components/Subtitles/styles.module.css +0 -0
  74. package/components/Subtitles/types.d.ts +10 -0
  75. package/components/Subtitles/types.js +0 -0
  76. package/components/Subtitles/utils.d.ts +28 -0
  77. package/components/Theatre/index.d.ts +64 -0
  78. package/components/Theatre/index.js +97 -0
  79. package/components/Theatre/styles.module.css +0 -0
  80. package/components/Video/index.d.ts +119 -0
  81. package/components/Video/index.js +358 -0
  82. package/components/Video/styles.module.css +0 -0
  83. package/components/Video/utils.d.ts +10 -0
  84. package/components/_WIP_AudioQuote/index.d.ts +1 -0
  85. package/components/_WIP_AudioQuote/index.js +0 -0
  86. package/components/_WIP_Icon/index.d.ts +1 -0
  87. package/components/_WIP_Icon/index.js +0 -0
  88. package/components/index.d.ts +15 -1
  89. package/components/index.js +15 -1
  90. package/components/public-classnames.d.ts +14 -3
  91. package/components/utils/index.d.ts +1 -0
  92. package/components/utils/index.js +12 -0
  93. package/components/utils/types.d.ts +3 -0
  94. package/components/utils/types.js +0 -0
  95. package/index.d.ts +1 -1
  96. package/index.js +1 -1
  97. package/node/@aws-s3/index.test.d.ts +1 -0
  98. package/node/@aws-s3/storage/directory/index.d.ts +1 -1
  99. package/node/@aws-s3/storage/directory/index.js +1 -1
  100. package/node/@aws-s3/storage/file/index.d.ts +3 -3
  101. package/node/@aws-s3/storage/file/index.js +3 -3
  102. package/node/@google-cloud/storage/directory/index.d.ts +2 -2
  103. package/node/@google-cloud/storage/directory/index.js +2 -2
  104. package/node/@google-cloud/storage/file/index.d.ts +4 -4
  105. package/node/@google-cloud/storage/file/index.js +4 -4
  106. package/node/cloud-storage/operations/index.d.ts +3 -3
  107. package/node/cloud-storage/operations/index.js +3 -3
  108. package/node/encryption/index.d.ts +1 -1
  109. package/node/encryption/index.js +1 -1
  110. package/node/files/index.d.ts +1 -1
  111. package/node/files/index.js +1 -1
  112. package/node/ftps/directory/index.d.ts +2 -2
  113. package/node/ftps/directory/index.js +2 -2
  114. package/node/ftps/file/index.d.ts +1 -1
  115. package/node/ftps/file/index.js +1 -1
  116. package/node/images/index.d.ts +3 -3
  117. package/node/images/index.js +3 -3
  118. package/node/images/transform/operations/index.d.ts +6 -6
  119. package/node/images/transform/operations/index.js +6 -6
  120. package/node/index.d.ts +4 -4
  121. package/node/index.js +4 -4
  122. package/node/process/spawner/index.d.ts +61 -2
  123. package/node/process/spawner/index.js +6 -6
  124. package/node/sftp/file/index.d.ts +3 -3
  125. package/node/sftp/file/index.js +3 -3
  126. package/package.json +1030 -13
  127. package/components/Input/index.d.ts +0 -7
  128. package/components/Input/index.js +0 -29
  129. /package/components/{Input → Disclaimer}/styles.module.css +0 -0
@@ -2,5 +2,5 @@ export * as dedupe from './dedupe/index.js'
2
2
  export * as findDuplicates from './find-duplicates/index.js'
3
3
  export * as isArrayOf from './is-array-of/index.js'
4
4
  export * as make from './make/index.js'
5
- export * as randomPick from './random-pick/index.js'
6
5
  export * as shuffle from './shuffle/index.js'
6
+ export * as randomPick from './random-pick/index.js'
@@ -2,5 +2,5 @@ export * as dedupe from './dedupe/index.js'
2
2
  export * as findDuplicates from './find-duplicates/index.js'
3
3
  export * as isArrayOf from './is-array-of/index.js'
4
4
  export * as make from './make/index.js'
5
- export * as randomPick from './random-pick/index.js'
6
5
  export * as shuffle from './shuffle/index.js'
6
+ export * as randomPick from './random-pick/index.js'
@@ -1,7 +1,6 @@
1
- export * as contrast from './contrast/index.js'
2
1
  export * as channels from './channels/index.js'
3
- export * as convert from './convert/index.js'
4
2
  export * as grayscale from './grayscale/index.js'
3
+ export * as convert from './convert/index.js'
5
4
  export * as distance from './distance/index.js'
6
5
  export * as invert from './invert/index.js'
7
6
  export * as lerp from './lerp/index.js'
@@ -10,3 +9,4 @@ export * as palette from './palette/index.js'
10
9
  export * as rotate from './rotate/index.js'
11
10
  export * as tidy from './tidy/index.js'
12
11
  export * as typechecks from './typechecks/index.js'
12
+ export * as contrast from './contrast/index.js'
@@ -1,7 +1,6 @@
1
- export * as contrast from './contrast/index.js'
2
1
  export * as channels from './channels/index.js'
3
- export * as convert from './convert/index.js'
4
2
  export * as grayscale from './grayscale/index.js'
3
+ export * as convert from './convert/index.js'
5
4
  export * as distance from './distance/index.js'
6
5
  export * as invert from './invert/index.js'
7
6
  export * as lerp from './lerp/index.js'
@@ -10,3 +9,4 @@ export * as palette from './palette/index.js'
10
9
  export * as rotate from './rotate/index.js'
11
10
  export * as tidy from './tidy/index.js'
12
11
  export * as typechecks from './typechecks/index.js'
12
+ export * as contrast from './contrast/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
- export * as bem from './bem/index.js'
2
1
  export * as clss from './clss/index.js'
3
2
  export * as generateNiceColor from './generate-nice-color/index.js'
4
- export * as scale from './scale/index.js'
5
3
  export * as isValidCssClassName from './is-valid-css-class-name/index.js'
4
+ export * as bem from './bem/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
- export * as bem from './bem/index.js'
2
1
  export * as clss from './clss/index.js'
3
2
  export * as generateNiceColor from './generate-nice-color/index.js'
4
- export * as scale from './scale/index.js'
5
3
  export * as isValidCssClassName from './is-valid-css-class-name/index.js'
4
+ export * as bem from './bem/index.js'
5
+ export * as scale from './scale/index.js'
6
6
  export * as stylesSet from './styles-set/index.js'
@@ -1,2 +1,2 @@
1
- export * as register from './register/index.js'
2
1
  export * as unknownToString from './unknown-to-string/index.js'
2
+ export * as register from './register/index.js'
@@ -1,2 +1,2 @@
1
- export * as register from './register/index.js'
2
1
  export * as unknownToString from './unknown-to-string/index.js'
2
+ export * as register from './register/index.js'
@@ -1,52 +1,52 @@
1
1
  export * as add from './add/index.js'
2
- export * as addclass from './addclass/index.js'
3
2
  export * as and from './and/index.js'
3
+ export * as addclass from './addclass/index.js'
4
+ export * as at from './at/index.js'
4
5
  export * as append from './append/index.js'
5
6
  export * as call from './call/index.js'
6
7
  export * as deleteproperties from './deleteproperties/index.js'
7
- export * as at from './at/index.js'
8
- export * as getattribute from './getattribute/index.js'
9
- export * as getproperties from './getproperties/index.js'
10
8
  export * as clone from './clone/index.js'
11
9
  export * as equals from './equals/index.js'
12
- export * as hjparse from './hjparse/index.js'
13
- export * as hjstringify from './hjstringify/index.js'
10
+ export * as getattribute from './getattribute/index.js'
11
+ export * as getproperties from './getproperties/index.js'
14
12
  export * as getproperty from './getproperty/index.js'
13
+ export * as hjstringify from './hjstringify/index.js'
15
14
  export * as initialize from './initialize/index.js'
15
+ export * as hjparse from './hjparse/index.js'
16
+ export * as join from './join/index.js'
16
17
  export * as length from './length/index.js'
17
18
  export * as if from './if/index.js'
18
- export * as join from './join/index.js'
19
- export * as negate from './negate/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
- export * as or from './or/index.js'
24
22
  export * as print from './print/index.js'
25
- export * as push from './push/index.js'
26
- export * as recordtoarray from './recordtoarray/index.js'
23
+ export * as pickrandom from './pickrandom/index.js'
27
24
  export * as populate from './populate/index.js'
25
+ export * as or from './or/index.js'
28
26
  export * as removeattribute from './removeattribute/index.js'
29
27
  export * as pusheach from './pusheach/index.js'
28
+ export * as recordtoarray from './recordtoarray/index.js'
30
29
  export * as removeclass from './removeclass/index.js'
31
30
  export * as renameproperty from './renameproperty/index.js'
32
31
  export * as replace from './replace/index.js'
33
- export * as setattribute from './setattribute/index.js'
34
32
  export * as select from './select/index.js'
35
- export * as setproperty from './setproperty/index.js'
36
- export * as sorton from './sorton/index.js'
37
33
  export * as set from './set/index.js'
34
+ export * as setattribute from './setattribute/index.js'
35
+ export * as setproperty from './setproperty/index.js'
38
36
  export * as split from './split/index.js'
37
+ export * as sorton from './sorton/index.js'
38
+ export * as push from './push/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
42
  export * as toggleclass from './toggleclass/index.js'
43
+ export * as toboolean from './toboolean/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
- export * as tonumber from './tonumber/index.js'
47
46
  export * as torecord from './torecord/index.js'
48
47
  export * as toref from './toref/index.js'
49
- export * as transformselected from './transformselected/index.js'
48
+ export * as tonumber from './tonumber/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,52 +1,52 @@
1
1
  export * as add from './add/index.js'
2
- export * as addclass from './addclass/index.js'
3
2
  export * as and from './and/index.js'
3
+ export * as addclass from './addclass/index.js'
4
+ export * as at from './at/index.js'
4
5
  export * as append from './append/index.js'
5
6
  export * as call from './call/index.js'
6
7
  export * as deleteproperties from './deleteproperties/index.js'
7
- export * as at from './at/index.js'
8
- export * as getattribute from './getattribute/index.js'
9
- export * as getproperties from './getproperties/index.js'
10
8
  export * as clone from './clone/index.js'
11
9
  export * as equals from './equals/index.js'
12
- export * as hjparse from './hjparse/index.js'
13
- export * as hjstringify from './hjstringify/index.js'
10
+ export * as getattribute from './getattribute/index.js'
11
+ export * as getproperties from './getproperties/index.js'
14
12
  export * as getproperty from './getproperty/index.js'
13
+ export * as hjstringify from './hjstringify/index.js'
15
14
  export * as initialize from './initialize/index.js'
15
+ export * as hjparse from './hjparse/index.js'
16
+ export * as join from './join/index.js'
16
17
  export * as length from './length/index.js'
17
18
  export * as if from './if/index.js'
18
- export * as join from './join/index.js'
19
- export * as negate from './negate/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
- export * as or from './or/index.js'
24
22
  export * as print from './print/index.js'
25
- export * as push from './push/index.js'
26
- export * as recordtoarray from './recordtoarray/index.js'
23
+ export * as pickrandom from './pickrandom/index.js'
27
24
  export * as populate from './populate/index.js'
25
+ export * as or from './or/index.js'
28
26
  export * as removeattribute from './removeattribute/index.js'
29
27
  export * as pusheach from './pusheach/index.js'
28
+ export * as recordtoarray from './recordtoarray/index.js'
30
29
  export * as removeclass from './removeclass/index.js'
31
30
  export * as renameproperty from './renameproperty/index.js'
32
31
  export * as replace from './replace/index.js'
33
- export * as setattribute from './setattribute/index.js'
34
32
  export * as select from './select/index.js'
35
- export * as setproperty from './setproperty/index.js'
36
- export * as sorton from './sorton/index.js'
37
33
  export * as set from './set/index.js'
34
+ export * as setattribute from './setattribute/index.js'
35
+ export * as setproperty from './setproperty/index.js'
38
36
  export * as split from './split/index.js'
37
+ export * as sorton from './sorton/index.js'
38
+ export * as push from './push/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
42
  export * as toggleclass from './toggleclass/index.js'
43
+ export * as toboolean from './toboolean/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
- export * as tonumber from './tonumber/index.js'
47
46
  export * as torecord from './torecord/index.js'
48
47
  export * as toref from './toref/index.js'
49
- export * as transformselected from './transformselected/index.js'
48
+ export * as tonumber from './tonumber/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
2
  export * as array from './array/index.js'
3
3
  export * as element from './element/index.js'
4
+ export * as boolean from './boolean/index.js'
4
5
  export * as get from './get/index.js'
5
6
  export * as global from './global/index.js'
6
7
  export * as guess from './guess/index.js'
7
- export * as boolean from './boolean/index.js'
8
- export * as null from './null/index.js'
9
8
  export * as nodelist from './nodelist/index.js'
9
+ export * as null from './null/index.js'
10
+ export * as number from './number/index.js'
10
11
  export * as record from './record/index.js'
11
12
  export * as ref from './ref/index.js'
12
- export * as number from './number/index.js'
13
- export * as text from './text/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
2
  export * as array from './array/index.js'
3
3
  export * as element from './element/index.js'
4
+ export * as boolean from './boolean/index.js'
4
5
  export * as get from './get/index.js'
5
6
  export * as global from './global/index.js'
6
7
  export * as guess from './guess/index.js'
7
- export * as boolean from './boolean/index.js'
8
- export * as null from './null/index.js'
9
8
  export * as nodelist from './nodelist/index.js'
9
+ export * as null from './null/index.js'
10
+ export * as number from './number/index.js'
10
11
  export * as record from './record/index.js'
11
12
  export * as ref from './ref/index.js'
12
- export * as number from './number/index.js'
13
- export * as text from './text/index.js'
14
13
  export * as string from './string/index.js'
14
+ export * as text from './text/index.js'
@@ -2,15 +2,15 @@ export * as arrays from './arrays/index.js'
2
2
  export * as colors from './colors/index.js'
3
3
  export * as booleans from './booleans/index.js'
4
4
  export * as css from './css/index.js'
5
- export * as html from './html/index.js'
6
- export * as misc from './misc/index.js'
7
5
  export * as errors from './errors/index.js'
6
+ export * as misc from './misc/index.js'
8
7
  export * as objects from './objects/index.js'
8
+ export * as html from './html/index.js'
9
+ export * as numbers from './numbers/index.js'
9
10
  export * as optim from './optim/index.js'
10
11
  export * as random from './random/index.js'
11
12
  export * as sanitization from './sanitization/index.js'
13
+ export * as regexps from './regexps/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
@@ -2,15 +2,15 @@ export * as arrays from './arrays/index.js'
2
2
  export * as colors from './colors/index.js'
3
3
  export * as booleans from './booleans/index.js'
4
4
  export * as css from './css/index.js'
5
- export * as html from './html/index.js'
6
- export * as misc from './misc/index.js'
7
5
  export * as errors from './errors/index.js'
6
+ export * as misc from './misc/index.js'
8
7
  export * as objects from './objects/index.js'
8
+ export * as html from './html/index.js'
9
+ export * as numbers from './numbers/index.js'
9
10
  export * as optim from './optim/index.js'
10
11
  export * as random from './random/index.js'
11
12
  export * as sanitization from './sanitization/index.js'
13
+ export * as regexps from './regexps/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 {};
@@ -1,2 +1,2 @@
1
- export * as detectRuntime from './detect-runtime/index.js'
2
1
  export * as window from './window/index.js'
2
+ export * as detectRuntime from './detect-runtime/index.js'
@@ -1,2 +1,2 @@
1
- export * as detectRuntime from './detect-runtime/index.js'
2
1
  export * as window from './window/index.js'
2
+ export * as detectRuntime from './detect-runtime/index.js'
@@ -2,11 +2,11 @@ export * as assert from './assert/index.js'
2
2
  export * as cast from './cast/index.js'
3
3
  export * as connection from './connection/index.js'
4
4
  export * as crawler from './crawler/index.js'
5
- export * as dataSize from './data-size/index.js'
6
- export * as isConstructorFunction from './is-constructor-function/index.js'
7
5
  export * as crossenv from './crossenv/index.js'
8
- export * as isNullish from './is-nullish/index.js'
6
+ export * as isConstructorFunction from './is-constructor-function/index.js'
7
+ export * as dataSize from './data-size/index.js'
9
8
  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
9
  export * as normalizeExtension from './normalize-extension/index.js'
10
+ export * as isNullish from './is-nullish/index.js'
11
+ export * as loremIpsum from './lorem-ipsum/index.js'
12
+ export * as outcome from './outcome/index.js'
@@ -2,11 +2,11 @@ export * as assert from './assert/index.js'
2
2
  export * as cast from './cast/index.js'
3
3
  export * as connection from './connection/index.js'
4
4
  export * as crawler from './crawler/index.js'
5
- export * as dataSize from './data-size/index.js'
6
- export * as isConstructorFunction from './is-constructor-function/index.js'
7
5
  export * as crossenv from './crossenv/index.js'
8
- export * as isNullish from './is-nullish/index.js'
6
+ export * as isConstructorFunction from './is-constructor-function/index.js'
7
+ export * as dataSize from './data-size/index.js'
9
8
  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
9
  export * as normalizeExtension from './normalize-extension/index.js'
10
+ export * as isNullish from './is-nullish/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
1
  export * as approximateRational from './approximate-rational/index.js'
2
2
  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
3
  export * as geometricProgressions from './geometric-progressions/index.js'
4
+ export * as interpolate from './interpolate/index.js'
6
5
  export * as round from './round/index.js'
6
+ export * as absoluteModulo from './absolute-modulo/index.js'
@@ -1,6 +1,6 @@
1
1
  export * as approximateRational from './approximate-rational/index.js'
2
2
  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
3
  export * as geometricProgressions from './geometric-progressions/index.js'
4
+ export * as interpolate from './interpolate/index.js'
6
5
  export * as round from './round/index.js'
6
+ export * as absoluteModulo from './absolute-modulo/index.js'