2022-12-10 10:27:23 -05:00
|
|
|
import React from "react";
|
|
|
|
import {html} from "htm";
|
2022-12-04 16:19:22 -05:00
|
|
|
import * as TW from "./twind.js";
|
2022-12-03 19:05:26 -05:00
|
|
|
import * as UI from "./ui.js";
|
2022-12-05 23:22:37 -05:00
|
|
|
import * as Store from "./store.js";
|
2022-12-03 19:05:26 -05:00
|
|
|
|
2022-12-10 11:57:45 -05:00
|
|
|
// @ts-ignore:
|
2022-12-04 16:19:22 -05:00
|
|
|
const ShadowDOM = document.querySelector("#app").attachShadow({mode: "open"});
|
|
|
|
const ShadowDiv = document.createElement("div");
|
|
|
|
const ShadowCSS = document.createElement("style");
|
|
|
|
ShadowDOM.append(ShadowCSS);
|
|
|
|
ShadowDOM.append(ShadowDiv);
|
|
|
|
|
|
|
|
TW.Init(ShadowCSS, ShadowDiv);
|
|
|
|
|
2022-12-03 19:05:26 -05:00
|
|
|
React.render(html`
|
2022-12-05 23:22:37 -05:00
|
|
|
<${Store.Provider}>
|
2022-12-10 14:45:15 -05:00
|
|
|
<${UI.Select}/>
|
2022-12-11 22:57:07 -05:00
|
|
|
|
|
|
|
<div class="flex">
|
|
|
|
<${UI.Controls}/>
|
|
|
|
<div class="flex-1">
|
|
|
|
<${UI.Chart}>
|
|
|
|
<${UI.Audiogram}/>
|
|
|
|
<//>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2022-11-27 16:57:06 -05:00
|
|
|
<//>
|
2022-11-25 15:51:27 -05:00
|
|
|
`, ShadowDiv);
|