@design-edito/tools 0.5.34 → 0.5.35

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 (43) hide show
  1. package/agnostic/colors/index.d.ts +1 -1
  2. package/agnostic/colors/index.js +1 -1
  3. package/agnostic/css/index.d.ts +1 -1
  4. package/agnostic/css/index.js +1 -1
  5. package/agnostic/html/hyper-json/smart-tags/coalesced/index.d.ts +11 -11
  6. package/agnostic/html/hyper-json/smart-tags/coalesced/index.js +11 -11
  7. package/agnostic/index.d.ts +2 -2
  8. package/agnostic/index.js +2 -2
  9. package/agnostic/misc/index.d.ts +2 -2
  10. package/agnostic/misc/index.js +2 -2
  11. package/agnostic/numbers/index.d.ts +1 -1
  12. package/agnostic/numbers/index.js +1 -1
  13. package/agnostic/sanitization/index.d.ts +1 -1
  14. package/agnostic/sanitization/index.js +1 -1
  15. package/agnostic/strings/index.d.ts +1 -1
  16. package/agnostic/strings/index.js +1 -1
  17. package/agnostic/subtitles/index.d.ts +1 -1
  18. package/agnostic/subtitles/index.js +1 -1
  19. package/agnostic/time/index.d.ts +1 -1
  20. package/agnostic/time/index.js +1 -1
  21. package/components/Gallery/index.d.ts +6 -3
  22. package/components/Gallery/index.js +1 -1
  23. package/components/ListLoader/index.d.ts +13 -6
  24. package/components/ListLoader/index.js +2 -2
  25. package/components/Scrllgngn/index.d.ts +6 -3
  26. package/components/Scrllgngn/index.js +4 -1
  27. package/components/Sequencer/index.d.ts +6 -3
  28. package/components/Sequencer/index.js +1 -1
  29. package/components/index.d.ts +3 -3
  30. package/components/index.js +3 -3
  31. package/node/@aws-s3/storage/file/index.d.ts +1 -1
  32. package/node/@aws-s3/storage/file/index.js +1 -1
  33. package/node/@google-cloud/storage/directory/index.d.ts +1 -1
  34. package/node/@google-cloud/storage/directory/index.js +1 -1
  35. package/node/@google-cloud/storage/file/index.d.ts +3 -3
  36. package/node/@google-cloud/storage/file/index.js +3 -3
  37. package/node/cloud-storage/operations/index.d.ts +1 -1
  38. package/node/cloud-storage/operations/index.js +1 -1
  39. package/node/files/index.d.ts +1 -1
  40. package/node/files/index.js +1 -1
  41. package/node/images/index.d.ts +1 -1
  42. package/node/images/index.js +1 -1
  43. package/package.json +1 -1
@@ -1,8 +1,8 @@
1
1
  export * as channels from './channels/index.js'
2
2
  export * as contrast from './contrast/index.js'
3
3
  export * as convert from './convert/index.js'
4
- export * as distance from './distance/index.js'
5
4
  export * as grayscale from './grayscale/index.js'
5
+ export * as distance from './distance/index.js'
6
6
  export * as invert from './invert/index.js'
7
7
  export * as luminance from './luminance/index.js'
8
8
  export * as palette from './palette/index.js'
@@ -1,8 +1,8 @@
1
1
  export * as channels from './channels/index.js'
2
2
  export * as contrast from './contrast/index.js'
3
3
  export * as convert from './convert/index.js'
4
- export * as distance from './distance/index.js'
5
4
  export * as grayscale from './grayscale/index.js'
5
+ export * as distance from './distance/index.js'
6
6
  export * as invert from './invert/index.js'
7
7
  export * as luminance from './luminance/index.js'
8
8
  export * as palette from './palette/index.js'
@@ -1,6 +1,6 @@
1
1
  export * as bem from './bem/index.js'
2
+ export * as clss from './clss/index.js'
2
3
  export * as generateNiceColor from './generate-nice-color/index.js'
3
4
  export * as isValidCssClassName from './is-valid-css-class-name/index.js'
4
5
  export * as scale from './scale/index.js'
5
6
  export * as stylesSet from './styles-set/index.js'
6
- export * as clss from './clss/index.js'
@@ -1,6 +1,6 @@
1
1
  export * as bem from './bem/index.js'
2
+ export * as clss from './clss/index.js'
2
3
  export * as generateNiceColor from './generate-nice-color/index.js'
3
4
  export * as isValidCssClassName from './is-valid-css-class-name/index.js'
4
5
  export * as scale from './scale/index.js'
5
6
  export * as stylesSet from './styles-set/index.js'
6
- export * as clss from './clss/index.js'
@@ -1,24 +1,24 @@
1
- export * as addclass from './addclass/index.js'
2
- export * as and from './and/index.js'
3
1
  export * as add from './add/index.js'
2
+ export * as addclass from './addclass/index.js'
4
3
  export * as append from './append/index.js'
4
+ export * as and from './and/index.js'
5
5
  export * as at from './at/index.js'
6
6
  export * as call from './call/index.js'
7
7
  export * as clone from './clone/index.js'
8
8
  export * as deleteproperties from './deleteproperties/index.js'
9
- export * as getattribute from './getattribute/index.js'
10
9
  export * as equals from './equals/index.js'
10
+ export * as getattribute from './getattribute/index.js'
11
11
  export * as getproperties from './getproperties/index.js'
12
12
  export * as getproperty from './getproperty/index.js'
13
- export * as hjparse from './hjparse/index.js'
14
13
  export * as hjstringify from './hjstringify/index.js'
15
14
  export * as if from './if/index.js'
16
15
  export * as initialize from './initialize/index.js'
16
+ export * as join from './join/index.js'
17
17
  export * as length from './length/index.js'
18
18
  export * as map from './map/index.js'
19
- export * as join from './join/index.js'
20
19
  export * as negate from './negate/index.js'
21
20
  export * as notrailing from './notrailing/index.js'
21
+ export * as hjparse from './hjparse/index.js'
22
22
  export * as or from './or/index.js'
23
23
  export * as pickrandom from './pickrandom/index.js'
24
24
  export * as populate from './populate/index.js'
@@ -29,24 +29,24 @@ export * as recordtoarray from './recordtoarray/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
- export * as select from './select/index.js'
33
32
  export * as replace from './replace/index.js'
33
+ export * as select from './select/index.js'
34
34
  export * as set from './set/index.js'
35
35
  export * as setattribute from './setattribute/index.js'
36
36
  export * as setproperty from './setproperty/index.js'
37
37
  export * as sorton from './sorton/index.js'
38
38
  export * as split from './split/index.js'
39
39
  export * as spread from './spread/index.js'
40
- export * as toarray from './toarray/index.js'
41
- export * as toggleclass from './toggleclass/index.js'
42
40
  export * as toboolean from './toboolean/index.js'
41
+ export * as toggleclass from './toggleclass/index.js'
42
+ export * as toarray from './toarray/index.js'
43
43
  export * as toelement from './toelement/index.js'
44
44
  export * as tonodelist from './tonodelist/index.js'
45
- export * as tonumber from './tonumber/index.js'
46
- export * as torecord from './torecord/index.js'
47
45
  export * as tonull from './tonull/index.js'
46
+ export * as torecord from './torecord/index.js'
48
47
  export * as toref from './toref/index.js'
48
+ export * as tonumber from './tonumber/index.js'
49
49
  export * as tostring from './tostring/index.js'
50
- export * as transformselected from './transformselected/index.js'
51
50
  export * as totext from './totext/index.js'
51
+ export * as transformselected from './transformselected/index.js'
52
52
  export * as trim from './trim/index.js'
@@ -1,24 +1,24 @@
1
- export * as addclass from './addclass/index.js'
2
- export * as and from './and/index.js'
3
1
  export * as add from './add/index.js'
2
+ export * as addclass from './addclass/index.js'
4
3
  export * as append from './append/index.js'
4
+ export * as and from './and/index.js'
5
5
  export * as at from './at/index.js'
6
6
  export * as call from './call/index.js'
7
7
  export * as clone from './clone/index.js'
8
8
  export * as deleteproperties from './deleteproperties/index.js'
9
- export * as getattribute from './getattribute/index.js'
10
9
  export * as equals from './equals/index.js'
10
+ export * as getattribute from './getattribute/index.js'
11
11
  export * as getproperties from './getproperties/index.js'
12
12
  export * as getproperty from './getproperty/index.js'
13
- export * as hjparse from './hjparse/index.js'
14
13
  export * as hjstringify from './hjstringify/index.js'
15
14
  export * as if from './if/index.js'
16
15
  export * as initialize from './initialize/index.js'
16
+ export * as join from './join/index.js'
17
17
  export * as length from './length/index.js'
18
18
  export * as map from './map/index.js'
19
- export * as join from './join/index.js'
20
19
  export * as negate from './negate/index.js'
21
20
  export * as notrailing from './notrailing/index.js'
21
+ export * as hjparse from './hjparse/index.js'
22
22
  export * as or from './or/index.js'
23
23
  export * as pickrandom from './pickrandom/index.js'
24
24
  export * as populate from './populate/index.js'
@@ -29,24 +29,24 @@ export * as recordtoarray from './recordtoarray/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
- export * as select from './select/index.js'
33
32
  export * as replace from './replace/index.js'
33
+ export * as select from './select/index.js'
34
34
  export * as set from './set/index.js'
35
35
  export * as setattribute from './setattribute/index.js'
36
36
  export * as setproperty from './setproperty/index.js'
37
37
  export * as sorton from './sorton/index.js'
38
38
  export * as split from './split/index.js'
39
39
  export * as spread from './spread/index.js'
40
- export * as toarray from './toarray/index.js'
41
- export * as toggleclass from './toggleclass/index.js'
42
40
  export * as toboolean from './toboolean/index.js'
41
+ export * as toggleclass from './toggleclass/index.js'
42
+ export * as toarray from './toarray/index.js'
43
43
  export * as toelement from './toelement/index.js'
44
44
  export * as tonodelist from './tonodelist/index.js'
45
- export * as tonumber from './tonumber/index.js'
46
- export * as torecord from './torecord/index.js'
47
45
  export * as tonull from './tonull/index.js'
46
+ export * as torecord from './torecord/index.js'
48
47
  export * as toref from './toref/index.js'
48
+ export * as tonumber from './tonumber/index.js'
49
49
  export * as tostring from './tostring/index.js'
50
- export * as transformselected from './transformselected/index.js'
51
50
  export * as totext from './totext/index.js'
51
+ export * as transformselected from './transformselected/index.js'
52
52
  export * as trim from './trim/index.js'
@@ -1,9 +1,8 @@
1
- export * as arrays from './arrays/index.js'
2
1
  export * as booleans from './booleans/index.js'
3
2
  export * as colors from './colors/index.js'
4
3
  export * as css from './css/index.js'
5
- export * as html from './html/index.js'
6
4
  export * as errors from './errors/index.js'
5
+ export * as html from './html/index.js'
7
6
  export * as misc from './misc/index.js'
8
7
  export * as numbers from './numbers/index.js'
9
8
  export * as objects from './objects/index.js'
@@ -14,4 +13,5 @@ export * as sanitization from './sanitization/index.js'
14
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'
16
+ export * as arrays from './arrays/index.js'
17
17
  export * as typescript from './typescript/index.js'
package/agnostic/index.js CHANGED
@@ -1,9 +1,8 @@
1
- export * as arrays from './arrays/index.js'
2
1
  export * as booleans from './booleans/index.js'
3
2
  export * as colors from './colors/index.js'
4
3
  export * as css from './css/index.js'
5
- export * as html from './html/index.js'
6
4
  export * as errors from './errors/index.js'
5
+ export * as html from './html/index.js'
7
6
  export * as misc from './misc/index.js'
8
7
  export * as numbers from './numbers/index.js'
9
8
  export * as objects from './objects/index.js'
@@ -14,4 +13,5 @@ export * as sanitization from './sanitization/index.js'
14
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'
16
+ export * as arrays from './arrays/index.js'
17
17
  export * as typescript from './typescript/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
3
  export * as connection from './connection/index.js'
4
- export * as crawler from './crawler/index.js'
5
4
  export * as dataSize from './data-size/index.js'
6
5
  export * as isConstructorFunction from './is-constructor-function/index.js'
7
6
  export * as isNullish from './is-nullish/index.js'
8
7
  export * as logs from './logs/index.js'
9
- export * as crossenv from './crossenv/index.js'
10
8
  export * as loremIpsum from './lorem-ipsum/index.js'
11
9
  export * as normalizeExtension from './normalize-extension/index.js'
10
+ export * as crawler from './crawler/index.js'
11
+ export * as crossenv from './crossenv/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
3
  export * as connection from './connection/index.js'
4
- export * as crawler from './crawler/index.js'
5
4
  export * as dataSize from './data-size/index.js'
6
5
  export * as isConstructorFunction from './is-constructor-function/index.js'
7
6
  export * as isNullish from './is-nullish/index.js'
8
7
  export * as logs from './logs/index.js'
9
- export * as crossenv from './crossenv/index.js'
10
8
  export * as loremIpsum from './lorem-ipsum/index.js'
11
9
  export * as normalizeExtension from './normalize-extension/index.js'
10
+ export * as crawler from './crawler/index.js'
11
+ export * as crossenv from './crossenv/index.js'
12
12
  export * as outcome from './outcome/index.js'
@@ -1,6 +1,6 @@
1
1
  export * as absoluteModulo from './absolute-modulo/index.js'
2
+ export * as clamp from './clamp/index.js'
2
3
  export * as approximateRational from './approximate-rational/index.js'
3
4
  export * as geometricProgressions from './geometric-progressions/index.js'
4
- export * as clamp from './clamp/index.js'
5
5
  export * as interpolate from './interpolate/index.js'
6
6
  export * as round from './round/index.js'
@@ -1,6 +1,6 @@
1
1
  export * as absoluteModulo from './absolute-modulo/index.js'
2
+ export * as clamp from './clamp/index.js'
2
3
  export * as approximateRational from './approximate-rational/index.js'
3
4
  export * as geometricProgressions from './geometric-progressions/index.js'
4
- export * as clamp from './clamp/index.js'
5
5
  export * as interpolate from './interpolate/index.js'
6
6
  export * as round from './round/index.js'
@@ -1,4 +1,4 @@
1
1
  export * as fileName from './file-name/index.js'
2
2
  export * as html from './html/index.js'
3
- export * as path from './path/index.js'
4
3
  export * as userInput from './user-input/index.js'
4
+ export * as path from './path/index.js'
@@ -1,4 +1,4 @@
1
1
  export * as fileName from './file-name/index.js'
2
2
  export * as html from './html/index.js'
3
- export * as path from './path/index.js'
4
3
  export * as userInput from './user-input/index.js'
4
+ export * as path from './path/index.js'
@@ -3,6 +3,6 @@ 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
5
  export * as replaceAll from './replace-all/index.js'
6
- export * as splitTrim from './split-trim/index.js'
7
6
  export * as toAlphanum from './to-alphanum/index.js'
7
+ export * as splitTrim from './split-trim/index.js'
8
8
  export * as trim from './trim/index.js'
@@ -3,6 +3,6 @@ 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
5
  export * as replaceAll from './replace-all/index.js'
6
- export * as splitTrim from './split-trim/index.js'
7
6
  export * as toAlphanum from './to-alphanum/index.js'
7
+ export * as splitTrim from './split-trim/index.js'
8
8
  export * as trim from './trim/index.js'
@@ -1,2 +1,2 @@
1
- export * as srtTimecodeToMs from './srt-timecode-to-ms/index.js'
2
1
  export * as parseSrt from './parse-srt/index.js'
2
+ export * as srtTimecodeToMs from './srt-timecode-to-ms/index.js'
@@ -1,2 +1,2 @@
1
- export * as srtTimecodeToMs from './srt-timecode-to-ms/index.js'
2
1
  export * as parseSrt from './parse-srt/index.js'
2
+ export * as srtTimecodeToMs from './srt-timecode-to-ms/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
+ 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 timeout from './timeout/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
+ 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 timeout from './timeout/index.js'
@@ -17,8 +17,8 @@ import type { WithClassName } from '../utils/types.js';
17
17
  * @property noSnap - Frees the scroll from snapping to a slot.
18
18
  * @property onPrevClicked - Fires before the gallery reacts, with the index as it was.
19
19
  * @property onNextClicked - Fires before the gallery reacts, with the index as it was.
20
- * @property onPaginationClicked - Fires before the gallery reacts, with the index as it
21
- * was and the one aimed at.
20
+ * @property onPaginationClicked - Fires before the gallery reacts, with `activePos`
21
+ * as it was and `targetPos`, the one aimed at.
22
22
  * @property onActiveSlotChanged - Fires after the active slot changed, with the new index.
23
23
  * @property onCanGoLeftChanged - Fires after the ability to scroll further left changed.
24
24
  * Never on mount.
@@ -38,7 +38,10 @@ export type Props = PropsWithChildren<WithClassName<{
38
38
  noSnap?: boolean;
39
39
  onPrevClicked?: (activePos: number) => void;
40
40
  onNextClicked?: (activePos: number) => void;
41
- onPaginationClicked?: (activePos: number, targetPos: number) => void;
41
+ onPaginationClicked?: (payload: {
42
+ activePos: number;
43
+ targetPos: number;
44
+ }) => void;
42
45
  onActiveSlotChanged?: (activePos: number) => void;
43
46
  onCanGoLeftChanged?: (canGoLeft: boolean) => void;
44
47
  onCanGoRightChanged?: (canGoRight: boolean) => void;
@@ -96,7 +96,7 @@ export const Gallery = ({ offsetLeft, offsetRight, offset, prevButtonContent, ne
96
96
  scrollToSlot(activeIndex + 1);
97
97
  };
98
98
  const handlePaginationClick = (pos) => {
99
- onPaginationClicked?.(activeIndex, pos);
99
+ onPaginationClicked?.({ activePos: activeIndex, targetPos: pos });
100
100
  if (isControlled)
101
101
  return;
102
102
  scrollToSlot(pos);
@@ -25,10 +25,11 @@ import { type Props as ControlledProps } from './index.controlled.js';
25
25
  * `onPageFetchFailed` and retried according to `fetchRetriesNb`.
26
26
  * @property staleAfterMs - Delay after which a loaded page is refetched, counted
27
27
  * from its own last successful load. When omitted, pages are never refreshed.
28
- * @property onPageFetched - Called after a page's items have been stored. Not
29
- * called for a page dropped while its request was in flight.
30
- * @property onPageFetchFailed - Called on every failed attempt, not only once retries
31
- * are exhausted. When omitted, failures are logged with `console.warn`.
28
+ * @property onPageFetched - Called with `pagePos` and `items` after a page's items
29
+ * have been stored. Not called for a page dropped while its request was in flight.
30
+ * @property onPageFetchFailed - Called with `pagePos` and `error` on every failed
31
+ * attempt, not only once retries are exhausted. When omitted, failures are logged
32
+ * with `console.warn`.
32
33
  * @property fetchRetriesNb - Number of retries after a failed fetch. Defaults to
33
34
  * `Infinity`, so a page keeps retrying until it succeeds.
34
35
  * @property fetchRetriesDelayMs - Delay between two attempts. Defaults to `1000`.
@@ -40,8 +41,14 @@ export type Props<T> = Omit<ControlledProps<T>, 'itemsPages' | 'loadingPages' |
40
41
  dropPagesFurtherThan?: number;
41
42
  fetch: (page: number) => Promise<T[]>;
42
43
  staleAfterMs?: number;
43
- onPageFetched?: (pagePos: number, items: T[]) => void;
44
- onPageFetchFailed?: (pagePos: number, error: Error) => void;
44
+ onPageFetched?: (payload: {
45
+ pagePos: number;
46
+ items: T[];
47
+ }) => void;
48
+ onPageFetchFailed?: (payload: {
49
+ pagePos: number;
50
+ error: Error;
51
+ }) => void;
45
52
  fetchRetriesNb?: number;
46
53
  fetchRetriesDelayMs?: number;
47
54
  };
@@ -63,7 +63,7 @@ export const ListLoader = ({ className, pages, defaultPage, fillGaps = true, dro
63
63
  const reportFetchError = (page, err) => {
64
64
  const error = toError(err);
65
65
  if (onPageFetchFailed !== undefined)
66
- return onPageFetchFailed(page, error);
66
+ return onPageFetchFailed({ pagePos: page, error });
67
67
  // eslint-disable-next-line no-console
68
68
  console.warn(`ListLoader failed to fetch page ${page}`, error);
69
69
  };
@@ -78,7 +78,7 @@ export const ListLoader = ({ className, pages, defaultPage, fillGaps = true, dro
78
78
  if (!requestedPages.current.has(page))
79
79
  return;
80
80
  storePage(page, items);
81
- onPageFetched?.(page, items);
81
+ onPageFetched?.({ pagePos: page, items });
82
82
  setPageLoading(page, false);
83
83
  })
84
84
  .catch((err) => {
@@ -83,8 +83,8 @@ export type PropsPage = {
83
83
  * - `'both'` — forces blocks on both sides.
84
84
  * - `'none'` — no forcing (default behaviour).
85
85
  * @property onPageChanged - Called once the current page has changed, never on
86
- * mount. Receives the zero-based index of the new current page and the
87
- * corresponding page definition, if available.
86
+ * mount. Receives `currentPagePos`, the zero-based index of the new current page,
87
+ * and `pageData`, its definition when there is one.
88
88
  * @property onContentVisibilityChanged - Called after the scrolling content
89
89
  * area entered or left the viewport, with the new value. Never on mount.
90
90
  * @property className - Optional additional class name(s) applied to the root
@@ -99,7 +99,10 @@ export type Props = WithClassName<{
99
99
  viewportOffsetLeft?: ViewportOffset;
100
100
  stickyBlocksLazyLoadDistance?: number;
101
101
  forceStickBlocks?: 'before' | 'after' | 'both' | 'none';
102
- onPageChanged?: (currentPagePos: number, pageData?: PropsPage) => void;
102
+ onPageChanged?: (payload: {
103
+ currentPagePos: number;
104
+ pageData?: PropsPage;
105
+ }) => void;
103
106
  onContentVisibilityChanged?: (isVisible: boolean) => void;
104
107
  }>;
105
108
  /**
@@ -254,7 +254,10 @@ export const Scrllgngn = ({ pages, thresholdOffsetPercent, viewportOffsetTop, vi
254
254
  return () => window.clearInterval(interval);
255
255
  }, [isOnScreen, readVisibleZone]);
256
256
  // Handlers
257
- useChangeDispatch(currentPagePos, pagePos => onPageChanged?.(pagePos, pages?.[pagePos]));
257
+ useChangeDispatch(currentPagePos, pagePos => onPageChanged?.({
258
+ currentPagePos: pagePos,
259
+ pageData: pages?.[pagePos]
260
+ }));
258
261
  useChangeDispatch(contentVisible, onContentVisibilityChanged);
259
262
  const handleTopBoundDetect = e => setTopVis(e.ioEntry?.isIntersecting ?? false);
260
263
  const handleCntDetect = e => setCntVis(e.ioEntry?.isIntersecting ?? false);
@@ -30,8 +30,8 @@ import type { SequencerAction } from './types.js';
30
30
  * is a step per second. Clamped to a minimum of `1`.
31
31
  * @property loop - Whether the sequence wraps round. **`false` by default**, so a
32
32
  * sequence ends the way a video does rather than running forever.
33
- * @property onStepChanged - Called when the position changes, with the position and the
34
- * active step it resolves to. Never on mount.
33
+ * @property onStepChanged - Called when the position changes, with `step` and the
34
+ * `activeStep` it resolves to. Never on mount.
35
35
  * @property onIsPlayingChanged - Called once the effective play state changed — which
36
36
  * includes it dropping to `false` on its own at the end.
37
37
  * @property onIsEndedChanged - Called when the sequence ends, or leaves that state.
@@ -53,7 +53,10 @@ export type Props = PropsWithChildren<WithClassName<{
53
53
  defaultPlay?: boolean;
54
54
  tempo?: number;
55
55
  loop?: boolean;
56
- onStepChanged?: (step: number, activeStep: number) => void;
56
+ onStepChanged?: (payload: {
57
+ step: number;
58
+ activeStep: number;
59
+ }) => void;
57
60
  onIsPlayingChanged?: (isPlaying: boolean) => void;
58
61
  onIsEndedChanged?: (isEnded: boolean) => void;
59
62
  onLooped?: () => void;
@@ -269,7 +269,7 @@ export const Sequencer = ({ totalSteps, stepMap, step, defaultStep, play, defaul
269
269
  onVisibilityChanged
270
270
  }, actions, behavioursSuspended === true);
271
271
  // State dispatch
272
- useChangeDispatch(position, () => onStepChanged?.(position, activeStep));
272
+ useChangeDispatch(position, () => onStepChanged?.({ step: position, activeStep }));
273
273
  useChangeDispatch(isPlaying, onIsPlayingChanged);
274
274
  useChangeDispatch(isEnded, onIsEndedChanged);
275
275
  useChangeDispatch(position === 0, atStart => { if (atStart)
@@ -1,6 +1,6 @@
1
1
  export * as beforeAfter from './BeforeAfter/index.js'
2
- export * as button from './Button/index.js'
3
2
  export * as clippable from './Clippable/index.js'
3
+ export * as button from './Button/index.js'
4
4
  export * as disclaimer from './Disclaimer/index.js'
5
5
  export * as drawer from './Drawer/index.js'
6
6
  export * as eventListener from './EventListener/index.js'
@@ -9,8 +9,8 @@ export * as iframe from './Iframe/index.js'
9
9
  export * as image from './Image/index.js'
10
10
  export * as input from './Input/index.js'
11
11
  export * as intersectionObserver from './IntersectionObserver/index.js'
12
- export * as jsonEditor from './JsonEditor/index.js'
13
12
  export * as lightbox from './Lightbox/index.js'
13
+ export * as jsonEditor from './JsonEditor/index.js'
14
14
  export * as listLoader from './ListLoader/index.js'
15
15
  export * as overlayer from './Overlayer/index.js'
16
16
  export * as paginator from './Paginator/index.js'
@@ -19,9 +19,9 @@ export * as scrllgngn from './Scrllgngn/index.js'
19
19
  export * as scrollListener from './ScrollListener/index.js'
20
20
  export * as select from './Select/index.js'
21
21
  export * as sequencer from './Sequencer/index.js'
22
- export * as subtitles from './Subtitles/index.js'
23
22
  export * as shadowRoot from './ShadowRoot/index.js'
24
23
  export * as textarea from './Textarea/index.js'
24
+ export * as subtitles from './Subtitles/index.js'
25
25
  export * as uiModule from './UIModule/index.js'
26
26
  export * as video from './Video/index.js'
27
27
  export * as wipAudioQuote from './_WIP_AudioQuote/index.js'
@@ -1,6 +1,6 @@
1
1
  export * as beforeAfter from './BeforeAfter/index.js'
2
- export * as button from './Button/index.js'
3
2
  export * as clippable from './Clippable/index.js'
3
+ export * as button from './Button/index.js'
4
4
  export * as disclaimer from './Disclaimer/index.js'
5
5
  export * as drawer from './Drawer/index.js'
6
6
  export * as eventListener from './EventListener/index.js'
@@ -9,8 +9,8 @@ export * as iframe from './Iframe/index.js'
9
9
  export * as image from './Image/index.js'
10
10
  export * as input from './Input/index.js'
11
11
  export * as intersectionObserver from './IntersectionObserver/index.js'
12
- export * as jsonEditor from './JsonEditor/index.js'
13
12
  export * as lightbox from './Lightbox/index.js'
13
+ export * as jsonEditor from './JsonEditor/index.js'
14
14
  export * as listLoader from './ListLoader/index.js'
15
15
  export * as overlayer from './Overlayer/index.js'
16
16
  export * as paginator from './Paginator/index.js'
@@ -19,9 +19,9 @@ export * as scrllgngn from './Scrllgngn/index.js'
19
19
  export * as scrollListener from './ScrollListener/index.js'
20
20
  export * as select from './Select/index.js'
21
21
  export * as sequencer from './Sequencer/index.js'
22
- export * as subtitles from './Subtitles/index.js'
23
22
  export * as shadowRoot from './ShadowRoot/index.js'
24
23
  export * as textarea from './Textarea/index.js'
24
+ export * as subtitles from './Subtitles/index.js'
25
25
  export * as uiModule from './UIModule/index.js'
26
26
  export * as video from './Video/index.js'
27
27
  export * as wipAudioQuote from './_WIP_AudioQuote/index.js'
@@ -2,6 +2,6 @@ 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
4
  export * as move from './move/index.js'
5
- export * as remove from './remove/index.js'
6
5
  export * as stat from './stat/index.js'
6
+ export * as remove from './remove/index.js'
7
7
  export * as upload from './upload/index.js'
@@ -2,6 +2,6 @@ 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
4
  export * as move from './move/index.js'
5
- export * as remove from './remove/index.js'
6
5
  export * as stat from './stat/index.js'
6
+ export * as remove from './remove/index.js'
7
7
  export * as upload from './upload/index.js'
@@ -1,4 +1,4 @@
1
- export * as copyDir from './copy-dir/index.js'
2
1
  export * as list from './list/index.js'
2
+ export * as copyDir from './copy-dir/index.js'
3
3
  export * as moveDir from './move-dir/index.js'
4
4
  export * as removeDir from './remove-dir/index.js'
@@ -1,4 +1,4 @@
1
- export * as copyDir from './copy-dir/index.js'
2
1
  export * as list from './list/index.js'
2
+ export * as copyDir from './copy-dir/index.js'
3
3
  export * as moveDir from './move-dir/index.js'
4
4
  export * as removeDir from './remove-dir/index.js'
@@ -1,12 +1,12 @@
1
1
  export * as copy from './copy/index.js'
2
- export * as download from './download/index.js'
3
2
  export * as exists from './exists/index.js'
4
3
  export * as getMetadata from './get-metadata/index.js'
5
- export * as generateSignedUrl from './generate-signed-url/index.js'
6
4
  export * as getPermissions from './get-permissions/index.js'
7
- export * as move from './move/index.js'
5
+ export * as download from './download/index.js'
8
6
  export * as remove from './remove/index.js'
9
7
  export * as revokeSignedUrls from './revoke-signed-urls/index.js'
8
+ export * as generateSignedUrl from './generate-signed-url/index.js'
9
+ export * as move from './move/index.js'
10
10
  export * as stat from './stat/index.js'
11
11
  export * as updateMetadata from './update-metadata/index.js'
12
12
  export * as upload from './upload/index.js'
@@ -1,12 +1,12 @@
1
1
  export * as copy from './copy/index.js'
2
- export * as download from './download/index.js'
3
2
  export * as exists from './exists/index.js'
4
3
  export * as getMetadata from './get-metadata/index.js'
5
- export * as generateSignedUrl from './generate-signed-url/index.js'
6
4
  export * as getPermissions from './get-permissions/index.js'
7
- export * as move from './move/index.js'
5
+ export * as download from './download/index.js'
8
6
  export * as remove from './remove/index.js'
9
7
  export * as revokeSignedUrls from './revoke-signed-urls/index.js'
8
+ export * as generateSignedUrl from './generate-signed-url/index.js'
9
+ export * as move from './move/index.js'
10
10
  export * as stat from './stat/index.js'
11
11
  export * as updateMetadata from './update-metadata/index.js'
12
12
  export * as upload from './upload/index.js'
@@ -5,7 +5,7 @@ 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'
7
7
  export * as moveFile from './move-file/index.js'
8
- export * as removeDir from './remove-dir/index.js'
9
8
  export * as removeFile from './remove-file/index.js'
9
+ export * as removeDir from './remove-dir/index.js'
10
10
  export * as statFile from './stat-file/index.js'
11
11
  export * as uploadFile from './upload-file/index.js'
@@ -5,7 +5,7 @@ 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'
7
7
  export * as moveFile from './move-file/index.js'
8
- export * as removeDir from './remove-dir/index.js'
9
8
  export * as removeFile from './remove-file/index.js'
9
+ export * as removeDir from './remove-dir/index.js'
10
10
  export * as statFile from './stat-file/index.js'
11
11
  export * as uploadFile from './upload-file/index.js'
@@ -1,4 +1,4 @@
1
1
  export * as getSize from './get-size/index.js'
2
- export * as readWrite from './read-write/index.js'
3
2
  export * as isInDirectory from './is-in-directory/index.js'
3
+ export * as readWrite from './read-write/index.js'
4
4
  export * as subpaths from './subpaths/index.js'
@@ -1,4 +1,4 @@
1
1
  export * as getSize from './get-size/index.js'
2
- export * as readWrite from './read-write/index.js'
3
2
  export * as isInDirectory from './is-in-directory/index.js'
3
+ export * as readWrite from './read-write/index.js'
4
4
  export * as subpaths from './subpaths/index.js'
@@ -1,5 +1,5 @@
1
1
  export * as create from './create/index.js'
2
2
  export * as format from './format/index.js'
3
- export * as metadata from './metadata/index.js'
4
3
  export * as transform from './transform/index.js'
4
+ export * as metadata from './metadata/index.js'
5
5
  export * as utils from './utils/index.js'
@@ -1,5 +1,5 @@
1
1
  export * as create from './create/index.js'
2
2
  export * as format from './format/index.js'
3
- export * as metadata from './metadata/index.js'
4
3
  export * as transform from './transform/index.js'
4
+ export * as metadata from './metadata/index.js'
5
5
  export * as utils from './utils/index.js'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@design-edito/tools",
3
- "version": "0.5.34",
3
+ "version": "0.5.35",
4
4
  "description": "",
5
5
  "author": "Maxime Fabas",
6
6
  "license": "ISC",