@design-edito/tools 0.5.7 → 0.5.9

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 (67) hide show
  1. package/agnostic/css/index.d.ts +1 -1
  2. package/agnostic/css/index.js +1 -1
  3. package/agnostic/errors/index.d.ts +1 -1
  4. package/agnostic/errors/index.js +1 -1
  5. package/agnostic/html/hyper-json/smart-tags/coalesced/index.d.ts +18 -18
  6. package/agnostic/html/hyper-json/smart-tags/coalesced/index.js +18 -18
  7. package/agnostic/html/hyper-json/smart-tags/isolated/index.d.ts +4 -4
  8. package/agnostic/html/hyper-json/smart-tags/isolated/index.js +4 -4
  9. package/agnostic/html/index.d.ts +1 -1
  10. package/agnostic/html/index.js +1 -1
  11. package/agnostic/index.d.ts +2 -2
  12. package/agnostic/index.js +2 -2
  13. package/agnostic/misc/index.d.ts +1 -1
  14. package/agnostic/misc/index.js +1 -1
  15. package/agnostic/misc/logs/index.d.ts +1 -1
  16. package/agnostic/misc/logs/index.js +1 -1
  17. package/agnostic/objects/index.d.ts +2 -2
  18. package/agnostic/objects/index.js +2 -2
  19. package/agnostic/random/index.d.ts +1 -1
  20. package/agnostic/random/index.js +1 -1
  21. package/agnostic/strings/index.d.ts +1 -1
  22. package/agnostic/strings/index.js +1 -1
  23. package/agnostic/time/dates/index.d.ts +1 -1
  24. package/agnostic/time/dates/index.js +1 -1
  25. package/agnostic/time/index.d.ts +1 -1
  26. package/agnostic/time/index.js +1 -1
  27. package/components/BeforeAfter/index.controlled.d.ts +5 -4
  28. package/components/BeforeAfter/index.controlled.js +6 -6
  29. package/components/Drawer/index.d.ts +3 -1
  30. package/components/Drawer/index.js +5 -2
  31. package/components/Iframe/index.d.ts +4 -0
  32. package/components/Iframe/index.js +8 -1
  33. package/components/Input/index.d.ts +4 -0
  34. package/components/Input/index.js +9 -1
  35. package/components/ListLoader/index.controlled.d.ts +3 -0
  36. package/components/ListLoader/index.controlled.js +4 -1
  37. package/components/Paginator/index.d.ts +7 -2
  38. package/components/Paginator/index.js +43 -6
  39. package/components/ResizeObserver/index.d.ts +6 -1
  40. package/components/ResizeObserver/index.js +7 -2
  41. package/components/ScrollListener/index.d.ts +5 -0
  42. package/components/ScrollListener/index.js +10 -1
  43. package/components/Select/index.d.ts +4 -0
  44. package/components/Select/index.js +9 -1
  45. package/components/ShadowRoot/index.d.ts +4 -0
  46. package/components/ShadowRoot/index.js +5 -1
  47. package/components/Textarea/index.d.ts +4 -0
  48. package/components/Textarea/index.js +9 -1
  49. package/components/Video/index.controlled.d.ts +15 -4
  50. package/components/Video/index.controlled.js +37 -9
  51. package/components/Video/index.d.ts +5 -3
  52. package/components/Video/index.js +14 -4
  53. package/components/Video/utils.d.ts +11 -0
  54. package/components/Video/utils.js +14 -5
  55. package/index.d.ts +1 -1
  56. package/index.js +1 -1
  57. package/node/@google-cloud/storage/file/index.d.ts +1 -1
  58. package/node/@google-cloud/storage/file/index.js +1 -1
  59. package/node/cloud-storage/operations/index.d.ts +2 -2
  60. package/node/cloud-storage/operations/index.js +2 -2
  61. package/node/files/index.d.ts +1 -1
  62. package/node/files/index.js +1 -1
  63. package/node/images/transform/operations/index.d.ts +2 -2
  64. package/node/images/transform/operations/index.js +2 -2
  65. package/node/index.d.ts +2 -2
  66. package/node/index.js +2 -2
  67. package/package.json +1 -1
@@ -2,5 +2,5 @@ export * as bem from './bem/index.js'
2
2
  export * as clss from './clss/index.js'
3
3
  export * as generateNiceColor from './generate-nice-color/index.js'
4
4
  export * as isValidCssClassName from './is-valid-css-class-name/index.js'
5
- export * as stylesSet from './styles-set/index.js'
6
5
  export * as scale from './scale/index.js'
6
+ export * as stylesSet from './styles-set/index.js'
@@ -2,5 +2,5 @@ export * as bem from './bem/index.js'
2
2
  export * as clss from './clss/index.js'
3
3
  export * as generateNiceColor from './generate-nice-color/index.js'
4
4
  export * as isValidCssClassName from './is-valid-css-class-name/index.js'
5
- export * as stylesSet from './styles-set/index.js'
6
5
  export * as scale from './scale/index.js'
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,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'
4
3
  export * as append from './append/index.js'
5
4
  export * as at from './at/index.js'
6
- export * as clone from './clone/index.js'
7
5
  export * as call from './call/index.js'
6
+ export * as addclass from './addclass/index.js'
7
+ export * as clone from './clone/index.js'
8
+ export * as getattribute from './getattribute/index.js'
8
9
  export * as deleteproperties from './deleteproperties/index.js'
10
+ export * as getproperties from './getproperties/index.js'
11
+ export * as getproperty from './getproperty/index.js'
9
12
  export * as equals from './equals/index.js'
10
- export * as getattribute from './getattribute/index.js'
11
- export * as hjparse from './hjparse/index.js'
12
13
  export * as hjstringify from './hjstringify/index.js'
13
- export * as if from './if/index.js'
14
14
  export * as initialize from './initialize/index.js'
15
- export * as getproperties from './getproperties/index.js'
16
- export * as length from './length/index.js'
15
+ export * as if from './if/index.js'
17
16
  export * as join from './join/index.js'
17
+ export * as hjparse from './hjparse/index.js'
18
18
  export * as map from './map/index.js'
19
- export * as negate from './negate/index.js'
20
- export * as notrailing from './notrailing/index.js'
21
- export * as pickrandom from './pickrandom/index.js'
19
+ export * as length from './length/index.js'
22
20
  export * as or from './or/index.js'
23
- export * as getproperty from './getproperty/index.js'
21
+ export * as pickrandom from './pickrandom/index.js'
24
22
  export * as populate from './populate/index.js'
25
23
  export * as print from './print/index.js'
24
+ export * as negate from './negate/index.js'
26
25
  export * as pusheach from './pusheach/index.js'
27
- export * as push from './push/index.js'
28
26
  export * as recordtoarray from './recordtoarray/index.js'
29
27
  export * as removeattribute from './removeattribute/index.js'
28
+ export * as notrailing from './notrailing/index.js'
30
29
  export * as removeclass from './removeclass/index.js'
31
- export * as renameproperty from './renameproperty/index.js'
32
- export * as replace from './replace/index.js'
30
+ export * as push from './push/index.js'
33
31
  export * as select from './select/index.js'
34
32
  export * as set from './set/index.js'
35
33
  export * as setattribute from './setattribute/index.js'
36
- export * as sorton from './sorton/index.js'
37
34
  export * as setproperty from './setproperty/index.js'
35
+ export * as replace from './replace/index.js'
36
+ export * as sorton from './sorton/index.js'
38
37
  export * as split from './split/index.js'
38
+ export * as renameproperty from './renameproperty/index.js'
39
39
  export * as spread from './spread/index.js'
40
40
  export * as toarray from './toarray/index.js'
41
41
  export * as toboolean from './toboolean/index.js'
42
42
  export * as toelement from './toelement/index.js'
43
43
  export * as toggleclass from './toggleclass/index.js'
44
44
  export * as tonodelist from './tonodelist/index.js'
45
- export * as tonull from './tonull/index.js'
46
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
48
  export * as totext from './totext/index.js'
51
- export * as trim from './trim/index.js'
49
+ export * as toref from './toref/index.js'
50
+ export * as tonull from './tonull/index.js'
52
51
  export * as transformselected from './transformselected/index.js'
52
+ export * as trim from './trim/index.js'
@@ -1,52 +1,52 @@
1
1
  export * as add from './add/index.js'
2
- export * as addclass from './addclass/index.js'
3
2
  export * as and from './and/index.js'
4
3
  export * as append from './append/index.js'
5
4
  export * as at from './at/index.js'
6
- export * as clone from './clone/index.js'
7
5
  export * as call from './call/index.js'
6
+ export * as addclass from './addclass/index.js'
7
+ export * as clone from './clone/index.js'
8
+ export * as getattribute from './getattribute/index.js'
8
9
  export * as deleteproperties from './deleteproperties/index.js'
10
+ export * as getproperties from './getproperties/index.js'
11
+ export * as getproperty from './getproperty/index.js'
9
12
  export * as equals from './equals/index.js'
10
- export * as getattribute from './getattribute/index.js'
11
- export * as hjparse from './hjparse/index.js'
12
13
  export * as hjstringify from './hjstringify/index.js'
13
- export * as if from './if/index.js'
14
14
  export * as initialize from './initialize/index.js'
15
- export * as getproperties from './getproperties/index.js'
16
- export * as length from './length/index.js'
15
+ export * as if from './if/index.js'
17
16
  export * as join from './join/index.js'
17
+ export * as hjparse from './hjparse/index.js'
18
18
  export * as map from './map/index.js'
19
- export * as negate from './negate/index.js'
20
- export * as notrailing from './notrailing/index.js'
21
- export * as pickrandom from './pickrandom/index.js'
19
+ export * as length from './length/index.js'
22
20
  export * as or from './or/index.js'
23
- export * as getproperty from './getproperty/index.js'
21
+ export * as pickrandom from './pickrandom/index.js'
24
22
  export * as populate from './populate/index.js'
25
23
  export * as print from './print/index.js'
24
+ export * as negate from './negate/index.js'
26
25
  export * as pusheach from './pusheach/index.js'
27
- export * as push from './push/index.js'
28
26
  export * as recordtoarray from './recordtoarray/index.js'
29
27
  export * as removeattribute from './removeattribute/index.js'
28
+ export * as notrailing from './notrailing/index.js'
30
29
  export * as removeclass from './removeclass/index.js'
31
- export * as renameproperty from './renameproperty/index.js'
32
- export * as replace from './replace/index.js'
30
+ export * as push from './push/index.js'
33
31
  export * as select from './select/index.js'
34
32
  export * as set from './set/index.js'
35
33
  export * as setattribute from './setattribute/index.js'
36
- export * as sorton from './sorton/index.js'
37
34
  export * as setproperty from './setproperty/index.js'
35
+ export * as replace from './replace/index.js'
36
+ export * as sorton from './sorton/index.js'
38
37
  export * as split from './split/index.js'
38
+ export * as renameproperty from './renameproperty/index.js'
39
39
  export * as spread from './spread/index.js'
40
40
  export * as toarray from './toarray/index.js'
41
41
  export * as toboolean from './toboolean/index.js'
42
42
  export * as toelement from './toelement/index.js'
43
43
  export * as toggleclass from './toggleclass/index.js'
44
44
  export * as tonodelist from './tonodelist/index.js'
45
- export * as tonull from './tonull/index.js'
46
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
48
  export * as totext from './totext/index.js'
51
- export * as trim from './trim/index.js'
49
+ export * as toref from './toref/index.js'
50
+ export * as tonull from './tonull/index.js'
52
51
  export * as transformselected from './transformselected/index.js'
52
+ export * as trim from './trim/index.js'
@@ -1,13 +1,13 @@
1
+ export * as any from './any/index.js'
1
2
  export * as array from './array/index.js'
2
3
  export * as boolean from './boolean/index.js'
3
- export * as any from './any/index.js'
4
4
  export * as element from './element/index.js'
5
5
  export * as get from './get/index.js'
6
+ export * as guess from './guess/index.js'
6
7
  export * as nodelist from './nodelist/index.js'
7
8
  export * as null from './null/index.js'
8
- export * as guess from './guess/index.js'
9
9
  export * as number from './number/index.js'
10
- export * as record from './record/index.js'
11
10
  export * as ref from './ref/index.js'
12
- export * as string from './string/index.js'
13
11
  export * as text from './text/index.js'
12
+ export * as string from './string/index.js'
13
+ export * as record from './record/index.js'
@@ -1,13 +1,13 @@
1
+ export * as any from './any/index.js'
1
2
  export * as array from './array/index.js'
2
3
  export * as boolean from './boolean/index.js'
3
- export * as any from './any/index.js'
4
4
  export * as element from './element/index.js'
5
5
  export * as get from './get/index.js'
6
+ export * as guess from './guess/index.js'
6
7
  export * as nodelist from './nodelist/index.js'
7
8
  export * as null from './null/index.js'
8
- export * as guess from './guess/index.js'
9
9
  export * as number from './number/index.js'
10
- export * as record from './record/index.js'
11
10
  export * as ref from './ref/index.js'
12
- export * as string from './string/index.js'
13
11
  export * as text from './text/index.js'
12
+ export * as string from './string/index.js'
13
+ export * as record from './record/index.js'
@@ -5,6 +5,6 @@ export * as hyperJson from './hyper-json/index.js'
5
5
  export * as insertNode from './insert-node/index.js'
6
6
  export * as placeholders from './placeholders/index.js'
7
7
  export * as replaceInElement from './replace-in-element/index.js'
8
- export * as selectorToElement from './selector-to-element/index.js'
9
8
  export * as stringToNodes from './string-to-nodes/index.js'
9
+ export * as selectorToElement from './selector-to-element/index.js'
10
10
  export * as watchSelection from './watch-selection/index.js'
@@ -5,6 +5,6 @@ export * as hyperJson from './hyper-json/index.js'
5
5
  export * as insertNode from './insert-node/index.js'
6
6
  export * as placeholders from './placeholders/index.js'
7
7
  export * as replaceInElement from './replace-in-element/index.js'
8
- export * as selectorToElement from './selector-to-element/index.js'
9
8
  export * as stringToNodes from './string-to-nodes/index.js'
9
+ export * as selectorToElement from './selector-to-element/index.js'
10
10
  export * as watchSelection from './watch-selection/index.js'
@@ -1,6 +1,6 @@
1
1
  export * as arrays from './arrays/index.js'
2
- export * as booleans from './booleans/index.js'
3
2
  export * as colors from './colors/index.js'
3
+ export * as booleans from './booleans/index.js'
4
4
  export * as css from './css/index.js'
5
5
  export * as errors from './errors/index.js'
6
6
  export * as html from './html/index.js'
@@ -11,7 +11,7 @@ export * as optim from './optim/index.js'
11
11
  export * as random from './random/index.js'
12
12
  export * as regexps from './regexps/index.js'
13
13
  export * as sanitization from './sanitization/index.js'
14
- export * as subtitles from './subtitles/index.js'
15
14
  export * as strings from './strings/index.js'
15
+ export * as subtitles from './subtitles/index.js'
16
16
  export * as time from './time/index.js'
17
17
  export * as typescript from './typescript/index.js'
package/agnostic/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  export * as arrays from './arrays/index.js'
2
- export * as booleans from './booleans/index.js'
3
2
  export * as colors from './colors/index.js'
3
+ export * as booleans from './booleans/index.js'
4
4
  export * as css from './css/index.js'
5
5
  export * as errors from './errors/index.js'
6
6
  export * as html from './html/index.js'
@@ -11,7 +11,7 @@ export * as optim from './optim/index.js'
11
11
  export * as random from './random/index.js'
12
12
  export * as regexps from './regexps/index.js'
13
13
  export * as sanitization from './sanitization/index.js'
14
- export * as subtitles from './subtitles/index.js'
15
14
  export * as strings from './strings/index.js'
15
+ export * as subtitles from './subtitles/index.js'
16
16
  export * as time from './time/index.js'
17
17
  export * as typescript from './typescript/index.js'
@@ -4,9 +4,9 @@ export * as connection from './connection/index.js'
4
4
  export * as crawler from './crawler/index.js'
5
5
  export * as crossenv from './crossenv/index.js'
6
6
  export * as dataSize from './data-size/index.js'
7
+ export * as isConstructorFunction from './is-constructor-function/index.js'
7
8
  export * as isNullish from './is-nullish/index.js'
8
9
  export * as logs from './logs/index.js'
9
- export * as isConstructorFunction from './is-constructor-function/index.js'
10
10
  export * as loremIpsum from './lorem-ipsum/index.js'
11
11
  export * as normalizeExtension from './normalize-extension/index.js'
12
12
  export * as outcome from './outcome/index.js'
@@ -4,9 +4,9 @@ export * as connection from './connection/index.js'
4
4
  export * as crawler from './crawler/index.js'
5
5
  export * as crossenv from './crossenv/index.js'
6
6
  export * as dataSize from './data-size/index.js'
7
+ export * as isConstructorFunction from './is-constructor-function/index.js'
7
8
  export * as isNullish from './is-nullish/index.js'
8
9
  export * as logs from './logs/index.js'
9
- export * as isConstructorFunction from './is-constructor-function/index.js'
10
10
  export * as loremIpsum from './lorem-ipsum/index.js'
11
11
  export * as normalizeExtension from './normalize-extension/index.js'
12
12
  export * as outcome from './outcome/index.js'
@@ -1,3 +1,3 @@
1
1
  export * as logger from './logger/index.js'
2
- export * as makeTextBlock from './make-text-block/index.js'
3
2
  export * as styles from './styles/index.js'
3
+ export * as makeTextBlock from './make-text-block/index.js'
@@ -1,3 +1,3 @@
1
1
  export * as logger from './logger/index.js'
2
- export * as makeTextBlock from './make-text-block/index.js'
3
2
  export * as styles from './styles/index.js'
3
+ export * as makeTextBlock from './make-text-block/index.js'
@@ -1,9 +1,9 @@
1
- export * as enums from './enums/index.js'
2
1
  export * as deepGetProperty from './deep-get-property/index.js'
2
+ export * as enums from './enums/index.js'
3
+ export * as flattenGetters from './flatten-getters/index.js'
3
4
  export * as isObject from './is-object/index.js'
4
5
  export * as isRecord from './is-record/index.js'
5
6
  export * as recordFormat from './record-format/index.js'
6
7
  export * as recordMap from './record-map/index.js'
7
- export * as flattenGetters from './flatten-getters/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
- export * as enums from './enums/index.js'
2
1
  export * as deepGetProperty from './deep-get-property/index.js'
2
+ export * as enums from './enums/index.js'
3
+ export * as flattenGetters from './flatten-getters/index.js'
3
4
  export * as isObject from './is-object/index.js'
4
5
  export * as isRecord from './is-record/index.js'
5
6
  export * as recordFormat from './record-format/index.js'
6
7
  export * as recordMap from './record-map/index.js'
7
- export * as flattenGetters from './flatten-getters/index.js'
8
8
  export * as sortKeys from './sort-keys/index.js'
9
9
  export * as validation from './validation/index.js'
@@ -1,3 +1,3 @@
1
1
  export * as hexChar from './hex-char/index.js'
2
- export * as uuid from './uuid/index.js'
3
2
  export * as random from './random/index.js'
3
+ export * as uuid from './uuid/index.js'
@@ -1,3 +1,3 @@
1
1
  export * as hexChar from './hex-char/index.js'
2
- export * as uuid from './uuid/index.js'
3
2
  export * as random from './random/index.js'
3
+ export * as uuid from './uuid/index.js'
@@ -2,7 +2,7 @@ export * as charCodes from './char-codes/index.js'
2
2
  export * as matches from './matches/index.js'
3
3
  export * as normalizeIndent from './normalize-indent/index.js'
4
4
  export * as parseTable from './parse-table/index.js'
5
- export * as splitTrim from './split-trim/index.js'
6
5
  export * as replaceAll from './replace-all/index.js'
6
+ export * as splitTrim from './split-trim/index.js'
7
7
  export * as toAlphanum from './to-alphanum/index.js'
8
8
  export * as trim from './trim/index.js'
@@ -2,7 +2,7 @@ export * as charCodes from './char-codes/index.js'
2
2
  export * as matches from './matches/index.js'
3
3
  export * as normalizeIndent from './normalize-indent/index.js'
4
4
  export * as parseTable from './parse-table/index.js'
5
- export * as splitTrim from './split-trim/index.js'
6
5
  export * as replaceAll from './replace-all/index.js'
6
+ export * as splitTrim from './split-trim/index.js'
7
7
  export * as toAlphanum from './to-alphanum/index.js'
8
8
  export * as trim from './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
1
  export * as dates from './dates/index.js'
2
- export * as duration from './duration/index.js'
3
2
  export * as timeout from './timeout/index.js'
4
3
  export * as transitions from './transitions/index.js'
5
4
  export * as wait from './wait/index.js'
5
+ export * as duration from './duration/index.js'
@@ -1,5 +1,5 @@
1
1
  export * as dates from './dates/index.js'
2
- export * as duration from './duration/index.js'
3
2
  export * as timeout from './timeout/index.js'
4
3
  export * as transitions from './transitions/index.js'
5
4
  export * as wait from './wait/index.js'
5
+ export * as duration from './duration/index.js'
@@ -30,10 +30,11 @@ export type Props = PropsWithChildren<WithClassName<{
30
30
  * as a ratio between `0` and `1`. Handles both mouse and touch input, telling a
31
31
  * click apart from a drag.
32
32
  *
33
- * The active ratio is exposed as:
34
- * - CSS custom properties `--lm-before-after-ratio` and
35
- * `--lm-before-after-ratio-percent`,
36
- * - a `data-ratio` attribute on the root element.
33
+ * The divider's position is exposed on the root element as:
34
+ * - the unitless custom property `--lm-before-after-ratio`. No percentage twin —
35
+ * `calc(var(--lm-before-after-ratio) * 100%)` covers it.
36
+ * - a `data-ratio` attribute, for what a custom property cannot reach:
37
+ * `content: attr(data-ratio)` and attribute selectors.
37
38
  *
38
39
  * ### CSS modifiers
39
40
  * - `horizontal` — applied when `mode` is `'horizontal'`.
@@ -13,10 +13,11 @@ import cssModule from './styles.module.css';
13
13
  * as a ratio between `0` and `1`. Handles both mouse and touch input, telling a
14
14
  * click apart from a drag.
15
15
  *
16
- * The active ratio is exposed as:
17
- * - CSS custom properties `--lm-before-after-ratio` and
18
- * `--lm-before-after-ratio-percent`,
19
- * - a `data-ratio` attribute on the root element.
16
+ * The divider's position is exposed on the root element as:
17
+ * - the unitless custom property `--lm-before-after-ratio`. No percentage twin —
18
+ * `calc(var(--lm-before-after-ratio) * 100%)` covers it.
19
+ * - a `data-ratio` attribute, for what a custom property cannot reach:
20
+ * `content: attr(data-ratio)` and attribute selectors.
20
21
  *
21
22
  * ### CSS modifiers
22
23
  * - `horizontal` — applied when `mode` is `'horizontal'`.
@@ -105,8 +106,7 @@ export const ControlledBeforeAfter = ({ mode = 'horizontal', ratio = 0, before,
105
106
  }), className);
106
107
  const roundedRatio = round(clampedRatio, 4);
107
108
  const customProps = {
108
- '--lm-before-after-ratio': `${roundedRatio}`,
109
- '--lm-before-after-ratio-percent': `${round(clampedRatio * 100, 2)}%`
109
+ '--lm-before-after-ratio': `${roundedRatio}`
110
110
  };
111
111
  return _jsxs("div", { ref: rootRef, className: rootClss, onMouseDown: handlePointerDown, onMouseMove: handleMouseMove, onMouseUp: handleMouseUp, onTouchStart: handlePointerDown, onTouchMove: handleTouchMove, onTouchEnd: handleTouchEnd, style: { ...customProps }, "data-ratio": roundedRatio, children: [_jsx("div", { className: c('before'), children: before }), _jsx("div", { className: c('after'), children: after }), _jsx("div", { className: c('separator') }), children] });
112
112
  };
@@ -43,6 +43,8 @@ export type Props = PropsWithChildren<WithClassName<{
43
43
  * - `opened` — the drawer is open.
44
44
  * - `closed` — the drawer is closed.
45
45
  *
46
+ * - `--measured` — the content has been measured, so the properties below are set.
47
+ *
46
48
  * ### CSS elements
47
49
  * - `opener`
48
50
  * - `closer`
@@ -54,8 +56,8 @@ export type Props = PropsWithChildren<WithClassName<{
54
56
  * Absent until the first measurement lands.
55
57
  *
56
58
  * ### Data attributes on the root element
57
- * - `data-content-width`, `data-content-height` — the measured content size.
58
59
  * Absent until the first measurement lands.
60
+ * - `data-content-width`, `data-content-height` — the measured content size.
59
61
  *
60
62
  * @param props - Component properties.
61
63
  * @see {@link Props}
@@ -15,6 +15,8 @@ import cssModule from './styles.module.css';
15
15
  * - `opened` — the drawer is open.
16
16
  * - `closed` — the drawer is closed.
17
17
  *
18
+ * - `--measured` — the content has been measured, so the properties below are set.
19
+ *
18
20
  * ### CSS elements
19
21
  * - `opener`
20
22
  * - `closer`
@@ -26,8 +28,8 @@ import cssModule from './styles.module.css';
26
28
  * Absent until the first measurement lands.
27
29
  *
28
30
  * ### Data attributes on the root element
29
- * - `data-content-width`, `data-content-height` — the measured content size.
30
31
  * Absent until the first measurement lands.
32
+ * - `data-content-width`, `data-content-height` — the measured content size.
31
33
  *
32
34
  * @param props - Component properties.
33
35
  * @see {@link Props}
@@ -71,7 +73,8 @@ export const Drawer = ({ openerContent, closerContent, defaultIsOpened = false,
71
73
  const c = clss(publicClassName, { cssModule });
72
74
  const rootClss = mergeClassNames(c(null, {
73
75
  'opened': isOpened,
74
- 'closed': !isOpened
76
+ 'closed': !isOpened,
77
+ measured: contentDimensions !== undefined
75
78
  }), className);
76
79
  const openerClss = c('opener');
77
80
  const closerClss = c('closer');
@@ -24,6 +24,10 @@ export type Props = WithClassName<{
24
24
  * The parent component updates the iframe height via React state and `style`
25
25
  * prop (no direct DOM mutation).
26
26
  *
27
+ * ### Root element modifiers
28
+ * - `--auto-height` — the component is listening for a height from inside the frame.
29
+ * - `--measured` — one has arrived, and the frame is sized to it.
30
+ *
27
31
  * @param props - Component properties.
28
32
  * @see {@link Props}
29
33
  */
@@ -33,6 +33,10 @@ const innerAutoHeightNotifier = (messageType) => `<script>
33
33
  * The parent component updates the iframe height via React state and `style`
34
34
  * prop (no direct DOM mutation).
35
35
  *
36
+ * ### Root element modifiers
37
+ * - `--auto-height` — the component is listening for a height from inside the frame.
38
+ * - `--measured` — one has arrived, and the frame is sized to it.
39
+ *
36
40
  * @param props - Component properties.
37
41
  * @see {@link Props}
38
42
  */
@@ -68,7 +72,10 @@ export const Iframe = ({ autoHeight = false, className, srcDoc, style, ...iframe
68
72
  return { ...base, height: `${height}px` };
69
73
  }, [style, autoHeight, height]);
70
74
  const c = clss(publicClassName, { cssModule });
71
- const rootClss = mergeClassNames(c(), className);
75
+ const rootClss = mergeClassNames(c(null, {
76
+ 'auto-height': autoHeight,
77
+ measured: height !== null
78
+ }), className);
72
79
  const html = useMemo(() => {
73
80
  const autoHeightScript = autoHeight
74
81
  ? innerAutoHeightNotifier(innerMessageType)
@@ -23,6 +23,10 @@ export type Props = InputHTMLAttributes<HTMLInputElement> & WithClassName<{
23
23
  * A stable auto-generated `id` is created on mount and used to associate the
24
24
  * rendered label through the `htmlFor` attribute.
25
25
  *
26
+ * ### Root element modifiers
27
+ * - `--controlled` — the value comes from the parent, not from inside.
28
+ * - `--empty` / `--filled` — whether the current value is the empty string.
29
+ *
26
30
  * ### CSS elements
27
31
  * - `label`
28
32
  * - `error`
@@ -15,6 +15,10 @@ import cssModule from './styles.module.css';
15
15
  * A stable auto-generated `id` is created on mount and used to associate the
16
16
  * rendered label through the `htmlFor` attribute.
17
17
  *
18
+ * ### Root element modifiers
19
+ * - `--controlled` — the value comes from the parent, not from inside.
20
+ * - `--empty` / `--filled` — whether the current value is the empty string.
21
+ *
18
22
  * ### CSS elements
19
23
  * - `label`
20
24
  * - `error`
@@ -44,6 +48,10 @@ export const Input = ({ label, error, value, defaultValue, onChange, className,
44
48
  };
45
49
  // Rendering
46
50
  const c = clss(publicClassName, { cssModule });
47
- const rootClss = mergeClassNames(c(), className);
51
+ const rootClss = mergeClassNames(c(null, {
52
+ controlled: isControlled,
53
+ empty: currentValue === '',
54
+ filled: currentValue !== ''
55
+ }), className);
48
56
  return _jsxs(_Fragment, { children: [isNotFalsy(label) && _jsx("label", { className: c('label'), htmlFor: id, children: label }), _jsx("input", { ...rest, id: id, className: rootClss, value: currentValue, onChange: handleChange }), isNotFalsy(error) && _jsx("span", { className: c('error'), children: error })] });
49
57
  };
@@ -60,6 +60,9 @@ export type Props<T> = WithClassName<ViewportObserverOptions & {
60
60
  * - in place of each page missing between two loaded pages,
61
61
  * - after the last loaded page, unless it is already `lastPagePos`.
62
62
  *
63
+ * ### Root element modifiers
64
+ * - `--loading` — at least one page is being fetched.
65
+ *
63
66
  * ### CSS elements
64
67
  * - `item` — wraps each rendered item. Carries `data-page`.
65
68
  * - `load` — a load button. Rendered empty, so its label belongs in CSS.
@@ -19,6 +19,9 @@ import cssModule from './styles.module.css';
19
19
  * - in place of each page missing between two loaded pages,
20
20
  * - after the last loaded page, unless it is already `lastPagePos`.
21
21
  *
22
+ * ### Root element modifiers
23
+ * - `--loading` — at least one page is being fetched.
24
+ *
22
25
  * ### CSS elements
23
26
  * - `item` — wraps each rendered item. Carries `data-page`.
24
27
  * - `load` — a load button. Rendered empty, so its label belongs in CSS.
@@ -78,7 +81,7 @@ export const ControlledListLoader = ({ className, pages, firstPagePos, lastPageP
78
81
  .filter(pagePos => inBoundsPages.includes(pagePos))
79
82
  .sort((a, b) => a - b);
80
83
  const c = clss(publicClassName, { cssModule });
81
- const rootClss = mergeClassNames(c(), className);
84
+ const rootClss = mergeClassNames(c(null, { loading: sortedLoadingPages.length > 0 }), className);
82
85
  const renderLoadButton = (pagePos, kind) => {
83
86
  const button = _jsx("button", { className: c('load', kind), "data-page": pagePos, onClick: () => onLoadPageClicked?.(pagePos) }, `load/${pagePos}`);
84
87
  const autoLoads = (kind === 'prev' && autoLoadPrevWhenVisible === true)
@@ -25,7 +25,9 @@ type DirectionState = 'forwards' | 'backwards' | null;
25
25
  *
26
26
  * @property thresholdOffsetPercent - Optional percentage offset used to compute
27
27
  * the {@link IntersectionObserver} root margin. Determines how far into the viewport
28
- * a page must be before it is considered `'curr'`. Defaults to `0`.
28
+ * a page must be before it is considered `'curr'`. Defaults to `0`. Clamped to
29
+ * 0–100, with a `console.warn` naming the value received — outside that range the
30
+ * root margin is invalid and the observer would throw.
29
31
  *
30
32
  * @property onDirectionChanged - Called after the scroll direction changed, with
31
33
  * the new {@link DirectionState}. Repeated scrolls in the same direction do not
@@ -64,7 +66,10 @@ export type Props = PropsWithChildren<WithClassName<{
64
66
  * when the direction actually changes, using an internal ref to avoid stale
65
67
  * closure comparisons.
66
68
  * - Page visibility is tracked via a single {@link IntersectionObserver} instance
67
- * that is recreated when `thresholdOffsetPercent` or `children` change.
69
+ * that is recreated when `thresholdOffsetPercent` or the **number** of children
70
+ * changes. Not on `children` itself: a parent building its child list inline hands
71
+ * over a new array on every render, which would tear down and rebuild one observer
72
+ * per page each time, for nothing.
68
73
  * - `currCount` on each {@link PageState} increments each time a page transitions
69
74
  * into the `'curr'` position, making it useful as a re-entry counter.
70
75
  */