@design-edito/tools 0.5.13 → 0.5.14

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 (51) 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 +1 -1
  4. package/agnostic/colors/index.js +1 -1
  5. package/agnostic/css/index.d.ts +1 -1
  6. package/agnostic/css/index.js +1 -1
  7. package/agnostic/errors/index.d.ts +1 -1
  8. package/agnostic/errors/index.js +1 -1
  9. package/agnostic/html/hyper-json/smart-tags/coalesced/index.d.ts +14 -14
  10. package/agnostic/html/hyper-json/smart-tags/coalesced/index.js +14 -14
  11. package/agnostic/html/hyper-json/smart-tags/isolated/index.d.ts +3 -3
  12. package/agnostic/html/hyper-json/smart-tags/isolated/index.js +3 -3
  13. package/agnostic/html/index.d.ts +1 -1
  14. package/agnostic/html/index.js +1 -1
  15. package/agnostic/index.d.ts +3 -3
  16. package/agnostic/index.js +3 -3
  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/random/index.d.ts +1 -1
  24. package/agnostic/random/index.js +1 -1
  25. package/agnostic/strings/index.d.ts +2 -2
  26. package/agnostic/strings/index.js +2 -2
  27. package/agnostic/subtitles/index.d.ts +1 -1
  28. package/agnostic/subtitles/index.js +1 -1
  29. package/agnostic/time/index.d.ts +1 -1
  30. package/agnostic/time/index.js +1 -1
  31. package/components/Video/index.controlled.d.ts +7 -0
  32. package/components/Video/index.controlled.js +6 -2
  33. package/components/Video/utils.d.ts +19 -17
  34. package/components/Video/utils.js +32 -25
  35. package/node/@aws-s3/storage/file/index.d.ts +1 -1
  36. package/node/@aws-s3/storage/file/index.js +1 -1
  37. package/node/@google-cloud/storage/directory/index.d.ts +1 -1
  38. package/node/@google-cloud/storage/directory/index.js +1 -1
  39. package/node/@google-cloud/storage/file/index.d.ts +3 -3
  40. package/node/@google-cloud/storage/file/index.js +3 -3
  41. package/node/cloud-storage/operations/index.d.ts +1 -1
  42. package/node/cloud-storage/operations/index.js +1 -1
  43. package/node/encryption/@aes-256-gcm/index.d.ts +1 -1
  44. package/node/encryption/@aes-256-gcm/index.js +1 -1
  45. package/node/images/transform/operations/index.d.ts +1 -1
  46. package/node/images/transform/operations/index.js +1 -1
  47. package/node/index.d.ts +1 -1
  48. package/node/index.js +1 -1
  49. package/node/process/index.d.ts +1 -1
  50. package/node/process/index.js +1 -1
  51. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
- export * as dedupe from './dedupe/index.js'
2
1
  export * as findDuplicates from './find-duplicates/index.js'
3
2
  export * as isArrayOf from './is-array-of/index.js'
3
+ export * as dedupe from './dedupe/index.js'
4
4
  export * as make from './make/index.js'
5
- export * as randomPick from './random-pick/index.js'
6
5
  export * as shuffle from './shuffle/index.js'
6
+ export * as randomPick from './random-pick/index.js'
@@ -1,6 +1,6 @@
1
- export * as dedupe from './dedupe/index.js'
2
1
  export * as findDuplicates from './find-duplicates/index.js'
3
2
  export * as isArrayOf from './is-array-of/index.js'
3
+ export * as dedupe from './dedupe/index.js'
4
4
  export * as make from './make/index.js'
5
- export * as randomPick from './random-pick/index.js'
6
5
  export * as shuffle from './shuffle/index.js'
6
+ export * as randomPick from './random-pick/index.js'
@@ -8,5 +8,5 @@ export * as lerp from './lerp/index.js'
8
8
  export * as luminance from './luminance/index.js'
9
9
  export * as palette from './palette/index.js'
10
10
  export * as rotate from './rotate/index.js'
11
- export * as tidy from './tidy/index.js'
12
11
  export * as typechecks from './typechecks/index.js'
12
+ export * as tidy from './tidy/index.js'
@@ -8,5 +8,5 @@ export * as lerp from './lerp/index.js'
8
8
  export * as luminance from './luminance/index.js'
9
9
  export * as palette from './palette/index.js'
10
10
  export * as rotate from './rotate/index.js'
11
- export * as tidy from './tidy/index.js'
12
11
  export * as typechecks from './typechecks/index.js'
12
+ export * as tidy from './tidy/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
3
  export * as generateNiceColor from './generate-nice-color/index.js'
4
- export * as isValidCssClassName from './is-valid-css-class-name/index.js'
5
4
  export * as scale from './scale/index.js'
6
5
  export * as stylesSet from './styles-set/index.js'
6
+ export * as isValidCssClassName from './is-valid-css-class-name/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
3
  export * as generateNiceColor from './generate-nice-color/index.js'
4
- export * as isValidCssClassName from './is-valid-css-class-name/index.js'
5
4
  export * as scale from './scale/index.js'
6
5
  export * as stylesSet from './styles-set/index.js'
6
+ export * as isValidCssClassName from './is-valid-css-class-name/index.js'
@@ -1,2 +1,2 @@
1
- export * as register from './register/index.js'
2
1
  export * as unknownToString from './unknown-to-string/index.js'
2
+ export * as register from './register/index.js'
@@ -1,2 +1,2 @@
1
- export * as register from './register/index.js'
2
1
  export * as unknownToString from './unknown-to-string/index.js'
2
+ export * as register from './register/index.js'
@@ -1,52 +1,52 @@
1
- export * as addclass from './addclass/index.js'
2
1
  export * as add from './add/index.js'
2
+ export * as addclass from './addclass/index.js'
3
3
  export * as and from './and/index.js'
4
4
  export * as append from './append/index.js'
5
5
  export * as at from './at/index.js'
6
+ export * as call from './call/index.js'
6
7
  export * as clone from './clone/index.js'
7
8
  export * as deleteproperties from './deleteproperties/index.js'
8
- export * as call from './call/index.js'
9
9
  export * as equals from './equals/index.js'
10
10
  export * as getattribute from './getattribute/index.js'
11
11
  export * as getproperty from './getproperty/index.js'
12
+ export * as getproperties from './getproperties/index.js'
12
13
  export * as hjparse from './hjparse/index.js'
13
14
  export * as hjstringify from './hjstringify/index.js'
14
15
  export * as if from './if/index.js'
16
+ export * as initialize from './initialize/index.js'
15
17
  export * as join from './join/index.js'
16
- export * as getproperties from './getproperties/index.js'
17
18
  export * as length from './length/index.js'
18
19
  export * as map from './map/index.js'
19
- export * as initialize from './initialize/index.js'
20
20
  export * as negate from './negate/index.js'
21
+ export * as notrailing from './notrailing/index.js'
21
22
  export * as or from './or/index.js'
22
23
  export * as pickrandom from './pickrandom/index.js'
23
24
  export * as populate from './populate/index.js'
24
- export * as print from './print/index.js'
25
25
  export * as push from './push/index.js'
26
+ export * as print from './print/index.js'
26
27
  export * as pusheach from './pusheach/index.js'
27
28
  export * as recordtoarray from './recordtoarray/index.js'
28
- export * as notrailing from './notrailing/index.js'
29
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
32
  export * as replace from './replace/index.js'
33
- export * as select from './select/index.js'
34
33
  export * as set from './set/index.js'
35
- export * as setproperty from './setproperty/index.js'
34
+ export * as select from './select/index.js'
36
35
  export * as setattribute from './setattribute/index.js'
36
+ export * as setproperty from './setproperty/index.js'
37
37
  export * as split from './split/index.js'
38
- export * as sorton from './sorton/index.js'
39
- export * as toarray from './toarray/index.js'
40
38
  export * as spread from './spread/index.js'
39
+ export * as toarray from './toarray/index.js'
41
40
  export * as toboolean from './toboolean/index.js'
42
- export * as toelement from './toelement/index.js'
43
41
  export * as toggleclass from './toggleclass/index.js'
42
+ export * as toelement from './toelement/index.js'
44
43
  export * as tonodelist from './tonodelist/index.js'
45
- export * as tonull from './tonull/index.js'
46
44
  export * as tonumber from './tonumber/index.js'
45
+ export * as sorton from './sorton/index.js'
46
+ export * as tonull from './tonull/index.js'
47
47
  export * as toref from './toref/index.js'
48
- export * as torecord from './torecord/index.js'
49
48
  export * as tostring from './tostring/index.js'
50
- export * as totext from './totext/index.js'
51
49
  export * as transformselected from './transformselected/index.js'
50
+ export * as totext from './totext/index.js'
52
51
  export * as trim from './trim/index.js'
52
+ export * as torecord from './torecord/index.js'
@@ -1,52 +1,52 @@
1
- export * as addclass from './addclass/index.js'
2
1
  export * as add from './add/index.js'
2
+ export * as addclass from './addclass/index.js'
3
3
  export * as and from './and/index.js'
4
4
  export * as append from './append/index.js'
5
5
  export * as at from './at/index.js'
6
+ export * as call from './call/index.js'
6
7
  export * as clone from './clone/index.js'
7
8
  export * as deleteproperties from './deleteproperties/index.js'
8
- export * as call from './call/index.js'
9
9
  export * as equals from './equals/index.js'
10
10
  export * as getattribute from './getattribute/index.js'
11
11
  export * as getproperty from './getproperty/index.js'
12
+ export * as getproperties from './getproperties/index.js'
12
13
  export * as hjparse from './hjparse/index.js'
13
14
  export * as hjstringify from './hjstringify/index.js'
14
15
  export * as if from './if/index.js'
16
+ export * as initialize from './initialize/index.js'
15
17
  export * as join from './join/index.js'
16
- export * as getproperties from './getproperties/index.js'
17
18
  export * as length from './length/index.js'
18
19
  export * as map from './map/index.js'
19
- export * as initialize from './initialize/index.js'
20
20
  export * as negate from './negate/index.js'
21
+ export * as notrailing from './notrailing/index.js'
21
22
  export * as or from './or/index.js'
22
23
  export * as pickrandom from './pickrandom/index.js'
23
24
  export * as populate from './populate/index.js'
24
- export * as print from './print/index.js'
25
25
  export * as push from './push/index.js'
26
+ export * as print from './print/index.js'
26
27
  export * as pusheach from './pusheach/index.js'
27
28
  export * as recordtoarray from './recordtoarray/index.js'
28
- export * as notrailing from './notrailing/index.js'
29
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
32
  export * as replace from './replace/index.js'
33
- export * as select from './select/index.js'
34
33
  export * as set from './set/index.js'
35
- export * as setproperty from './setproperty/index.js'
34
+ export * as select from './select/index.js'
36
35
  export * as setattribute from './setattribute/index.js'
36
+ export * as setproperty from './setproperty/index.js'
37
37
  export * as split from './split/index.js'
38
- export * as sorton from './sorton/index.js'
39
- export * as toarray from './toarray/index.js'
40
38
  export * as spread from './spread/index.js'
39
+ export * as toarray from './toarray/index.js'
41
40
  export * as toboolean from './toboolean/index.js'
42
- export * as toelement from './toelement/index.js'
43
41
  export * as toggleclass from './toggleclass/index.js'
42
+ export * as toelement from './toelement/index.js'
44
43
  export * as tonodelist from './tonodelist/index.js'
45
- export * as tonull from './tonull/index.js'
46
44
  export * as tonumber from './tonumber/index.js'
45
+ export * as sorton from './sorton/index.js'
46
+ export * as tonull from './tonull/index.js'
47
47
  export * as toref from './toref/index.js'
48
- export * as torecord from './torecord/index.js'
49
48
  export * as tostring from './tostring/index.js'
50
- export * as totext from './totext/index.js'
51
49
  export * as transformselected from './transformselected/index.js'
50
+ export * as totext from './totext/index.js'
52
51
  export * as trim from './trim/index.js'
52
+ export * as torecord from './torecord/index.js'
@@ -1,12 +1,12 @@
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'
5
- export * as get from './get/index.js'
6
4
  export * as guess from './guess/index.js'
5
+ export * as get from './get/index.js'
6
+ export * as element from './element/index.js'
7
7
  export * as nodelist from './nodelist/index.js'
8
- export * as null from './null/index.js'
9
8
  export * as number from './number/index.js'
9
+ export * as null from './null/index.js'
10
10
  export * as record from './record/index.js'
11
11
  export * as ref from './ref/index.js'
12
12
  export * as string from './string/index.js'
@@ -1,12 +1,12 @@
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'
5
- export * as get from './get/index.js'
6
4
  export * as guess from './guess/index.js'
5
+ export * as get from './get/index.js'
6
+ export * as element from './element/index.js'
7
7
  export * as nodelist from './nodelist/index.js'
8
- export * as null from './null/index.js'
9
8
  export * as number from './number/index.js'
9
+ export * as null from './null/index.js'
10
10
  export * as record from './record/index.js'
11
11
  export * as ref from './ref/index.js'
12
12
  export * as string from './string/index.js'
@@ -4,7 +4,7 @@ export * as getPositionInsideParent from './get-position-inside-parent/index.js'
4
4
  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
- export * as selectorToElement from './selector-to-element/index.js'
8
7
  export * as replaceInElement from './replace-in-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'
@@ -4,7 +4,7 @@ export * as getPositionInsideParent from './get-position-inside-parent/index.js'
4
4
  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
- export * as selectorToElement from './selector-to-element/index.js'
8
7
  export * as replaceInElement from './replace-in-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,9 +1,9 @@
1
- export * as booleans from './booleans/index.js'
2
1
  export * as arrays from './arrays/index.js'
2
+ export * as booleans from './booleans/index.js'
3
3
  export * as colors from './colors/index.js'
4
4
  export * as css from './css/index.js'
5
- export * as errors from './errors/index.js'
6
5
  export * as html from './html/index.js'
6
+ export * as errors from './errors/index.js'
7
7
  export * as misc from './misc/index.js'
8
8
  export * as numbers from './numbers/index.js'
9
9
  export * as objects from './objects/index.js'
@@ -12,6 +12,6 @@ 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
14
  export * as strings from './strings/index.js'
15
- export * as subtitles from './subtitles/index.js'
16
15
  export * as time from './time/index.js'
16
+ export * as subtitles from './subtitles/index.js'
17
17
  export * as typescript from './typescript/index.js'
package/agnostic/index.js CHANGED
@@ -1,9 +1,9 @@
1
- export * as booleans from './booleans/index.js'
2
1
  export * as arrays from './arrays/index.js'
2
+ export * as booleans from './booleans/index.js'
3
3
  export * as colors from './colors/index.js'
4
4
  export * as css from './css/index.js'
5
- export * as errors from './errors/index.js'
6
5
  export * as html from './html/index.js'
6
+ export * as errors from './errors/index.js'
7
7
  export * as misc from './misc/index.js'
8
8
  export * as numbers from './numbers/index.js'
9
9
  export * as objects from './objects/index.js'
@@ -12,6 +12,6 @@ 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
14
  export * as strings from './strings/index.js'
15
- export * as subtitles from './subtitles/index.js'
16
15
  export * as time from './time/index.js'
16
+ export * as subtitles from './subtitles/index.js'
17
17
  export * as typescript from './typescript/index.js'
@@ -1,11 +1,11 @@
1
- export * as assert from './assert/index.js'
2
1
  export * as cast from './cast/index.js'
3
2
  export * as connection from './connection/index.js'
4
3
  export * as crawler from './crawler/index.js'
5
- export * as crossenv from './crossenv/index.js'
4
+ export * as assert from './assert/index.js'
6
5
  export * as dataSize from './data-size/index.js'
7
- export * as isConstructorFunction from './is-constructor-function/index.js'
8
6
  export * as isNullish from './is-nullish/index.js'
7
+ export * as crossenv from './crossenv/index.js'
8
+ export * as isConstructorFunction from './is-constructor-function/index.js'
9
9
  export * as logs from './logs/index.js'
10
10
  export * as loremIpsum from './lorem-ipsum/index.js'
11
11
  export * as normalizeExtension from './normalize-extension/index.js'
@@ -1,11 +1,11 @@
1
- export * as assert from './assert/index.js'
2
1
  export * as cast from './cast/index.js'
3
2
  export * as connection from './connection/index.js'
4
3
  export * as crawler from './crawler/index.js'
5
- export * as crossenv from './crossenv/index.js'
4
+ export * as assert from './assert/index.js'
6
5
  export * as dataSize from './data-size/index.js'
7
- export * as isConstructorFunction from './is-constructor-function/index.js'
8
6
  export * as isNullish from './is-nullish/index.js'
7
+ export * as crossenv from './crossenv/index.js'
8
+ export * as isConstructorFunction from './is-constructor-function/index.js'
9
9
  export * as logs from './logs/index.js'
10
10
  export * as loremIpsum from './lorem-ipsum/index.js'
11
11
  export * as normalizeExtension from './normalize-extension/index.js'
@@ -1,6 +1,6 @@
1
1
  export * as absoluteModulo from './absolute-modulo/index.js'
2
- export * as approximateRational from './approximate-rational/index.js'
3
2
  export * as clamp from './clamp/index.js'
4
- export * as interpolate from './interpolate/index.js'
3
+ export * as approximateRational from './approximate-rational/index.js'
5
4
  export * as geometricProgressions from './geometric-progressions/index.js'
6
5
  export * as round from './round/index.js'
6
+ export * as interpolate from './interpolate/index.js'
@@ -1,6 +1,6 @@
1
1
  export * as absoluteModulo from './absolute-modulo/index.js'
2
- export * as approximateRational from './approximate-rational/index.js'
3
2
  export * as clamp from './clamp/index.js'
4
- export * as interpolate from './interpolate/index.js'
3
+ export * as approximateRational from './approximate-rational/index.js'
5
4
  export * as geometricProgressions from './geometric-progressions/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
- export * as flattenGetters from './flatten-getters/index.js'
3
2
  export * as enums from './enums/index.js'
4
- export * as isRecord from './is-record/index.js'
3
+ export * as flattenGetters from './flatten-getters/index.js'
5
4
  export * as isObject from './is-object/index.js'
6
5
  export * as recordFormat from './record-format/index.js'
7
- export * as sortKeys from './sort-keys/index.js'
8
6
  export * as recordMap from './record-map/index.js'
7
+ export * as sortKeys from './sort-keys/index.js'
9
8
  export * as validation from './validation/index.js'
9
+ export * as isRecord from './is-record/index.js'
@@ -1,9 +1,9 @@
1
1
  export * as deepGetProperty from './deep-get-property/index.js'
2
- export * as flattenGetters from './flatten-getters/index.js'
3
2
  export * as enums from './enums/index.js'
4
- export * as isRecord from './is-record/index.js'
3
+ export * as flattenGetters from './flatten-getters/index.js'
5
4
  export * as isObject from './is-object/index.js'
6
5
  export * as recordFormat from './record-format/index.js'
7
- export * as sortKeys from './sort-keys/index.js'
8
6
  export * as recordMap from './record-map/index.js'
7
+ export * as sortKeys from './sort-keys/index.js'
9
8
  export * as validation from './validation/index.js'
9
+ export * as isRecord from './is-record/index.js'
@@ -1,3 +1,3 @@
1
- export * as hexChar from './hex-char/index.js'
2
1
  export * as random from './random/index.js'
3
2
  export * as uuid from './uuid/index.js'
3
+ export * as hexChar from './hex-char/index.js'
@@ -1,3 +1,3 @@
1
- export * as hexChar from './hex-char/index.js'
2
1
  export * as random from './random/index.js'
3
2
  export * as uuid from './uuid/index.js'
3
+ export * as hexChar from './hex-char/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'
5
+ export * as replaceAll from './replace-all/index.js'
6
6
  export * as toAlphanum from './to-alphanum/index.js'
7
+ export * as splitTrim from './split-trim/index.js'
7
8
  export * as trim from './trim/index.js'
8
- export * as replaceAll from './replace-all/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'
5
+ export * as replaceAll from './replace-all/index.js'
6
6
  export * as toAlphanum from './to-alphanum/index.js'
7
+ export * as splitTrim from './split-trim/index.js'
7
8
  export * as trim from './trim/index.js'
8
- export * as replaceAll from './replace-all/index.js'
@@ -1,2 +1,2 @@
1
- export * as parseSrt from './parse-srt/index.js'
2
1
  export * as srtTimecodeToMs from './srt-timecode-to-ms/index.js'
2
+ export * as parseSrt from './parse-srt/index.js'
@@ -1,2 +1,2 @@
1
- export * as parseSrt from './parse-srt/index.js'
2
1
  export * as srtTimecodeToMs from './srt-timecode-to-ms/index.js'
2
+ export * as parseSrt from './parse-srt/index.js'
@@ -1,5 +1,5 @@
1
1
  export * as dates from './dates/index.js'
2
2
  export * as duration from './duration/index.js'
3
3
  export * as timeout from './timeout/index.js'
4
- export * as transitions from './transitions/index.js'
5
4
  export * as wait from './wait/index.js'
5
+ export * as transitions from './transitions/index.js'
@@ -1,5 +1,5 @@
1
1
  export * as dates from './dates/index.js'
2
2
  export * as duration from './duration/index.js'
3
3
  export * as timeout from './timeout/index.js'
4
- export * as transitions from './transitions/index.js'
5
4
  export * as wait from './wait/index.js'
5
+ export * as transitions from './transitions/index.js'
@@ -85,6 +85,12 @@ type TrackData = {
85
85
  * fullscreen on its own — pressing Escape, typically — with the new state. This is
86
86
  * the signal a parent needs to update its `fullscreen` prop, and it is distinct
87
87
  * from `onIsFullscreenChanged`, which merely echoes that prop back once changed.
88
+ * @property timeFormat - How the two clocks are written, as a {@link formatTime}
89
+ * pattern. Tokens go in `{{…}}` and the rest is literal, so `'{{m}} min {{ss}}'` is a
90
+ * valid answer. Defaults to `'{{mm}}:{{ss}}:{{ms}}'` — milliseconds included, which is
91
+ * what a cutting room wants and almost never what an article does: `'{{mm}}:{{ss}}'` is
92
+ * the usual one. Frames (`{{frame}}`, `{{f}}`) are derived at 25 fps, not configurable
93
+ * here.
88
94
  * @property className - Additional CSS class for the root element.
89
95
  * @property children - React content inserted into the <video> tag (fallback, etc).
90
96
  *
@@ -105,6 +111,7 @@ export type Props = PropsWithChildren<WithClassName<{
105
111
  mute?: boolean;
106
112
  playbackRate?: number;
107
113
  currentTimeMs?: number;
114
+ timeFormat?: string;
108
115
  onPlayButtonClicked?: (e: React.MouseEvent<HTMLButtonElement>, isPlaying: boolean, video: HTMLVideoElement | null) => void;
109
116
  onPauseButtonClicked?: (e: React.MouseEvent<HTMLButtonElement>, isPlaying: boolean, video: HTMLVideoElement | null) => void;
110
117
  onLoudButtonClicked?: (e: React.MouseEvent<HTMLButtonElement>, isLoud: boolean, video: HTMLVideoElement | null) => void;
@@ -49,7 +49,11 @@ import { forceExitFullscreen, forceFullscreen, forceLoud, forceMute, forcePause,
49
49
  * @returns A `<figure>` element containing the video, its controls, optional
50
50
  * subtitles.
51
51
  */
52
- export const ControlledVideo = ({ sources, tracks, subtitles, playBtnContent, pauseBtnContent, loudBtnContent, muteBtnContent, fullscreenBtnContent, play, fullscreen, mute, muted, volume = 1, playbackRate = 1, currentTimeMs: givenCurrentTimeMs, onPlayButtonClicked, onPauseButtonClicked, onLoudButtonClicked, onMuteButtonClicked, onVolumeRangeChanged, onRateRangeChanged, onFullscreenButtonClicked, onTimelineClicked, onIsPlayingChanged, onIsFullscreenChanged, onIsLoudChanged, onIsEndedChanged, onVolumeChanged, onPlaybackRateChanged, onCurrentTimeMsChanged, onFullscreenChange, children, className, ...intrinsicVideoAttributes }) => {
52
+ export const ControlledVideo = ({ sources, tracks, subtitles, playBtnContent, pauseBtnContent, loudBtnContent, muteBtnContent, fullscreenBtnContent, play, fullscreen, mute, muted, volume = 1, playbackRate = 1, currentTimeMs: givenCurrentTimeMs,
53
+ // Milliseconds by default, which is what this component has always rendered — a
54
+ // default that changes under a consumer is a change nobody asked for. An article
55
+ // usually wants `'{{mm}}:{{ss}}'` and says so.
56
+ timeFormat = '{{mm}}:{{ss}}:{{ms}}', onPlayButtonClicked, onPauseButtonClicked, onLoudButtonClicked, onMuteButtonClicked, onVolumeRangeChanged, onRateRangeChanged, onFullscreenButtonClicked, onTimelineClicked, onIsPlayingChanged, onIsFullscreenChanged, onIsLoudChanged, onIsEndedChanged, onVolumeChanged, onPlaybackRateChanged, onCurrentTimeMsChanged, onFullscreenChange, children, className, ...intrinsicVideoAttributes }) => {
53
57
  const videoRef = useRef(null);
54
58
  const [totalTime, setTotalTime] = useState(0);
55
59
  const totalTimeMs = useMemo(() => secondsToMs(totalTime), [totalTime]);
@@ -302,5 +306,5 @@ export const ControlledVideo = ({ sources, tracks, subtitles, playBtnContent, pa
302
306
  ? _jsx("source", { src: source }, index)
303
307
  : _jsx("source", { src: source.src, type: source.type }, index)), parsedTracks.map((track, index) => typeof track === 'string'
304
308
  ? _jsx("track", { src: track }, index)
305
- : _jsx("track", { src: track.src, kind: track.kind, srcLang: track.srclang, label: track.label, default: track.default }, index)), children] }), _jsxs("div", { className: videoControlsClss, children: [_jsx("button", { className: playBtnClss, onClick: handlePlayButtonClick, children: playBtnContent }), _jsx("button", { className: pauseBtnClss, onClick: handlePauseButtonClick, children: pauseBtnContent }), _jsx("button", { className: loudBtnClss, onClick: handleLoudButtonClick, children: loudBtnContent }), _jsx("button", { className: muteBtnClss, onClick: handleMuteButtonClick, children: muteBtnContent }), _jsx("input", { type: 'range', className: volumeRangeClss, value: volumePercent, onChange: handleVolumeRangeChange, min: 0, max: 100, step: 1 }), _jsx("span", { className: volumePcntClss, children: Math.round(volumePercent) }), _jsx("button", { className: fullscreenBtnClss, onClick: handleFullscreenButtonClick, children: fullscreenBtnContent }), _jsx("input", { type: 'range', className: playbackRateRangeClss, value: playbackRate, onChange: handleRateRangeChange, min: 0.25, max: 4, step: 0.25 }), _jsx("span", { className: playbackRateClss, children: playbackRate })] }), _jsxs("div", { className: timeControlsClss, children: [_jsx("span", { className: currentTimeClss, children: formatTime(currentTimeMs, 'mm:ss:ms') }), _jsx("span", { className: totalTimeClss, children: formatTime(totalTimeMs, 'mm:ss:ms') }), _jsx("div", { className: timelineClss, onClick: handleTimelineClick })] }), subtitles !== undefined && _jsx(Subtitles, { ...subtitles, timecodeMs: currentTimeMs, isEnded: isEnded })] });
309
+ : _jsx("track", { src: track.src, kind: track.kind, srcLang: track.srclang, label: track.label, default: track.default }, index)), children] }), _jsxs("div", { className: videoControlsClss, children: [_jsx("button", { className: playBtnClss, onClick: handlePlayButtonClick, children: playBtnContent }), _jsx("button", { className: pauseBtnClss, onClick: handlePauseButtonClick, children: pauseBtnContent }), _jsx("button", { className: loudBtnClss, onClick: handleLoudButtonClick, children: loudBtnContent }), _jsx("button", { className: muteBtnClss, onClick: handleMuteButtonClick, children: muteBtnContent }), _jsx("input", { type: 'range', className: volumeRangeClss, value: volumePercent, onChange: handleVolumeRangeChange, min: 0, max: 100, step: 1 }), _jsx("span", { className: volumePcntClss, children: Math.round(volumePercent) }), _jsx("button", { className: fullscreenBtnClss, onClick: handleFullscreenButtonClick, children: fullscreenBtnContent }), _jsx("input", { type: 'range', className: playbackRateRangeClss, value: playbackRate, onChange: handleRateRangeChange, min: 0.25, max: 4, step: 0.25 }), _jsx("span", { className: playbackRateClss, children: playbackRate })] }), _jsxs("div", { className: timeControlsClss, children: [_jsx("span", { className: currentTimeClss, children: formatTime(currentTimeMs, timeFormat) }), _jsx("span", { className: totalTimeClss, children: formatTime(totalTimeMs, timeFormat) }), _jsx("div", { className: timelineClss, onClick: handleTimelineClick })] }), subtitles !== undefined && _jsx(Subtitles, { ...subtitles, timecodeMs: currentTimeMs, isEnded: isEnded })] });
306
310
  };
@@ -20,33 +20,35 @@ export declare const forceFullscreen: (video: HTMLVideoElement | null) => Promis
20
20
  export declare const forceExitFullscreen: (video: HTMLVideoElement | null) => Promise<boolean>;
21
21
  export declare function secondsToMs(seconds: number): number;
22
22
  export declare function msToSeconds(ms: number): number;
23
+ /** The fields {@link formatTime} knows how to render. */
24
+ export type TimeToken = 'hh' | 'mm' | 'ss' | 'ms' | 'frame' | 'h' | 'm' | 's' | 'f';
23
25
  /**
24
26
  * Renders a duration into a caller-defined pattern.
25
27
  *
26
- * The pattern is a free-form string in which the following tokens are replaced,
27
- * longest first, so that `mm` is consumed before `m`:
28
+ * Tokens are wrapped in `{{…}}` and everything outside them is literal, so a pattern
29
+ * may carry words: `'{{m}} min {{ss}}'` renders as `'1 min 05'`.
28
30
  *
29
- * - `hh`, `mm`, `ss` — hours, minutes and seconds, zero-padded to two digits.
30
- * - `ms` — the remaining milliseconds, zero-padded to three digits.
31
- * - `frame` — the remaining milliseconds expressed in frames, zero-padded to two
32
- * digits.
33
- * - `h`, `m`, `s`, `f` — the same four values, unpadded.
31
+ * - `{{hh}}`, `{{mm}}`, `{{ss}}` — hours, minutes and seconds, zero-padded to two digits.
32
+ * - `{{ms}}` — the remaining milliseconds, zero-padded to three digits.
33
+ * - `{{frame}}` — those milliseconds expressed in frames, zero-padded to two digits.
34
+ * - `{{h}}`, `{{m}}`, `{{s}}`, `{{f}}` — the same four values, unpadded.
34
35
  *
35
36
  * @param ms - The duration, in milliseconds.
36
- * @param format - The pattern to fill, e.g. `'mm:ss:ms'`.
37
+ * @param format - The pattern to fill, e.g. `'{{mm}}:{{ss}}'`.
37
38
  * @param fps - Frame rate used to derive the `frame` and `f` tokens. Defaults to `25`.
38
- * @returns The formatted duration.
39
+ * @returns The formatted duration. An unknown token is left as written, braces
40
+ * included, rather than silently blanked — a typo has to be visible.
39
41
  *
40
42
  * @remarks
41
- * Every field is a remainder of the one above it, never a total: at one hour and
42
- * a half, `mm` is `30`, not `90`. A pattern that omits `hh` therefore loses the
43
- * hours rather than folding them into the minutes.
43
+ * Every field is a remainder of the one above it, never a total: at one hour and a half,
44
+ * `{{mm}}` is `30`, not `90`. A pattern that omits `{{hh}}` therefore loses the hours
45
+ * rather than folding them into the minutes.
44
46
  *
45
- * Since `h`, `m`, `s` and `f` are tokens on their own, **every** occurrence of
46
- * those letters is substituted, wherever it sits: `'mm min ss'` renders as
47
- * `'01 1in 01'`. Separate the fields with punctuation. This is what
48
- * `agnostic/time/dates/format-date` avoids by delimiting its tokens with
49
- * `{{…}}` — worth aligning on the day this one is made public.
47
+ * **The delimiters are what make the pattern free-form.** Until they existed, `h`, `m`,
48
+ * `s` and `f` were tokens on their own and every occurrence of those letters was
49
+ * substituted wherever it sat — `'mm min ss'` rendered as `'01 1in 01'`, so a pattern
50
+ * could only ever separate its fields with punctuation. That is why the format could not
51
+ * be exposed as a prop: doing so would have published the trap.
50
52
  */
51
53
  export declare function formatTime(ms: number, format: string, fps?: number): string;
52
54
  /**
@@ -107,33 +107,37 @@ export function secondsToMs(seconds) {
107
107
  export function msToSeconds(ms) {
108
108
  return ms / 1000;
109
109
  }
110
+ // Alternation is ordered and the first branch that fits wins, so the longest tokens
111
+ // come first — the same regexp shape, and the same reason, as
112
+ // `agnostic/time/dates/format-date`.
113
+ const timeTokenRegexp = /\{\{(frame|hh|mm|ss|ms|h|m|s|f)\}\}/gv;
110
114
  /**
111
115
  * Renders a duration into a caller-defined pattern.
112
116
  *
113
- * The pattern is a free-form string in which the following tokens are replaced,
114
- * longest first, so that `mm` is consumed before `m`:
117
+ * Tokens are wrapped in `{{…}}` and everything outside them is literal, so a pattern
118
+ * may carry words: `'{{m}} min {{ss}}'` renders as `'1 min 05'`.
115
119
  *
116
- * - `hh`, `mm`, `ss` — hours, minutes and seconds, zero-padded to two digits.
117
- * - `ms` — the remaining milliseconds, zero-padded to three digits.
118
- * - `frame` — the remaining milliseconds expressed in frames, zero-padded to two
119
- * digits.
120
- * - `h`, `m`, `s`, `f` — the same four values, unpadded.
120
+ * - `{{hh}}`, `{{mm}}`, `{{ss}}` — hours, minutes and seconds, zero-padded to two digits.
121
+ * - `{{ms}}` — the remaining milliseconds, zero-padded to three digits.
122
+ * - `{{frame}}` — those milliseconds expressed in frames, zero-padded to two digits.
123
+ * - `{{h}}`, `{{m}}`, `{{s}}`, `{{f}}` — the same four values, unpadded.
121
124
  *
122
125
  * @param ms - The duration, in milliseconds.
123
- * @param format - The pattern to fill, e.g. `'mm:ss:ms'`.
126
+ * @param format - The pattern to fill, e.g. `'{{mm}}:{{ss}}'`.
124
127
  * @param fps - Frame rate used to derive the `frame` and `f` tokens. Defaults to `25`.
125
- * @returns The formatted duration.
128
+ * @returns The formatted duration. An unknown token is left as written, braces
129
+ * included, rather than silently blanked — a typo has to be visible.
126
130
  *
127
131
  * @remarks
128
- * Every field is a remainder of the one above it, never a total: at one hour and
129
- * a half, `mm` is `30`, not `90`. A pattern that omits `hh` therefore loses the
130
- * hours rather than folding them into the minutes.
132
+ * Every field is a remainder of the one above it, never a total: at one hour and a half,
133
+ * `{{mm}}` is `30`, not `90`. A pattern that omits `{{hh}}` therefore loses the hours
134
+ * rather than folding them into the minutes.
131
135
  *
132
- * Since `h`, `m`, `s` and `f` are tokens on their own, **every** occurrence of
133
- * those letters is substituted, wherever it sits: `'mm min ss'` renders as
134
- * `'01 1in 01'`. Separate the fields with punctuation. This is what
135
- * `agnostic/time/dates/format-date` avoids by delimiting its tokens with
136
- * `{{…}}` — worth aligning on the day this one is made public.
136
+ * **The delimiters are what make the pattern free-form.** Until they existed, `h`, `m`,
137
+ * `s` and `f` were tokens on their own and every occurrence of those letters was
138
+ * substituted wherever it sat — `'mm min ss'` rendered as `'01 1in 01'`, so a pattern
139
+ * could only ever separate its fields with punctuation. That is why the format could not
140
+ * be exposed as a prop: doing so would have published the trap.
137
141
  */
138
142
  export function formatTime(ms, format, fps = 25) {
139
143
  const totalSeconds = Math.floor(ms / 1000);
@@ -142,21 +146,24 @@ export function formatTime(ms, format, fps = 25) {
142
146
  const seconds = Math.floor(totalSeconds % 60);
143
147
  const frames = Math.floor(((ms % 1000) / 1000) * fps);
144
148
  const msRest = Math.floor(ms % 1000);
149
+ // Typed by {@link TimeToken} so the table and the regexp above cannot fall out of step,
150
+ // then read through a widened view: the capture is a `string` as far as the compiler
151
+ // knows, and widening is what lets it be looked up without asserting it back.
145
152
  const tokens = {
146
153
  hh: String(hours).padStart(2, '0'),
147
154
  mm: String(minutes).padStart(2, '0'),
148
155
  ss: String(seconds).padStart(2, '0'),
149
156
  frame: String(frames).padStart(2, '0'),
150
157
  ms: String(msRest).padStart(3, '0'),
151
- h: hours,
152
- m: minutes,
153
- s: seconds,
154
- f: frames
158
+ h: String(hours),
159
+ m: String(minutes),
160
+ s: String(seconds),
161
+ f: String(frames)
155
162
  };
156
- return Object
157
- .keys(tokens)
158
- .sort((a, b) => b.length - a.length)
159
- .reduce((acc, t) => acc.replace(new RegExp(t, 'gv'), String(tokens[t])), format);
163
+ const byName = tokens;
164
+ // One pass, so a rendered value can never be re-read as a token by a later pass — the
165
+ // reason the old implementation had to sort its keys by length.
166
+ return format.replace(timeTokenRegexp, (whole, token) => byName[token] ?? whole);
160
167
  }
161
168
  /**
162
169
  * Where along the timeline a click landed.
@@ -1,7 +1,7 @@
1
1
  export * as copy from './copy/index.js'
2
2
  export * as download from './download/index.js'
3
3
  export * as exists from './exists/index.js'
4
- export * as move from './move/index.js'
5
4
  export * as remove from './remove/index.js'
5
+ export * as move from './move/index.js'
6
6
  export * as stat from './stat/index.js'
7
7
  export * as upload from './upload/index.js'
@@ -1,7 +1,7 @@
1
1
  export * as copy from './copy/index.js'
2
2
  export * as download from './download/index.js'
3
3
  export * as exists from './exists/index.js'
4
- export * as move from './move/index.js'
5
4
  export * as remove from './remove/index.js'
5
+ export * as move from './move/index.js'
6
6
  export * as stat from './stat/index.js'
7
7
  export * as upload from './upload/index.js'
@@ -1,4 +1,4 @@
1
1
  export * as copyDir from './copy-dir/index.js'
2
- export * as moveDir from './move-dir/index.js'
3
2
  export * as list from './list/index.js'
3
+ export * as moveDir from './move-dir/index.js'
4
4
  export * as removeDir from './remove-dir/index.js'
@@ -1,4 +1,4 @@
1
1
  export * as copyDir from './copy-dir/index.js'
2
- export * as moveDir from './move-dir/index.js'
3
2
  export * as list from './list/index.js'
3
+ export * as moveDir from './move-dir/index.js'
4
4
  export * as removeDir from './remove-dir/index.js'
@@ -4,9 +4,9 @@ export * as exists from './exists/index.js'
4
4
  export * as generateSignedUrl from './generate-signed-url/index.js'
5
5
  export * as getPermissions from './get-permissions/index.js'
6
6
  export * as getMetadata from './get-metadata/index.js'
7
- export * as move from './move/index.js'
8
7
  export * as remove from './remove/index.js'
9
- export * as revokeSignedUrls from './revoke-signed-urls/index.js'
8
+ export * as move from './move/index.js'
10
9
  export * as stat from './stat/index.js'
11
- export * as updateMetadata from './update-metadata/index.js'
10
+ export * as revokeSignedUrls from './revoke-signed-urls/index.js'
12
11
  export * as upload from './upload/index.js'
12
+ export * as updateMetadata from './update-metadata/index.js'
@@ -4,9 +4,9 @@ export * as exists from './exists/index.js'
4
4
  export * as generateSignedUrl from './generate-signed-url/index.js'
5
5
  export * as getPermissions from './get-permissions/index.js'
6
6
  export * as getMetadata from './get-metadata/index.js'
7
- export * as move from './move/index.js'
8
7
  export * as remove from './remove/index.js'
9
- export * as revokeSignedUrls from './revoke-signed-urls/index.js'
8
+ export * as move from './move/index.js'
10
9
  export * as stat from './stat/index.js'
11
- export * as updateMetadata from './update-metadata/index.js'
10
+ export * as revokeSignedUrls from './revoke-signed-urls/index.js'
12
11
  export * as upload from './upload/index.js'
12
+ export * as updateMetadata from './update-metadata/index.js'
@@ -1,6 +1,6 @@
1
+ export * as copyFile from './copy-file/index.js'
1
2
  export * as copyDir from './copy-dir/index.js'
2
3
  export * as downloadFile from './download-file/index.js'
3
- export * as copyFile from './copy-file/index.js'
4
4
  export * as existsFile from './exists-file/index.js'
5
5
  export * as listDir from './list-dir/index.js'
6
6
  export * as moveDir from './move-dir/index.js'
@@ -1,6 +1,6 @@
1
+ export * as copyFile from './copy-file/index.js'
1
2
  export * as copyDir from './copy-dir/index.js'
2
3
  export * as downloadFile from './download-file/index.js'
3
- export * as copyFile from './copy-file/index.js'
4
4
  export * as existsFile from './exists-file/index.js'
5
5
  export * as listDir from './list-dir/index.js'
6
6
  export * as moveDir from './move-dir/index.js'
@@ -1,2 +1,2 @@
1
- export * as buffer from './buffer/index.js'
2
1
  export * as uint8Array from './uint8-array/index.js'
2
+ export * as buffer from './buffer/index.js'
@@ -1,2 +1,2 @@
1
- export * as buffer from './buffer/index.js'
2
1
  export * as uint8Array from './uint8-array/index.js'
2
+ export * as buffer from './buffer/index.js'
@@ -7,8 +7,8 @@ export * as flip from './flip/index.js'
7
7
  export * as flop from './flop/index.js'
8
8
  export * as hue from './hue/index.js'
9
9
  export * as level from './level/index.js'
10
- export * as normalize from './normalize/index.js'
11
10
  export * as lighten from './lighten/index.js'
11
+ export * as normalize from './normalize/index.js'
12
12
  export * as overlay from './overlay/index.js'
13
13
  export * as resize from './resize/index.js'
14
14
  export * as rotate from './rotate/index.js'
@@ -7,8 +7,8 @@ export * as flip from './flip/index.js'
7
7
  export * as flop from './flop/index.js'
8
8
  export * as hue from './hue/index.js'
9
9
  export * as level from './level/index.js'
10
- export * as normalize from './normalize/index.js'
11
10
  export * as lighten from './lighten/index.js'
11
+ export * as normalize from './normalize/index.js'
12
12
  export * as overlay from './overlay/index.js'
13
13
  export * as resize from './resize/index.js'
14
14
  export * as rotate from './rotate/index.js'
package/node/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  export * as awsS3 from './@aws-s3/index.js'
2
2
  export * as designEdito from './@design-edito/index.js'
3
3
  export * as express from './@express/index.js'
4
- export * as cloudStorage from './cloud-storage/index.js'
5
4
  export * as googleCloud from './@google-cloud/index.js'
5
+ export * as cloudStorage from './cloud-storage/index.js'
6
6
  export * as encryption from './encryption/index.js'
7
7
  export * as files from './files/index.js'
8
8
  export * as ftps from './ftps/index.js'
package/node/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  export * as awsS3 from './@aws-s3/index.js'
2
2
  export * as designEdito from './@design-edito/index.js'
3
3
  export * as express from './@express/index.js'
4
- export * as cloudStorage from './cloud-storage/index.js'
5
4
  export * as googleCloud from './@google-cloud/index.js'
5
+ export * as cloudStorage from './cloud-storage/index.js'
6
6
  export * as encryption from './encryption/index.js'
7
7
  export * as files from './files/index.js'
8
8
  export * as ftps from './ftps/index.js'
@@ -1,3 +1,3 @@
1
- export * as onExit from './on-exit/index.js'
2
1
  export * as promptContinue from './prompt-continue/index.js'
2
+ export * as onExit from './on-exit/index.js'
3
3
  export * as spawner from './spawner/index.js'
@@ -1,3 +1,3 @@
1
- export * as onExit from './on-exit/index.js'
2
1
  export * as promptContinue from './prompt-continue/index.js'
2
+ export * as onExit from './on-exit/index.js'
3
3
  export * as spawner from './spawner/index.js'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@design-edito/tools",
3
- "version": "0.5.13",
3
+ "version": "0.5.14",
4
4
  "description": "",
5
5
  "author": "Maxime Fabas",
6
6
  "license": "ISC",