chemicaljs 1.7.2 → 1.7.4
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 +2 -364
- package/client/chemical.components.js +42 -25
- package/client/chemical.js +8 -0
- package/index.js +2 -0
- package/package.json +1 -1
- package/examples/example/README.md +0 -3
- package/examples/example/index.js +0 -21
- package/examples/example/package-lock.json +0 -3889
- package/examples/example/package.json +0 -24
- package/examples/example/public/index.html +0 -13
- package/examples/example-build/README.md +0 -5
- package/examples/example-build/build.js +0 -13
- package/examples/example-build/index.js +0 -16
- package/examples/example-build/package-lock.json +0 -3889
- package/examples/example-build/package.json +0 -25
- package/examples/example-build/public/index.html +0 -13
- package/examples/example-components/README.md +0 -3
- package/examples/example-components/index.js +0 -16
- package/examples/example-components/package-lock.json +0 -3889
- package/examples/example-components/package.json +0 -24
- package/examples/example-components/public/index.html +0 -45
- package/examples/example-styled/README.md +0 -3
- package/examples/example-styled/index.js +0 -16
- package/examples/example-styled/package-lock.json +0 -3889
- package/examples/example-styled/package.json +0 -24
- package/examples/example-styled/public/index.html +0 -24
- package/examples/example-styled/public/style.css +0 -82
- package/examples/example-vite/README.md +0 -9
- package/examples/example-vite/index.html +0 -12
- package/examples/example-vite/index.js +0 -16
- package/examples/example-vite/package-lock.json +0 -4834
- package/examples/example-vite/package.json +0 -19
- package/examples/example-vite/src/app.jsx +0 -14
- package/examples/example-vite/src/main.jsx +0 -4
- package/examples/example-vite/vite.config.js +0 -10
- package/update.bash +0 -16
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "chemical-example-components",
|
|
3
|
-
"version": "1.0.0",
|
|
4
|
-
"description": "This is an example project for Chemical.",
|
|
5
|
-
"main": "index.js",
|
|
6
|
-
"type": "module",
|
|
7
|
-
"scripts": {
|
|
8
|
-
"start": "node index.js"
|
|
9
|
-
},
|
|
10
|
-
"repository": {
|
|
11
|
-
"type": "git",
|
|
12
|
-
"url": "git+https://github.com/chemicaljs/chemical.git"
|
|
13
|
-
},
|
|
14
|
-
"author": "Nebelung",
|
|
15
|
-
"license": "MIT",
|
|
16
|
-
"bugs": {
|
|
17
|
-
"url": "https://github.com/chemicaljs/chemical/issues"
|
|
18
|
-
},
|
|
19
|
-
"homepage": "https://github.com/chemicaljs/chemical#readme",
|
|
20
|
-
"dependencies": {
|
|
21
|
-
"chemicaljs": "^1.7.1",
|
|
22
|
-
"express": "^4.19.2"
|
|
23
|
-
}
|
|
24
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
<h1>Chemical Example</h1>
|
|
2
|
-
|
|
3
|
-
<p>Open on click</p>
|
|
4
|
-
<a href="https://example.com" is="chemical-link">Example Link</a>
|
|
5
|
-
<style>
|
|
6
|
-
a {
|
|
7
|
-
color: blue;
|
|
8
|
-
text-decoration: underline;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
a[data-chemical-loading="true"] {
|
|
12
|
-
cursor: wait;
|
|
13
|
-
}
|
|
14
|
-
</style>
|
|
15
|
-
<p>Open in current tab</p>
|
|
16
|
-
<input target="_self" placeholder="Enter URL" is="chemical-input">
|
|
17
|
-
<p>Open in new tab</p>
|
|
18
|
-
<input target="_blank" placeholder="Enter URL" is="chemical-input">
|
|
19
|
-
<p>Custom action (console log)</p>
|
|
20
|
-
<input action="logURL" placeholder="Enter URL" is="chemical-input">
|
|
21
|
-
<script>
|
|
22
|
-
function logURL(url) {
|
|
23
|
-
console.log(url)
|
|
24
|
-
}
|
|
25
|
-
</script>
|
|
26
|
-
<p>With button</p>
|
|
27
|
-
<input id="my-input" target="_blank" placeholder="Enter URL" is="chemical-input">
|
|
28
|
-
<button for="my-input" is="chemical-button">Go!</button>
|
|
29
|
-
<p>With iframe</p>
|
|
30
|
-
<input frame="my-iframe" placeholder="Enter URL" is="chemical-input">
|
|
31
|
-
<br>
|
|
32
|
-
<iframe id="my-iframe" is="chemical-iframe"></iframe>
|
|
33
|
-
<p>With iframe and controls</p>
|
|
34
|
-
<input frame="my-iframe-2" placeholder="Enter URL" is="chemical-input">
|
|
35
|
-
<section id="my-controls-2" is="chemical-controls">
|
|
36
|
-
<button onclick="chemicalAction('back', 'my-iframe-2')">←</button>
|
|
37
|
-
<button onclick="chemicalAction('forward', 'my-iframe-2')">→</button>
|
|
38
|
-
<button onclick="chemicalAction('reload', 'my-iframe-2')">⟳</button>
|
|
39
|
-
<button onclick="chemicalAction('close', 'my-iframe-2')">🗙</button>
|
|
40
|
-
</section>
|
|
41
|
-
<br>
|
|
42
|
-
<iframe controls="my-controls-2" id="my-iframe-2" is="chemical-iframe"></iframe>
|
|
43
|
-
|
|
44
|
-
<script src="/chemical.js"></script>
|
|
45
|
-
<script src="/chemical.components.js"></script>
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { ChemicalServer } from "chemicaljs";
|
|
2
|
-
import express from "express";
|
|
3
|
-
|
|
4
|
-
const [app, listen] = new ChemicalServer();
|
|
5
|
-
const port = process.env.PORT || 3000;
|
|
6
|
-
|
|
7
|
-
app.use(express.static("public", {
|
|
8
|
-
index: "index.html",
|
|
9
|
-
extensions: ["html"]
|
|
10
|
-
}));
|
|
11
|
-
|
|
12
|
-
app.serveChemical();
|
|
13
|
-
|
|
14
|
-
listen(port, () => {
|
|
15
|
-
console.log(`Chemical example styled listening on port ${port}`);
|
|
16
|
-
});
|