Skip to content

Commit 9c46f9c

Browse files
committed
ImageViewer: built with Kotlin 2.2.20-RC2 * Compose 1.9.0-rc01
1 parent 85f6aa3 commit 9c46f9c

14 files changed

+3274
-7
lines changed
Binary file not shown.

wasm/iv/META-INF/MANIFEST.MF

Lines changed: 0 additions & 2 deletions
This file was deleted.

wasm/iv/b5c6f09c15c40efcbf82.wasm

3.32 MB
Binary file not shown.

wasm/iv/imageviewer.js

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
const loadApp = () => {
2+
const simpleWasmModule = new Uint8Array([
3+
0, 97, 115, 109, 1, 0, 0, 0, 1, 8, 2, 95,
4+
1, 120, 0, 96, 0, 0, 3, 3, 2, 1, 1, 10,
5+
14, 2, 6, 0, 6, 64, 25, 11, 11, 5, 0, 208,
6+
112, 26, 11, 0, 45, 4, 110, 97, 109, 101, 1, 15,
7+
2, 0, 5, 102, 117, 110, 99, 48, 1, 5, 102, 117,
8+
110, 99, 49, 4, 8, 1, 0, 5, 116, 121, 112, 101,
9+
48, 10, 11, 1, 0, 1, 0, 6, 102, 105, 101, 108,
10+
100, 48
11+
]);
12+
13+
const hasSupportOfAllRequiredWasmFeatures = () =>
14+
typeof WebAssembly !== "undefined" &&
15+
typeof WebAssembly?.validate === "function" &&
16+
WebAssembly.validate(simpleWasmModule);
17+
18+
const createScript = (src) => {
19+
const script = document.createElement("script");
20+
script.src = src;
21+
script.type = "application/javascript";
22+
return script;
23+
}
24+
25+
document.body.appendChild(createScript(hasSupportOfAllRequiredWasmFeatures() ? "originWasmWebApp.js" : "originJsImageviewer.js"));
26+
}
27+
28+
if (document.readyState === "loading") {
29+
document.addEventListener("DOMContentLoaded", loadApp);
30+
} else {
31+
loadApp();
32+
}

wasm/iv/imageviewer.js.LICENSE.txt

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
/*
2+
* @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper
3+
* @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
4+
* @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
5+
*/
6+
7+
/*
8+
* @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper
9+
* @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
10+
*/
11+
12+
/*
13+
* @copyright (c) 2016, Philipp Thürwächter, Pattrick Hüper
14+
* @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
15+
* @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
16+
*/
17+
18+
/**
19+
* @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper
20+
* @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
21+
* @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
22+
*/
23+
24+
/**
25+
* @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper
26+
* @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
27+
*/
28+
29+
//! @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
30+
31+
//! @copyright (c) 2015-present, Philipp Thürwächter, Pattrick Hüper & js-joda contributors
32+
33+
//! @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
34+
35+
//! @version @js-joda/core - 3.2.0

wasm/iv/imageviewer.wasm

-2.76 MB
Binary file not shown.

wasm/iv/index.html

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,15 @@
5757
right: 10px;
5858
cursor: pointer;
5959
}
60+
61+
#composeApp {
62+
width: 100%;
63+
height: 100%;
64+
}
6065

6166
#demos {
6267
position: absolute;
68+
top: 0;
6369
right: 50px;
6470
}
6571

@@ -113,6 +119,9 @@
113119
</style>
114120
</head>
115121
<body>
122+
123+
<div id="composeApp"></div>
124+
116125
<div id="demos">
117126
<a href="/wasm/iv" class="current">Image Viewer</a>
118127
<a href="/wasm/jetsnack">JetSnack</a>
@@ -121,8 +130,6 @@
121130
<a href="https://kotl.in/wasm-examples" target="_blank" class="icon" title="https://kotl.in/wasm-examples"> <img src="/resources/github-mark.svg" width="20" alt="github"/> </a>
122131
</div>
123132

124-
<canvas id="ComposeTarget"></canvas>
125-
126133
<div id="warning">
127134
⚠️ Please make sure that your runtime environment supports the latest version of Wasm GC and Exception-Handling proposals.
128135
For more information, see <a href="https://kotl.in/wasm-help" target="_blank">https://kotl.in/wasm-help</a>.

wasm/iv/js-reexport-symbols.mjs

Lines changed: 974 additions & 0 deletions
Large diffs are not rendered by default.

wasm/iv/originJsImageviewer.js

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

wasm/iv/originWasmWebApp.js

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)