twd-js 1.3.4 → 1.4.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.
- package/dist/bundled.d.ts +5 -0
- package/dist/bundled.es.js +603 -433
- package/dist/bundled.umd.js +7 -2
- package/dist/index.cjs.js +44 -39
- package/dist/index.d.ts +76 -2
- package/dist/index.es.js +3945 -3782
- package/dist/mock-sw.js +1 -1
- package/package.json +6 -4
package/dist/bundled.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { TWDTheme } from './ui/theme';
|
|
1
2
|
interface TestModule {
|
|
2
3
|
[key: string]: () => Promise<unknown>;
|
|
3
4
|
}
|
|
@@ -6,6 +7,7 @@ interface InitTWDOptions {
|
|
|
6
7
|
position?: "left" | "right";
|
|
7
8
|
serviceWorker?: boolean;
|
|
8
9
|
serviceWorkerUrl?: string;
|
|
10
|
+
theme?: Partial<TWDTheme>;
|
|
9
11
|
}
|
|
10
12
|
/**
|
|
11
13
|
* Initialize TWD with tests and optional configuration
|
|
@@ -15,6 +17,7 @@ interface InitTWDOptions {
|
|
|
15
17
|
* @param options.position The position of the sidebar
|
|
16
18
|
* @param options.serviceWorker Whether to use the service worker
|
|
17
19
|
* @param options.serviceWorkerUrl The URL of the service worker
|
|
20
|
+
* @param options.theme Optional theme customization
|
|
18
21
|
* @returns void
|
|
19
22
|
* @example
|
|
20
23
|
* initTWD(testModules, { open: true, position: 'left' });
|
|
@@ -22,6 +25,8 @@ interface InitTWDOptions {
|
|
|
22
25
|
* initTWD(testModules, { open: true, position: 'left', serviceWorker: false });
|
|
23
26
|
* @example
|
|
24
27
|
* initTWD(testModules, { open: true, position: 'left', serviceWorker: true, serviceWorkerUrl: '/mock-sw.js' });
|
|
28
|
+
* @example
|
|
29
|
+
* initTWD(testModules, { open: true, position: 'left', theme: { primary: '#ff0000', background: '#ffffff' } });
|
|
25
30
|
*/
|
|
26
31
|
export declare const initTWD: (files: TestModule, options?: InitTWDOptions) => void;
|
|
27
32
|
export {};
|