@devtime-ltd/ui-bench 0.1.0 → 0.1.1
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/cjs/dom/Frame.js
CHANGED
|
@@ -24,7 +24,7 @@ module.exports = __toCommonJS(Frame_exports);
|
|
|
24
24
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
25
25
|
var import_react = require("react");
|
|
26
26
|
const FALLBACK = { width: 640, height: 480 };
|
|
27
|
-
const SMALLEST = { width:
|
|
27
|
+
const SMALLEST = { width: 100, height: 100 };
|
|
28
28
|
const PADDING = 24;
|
|
29
29
|
const HANDLE = 12;
|
|
30
30
|
const BORDER = 1;
|
|
@@ -31,7 +31,7 @@ function fixtureCases({ fixtures, harness, wrapper, mode = "light" }) {
|
|
|
31
31
|
return (0, import_fixtures.loadFixtures)(fixtures).map((fixture) => ({
|
|
32
32
|
id: fixture.id,
|
|
33
33
|
fixture,
|
|
34
|
-
async
|
|
34
|
+
mount: async () => {
|
|
35
35
|
const prepared = await session.prepare(fixture);
|
|
36
36
|
return (0, import_react.createElement)(import_stage.StageBody, {
|
|
37
37
|
stage: { kind: "ready", fixture, key: fixture.id, prepared },
|
package/dist/esm/dom/Frame.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect, useLayoutEffect, useRef, useState, } from "react";
|
|
3
3
|
const FALLBACK = { width: 640, height: 480 };
|
|
4
|
-
const SMALLEST = { width:
|
|
4
|
+
const SMALLEST = { width: 100, height: 100 };
|
|
5
5
|
const PADDING = 24;
|
|
6
6
|
const HANDLE = 12;
|
|
7
7
|
const BORDER = 1;
|
|
@@ -7,7 +7,7 @@ export type FixtureCase = {
|
|
|
7
7
|
id: string;
|
|
8
8
|
fixture: Fixture;
|
|
9
9
|
/** Seeds the fixture, then returns it ready to render with its default inputs. */
|
|
10
|
-
mount()
|
|
10
|
+
mount: () => Promise<ReactElement>;
|
|
11
11
|
};
|
|
12
12
|
export type FixtureCaseOptions = {
|
|
13
13
|
fixtures: FixtureModules;
|
|
@@ -8,7 +8,7 @@ export function fixtureCases({ fixtures, harness, wrapper, mode = "light" }) {
|
|
|
8
8
|
return loadFixtures(fixtures).map((fixture) => ({
|
|
9
9
|
id: fixture.id,
|
|
10
10
|
fixture,
|
|
11
|
-
async
|
|
11
|
+
mount: async () => {
|
|
12
12
|
const prepared = await session.prepare(fixture);
|
|
13
13
|
return createElement(StageBody, {
|
|
14
14
|
stage: { kind: "ready", fixture, key: fixture.id, prepared },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/testing/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAyC,MAAM,OAAO,CAAC;AAE7E,OAAO,EAAE,YAAY,EAAqC,MAAM,kBAAkB,CAAC;AACnF,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAG/C,OAAO,EAAE,SAAS,EAAE,oBAAoB,EAAgB,MAAM,eAAe,CAAC;AAgB9E,2FAA2F;AAC3F,MAAM,UAAU,YAAY,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,GAAG,OAAO,EAAsB;IAC7F,MAAM,OAAO,GAAG,oBAAoB,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,CAAC;IACpD,OAAO,YAAY,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;QAC9C,EAAE,EAAE,OAAO,CAAC,EAAE;QACd,OAAO;QACP,KAAK,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/testing/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAyC,MAAM,OAAO,CAAC;AAE7E,OAAO,EAAE,YAAY,EAAqC,MAAM,kBAAkB,CAAC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