@design-edito/tools 0.5.19 → 0.5.20

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 (36) hide show
  1. package/agnostic/colors/convert/index.js +0 -1
  2. package/agnostic/colors/index.d.ts +2 -2
  3. package/agnostic/colors/index.js +2 -2
  4. package/agnostic/html/hyper-json/smart-tags/coalesced/index.d.ts +9 -9
  5. package/agnostic/html/hyper-json/smart-tags/coalesced/index.js +9 -9
  6. package/agnostic/html/hyper-json/smart-tags/isolated/index.d.ts +3 -3
  7. package/agnostic/html/hyper-json/smart-tags/isolated/index.js +3 -3
  8. package/agnostic/html/hyper-json/utils/index.js +1 -1
  9. package/agnostic/html/index.d.ts +5 -5
  10. package/agnostic/html/index.js +5 -5
  11. package/agnostic/index.d.ts +6 -6
  12. package/agnostic/index.js +6 -6
  13. package/agnostic/misc/index.d.ts +3 -3
  14. package/agnostic/misc/index.js +3 -3
  15. package/agnostic/misc/logs/index.d.ts +1 -1
  16. package/agnostic/misc/logs/index.js +1 -1
  17. package/agnostic/objects/index.d.ts +3 -3
  18. package/agnostic/objects/index.js +3 -3
  19. package/agnostic/sanitization/index.d.ts +1 -1
  20. package/agnostic/sanitization/index.js +1 -1
  21. package/agnostic/strings/index.d.ts +2 -2
  22. package/agnostic/strings/index.js +2 -2
  23. package/agnostic/time/index.d.ts +2 -2
  24. package/agnostic/time/index.js +2 -2
  25. package/components/Video/index.d.ts +1 -1
  26. package/components/index.d.ts +3 -3
  27. package/components/index.js +3 -3
  28. package/components/utils/viewport-behaviours/index.d.ts +25 -1
  29. package/components/utils/viewport-behaviours/index.js +35 -0
  30. package/components/utils/viewport-behaviours/utils.d.ts +0 -21
  31. package/components/utils/viewport-behaviours/utils.js +0 -31
  32. package/node/@aws-s3/storage/file/index.d.ts +1 -1
  33. package/node/@aws-s3/storage/file/index.js +1 -1
  34. package/node/cloud-storage/operations/index.d.ts +1 -1
  35. package/node/cloud-storage/operations/index.js +1 -1
  36. package/package.json +1 -1
@@ -1,5 +1,4 @@
1
1
  /* eslint-disable @typescript-eslint/no-unsafe-type-assertion -- TransformedColor<C> can't be narrowed from a generic type param at compile time; every assertion here is guarded by an isX(...) runtime check immediately prior */
2
- /* eslint-disable max-lines */
3
2
  import { absoluteModulo } from '../../numbers/absolute-modulo/index.js';
4
3
  import { tidy } from '../tidy/index.js';
5
4
  import { cssColors } from '../cssColorsMap.js';
@@ -5,8 +5,8 @@ export * as distance from './distance/index.js'
5
5
  export * as grayscale from './grayscale/index.js'
6
6
  export * as invert from './invert/index.js'
7
7
  export * as lerp from './lerp/index.js'
8
- export * as luminance from './luminance/index.js'
9
8
  export * as palette from './palette/index.js'
9
+ export * as luminance from './luminance/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'
@@ -5,8 +5,8 @@ export * as distance from './distance/index.js'
5
5
  export * as grayscale from './grayscale/index.js'
6
6
  export * as invert from './invert/index.js'
7
7
  export * as lerp from './lerp/index.js'
8
- export * as luminance from './luminance/index.js'
9
8
  export * as palette from './palette/index.js'
9
+ export * as luminance from './luminance/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'
@@ -4,18 +4,17 @@ 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
6
  export * as call from './call/index.js'
7
+ export * as clone from './clone/index.js'
7
8
  export * as deleteproperties from './deleteproperties/index.js'
8
9
  export * as equals from './equals/index.js'
9
- export * as clone from './clone/index.js'
10
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
13
  export * as hjparse from './hjparse/index.js'
14
14
  export * as hjstringify from './hjstringify/index.js'
15
15
  export * as if from './if/index.js'
16
- export * as length from './length/index.js'
17
- export * as initialize from './initialize/index.js'
18
16
  export * as join from './join/index.js'
17
+ export * as length from './length/index.js'
19
18
  export * as map from './map/index.js'
20
19
  export * as negate from './negate/index.js'
21
20
  export * as notrailing from './notrailing/index.js'
@@ -25,8 +24,9 @@ export * as populate from './populate/index.js'
25
24
  export * as print from './print/index.js'
26
25
  export * as push from './push/index.js'
27
26
  export * as pusheach from './pusheach/index.js'
28
- export * as recordtoarray from './recordtoarray/index.js'
27
+ export * as initialize from './initialize/index.js'
29
28
  export * as removeattribute from './removeattribute/index.js'
29
+ export * as recordtoarray from './recordtoarray/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'
@@ -36,17 +36,17 @@ 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
+ export * as toarray from './toarray/index.js'
39
40
  export * as spread from './spread/index.js'
40
41
  export * as toboolean from './toboolean/index.js'
41
- export * as toarray from './toarray/index.js'
42
42
  export * as toelement from './toelement/index.js'
43
- export * as toggleclass from './toggleclass/index.js'
43
+ export * as tonodelist from './tonodelist/index.js'
44
44
  export * as tonull from './tonull/index.js'
45
+ export * as toggleclass from './toggleclass/index.js'
45
46
  export * as tonumber from './tonumber/index.js'
46
- export * as tonodelist from './tonodelist/index.js'
47
47
  export * as torecord from './torecord/index.js'
48
48
  export * as toref from './toref/index.js'
49
49
  export * as tostring from './tostring/index.js'
50
- export * as transformselected from './transformselected/index.js'
51
- export * as trim from './trim/index.js'
52
50
  export * as totext from './totext/index.js'
51
+ export * as trim from './trim/index.js'
52
+ export * as transformselected from './transformselected/index.js'
@@ -4,18 +4,17 @@ 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
6
  export * as call from './call/index.js'
7
+ export * as clone from './clone/index.js'
7
8
  export * as deleteproperties from './deleteproperties/index.js'
8
9
  export * as equals from './equals/index.js'
9
- export * as clone from './clone/index.js'
10
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
13
  export * as hjparse from './hjparse/index.js'
14
14
  export * as hjstringify from './hjstringify/index.js'
15
15
  export * as if from './if/index.js'
16
- export * as length from './length/index.js'
17
- export * as initialize from './initialize/index.js'
18
16
  export * as join from './join/index.js'
17
+ export * as length from './length/index.js'
19
18
  export * as map from './map/index.js'
20
19
  export * as negate from './negate/index.js'
21
20
  export * as notrailing from './notrailing/index.js'
@@ -25,8 +24,9 @@ export * as populate from './populate/index.js'
25
24
  export * as print from './print/index.js'
26
25
  export * as push from './push/index.js'
27
26
  export * as pusheach from './pusheach/index.js'
28
- export * as recordtoarray from './recordtoarray/index.js'
27
+ export * as initialize from './initialize/index.js'
29
28
  export * as removeattribute from './removeattribute/index.js'
29
+ export * as recordtoarray from './recordtoarray/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'
@@ -36,17 +36,17 @@ 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
+ export * as toarray from './toarray/index.js'
39
40
  export * as spread from './spread/index.js'
40
41
  export * as toboolean from './toboolean/index.js'
41
- export * as toarray from './toarray/index.js'
42
42
  export * as toelement from './toelement/index.js'
43
- export * as toggleclass from './toggleclass/index.js'
43
+ export * as tonodelist from './tonodelist/index.js'
44
44
  export * as tonull from './tonull/index.js'
45
+ export * as toggleclass from './toggleclass/index.js'
45
46
  export * as tonumber from './tonumber/index.js'
46
- export * as tonodelist from './tonodelist/index.js'
47
47
  export * as torecord from './torecord/index.js'
48
48
  export * as toref from './toref/index.js'
49
49
  export * as tostring from './tostring/index.js'
50
- export * as transformselected from './transformselected/index.js'
51
- export * as trim from './trim/index.js'
52
50
  export * as totext from './totext/index.js'
51
+ export * as trim from './trim/index.js'
52
+ export * as transformselected from './transformselected/index.js'
@@ -1,13 +1,13 @@
1
- export * as array from './array/index.js'
2
1
  export * as any from './any/index.js'
2
+ export * as array from './array/index.js'
3
+ export * as boolean from './boolean/index.js'
3
4
  export * as element from './element/index.js'
4
5
  export * as get from './get/index.js'
5
6
  export * as nodelist from './nodelist/index.js'
6
- export * as guess from './guess/index.js'
7
7
  export * as null from './null/index.js'
8
- export * as boolean from './boolean/index.js'
9
8
  export * as number from './number/index.js'
10
9
  export * as record from './record/index.js'
10
+ export * as guess from './guess/index.js'
11
11
  export * as string from './string/index.js'
12
12
  export * as ref from './ref/index.js'
13
13
  export * as text from './text/index.js'
@@ -1,13 +1,13 @@
1
- export * as array from './array/index.js'
2
1
  export * as any from './any/index.js'
2
+ export * as array from './array/index.js'
3
+ export * as boolean from './boolean/index.js'
3
4
  export * as element from './element/index.js'
4
5
  export * as get from './get/index.js'
5
6
  export * as nodelist from './nodelist/index.js'
6
- export * as guess from './guess/index.js'
7
7
  export * as null from './null/index.js'
8
- export * as boolean from './boolean/index.js'
9
8
  export * as number from './number/index.js'
10
9
  export * as record from './record/index.js'
10
+ export * as guess from './guess/index.js'
11
11
  export * as string from './string/index.js'
12
12
  export * as ref from './ref/index.js'
13
13
  export * as text from './text/index.js'
@@ -1,4 +1,4 @@
1
- /* eslint-disable max-lines, @typescript-eslint/no-unsafe-type-assertion -- generic type params (T/K/Value) and DOM NodeList casts here can't be narrowed from a generic/runtime check at compile time; guarded by runtime typeCheck(s)/instanceof checks immediately prior */
1
+ /* eslint-disable @typescript-eslint/no-unsafe-type-assertion -- generic type params (T/K/Value) and DOM NodeList casts here can't be narrowed from a generic/runtime check at compile time; guarded by runtime typeCheck(s)/instanceof checks immediately prior */
2
2
  import * as Window from '../../../misc/crossenv/window/index.js';
3
3
  import { isRecord } from '../../../objects/is-record/index.js';
4
4
  import { recordMap } from '../../../objects/record-map/index.js';
@@ -1,10 +1,10 @@
1
- export * as deepSelect from './deep-select/index.js'
2
1
  export * as getNodeAncestors from './get-node-ancestors/index.js'
3
2
  export * as getPositionInsideParent from './get-position-inside-parent/index.js'
4
- export * as insertNode from './insert-node/index.js'
5
3
  export * as hyperJson from './hyper-json/index.js'
6
- export * as replaceInElement from './replace-in-element/index.js'
7
- export * as selectorToElement from './selector-to-element/index.js'
4
+ export * as insertNode from './insert-node/index.js'
8
5
  export * as placeholders from './placeholders/index.js'
9
- export * as stringToNodes from './string-to-nodes/index.js'
6
+ export * as replaceInElement from './replace-in-element/index.js'
7
+ export * as deepSelect from './deep-select/index.js'
10
8
  export * as watchSelection from './watch-selection/index.js'
9
+ export * as stringToNodes from './string-to-nodes/index.js'
10
+ export * as selectorToElement from './selector-to-element/index.js'
@@ -1,10 +1,10 @@
1
- export * as deepSelect from './deep-select/index.js'
2
1
  export * as getNodeAncestors from './get-node-ancestors/index.js'
3
2
  export * as getPositionInsideParent from './get-position-inside-parent/index.js'
4
- export * as insertNode from './insert-node/index.js'
5
3
  export * as hyperJson from './hyper-json/index.js'
6
- export * as replaceInElement from './replace-in-element/index.js'
7
- export * as selectorToElement from './selector-to-element/index.js'
4
+ export * as insertNode from './insert-node/index.js'
8
5
  export * as placeholders from './placeholders/index.js'
9
- export * as stringToNodes from './string-to-nodes/index.js'
6
+ export * as replaceInElement from './replace-in-element/index.js'
7
+ export * as deepSelect from './deep-select/index.js'
10
8
  export * as watchSelection from './watch-selection/index.js'
9
+ export * as stringToNodes from './string-to-nodes/index.js'
10
+ export * as selectorToElement from './selector-to-element/index.js'
@@ -1,17 +1,17 @@
1
1
  export * as arrays from './arrays/index.js'
2
2
  export * as booleans from './booleans/index.js'
3
3
  export * as colors from './colors/index.js'
4
- export * as css from './css/index.js'
5
4
  export * as errors from './errors/index.js'
6
- export * as html from './html/index.js'
5
+ export * as css from './css/index.js'
7
6
  export * as misc from './misc/index.js'
8
- export * as objects from './objects/index.js'
9
- export * as optim from './optim/index.js'
7
+ export * as html from './html/index.js'
10
8
  export * as numbers from './numbers/index.js'
9
+ export * as objects from './objects/index.js'
11
10
  export * as random from './random/index.js'
12
11
  export * as regexps from './regexps/index.js'
13
- export * as sanitization from './sanitization/index.js'
14
12
  export * as strings from './strings/index.js'
15
- export * as subtitles from './subtitles/index.js'
13
+ export * as sanitization from './sanitization/index.js'
16
14
  export * as time from './time/index.js'
17
15
  export * as typescript from './typescript/index.js'
16
+ export * as subtitles from './subtitles/index.js'
17
+ export * as optim from './optim/index.js'
package/agnostic/index.js CHANGED
@@ -1,17 +1,17 @@
1
1
  export * as arrays from './arrays/index.js'
2
2
  export * as booleans from './booleans/index.js'
3
3
  export * as colors from './colors/index.js'
4
- export * as css from './css/index.js'
5
4
  export * as errors from './errors/index.js'
6
- export * as html from './html/index.js'
5
+ export * as css from './css/index.js'
7
6
  export * as misc from './misc/index.js'
8
- export * as objects from './objects/index.js'
9
- export * as optim from './optim/index.js'
7
+ export * as html from './html/index.js'
10
8
  export * as numbers from './numbers/index.js'
9
+ export * as objects from './objects/index.js'
11
10
  export * as random from './random/index.js'
12
11
  export * as regexps from './regexps/index.js'
13
- export * as sanitization from './sanitization/index.js'
14
12
  export * as strings from './strings/index.js'
15
- export * as subtitles from './subtitles/index.js'
13
+ export * as sanitization from './sanitization/index.js'
16
14
  export * as time from './time/index.js'
17
15
  export * as typescript from './typescript/index.js'
16
+ export * as subtitles from './subtitles/index.js'
17
+ export * as optim from './optim/index.js'
@@ -1,12 +1,12 @@
1
1
  export * as assert from './assert/index.js'
2
2
  export * as cast from './cast/index.js'
3
+ export * as connection from './connection/index.js'
3
4
  export * as crawler from './crawler/index.js'
4
5
  export * as crossenv from './crossenv/index.js'
5
- export * as connection from './connection/index.js'
6
- export * as isConstructorFunction from './is-constructor-function/index.js'
7
6
  export * as dataSize from './data-size/index.js'
7
+ export * as isConstructorFunction from './is-constructor-function/index.js'
8
8
  export * as isNullish from './is-nullish/index.js'
9
9
  export * as logs from './logs/index.js'
10
10
  export * as loremIpsum from './lorem-ipsum/index.js'
11
- export * as normalizeExtension from './normalize-extension/index.js'
12
11
  export * as outcome from './outcome/index.js'
12
+ export * as normalizeExtension from './normalize-extension/index.js'
@@ -1,12 +1,12 @@
1
1
  export * as assert from './assert/index.js'
2
2
  export * as cast from './cast/index.js'
3
+ export * as connection from './connection/index.js'
3
4
  export * as crawler from './crawler/index.js'
4
5
  export * as crossenv from './crossenv/index.js'
5
- export * as connection from './connection/index.js'
6
- export * as isConstructorFunction from './is-constructor-function/index.js'
7
6
  export * as dataSize from './data-size/index.js'
7
+ export * as isConstructorFunction from './is-constructor-function/index.js'
8
8
  export * as isNullish from './is-nullish/index.js'
9
9
  export * as logs from './logs/index.js'
10
10
  export * as loremIpsum from './lorem-ipsum/index.js'
11
- export * as normalizeExtension from './normalize-extension/index.js'
12
11
  export * as outcome from './outcome/index.js'
12
+ export * as normalizeExtension from './normalize-extension/index.js'
@@ -1,3 +1,3 @@
1
- export * as makeTextBlock from './make-text-block/index.js'
2
1
  export * as logger from './logger/index.js'
2
+ export * as makeTextBlock from './make-text-block/index.js'
3
3
  export * as styles from './styles/index.js'
@@ -1,3 +1,3 @@
1
- export * as makeTextBlock from './make-text-block/index.js'
2
1
  export * as logger from './logger/index.js'
2
+ export * as makeTextBlock from './make-text-block/index.js'
3
3
  export * as styles from './styles/index.js'
@@ -1,9 +1,9 @@
1
1
  export * as deepGetProperty from './deep-get-property/index.js'
2
2
  export * as enums from './enums/index.js'
3
- export * as flattenGetters from './flatten-getters/index.js'
3
+ export * as isObject from './is-object/index.js'
4
4
  export * as isRecord from './is-record/index.js'
5
5
  export * as recordFormat from './record-format/index.js'
6
- export * as isObject from './is-object/index.js'
7
- export * as recordMap from './record-map/index.js'
6
+ export * as flattenGetters from './flatten-getters/index.js'
8
7
  export * as sortKeys from './sort-keys/index.js'
8
+ export * as recordMap from './record-map/index.js'
9
9
  export * as validation from './validation/index.js'
@@ -1,9 +1,9 @@
1
1
  export * as deepGetProperty from './deep-get-property/index.js'
2
2
  export * as enums from './enums/index.js'
3
- export * as flattenGetters from './flatten-getters/index.js'
3
+ export * as isObject from './is-object/index.js'
4
4
  export * as isRecord from './is-record/index.js'
5
5
  export * as recordFormat from './record-format/index.js'
6
- export * as isObject from './is-object/index.js'
7
- export * as recordMap from './record-map/index.js'
6
+ export * as flattenGetters from './flatten-getters/index.js'
8
7
  export * as sortKeys from './sort-keys/index.js'
8
+ export * as recordMap from './record-map/index.js'
9
9
  export * as validation from './validation/index.js'
@@ -1,4 +1,4 @@
1
- export * as fileName from './file-name/index.js'
2
1
  export * as html from './html/index.js'
3
2
  export * as path from './path/index.js'
4
3
  export * as userInput from './user-input/index.js'
4
+ export * as fileName from './file-name/index.js'
@@ -1,4 +1,4 @@
1
- export * as fileName from './file-name/index.js'
2
1
  export * as html from './html/index.js'
3
2
  export * as path from './path/index.js'
4
3
  export * as userInput from './user-input/index.js'
4
+ export * as fileName from './file-name/index.js'
@@ -1,8 +1,8 @@
1
+ export * as matches from './matches/index.js'
1
2
  export * as charCodes from './char-codes/index.js'
2
3
  export * as normalizeIndent from './normalize-indent/index.js'
3
4
  export * as parseTable from './parse-table/index.js'
4
- export * as matches from './matches/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'
8
7
  export * as trim from './trim/index.js'
8
+ export * as splitTrim from './split-trim/index.js'
@@ -1,8 +1,8 @@
1
+ export * as matches from './matches/index.js'
1
2
  export * as charCodes from './char-codes/index.js'
2
3
  export * as normalizeIndent from './normalize-indent/index.js'
3
4
  export * as parseTable from './parse-table/index.js'
4
- export * as matches from './matches/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'
8
7
  export * as trim from './trim/index.js'
8
+ export * as splitTrim from './split-trim/index.js'
@@ -1,5 +1,5 @@
1
- export * as duration from './duration/index.js'
2
- export * as timeout from './timeout/index.js'
3
1
  export * as dates from './dates/index.js'
2
+ export * as duration from './duration/index.js'
4
3
  export * as transitions from './transitions/index.js'
4
+ export * as timeout from './timeout/index.js'
5
5
  export * as wait from './wait/index.js'
@@ -1,5 +1,5 @@
1
- export * as duration from './duration/index.js'
2
- export * as timeout from './timeout/index.js'
3
1
  export * as dates from './dates/index.js'
2
+ export * as duration from './duration/index.js'
4
3
  export * as transitions from './transitions/index.js'
4
+ export * as timeout from './timeout/index.js'
5
5
  export * as wait from './wait/index.js'
@@ -1,5 +1,5 @@
1
1
  import { type FunctionComponent } from 'react';
2
- import { type ViewportBehaviours } from '../utils/viewport-behaviours/index.js';
2
+ import type { ViewportBehaviours } from '../utils/viewport-behaviours/types.js';
3
3
  import type { VideoAction } from './types.js';
4
4
  import { type Props as ControlledProps } from './index.controlled.js';
5
5
  /**
@@ -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'
@@ -22,8 +22,8 @@ export * as sequencer from './Sequencer/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'
25
- export * as uiModule from './UIModule/index.js'
26
25
  export * as video from './Video/index.js'
27
- export * as wipAudioQuote from './_WIP_AudioQuote/index.js'
26
+ export * as uiModule from './UIModule/index.js'
28
27
  export * as wipIcon from './_WIP_Icon/index.js'
28
+ export * as wipAudioQuote from './_WIP_AudioQuote/index.js'
29
29
  export * as utils from './utils/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'
@@ -22,8 +22,8 @@ export * as sequencer from './Sequencer/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'
25
- export * as uiModule from './UIModule/index.js'
26
25
  export * as video from './Video/index.js'
27
- export * as wipAudioQuote from './_WIP_AudioQuote/index.js'
26
+ export * as uiModule from './UIModule/index.js'
28
27
  export * as wipIcon from './_WIP_Icon/index.js'
28
+ export * as wipAudioQuote from './_WIP_AudioQuote/index.js'
29
29
  export * as utils from './utils/index.js'
@@ -1,5 +1,30 @@
1
1
  import { type RefObject } from 'react';
2
2
  import type { ActionTable, ViewportBehaviours, VisibilityOptions } from './types.js';
3
+ /**
4
+ * Whether a string is an instruction this vocabulary answers to.
5
+ *
6
+ * **It lives in the entry point and not next to `parseInstruction`**, which is where it
7
+ * belongs by subject, because the publish step only maps `index.js` and `types.js` into
8
+ * the package's exports — a `utils.js` is unreachable from outside, whatever it holds.
9
+ *
10
+ * **Exported for the consumers that receive their props as text.** lm-link reads an
11
+ * article's XML, where nothing is typed, and has to reject `'jump-to:banana'` before it
12
+ * reaches a component. Written on its side, the rule would exist twice and drift in
13
+ * silence — a verb added here would be rejected there for no visible reason.
14
+ *
15
+ * Returns a plain boolean rather than a type predicate, and that is not an oversight: a
16
+ * verb taking an argument is written `'jump-to:500'`, which is not a member of the verb
17
+ * list this checks against. Narrowing to `Instruction<A>` would therefore claim more than
18
+ * the list can support, and the caller that needs the narrow type is better off asserting
19
+ * it once, where it can say why.
20
+ *
21
+ * @param value - What the consumer wrote.
22
+ * @param verbs - The vocabulary, bare — `VIDEO_VERBS` and its like.
23
+ * @param withArgument - Those of them that take one, and what a valid one looks like. A
24
+ * verb given an argument it does not take, or denied one it needs, fails either way:
25
+ * both are a consumer meaning something the component cannot do.
26
+ */
27
+ export declare function isInstruction(value: unknown, verbs: readonly string[], withArgument?: Readonly<Partial<Record<string, (arg: string) => boolean>>>): boolean;
3
28
  /**
4
29
  * Whether the element counts as visible — **as a state, not as a crossing**.
5
30
  *
@@ -51,4 +76,3 @@ export type ViewportBehavioursResult = {
51
76
  * and yielding is the silent one.
52
77
  */
53
78
  export declare function useViewportBehaviours<A extends string>(targetRef: RefObject<Element | null>, props: ViewportBehaviours<A>, table: ActionTable<A>, suspended?: boolean): ViewportBehavioursResult;
54
- export type { ActionSpec, ActionTable, Instruction, Modifier, ParsedInstruction, ViewportBehaviours, VisibilityOptions } from './types.js';
@@ -2,6 +2,41 @@ import { useCallback, useEffect, useRef, useState } from 'react';
2
2
  import { useIntersectionObserver } from '../../IntersectionObserver/index.js';
3
3
  import { useChangeDispatch } from '../index.js';
4
4
  import { parseInstruction, toInstructionList } from './utils.js';
5
+ /**
6
+ * Whether a string is an instruction this vocabulary answers to.
7
+ *
8
+ * **It lives in the entry point and not next to `parseInstruction`**, which is where it
9
+ * belongs by subject, because the publish step only maps `index.js` and `types.js` into
10
+ * the package's exports — a `utils.js` is unreachable from outside, whatever it holds.
11
+ *
12
+ * **Exported for the consumers that receive their props as text.** lm-link reads an
13
+ * article's XML, where nothing is typed, and has to reject `'jump-to:banana'` before it
14
+ * reaches a component. Written on its side, the rule would exist twice and drift in
15
+ * silence — a verb added here would be rejected there for no visible reason.
16
+ *
17
+ * Returns a plain boolean rather than a type predicate, and that is not an oversight: a
18
+ * verb taking an argument is written `'jump-to:500'`, which is not a member of the verb
19
+ * list this checks against. Narrowing to `Instruction<A>` would therefore claim more than
20
+ * the list can support, and the caller that needs the narrow type is better off asserting
21
+ * it once, where it can say why.
22
+ *
23
+ * @param value - What the consumer wrote.
24
+ * @param verbs - The vocabulary, bare — `VIDEO_VERBS` and its like.
25
+ * @param withArgument - Those of them that take one, and what a valid one looks like. A
26
+ * verb given an argument it does not take, or denied one it needs, fails either way:
27
+ * both are a consumer meaning something the component cannot do.
28
+ */
29
+ export function isInstruction(value, verbs, withArgument = {}) {
30
+ if (typeof value !== 'string')
31
+ return false;
32
+ const { verb, arg } = parseInstruction(value);
33
+ if (!verbs.includes(verb))
34
+ return false;
35
+ const validate = withArgument[verb];
36
+ if (validate === undefined)
37
+ return arg === undefined;
38
+ return arg !== undefined && validate(arg);
39
+ }
5
40
  /**
6
41
  * Whether the element counts as visible — **as a state, not as a crossing**.
7
42
  *
@@ -24,24 +24,3 @@ export declare function parseInstruction(instruction: string): ParsedInstruction
24
24
  * @returns The instructions in the order they were given, which is the order they run.
25
25
  */
26
26
  export declare function toInstructionList<A extends string>(given: Instruction<A> | Array<Instruction<A>> | undefined): Array<Instruction<A>>;
27
- /**
28
- * Whether a string is an instruction this vocabulary answers to.
29
- *
30
- * **Exported for the consumers that receive their props as text.** lm-link reads an
31
- * article's XML, where nothing is typed, and has to reject `'jump-to:banana'` before it
32
- * reaches a component. Written on its side, the rule would exist twice and drift in
33
- * silence — a verb added here would be rejected there for no visible reason.
34
- *
35
- * Returns a plain boolean rather than a type predicate, and that is not an oversight: a
36
- * verb taking an argument is written `'jump-to:500'`, which is not a member of the verb
37
- * list this checks against. Narrowing to `Instruction<A>` would therefore claim more than
38
- * the list can support, and the caller that needs the narrow type is better off asserting
39
- * it once, where it can say why.
40
- *
41
- * @param value - What the consumer wrote.
42
- * @param verbs - The vocabulary, bare — `VIDEO_VERBS` and its like.
43
- * @param withArgument - Those of them that take one, and what a valid one looks like. A
44
- * verb given an argument it does not take, or denied one it needs, fails either way:
45
- * both are a consumer meaning something the component cannot do.
46
- */
47
- export declare function isInstruction(value: unknown, verbs: readonly string[], withArgument?: Readonly<Partial<Record<string, (arg: string) => boolean>>>): boolean;
@@ -53,34 +53,3 @@ export function toInstructionList(given) {
53
53
  return given;
54
54
  return [given];
55
55
  }
56
- /**
57
- * Whether a string is an instruction this vocabulary answers to.
58
- *
59
- * **Exported for the consumers that receive their props as text.** lm-link reads an
60
- * article's XML, where nothing is typed, and has to reject `'jump-to:banana'` before it
61
- * reaches a component. Written on its side, the rule would exist twice and drift in
62
- * silence — a verb added here would be rejected there for no visible reason.
63
- *
64
- * Returns a plain boolean rather than a type predicate, and that is not an oversight: a
65
- * verb taking an argument is written `'jump-to:500'`, which is not a member of the verb
66
- * list this checks against. Narrowing to `Instruction<A>` would therefore claim more than
67
- * the list can support, and the caller that needs the narrow type is better off asserting
68
- * it once, where it can say why.
69
- *
70
- * @param value - What the consumer wrote.
71
- * @param verbs - The vocabulary, bare — `VIDEO_VERBS` and its like.
72
- * @param withArgument - Those of them that take one, and what a valid one looks like. A
73
- * verb given an argument it does not take, or denied one it needs, fails either way:
74
- * both are a consumer meaning something the component cannot do.
75
- */
76
- export function isInstruction(value, verbs, withArgument = {}) {
77
- if (typeof value !== 'string')
78
- return false;
79
- const { verb, arg } = parseInstruction(value);
80
- if (!verbs.includes(verb))
81
- return false;
82
- const validate = withArgument[verb];
83
- if (validate === undefined)
84
- return arg === undefined;
85
- return arg !== undefined && validate(arg);
86
- }
@@ -1,6 +1,6 @@
1
1
  export * as copy from './copy/index.js'
2
- export * as exists from './exists/index.js'
3
2
  export * as download from './download/index.js'
3
+ export * as exists from './exists/index.js'
4
4
  export * as move from './move/index.js'
5
5
  export * as remove from './remove/index.js'
6
6
  export * as stat from './stat/index.js'
@@ -1,6 +1,6 @@
1
1
  export * as copy from './copy/index.js'
2
- export * as exists from './exists/index.js'
3
2
  export * as download from './download/index.js'
3
+ export * as exists from './exists/index.js'
4
4
  export * as move from './move/index.js'
5
5
  export * as remove from './remove/index.js'
6
6
  export * as stat from './stat/index.js'
@@ -1,7 +1,7 @@
1
1
  export * as copyDir from './copy-dir/index.js'
2
- export * as downloadFile from './download-file/index.js'
3
2
  export * as copyFile from './copy-file/index.js'
4
3
  export * as existsFile from './exists-file/index.js'
4
+ export * as downloadFile from './download-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'
@@ -1,7 +1,7 @@
1
1
  export * as copyDir from './copy-dir/index.js'
2
- export * as downloadFile from './download-file/index.js'
3
2
  export * as copyFile from './copy-file/index.js'
4
3
  export * as existsFile from './exists-file/index.js'
4
+ export * as downloadFile from './download-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'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@design-edito/tools",
3
- "version": "0.5.19",
3
+ "version": "0.5.20",
4
4
  "description": "",
5
5
  "author": "Maxime Fabas",
6
6
  "license": "ISC",