@design-edito/tools 0.5.24 → 0.5.26

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 (58) 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 +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/html/hyper-json/smart-tags/coalesced/index.d.ts +18 -18
  8. package/agnostic/html/hyper-json/smart-tags/coalesced/index.js +18 -18
  9. package/agnostic/html/hyper-json/smart-tags/isolated/index.d.ts +5 -5
  10. package/agnostic/html/hyper-json/smart-tags/isolated/index.js +5 -5
  11. package/agnostic/index.d.ts +5 -5
  12. package/agnostic/index.js +5 -5
  13. package/agnostic/misc/index.d.ts +4 -4
  14. package/agnostic/misc/index.js +4 -4
  15. package/agnostic/numbers/index.d.ts +1 -1
  16. package/agnostic/numbers/index.js +1 -1
  17. package/agnostic/objects/index.d.ts +2 -2
  18. package/agnostic/objects/index.js +2 -2
  19. package/agnostic/strings/index.d.ts +4 -4
  20. package/agnostic/strings/index.js +4 -4
  21. package/agnostic/time/dates/index.d.ts +1 -1
  22. package/agnostic/time/dates/index.js +1 -1
  23. package/agnostic/time/index.d.ts +1 -1
  24. package/agnostic/time/index.js +1 -1
  25. package/components/Clippable/index.d.ts +12 -1
  26. package/components/Clippable/index.js +2 -2
  27. package/components/ScrollListener/index.d.ts +45 -18
  28. package/components/ScrollListener/index.js +55 -22
  29. package/components/ScrollListener/types.d.ts +31 -0
  30. package/components/ScrollListener/types.js +14 -0
  31. package/components/Sequencer/index.d.ts +19 -4
  32. package/components/Sequencer/index.js +52 -1
  33. package/components/index.d.ts +4 -4
  34. package/components/index.js +4 -4
  35. package/components/utils/types.d.ts +5 -15
  36. package/node/@aws-s3/storage/file/index.d.ts +3 -3
  37. package/node/@aws-s3/storage/file/index.js +3 -3
  38. package/node/@google-cloud/storage/file/index.d.ts +4 -4
  39. package/node/@google-cloud/storage/file/index.js +4 -4
  40. package/node/cloud-storage/operations/index.d.ts +3 -3
  41. package/node/cloud-storage/operations/index.js +3 -3
  42. package/node/encryption/index.d.ts +1 -1
  43. package/node/encryption/index.js +1 -1
  44. package/node/files/index.d.ts +1 -1
  45. package/node/files/index.js +1 -1
  46. package/node/ftps/file/index.d.ts +3 -3
  47. package/node/ftps/file/index.js +3 -3
  48. package/node/images/index.d.ts +1 -1
  49. package/node/images/index.js +1 -1
  50. package/node/images/transform/operations/index.d.ts +3 -3
  51. package/node/images/transform/operations/index.js +3 -3
  52. package/node/index.d.ts +1 -1
  53. package/node/index.js +1 -1
  54. package/node/sftp/file/index.d.ts +2 -2
  55. package/node/sftp/file/index.js +2 -2
  56. package/node/sftp/index.d.ts +1 -1
  57. package/node/sftp/index.js +1 -1
  58. package/package.json +5 -1
@@ -1,6 +1,6 @@
1
- export * as isArrayOf from './is-array-of/index.js'
1
+ export * as dedupe from './dedupe/index.js'
2
2
  export * as findDuplicates from './find-duplicates/index.js'
3
3
  export * as make from './make/index.js'
4
4
  export * as randomPick from './random-pick/index.js'
5
5
  export * as shuffle from './shuffle/index.js'
6
- export * as dedupe from './dedupe/index.js'
6
+ export * as isArrayOf from './is-array-of/index.js'
@@ -1,6 +1,6 @@
1
- export * as isArrayOf from './is-array-of/index.js'
1
+ export * as dedupe from './dedupe/index.js'
2
2
  export * as findDuplicates from './find-duplicates/index.js'
3
3
  export * as make from './make/index.js'
4
4
  export * as randomPick from './random-pick/index.js'
5
5
  export * as shuffle from './shuffle/index.js'
6
- export * as dedupe from './dedupe/index.js'
6
+ export * as isArrayOf from './is-array-of/index.js'
@@ -1,12 +1,12 @@
1
+ export * as channels from './channels/index.js'
1
2
  export * as contrast from './contrast/index.js'
2
3
  export * as convert from './convert/index.js'
3
- export * as channels from './channels/index.js'
4
4
  export * as distance from './distance/index.js'
5
5
  export * as grayscale from './grayscale/index.js'
6
6
  export * as invert from './invert/index.js'
7
7
  export * as lerp from './lerp/index.js'
8
8
  export * as luminance from './luminance/index.js'
9
- 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 palette from './palette/index.js'
@@ -1,12 +1,12 @@
1
+ export * as channels from './channels/index.js'
1
2
  export * as contrast from './contrast/index.js'
2
3
  export * as convert from './convert/index.js'
3
- export * as channels from './channels/index.js'
4
4
  export * as distance from './distance/index.js'
5
5
  export * as grayscale from './grayscale/index.js'
6
6
  export * as invert from './invert/index.js'
7
7
  export * as lerp from './lerp/index.js'
8
8
  export * as luminance from './luminance/index.js'
9
- 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 palette from './palette/index.js'
@@ -1,6 +1,6 @@
1
1
  export * as bem from './bem/index.js'
2
2
  export * as clss from './clss/index.js'
3
+ export * as isValidCssClassName from './is-valid-css-class-name/index.js'
3
4
  export * as generateNiceColor from './generate-nice-color/index.js'
4
5
  export * as scale from './scale/index.js'
5
- export * as isValidCssClassName from './is-valid-css-class-name/index.js'
6
6
  export * as stylesSet from './styles-set/index.js'
@@ -1,6 +1,6 @@
1
1
  export * as bem from './bem/index.js'
2
2
  export * as clss from './clss/index.js'
3
+ export * as isValidCssClassName from './is-valid-css-class-name/index.js'
3
4
  export * as generateNiceColor from './generate-nice-color/index.js'
4
5
  export * as scale from './scale/index.js'
5
- export * as isValidCssClassName from './is-valid-css-class-name/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 addclass from './addclass/index.js'
3
2
  export * as and from './and/index.js'
3
+ export * as addclass from './addclass/index.js'
4
4
  export * as append from './append/index.js'
5
5
  export * as at from './at/index.js'
6
6
  export * as call from './call/index.js'
7
- export * as clone from './clone/index.js'
8
7
  export * as deleteproperties from './deleteproperties/index.js'
9
- export * as getattribute from './getattribute/index.js'
8
+ export * as clone from './clone/index.js'
10
9
  export * as getproperties from './getproperties/index.js'
11
- export * as getproperty from './getproperty/index.js'
12
- export * as hjparse from './hjparse/index.js'
10
+ export * as getattribute from './getattribute/index.js'
13
11
  export * as equals from './equals/index.js'
12
+ export * as hjparse from './hjparse/index.js'
13
+ export * as getproperty from './getproperty/index.js'
14
14
  export * as hjstringify from './hjstringify/index.js'
15
15
  export * as if from './if/index.js'
16
- export * as initialize from './initialize/index.js'
17
- export * as length from './length/index.js'
18
16
  export * as join from './join/index.js'
17
+ export * as length from './length/index.js'
19
18
  export * as map from './map/index.js'
20
19
  export * as negate from './negate/index.js'
20
+ export * as initialize from './initialize/index.js'
21
21
  export * as notrailing from './notrailing/index.js'
22
22
  export * as or from './or/index.js'
23
23
  export * as pickrandom from './pickrandom/index.js'
24
- export * as populate from './populate/index.js'
25
24
  export * as print from './print/index.js'
25
+ export * as populate from './populate/index.js'
26
26
  export * as push from './push/index.js'
27
27
  export * as pusheach from './pusheach/index.js'
28
- export * as removeattribute from './removeattribute/index.js'
29
28
  export * as recordtoarray from './recordtoarray/index.js'
29
+ export * as removeattribute from './removeattribute/index.js'
30
30
  export * as removeclass from './removeclass/index.js'
31
31
  export * as renameproperty from './renameproperty/index.js'
32
- export * as replace from './replace/index.js'
33
32
  export * as select from './select/index.js'
33
+ export * as replace from './replace/index.js'
34
34
  export * as set from './set/index.js'
35
35
  export * as setattribute from './setattribute/index.js'
36
- export * as setproperty from './setproperty/index.js'
37
36
  export * as sorton from './sorton/index.js'
38
37
  export * as split from './split/index.js'
39
- export * as toarray from './toarray/index.js'
40
- export * as toboolean from './toboolean/index.js'
38
+ export * as setproperty from './setproperty/index.js'
41
39
  export * as spread from './spread/index.js'
42
- export * as toelement from './toelement/index.js'
40
+ export * as toarray from './toarray/index.js'
43
41
  export * as toggleclass from './toggleclass/index.js'
44
42
  export * as tonodelist from './tonodelist/index.js'
45
- export * as tonumber from './tonumber/index.js'
46
43
  export * as tonull from './tonull/index.js'
44
+ export * as toelement from './toelement/index.js'
45
+ export * as tonumber from './tonumber/index.js'
47
46
  export * as torecord from './torecord/index.js'
48
- export * as toref from './toref/index.js'
49
47
  export * as tostring from './tostring/index.js'
50
- export * as transformselected from './transformselected/index.js'
51
- export * as trim from './trim/index.js'
48
+ export * as toboolean from './toboolean/index.js'
49
+ export * as toref from './toref/index.js'
52
50
  export * as totext from './totext/index.js'
51
+ export * as trim from './trim/index.js'
52
+ export * as transformselected from './transformselected/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
4
  export * as append from './append/index.js'
5
5
  export * as at from './at/index.js'
6
6
  export * as call from './call/index.js'
7
- export * as clone from './clone/index.js'
8
7
  export * as deleteproperties from './deleteproperties/index.js'
9
- export * as getattribute from './getattribute/index.js'
8
+ export * as clone from './clone/index.js'
10
9
  export * as getproperties from './getproperties/index.js'
11
- export * as getproperty from './getproperty/index.js'
12
- export * as hjparse from './hjparse/index.js'
10
+ export * as getattribute from './getattribute/index.js'
13
11
  export * as equals from './equals/index.js'
12
+ export * as hjparse from './hjparse/index.js'
13
+ export * as getproperty from './getproperty/index.js'
14
14
  export * as hjstringify from './hjstringify/index.js'
15
15
  export * as if from './if/index.js'
16
- export * as initialize from './initialize/index.js'
17
- export * as length from './length/index.js'
18
16
  export * as join from './join/index.js'
17
+ export * as length from './length/index.js'
19
18
  export * as map from './map/index.js'
20
19
  export * as negate from './negate/index.js'
20
+ export * as initialize from './initialize/index.js'
21
21
  export * as notrailing from './notrailing/index.js'
22
22
  export * as or from './or/index.js'
23
23
  export * as pickrandom from './pickrandom/index.js'
24
- export * as populate from './populate/index.js'
25
24
  export * as print from './print/index.js'
25
+ export * as populate from './populate/index.js'
26
26
  export * as push from './push/index.js'
27
27
  export * as pusheach from './pusheach/index.js'
28
- export * as removeattribute from './removeattribute/index.js'
29
28
  export * as recordtoarray from './recordtoarray/index.js'
29
+ export * as removeattribute from './removeattribute/index.js'
30
30
  export * as removeclass from './removeclass/index.js'
31
31
  export * as renameproperty from './renameproperty/index.js'
32
- export * as replace from './replace/index.js'
33
32
  export * as select from './select/index.js'
33
+ export * as replace from './replace/index.js'
34
34
  export * as set from './set/index.js'
35
35
  export * as setattribute from './setattribute/index.js'
36
- export * as setproperty from './setproperty/index.js'
37
36
  export * as sorton from './sorton/index.js'
38
37
  export * as split from './split/index.js'
39
- export * as toarray from './toarray/index.js'
40
- export * as toboolean from './toboolean/index.js'
38
+ export * as setproperty from './setproperty/index.js'
41
39
  export * as spread from './spread/index.js'
42
- export * as toelement from './toelement/index.js'
40
+ export * as toarray from './toarray/index.js'
43
41
  export * as toggleclass from './toggleclass/index.js'
44
42
  export * as tonodelist from './tonodelist/index.js'
45
- export * as tonumber from './tonumber/index.js'
46
43
  export * as tonull from './tonull/index.js'
44
+ export * as toelement from './toelement/index.js'
45
+ export * as tonumber from './tonumber/index.js'
47
46
  export * as torecord from './torecord/index.js'
48
- export * as toref from './toref/index.js'
49
47
  export * as tostring from './tostring/index.js'
50
- export * as transformselected from './transformselected/index.js'
51
- export * as trim from './trim/index.js'
48
+ export * as toboolean from './toboolean/index.js'
49
+ export * as toref from './toref/index.js'
52
50
  export * as totext from './totext/index.js'
51
+ export * as trim from './trim/index.js'
52
+ export * as transformselected from './transformselected/index.js'
@@ -1,13 +1,13 @@
1
1
  export * as any from './any/index.js'
2
2
  export * as boolean from './boolean/index.js'
3
- export * as array from './array/index.js'
4
3
  export * as element from './element/index.js'
5
- export * as get from './get/index.js'
6
4
  export * as guess from './guess/index.js'
7
- export * as nodelist from './nodelist/index.js'
5
+ export * as array from './array/index.js'
6
+ export * as null from './null/index.js'
7
+ export * as get from './get/index.js'
8
8
  export * as number from './number/index.js'
9
9
  export * as record from './record/index.js'
10
+ export * as string from './string/index.js'
10
11
  export * as ref from './ref/index.js'
11
12
  export * as text from './text/index.js'
12
- export * as string from './string/index.js'
13
- export * as null from './null/index.js'
13
+ export * as nodelist from './nodelist/index.js'
@@ -1,13 +1,13 @@
1
1
  export * as any from './any/index.js'
2
2
  export * as boolean from './boolean/index.js'
3
- export * as array from './array/index.js'
4
3
  export * as element from './element/index.js'
5
- export * as get from './get/index.js'
6
4
  export * as guess from './guess/index.js'
7
- export * as nodelist from './nodelist/index.js'
5
+ export * as array from './array/index.js'
6
+ export * as null from './null/index.js'
7
+ export * as get from './get/index.js'
8
8
  export * as number from './number/index.js'
9
9
  export * as record from './record/index.js'
10
+ export * as string from './string/index.js'
10
11
  export * as ref from './ref/index.js'
11
12
  export * as text from './text/index.js'
12
- export * as string from './string/index.js'
13
- export * as null from './null/index.js'
13
+ export * as nodelist from './nodelist/index.js'
@@ -1,17 +1,17 @@
1
1
  export * as arrays from './arrays/index.js'
2
2
  export * as booleans from './booleans/index.js'
3
- export * as css from './css/index.js'
4
3
  export * as colors from './colors/index.js'
5
- export * as html from './html/index.js'
4
+ export * as css from './css/index.js'
6
5
  export * as errors from './errors/index.js'
7
- export * as misc from './misc/index.js'
6
+ export * as html from './html/index.js'
8
7
  export * as numbers from './numbers/index.js'
9
8
  export * as objects from './objects/index.js'
9
+ export * as misc from './misc/index.js'
10
10
  export * as optim from './optim/index.js'
11
- export * as regexps from './regexps/index.js'
12
11
  export * as random from './random/index.js'
13
- export * as strings from './strings/index.js'
14
12
  export * as sanitization from './sanitization/index.js'
13
+ export * as strings from './strings/index.js'
15
14
  export * as subtitles from './subtitles/index.js'
16
15
  export * as time from './time/index.js'
17
16
  export * as typescript from './typescript/index.js'
17
+ export * as regexps from './regexps/index.js'
package/agnostic/index.js CHANGED
@@ -1,17 +1,17 @@
1
1
  export * as arrays from './arrays/index.js'
2
2
  export * as booleans from './booleans/index.js'
3
- export * as css from './css/index.js'
4
3
  export * as colors from './colors/index.js'
5
- export * as html from './html/index.js'
4
+ export * as css from './css/index.js'
6
5
  export * as errors from './errors/index.js'
7
- export * as misc from './misc/index.js'
6
+ export * as html from './html/index.js'
8
7
  export * as numbers from './numbers/index.js'
9
8
  export * as objects from './objects/index.js'
9
+ export * as misc from './misc/index.js'
10
10
  export * as optim from './optim/index.js'
11
- export * as regexps from './regexps/index.js'
12
11
  export * as random from './random/index.js'
13
- export * as strings from './strings/index.js'
14
12
  export * as sanitization from './sanitization/index.js'
13
+ export * as strings from './strings/index.js'
15
14
  export * as subtitles from './subtitles/index.js'
16
15
  export * as time from './time/index.js'
17
16
  export * as typescript from './typescript/index.js'
17
+ export * as regexps from './regexps/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'
4
+ export * as connection from './connection/index.js'
5
+ export * as crossenv from './crossenv/index.js'
5
6
  export * as dataSize from './data-size/index.js'
6
7
  export * as isConstructorFunction from './is-constructor-function/index.js'
7
8
  export * as isNullish from './is-nullish/index.js'
8
- export * as loremIpsum from './lorem-ipsum/index.js'
9
- export * as logs from './logs/index.js'
10
9
  export * as normalizeExtension from './normalize-extension/index.js'
11
- export * as crossenv from './crossenv/index.js'
10
+ export * as logs from './logs/index.js'
11
+ export * as loremIpsum from './lorem-ipsum/index.js'
12
12
  export * as outcome from './outcome/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'
4
+ export * as connection from './connection/index.js'
5
+ export * as crossenv from './crossenv/index.js'
5
6
  export * as dataSize from './data-size/index.js'
6
7
  export * as isConstructorFunction from './is-constructor-function/index.js'
7
8
  export * as isNullish from './is-nullish/index.js'
8
- export * as loremIpsum from './lorem-ipsum/index.js'
9
- export * as logs from './logs/index.js'
10
9
  export * as normalizeExtension from './normalize-extension/index.js'
11
- export * as crossenv from './crossenv/index.js'
10
+ export * as logs from './logs/index.js'
11
+ export * as loremIpsum from './lorem-ipsum/index.js'
12
12
  export * as outcome from './outcome/index.js'
@@ -2,5 +2,5 @@ export * as absoluteModulo from './absolute-modulo/index.js'
2
2
  export * as approximateRational from './approximate-rational/index.js'
3
3
  export * as clamp from './clamp/index.js'
4
4
  export * as geometricProgressions from './geometric-progressions/index.js'
5
- export * as interpolate from './interpolate/index.js'
6
5
  export * as round from './round/index.js'
6
+ export * as interpolate from './interpolate/index.js'
@@ -2,5 +2,5 @@ export * as absoluteModulo from './absolute-modulo/index.js'
2
2
  export * as approximateRational from './approximate-rational/index.js'
3
3
  export * as clamp from './clamp/index.js'
4
4
  export * as geometricProgressions from './geometric-progressions/index.js'
5
- export * as interpolate from './interpolate/index.js'
6
5
  export * as round from './round/index.js'
6
+ export * as interpolate from './interpolate/index.js'
@@ -1,9 +1,9 @@
1
1
  export * as deepGetProperty from './deep-get-property/index.js'
2
2
  export * as flattenGetters from './flatten-getters/index.js'
3
3
  export * as isObject from './is-object/index.js'
4
+ export * as enums from './enums/index.js'
4
5
  export * as recordFormat from './record-format/index.js'
5
- export * as isRecord from './is-record/index.js'
6
6
  export * as recordMap from './record-map/index.js'
7
7
  export * as sortKeys from './sort-keys/index.js'
8
+ export * as isRecord from './is-record/index.js'
8
9
  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
2
  export * as flattenGetters from './flatten-getters/index.js'
3
3
  export * as isObject from './is-object/index.js'
4
+ export * as enums from './enums/index.js'
4
5
  export * as recordFormat from './record-format/index.js'
5
- export * as isRecord from './is-record/index.js'
6
6
  export * as recordMap from './record-map/index.js'
7
7
  export * as sortKeys from './sort-keys/index.js'
8
+ export * as isRecord from './is-record/index.js'
8
9
  export * as validation from './validation/index.js'
9
- export * as enums from './enums/index.js'
@@ -1,8 +1,8 @@
1
- export * as charCodes from './char-codes/index.js'
2
1
  export * as matches from './matches/index.js'
3
- export * as parseTable from './parse-table/index.js'
4
- export * as replaceAll from './replace-all/index.js'
5
2
  export * as normalizeIndent from './normalize-indent/index.js'
6
- export * as splitTrim from './split-trim/index.js'
3
+ export * as replaceAll from './replace-all/index.js'
4
+ export * as charCodes from './char-codes/index.js'
5
+ export * as parseTable from './parse-table/index.js'
7
6
  export * as toAlphanum from './to-alphanum/index.js'
8
7
  export * as trim from './trim/index.js'
8
+ export * as splitTrim from './split-trim/index.js'
@@ -1,8 +1,8 @@
1
- export * as charCodes from './char-codes/index.js'
2
1
  export * as matches from './matches/index.js'
3
- export * as parseTable from './parse-table/index.js'
4
- export * as replaceAll from './replace-all/index.js'
5
2
  export * as normalizeIndent from './normalize-indent/index.js'
6
- export * as splitTrim from './split-trim/index.js'
3
+ export * as replaceAll from './replace-all/index.js'
4
+ export * as charCodes from './char-codes/index.js'
5
+ export * as parseTable from './parse-table/index.js'
7
6
  export * as toAlphanum from './to-alphanum/index.js'
8
7
  export * as trim from './trim/index.js'
8
+ export * as splitTrim from './split-trim/index.js'
@@ -1,2 +1,2 @@
1
- export * as toFrenchRepublican from './to-french-republican/index.js'
2
1
  export * as formatDate from './format-date/index.js'
2
+ export * as toFrenchRepublican from './to-french-republican/index.js'
@@ -1,2 +1,2 @@
1
- export * as toFrenchRepublican from './to-french-republican/index.js'
2
1
  export * as formatDate from './format-date/index.js'
2
+ export * as toFrenchRepublican from './to-french-republican/index.js'
@@ -1,5 +1,5 @@
1
+ export * as dates from './dates/index.js'
1
2
  export * as duration from './duration/index.js'
2
3
  export * as timeout from './timeout/index.js'
3
4
  export * as transitions from './transitions/index.js'
4
5
  export * as wait from './wait/index.js'
5
- export * as dates from './dates/index.js'
@@ -1,5 +1,5 @@
1
+ export * as dates from './dates/index.js'
1
2
  export * as duration from './duration/index.js'
2
3
  export * as timeout from './timeout/index.js'
3
4
  export * as transitions from './transitions/index.js'
4
5
  export * as wait from './wait/index.js'
5
- export * as dates from './dates/index.js'
@@ -1,4 +1,4 @@
1
- import { type PropsWithChildren, type FunctionComponent, type MouseEvent } from 'react';
1
+ import { type PropsWithChildren, type FunctionComponent, type MouseEvent, type ReactNode } from 'react';
2
2
  import type { WithClassName } from '../utils/types.js';
3
3
  /**
4
4
  * Props for the {@link Clippable} component.
@@ -6,6 +6,15 @@ import type { WithClassName } from '../utils/types.js';
6
6
  * @property toClip - Content written to the clipboard. When omitted, the
7
7
  * content container's `innerHTML` is used. A function may be provided to
8
8
  * transform that current content before it is written.
9
+ * @property copyBtnContent - What the copy button shows at rest. Left out, the button
10
+ * renders empty and a stylesheet fills it — `:empty::before` — which is how every
11
+ * control in this library takes its default look without the component deciding on a
12
+ * word or a glyph.
13
+ * @property clippedBtnContent - What it shows during the three seconds after a
14
+ * successful write. Left out, the button is empty in that state too, and the same
15
+ * stylesheet hook applies. It does **not** fall back to `copyBtnContent`: the two states
16
+ * say different things, and an article that names one without the other means the other
17
+ * to come from the stylesheet.
9
18
  * @property onCopyClicked - Called when the copy button is clicked, before the
10
19
  * clipboard content is resolved, with the container's raw HTML.
11
20
  * @property onClipped - Called once content has been written to the clipboard.
@@ -17,6 +26,8 @@ import type { WithClassName } from '../utils/types.js';
17
26
  */
18
27
  export type Props = PropsWithChildren<WithClassName<{
19
28
  toClip?: string | ((curr: string | undefined) => string | undefined);
29
+ copyBtnContent?: ReactNode;
30
+ clippedBtnContent?: ReactNode;
20
31
  onCopyClicked?: (e: MouseEvent<HTMLButtonElement, globalThis.MouseEvent>, rawContent: string | undefined) => void;
21
32
  onClipped?: (content: string) => void;
22
33
  onCopyFailed?: (error: unknown) => void;
@@ -26,7 +26,7 @@ const clippedModifierDurationMs = 3000;
26
26
  * unset) and leaves the component untouched: neither `onClipped` nor the
27
27
  * `clipped` modifier fires.
28
28
  */
29
- export const Clippable = ({ className, children, toClip, onCopyClicked, onClipped, onCopyFailed }) => {
29
+ export const Clippable = ({ className, children, toClip, copyBtnContent, clippedBtnContent, onCopyClicked, onClipped, onCopyFailed }) => {
30
30
  // State & refs
31
31
  const [hasBeenRecentlyClipped, setHasBeenRecentlyClipped] = useState(false);
32
32
  const contentRef = useRef(null);
@@ -71,5 +71,5 @@ export const Clippable = ({ className, children, toClip, onCopyClicked, onClippe
71
71
  }), className);
72
72
  const copyClss = c('copy');
73
73
  const contentClss = c('content');
74
- return _jsxs("div", { className: rootClss, children: [_jsx("button", { type: 'button', className: copyClss, onClick: e => { void handleCopyClick(e); } }), _jsx("div", { ref: contentRef, className: contentClss, children: children })] });
74
+ return _jsxs("div", { className: rootClss, children: [_jsx("button", { type: 'button', className: copyClss, onClick: e => { void handleCopyClick(e); }, children: hasBeenRecentlyClipped ? clippedBtnContent : copyBtnContent }), _jsx("div", { ref: contentRef, className: contentClss, children: children })] });
75
75
  };
@@ -1,43 +1,59 @@
1
1
  import { type FunctionComponent, type PropsWithChildren } from 'react';
2
- import type { WithClassName, WithViewportObservation } from '../utils/types.js';
2
+ import type { WithClassName } from '../utils/types.js';
3
+ import type { ViewportBehaviours } from '../utils/viewport-behaviours/types.js';
3
4
  import { type ScrollState } from './utils.js';
5
+ import type { ScrollListenerAction } from './types.js';
4
6
  /**
5
7
  * Props for the {@link ScrollListener} component.
6
8
  *
7
- * @property startOnVisible - When `true`, scroll tracking only starts once the
8
- * component enters the viewport, instead of on mount.
9
- * @property stopOnHidden - When `true`, scroll tracking stops when the component
10
- * leaves the viewport.
9
+ * @property tracking - Whether the component is measuring, taken over by the consumer.
10
+ * Provided, it is the whole answer and the instructions no longer reach it.
11
+ * @property defaultTracking - Whether it starts measuring on mount. `true` by default,
12
+ * which is what this component has always done — a starting point and not a setting,
13
+ * hence `default…`. `defaultTracking={false}` with `whenVisible='track'` is the old
14
+ * `startOnVisible`, written in the shared grammar.
15
+ * @property behavioursSuspended - Holds back the instructions that **start** something,
16
+ * and lets through those that stop it. A gate reaches `'track'`: measuring a subtree
17
+ * nobody is being shown is work done for no one.
18
+ * @property onIsTrackingChanged - Called once the effective tracking state changed.
11
19
  * @property onScrollStateChanged - Called after the measured {@link ScrollState}
12
20
  * changed. Receives `undefined` until the first measurement lands.
13
- * @property onVisibilityChanged - Called on every intersection change, with
14
- * `true` when the component intersects the viewport.
21
+ * @property onVisibilityChanged - Called when the component enters or leaves the
22
+ * viewport, on the **settled** state — the `visibility…` delays included, so a consumer
23
+ * watching visibility and a consumer running instructions are told the same story.
15
24
  * @property onScrollProgressChanged - Called after the element's vertical outer
16
25
  * scroll progress changed: `0` when it is about to enter the viewport, `1` once
17
26
  * it has fully left it. Never on mount.
18
27
  * @property onScrollDirectionChanged - Called after the document scroll
19
28
  * direction changed, with `'up'` or `'down'`. Never on mount.
20
- * @property threshold - How much of the component has to be in view before it
21
- * counts as visible, forwarded to the internal {@link IntersectionObserver}.
22
- * @property root - The observer's root. Defaults to the viewport.
23
- * @property rootMargin - Grows or shrinks that root before measuring.
29
+ * @property visibilityThreshold - How much of the component has to be in view before it
30
+ * counts as visible. See `VisibilityOptions` for this and the four that follow it.
31
+ * @property visibilityRoot - The box visibility is measured against.
32
+ * @property visibilityRootMargin - Grows or shrinks that box before measuring.
33
+ * @property visibilityOnAfterMs - How long it must stay visible to count as visible.
34
+ * @property visibilityOffAfterMs - The same, on the way out.
24
35
  * @property className - Optional additional class name(s) applied to the root element.
25
36
  * @property children - React nodes rendered inside the scroll listener container.
26
37
  */
27
- export type Props = PropsWithChildren<WithClassName<WithViewportObservation<{
28
- startOnVisible?: boolean;
29
- stopOnHidden?: boolean;
38
+ export type Props = PropsWithChildren<WithClassName<{
39
+ tracking?: boolean;
40
+ defaultTracking?: boolean;
41
+ onIsTrackingChanged?: (isTracking: boolean) => void;
30
42
  onScrollStateChanged?: (scrollState?: ScrollState) => void;
31
- onVisibilityChanged?: (isVisible: boolean) => void;
32
43
  onScrollProgressChanged?: (progress: number) => void;
33
44
  onScrollDirectionChanged?: (direction: 'up' | 'down') => void;
34
- }>>>;
45
+ }>> & ViewportBehaviours<ScrollListenerAction> & {
46
+ behavioursSuspended?: boolean;
47
+ };
35
48
  /**
36
49
  * Exposes scroll metrics — both the document's and its own — as CSS custom
37
50
  * properties on its root element, so scroll-driven styling needs no JavaScript
38
51
  * of its own.
39
52
  *
40
53
  * ### Root element modifiers
54
+ * - `--tracking` — the component is measuring. The state, where `--measured` is its
55
+ * consequence: a listener that has stopped keeps its last values, so it can be
56
+ * measured and no longer tracking.
41
57
  * - `--measured` — a first measurement landed, so the properties below are set.
42
58
  * - `--scrolling-up` / `--scrolling-down` — the document's last known direction.
43
59
  * Neither is present before the first scroll.
@@ -66,10 +82,21 @@ export type Props = PropsWithChildren<WithClassName<WithViewportObservation<{
66
82
  *
67
83
  * @param props - Component properties.
68
84
  * @see {@link Props}
69
- * @returns A container exposing the metrics, wrapping its children inside an
70
- * {@link IntersectionObserverComponent}.
85
+ * @returns A container exposing the metrics, with the children as its own.
71
86
  *
72
87
  * @remarks
88
+ * **Viewport-driven behaviour is declared, not named by a prop.** `whenVisible` and
89
+ * `whenHidden` take `'track'`, `'untrack'`, or a list, each optionally suffixed by
90
+ * `':once'` and `':force'`. The old `startOnVisible` is `defaultTracking={false}` plus
91
+ * `whenVisible='track'`, and `stopOnHidden` is `whenHidden='untrack'`. See
92
+ * `components/utils/viewport-behaviours` for the grammar, and the `visibility…` props for
93
+ * what « visible » means and how long it has to have been true.
94
+ *
95
+ * **The observer runs on the root itself.** There is no inner box between this element
96
+ * and the children any more, and that matters here more than anywhere else in the
97
+ * library: the whole point is a stylesheet animating on the properties this element
98
+ * carries, which it cannot do if what it wants to move sits one level below.
99
+ *
73
100
  * All mounted instances share a single pair of `scroll` / `resize` listeners and
74
101
  * a single measurement pass per animation frame — the document is measured once
75
102
  * for everyone, each element only for itself. The listeners exist only while at