@lioneltay/component-shot 0.1.0

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.
@@ -0,0 +1,63 @@
1
+ import { type ComponentShotRspackOptions } from './rspack.js';
2
+ import type { ComponentShotBuild } from './build-types.js';
3
+ export type { ComponentShotAppProvider, ComponentShotAppSetup, ComponentShotMaybePromise, ComponentShotScenario, ComponentShotScenarioObject, ComponentShotWrapper, } from './runtime/types.js';
4
+ export type { ComponentShotBuild, ComponentShotBuildCommand, ComponentShotBuildContext } from './build-types.js';
5
+ export { createRspackBuild, type ComponentShotRspackOptions } from './rspack.js';
6
+ export { installComponentShotSkill, runComponentShotSkillCli } from './skill.js';
7
+ export type { ComponentShotSkillInstallOptions, ComponentShotSkillInstallResult } from './skill.js';
8
+ export type ComponentShotViewport = {
9
+ height: number;
10
+ width: number;
11
+ };
12
+ export type ComponentShotOptions = {
13
+ browserChannel?: string;
14
+ build?: ComponentShotBuild;
15
+ cwd?: string;
16
+ debug?: boolean;
17
+ errorGlobal?: string;
18
+ fullPage?: boolean;
19
+ keepTemp?: boolean;
20
+ output?: string;
21
+ outputDirName?: string;
22
+ readyGlobal?: string;
23
+ rspack?: ComponentShotRspackOptions | false;
24
+ save?: boolean;
25
+ saveName?: string;
26
+ scenario: string;
27
+ screenshotsDir?: string;
28
+ selector?: string;
29
+ setup?: string;
30
+ tempDirPrefix?: string;
31
+ timeoutMs?: number;
32
+ viewport?: ComponentShotViewport;
33
+ waitFor?: string;
34
+ };
35
+ export type ComponentShotSourceOptions = Omit<ComponentShotOptions, 'scenario'> & {
36
+ name?: string;
37
+ overwrite?: boolean;
38
+ scenario?: string;
39
+ scenarioDir?: string;
40
+ source: string;
41
+ };
42
+ export type ComponentShotResult = {
43
+ historyPath?: string;
44
+ latestPath?: string;
45
+ outputPath: string;
46
+ tempDir?: string;
47
+ url: string;
48
+ };
49
+ export type ComponentShotSourceResult = ComponentShotResult & {
50
+ scenarioPath: string;
51
+ };
52
+ export type ComponentShotCliConfig = {
53
+ argv?: string[];
54
+ build?: ComponentShotBuild;
55
+ defaults?: Partial<Pick<ComponentShotOptions, 'errorGlobal' | 'outputDirName' | 'readyGlobal' | 'selector' | 'screenshotsDir' | 'tempDirPrefix' | 'timeoutMs' | 'viewport'>>;
56
+ rspack?: ComponentShotRspackOptions | false;
57
+ setup?: string;
58
+ usageCommand?: string;
59
+ };
60
+ export declare const captureComponentShot: (optionsInput: ComponentShotOptions) => Promise<ComponentShotResult>;
61
+ export declare const captureComponentSource: (optionsInput: ComponentShotSourceOptions) => Promise<ComponentShotSourceResult>;
62
+ export declare const runComponentShotCli: ({ argv, build, defaults, rspack, setup, usageCommand, }?: ComponentShotCliConfig) => Promise<void>;
63
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAOA,OAAO,EAAqB,KAAK,0BAA0B,EAAE,MAAM,aAAa,CAAA;AAEhF,OAAO,KAAK,EAAE,kBAAkB,EAAwD,MAAM,kBAAkB,CAAA;AAChH,YAAY,EACX,wBAAwB,EACxB,qBAAqB,EACrB,yBAAyB,EACzB,qBAAqB,EACrB,2BAA2B,EAC3B,oBAAoB,GACpB,MAAM,oBAAoB,CAAA;AAC3B,YAAY,EAAE,kBAAkB,EAAE,yBAAyB,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAA;AAChH,OAAO,EAAE,iBAAiB,EAAE,KAAK,0BAA0B,EAAE,MAAM,aAAa,CAAA;AAChF,OAAO,EAAE,yBAAyB,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAA;AAChF,YAAY,EAAE,gCAAgC,EAAE,+BAA+B,EAAE,MAAM,YAAY,CAAA;AAEnG,MAAM,MAAM,qBAAqB,GAAG;IACnC,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;CACb,CAAA;AAED,MAAM,MAAM,oBAAo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