@design-edito/tools 0.3.10 → 0.3.12
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.
- package/agnostic/colors/index.d.ts +2 -2
- package/agnostic/colors/index.js +2 -2
- package/agnostic/css/clss/index.d.ts +53 -1
- package/agnostic/css/clss/index.js +1 -1
- package/agnostic/css/index.d.ts +1 -1
- package/agnostic/css/index.js +1 -1
- package/agnostic/html/hyper-json/smart-tags/coalesced/index.d.ts +15 -15
- package/agnostic/html/hyper-json/smart-tags/coalesced/index.js +15 -15
- package/agnostic/html/hyper-json/smart-tags/isolated/index.d.ts +6 -6
- package/agnostic/html/hyper-json/smart-tags/isolated/index.js +6 -6
- package/agnostic/index.d.ts +4 -4
- package/agnostic/index.js +4 -4
- package/agnostic/misc/assert/index.d.ts +3 -0
- package/agnostic/misc/index.d.ts +2 -2
- package/agnostic/misc/index.js +2 -2
- package/agnostic/misc/logs/index.d.ts +1 -1
- package/agnostic/misc/logs/index.js +1 -1
- package/agnostic/misc/logs/logger/index.d.ts +10 -0
- package/agnostic/misc/logs/logger/index.js +40 -10
- package/agnostic/misc/logs/styles/index.d.ts +1 -0
- package/agnostic/misc/logs/styles/index.js +27 -9
- package/agnostic/numbers/index.d.ts +2 -2
- package/agnostic/numbers/index.js +2 -2
- package/agnostic/objects/index.d.ts +2 -2
- package/agnostic/objects/index.js +2 -2
- package/agnostic/optim/index.d.ts +1 -1
- package/agnostic/optim/index.js +1 -1
- package/agnostic/random/index.d.ts +1 -1
- package/agnostic/random/index.js +1 -1
- package/agnostic/sanitization/index.d.ts +2 -2
- package/agnostic/sanitization/index.js +2 -2
- package/agnostic/strings/index.d.ts +1 -1
- package/agnostic/strings/index.js +1 -1
- package/agnostic/time/index.d.ts +1 -1
- package/agnostic/time/index.js +1 -1
- package/agnostic/time/transitions/index.d.ts +3 -3
- package/agnostic/time/transitions/index.js +4 -4
- package/components/BeforeAfter/index.controlled.d.ts +46 -0
- package/components/BeforeAfter/index.d.ts +55 -0
- package/components/BeforeAfter/index.js +40 -0
- package/components/BeforeAfter/utils.d.ts +4 -0
- package/components/Disclaimer/index.d.ts +45 -0
- package/components/Disclaimer/index.js +70 -0
- package/components/Disclaimer/styles.module.css +0 -0
- package/components/Drawer/index.d.ts +45 -0
- package/components/Drawer/index.js +82 -0
- package/components/Drawer/styles.module.css +0 -0
- package/components/EventListener/index.d.ts +20 -3
- package/components/EventListener/index.js +15 -22
- package/components/Gallery/index.d.ts +67 -0
- package/components/Gallery/index.js +173 -0
- package/components/Gallery/styles.module.css +33 -0
- package/components/Gallery/utils.d.ts +1 -0
- package/components/Image/index.d.ts +60 -0
- package/components/Image/index.js +99 -0
- package/components/Image/styles.module.css +0 -0
- package/components/IntersectionObserver/index.d.ts +48 -11
- package/components/IntersectionObserver/index.js +13 -22
- package/components/Paginator/index.d.ts +72 -0
- package/components/Paginator/index.js +116 -0
- package/components/Paginator/styles.module.css +9 -0
- package/components/ResizeObserver/index.d.ts +27 -0
- package/components/ResizeObserver/index.js +81 -0
- package/components/Scrllgngn/index.d.ts +123 -0
- package/components/Scrllgngn/index.js +175 -0
- package/components/Scrllgngn/styles.module.css +74 -0
- package/components/ScrollListener/index.d.ts +47 -0
- package/components/ScrollListener/index.js +110 -0
- package/components/ScrollListener/styles.module.css +0 -0
- package/components/ScrollListener/utils.d.ts +41 -0
- package/components/Sequencer/index.controlled.d.ts +78 -0
- package/components/Sequencer/index.d.ts +85 -0
- package/components/Sequencer/index.js +109 -0
- package/components/Sequencer/styles.module.css +0 -0
- package/components/ShadowRoot/index.d.ts +35 -0
- package/components/ShadowRoot/index.js +56 -0
- package/components/ShadowRoot/styles.module.css +0 -0
- package/components/Subtitles/index.d.ts +58 -0
- package/components/Subtitles/index.js +111 -0
- package/components/Subtitles/styles.module.css +0 -0
- package/components/Subtitles/types.d.ts +10 -0
- package/components/Subtitles/types.js +0 -0
- package/components/Subtitles/utils.d.ts +28 -0
- package/components/Theatre/index.d.ts +64 -0
- package/components/Theatre/index.js +97 -0
- package/components/Theatre/styles.module.css +0 -0
- package/components/UIModule/index.d.ts +85 -0
- package/components/UIModule/index.js +134 -0
- package/components/UIModule/styles.module.css +0 -0
- package/components/Video/index.d.ts +139 -0
- package/components/Video/index.js +385 -0
- package/components/Video/styles.module.css +0 -0
- package/components/Video/utils.d.ts +14 -0
- package/components/_WIP_AudioQuote/index.d.ts +1 -0
- package/components/_WIP_AudioQuote/index.js +0 -0
- package/components/_WIP_Icon/index.d.ts +1 -0
- package/components/_WIP_Icon/index.js +0 -0
- package/components/index.d.ts +18 -1
- package/components/index.js +18 -1
- package/components/public-classnames.d.ts +17 -3
- package/components/utils/index.d.ts +1 -0
- package/components/utils/index.js +12 -0
- package/components/utils/types.d.ts +3 -0
- package/components/utils/types.js +0 -0
- package/index.d.ts +1 -1
- package/index.js +1 -1
- package/node/@aws-s3/index.test.d.ts +1 -0
- package/node/@aws-s3/storage/file/index.d.ts +3 -3
- package/node/@aws-s3/storage/file/index.js +3 -3
- package/node/@google-cloud/storage/directory/index.d.ts +1 -1
- package/node/@google-cloud/storage/directory/index.js +1 -1
- package/node/@google-cloud/storage/file/index.d.ts +4 -4
- package/node/@google-cloud/storage/file/index.js +4 -4
- package/node/cloud-storage/operations/index.d.ts +1 -1
- package/node/cloud-storage/operations/index.js +1 -1
- package/node/ftps/directory/index.d.ts +1 -1
- package/node/ftps/directory/index.js +1 -1
- package/node/ftps/file/index.d.ts +1 -1
- package/node/ftps/file/index.js +1 -1
- package/node/images/index.d.ts +1 -1
- package/node/images/index.js +1 -1
- package/node/images/transform/operations/index.d.ts +4 -4
- package/node/images/transform/operations/index.js +4 -4
- package/node/index.d.ts +3 -3
- package/node/index.js +3 -3
- package/node/process/spawner/index.d.ts +61 -2
- package/node/process/spawner/index.js +6 -6
- package/node/sftp/file/index.d.ts +3 -3
- package/node/sftp/file/index.js +3 -3
- package/package.json +1051 -13
- package/components/Input/index.d.ts +0 -7
- package/components/Input/index.js +0 -29
- /package/components/{Input → BeforeAfter}/styles.module.css +0 -0
package/node/images/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export * as create from './create/index.js'
|
|
2
|
+
export * as format from './format/index.js'
|
|
2
3
|
export * as metadata from './metadata/index.js'
|
|
3
4
|
export * as transform from './transform/index.js'
|
|
4
5
|
export * as utils from './utils/index.js'
|
|
5
|
-
export * as format from './format/index.js'
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
export * as blur from './blur/index.js'
|
|
2
2
|
export * as brighten from './brighten/index.js'
|
|
3
|
-
export * as extract from './extract/index.js'
|
|
4
3
|
export * as extend from './extend/index.js'
|
|
4
|
+
export * as extract from './extract/index.js'
|
|
5
5
|
export * as flatten from './flatten/index.js'
|
|
6
|
+
export * as flip from './flip/index.js'
|
|
6
7
|
export * as flop from './flop/index.js'
|
|
7
8
|
export * as hue from './hue/index.js'
|
|
8
9
|
export * as level from './level/index.js'
|
|
9
10
|
export * as lighten from './lighten/index.js'
|
|
10
|
-
export * as
|
|
11
|
+
export * as normalize from './normalize/index.js'
|
|
11
12
|
export * as overlay from './overlay/index.js'
|
|
12
|
-
export * as rotate from './rotate/index.js'
|
|
13
13
|
export * as resize from './resize/index.js'
|
|
14
|
-
export * as
|
|
14
|
+
export * as rotate from './rotate/index.js'
|
|
15
15
|
export * as saturate from './saturate/index.js'
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
export * as blur from './blur/index.js'
|
|
2
2
|
export * as brighten from './brighten/index.js'
|
|
3
|
-
export * as extract from './extract/index.js'
|
|
4
3
|
export * as extend from './extend/index.js'
|
|
4
|
+
export * as extract from './extract/index.js'
|
|
5
5
|
export * as flatten from './flatten/index.js'
|
|
6
|
+
export * as flip from './flip/index.js'
|
|
6
7
|
export * as flop from './flop/index.js'
|
|
7
8
|
export * as hue from './hue/index.js'
|
|
8
9
|
export * as level from './level/index.js'
|
|
9
10
|
export * as lighten from './lighten/index.js'
|
|
10
|
-
export * as
|
|
11
|
+
export * as normalize from './normalize/index.js'
|
|
11
12
|
export * as overlay from './overlay/index.js'
|
|
12
|
-
export * as rotate from './rotate/index.js'
|
|
13
13
|
export * as resize from './resize/index.js'
|
|
14
|
-
export * as
|
|
14
|
+
export * as rotate from './rotate/index.js'
|
|
15
15
|
export * as saturate from './saturate/index.js'
|
package/node/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
export * as awsS3 from './@aws-s3/index.js'
|
|
2
2
|
export * as designEdito from './@design-edito/index.js'
|
|
3
|
-
export * as googleCloud from './@google-cloud/index.js'
|
|
4
3
|
export * as express from './@express/index.js'
|
|
5
|
-
export * as
|
|
4
|
+
export * as googleCloud from './@google-cloud/index.js'
|
|
6
5
|
export * as cloudStorage from './cloud-storage/index.js'
|
|
7
6
|
export * as files from './files/index.js'
|
|
8
|
-
export * as
|
|
7
|
+
export * as encryption from './encryption/index.js'
|
|
9
8
|
export * as images from './images/index.js'
|
|
9
|
+
export * as ftps from './ftps/index.js'
|
|
10
10
|
export * as process from './process/index.js'
|
|
11
11
|
export * as sftp from './sftp/index.js'
|
package/node/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
export * as awsS3 from './@aws-s3/index.js'
|
|
2
2
|
export * as designEdito from './@design-edito/index.js'
|
|
3
|
-
export * as googleCloud from './@google-cloud/index.js'
|
|
4
3
|
export * as express from './@express/index.js'
|
|
5
|
-
export * as
|
|
4
|
+
export * as googleCloud from './@google-cloud/index.js'
|
|
6
5
|
export * as cloudStorage from './cloud-storage/index.js'
|
|
7
6
|
export * as files from './files/index.js'
|
|
8
|
-
export * as
|
|
7
|
+
export * as encryption from './encryption/index.js'
|
|
9
8
|
export * as images from './images/index.js'
|
|
9
|
+
export * as ftps from './ftps/index.js'
|
|
10
10
|
export * as process from './process/index.js'
|
|
11
11
|
export * as sftp from './sftp/index.js'
|
|
@@ -5,6 +5,65 @@ type Output = {
|
|
|
5
5
|
stderr: string;
|
|
6
6
|
err: unknown;
|
|
7
7
|
};
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
type ThisOptions = {
|
|
9
|
+
argsPrintFormat?: (args: string[]) => string[];
|
|
10
|
+
throwOnError?: boolean;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Options for the asynchronous `spawner` function.
|
|
14
|
+
*
|
|
15
|
+
* Extends Node.js `SpawnOptions` with additional behaviors specific to this utility.
|
|
16
|
+
*
|
|
17
|
+
* - `argsPrintFormat`: Optional function used to transform the command arguments
|
|
18
|
+
* before they are printed to the console (does not affect execution).
|
|
19
|
+
* - `throwOnError`: If `true`, the function throws when the spawned process exits
|
|
20
|
+
* with a non-zero status instead of returning a failure outcome.
|
|
21
|
+
*/
|
|
22
|
+
export type Options = SpawnOptions & ThisOptions;
|
|
23
|
+
/**
|
|
24
|
+
* Options for the synchronous `spawnerSync` function.
|
|
25
|
+
*
|
|
26
|
+
* Extends Node.js `SpawnSyncOptions` with additional behaviors specific to this utility.
|
|
27
|
+
*
|
|
28
|
+
* - `argsPrintFormat`: Optional function used to transform the command arguments
|
|
29
|
+
* before they are printed to the console (does not affect execution).
|
|
30
|
+
* - `throwOnError`: If `true`, the function throws when the spawned process exits
|
|
31
|
+
* with a non-zero status instead of returning a failure outcome.
|
|
32
|
+
*/
|
|
33
|
+
export type SyncOptions = SpawnSyncOptions & ThisOptions;
|
|
34
|
+
/**
|
|
35
|
+
* Spawns a child process asynchronously and logs its execution and output.
|
|
36
|
+
*
|
|
37
|
+
* Stdout and stderr are streamed, logged in real time, and collected.
|
|
38
|
+
* The result is returned as an `Outcome.Either`, representing success or failure.
|
|
39
|
+
*
|
|
40
|
+
* @param label - Optional label printed before execution to visually group logs.
|
|
41
|
+
* @param command - The command to execute.
|
|
42
|
+
* @param args - Arguments passed to the command.
|
|
43
|
+
* @param options - Optional spawn configuration and utility-specific options:
|
|
44
|
+
* - `argsPrintFormat`: Function to format arguments for logging.
|
|
45
|
+
* - `throwOnError`: If `true`, rejects on non-zero exit code instead of resolving a failure.
|
|
46
|
+
* @returns A promise resolving to an `Outcome.Either`:
|
|
47
|
+
* - success: `{ stdout, stderr, err }` when the command exits with code `0`
|
|
48
|
+
* - failure: `{ stdout, stderr, err }` when the command exits with a non-zero code
|
|
49
|
+
*/
|
|
50
|
+
export declare function spawner(label: string | null, command: string, args: string[], options?: Options): Promise<Outcome.Either<Output, Output>>;
|
|
51
|
+
/**
|
|
52
|
+
* Spawns a child process synchronously and logs its execution and output.
|
|
53
|
+
*
|
|
54
|
+
* Stdout, stderr, and execution errors are logged after the process completes.
|
|
55
|
+
* The result is returned as an `Outcome.Either`, representing success or failure.
|
|
56
|
+
*
|
|
57
|
+
* @param label - Optional label printed before execution to visually group logs.
|
|
58
|
+
* @param command - The command to execute.
|
|
59
|
+
* @param args - Arguments passed to the command.
|
|
60
|
+
* @param options - Optional spawn configuration and utility-specific options:
|
|
61
|
+
* - `argsPrintFormat`: Function to format arguments for logging.
|
|
62
|
+
* - `throwOnError`: If `true`, throws on non-zero exit code instead of returning a failure.
|
|
63
|
+
* @returns An `Outcome.Either`:
|
|
64
|
+
* - success: `{ stdout, stderr, err }` when the command exits with code `0`
|
|
65
|
+
* - failure: `{ stdout, stderr, err }` when the command exits with a non-zero code
|
|
66
|
+
* @throws Error if `throwOnError` is `true` and the process exits with a non-zero status
|
|
67
|
+
*/
|
|
68
|
+
export declare function spawnerSync(label: string | null, command: string, args: string[], options?: SyncOptions): Outcome.Either<Output, Output>;
|
|
10
69
|
export {};
|
|
@@ -8,10 +8,10 @@ import chalk from "chalk";
|
|
|
8
8
|
import * as Outcome from "../../../agnostic/misc/outcome/index.js";
|
|
9
9
|
import { styles } from "../../../agnostic/misc/logs/styles/index.js";
|
|
10
10
|
import { unknownToString } from "../../../agnostic/errors/unknown-to-string/index.js";
|
|
11
|
-
async function spawner(label, command, args,
|
|
11
|
+
async function spawner(label, command, args, options) {
|
|
12
12
|
return await new Promise((resolve, reject) => {
|
|
13
13
|
if (label !== null) console.log("\n" + styles.info(label) + "\n");
|
|
14
|
-
const printableArgs = argsPrintFormat !== void 0 ? argsPrintFormat(args) : args;
|
|
14
|
+
const printableArgs = options?.argsPrintFormat !== void 0 ? options.argsPrintFormat(args) : args;
|
|
15
15
|
console.log(styles.light(`> ${command} ${printableArgs.join(" ")}
|
|
16
16
|
`));
|
|
17
17
|
const prcss = spawn(command, args, { stdio: "pipe", ...options });
|
|
@@ -33,15 +33,15 @@ async function spawner(label, command, args, argsPrintFormat, throwOnError, opti
|
|
|
33
33
|
console.log(styles.error(unknownToString(err).replace(ansiRegex(), "").trim()));
|
|
34
34
|
});
|
|
35
35
|
prcss.on("close", (code) => {
|
|
36
|
-
if (code !== 0 && throwOnError === true) reject(new Error(stderr + "\n" + stdout));
|
|
36
|
+
if (code !== 0 && options?.throwOnError === true) reject(new Error(stderr + "\n" + stdout));
|
|
37
37
|
else if (code !== 0) return resolve(Outcome.makeFailure({ stdout, stderr, err }));
|
|
38
38
|
else return resolve(Outcome.makeSuccess({ stdout, stderr, err }));
|
|
39
39
|
});
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
|
-
function spawnerSync(label, command, args,
|
|
42
|
+
function spawnerSync(label, command, args, options) {
|
|
43
43
|
if (label !== null) console.log("\n" + styles.info(label) + "\n");
|
|
44
|
-
const printableArgs = argsPrintFormat !== void 0 ? argsPrintFormat(args) : args;
|
|
44
|
+
const printableArgs = options?.argsPrintFormat !== void 0 ? options.argsPrintFormat(args) : args;
|
|
45
45
|
console.log(styles.light(`> ${command} ${printableArgs.join(" ")}
|
|
46
46
|
`));
|
|
47
47
|
const result = spawnSync(command, args, { stdio: "pipe", encoding: "utf8", ...options });
|
|
@@ -63,7 +63,7 @@ function spawnerSync(label, command, args, argsPrintFormat, throwOnError, option
|
|
|
63
63
|
console.log(styles.light(stdout.replace(ansiRegex(), "")));
|
|
64
64
|
console.log("");
|
|
65
65
|
}
|
|
66
|
-
if (result.status !== 0 && throwOnError === true) throw new Error(stderr + "\n" + stdout);
|
|
66
|
+
if (result.status !== 0 && options?.throwOnError === true) throw new Error(stderr + "\n" + stdout);
|
|
67
67
|
else if (result.status !== 0) return Outcome.makeFailure({ stdout, stderr, err });
|
|
68
68
|
return Outcome.makeSuccess({ stdout, stderr, err });
|
|
69
69
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export * as download from './download/index.js'
|
|
2
1
|
export * as copy from './copy/index.js'
|
|
3
|
-
export * as
|
|
2
|
+
export * as download from './download/index.js'
|
|
4
3
|
export * as exists from './exists/index.js'
|
|
5
|
-
export * as
|
|
4
|
+
export * as move from './move/index.js'
|
|
6
5
|
export * as remove from './remove/index.js'
|
|
6
|
+
export * as stat from './stat/index.js'
|
|
7
7
|
export * as upload from './upload/index.js'
|
package/node/sftp/file/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export * as download from './download/index.js'
|
|
2
1
|
export * as copy from './copy/index.js'
|
|
3
|
-
export * as
|
|
2
|
+
export * as download from './download/index.js'
|
|
4
3
|
export * as exists from './exists/index.js'
|
|
5
|
-
export * as
|
|
4
|
+
export * as move from './move/index.js'
|
|
6
5
|
export * as remove from './remove/index.js'
|
|
6
|
+
export * as stat from './stat/index.js'
|
|
7
7
|
export * as upload from './upload/index.js'
|