-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_stamp.js
91 lines (89 loc) · 3.09 KB
/
_stamp.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
import "./chunk-BYXBJQAS.js";
import {
ProgVm
} from "./chunk-MH565JGM.js";
import {
Icon,
Progress,
buildStamp,
makeTestComponentContext,
makeTestEvent,
require_lucide
} from "./chunk-X4RUJGUJ.js";
import {
__toESM,
require_cjs
} from "./chunk-QC5UYQHG.js";
// _stamp.ts
var import_lucide = __toESM(require_lucide(), 1);
import { JSDOM } from "jsdom";
import { writeFile } from "node:fs/promises";
var import_rxjs = __toESM(require_cjs(), 1);
var dom = new JSDOM(`
<!doctype html>
<html>
<head>
<title>Composite Radial Progress Demo</title>
<link rel="stylesheet" href="index.css" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<script type="module" src="index-stamp.js"></script>
</head>
<body id="container"></body>
</html>
`);
var { window } = dom;
globalThis.window = window;
var { document } = window;
globalThis.document = document;
var jQuery = function() {
};
jQuery.fn = {};
globalThis.jQuery = jQuery;
var container = document.getElementById("container");
var { context: testMainContext } = makeTestComponentContext({
addItem: makeTestEvent(import_rxjs.NEVER),
toggleMenu: makeTestEvent(import_rxjs.NEVER),
attach: makeTestEvent(import_rxjs.NEVER),
pauseAll: makeTestEvent(import_rxjs.NEVER),
unpauseAll: makeTestEvent(import_rxjs.NEVER)
});
var { Main } = await import("./main-PT6WCVI2.js");
var mainTree = Main({}, testMainContext);
var mainStamp = buildStamp(mainTree, document);
container.append(mainStamp.content);
function appendStamp(stamp) {
container.append(stamp);
}
var githubIconStamp = buildStamp(Icon({ icon: import_lucide.Github }), document);
githubIconStamp.id = "icon-github";
appendStamp(githubIconStamp);
var pauseIconStamp = buildStamp(Icon({ icon: import_lucide.Pause }), document);
pauseIconStamp.id = "icon-pause";
appendStamp(pauseIconStamp);
var playIconStamp = buildStamp(Icon({ icon: import_lucide.Play }), document);
playIconStamp.id = "icon-play";
appendStamp(playIconStamp);
var plusIconStamp = buildStamp(Icon({ icon: import_lucide.Plus }), document);
plusIconStamp.id = "icon-plus";
appendStamp(plusIconStamp);
var ffIconStamp = buildStamp(Icon({ icon: import_lucide.FastForward }), document);
ffIconStamp.id = "icon-fast-forward";
appendStamp(ffIconStamp);
var rwIconStamp = buildStamp(Icon({ icon: import_lucide.Rewind }), document);
rwIconStamp.id = "icon-rewind";
appendStamp(rwIconStamp);
var skipIconStamp = buildStamp(Icon({ icon: import_lucide.SkipForward }), document);
skipIconStamp.id = "icon-skip-forward";
appendStamp(skipIconStamp);
var { context: testProgressContext } = makeTestComponentContext({
finish: makeTestEvent(import_rxjs.NEVER),
pause: makeTestEvent(import_rxjs.NEVER),
slowDown: makeTestEvent(import_rxjs.NEVER),
speedUp: makeTestEvent(import_rxjs.NEVER),
unpause: makeTestEvent(import_rxjs.NEVER)
});
var progressTree = Progress({ item: new ProgVm() }, testProgressContext);
var progressStamp = buildStamp(progressTree, document);
progressStamp.id = "progress";
appendStamp(progressStamp);
await writeFile("index.html", dom.serialize());