-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Remove preact references from html
Signed-off-by: Gordon Smith <[email protected]>
- Loading branch information
1 parent
f297d81
commit c78df51
Showing
6 changed files
with
98 additions
and
5 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
|
||
<head> | ||
<title>Home</title> | ||
<style> | ||
body { | ||
font-family: Arial, sans-serif; | ||
margin: 0; | ||
padding: 0; | ||
background-color: #f0f0f0; | ||
} | ||
|
||
h1 { | ||
text-align: center; | ||
margin-top: 50px; | ||
} | ||
|
||
#placeholder { | ||
width: 100%; | ||
height: 500px; | ||
background-color: #fff; | ||
margin-top: 20px; | ||
} | ||
</style> | ||
<script type="importmap"> | ||
{ | ||
"imports": { | ||
"@observablehq/runtime": "https://cdn.jsdelivr.net/npm/@observablehq/[email protected]/dist/runtime.js", | ||
|
||
"@hpcc-js/util": "../util/dist/index.js", | ||
"@hpcc-js/common": "../common/dist/index.js", | ||
"@hpcc-js/api": "../api/dist/index.js", | ||
"@hpcc-js/chart": "../chart/dist/index.js", | ||
"@hpcc-js/comms": "../comms/dist/index.js", | ||
"@hpcc-js/observablehq-compiler": "../observablehq-compiler/dist/index.js", | ||
"@hpcc-js/html": "../comms/html/index.js", | ||
"@hpcc-js/react": "../react/dist/index.js", | ||
"react":"../../node_modules/react/umd/react.development.js", | ||
"react-dom/client":"../../node_modules/react-dom/client.js", | ||
"preact":"../../node_modules/preact/dist/preact.module.js", | ||
"preact/compat":"../../node_modules/preact/compat/dist/compat.module.js", | ||
"preact/hooks":"../../node_modules/preact/hooks/dist/hooks.module.js", | ||
"react":"../../node_modules/preact/compat/dist/compat.module.js", | ||
"react-dom/client":"../../node_modules/preact/compat/client.mjs" | ||
} | ||
} | ||
</script> | ||
<link rel="stylesheet" href="../common/dist/index.css"> | ||
<link rel="stylesheet" href="./dist/index.css"> | ||
</head> | ||
|
||
<body onresize="doResize()"> | ||
<h1>ESM Quick Test</h1> | ||
<div id="placeholder"></div> | ||
<script type="module"> | ||
import { HTMLAdapter, SVGAdapter, Span, Text, LabelledRect, TextLine, Circle, Square, Rectangle, Shape } from "@hpcc-js/react"; | ||
|
||
window.__widget = new SVGAdapter(Text) | ||
.target("placeholder") | ||
.prop("text", "red") | ||
.render() | ||
; | ||
|
||
setTimeout(() => { | ||
window.__widget | ||
.prop("text", "gggg Hello\nWorld 2 yyyy") | ||
.render() | ||
; | ||
}, 1000); | ||
</script> | ||
<script> | ||
function doResize() { | ||
window.__widget | ||
?.resize() | ||
?.render() | ||
; | ||
} | ||
</script> | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters