@design-edito/tools 0.3.11 → 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 (79) 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/index.d.ts +1 -1
  6. package/agnostic/css/index.js +1 -1
  7. package/agnostic/errors/index.d.ts +1 -1
  8. package/agnostic/errors/index.js +1 -1
  9. package/agnostic/html/hyper-json/smart-tags/coalesced/index.d.ts +14 -14
  10. package/agnostic/html/hyper-json/smart-tags/coalesced/index.js +14 -14
  11. package/agnostic/html/hyper-json/smart-tags/isolated/index.d.ts +3 -3
  12. package/agnostic/html/hyper-json/smart-tags/isolated/index.js +3 -3
  13. package/agnostic/index.d.ts +4 -4
  14. package/agnostic/index.js +4 -4
  15. package/agnostic/misc/crossenv/index.d.ts +1 -1
  16. package/agnostic/misc/crossenv/index.js +1 -1
  17. package/agnostic/misc/index.d.ts +3 -3
  18. package/agnostic/misc/index.js +3 -3
  19. package/agnostic/numbers/index.d.ts +1 -1
  20. package/agnostic/numbers/index.js +1 -1
  21. package/agnostic/objects/index.d.ts +2 -2
  22. package/agnostic/objects/index.js +2 -2
  23. package/agnostic/optim/index.d.ts +1 -1
  24. package/agnostic/optim/index.js +1 -1
  25. package/agnostic/random/index.d.ts +1 -1
  26. package/agnostic/random/index.js +1 -1
  27. package/agnostic/sanitization/index.d.ts +1 -1
  28. package/agnostic/sanitization/index.js +1 -1
  29. package/agnostic/strings/index.d.ts +2 -2
  30. package/agnostic/strings/index.js +2 -2
  31. package/agnostic/time/index.d.ts +2 -2
  32. package/agnostic/time/index.js +2 -2
  33. package/components/BeforeAfter/index.controlled.d.ts +46 -0
  34. package/components/BeforeAfter/index.d.ts +55 -0
  35. package/components/BeforeAfter/index.js +40 -0
  36. package/components/BeforeAfter/styles.module.css +0 -0
  37. package/components/BeforeAfter/utils.d.ts +4 -0
  38. package/components/ScrollListener/index.d.ts +47 -0
  39. package/components/ScrollListener/index.js +110 -0
  40. package/components/ScrollListener/styles.module.css +0 -0
  41. package/components/ScrollListener/utils.d.ts +41 -0
  42. package/components/Theatre/index.d.ts +2 -2
  43. package/components/Theatre/index.js +4 -4
  44. package/components/UIModule/index.d.ts +85 -0
  45. package/components/UIModule/index.js +134 -0
  46. package/components/UIModule/styles.module.css +0 -0
  47. package/components/Video/index.d.ts +20 -0
  48. package/components/Video/index.js +61 -34
  49. package/components/Video/utils.d.ts +4 -0
  50. package/components/index.d.ts +3 -0
  51. package/components/index.js +3 -0
  52. package/components/public-classnames.d.ts +3 -0
  53. package/node/@aws-s3/storage/directory/index.d.ts +1 -1
  54. package/node/@aws-s3/storage/directory/index.js +1 -1
  55. package/node/@aws-s3/storage/file/index.d.ts +1 -1
  56. package/node/@aws-s3/storage/file/index.js +1 -1
  57. package/node/@google-cloud/storage/directory/index.d.ts +1 -1
  58. package/node/@google-cloud/storage/directory/index.js +1 -1
  59. package/node/@google-cloud/storage/file/index.d.ts +2 -2
  60. package/node/@google-cloud/storage/file/index.js +2 -2
  61. package/node/cloud-storage/operations/index.d.ts +2 -2
  62. package/node/cloud-storage/operations/index.js +2 -2
  63. package/node/encryption/index.d.ts +1 -1
  64. package/node/encryption/index.js +1 -1
  65. package/node/files/index.d.ts +1 -1
  66. package/node/files/index.js +1 -1
  67. package/node/ftps/directory/index.d.ts +1 -1
  68. package/node/ftps/directory/index.js +1 -1
  69. package/node/ftps/file/index.d.ts +2 -2
  70. package/node/ftps/file/index.js +2 -2
  71. package/node/images/index.d.ts +2 -2
  72. package/node/images/index.js +2 -2
  73. package/node/images/transform/operations/index.d.ts +3 -3
  74. package/node/images/transform/operations/index.js +3 -3
  75. package/node/index.d.ts +4 -4
  76. package/node/index.js +4 -4
  77. package/node/sftp/file/index.d.ts +2 -2
  78. package/node/sftp/file/index.js +2 -2
  79. package/package.json +22 -1
@@ -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 shuffle from './shuffle/index.js'
6
5
  export * as randomPick from './random-pick/index.js'
6
+ export * as shuffle from './shuffle/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 shuffle from './shuffle/index.js'
6
5
  export * as randomPick from './random-pick/index.js'
6
+ export * as shuffle from './shuffle/index.js'
@@ -1,7 +1,8 @@
1
1
  export * as channels from './channels/index.js'
2
- export * as grayscale from './grayscale/index.js'
2
+ export * as contrast from './contrast/index.js'
3
3
  export * as convert from './convert/index.js'
4
4
  export * as distance from './distance/index.js'
5
+ export * as grayscale from './grayscale/index.js'
5
6
  export * as invert from './invert/index.js'
6
7
  export * as lerp from './lerp/index.js'
7
8
  export * as luminance from './luminance/index.js'
@@ -9,4 +10,3 @@ export * as palette from './palette/index.js'
9
10
  export * as rotate from './rotate/index.js'
10
11
  export * as tidy from './tidy/index.js'
11
12
  export * as typechecks from './typechecks/index.js'
12
- export * as contrast from './contrast/index.js'
@@ -1,7 +1,8 @@
1
1
  export * as channels from './channels/index.js'
2
- export * as grayscale from './grayscale/index.js'
2
+ export * as contrast from './contrast/index.js'
3
3
  export * as convert from './convert/index.js'
4
4
  export * as distance from './distance/index.js'
5
+ export * as grayscale from './grayscale/index.js'
5
6
  export * as invert from './invert/index.js'
6
7
  export * as lerp from './lerp/index.js'
7
8
  export * as luminance from './luminance/index.js'
@@ -9,4 +10,3 @@ export * as palette from './palette/index.js'
9
10
  export * as rotate from './rotate/index.js'
10
11
  export * as tidy from './tidy/index.js'
11
12
  export * as typechecks from './typechecks/index.js'
12
- export * as contrast from './contrast/index.js'
@@ -1,6 +1,6 @@
1
+ export * as bem from './bem/index.js'
1
2
  export * as clss from './clss/index.js'
2
3
  export * as generateNiceColor from './generate-nice-color/index.js'
3
4
  export * as isValidCssClassName from './is-valid-css-class-name/index.js'
4
- export * as bem from './bem/index.js'
5
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'
1
2
  export * as clss from './clss/index.js'
2
3
  export * as generateNiceColor from './generate-nice-color/index.js'
3
4
  export * as isValidCssClassName from './is-valid-css-class-name/index.js'
4
- export * as bem from './bem/index.js'
5
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 unknownToString from './unknown-to-string/index.js'
2
1
  export * as register from './register/index.js'
2
+ export * as unknownToString from './unknown-to-string/index.js'
@@ -1,2 +1,2 @@
1
- export * as unknownToString from './unknown-to-string/index.js'
2
1
  export * as register from './register/index.js'
2
+ export * as unknownToString from './unknown-to-string/index.js'
@@ -1,31 +1,32 @@
1
1
  export * as add from './add/index.js'
2
- export * as and from './and/index.js'
3
2
  export * as addclass from './addclass/index.js'
4
- export * as at from './at/index.js'
3
+ export * as and from './and/index.js'
5
4
  export * as append from './append/index.js'
5
+ export * as at from './at/index.js'
6
6
  export * as call from './call/index.js'
7
- export * as deleteproperties from './deleteproperties/index.js'
8
7
  export * as clone from './clone/index.js'
8
+ export * as deleteproperties from './deleteproperties/index.js'
9
9
  export * as equals from './equals/index.js'
10
10
  export * as getattribute from './getattribute/index.js'
11
- export * as getproperties from './getproperties/index.js'
12
11
  export * as getproperty from './getproperty/index.js'
12
+ export * as getproperties from './getproperties/index.js'
13
+ export * as hjparse from './hjparse/index.js'
13
14
  export * as hjstringify from './hjstringify/index.js'
14
15
  export * as initialize from './initialize/index.js'
15
- export * as hjparse from './hjparse/index.js'
16
+ export * as if from './if/index.js'
16
17
  export * as join from './join/index.js'
17
18
  export * as length from './length/index.js'
18
- export * as if from './if/index.js'
19
19
  export * as map from './map/index.js'
20
20
  export * as negate from './negate/index.js'
21
21
  export * as notrailing from './notrailing/index.js'
22
- export * as print from './print/index.js'
23
- export * as pickrandom from './pickrandom/index.js'
24
- export * as populate from './populate/index.js'
25
22
  export * as or from './or/index.js'
26
- export * as removeattribute from './removeattribute/index.js'
23
+ export * as populate from './populate/index.js'
24
+ export * as pickrandom from './pickrandom/index.js'
25
+ export * as print from './print/index.js'
26
+ export * as push from './push/index.js'
27
27
  export * as pusheach from './pusheach/index.js'
28
28
  export * as recordtoarray from './recordtoarray/index.js'
29
+ export * as removeattribute from './removeattribute/index.js'
29
30
  export * as removeclass from './removeclass/index.js'
30
31
  export * as renameproperty from './renameproperty/index.js'
31
32
  export * as replace from './replace/index.js'
@@ -33,19 +34,18 @@ export * as select from './select/index.js'
33
34
  export * as set from './set/index.js'
34
35
  export * as setattribute from './setattribute/index.js'
35
36
  export * as setproperty from './setproperty/index.js'
36
- export * as split from './split/index.js'
37
37
  export * as sorton from './sorton/index.js'
38
- export * as push from './push/index.js'
38
+ export * as split from './split/index.js'
39
39
  export * as spread from './spread/index.js'
40
40
  export * as toarray from './toarray/index.js'
41
41
  export * as toelement from './toelement/index.js'
42
- export * as toggleclass from './toggleclass/index.js'
43
42
  export * as toboolean from './toboolean/index.js'
43
+ export * as toggleclass from './toggleclass/index.js'
44
44
  export * as tonodelist from './tonodelist/index.js'
45
45
  export * as tonull from './tonull/index.js'
46
+ export * as tonumber from './tonumber/index.js'
46
47
  export * as torecord from './torecord/index.js'
47
48
  export * as toref from './toref/index.js'
48
- export * as tonumber from './tonumber/index.js'
49
49
  export * as tostring from './tostring/index.js'
50
50
  export * as totext from './totext/index.js'
51
51
  export * as transformselected from './transformselected/index.js'
@@ -1,31 +1,32 @@
1
1
  export * as add from './add/index.js'
2
- export * as and from './and/index.js'
3
2
  export * as addclass from './addclass/index.js'
4
- export * as at from './at/index.js'
3
+ export * as and from './and/index.js'
5
4
  export * as append from './append/index.js'
5
+ export * as at from './at/index.js'
6
6
  export * as call from './call/index.js'
7
- export * as deleteproperties from './deleteproperties/index.js'
8
7
  export * as clone from './clone/index.js'
8
+ export * as deleteproperties from './deleteproperties/index.js'
9
9
  export * as equals from './equals/index.js'
10
10
  export * as getattribute from './getattribute/index.js'
11
- export * as getproperties from './getproperties/index.js'
12
11
  export * as getproperty from './getproperty/index.js'
12
+ export * as getproperties from './getproperties/index.js'
13
+ export * as hjparse from './hjparse/index.js'
13
14
  export * as hjstringify from './hjstringify/index.js'
14
15
  export * as initialize from './initialize/index.js'
15
- export * as hjparse from './hjparse/index.js'
16
+ export * as if from './if/index.js'
16
17
  export * as join from './join/index.js'
17
18
  export * as length from './length/index.js'
18
- export * as if from './if/index.js'
19
19
  export * as map from './map/index.js'
20
20
  export * as negate from './negate/index.js'
21
21
  export * as notrailing from './notrailing/index.js'
22
- export * as print from './print/index.js'
23
- export * as pickrandom from './pickrandom/index.js'
24
- export * as populate from './populate/index.js'
25
22
  export * as or from './or/index.js'
26
- export * as removeattribute from './removeattribute/index.js'
23
+ export * as populate from './populate/index.js'
24
+ export * as pickrandom from './pickrandom/index.js'
25
+ export * as print from './print/index.js'
26
+ export * as push from './push/index.js'
27
27
  export * as pusheach from './pusheach/index.js'
28
28
  export * as recordtoarray from './recordtoarray/index.js'
29
+ export * as removeattribute from './removeattribute/index.js'
29
30
  export * as removeclass from './removeclass/index.js'
30
31
  export * as renameproperty from './renameproperty/index.js'
31
32
  export * as replace from './replace/index.js'
@@ -33,19 +34,18 @@ export * as select from './select/index.js'
33
34
  export * as set from './set/index.js'
34
35
  export * as setattribute from './setattribute/index.js'
35
36
  export * as setproperty from './setproperty/index.js'
36
- export * as split from './split/index.js'
37
37
  export * as sorton from './sorton/index.js'
38
- export * as push from './push/index.js'
38
+ export * as split from './split/index.js'
39
39
  export * as spread from './spread/index.js'
40
40
  export * as toarray from './toarray/index.js'
41
41
  export * as toelement from './toelement/index.js'
42
- export * as toggleclass from './toggleclass/index.js'
43
42
  export * as toboolean from './toboolean/index.js'
43
+ export * as toggleclass from './toggleclass/index.js'
44
44
  export * as tonodelist from './tonodelist/index.js'
45
45
  export * as tonull from './tonull/index.js'
46
+ export * as tonumber from './tonumber/index.js'
46
47
  export * as torecord from './torecord/index.js'
47
48
  export * as toref from './toref/index.js'
48
- export * as tonumber from './tonumber/index.js'
49
49
  export * as tostring from './tostring/index.js'
50
50
  export * as totext from './totext/index.js'
51
51
  export * as transformselected from './transformselected/index.js'
@@ -1,14 +1,14 @@
1
1
  export * as any from './any/index.js'
2
- export * as array from './array/index.js'
3
- export * as element from './element/index.js'
4
2
  export * as boolean from './boolean/index.js'
3
+ export * as element from './element/index.js'
5
4
  export * as get from './get/index.js'
6
5
  export * as global from './global/index.js'
7
6
  export * as guess from './guess/index.js'
8
7
  export * as nodelist from './nodelist/index.js'
9
8
  export * as null from './null/index.js'
9
+ export * as array from './array/index.js'
10
10
  export * as number from './number/index.js'
11
- export * as record from './record/index.js'
12
11
  export * as ref from './ref/index.js'
12
+ export * as record from './record/index.js'
13
13
  export * as string from './string/index.js'
14
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'
3
- export * as element from './element/index.js'
4
2
  export * as boolean from './boolean/index.js'
3
+ export * as element from './element/index.js'
5
4
  export * as get from './get/index.js'
6
5
  export * as global from './global/index.js'
7
6
  export * as guess from './guess/index.js'
8
7
  export * as nodelist from './nodelist/index.js'
9
8
  export * as null from './null/index.js'
9
+ export * as array from './array/index.js'
10
10
  export * as number from './number/index.js'
11
- export * as record from './record/index.js'
12
11
  export * as ref from './ref/index.js'
12
+ export * as record from './record/index.js'
13
13
  export * as string from './string/index.js'
14
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
5
  export * as errors from './errors/index.js'
6
- export * as misc from './misc/index.js'
7
- export * as objects from './objects/index.js'
8
6
  export * as html from './html/index.js'
7
+ export * as misc from './misc/index.js'
9
8
  export * as numbers from './numbers/index.js'
9
+ export * as objects from './objects/index.js'
10
10
  export * as optim from './optim/index.js'
11
11
  export * as random from './random/index.js'
12
- export * as sanitization from './sanitization/index.js'
13
12
  export * as regexps from './regexps/index.js'
13
+ export * as sanitization from './sanitization/index.js'
14
14
  export * as strings from './strings/index.js'
15
15
  export * as time from './time/index.js'
16
16
  export * as typescript from './typescript/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
5
  export * as errors from './errors/index.js'
6
- export * as misc from './misc/index.js'
7
- export * as objects from './objects/index.js'
8
6
  export * as html from './html/index.js'
7
+ export * as misc from './misc/index.js'
9
8
  export * as numbers from './numbers/index.js'
9
+ export * as objects from './objects/index.js'
10
10
  export * as optim from './optim/index.js'
11
11
  export * as random from './random/index.js'
12
- export * as sanitization from './sanitization/index.js'
13
12
  export * as regexps from './regexps/index.js'
13
+ export * as sanitization from './sanitization/index.js'
14
14
  export * as strings from './strings/index.js'
15
15
  export * as time from './time/index.js'
16
16
  export * as typescript from './typescript/index.js'
@@ -1,2 +1,2 @@
1
- export * as window from './window/index.js'
2
1
  export * as detectRuntime from './detect-runtime/index.js'
2
+ export * as window from './window/index.js'
@@ -1,2 +1,2 @@
1
- export * as window from './window/index.js'
2
1
  export * as detectRuntime from './detect-runtime/index.js'
2
+ export * as window from './window/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 crossenv from './crossenv/index.js'
6
- export * as isConstructorFunction from './is-constructor-function/index.js'
7
5
  export * as dataSize from './data-size/index.js'
6
+ export * as isConstructorFunction from './is-constructor-function/index.js'
7
+ export * as crossenv from './crossenv/index.js'
8
+ export * as isNullish from './is-nullish/index.js'
8
9
  export * as logs from './logs/index.js'
9
10
  export * as normalizeExtension from './normalize-extension/index.js'
10
- export * as isNullish from './is-nullish/index.js'
11
11
  export * as loremIpsum from './lorem-ipsum/index.js'
12
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 crossenv from './crossenv/index.js'
6
- export * as isConstructorFunction from './is-constructor-function/index.js'
7
5
  export * as dataSize from './data-size/index.js'
6
+ export * as isConstructorFunction from './is-constructor-function/index.js'
7
+ export * as crossenv from './crossenv/index.js'
8
+ export * as isNullish from './is-nullish/index.js'
8
9
  export * as logs from './logs/index.js'
9
10
  export * as normalizeExtension from './normalize-extension/index.js'
10
- export * as isNullish from './is-nullish/index.js'
11
11
  export * as loremIpsum from './lorem-ipsum/index.js'
12
12
  export * as outcome from './outcome/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
4
  export * as geometricProgressions from './geometric-progressions/index.js'
4
5
  export * as interpolate from './interpolate/index.js'
5
6
  export * as round from './round/index.js'
6
- export * as absoluteModulo from './absolute-modulo/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
4
  export * as geometricProgressions from './geometric-progressions/index.js'
4
5
  export * as interpolate from './interpolate/index.js'
5
6
  export * as round from './round/index.js'
6
- export * as absoluteModulo from './absolute-modulo/index.js'
@@ -1,9 +1,9 @@
1
1
  export * as deepGetProperty from './deep-get-property/index.js'
2
2
  export * as enums from './enums/index.js'
3
- export * as isRecord from './is-record/index.js'
3
+ export * as flattenGetters from './flatten-getters/index.js'
4
4
  export * as isObject from './is-object/index.js'
5
+ export * as isRecord from './is-record/index.js'
5
6
  export * as recordFormat from './record-format/index.js'
6
- export * as flattenGetters from './flatten-getters/index.js'
7
7
  export * as recordMap from './record-map/index.js'
8
8
  export * as sortKeys from './sort-keys/index.js'
9
9
  export * as validation from './validation/index.js'
@@ -1,9 +1,9 @@
1
1
  export * as deepGetProperty from './deep-get-property/index.js'
2
2
  export * as enums from './enums/index.js'
3
- export * as isRecord from './is-record/index.js'
3
+ export * as flattenGetters from './flatten-getters/index.js'
4
4
  export * as isObject from './is-object/index.js'
5
+ export * as isRecord from './is-record/index.js'
5
6
  export * as recordFormat from './record-format/index.js'
6
- export * as flattenGetters from './flatten-getters/index.js'
7
7
  export * as recordMap from './record-map/index.js'
8
8
  export * as sortKeys from './sort-keys/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
1
  export * as fileName from './file-name/index.js'
2
- export * as path from './path/index.js'
3
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'
@@ -1,4 +1,4 @@
1
1
  export * as fileName from './file-name/index.js'
2
- export * as path from './path/index.js'
3
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'
@@ -1,7 +1,7 @@
1
+ export * as charCodes from './char-codes/index.js'
1
2
  export * as matches from './matches/index.js'
2
3
  export * as normalizeIndent from './normalize-indent/index.js'
3
- export * as charCodes from './char-codes/index.js'
4
- export * as parseTable from './parse-table/index.js'
5
4
  export * as replaceAll from './replace-all/index.js'
6
5
  export * as toAlphanum from './to-alphanum/index.js'
7
6
  export * as trim from './trim/index.js'
7
+ export * as parseTable from './parse-table/index.js'
@@ -1,7 +1,7 @@
1
+ export * as charCodes from './char-codes/index.js'
1
2
  export * as matches from './matches/index.js'
2
3
  export * as normalizeIndent from './normalize-indent/index.js'
3
- export * as charCodes from './char-codes/index.js'
4
- export * as parseTable from './parse-table/index.js'
5
4
  export * as replaceAll from './replace-all/index.js'
6
5
  export * as toAlphanum from './to-alphanum/index.js'
7
6
  export * as trim from './trim/index.js'
7
+ export * as parseTable from './parse-table/index.js'
@@ -1,5 +1,5 @@
1
- export * as duration from './duration/index.js'
2
1
  export * as dates from './dates/index.js'
3
- export * as wait from './wait/index.js'
2
+ export * as duration from './duration/index.js'
4
3
  export * as timeout from './timeout/index.js'
5
4
  export * as transitions from './transitions/index.js'
5
+ export * as wait from './wait/index.js'
@@ -1,5 +1,5 @@
1
- export * as duration from './duration/index.js'
2
1
  export * as dates from './dates/index.js'
3
- export * as wait from './wait/index.js'
2
+ export * as duration from './duration/index.js'
4
3
  export * as timeout from './timeout/index.js'
5
4
  export * as transitions from './transitions/index.js'
5
+ export * as wait from './wait/index.js'
@@ -0,0 +1,46 @@
1
+ import React, { type FunctionComponent, type HTMLAttributes } from 'react';
2
+ import type { WithClassName } from '../utils/types.js';
3
+ export type Props = WithClassName<{
4
+ content?: React.ReactNode;
5
+ beforeContent?: React.ReactNode;
6
+ afterContent?: React.ReactNode;
7
+ ratio?: number;
8
+ actionHandlers?: {
9
+ pointer?: (e: PointerEvent, targetHRatio: number, targetVRatio: number, ratio: number | null, element: HTMLDivElement) => void;
10
+ };
11
+ _modifiers?: {
12
+ horizontal?: boolean;
13
+ vertical?: boolean;
14
+ };
15
+ }> & HTMLAttributes<HTMLDivElement>;
16
+ /**
17
+ * Props for the {@link BeforeAfterControlled} component.
18
+ *
19
+ * @property beforeContent - Content shown first.
20
+ * @property afterContent - Content shown second.
21
+ * @property ratio - Split ratio (0 to 1). Controlled by parent.
22
+ * @property actionHandlers - Optional pointer (drag) callbacks:
23
+ * - `pointer` — called on pointer events with ratio and element info.
24
+ * @property _modifiers - Orientation modifiers: `horizontal` or `vertical`.
25
+ * @property className - Custom CSS class.
26
+ *
27
+ * @see {@link BeforeAfter}
28
+ */
29
+ /**
30
+ * Controlled before/after slider component. Renders two contents separated by a slider,
31
+ * whose ratio is managed by the parent component. Handles pointer interactions (mouse/touch/pen)
32
+ * to update the ratio via callbacks.
33
+ *
34
+ * ### Forwarded CSS custom properties
35
+ * - `--before-after-ratio` — the current ratio value (0 to 1, fixed to 8 decimals).
36
+ * - `--before-after-ratio-percent` — the current ratio as a percentage (0 to 100).
37
+ *
38
+ * ### Forwarded data attributes
39
+ * - `data-ratio` — the current ratio value.
40
+ *
41
+ * @param props - Component properties.
42
+ * @see {@link Props}
43
+ * @see {@link BeforeAfter}
44
+ * @returns A div containing used to render "before/after" content, with pointer event handling for ratio updates.
45
+ */
46
+ export declare const BeforeAfterControlled: FunctionComponent<Props>;
@@ -0,0 +1,55 @@
1
+ import { type FunctionComponent } from 'react';
2
+ import { type Props as ControlledProps } from './index.controlled.js';
3
+ /**
4
+ * Props for the {@link BeforeAfter} component.
5
+ *
6
+ * Extends {@link ControlledProps} (minus `_modifiers`, which are derived
7
+ * internally) with uncontrolled ratio and direction management.
8
+ *
9
+ * @property defaultRatio - Initial ratio value (0 to 1). Used if `ratio` is not provided. Defaults to `0`.
10
+ * @property direction - Slider orientation: `'horizontal'` (default) or `'vertical'`.
11
+ * @property stateHandlers - Optional callbacks invoked when derived state changes:
12
+ * - `ratio` — called with the new ratio whenever it changes.
13
+ */
14
+ export type Props = ControlledProps & {
15
+ defaultRatio?: number;
16
+ direction?: 'horizontal' | 'vertical';
17
+ stateHandlers?: {
18
+ ratio?: (ratio: number) => void;
19
+ };
20
+ };
21
+ /**
22
+ * Props for the {@link BeforeAfter} component.
23
+ *
24
+ * Extends {@link ControlledProps} with uncontrolled ratio and direction management.
25
+ *
26
+ * @property defaultRatio - Initial ratio value (0 to 1). Used if `ratio` is not provided. Defaults to `0`.
27
+ * @property direction - Slider orientation: `'horizontal'` (default) or `'vertical'`. If horizontal, the ratio is calced as the horizontal pointer position over the element width. If vertical, it's the vertical pointer position over the element height.
28
+ * @property stateHandlers - Optional callbacks invoked when derived state changes:
29
+ * - `ratio` — called with the new ratio whenever it changes.
30
+ *
31
+ * @see {@link ControlledProps}
32
+ */
33
+ /**
34
+ * Uncontrolled, self-updating before/after slider component. Drives a
35
+ * {@link BeforeAfterControlled} instance with internal ratio state and direction,
36
+ * supporting both controlled and uncontrolled usage.
37
+ *
38
+ * Supports mixed controlled/uncontrolled usage: passing `ratio` disables internal ratio state,
39
+ * but still allows direction and stateHandlers to be used. Passing `defaultRatio` sets the initial ratio.
40
+ *
41
+ * ### Forwarded modifiers to {@link BeforeAfterControlled}
42
+ * The following `_modifiers` are computed and injected automatically:
43
+ * - `horizontal` — `true`.
44
+ * - `vertical` — `true`.
45
+ *
46
+ * ### Forwarded CSS custom properties to {@link BeforeAfterControlled}
47
+ * - `--before-after-ratio` — the current ratio value (0 to 1, fixed to 8 decimals).
48
+ * - `--before-after-ratio-percent` — the current ratio as a percentage (0 to 100).
49
+ *
50
+ * @param props - Component properties.
51
+ * @see {@link Props}
52
+ * @see {@link BeforeAfterControlled}
53
+ * @returns A {@link BeforeAfterControlled} with computed ratio and orientation modifiers applied.
54
+ */
55
+ export declare const BeforeAfter: FunctionComponent<Props>;
@@ -0,0 +1,40 @@
1
+ // src/components/BeforeAfter/index.tsx
2
+ import {
3
+ useState,
4
+ useCallback,
5
+ useEffect
6
+ } from "react";
7
+ import { BeforeAfterControlled } from "./index.controlled.js";
8
+ import { jsx } from "react/jsx-runtime";
9
+ var BeforeAfter = ({
10
+ direction,
11
+ defaultRatio,
12
+ stateHandlers,
13
+ ...controlledProps
14
+ }) => {
15
+ const { actionHandlers, ratio } = controlledProps;
16
+ const [internalRatio, setInternalRatio] = useState(ratio ?? defaultRatio ?? 0);
17
+ const handlePointer = useCallback((e, targetHRatio, targetVRatio, ratio2, element) => {
18
+ if (direction === "vertical") setInternalRatio(targetVRatio);
19
+ else setInternalRatio(targetHRatio);
20
+ actionHandlers?.pointer?.(e, targetHRatio, targetVRatio, ratio2, element);
21
+ }, [direction, actionHandlers?.pointer]);
22
+ useEffect(() => {
23
+ stateHandlers?.ratio?.(internalRatio);
24
+ }, [internalRatio, stateHandlers?.ratio]);
25
+ return /* @__PURE__ */ jsx(
26
+ BeforeAfterControlled,
27
+ {
28
+ ...controlledProps,
29
+ _modifiers: {
30
+ horizontal: direction !== "vertical",
31
+ vertical: direction === "vertical"
32
+ },
33
+ ratio: ratio ?? internalRatio,
34
+ actionHandlers: { pointer: handlePointer }
35
+ }
36
+ );
37
+ };
38
+ export {
39
+ BeforeAfter
40
+ };
File without changes
@@ -0,0 +1,4 @@
1
+ export declare function getRelativePointerCoordinates(event: PointerEvent, element: HTMLDivElement | null): {
2
+ x: number;
3
+ y: number;
4
+ };