@design-edito/tools 0.3.11 → 0.3.13

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 +2 -2
  2. package/agnostic/arrays/index.js +2 -2
  3. package/agnostic/colors/index.d.ts +5 -5
  4. package/agnostic/colors/index.js +5 -5
  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 +21 -21
  8. package/agnostic/html/hyper-json/smart-tags/coalesced/index.js +21 -21
  9. package/agnostic/html/hyper-json/smart-tags/isolated/index.d.ts +3 -3
  10. package/agnostic/html/hyper-json/smart-tags/isolated/index.js +3 -3
  11. package/agnostic/html/index.d.ts +3 -3
  12. package/agnostic/html/index.js +3 -3
  13. package/agnostic/index.d.ts +5 -5
  14. package/agnostic/index.js +5 -5
  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 +2 -2
  20. package/agnostic/numbers/index.js +2 -2
  21. package/agnostic/objects/index.d.ts +3 -3
  22. package/agnostic/objects/index.js +3 -3
  23. package/agnostic/sanitization/index.d.ts +1 -1
  24. package/agnostic/sanitization/index.js +1 -1
  25. package/agnostic/strings/index.d.ts +1 -1
  26. package/agnostic/strings/index.js +1 -1
  27. package/agnostic/time/index.d.ts +2 -2
  28. package/agnostic/time/index.js +2 -2
  29. package/components/BeforeAfter/index.controlled.d.ts +46 -0
  30. package/components/BeforeAfter/index.d.ts +55 -0
  31. package/components/BeforeAfter/index.js +40 -0
  32. package/components/BeforeAfter/styles.module.css +0 -0
  33. package/components/BeforeAfter/utils.d.ts +4 -0
  34. package/components/ScrollListener/index.d.ts +47 -0
  35. package/components/ScrollListener/index.js +110 -0
  36. package/components/ScrollListener/styles.module.css +0 -0
  37. package/components/ScrollListener/utils.d.ts +41 -0
  38. package/components/Theatre/index.d.ts +2 -2
  39. package/components/Theatre/index.js +4 -4
  40. package/components/UIModule/index.d.ts +85 -0
  41. package/components/UIModule/index.js +134 -0
  42. package/components/UIModule/styles.module.css +0 -0
  43. package/components/Video/index.d.ts +20 -0
  44. package/components/Video/index.js +61 -34
  45. package/components/Video/utils.d.ts +4 -0
  46. package/components/index.d.ts +6 -3
  47. package/components/index.js +6 -3
  48. package/components/public-classnames.d.ts +3 -0
  49. package/index.d.ts +1 -1
  50. package/index.js +1 -1
  51. package/node/@aws-s3/storage/file/index.d.ts +3 -3
  52. package/node/@aws-s3/storage/file/index.js +3 -3
  53. package/node/@google-cloud/storage/directory/index.d.ts +1 -1
  54. package/node/@google-cloud/storage/directory/index.js +1 -1
  55. package/node/@google-cloud/storage/file/index.d.ts +3 -3
  56. package/node/@google-cloud/storage/file/index.js +3 -3
  57. package/node/cloud-storage/operations/index.d.ts +4 -4
  58. package/node/cloud-storage/operations/index.js +4 -4
  59. package/node/encryption/index.d.ts +1 -1
  60. package/node/encryption/index.js +1 -1
  61. package/node/files/index.d.ts +2 -2
  62. package/node/files/index.js +2 -2
  63. package/node/ftps/directory/index.d.ts +3 -3
  64. package/node/ftps/directory/index.js +3 -3
  65. package/node/ftps/file/index.d.ts +2 -2
  66. package/node/ftps/file/index.js +2 -2
  67. package/node/images/index.d.ts +3 -3
  68. package/node/images/index.js +3 -3
  69. package/node/images/transform/operations/index.d.ts +5 -5
  70. package/node/images/transform/operations/index.js +5 -5
  71. package/node/index.d.ts +4 -4
  72. package/node/index.js +4 -4
  73. package/node/sftp/directory/index.d.ts +1 -1
  74. package/node/sftp/directory/index.js +1 -1
  75. package/node/sftp/file/index.d.ts +2 -2
  76. package/node/sftp/file/index.js +2 -2
  77. package/node/sftp/index.d.ts +1 -1
  78. package/node/sftp/index.js +1 -1
  79. package/package.json +31 -9
@@ -1,6 +1,6 @@
1
1
  export * as dedupe from './dedupe/index.js'
2
2
  export * as findDuplicates from './find-duplicates/index.js'
3
- export * as isArrayOf from './is-array-of/index.js'
4
3
  export * as make from './make/index.js'
5
- export * as shuffle from './shuffle/index.js'
6
4
  export * as randomPick from './random-pick/index.js'
5
+ export * as shuffle from './shuffle/index.js'
6
+ export * as isArrayOf from './is-array-of/index.js'
@@ -1,6 +1,6 @@
1
1
  export * as dedupe from './dedupe/index.js'
2
2
  export * as findDuplicates from './find-duplicates/index.js'
3
- export * as isArrayOf from './is-array-of/index.js'
4
3
  export * as make from './make/index.js'
5
- export * as shuffle from './shuffle/index.js'
6
4
  export * as randomPick from './random-pick/index.js'
5
+ export * as shuffle from './shuffle/index.js'
6
+ export * as isArrayOf from './is-array-of/index.js'
@@ -1,12 +1,12 @@
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
- export * as distance from './distance/index.js'
4
+ export * as grayscale from './grayscale/index.js'
5
5
  export * as invert from './invert/index.js'
6
+ export * as distance from './distance/index.js'
6
7
  export * as lerp from './lerp/index.js'
7
8
  export * as luminance from './luminance/index.js'
8
- export * as palette from './palette/index.js'
9
- export * as rotate from './rotate/index.js'
10
9
  export * as tidy from './tidy/index.js'
11
10
  export * as typechecks from './typechecks/index.js'
12
- export * as contrast from './contrast/index.js'
11
+ export * as rotate from './rotate/index.js'
12
+ export * as palette from './palette/index.js'
@@ -1,12 +1,12 @@
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
- export * as distance from './distance/index.js'
4
+ export * as grayscale from './grayscale/index.js'
5
5
  export * as invert from './invert/index.js'
6
+ export * as distance from './distance/index.js'
6
7
  export * as lerp from './lerp/index.js'
7
8
  export * as luminance from './luminance/index.js'
8
- export * as palette from './palette/index.js'
9
- export * as rotate from './rotate/index.js'
10
9
  export * as tidy from './tidy/index.js'
11
10
  export * as typechecks from './typechecks/index.js'
12
- export * as contrast from './contrast/index.js'
11
+ export * as rotate from './rotate/index.js'
12
+ export * as palette from './palette/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,52 +1,52 @@
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'
6
- export * as call from './call/index.js'
7
- export * as deleteproperties from './deleteproperties/index.js'
5
+ export * as at from './at/index.js'
8
6
  export * as clone from './clone/index.js'
7
+ export * as deleteproperties from './deleteproperties/index.js'
9
8
  export * as equals from './equals/index.js'
10
9
  export * as getattribute from './getattribute/index.js'
11
- export * as getproperties from './getproperties/index.js'
12
10
  export * as getproperty from './getproperty/index.js'
13
- export * as hjstringify from './hjstringify/index.js'
14
- export * as initialize from './initialize/index.js'
15
11
  export * as hjparse from './hjparse/index.js'
16
- export * as join from './join/index.js'
17
- export * as length from './length/index.js'
12
+ export * as hjstringify from './hjstringify/index.js'
13
+ export * as call from './call/index.js'
18
14
  export * as if from './if/index.js'
15
+ export * as getproperties from './getproperties/index.js'
16
+ export * as initialize from './initialize/index.js'
19
17
  export * as map from './map/index.js'
18
+ export * as length from './length/index.js'
20
19
  export * as negate from './negate/index.js'
20
+ export * as join from './join/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 pickrandom from './pickrandom/index.js'
24
+ export * as print from './print/index.js'
25
+ export * as push from './push/index.js'
27
26
  export * as pusheach from './pusheach/index.js'
28
27
  export * as recordtoarray from './recordtoarray/index.js'
28
+ export * as removeattribute from './removeattribute/index.js'
29
29
  export * as removeclass from './removeclass/index.js'
30
+ export * as populate from './populate/index.js'
30
31
  export * as renameproperty from './renameproperty/index.js'
31
32
  export * as replace from './replace/index.js'
32
- export * as select from './select/index.js'
33
- export * as set from './set/index.js'
34
33
  export * as setattribute from './setattribute/index.js'
35
34
  export * as setproperty from './setproperty/index.js'
35
+ export * as set from './set/index.js'
36
+ export * as select from './select/index.js'
36
37
  export * as split from './split/index.js'
37
38
  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
41
  export * as toarray from './toarray/index.js'
41
42
  export * as toelement from './toelement/index.js'
42
43
  export * as toggleclass from './toggleclass/index.js'
43
- export * as toboolean from './toboolean/index.js'
44
44
  export * as tonodelist from './tonodelist/index.js'
45
- export * as tonull from './tonull/index.js'
46
- export * as torecord from './torecord/index.js'
47
- export * as toref from './toref/index.js'
48
45
  export * as tonumber from './tonumber/index.js'
46
+ export * as torecord from './torecord/index.js'
47
+ export * as tonull from './tonull/index.js'
49
48
  export * as tostring from './tostring/index.js'
50
- export * as totext from './totext/index.js'
49
+ export * as toref from './toref/index.js'
51
50
  export * as transformselected from './transformselected/index.js'
52
51
  export * as trim from './trim/index.js'
52
+ export * as totext from './totext/index.js'
@@ -1,52 +1,52 @@
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'
6
- export * as call from './call/index.js'
7
- export * as deleteproperties from './deleteproperties/index.js'
5
+ export * as at from './at/index.js'
8
6
  export * as clone from './clone/index.js'
7
+ export * as deleteproperties from './deleteproperties/index.js'
9
8
  export * as equals from './equals/index.js'
10
9
  export * as getattribute from './getattribute/index.js'
11
- export * as getproperties from './getproperties/index.js'
12
10
  export * as getproperty from './getproperty/index.js'
13
- export * as hjstringify from './hjstringify/index.js'
14
- export * as initialize from './initialize/index.js'
15
11
  export * as hjparse from './hjparse/index.js'
16
- export * as join from './join/index.js'
17
- export * as length from './length/index.js'
12
+ export * as hjstringify from './hjstringify/index.js'
13
+ export * as call from './call/index.js'
18
14
  export * as if from './if/index.js'
15
+ export * as getproperties from './getproperties/index.js'
16
+ export * as initialize from './initialize/index.js'
19
17
  export * as map from './map/index.js'
18
+ export * as length from './length/index.js'
20
19
  export * as negate from './negate/index.js'
20
+ export * as join from './join/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 pickrandom from './pickrandom/index.js'
24
+ export * as print from './print/index.js'
25
+ export * as push from './push/index.js'
27
26
  export * as pusheach from './pusheach/index.js'
28
27
  export * as recordtoarray from './recordtoarray/index.js'
28
+ export * as removeattribute from './removeattribute/index.js'
29
29
  export * as removeclass from './removeclass/index.js'
30
+ export * as populate from './populate/index.js'
30
31
  export * as renameproperty from './renameproperty/index.js'
31
32
  export * as replace from './replace/index.js'
32
- export * as select from './select/index.js'
33
- export * as set from './set/index.js'
34
33
  export * as setattribute from './setattribute/index.js'
35
34
  export * as setproperty from './setproperty/index.js'
35
+ export * as set from './set/index.js'
36
+ export * as select from './select/index.js'
36
37
  export * as split from './split/index.js'
37
38
  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
41
  export * as toarray from './toarray/index.js'
41
42
  export * as toelement from './toelement/index.js'
42
43
  export * as toggleclass from './toggleclass/index.js'
43
- export * as toboolean from './toboolean/index.js'
44
44
  export * as tonodelist from './tonodelist/index.js'
45
- export * as tonull from './tonull/index.js'
46
- export * as torecord from './torecord/index.js'
47
- export * as toref from './toref/index.js'
48
45
  export * as tonumber from './tonumber/index.js'
46
+ export * as torecord from './torecord/index.js'
47
+ export * as tonull from './tonull/index.js'
49
48
  export * as tostring from './tostring/index.js'
50
- export * as totext from './totext/index.js'
49
+ export * as toref from './toref/index.js'
51
50
  export * as transformselected from './transformselected/index.js'
52
51
  export * as trim from './trim/index.js'
52
+ export * as totext from './totext/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
- export * as element from './element/index.js'
4
3
  export * as boolean from './boolean/index.js'
4
+ export * as element from './element/index.js'
5
5
  export * as get from './get/index.js'
6
- 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'
10
9
  export * as number from './number/index.js'
11
10
  export * as record from './record/index.js'
12
- export * as ref from './ref/index.js'
13
11
  export * as string from './string/index.js'
12
+ export * as ref from './ref/index.js'
14
13
  export * as text from './text/index.js'
14
+ export * as global from './global/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
- export * as element from './element/index.js'
4
3
  export * as boolean from './boolean/index.js'
4
+ export * as element from './element/index.js'
5
5
  export * as get from './get/index.js'
6
- 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'
10
9
  export * as number from './number/index.js'
11
10
  export * as record from './record/index.js'
12
- export * as ref from './ref/index.js'
13
11
  export * as string from './string/index.js'
12
+ export * as ref from './ref/index.js'
14
13
  export * as text from './text/index.js'
14
+ export * as global from './global/index.js'
@@ -1,8 +1,8 @@
1
- export * as getNodeAncestors from './get-node-ancestors/index.js'
2
1
  export * as getPositionInsideParent from './get-position-inside-parent/index.js'
3
- export * as hyperJson from './hyper-json/index.js'
2
+ export * as getNodeAncestors from './get-node-ancestors/index.js'
4
3
  export * as insertNode from './insert-node/index.js'
4
+ export * as hyperJson from './hyper-json/index.js'
5
5
  export * as placeholders from './placeholders/index.js'
6
- export * as replaceInElement from './replace-in-element/index.js'
7
6
  export * as selectorToElement from './selector-to-element/index.js'
8
7
  export * as stringToNodes from './string-to-nodes/index.js'
8
+ export * as replaceInElement from './replace-in-element/index.js'
@@ -1,8 +1,8 @@
1
- export * as getNodeAncestors from './get-node-ancestors/index.js'
2
1
  export * as getPositionInsideParent from './get-position-inside-parent/index.js'
3
- export * as hyperJson from './hyper-json/index.js'
2
+ export * as getNodeAncestors from './get-node-ancestors/index.js'
4
3
  export * as insertNode from './insert-node/index.js'
4
+ export * as hyperJson from './hyper-json/index.js'
5
5
  export * as placeholders from './placeholders/index.js'
6
- export * as replaceInElement from './replace-in-element/index.js'
7
6
  export * as selectorToElement from './selector-to-element/index.js'
8
7
  export * as stringToNodes from './string-to-nodes/index.js'
8
+ export * as replaceInElement from './replace-in-element/index.js'
@@ -1,16 +1,16 @@
1
1
  export * as arrays from './arrays/index.js'
2
2
  export * as colors from './colors/index.js'
3
- export * as booleans from './booleans/index.js'
4
3
  export * as css from './css/index.js'
4
+ export * as booleans from './booleans/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'
9
7
  export * as numbers from './numbers/index.js'
8
+ export * as objects from './objects/index.js'
10
9
  export * as optim from './optim/index.js'
11
10
  export * as random from './random/index.js'
12
- export * as sanitization from './sanitization/index.js'
13
- export * as regexps from './regexps/index.js'
11
+ export * as misc from './misc/index.js'
14
12
  export * as strings from './strings/index.js'
15
13
  export * as time from './time/index.js'
16
14
  export * as typescript from './typescript/index.js'
15
+ export * as regexps from './regexps/index.js'
16
+ export * as sanitization from './sanitization/index.js'
package/agnostic/index.js CHANGED
@@ -1,16 +1,16 @@
1
1
  export * as arrays from './arrays/index.js'
2
2
  export * as colors from './colors/index.js'
3
- export * as booleans from './booleans/index.js'
4
3
  export * as css from './css/index.js'
4
+ export * as booleans from './booleans/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'
9
7
  export * as numbers from './numbers/index.js'
8
+ export * as objects from './objects/index.js'
10
9
  export * as optim from './optim/index.js'
11
10
  export * as random from './random/index.js'
12
- export * as sanitization from './sanitization/index.js'
13
- export * as regexps from './regexps/index.js'
11
+ export * as misc from './misc/index.js'
14
12
  export * as strings from './strings/index.js'
15
13
  export * as time from './time/index.js'
16
14
  export * as typescript from './typescript/index.js'
15
+ export * as regexps from './regexps/index.js'
16
+ export * as sanitization from './sanitization/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'
@@ -1,12 +1,12 @@
1
1
  export * as assert from './assert/index.js'
2
2
  export * as cast from './cast/index.js'
3
- export * as connection from './connection/index.js'
4
3
  export * as crawler from './crawler/index.js'
5
4
  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 isNullish from './is-nullish/index.js'
8
7
  export * as logs from './logs/index.js'
8
+ export * as isConstructorFunction from './is-constructor-function/index.js'
9
9
  export * as normalizeExtension from './normalize-extension/index.js'
10
- export * as isNullish from './is-nullish/index.js'
11
10
  export * as loremIpsum from './lorem-ipsum/index.js'
12
11
  export * as outcome from './outcome/index.js'
12
+ export * as connection from './connection/index.js'
@@ -1,12 +1,12 @@
1
1
  export * as assert from './assert/index.js'
2
2
  export * as cast from './cast/index.js'
3
- export * as connection from './connection/index.js'
4
3
  export * as crawler from './crawler/index.js'
5
4
  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 isNullish from './is-nullish/index.js'
8
7
  export * as logs from './logs/index.js'
8
+ export * as isConstructorFunction from './is-constructor-function/index.js'
9
9
  export * as normalizeExtension from './normalize-extension/index.js'
10
- export * as isNullish from './is-nullish/index.js'
11
10
  export * as loremIpsum from './lorem-ipsum/index.js'
12
11
  export * as outcome from './outcome/index.js'
12
+ export * as connection from './connection/index.js'
@@ -1,6 +1,6 @@
1
1
  export * as approximateRational from './approximate-rational/index.js'
2
- export * as clamp from './clamp/index.js'
3
2
  export * as geometricProgressions from './geometric-progressions/index.js'
3
+ export * as clamp from './clamp/index.js'
4
+ export * as absoluteModulo from './absolute-modulo/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
1
  export * as approximateRational from './approximate-rational/index.js'
2
- export * as clamp from './clamp/index.js'
3
2
  export * as geometricProgressions from './geometric-progressions/index.js'
3
+ export * as clamp from './clamp/index.js'
4
+ export * as absoluteModulo from './absolute-modulo/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
- export * as enums from './enums/index.js'
3
- export * as isRecord from './is-record/index.js'
2
+ export * as flattenGetters from './flatten-getters/index.js'
4
3
  export * as isObject from './is-object/index.js'
4
+ export * as isRecord from './is-record/index.js'
5
5
  export * as recordFormat from './record-format/index.js'
6
- export * as flattenGetters from './flatten-getters/index.js'
7
6
  export * as recordMap from './record-map/index.js'
8
7
  export * as sortKeys from './sort-keys/index.js'
9
8
  export * as validation from './validation/index.js'
9
+ export * as enums from './enums/index.js'
@@ -1,9 +1,9 @@
1
1
  export * as deepGetProperty from './deep-get-property/index.js'
2
- export * as enums from './enums/index.js'
3
- export * as isRecord from './is-record/index.js'
2
+ export * as flattenGetters from './flatten-getters/index.js'
4
3
  export * as isObject from './is-object/index.js'
4
+ export * as isRecord from './is-record/index.js'
5
5
  export * as recordFormat from './record-format/index.js'
6
- export * as flattenGetters from './flatten-getters/index.js'
7
6
  export * as recordMap from './record-map/index.js'
8
7
  export * as sortKeys from './sort-keys/index.js'
9
8
  export * as validation from './validation/index.js'
9
+ export * as enums from './enums/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'
4
3
  export * as userInput from './user-input/index.js'
4
+ export * as path from './path/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'
4
3
  export * as userInput from './user-input/index.js'
4
+ export * as path from './path/index.js'
@@ -1,6 +1,6 @@
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
4
  export * as parseTable from './parse-table/index.js'
5
5
  export * as replaceAll from './replace-all/index.js'
6
6
  export * as toAlphanum from './to-alphanum/index.js'
@@ -1,6 +1,6 @@
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
4
  export * as parseTable from './parse-table/index.js'
5
5
  export * as replaceAll from './replace-all/index.js'
6
6
  export * as toAlphanum from './to-alphanum/index.js'
@@ -1,5 +1,5 @@
1
- export * as duration from './duration/index.js'
2
1
  export * as dates from './dates/index.js'
2
+ export * as duration from './duration/index.js'
3
+ export * as transitions from './transitions/index.js'
3
4
  export * as wait from './wait/index.js'
4
5
  export * as timeout from './timeout/index.js'
5
- export * as transitions from './transitions/index.js'
@@ -1,5 +1,5 @@
1
- export * as duration from './duration/index.js'
2
1
  export * as dates from './dates/index.js'
2
+ export * as duration from './duration/index.js'
3
+ export * as transitions from './transitions/index.js'
3
4
  export * as wait from './wait/index.js'
4
5
  export * as timeout from './timeout/index.js'
5
- export * as transitions from './transitions/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
+ };