xbintsc 0.5.51 → 0.6.8
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/README.md +8 -2
- package/README.zh-CN.md +9 -3
- package/dist/scripts/fetch-tarball.d.ts +28 -0
- package/dist/scripts/fetch-tarball.js +57 -0
- package/dist/scripts/fetch-tarball.js.map +1 -0
- package/dist/scripts/gui-build-options.d.ts +77 -0
- package/dist/scripts/gui-build-options.js +134 -0
- package/dist/scripts/gui-build-options.js.map +1 -0
- package/dist/src/cli/help.d.ts +1 -1
- package/dist/src/cli/hints.d.ts +6 -2
- package/dist/src/cli/hints.js +16 -2
- package/dist/src/cli/hints.js.map +1 -1
- package/dist/src/cli/main.js +9 -0
- package/dist/src/cli/main.js.map +1 -1
- package/dist/src/driver/app-artifacts.d.ts +2 -0
- package/dist/src/driver/app-artifacts.js +3 -3
- package/dist/src/driver/app-artifacts.js.map +1 -1
- package/dist/src/driver/compiler.js +147 -52
- package/dist/src/driver/compiler.js.map +1 -1
- package/dist/src/driver/icon.d.ts +1 -1
- package/dist/src/driver/icon.js +3 -3
- package/dist/src/driver/icon.js.map +1 -1
- package/dist/src/driver/macos-sdk.d.ts +32 -0
- package/dist/src/driver/macos-sdk.js +50 -0
- package/dist/src/driver/macos-sdk.js.map +1 -0
- package/dist/src/driver/options.d.ts +6 -0
- package/dist/src/driver/platform-support.d.ts +45 -0
- package/dist/src/driver/platform-support.js +66 -0
- package/dist/src/driver/platform-support.js.map +1 -0
- package/dist/src/driver/prebuilt.d.ts +26 -0
- package/dist/src/driver/prebuilt.js +58 -0
- package/dist/src/driver/prebuilt.js.map +1 -0
- package/dist/src/driver/runtime-objects.d.ts +11 -0
- package/dist/src/driver/runtime-objects.js +14 -5
- package/dist/src/driver/runtime-objects.js.map +1 -1
- package/dist/src/driver/toolchain-provider.d.ts +8 -0
- package/dist/src/driver/toolchain-provider.js +8 -0
- package/dist/src/driver/toolchain-provider.js.map +1 -1
- package/dist/src/driver/toolchain.d.ts +20 -1
- package/dist/src/driver/toolchain.js +19 -0
- package/dist/src/driver/toolchain.js.map +1 -1
- package/dist/src/driver/version.d.ts +1 -1
- package/dist/src/driver/version.js +1 -1
- package/dist/src/driver/version.js.map +1 -1
- package/dist/src/driver/win-entry.d.ts +1 -1
- package/dist/src/driver/win-entry.js +4 -4
- package/dist/src/driver/win-entry.js.map +1 -1
- package/dist/src/extensions/gui/features.d.ts +9 -6
- package/dist/src/extensions/gui/features.js +14 -9
- package/dist/src/extensions/gui/features.js.map +1 -1
- package/dist/src/extensions/gui/html.d.ts +10 -7
- package/dist/src/extensions/gui/html.js +53 -29
- package/dist/src/extensions/gui/html.js.map +1 -1
- package/dist/src/extensions/node/child_process/index.d.ts +4 -3
- package/dist/src/extensions/node/child_process/index.js +4 -3
- package/dist/src/extensions/node/child_process/index.js.map +1 -1
- package/dist/tests/cli/hints.test.js +9 -1
- package/dist/tests/cli/hints.test.js.map +1 -1
- package/dist/tests/cli/main.test.js +9 -0
- package/dist/tests/cli/main.test.js.map +1 -1
- package/dist/tests/driver/compiler.test.js +107 -0
- package/dist/tests/driver/compiler.test.js.map +1 -1
- package/dist/tests/driver/cxx-compile-flags.test.d.ts +1 -0
- package/dist/tests/driver/cxx-compile-flags.test.js +24 -0
- package/dist/tests/driver/cxx-compile-flags.test.js.map +1 -0
- package/dist/tests/driver/macos-sdk.test.d.ts +1 -0
- package/dist/tests/driver/macos-sdk.test.js +83 -0
- package/dist/tests/driver/macos-sdk.test.js.map +1 -0
- package/dist/tests/driver/platform-support.test.d.ts +1 -0
- package/dist/tests/driver/platform-support.test.js +41 -0
- package/dist/tests/driver/platform-support.test.js.map +1 -0
- package/dist/tests/driver/prebuilt.test.d.ts +1 -0
- package/dist/tests/driver/prebuilt.test.js +44 -0
- package/dist/tests/driver/prebuilt.test.js.map +1 -0
- package/dist/tests/driver/toolchain-provider.test.js +24 -0
- package/dist/tests/driver/toolchain-provider.test.js.map +1 -1
- package/dist/tests/driver/toolchain.test.js +23 -0
- package/dist/tests/driver/toolchain.test.js.map +1 -1
- package/dist/tests/e2e/async-await.test.js +4 -2
- package/dist/tests/e2e/async-await.test.js.map +1 -1
- package/dist/tests/e2e/compile-node.test.js +21 -0
- package/dist/tests/e2e/compile-node.test.js.map +1 -1
- package/dist/tests/e2e/fetch.test.js +34 -6
- package/dist/tests/e2e/fetch.test.js.map +1 -1
- package/dist/tests/e2e/gui-css-coverage.test.d.ts +9 -0
- package/dist/tests/e2e/gui-css-coverage.test.js +333 -0
- package/dist/tests/e2e/gui-css-coverage.test.js.map +1 -0
- package/dist/tests/e2e/gui-css-features.test.d.ts +6 -0
- package/dist/tests/e2e/gui-css-features.test.js +270 -0
- package/dist/tests/e2e/gui-css-features.test.js.map +1 -0
- package/dist/tests/e2e/gui-effects.test.js +92 -11
- package/dist/tests/e2e/gui-effects.test.js.map +1 -1
- package/dist/tests/e2e/gui-example-pelican3d.test.d.ts +10 -0
- package/dist/tests/e2e/gui-example-pelican3d.test.js +94 -0
- package/dist/tests/e2e/gui-example-pelican3d.test.js.map +1 -0
- package/dist/tests/e2e/gui-font-face.test.d.ts +10 -0
- package/dist/tests/e2e/gui-font-face.test.js +142 -0
- package/dist/tests/e2e/gui-font-face.test.js.map +1 -0
- package/dist/tests/e2e/gui-fonts.test.d.ts +10 -0
- package/dist/tests/e2e/gui-fonts.test.js +150 -0
- package/dist/tests/e2e/gui-fonts.test.js.map +1 -0
- package/dist/tests/e2e/gui-helpers.d.ts +5 -0
- package/dist/tests/e2e/gui-helpers.js +4 -0
- package/dist/tests/e2e/gui-helpers.js.map +1 -1
- package/dist/tests/e2e/gui-layout.test.js +3 -2
- package/dist/tests/e2e/gui-layout.test.js.map +1 -1
- package/dist/tests/e2e/gui-script.test.js +48 -0
- package/dist/tests/e2e/gui-script.test.js.map +1 -1
- package/dist/tests/e2e/gui-track-sizing.test.d.ts +6 -0
- package/dist/tests/e2e/gui-track-sizing.test.js +173 -0
- package/dist/tests/e2e/gui-track-sizing.test.js.map +1 -0
- package/dist/tests/e2e/gui-transform.test.js +3 -2
- package/dist/tests/e2e/gui-transform.test.js.map +1 -1
- package/dist/tests/e2e/unhandled-rejection.test.d.ts +14 -0
- package/dist/tests/e2e/unhandled-rejection.test.js +107 -0
- package/dist/tests/e2e/unhandled-rejection.test.js.map +1 -0
- package/dist/tests/extensions/gui-features.test.js +8 -1
- package/dist/tests/extensions/gui-features.test.js.map +1 -1
- package/dist/tests/extensions/gui.test.js +44 -0
- package/dist/tests/extensions/gui.test.js.map +1 -1
- package/dist/tests/scripts/fetch-tarball.test.d.ts +1 -0
- package/dist/tests/scripts/fetch-tarball.test.js +70 -0
- package/dist/tests/scripts/fetch-tarball.test.js.map +1 -0
- package/doc/ai/cli.md +6 -0
- package/doc/ai/extensions.md +10 -5
- package/doc/ai/language-support.md +1 -0
- package/doc/ai/troubleshooting.md +32 -2
- package/doc/ai/zh-CN/cli.md +5 -0
- package/doc/ai/zh-CN/extensions.md +9 -4
- package/doc/ai/zh-CN/language-support.md +1 -0
- package/doc/ai/zh-CN/troubleshooting.md +27 -2
- package/doc/gui/animation.md +39 -9
- package/doc/gui/build.md +13 -8
- package/doc/gui/dom.md +23 -5
- package/doc/gui/known-issues.md +31 -23
- package/doc/gui/layout.md +30 -7
- package/doc/gui/rendering.md +84 -26
- package/doc/gui/webgl.md +4 -0
- package/doc/gui-scripts.md +33 -17
- package/doc/gui.md +79 -15
- package/doc/implemented/async.md +1 -0
- package/doc/implemented/modules.md +9 -6
- package/doc/implemented/node/child-process.md +12 -4
- package/doc/implemented/runtime-core.md +1 -1
- package/doc/npm-package.md +23 -2
- package/doc/post/make-js-great-again.md +30 -0
- package/doc/requirements.md +31 -0
- package/doc/unimplemented/deviations.md +1 -0
- package/doc/zh-CN/gui/animation.md +33 -10
- package/doc/zh-CN/gui/build.md +9 -7
- package/doc/zh-CN/gui/dom.md +19 -4
- package/doc/zh-CN/gui/known-issues.md +21 -12
- package/doc/zh-CN/gui/layout.md +22 -5
- package/doc/zh-CN/gui/rendering.md +61 -20
- package/doc/zh-CN/gui/webgl.md +1 -0
- package/doc/zh-CN/gui-scripts.md +23 -11
- package/doc/zh-CN/gui.md +64 -16
- package/doc/zh-CN/implemented/async.md +1 -0
- package/doc/zh-CN/implemented/modules.md +8 -4
- package/doc/zh-CN/implemented/node/child-process.md +10 -3
- package/doc/zh-CN/implemented/runtime-core.md +1 -1
- package/doc/zh-CN/npm-package.md +18 -1
- package/doc/zh-CN/post/make-js-great-again.md +32 -0
- package/doc/zh-CN/requirements.md +25 -0
- package/doc/zh-CN/unimplemented/deviations.md +1 -0
- package/package.json +7 -7
- package/runtime/ext_gui/animation_values.cpp +425 -0
- package/runtime/ext_gui/animation_values.h +64 -0
- package/runtime/ext_gui/css.cpp +172 -21
- package/runtime/ext_gui/css.h +75 -4
- package/runtime/ext_gui/css_match.cpp +4 -0
- package/runtime/ext_gui/css_sheet.cpp +218 -2
- package/runtime/ext_gui/document.cpp +42 -192
- package/runtime/ext_gui/document.h +25 -12
- package/runtime/ext_gui/document_animation.cpp +428 -0
- package/runtime/ext_gui/effect_values.cpp +245 -21
- package/runtime/ext_gui/gradient_values.cpp +24 -0
- package/runtime/ext_gui/grid_values.cpp +23 -0
- package/runtime/ext_gui/gui_cursor.cpp +50 -0
- package/runtime/ext_gui/gui_events.cpp +16 -4
- package/runtime/ext_gui/gui_internal.h +3 -0
- package/runtime/ext_gui/image_api.h +3 -1
- package/runtime/ext_gui/image_feature.cpp +4 -2
- package/runtime/ext_gui/inline_svg.cpp +95 -8
- package/runtime/ext_gui/inline_svg.h +5 -1
- package/runtime/ext_gui/layout.cpp +3 -2
- package/runtime/ext_gui/layout.h +6 -0
- package/runtime/ext_gui/layout_flex.cpp +134 -29
- package/runtime/ext_gui/layout_flow.cpp +58 -7
- package/runtime/ext_gui/layout_flow_internal.h +39 -4
- package/runtime/ext_gui/layout_grid.cpp +31 -0
- package/runtime/ext_gui/layout_inline.cpp +26 -2
- package/runtime/ext_gui/layout_vertical.cpp +196 -0
- package/runtime/ext_gui/paint.cpp +67 -9
- package/runtime/ext_gui/paint.h +61 -8
- package/runtime/ext_gui/paint_backdrop.cpp +211 -0
- package/runtime/ext_gui/paint_background.cpp +175 -97
- package/runtime/ext_gui/paint_effects.cpp +12 -6
- package/runtime/ext_gui/paint_internal.h +27 -0
- package/runtime/ext_gui/paint_outline.cpp +44 -0
- package/runtime/ext_gui/paint_shadow.cpp +368 -0
- package/runtime/ext_gui/renderer.cpp +15 -7
- package/runtime/ext_gui/renderer.h +10 -1
- package/runtime/ext_gui/renderer_backdrop.cpp +374 -0
- package/runtime/ext_gui/renderer_bitmap.cpp +82 -0
- package/runtime/ext_gui/renderer_gradient.cpp +51 -17
- package/runtime/ext_gui/renderer_image.cpp +6 -1
- package/runtime/ext_gui/renderer_internal.h +21 -0
- package/runtime/ext_gui/renderer_layer.cpp +27 -1
- package/runtime/ext_gui/renderer_text.cpp +2 -1
- package/runtime/ext_gui/style.cpp +62 -8
- package/runtime/ext_gui/style.h +111 -4
- package/runtime/ext_gui/style_cascade.cpp +83 -0
- package/runtime/ext_gui/style_internal.h +13 -1
- package/runtime/ext_gui/style_length.cpp +92 -0
- package/runtime/ext_gui/style_print.cpp +83 -2
- package/runtime/ext_gui/style_svg.cpp +40 -0
- package/runtime/ext_gui/style_text.cpp +302 -0
- package/runtime/ext_gui/style_ui.cpp +150 -0
- package/runtime/ext_gui/style_values.cpp +76 -62
- package/runtime/ext_gui/style_values_internal.h +23 -0
- package/runtime/ext_gui/text.cpp +4 -2
- package/runtime/ext_gui/text.h +11 -4
- package/runtime/ext_gui/text_cache.cpp +11 -2
- package/runtime/ext_gui/text_font_db.cpp +427 -0
- package/runtime/ext_gui/text_font_paths.cpp +250 -0
- package/runtime/ext_gui/text_font_paths.h +39 -0
- package/runtime/ext_gui/text_font_sfnt.cpp +396 -0
- package/runtime/ext_gui/text_font_sfnt.h +44 -0
- package/runtime/ext_gui/text_fonts.cpp +348 -0
- package/runtime/ext_gui/text_fonts.h +78 -0
- package/runtime/ext_gui/text_fonts_internal.h +77 -0
- package/runtime/ext_gui/text_hb.cpp +63 -179
- package/runtime/ext_gui/text_stb.cpp +49 -193
- package/runtime/ext_gui/transform.cpp +107 -9
- package/runtime/ext_gui/transform.h +5 -0
- package/runtime/ext_gui/window.cpp +1 -1
- package/runtime/ext_node/child_process/child_process.c +149 -7
- package/runtime/rt.h +4 -0
- package/runtime/xt_async.c +4 -0
- package/runtime/xt_generator.c +2 -0
- package/runtime/xt_loop.c +8 -4
- package/runtime/xt_promise.c +103 -0
- package/scripts/build-gui.ts +17 -5
- package/scripts/build-media.ts +89 -10
- package/scripts/build-runtime.ts +7 -2
- package/scripts/fetch-tarball.ts +71 -0
- package/scripts/gui-build-cache.ts +28 -0
- package/scripts/gui-build-options.ts +26 -2
- package/scripts/package-release.ts +8 -0
- package/src/cli/hints.ts +19 -2
- package/src/cli/main.ts +11 -0
- package/src/driver/app-artifacts.ts +5 -3
- package/src/driver/compiler.ts +167 -56
- package/src/driver/icon.ts +3 -2
- package/src/driver/macos-sdk.ts +52 -0
- package/src/driver/options.ts +6 -0
- package/src/driver/platform-support.ts +69 -0
- package/src/driver/prebuilt.ts +61 -0
- package/src/driver/runtime-objects.ts +26 -5
- package/src/driver/toolchain-provider.ts +11 -0
- package/src/driver/toolchain.ts +26 -1
- package/src/driver/version.ts +1 -1
- package/src/driver/win-entry.ts +4 -3
- package/src/extensions/gui/features.ts +13 -9
- package/src/extensions/gui/html.ts +61 -31
- package/src/extensions/node/child_process/index.ts +4 -3
|
@@ -0,0 +1,333 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* End-to-end coverage for the CSS surface used by the Inside the Ropes
|
|
3
|
+
* stylesheets: typography, inline flex/grid, grid-area, aspect-ratio, auto
|
|
4
|
+
* margins, percentage radii, outlines, vertical text, SVG presentation
|
|
5
|
+
* properties and sized background tiles. Assertions use layout geometry,
|
|
6
|
+
* `computedStyle`, `paintList` and the `inlineSvg` diagnostic, so they are
|
|
7
|
+
* deterministic without reading GPU pixels.
|
|
8
|
+
*/
|
|
9
|
+
import { afterAll, beforeAll, describe, expect, it } from "vitest";
|
|
10
|
+
import { createGuiHarness, guiAvailable } from "./gui-helpers.js";
|
|
11
|
+
const harness = createGuiHarness();
|
|
12
|
+
describe.skipIf(!guiAvailable)("gui extension — CSS coverage", () => {
|
|
13
|
+
beforeAll(() => harness.setup());
|
|
14
|
+
afterAll(() => harness.cleanup());
|
|
15
|
+
it("applies letter-spacing and text-transform to layout and paint", () => {
|
|
16
|
+
const { value, stdout } = harness.compileAndRun("typography", `
|
|
17
|
+
import { createWindow, run } from "gui";
|
|
18
|
+
|
|
19
|
+
const HTML = \`
|
|
20
|
+
<html><head><style>
|
|
21
|
+
body { margin: 0; }
|
|
22
|
+
#a, #b, #c {
|
|
23
|
+
position: absolute; top: 0; font-size: 20px; white-space: nowrap;
|
|
24
|
+
}
|
|
25
|
+
#a { left: 0; }
|
|
26
|
+
#b { left: 200px; letter-spacing: 2px; }
|
|
27
|
+
#c { left: 350px; text-transform: uppercase; }
|
|
28
|
+
</style></head><body>
|
|
29
|
+
<div id="a">abc</div><div id="b">abc</div><div id="c">abc</div>
|
|
30
|
+
</body></html>\`;
|
|
31
|
+
|
|
32
|
+
const win = createWindow({ title: "typography", width: 500, height: 120 });
|
|
33
|
+
win.on("ready", () => {
|
|
34
|
+
const a = win.getBoundingClientRect("#a");
|
|
35
|
+
const b = win.getBoundingClientRect("#b");
|
|
36
|
+
console.log("delta=" + (b.width - a.width).toFixed(1));
|
|
37
|
+
console.log("spacing=" + win.computedStyle("#b", "letter-spacing"));
|
|
38
|
+
console.log("transform=" + win.computedStyle("#c", "text-transform"));
|
|
39
|
+
console.log(win.paintList());
|
|
40
|
+
win.close();
|
|
41
|
+
});
|
|
42
|
+
win.loadHTML(HTML);
|
|
43
|
+
run();
|
|
44
|
+
`);
|
|
45
|
+
// Three characters, two pixels each, including the trailing one.
|
|
46
|
+
expect(value("delta")).toBe("6.0");
|
|
47
|
+
expect(value("spacing")).toBe("2px");
|
|
48
|
+
expect(value("transform")).toBe("uppercase");
|
|
49
|
+
expect(stdout).toContain('"ABC"');
|
|
50
|
+
});
|
|
51
|
+
it("resolves currentColor and percentage border radii", () => {
|
|
52
|
+
const { value, stdout } = harness.compileAndRun("colors-radius", `
|
|
53
|
+
import { createWindow, run } from "gui";
|
|
54
|
+
|
|
55
|
+
const HTML = \`
|
|
56
|
+
<html><head><style>
|
|
57
|
+
body { margin: 0; }
|
|
58
|
+
#dot {
|
|
59
|
+
color: #ff0000;
|
|
60
|
+
background: currentColor;
|
|
61
|
+
width: 20px; height: 20px;
|
|
62
|
+
border-radius: 50%;
|
|
63
|
+
}
|
|
64
|
+
</style></head><body><div id="dot"></div></body></html>\`;
|
|
65
|
+
|
|
66
|
+
const win = createWindow({ title: "colors", width: 200, height: 120 });
|
|
67
|
+
win.on("ready", () => {
|
|
68
|
+
console.log("bg=" + win.computedStyle("#dot", "background-color"));
|
|
69
|
+
console.log("radius=" + win.computedStyle("#dot", "border-radius"));
|
|
70
|
+
console.log(win.paintList());
|
|
71
|
+
win.close();
|
|
72
|
+
});
|
|
73
|
+
win.loadHTML(HTML);
|
|
74
|
+
run();
|
|
75
|
+
`);
|
|
76
|
+
expect(value("bg")).toBe("rgb(255, 0, 0)");
|
|
77
|
+
expect(value("radius")).toBe("50%");
|
|
78
|
+
expect(stdout).toContain("r=10.0 color=#ff0000ff");
|
|
79
|
+
});
|
|
80
|
+
it("lays out inline-flex and inline-grid boxes atomically", () => {
|
|
81
|
+
const { value } = harness.compileAndRun("inline-containers", `
|
|
82
|
+
import { createWindow, run } from "gui";
|
|
83
|
+
|
|
84
|
+
const HTML = \`
|
|
85
|
+
<html><head><style>
|
|
86
|
+
body { margin: 0; }
|
|
87
|
+
#row { display: inline-flex; gap: 10px; }
|
|
88
|
+
#row i { display: block; width: 20px; height: 20px; background: #222; }
|
|
89
|
+
#key {
|
|
90
|
+
display: inline-grid; place-items: center;
|
|
91
|
+
width: 17px; height: 17px; vertical-align: -3px;
|
|
92
|
+
background: #333;
|
|
93
|
+
}
|
|
94
|
+
</style></head><body>
|
|
95
|
+
<div id="line"><span id="row"><i></i><i></i></span><span id="key">W</span></div>
|
|
96
|
+
</body></html>\`;
|
|
97
|
+
|
|
98
|
+
const win = createWindow({ title: "inline", width: 400, height: 120 });
|
|
99
|
+
win.on("ready", () => {
|
|
100
|
+
const row = win.getBoundingClientRect("#row");
|
|
101
|
+
const key = win.getBoundingClientRect("#key");
|
|
102
|
+
console.log("row=" + row.width.toFixed(1) + "x" + row.height.toFixed(1));
|
|
103
|
+
console.log("key=" + key.width.toFixed(1) + "x" + key.height.toFixed(1));
|
|
104
|
+
console.log("flex=" + win.computedStyle("#row", "display"));
|
|
105
|
+
console.log("grid=" + win.computedStyle("#key", "display"));
|
|
106
|
+
console.log("align=" + win.computedStyle("#key", "vertical-align"));
|
|
107
|
+
win.close();
|
|
108
|
+
});
|
|
109
|
+
win.loadHTML(HTML);
|
|
110
|
+
run();
|
|
111
|
+
`);
|
|
112
|
+
expect(value("row")).toBe("50.0x20.0");
|
|
113
|
+
expect(value("key")).toBe("17.0x17.0");
|
|
114
|
+
expect(value("flex")).toBe("inline-flex");
|
|
115
|
+
expect(value("grid")).toBe("inline-grid");
|
|
116
|
+
expect(value("align")).toBe("-3px");
|
|
117
|
+
});
|
|
118
|
+
it("places grid-area items and derives height from aspect-ratio", () => {
|
|
119
|
+
const { value } = harness.compileAndRun("grid-aspect", `
|
|
120
|
+
import { createWindow, run } from "gui";
|
|
121
|
+
|
|
122
|
+
const HTML = \`
|
|
123
|
+
<html><head><style>
|
|
124
|
+
body { margin: 0; }
|
|
125
|
+
#grid {
|
|
126
|
+
display: grid;
|
|
127
|
+
grid-template-columns: repeat(3, 30px);
|
|
128
|
+
grid-template-rows: repeat(3, 30px);
|
|
129
|
+
}
|
|
130
|
+
#cell { grid-area: 2 / 3; background: #444; }
|
|
131
|
+
#ratio { width: 300px; aspect-ratio: 3 / 4; background: #555; }
|
|
132
|
+
</style></head><body>
|
|
133
|
+
<div id="grid"><div id="cell"></div></div>
|
|
134
|
+
<div id="ratio"></div>
|
|
135
|
+
</body></html>\`;
|
|
136
|
+
|
|
137
|
+
const win = createWindow({ title: "grid", width: 500, height: 500 });
|
|
138
|
+
win.on("ready", () => {
|
|
139
|
+
const cell = win.getBoundingClientRect("#cell");
|
|
140
|
+
const ratio = win.getBoundingClientRect("#ratio");
|
|
141
|
+
console.log("cell=" + cell.x.toFixed(1) + "," + cell.y.toFixed(1));
|
|
142
|
+
console.log("ratio=" + ratio.width.toFixed(1) + "x" + ratio.height.toFixed(1));
|
|
143
|
+
console.log("area=" + win.computedStyle("#cell", "grid-area"));
|
|
144
|
+
console.log("ar=" + win.computedStyle("#ratio", "aspect-ratio"));
|
|
145
|
+
win.close();
|
|
146
|
+
});
|
|
147
|
+
win.loadHTML(HTML);
|
|
148
|
+
run();
|
|
149
|
+
`);
|
|
150
|
+
expect(value("cell")).toBe("60.0,30.0");
|
|
151
|
+
expect(value("ratio")).toBe("300.0x400.0");
|
|
152
|
+
expect(value("area")).toBe("2 / 3 / 0 / 0");
|
|
153
|
+
expect(value("ar")).toBe("0.75");
|
|
154
|
+
});
|
|
155
|
+
it("paints focus-visible outlines and applies :active transforms", () => {
|
|
156
|
+
const { value, stdout } = harness.compileAndRun("outline-active", `
|
|
157
|
+
import { createWindow, run } from "gui";
|
|
158
|
+
|
|
159
|
+
const HTML = \`
|
|
160
|
+
<html><head><style>
|
|
161
|
+
body { margin: 0; }
|
|
162
|
+
#btn {
|
|
163
|
+
position: absolute; left: 10px; top: 10px;
|
|
164
|
+
width: 60px; height: 30px;
|
|
165
|
+
background: #111;
|
|
166
|
+
border: 0;
|
|
167
|
+
outline: 2px solid #ff0000;
|
|
168
|
+
outline-offset: 3px;
|
|
169
|
+
}
|
|
170
|
+
#btn:focus-visible { outline-color: #00ff00; }
|
|
171
|
+
#btn:active { transform: translateY(5px); }
|
|
172
|
+
</style></head><body><button id="btn">go</button></body></html>\`;
|
|
173
|
+
|
|
174
|
+
const win = createWindow({ title: "outline", width: 200, height: 120 });
|
|
175
|
+
win.on("ready", () => {
|
|
176
|
+
const doc = win.document;
|
|
177
|
+
const btn: any = doc.querySelector("#btn");
|
|
178
|
+
btn.focus();
|
|
179
|
+
console.log("color=" + win.computedStyle("#btn", "outline-color"));
|
|
180
|
+
console.log("width=" + win.computedStyle("#btn", "outline-width"));
|
|
181
|
+
console.log("offset=" + win.computedStyle("#btn", "outline-offset"));
|
|
182
|
+
console.log(win.paintList());
|
|
183
|
+
win.sendEvent("mousedown", { x: 20, y: 20, button: 0 });
|
|
184
|
+
console.log("active=" + win.computedStyle("#btn", "transform"));
|
|
185
|
+
win.sendEvent("mouseup", { x: 20, y: 20, button: 0 });
|
|
186
|
+
console.log("released=" + win.computedStyle("#btn", "transform"));
|
|
187
|
+
win.close();
|
|
188
|
+
});
|
|
189
|
+
win.loadHTML(HTML);
|
|
190
|
+
run();
|
|
191
|
+
`);
|
|
192
|
+
expect(value("color")).toBe("rgb(0, 255, 0)");
|
|
193
|
+
expect(value("width")).toBe("2px");
|
|
194
|
+
expect(value("offset")).toBe("3px");
|
|
195
|
+
expect(stdout).toContain("rect x=7.0 y=7.0 w=66.0 h=2.0");
|
|
196
|
+
expect(value("active")).toContain("translateY(5px)");
|
|
197
|
+
expect(value("released")).toBe("none");
|
|
198
|
+
});
|
|
199
|
+
it("lays vertical writing mode text out in a column and rotates it", () => {
|
|
200
|
+
const { value, stdout } = harness.compileAndRun("vertical", `
|
|
201
|
+
import { createWindow, run } from "gui";
|
|
202
|
+
|
|
203
|
+
const HTML = \`
|
|
204
|
+
<html><head><style>
|
|
205
|
+
body { margin: 0; }
|
|
206
|
+
#v {
|
|
207
|
+
position: absolute; left: 200px; top: 0;
|
|
208
|
+
writing-mode: vertical-rl;
|
|
209
|
+
font-size: 10px;
|
|
210
|
+
}
|
|
211
|
+
</style></head><body><div id="v">ABCD</div></body></html>\`;
|
|
212
|
+
|
|
213
|
+
const win = createWindow({ title: "vertical", width: 400, height: 200 });
|
|
214
|
+
win.on("ready", () => {
|
|
215
|
+
const v = win.getBoundingClientRect("#v");
|
|
216
|
+
console.log("rect=" + v.width.toFixed(1) + "," + v.height.toFixed(1));
|
|
217
|
+
console.log("mode=" + win.computedStyle("#v", "writing-mode"));
|
|
218
|
+
console.log(win.paintList());
|
|
219
|
+
win.close();
|
|
220
|
+
});
|
|
221
|
+
win.loadHTML(HTML);
|
|
222
|
+
run();
|
|
223
|
+
`);
|
|
224
|
+
const size = value("rect").split(",");
|
|
225
|
+
const width = Number(size[0] ?? 0);
|
|
226
|
+
const height = Number(size[1] ?? 0);
|
|
227
|
+
expect(width).toBeLessThan(20);
|
|
228
|
+
expect(height).toBeGreaterThan(width);
|
|
229
|
+
expect(value("mode")).toBe("vertical-rl");
|
|
230
|
+
expect(stdout).toContain(",1,-1,");
|
|
231
|
+
});
|
|
232
|
+
it("injects document CSS into the serialized inline SVG", () => {
|
|
233
|
+
const { value } = harness.compileAndRun("svg-css", `
|
|
234
|
+
import { createWindow, run } from "gui";
|
|
235
|
+
|
|
236
|
+
const HTML = \`
|
|
237
|
+
<html><head><style>
|
|
238
|
+
body { margin: 0; }
|
|
239
|
+
.ring { fill: none; stroke: #ff0000; stroke-width: 2; }
|
|
240
|
+
.glow { fill: #00ff00; stroke: rgba(0, 0, 255, 0.5); }
|
|
241
|
+
</style></head><body>
|
|
242
|
+
<svg id="icon" viewBox="0 0 20 20">
|
|
243
|
+
<circle class="ring" cx="10" cy="10" r="8"></circle>
|
|
244
|
+
<rect class="glow" x="1" y="1" width="4" height="4"></rect>
|
|
245
|
+
</svg>
|
|
246
|
+
</body></html>\`;
|
|
247
|
+
|
|
248
|
+
const win = createWindow({ title: "svg", width: 120, height: 120 });
|
|
249
|
+
win.on("ready", () => {
|
|
250
|
+
const info: any = win.inlineSvg("#icon");
|
|
251
|
+
console.log("shapes=" + info.shapes);
|
|
252
|
+
console.log("ring=" + (info.markup.indexOf("style=\\"fill:none;stroke:#ff0000;stroke-width:2\\"") >= 0));
|
|
253
|
+
console.log("glow=" + (info.markup.indexOf("fill:#00ff00") >= 0));
|
|
254
|
+
console.log("opacity=" + (info.markup.indexOf("stroke-opacity:0.500") >= 0));
|
|
255
|
+
win.close();
|
|
256
|
+
});
|
|
257
|
+
win.loadHTML(HTML);
|
|
258
|
+
run();
|
|
259
|
+
`);
|
|
260
|
+
expect(value("shapes")).toBe("2");
|
|
261
|
+
expect(value("ring")).toBe("true");
|
|
262
|
+
expect(value("glow")).toBe("true");
|
|
263
|
+
expect(value("opacity")).toBe("true");
|
|
264
|
+
});
|
|
265
|
+
it("tiles an image background at background-size", () => {
|
|
266
|
+
const image = harness.imageSrc(harness.logoPath);
|
|
267
|
+
const { stdout } = harness.compileAndRun("background-size", `
|
|
268
|
+
import { createWindow, run } from "gui";
|
|
269
|
+
|
|
270
|
+
const HTML = \`
|
|
271
|
+
<html><head><style>
|
|
272
|
+
body { margin: 0; }
|
|
273
|
+
#bg { width: 250px; height: 120px; background-image: url("${image}"); background-size: 100px 100px; }
|
|
274
|
+
</style></head><body><div id="bg"></div></body></html>\`;
|
|
275
|
+
|
|
276
|
+
const win = createWindow({ title: "tiles", width: 500, height: 300 });
|
|
277
|
+
win.on("ready", () => {
|
|
278
|
+
console.log(win.paintList());
|
|
279
|
+
win.close();
|
|
280
|
+
});
|
|
281
|
+
win.loadHTML(HTML);
|
|
282
|
+
run();
|
|
283
|
+
`);
|
|
284
|
+
const tiles = stdout.split("\n").filter((line) => line.includes("w=100.0 h=100.0"));
|
|
285
|
+
expect(tiles.length).toBe(6);
|
|
286
|
+
expect(stdout).toContain("image x=0.0 y=0.0 w=100.0 h=100.0");
|
|
287
|
+
});
|
|
288
|
+
it("distributes auto margins, inherits fonts and copies clip-path", () => {
|
|
289
|
+
const { value } = harness.compileAndRun("auto-margins", `
|
|
290
|
+
import { createWindow, run } from "gui";
|
|
291
|
+
|
|
292
|
+
const HTML = \`
|
|
293
|
+
<html><head><style>
|
|
294
|
+
body { margin: 0; font-size: 30px; }
|
|
295
|
+
button { font: inherit; }
|
|
296
|
+
#center { width: 100px; height: 10px; margin: 0 auto; background: #666; }
|
|
297
|
+
#flex { display: flex; width: 300px; height: 10px; }
|
|
298
|
+
#hint { width: 20px; height: 10px; margin-left: auto; background: #777; }
|
|
299
|
+
#outer {
|
|
300
|
+
width: 100px; height: 100px;
|
|
301
|
+
clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
|
|
302
|
+
}
|
|
303
|
+
#outer::before { content: ""; clip-path: inherit; }
|
|
304
|
+
</style></head><body>
|
|
305
|
+
<div id="center"></div>
|
|
306
|
+
<div id="flex"><div id="hint"></div></div>
|
|
307
|
+
<div id="outer"></div>
|
|
308
|
+
<button id="b">x</button>
|
|
309
|
+
</body></html>\`;
|
|
310
|
+
|
|
311
|
+
const win = createWindow({ title: "margins", width: 400, height: 300 });
|
|
312
|
+
win.on("ready", () => {
|
|
313
|
+
const center = win.getBoundingClientRect("#center");
|
|
314
|
+
const hint = win.getBoundingClientRect("#hint");
|
|
315
|
+
console.log("center=" + center.x.toFixed(1));
|
|
316
|
+
console.log("hint=" + hint.x.toFixed(1));
|
|
317
|
+
console.log("font=" + win.computedStyle("#b", "font-size"));
|
|
318
|
+
const outer: any = win.document.querySelector("#outer");
|
|
319
|
+
const inherited: any = getComputedStyle(outer, "::before").getPropertyValue("clip-path");
|
|
320
|
+
const own: any = getComputedStyle(outer).getPropertyValue("clip-path");
|
|
321
|
+
console.log("clip=" + (inherited === own) + ":" + own);
|
|
322
|
+
win.close();
|
|
323
|
+
});
|
|
324
|
+
win.loadHTML(HTML);
|
|
325
|
+
run();
|
|
326
|
+
`);
|
|
327
|
+
expect(value("center")).toBe("150.0");
|
|
328
|
+
expect(value("hint")).toBe("280.0");
|
|
329
|
+
expect(value("font")).toBe("30px");
|
|
330
|
+
expect(value("clip")).toContain("true:polygon(");
|
|
331
|
+
});
|
|
332
|
+
});
|
|
333
|
+
//# sourceMappingURL=gui-css-coverage.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gui-css-coverage.test.js","sourceRoot":"","sources":["../../../tests/e2e/gui-css-coverage.test.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAElE,MAAM,OAAO,GAAG,gBAAgB,EAAE,CAAC;AAEnC,QAAQ,CAAC,MAAM,CAAC,CAAC,YAAY,CAAC,CAAC,8BAA8B,EAAE,GAAG,EAAE;IAClE,SAAS,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC;IACjC,QAAQ,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC;IAElC,EAAE,CAAC,+DAA+D,EAAE,GAAG,EAAE;QACvE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,aAAa,CAC7C,YAAY,EACZ;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BC,CACF,CAAC;QACF,iEAAiE;QACjE,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACnC,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACrC,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAC7C,MAAM,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;IACpC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,mDAAmD,EAAE,GAAG,EAAE;QAC3D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C,iBAAiB,EACjB;;;;;;oEAM8D,KAAK;;;;;;;;;;OAUlE,CACF,CAAC;QACF,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAC,CAAC;QACpF,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAC7B,MAAM,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,mCAAmC,CAAC,CAAC;IAChE,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,+DAA+D,EAAE,GAAG,EAAE;QACvE,MAAM,EAAE,KAAK,EAAE,GAAG,OAAO,CAAC,aAAa,CACrC,cAAc,EACd;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAqCC,CACF,CAAC;QACF,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACtC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACpC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACnC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC;IACnD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* End-to-end tests for the CSS features that need more than a value parser:
|
|
3
|
+
* `calc()`, `box-shadow`, Gaussian `text-shadow`, `backdrop-filter`, CSS
|
|
4
|
+
* transitions (arbitrary properties + cubic-bezier/steps) and `@keyframes`.
|
|
5
|
+
*/
|
|
6
|
+
import { afterAll, beforeAll, describe, expect, it } from "vitest";
|
|
7
|
+
import { createGuiHarness, guiAvailable } from "./gui-helpers.js";
|
|
8
|
+
const harness = createGuiHarness();
|
|
9
|
+
describe.skipIf(!guiAvailable)("gui extension — CSS features", () => {
|
|
10
|
+
beforeAll(() => harness.setup());
|
|
11
|
+
afterAll(() => harness.cleanup());
|
|
12
|
+
it("evaluates calc() arithmetic in every length property", () => {
|
|
13
|
+
const { value } = harness.compileAndRun("calc", `
|
|
14
|
+
import { createWindow, run } from "gui";
|
|
15
|
+
|
|
16
|
+
const HTML = \`
|
|
17
|
+
<html><head><style>
|
|
18
|
+
body { margin: 0; }
|
|
19
|
+
#a {
|
|
20
|
+
position: absolute;
|
|
21
|
+
box-sizing: border-box;
|
|
22
|
+
font-size: calc(8px + 2px);
|
|
23
|
+
left: calc(10px + 5%);
|
|
24
|
+
top: calc(1em + 4px);
|
|
25
|
+
width: calc(100px + 2 * 10px);
|
|
26
|
+
height: calc(50px - 5px);
|
|
27
|
+
padding-left: calc(1em * 2 - 4px);
|
|
28
|
+
background: #ff0000;
|
|
29
|
+
}
|
|
30
|
+
#b { width: min(calc(100px + 10px), 200px); height: clamp(10px, calc(2 * 5px), 40px); }
|
|
31
|
+
</style></head><body><div id="a"></div><div id="b"></div></body></html>
|
|
32
|
+
\`;
|
|
33
|
+
|
|
34
|
+
const win = createWindow({ title: "calc", width: 400, height: 300 });
|
|
35
|
+
win.on("ready", () => {
|
|
36
|
+
const a = win.getBoundingClientRect("#a");
|
|
37
|
+
console.log("a=" + a.x.toFixed(1) + "," + a.y.toFixed(1) + "," +
|
|
38
|
+
a.width.toFixed(1) + "," + a.height.toFixed(1));
|
|
39
|
+
console.log("font=" + win.computedStyle("#a", "font-size"));
|
|
40
|
+
console.log("width=" + win.computedStyle("#a", "width"));
|
|
41
|
+
const b = win.getBoundingClientRect("#b");
|
|
42
|
+
console.log("b=" + b.width.toFixed(1) + "," + b.height.toFixed(1));
|
|
43
|
+
win.close();
|
|
44
|
+
});
|
|
45
|
+
win.loadHTML(HTML);
|
|
46
|
+
run();
|
|
47
|
+
`);
|
|
48
|
+
// 5% of the 400px viewport is 20px; 1em is the calc'd 10px font size.
|
|
49
|
+
expect(value("a")).toBe("30.0,14.0,120.0,45.0");
|
|
50
|
+
expect(value("font")).toBe("10px");
|
|
51
|
+
expect(value("width")).toBe("calc(100px + 2 * 10px)");
|
|
52
|
+
expect(value("b")).toBe("110.0,10.0");
|
|
53
|
+
});
|
|
54
|
+
it("paints box-shadow and blurred text-shadow as Gaussian masks", () => {
|
|
55
|
+
const { value, stdout } = harness.compileAndRun("shadows", `
|
|
56
|
+
import { createWindow, run } from "gui";
|
|
57
|
+
|
|
58
|
+
const HTML = \`
|
|
59
|
+
<html><head><style>
|
|
60
|
+
body { margin: 0; }
|
|
61
|
+
#box {
|
|
62
|
+
width: 100px; height: 50px; background: #336699;
|
|
63
|
+
box-shadow: 4px 6px 12px 2px rgba(0, 0, 0, 0.5), inset 0 0 8px #ff0000;
|
|
64
|
+
}
|
|
65
|
+
#text { font-size: 20px; color: #ffffff; text-shadow: 2px 3px 6px #00ff00; }
|
|
66
|
+
</style></head><body><div id="box"></div><div id="text">Hi</div></body></html>
|
|
67
|
+
\`;
|
|
68
|
+
|
|
69
|
+
const win = createWindow({ title: "shadows", width: 400, height: 300 });
|
|
70
|
+
win.on("ready", () => {
|
|
71
|
+
console.log("box=" + win.computedStyle("#box", "box-shadow"));
|
|
72
|
+
console.log("text=" + win.computedStyle("#text", "text-shadow"));
|
|
73
|
+
console.log("list-start");
|
|
74
|
+
console.log(win.paintList());
|
|
75
|
+
console.log("list-end");
|
|
76
|
+
let frames = 0;
|
|
77
|
+
const tick = (): void => {
|
|
78
|
+
frames += 1;
|
|
79
|
+
if (frames < 2) win.requestAnimationFrame(tick);
|
|
80
|
+
else win.close();
|
|
81
|
+
};
|
|
82
|
+
win.requestAnimationFrame(tick);
|
|
83
|
+
});
|
|
84
|
+
win.loadHTML(HTML);
|
|
85
|
+
run();
|
|
86
|
+
`, { autocloseMs: 10_000 });
|
|
87
|
+
const list = stdout.slice(stdout.indexOf("list-start"), stdout.indexOf("list-end"));
|
|
88
|
+
expect(value("box")).toContain("inset 0px 0px 8px");
|
|
89
|
+
expect(value("box")).toContain("4px 6px 12px 2px");
|
|
90
|
+
expect(value("text")).toBe("2px 3px 6px rgb(0, 255, 0)");
|
|
91
|
+
// A nonzero blur is one pre-blurred texture, not a stack of offset copies.
|
|
92
|
+
expect(list).toContain("bitmap=bs:o:");
|
|
93
|
+
expect(list).toContain("bitmap=bs:i:");
|
|
94
|
+
expect(list).toContain("bitmap=ts:");
|
|
95
|
+
});
|
|
96
|
+
it("runs @keyframes with direction, timing and fill modes", () => {
|
|
97
|
+
const { value } = harness.compileAndRun("keyframes", `
|
|
98
|
+
import { createWindow, run } from "gui";
|
|
99
|
+
|
|
100
|
+
const HTML = \`
|
|
101
|
+
<html><head><style>
|
|
102
|
+
body { margin: 0; }
|
|
103
|
+
@keyframes fade {
|
|
104
|
+
from { opacity: 0; transform: translateX(0px); }
|
|
105
|
+
50% { opacity: 1; }
|
|
106
|
+
to { opacity: 0; transform: translateX(100px); }
|
|
107
|
+
}
|
|
108
|
+
#k { width: 20px; height: 20px; background: #000000;
|
|
109
|
+
animation: fade 1000ms linear forwards; }
|
|
110
|
+
</style></head><body><div id="k"></div></body></html>
|
|
111
|
+
\`;
|
|
112
|
+
|
|
113
|
+
const win = createWindow({ title: "keyframes", width: 400, height: 300 });
|
|
114
|
+
win.on("ready", () => {
|
|
115
|
+
console.log("t0=" + win.computedStyle("#k", "opacity"));
|
|
116
|
+
win.advance(250);
|
|
117
|
+
console.log("t25=" + win.computedStyle("#k", "opacity"));
|
|
118
|
+
console.log("x25=" + win.computedStyle("#k", "transform"));
|
|
119
|
+
win.advance(250);
|
|
120
|
+
console.log("t50=" + win.computedStyle("#k", "opacity"));
|
|
121
|
+
win.advance(250);
|
|
122
|
+
console.log("t75=" + win.computedStyle("#k", "opacity"));
|
|
123
|
+
console.log("x75=" + win.computedStyle("#k", "transform"));
|
|
124
|
+
win.advance(250);
|
|
125
|
+
console.log("t100=" + win.computedStyle("#k", "opacity"));
|
|
126
|
+
win.advance(1000);
|
|
127
|
+
console.log("held=" + win.computedStyle("#k", "opacity"));
|
|
128
|
+
win.close();
|
|
129
|
+
});
|
|
130
|
+
win.loadHTML(HTML);
|
|
131
|
+
run();
|
|
132
|
+
`);
|
|
133
|
+
expect(value("t0")).toBe("0");
|
|
134
|
+
expect(value("t25")).toBe("0.5");
|
|
135
|
+
expect(value("x25")).toBe("translateX(25px)");
|
|
136
|
+
expect(value("t50")).toBe("1");
|
|
137
|
+
expect(value("t75")).toBe("0.5");
|
|
138
|
+
expect(value("x75")).toBe("translateX(75px)");
|
|
139
|
+
expect(value("t100")).toBe("0");
|
|
140
|
+
// `forwards` holds the final keyframe instead of snapping back.
|
|
141
|
+
expect(value("held")).toBe("0");
|
|
142
|
+
});
|
|
143
|
+
it("honours animation delay, backwards fill and alternate direction", () => {
|
|
144
|
+
const { value } = harness.compileAndRun("keyframes-delay", `
|
|
145
|
+
import { createWindow, run } from "gui";
|
|
146
|
+
|
|
147
|
+
const HTML = \`
|
|
148
|
+
<html><head><style>
|
|
149
|
+
body { margin: 0; }
|
|
150
|
+
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
|
|
151
|
+
#d { animation: fade 1000ms linear 500ms backwards; }
|
|
152
|
+
#e { animation: fade 1000ms linear infinite alternate; }
|
|
153
|
+
</style></head><body><div id="d"></div><div id="e"></div></body></html>
|
|
154
|
+
\`;
|
|
155
|
+
|
|
156
|
+
const win = createWindow({ title: "keyframes-delay", width: 400, height: 300 });
|
|
157
|
+
win.on("ready", () => {
|
|
158
|
+
console.log("d0=" + win.computedStyle("#d", "opacity"));
|
|
159
|
+
console.log("e0=" + win.computedStyle("#e", "opacity"));
|
|
160
|
+
win.advance(500);
|
|
161
|
+
console.log("d500=" + win.computedStyle("#d", "opacity"));
|
|
162
|
+
win.advance(500);
|
|
163
|
+
console.log("d1000=" + win.computedStyle("#d", "opacity"));
|
|
164
|
+
console.log("e1000=" + win.computedStyle("#e", "opacity"));
|
|
165
|
+
win.advance(500);
|
|
166
|
+
console.log("e1500=" + win.computedStyle("#e", "opacity"));
|
|
167
|
+
win.close();
|
|
168
|
+
});
|
|
169
|
+
win.loadHTML(HTML);
|
|
170
|
+
run();
|
|
171
|
+
`);
|
|
172
|
+
// `backwards` shows the first keyframe throughout the delay.
|
|
173
|
+
expect(value("d0")).toBe("0");
|
|
174
|
+
expect(value("d500")).toBe("0");
|
|
175
|
+
expect(value("d1000")).toBe("0.5");
|
|
176
|
+
// `alternate` starts the second iteration at the first one's end value
|
|
177
|
+
// and then runs it backwards.
|
|
178
|
+
expect(value("e0")).toBe("0");
|
|
179
|
+
expect(value("e1000")).toBe("1");
|
|
180
|
+
expect(value("e1500")).toBe("0.5");
|
|
181
|
+
});
|
|
182
|
+
it("interpolates transitions with arbitrary properties, cubic-bezier and steps", () => {
|
|
183
|
+
const { value } = harness.compileAndRun("transition-easing", `
|
|
184
|
+
import { createWindow, run } from "gui";
|
|
185
|
+
|
|
186
|
+
const HTML = \`
|
|
187
|
+
<html><head><style>
|
|
188
|
+
body { margin: 0; }
|
|
189
|
+
#t {
|
|
190
|
+
width: 100px; height: 20px; opacity: 1;
|
|
191
|
+
background: #000000;
|
|
192
|
+
transition: width 1000ms steps(4, end),
|
|
193
|
+
opacity 1000ms cubic-bezier(0.5, 0, 0.5, 1);
|
|
194
|
+
}
|
|
195
|
+
#t:hover { width: 200px; opacity: 0.2; }
|
|
196
|
+
</style></head><body><div id="t"></div></body></html>
|
|
197
|
+
\`;
|
|
198
|
+
|
|
199
|
+
const win = createWindow({ title: "transition-easing", width: 400, height: 300 });
|
|
200
|
+
win.on("ready", () => {
|
|
201
|
+
win.sendEvent("mousemove", { x: 50, y: 10 });
|
|
202
|
+
console.log("start=" + win.getBoundingClientRect("#t").width.toFixed(1));
|
|
203
|
+
win.advance(200);
|
|
204
|
+
console.log("w20=" + win.getBoundingClientRect("#t").width.toFixed(1));
|
|
205
|
+
win.advance(300);
|
|
206
|
+
console.log("w50=" + win.getBoundingClientRect("#t").width.toFixed(1));
|
|
207
|
+
console.log("o50=" + win.computedStyle("#t", "opacity"));
|
|
208
|
+
win.advance(300);
|
|
209
|
+
console.log("w80=" + win.getBoundingClientRect("#t").width.toFixed(1));
|
|
210
|
+
win.close();
|
|
211
|
+
});
|
|
212
|
+
win.loadHTML(HTML);
|
|
213
|
+
run();
|
|
214
|
+
`);
|
|
215
|
+
// steps(4, end) holds 100px until 250ms, then jumps by 25px.
|
|
216
|
+
expect(value("start")).toBe("100.0");
|
|
217
|
+
expect(value("w20")).toBe("100.0");
|
|
218
|
+
expect(value("w50")).toBe("150.0");
|
|
219
|
+
// cubic-bezier(0.5, 0, 0.5, 1) is symmetric: 50% progress -> 0.6 opacity.
|
|
220
|
+
expect(value("o50")).toBe("0.6");
|
|
221
|
+
expect(value("w80")).toBe("175.0");
|
|
222
|
+
});
|
|
223
|
+
it("composites backdrop-filter from an offscreen snapshot of the scene", () => {
|
|
224
|
+
const { value, stdout, stderr } = harness.compileAndRun("backdrop", `
|
|
225
|
+
import { createWindow, run } from "gui";
|
|
226
|
+
|
|
227
|
+
const HTML = \`
|
|
228
|
+
<html><head><style>
|
|
229
|
+
body { margin: 0; }
|
|
230
|
+
#scene { width: 200px; height: 100px; background: #3366cc; }
|
|
231
|
+
#glass {
|
|
232
|
+
position: absolute; left: 20px; top: 20px; width: 80px; height: 40px;
|
|
233
|
+
border-radius: 8px;
|
|
234
|
+
backdrop-filter: blur(4px) brightness(0.5);
|
|
235
|
+
background: rgba(255, 255, 255, 0.2);
|
|
236
|
+
}
|
|
237
|
+
</style></head><body>
|
|
238
|
+
<div id="scene"><div id="glass"></div></div>
|
|
239
|
+
</body></html>
|
|
240
|
+
\`;
|
|
241
|
+
|
|
242
|
+
const win = createWindow({ title: "backdrop", width: 400, height: 300 });
|
|
243
|
+
win.on("ready", () => {
|
|
244
|
+
console.log("filter=" + win.computedStyle("#glass", "backdrop-filter"));
|
|
245
|
+
console.log("list-start");
|
|
246
|
+
console.log(win.paintList());
|
|
247
|
+
console.log("list-end");
|
|
248
|
+
/* Keep the loop alive for a couple of frames: the compositor compiles
|
|
249
|
+
* its shaders on the first draw, which is what exercises the backdrop
|
|
250
|
+
* pass (the assertions read its stderr). */
|
|
251
|
+
let frames = 0;
|
|
252
|
+
const tick = (): void => {
|
|
253
|
+
frames += 1;
|
|
254
|
+
if (frames < 3) win.requestAnimationFrame(tick);
|
|
255
|
+
else win.close();
|
|
256
|
+
};
|
|
257
|
+
win.requestAnimationFrame(tick);
|
|
258
|
+
});
|
|
259
|
+
win.loadHTML(HTML);
|
|
260
|
+
run();
|
|
261
|
+
`, { features: ["gpu"], autocloseMs: 10_000 });
|
|
262
|
+
const list = stdout.slice(stdout.indexOf("list-start"), stdout.indexOf("list-end"));
|
|
263
|
+
expect(value("filter")).toBe("blur(4px) brightness(0.5)");
|
|
264
|
+
expect(list).toContain("backdrop x=20.0 y=20.0 w=80.0 h=40.0 r=8.0 blur=4.0");
|
|
265
|
+
// The runtime shader must have compiled; a failure would only log.
|
|
266
|
+
expect(stderr).not.toContain("backdrop-filter shader unavailable");
|
|
267
|
+
expect(stderr).not.toContain("backdrop-filter pipeline creation failed");
|
|
268
|
+
});
|
|
269
|
+
});
|
|
270
|
+
//# sourceMappingURL=gui-css-features.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gui-css-features.test.js","sourceRoot":"","sources":["../../../tests/e2e/gui-css-features.test.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAElE,MAAM,OAAO,GAAG,gBAAgB,EAAE,CAAC;AAEnC,QAAQ,CAAC,MAAM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