@design-edito/tools 0.5.24 → 0.5.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/agnostic/arrays/index.d.ts +2 -2
  2. package/agnostic/arrays/index.js +2 -2
  3. package/agnostic/colors/index.d.ts +2 -2
  4. package/agnostic/colors/index.js +2 -2
  5. package/agnostic/css/index.d.ts +1 -1
  6. package/agnostic/css/index.js +1 -1
  7. package/agnostic/html/hyper-json/smart-tags/coalesced/index.d.ts +18 -18
  8. package/agnostic/html/hyper-json/smart-tags/coalesced/index.js +18 -18
  9. package/agnostic/html/hyper-json/smart-tags/isolated/index.d.ts +5 -5
  10. package/agnostic/html/hyper-json/smart-tags/isolated/index.js +5 -5
  11. package/agnostic/index.d.ts +5 -5
  12. package/agnostic/index.js +5 -5
  13. package/agnostic/misc/index.d.ts +4 -4
  14. package/agnostic/misc/index.js +4 -4
  15. package/agnostic/numbers/index.d.ts +1 -1
  16. package/agnostic/numbers/index.js +1 -1
  17. package/agnostic/objects/index.d.ts +2 -2
  18. package/agnostic/objects/index.js +2 -2
  19. package/agnostic/strings/index.d.ts +4 -4
  20. package/agnostic/strings/index.js +4 -4
  21. package/agnostic/time/dates/index.d.ts +1 -1
  22. package/agnostic/time/dates/index.js +1 -1
  23. package/agnostic/time/index.d.ts +1 -1
  24. package/agnostic/time/index.js +1 -1
  25. package/components/Clippable/index.d.ts +12 -1
  26. package/components/Clippable/index.js +2 -2
  27. package/components/ScrollListener/index.d.ts +45 -18
  28. package/components/ScrollListener/index.js +55 -22
  29. package/components/ScrollListener/types.d.ts +31 -0
  30. package/components/ScrollListener/types.js +14 -0
  31. package/components/Sequencer/index.d.ts +19 -4
  32. package/components/Sequencer/index.js +52 -1
  33. package/components/index.d.ts +4 -4
  34. package/components/index.js +4 -4
  35. package/components/utils/types.d.ts +5 -15
  36. package/node/@aws-s3/storage/file/index.d.ts +3 -3
  37. package/node/@aws-s3/storage/file/index.js +3 -3
  38. package/node/@google-cloud/storage/file/index.d.ts +4 -4
  39. package/node/@google-cloud/storage/file/index.js +4 -4
  40. package/node/cloud-storage/operations/index.d.ts +3 -3
  41. package/node/cloud-storage/operations/index.js +3 -3
  42. package/node/encryption/index.d.ts +1 -1
  43. package/node/encryption/index.js +1 -1
  44. package/node/files/index.d.ts +1 -1
  45. package/node/files/index.js +1 -1
  46. package/node/ftps/file/index.d.ts +3 -3
  47. package/node/ftps/file/index.js +3 -3
  48. package/node/images/index.d.ts +1 -1
  49. package/node/images/index.js +1 -1
  50. package/node/images/transform/operations/index.d.ts +3 -3
  51. package/node/images/transform/operations/index.js +3 -3
  52. package/node/index.d.ts +1 -1
  53. package/node/index.js +1 -1
  54. package/node/sftp/file/index.d.ts +2 -2
  55. package/node/sftp/file/index.js +2 -2
  56. package/node/sftp/index.d.ts +1 -1
  57. package/node/sftp/index.js +1 -1
  58. package/package.json +5 -1
@@ -1,9 +1,9 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { useCallback, useEffect, useRef, useState } from 'react';
2
+ import { useEffect, useRef, useState } from 'react';
3
3
  import { clss } from '../../agnostic/css/clss/index.js';
4
4
  import { randomHash } from '../../agnostic/random/uuid/index.js';
5
- import { IntersectionObserverComponent } from '../IntersectionObserver/index.js';
6
5
  import { mergeClassNames, useChangeDispatch } from '../utils/index.js';
6
+ import { useViewportBehaviours } from '../utils/viewport-behaviours/index.js';
7
7
  import { scrollListener as publicClassName } from '../public-classnames.js';
8
8
  import { getScrollProgress, subscribe, toScrollCssProps, unsubscribe } from './utils.js';
9
9
  import cssModule from './styles.module.css';
@@ -13,6 +13,9 @@ import cssModule from './styles.module.css';
13
13
  * of its own.
14
14
  *
15
15
  * ### Root element modifiers
16
+ * - `--tracking` — the component is measuring. The state, where `--measured` is its
17
+ * consequence: a listener that has stopped keeps its last values, so it can be
18
+ * measured and no longer tracking.
16
19
  * - `--measured` — a first measurement landed, so the properties below are set.
17
20
  * - `--scrolling-up` / `--scrolling-down` — the document's last known direction.
18
21
  * Neither is present before the first scroll.
@@ -41,26 +44,63 @@ import cssModule from './styles.module.css';
41
44
  *
42
45
  * @param props - Component properties.
43
46
  * @see {@link Props}
44
- * @returns A container exposing the metrics, wrapping its children inside an
45
- * {@link IntersectionObserverComponent}.
47
+ * @returns A container exposing the metrics, with the children as its own.
46
48
  *
47
49
  * @remarks
50
+ * **Viewport-driven behaviour is declared, not named by a prop.** `whenVisible` and
51
+ * `whenHidden` take `'track'`, `'untrack'`, or a list, each optionally suffixed by
52
+ * `':once'` and `':force'`. The old `startOnVisible` is `defaultTracking={false}` plus
53
+ * `whenVisible='track'`, and `stopOnHidden` is `whenHidden='untrack'`. See
54
+ * `components/utils/viewport-behaviours` for the grammar, and the `visibility…` props for
55
+ * what « visible » means and how long it has to have been true.
56
+ *
57
+ * **The observer runs on the root itself.** There is no inner box between this element
58
+ * and the children any more, and that matters here more than anywhere else in the
59
+ * library: the whole point is a stylesheet animating on the properties this element
60
+ * carries, which it cannot do if what it wants to move sits one level below.
61
+ *
48
62
  * All mounted instances share a single pair of `scroll` / `resize` listeners and
49
63
  * a single measurement pass per animation frame — the document is measured once
50
64
  * for everyone, each element only for itself. The listeners exist only while at
51
65
  * least one instance is tracking.
52
66
  */
53
- export const ScrollListener = ({ startOnVisible, stopOnHidden, threshold, root, rootMargin, onScrollStateChanged, onVisibilityChanged, onScrollProgressChanged, onScrollDirectionChanged, className, children }) => {
67
+ export const ScrollListener = ({ tracking, defaultTracking, behavioursSuspended, visibilityThreshold, visibilityRoot, visibilityRootMargin, visibilityOnAfterMs, visibilityOffAfterMs, whenVisible, whenHidden, onIsTrackingChanged, onScrollStateChanged, onVisibilityChanged, onScrollProgressChanged, onScrollDirectionChanged, className, children }) => {
54
68
  // State & refs
55
69
  const [subscriberId] = useState(() => randomHash(6));
70
+ const [internalTracking, setInternalTracking] = useState(defaultTracking ?? true);
56
71
  const [scrollState, setScrollState] = useState();
57
72
  const [scrollDirection, setScrollDirection] = useState(null);
58
73
  const rootRef = useRef(null);
59
74
  const previousScrollYRef = useRef(null);
75
+ const isTracking = tracking ?? internalTracking;
60
76
  const scrollProgress = scrollState === undefined
61
77
  ? undefined
62
78
  : getScrollProgress(scrollState).y;
79
+ // Viewport behaviours
80
+ // Measuring is the only thing this component does, so starting and stopping it is the
81
+ // whole vocabulary. `track` and `untrack` need no guard against a controlled
82
+ // `tracking`: the effective state reads the prop first, so the internal one they write
83
+ // is simply never consulted.
84
+ const actions = {
85
+ track: { kind: 'start', domain: 'tracking', run: () => setInternalTracking(true) },
86
+ untrack: { kind: 'stop', domain: 'tracking', run: () => setInternalTracking(false) }
87
+ };
88
+ // The surrender half of the result is dropped: this component has no control a reader
89
+ // could take over. The observer runs on the root itself — there is no inner box any
90
+ // more, and that matters more here than anywhere: a stylesheet reads the measurements
91
+ // off this element, so its children have to be its children.
92
+ useViewportBehaviours(rootRef, {
93
+ visibilityThreshold,
94
+ visibilityRoot,
95
+ visibilityRootMargin,
96
+ visibilityOnAfterMs,
97
+ visibilityOffAfterMs,
98
+ whenVisible,
99
+ whenHidden,
100
+ onVisibilityChanged
101
+ }, actions, behavioursSuspended === true);
63
102
  // State dispatch
103
+ useChangeDispatch(isTracking, onIsTrackingChanged);
64
104
  useChangeDispatch(scrollState, onScrollStateChanged);
65
105
  useChangeDispatch(scrollProgress, progress => { if (progress !== undefined)
66
106
  onScrollProgressChanged?.(progress); });
@@ -77,27 +117,20 @@ export const ScrollListener = ({ startOnVisible, stopOnHidden, threshold, root,
77
117
  return;
78
118
  setScrollDirection(y > previous ? 'down' : 'up');
79
119
  }, [scrollState]);
80
- // Fx. no dep. - track from mount, unless waiting for the component to show up.
81
- // The cleanup runs whichever way the subscription was opened.
120
+ // Fx. dep. `isTracking` - the subscription follows the state, and nothing else opens
121
+ // or closes it. The measurements are left on their last values when it closes: a
122
+ // stylesheet reading `--lm-scroll-listener-scroll-y` must not see it drop to zero
123
+ // because the element went off screen.
82
124
  useEffect(() => {
83
- if (startOnVisible !== true) {
84
- subscribe(subscriberId, { rootRef, onScrollStateChange: setScrollState });
85
- }
125
+ if (!isTracking)
126
+ return;
127
+ subscribe(subscriberId, { rootRef, onScrollStateChange: setScrollState });
86
128
  return () => unsubscribe(subscriberId);
87
- }, []);
88
- // User action handlers
89
- const handleIntersection = useCallback(({ ioEntry }) => {
90
- const isVisible = ioEntry?.isIntersecting ?? false;
91
- onVisibilityChanged?.(isVisible);
92
- if (isVisible && startOnVisible === true) {
93
- subscribe(subscriberId, { rootRef, onScrollStateChange: setScrollState });
94
- }
95
- if (!isVisible && stopOnHidden === true)
96
- unsubscribe(subscriberId);
97
- }, [startOnVisible, stopOnHidden, onVisibilityChanged]);
129
+ }, [isTracking]);
98
130
  // Rendering
99
131
  const c = clss(publicClassName, { cssModule });
100
132
  const rootClss = mergeClassNames(c(null, {
133
+ tracking: isTracking,
101
134
  measured: scrollState !== undefined,
102
135
  'scrolling-up': scrollDirection === 'up',
103
136
  'scrolling-down': scrollDirection === 'down'
@@ -105,5 +138,5 @@ export const ScrollListener = ({ startOnVisible, stopOnHidden, threshold, root,
105
138
  const customProps = scrollState === undefined
106
139
  ? {}
107
140
  : toScrollCssProps(scrollState);
108
- return _jsx("div", { className: rootClss, ref: rootRef, style: { ...customProps }, children: _jsx(IntersectionObserverComponent, { threshold: threshold, root: root, rootMargin: rootMargin, onIntersected: handleIntersection, children: children }) });
141
+ return _jsx("div", { className: rootClss, ref: rootRef, style: { ...customProps }, children: children });
109
142
  };
@@ -0,0 +1,31 @@
1
+ /**
2
+ * The verbs a scroll listener answers to.
3
+ *
4
+ * Two, and there could not be more: measuring is the only thing this component does, so
5
+ * starting and stopping it is the whole of what a trigger can act on. `track` is the old
6
+ * `startOnVisible` and `untrack` the old `stopOnHidden`, said in the grammar the library
7
+ * shares rather than in two props of its own.
8
+ *
9
+ * Neither takes an argument.
10
+ */
11
+ export declare const SCROLL_LISTENER_VERBS: readonly ["track", "untrack"];
12
+ export type ScrollListenerVerb = typeof SCROLL_LISTENER_VERBS[number];
13
+ /**
14
+ * The instructions a consumer writes in `whenVisible` / `whenHidden`.
15
+ *
16
+ * No verb takes an argument here, so an action *is* a verb. Both take the `':once'` and
17
+ * `':force'` suffixes, which are the generic layer's and are not restated here.
18
+ */
19
+ export type ScrollListenerAction = ScrollListenerVerb;
20
+ /**
21
+ * What a verb competes with — one domain, and it is a formality.
22
+ *
23
+ * **This component has no controls**: nothing to click, so nothing a reader can take over
24
+ * and nothing that ever surrenders. The field is part of `ActionSpec` and is declared
25
+ * honestly rather than split into domains no hand could ever tell apart. The consequence
26
+ * is that `':force'` has no trigger here.
27
+ *
28
+ * A gate is the other brake, and it does reach `track`: measuring a subtree nobody is
29
+ * being shown is work done for no one.
30
+ */
31
+ export type ScrollListenerDomain = 'tracking';
@@ -0,0 +1,14 @@
1
+ /**
2
+ * The verbs a scroll listener answers to.
3
+ *
4
+ * Two, and there could not be more: measuring is the only thing this component does, so
5
+ * starting and stopping it is the whole of what a trigger can act on. `track` is the old
6
+ * `startOnVisible` and `untrack` the old `stopOnHidden`, said in the grammar the library
7
+ * shares rather than in two props of its own.
8
+ *
9
+ * Neither takes an argument.
10
+ */
11
+ export const SCROLL_LISTENER_VERBS = [
12
+ 'track',
13
+ 'untrack'
14
+ ];
@@ -3,10 +3,11 @@ import type { WithClassName } from '../utils/types.js';
3
3
  import type { ViewportBehaviours } from '../utils/viewport-behaviours/types.js';
4
4
  import type { SequencerAction } from './types.js';
5
5
  /**
6
- * @property totalSteps - How many steps the sequence has. Falls back to the number of
7
- * **element** children: text and whitespace never count, which matters more than it
8
- * looks — an article writes its children across several lines, and a text node counting
9
- * as a step would put every index out by one.
6
+ * @property totalSteps - How many steps the sequence has. Falls back to the first child
7
+ * marked `data-last-step`, which sets the count to its own position plus one, and then
8
+ * to the number of **element** children: text and whitespace never count, which matters
9
+ * more than it looks — an article writes its children across several lines, and a text
10
+ * node counting as a step would put every index out by one.
10
11
  * @property stepMap - Rewrites what a position means, **by position and nothing else**:
11
12
  * at position `i` the active step is `stepMap[i]` when there is one, and `i` otherwise.
12
13
  * `[2, 6, 7]` over seven steps plays `2, 6, 7, 3, 4, 5, 6` — a step may be skipped, may
@@ -77,6 +78,20 @@ export type Props = PropsWithChildren<WithClassName<{
77
78
  * opened rather than counted**: it groups without rendering an element of its own, so
78
79
  * there would be nothing to class and nothing to show for the step it would consume.
79
80
  *
81
+ * ### Where the sequence ends
82
+ * A child marked `data-last-step` ends it, and what follows still takes part — through
83
+ * `data-steps` alone. That is what lets an article write the steps in reading order and
84
+ * put the children belonging to several of them at once **after**, where they read as
85
+ * what they are, rather than having their position counted as a step of its own:
86
+ *
87
+ * ```html
88
+ * <div>1</div><div>2</div><div data-last-step>3</div>
89
+ * <div data-steps="0, 1">both of the first two</div>
90
+ * ```
91
+ *
92
+ * Three steps, four children. A trailing child that names no step never lights up, which
93
+ * is the honest reading of « it is not part of the sequence ».
94
+ *
80
95
  * @remarks
81
96
  * **Viewport-driven behaviour is declared, not named by a prop.** `whenVisible` and
82
97
  * `whenHidden` take a verb or a list of them, out of {@link SequencerAction} — `'play'`,
@@ -20,6 +20,23 @@ import cssModule from './styles.module.css';
20
20
  * and a stylesheet can select on it.
21
21
  */
22
22
  const STEPS_ATTRIBUTE = 'data-steps';
23
+ /**
24
+ * The attribute a child uses to say that the sequence ends on it.
25
+ *
26
+ * It answers a shape the positional fallback could not: an article writes the steps in
27
+ * reading order, then — **after** the sequence proper — the children that belong to
28
+ * several steps at once and name them with {@link STEPS_ATTRIBUTE}. Those trailing
29
+ * children would each claim a step of their own in the count, and the sequence would run
30
+ * on into steps where nothing but them is lit.
31
+ *
32
+ * Marking the last step is what separates the two halves, and it is written where the
33
+ * separation is rather than recounted in a prop — the same reason `data-steps` lives on
34
+ * the child. A child after the mark that names no step therefore never lights up, which
35
+ * is the honest reading of « it is not part of the sequence ».
36
+ *
37
+ * Valueless, as an HTML boolean attribute: what matters is that it is there.
38
+ */
39
+ const LAST_STEP_ATTRIBUTE = 'data-last-step';
23
40
  /**
24
41
  * `data-steps="2, 6"` into the steps it names.
25
42
  *
@@ -61,6 +78,20 @@ function flattenChildren(nodes) {
61
78
  return flattenChildren(children);
62
79
  });
63
80
  }
81
+ /**
82
+ * Whether a child carries {@link LAST_STEP_ATTRIBUTE}.
83
+ *
84
+ * Present is enough — `data-last-step` alone gives `''` through lm-html, and `true`
85
+ * written in JSX. Only an explicit denial is read as one, so that a consumer computing
86
+ * the attribute can write `false` without having to leave it out.
87
+ */
88
+ function isLastStep(child) {
89
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- a React element's props are a record, whatever else they are
90
+ const raw = child.props[LAST_STEP_ATTRIBUTE];
91
+ if (raw === undefined || raw === null)
92
+ return false;
93
+ return raw !== false && raw !== 'false';
94
+ }
64
95
  /** The steps a child answers to: what it declares, or where it sits. */
65
96
  function stepsOf(child, elementIndex) {
66
97
  // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- a React element's props are a record, whatever else they are
@@ -83,6 +114,20 @@ function stepsOf(child, elementIndex) {
83
114
  * opened rather than counted**: it groups without rendering an element of its own, so
84
115
  * there would be nothing to class and nothing to show for the step it would consume.
85
116
  *
117
+ * ### Where the sequence ends
118
+ * A child marked `data-last-step` ends it, and what follows still takes part — through
119
+ * `data-steps` alone. That is what lets an article write the steps in reading order and
120
+ * put the children belonging to several of them at once **after**, where they read as
121
+ * what they are, rather than having their position counted as a step of its own:
122
+ *
123
+ * ```html
124
+ * <div>1</div><div>2</div><div data-last-step>3</div>
125
+ * <div data-steps="0, 1">both of the first two</div>
126
+ * ```
127
+ *
128
+ * Three steps, four children. A trailing child that names no step never lights up, which
129
+ * is the honest reading of « it is not part of the sequence ».
130
+ *
86
131
  * @remarks
87
132
  * **Viewport-driven behaviour is declared, not named by a prop.** `whenVisible` and
88
133
  * `whenHidden` take a verb or a list of them, out of {@link SequencerAction} — `'play'`,
@@ -122,7 +167,13 @@ export const Sequencer = ({ totalSteps, stepMap, step, defaultStep, play, defaul
122
167
  // Children, split once: what takes part and what merely renders.
123
168
  const childrenArr = flattenChildren(children);
124
169
  const elements = childrenArr.filter(isValidElement);
125
- const stepsCount = Math.max(totalSteps ?? elements.length, 0);
170
+ // Three answers to « how long is the sequence », in decreasing order of explicitness:
171
+ // the prop, then the child that says the sequence ends on it, then the count of
172
+ // element children. The prop wins because it is the one a consumer writes knowing the
173
+ // whole, where the mark only knows where it sits.
174
+ const markedLast = elements.findIndex(isLastStep);
175
+ const impliedSteps = markedLast === -1 ? elements.length : markedLast + 1;
176
+ const stepsCount = Math.max(totalSteps ?? impliedSteps, 0);
126
177
  // The two numbers
127
178
  const rawStep = step ?? internalStep;
128
179
  const position = stepsCount > 0
@@ -3,22 +3,22 @@ export * as button from './Button/index.js'
3
3
  export * as clippable from './Clippable/index.js'
4
4
  export * as disclaimer from './Disclaimer/index.js'
5
5
  export * as drawer from './Drawer/index.js'
6
+ export * as eventListener from './EventListener/index.js'
6
7
  export * as gallery from './Gallery/index.js'
7
8
  export * as iframe from './Iframe/index.js'
8
- export * as eventListener from './EventListener/index.js'
9
9
  export * as image from './Image/index.js'
10
- export * as input from './Input/index.js'
11
10
  export * as intersectionObserver from './IntersectionObserver/index.js'
11
+ export * as input from './Input/index.js'
12
12
  export * as jsonEditor from './JsonEditor/index.js'
13
13
  export * as lightbox from './Lightbox/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'
17
17
  export * as resizeObserver from './ResizeObserver/index.js'
18
- export * as scrollListener from './ScrollListener/index.js'
19
18
  export * as scrllgngn from './Scrllgngn/index.js'
20
- export * as select from './Select/index.js'
19
+ export * as scrollListener from './ScrollListener/index.js'
21
20
  export * as sequencer from './Sequencer/index.js'
21
+ export * as select from './Select/index.js'
22
22
  export * as shadowRoot from './ShadowRoot/index.js'
23
23
  export * as subtitles from './Subtitles/index.js'
24
24
  export * as textarea from './Textarea/index.js'
@@ -3,22 +3,22 @@ export * as button from './Button/index.js'
3
3
  export * as clippable from './Clippable/index.js'
4
4
  export * as disclaimer from './Disclaimer/index.js'
5
5
  export * as drawer from './Drawer/index.js'
6
+ export * as eventListener from './EventListener/index.js'
6
7
  export * as gallery from './Gallery/index.js'
7
8
  export * as iframe from './Iframe/index.js'
8
- export * as eventListener from './EventListener/index.js'
9
9
  export * as image from './Image/index.js'
10
- export * as input from './Input/index.js'
11
10
  export * as intersectionObserver from './IntersectionObserver/index.js'
11
+ export * as input from './Input/index.js'
12
12
  export * as jsonEditor from './JsonEditor/index.js'
13
13
  export * as lightbox from './Lightbox/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'
17
17
  export * as resizeObserver from './ResizeObserver/index.js'
18
- export * as scrollListener from './ScrollListener/index.js'
19
18
  export * as scrllgngn from './Scrllgngn/index.js'
20
- export * as select from './Select/index.js'
19
+ export * as scrollListener from './ScrollListener/index.js'
21
20
  export * as sequencer from './Sequencer/index.js'
21
+ export * as select from './Select/index.js'
22
22
  export * as shadowRoot from './ShadowRoot/index.js'
23
23
  export * as subtitles from './Subtitles/index.js'
24
24
  export * as textarea from './Textarea/index.js'
@@ -17,24 +17,14 @@ export type WithClassName<T extends Record<string, unknown>> = T & {
17
17
  * They mirror `ObserverOptions` of the `IntersectionObserver` component, where they
18
18
  * end up. Restated here rather than imported from it: that component reads
19
19
  * {@link WithClassName} from this very file, and the two shouldn't import each other.
20
+ *
21
+ * **`ListLoader` is the last consumer**, and that is the shape of things: a component
22
+ * that watches itself to *do* something now takes `ViewportBehaviours` instead, which
23
+ * carries its own `visibility…` dial. What is left here is for the one that watches a
24
+ * sentinel to load more — no vocabulary, no instructions, just an observer.
20
25
  */
21
26
  export type ViewportObserverOptions = {
22
27
  threshold?: number | number[];
23
28
  root?: HTMLElement;
24
29
  rootMargin?: string;
25
30
  };
26
- /**
27
- * Extends a type with an internal observer's settings and with what it sees.
28
- *
29
- * For a component observing **one** element — itself, usually. A component with
30
- * several observers takes {@link ViewportObserverOptions} alone, since a single
31
- * visibility handler couldn't say which of them crossed.
32
- *
33
- * `Scrllgngn` deliberately stays out of both: its observers take a `rootMargin`
34
- * derived from its `viewportOffset*` props, which are its own version of the dial.
35
- *
36
- * @template T - The base type to extend.
37
- */
38
- export type WithViewportObservation<T extends Record<string, unknown>> = T & ViewportObserverOptions & {
39
- onVisibilityChanged?: (isVisible: boolean) => void;
40
- };
@@ -1,7 +1,7 @@
1
- export * as download from './download/index.js'
2
1
  export * as copy from './copy/index.js'
3
- export * as exists from './exists/index.js'
2
+ export * as download from './download/index.js'
4
3
  export * as move from './move/index.js'
5
- export * as stat from './stat/index.js'
6
4
  export * as remove from './remove/index.js'
5
+ export * as exists from './exists/index.js'
7
6
  export * as upload from './upload/index.js'
7
+ export * as stat from './stat/index.js'
@@ -1,7 +1,7 @@
1
- export * as download from './download/index.js'
2
1
  export * as copy from './copy/index.js'
3
- export * as exists from './exists/index.js'
2
+ export * as download from './download/index.js'
4
3
  export * as move from './move/index.js'
5
- export * as stat from './stat/index.js'
6
4
  export * as remove from './remove/index.js'
5
+ export * as exists from './exists/index.js'
7
6
  export * as upload from './upload/index.js'
7
+ export * as stat from './stat/index.js'
@@ -1,12 +1,12 @@
1
1
  export * as copy from './copy/index.js'
2
2
  export * as download from './download/index.js'
3
- export * as generateSignedUrl from './generate-signed-url/index.js'
4
3
  export * as exists from './exists/index.js'
5
- export * as getMetadata from './get-metadata/index.js'
4
+ export * as generateSignedUrl from './generate-signed-url/index.js'
6
5
  export * as getPermissions from './get-permissions/index.js'
7
6
  export * as move from './move/index.js'
7
+ export * as getMetadata from './get-metadata/index.js'
8
8
  export * as remove from './remove/index.js'
9
- export * as stat from './stat/index.js'
10
9
  export * as revokeSignedUrls from './revoke-signed-urls/index.js'
11
- export * as upload from './upload/index.js'
12
10
  export * as updateMetadata from './update-metadata/index.js'
11
+ export * as upload from './upload/index.js'
12
+ export * as stat from './stat/index.js'
@@ -1,12 +1,12 @@
1
1
  export * as copy from './copy/index.js'
2
2
  export * as download from './download/index.js'
3
- export * as generateSignedUrl from './generate-signed-url/index.js'
4
3
  export * as exists from './exists/index.js'
5
- export * as getMetadata from './get-metadata/index.js'
4
+ export * as generateSignedUrl from './generate-signed-url/index.js'
6
5
  export * as getPermissions from './get-permissions/index.js'
7
6
  export * as move from './move/index.js'
7
+ export * as getMetadata from './get-metadata/index.js'
8
8
  export * as remove from './remove/index.js'
9
- export * as stat from './stat/index.js'
10
9
  export * as revokeSignedUrls from './revoke-signed-urls/index.js'
11
- export * as upload from './upload/index.js'
12
10
  export * as updateMetadata from './update-metadata/index.js'
11
+ export * as upload from './upload/index.js'
12
+ export * as stat from './stat/index.js'
@@ -1,11 +1,11 @@
1
1
  export * as copyDir from './copy-dir/index.js'
2
2
  export * as copyFile from './copy-file/index.js'
3
- export * as downloadFile from './download-file/index.js'
4
3
  export * as existsFile from './exists-file/index.js'
5
4
  export * as listDir from './list-dir/index.js'
6
- export * as moveDir from './move-dir/index.js'
5
+ export * as downloadFile from './download-file/index.js'
7
6
  export * as moveFile from './move-file/index.js'
8
- export * as removeFile from './remove-file/index.js'
9
7
  export * as removeDir from './remove-dir/index.js'
8
+ export * as removeFile from './remove-file/index.js'
10
9
  export * as statFile from './stat-file/index.js'
10
+ export * as moveDir from './move-dir/index.js'
11
11
  export * as uploadFile from './upload-file/index.js'
@@ -1,11 +1,11 @@
1
1
  export * as copyDir from './copy-dir/index.js'
2
2
  export * as copyFile from './copy-file/index.js'
3
- export * as downloadFile from './download-file/index.js'
4
3
  export * as existsFile from './exists-file/index.js'
5
4
  export * as listDir from './list-dir/index.js'
6
- export * as moveDir from './move-dir/index.js'
5
+ export * as downloadFile from './download-file/index.js'
7
6
  export * as moveFile from './move-file/index.js'
8
- export * as removeFile from './remove-file/index.js'
9
7
  export * as removeDir from './remove-dir/index.js'
8
+ export * as removeFile from './remove-file/index.js'
10
9
  export * as statFile from './stat-file/index.js'
10
+ export * as moveDir from './move-dir/index.js'
11
11
  export * as uploadFile from './upload-file/index.js'
@@ -1,2 +1,2 @@
1
- export * as aes_256Gcm from './@aes-256-gcm/index.js'
2
1
  export * as key from './key/index.js'
2
+ export * as aes_256Gcm from './@aes-256-gcm/index.js'
@@ -1,2 +1,2 @@
1
- export * as aes_256Gcm from './@aes-256-gcm/index.js'
2
1
  export * as key from './key/index.js'
2
+ export * as aes_256Gcm from './@aes-256-gcm/index.js'
@@ -1,4 +1,4 @@
1
1
  export * as getSize from './get-size/index.js'
2
- export * as isInDirectory from './is-in-directory/index.js'
3
2
  export * as readWrite from './read-write/index.js'
3
+ export * as isInDirectory from './is-in-directory/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 isInDirectory from './is-in-directory/index.js'
3
2
  export * as readWrite from './read-write/index.js'
3
+ export * as isInDirectory from './is-in-directory/index.js'
4
4
  export * as subpaths from './subpaths/index.js'
@@ -1,7 +1,7 @@
1
- export * as copy from './copy/index.js'
2
- export * as exists from './exists/index.js'
3
1
  export * as download from './download/index.js'
2
+ export * as exists from './exists/index.js'
4
3
  export * as move from './move/index.js'
5
- export * as remove from './remove/index.js'
4
+ export * as copy from './copy/index.js'
6
5
  export * as stat from './stat/index.js'
7
6
  export * as upload from './upload/index.js'
7
+ export * as remove from './remove/index.js'
@@ -1,7 +1,7 @@
1
- export * as copy from './copy/index.js'
2
- export * as exists from './exists/index.js'
3
1
  export * as download from './download/index.js'
2
+ export * as exists from './exists/index.js'
4
3
  export * as move from './move/index.js'
5
- export * as remove from './remove/index.js'
4
+ export * as copy from './copy/index.js'
6
5
  export * as stat from './stat/index.js'
7
6
  export * as upload from './upload/index.js'
7
+ export * as remove from './remove/index.js'
@@ -1,5 +1,5 @@
1
1
  export * as create from './create/index.js'
2
- export * as format from './format/index.js'
3
2
  export * as metadata from './metadata/index.js'
4
3
  export * as transform from './transform/index.js'
4
+ export * as format from './format/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
- export * as format from './format/index.js'
3
2
  export * as metadata from './metadata/index.js'
4
3
  export * as transform from './transform/index.js'
4
+ export * as format from './format/index.js'
5
5
  export * as utils from './utils/index.js'
@@ -1,15 +1,15 @@
1
- export * as blur from './blur/index.js'
2
1
  export * as brighten from './brighten/index.js'
3
2
  export * as extend from './extend/index.js'
4
3
  export * as extract from './extract/index.js'
5
4
  export * as flatten from './flatten/index.js'
6
5
  export * as flip from './flip/index.js'
6
+ export * as blur from './blur/index.js'
7
7
  export * as flop from './flop/index.js'
8
8
  export * as hue from './hue/index.js'
9
- export * as level from './level/index.js'
10
9
  export * as lighten from './lighten/index.js'
10
+ export * as level from './level/index.js'
11
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
- export * as rotate from './rotate/index.js'
15
14
  export * as saturate from './saturate/index.js'
15
+ export * as rotate from './rotate/index.js'
@@ -1,15 +1,15 @@
1
- export * as blur from './blur/index.js'
2
1
  export * as brighten from './brighten/index.js'
3
2
  export * as extend from './extend/index.js'
4
3
  export * as extract from './extract/index.js'
5
4
  export * as flatten from './flatten/index.js'
6
5
  export * as flip from './flip/index.js'
6
+ export * as blur from './blur/index.js'
7
7
  export * as flop from './flop/index.js'
8
8
  export * as hue from './hue/index.js'
9
- export * as level from './level/index.js'
10
9
  export * as lighten from './lighten/index.js'
10
+ export * as level from './level/index.js'
11
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
- export * as rotate from './rotate/index.js'
15
14
  export * as saturate from './saturate/index.js'
15
+ export * as rotate from './rotate/index.js'
package/node/index.d.ts CHANGED
@@ -5,7 +5,7 @@ export * as googleCloud from './@google-cloud/index.js'
5
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
+ export * as ftps from './ftps/index.js'
8
9
  export * as images from './images/index.js'
9
10
  export * as process from './process/index.js'
10
- export * as ftps from './ftps/index.js'
11
11
  export * as sftp from './sftp/index.js'
package/node/index.js CHANGED
@@ -5,7 +5,7 @@ export * as googleCloud from './@google-cloud/index.js'
5
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
+ export * as ftps from './ftps/index.js'
8
9
  export * as images from './images/index.js'
9
10
  export * as process from './process/index.js'
10
- export * as ftps from './ftps/index.js'
11
11
  export * as sftp from './sftp/index.js'
@@ -1,7 +1,7 @@
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'
3
+ export * as download from './download/index.js'
4
4
  export * as move from './move/index.js'
5
5
  export * as remove from './remove/index.js'
6
- export * as stat from './stat/index.js'
7
6
  export * as upload from './upload/index.js'
7
+ export * as stat from './stat/index.js'
@@ -1,7 +1,7 @@
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'
3
+ export * as download from './download/index.js'
4
4
  export * as move from './move/index.js'
5
5
  export * as remove from './remove/index.js'
6
- export * as stat from './stat/index.js'
7
6
  export * as upload from './upload/index.js'
7
+ export * as stat from './stat/index.js'
@@ -1,2 +1,2 @@
1
- export * as file from './file/index.js'
2
1
  export * as directory from './directory/index.js'
2
+ export * as file from './file/index.js'