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.
Files changed (36) hide show
  1. package/README.md +2 -364
  2. package/client/chemical.components.js +42 -25
  3. package/client/chemical.js +8 -0
  4. package/index.js +2 -0
  5. package/package.json +1 -1
  6. package/examples/example/README.md +0 -3
  7. package/examples/example/index.js +0 -21
  8. package/examples/example/package-lock.json +0 -3889
  9. package/examples/example/package.json +0 -24
  10. package/examples/example/public/index.html +0 -13
  11. package/examples/example-build/README.md +0 -5
  12. package/examples/example-build/build.js +0 -13
  13. package/examples/example-build/index.js +0 -16
  14. package/examples/example-build/package-lock.json +0 -3889
  15. package/examples/example-build/package.json +0 -25
  16. package/examples/example-build/public/index.html +0 -13
  17. package/examples/example-components/README.md +0 -3
  18. package/examples/example-components/index.js +0 -16
  19. package/examples/example-components/package-lock.json +0 -3889
  20. package/examples/example-components/package.json +0 -24
  21. package/examples/example-components/public/index.html +0 -45
  22. package/examples/example-styled/README.md +0 -3
  23. package/examples/example-styled/index.js +0 -16
  24. package/examples/example-styled/package-lock.json +0 -3889
  25. package/examples/example-styled/package.json +0 -24
  26. package/examples/example-styled/public/index.html +0 -24
  27. package/examples/example-styled/public/style.css +0 -82
  28. package/examples/example-vite/README.md +0 -9
  29. package/examples/example-vite/index.html +0 -12
  30. package/examples/example-vite/index.js +0 -16
  31. package/examples/example-vite/package-lock.json +0 -4834
  32. package/examples/example-vite/package.json +0 -19
  33. package/examples/example-vite/src/app.jsx +0 -14
  34. package/examples/example-vite/src/main.jsx +0 -4
  35. package/examples/example-vite/vite.config.js +0 -10
  36. package/update.bash +0 -16
@@ -1,24 +0,0 @@
1
- {
2
- "name": "chemical-example-styled",
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,24 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <meta name="description" content="This is an example project for Chemical.">
7
- <title>Chemical Example</title>
8
- <link rel="stylesheet" href="/style.css">
9
- <script src="/chemical.js"></script>
10
- <script src="/chemical.components.js"></script>
11
- </head>
12
- <body>
13
- <h1>Chemical Example</h1>
14
- <p>Create your own using <a href="https://github.com/chemicaljs/chemical">Chemical!</a></p>
15
- <input autofocus spellcheck="false" autocomplete="off" id="search" frame="web" placeholder="Enter a URL" is="chemical-input">
16
- <section id="controls" is="chemical-controls">
17
- <button onclick="chemicalAction('back', 'web')">Back</button>
18
- <button onclick="chemicalAction('forward', 'web')">Forward</button>
19
- <button onclick="chemicalAction('reload', 'web')">Reload</button>
20
- <button onclick="chemicalAction('close', 'web')">Close</button>
21
- </section>
22
- <iframe id="web" controls="controls" is="chemical-iframe"></iframe>
23
- </body>
24
- </html>
@@ -1,82 +0,0 @@
1
- body {
2
- margin: 0;
3
- height: 100vh;
4
- display: flex;
5
- flex-direction: column;
6
- justify-content: center;
7
- align-items: center;
8
- background: #212121;
9
- color: white;
10
- font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
11
- }
12
-
13
- *,
14
- *::before,
15
- *::after {
16
- box-sizing: border-box;
17
- }
18
-
19
- #search {
20
- background: #2f2f2f;
21
- font-size: inherit;
22
- color: inherit;
23
- font-family: inherit;
24
- border: none;
25
- outline: none;
26
- padding: 1rem 1rem;
27
- border-radius: 16px;
28
- width: 42rem;
29
- max-width: calc(100% - 2rem);
30
- }
31
-
32
- #controls {
33
- position: fixed;
34
- top: 0;
35
- right: 0;
36
- left: 0;
37
- height: 2.5rem;
38
- display: flex;
39
- justify-content: right;
40
- align-items: center;
41
- padding: 0 0.5rem;
42
- gap: 0.5rem;
43
- }
44
-
45
- #controls button {
46
- background: rgba(255, 255, 255, 0.2);
47
- border: none;
48
- color: inherit;
49
- font-family: inherit;
50
- font-size: inherit;
51
- cursor: pointer;
52
- user-select: none;
53
- border-radius: 6px;
54
- padding: 0.25rem 0.5rem;
55
- }
56
-
57
- #web {
58
- position: fixed;
59
- top: 2.5rem;
60
- right: 0;
61
- left: 0;
62
- bottom: 0;
63
- width: 100%;
64
- height: calc(100% - 2.5rem);
65
- border: none;
66
- background: #212121;
67
- user-select: none;
68
- }
69
-
70
- h1 {
71
- margin: 0;
72
- margin-bottom: 0.25rem;
73
- }
74
-
75
- p {
76
- margin: 0;
77
- margin-bottom: 2rem;
78
- }
79
-
80
- a {
81
- color: inherit;
82
- }
@@ -1,9 +0,0 @@
1
- # Chemical Example Vite
2
-
3
- Note: This example uses Preact but any framework will work.
4
-
5
- Run `npm install` to install dependencies.
6
-
7
- Run `npm run build` to build and `npm start` to start.
8
-
9
- Run `npm run dev` to start the dev server which is the point of this example.
@@ -1,12 +0,0 @@
1
- <!doctype html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8" />
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
- <script src="/chemical.js"></script>
7
- </head>
8
- <body>
9
- <div id="app"></div>
10
- <script type="module" src="/src/main.jsx"></script>
11
- </body>
12
- </html>
@@ -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("dist", {
8
- index: "index.html",
9
- extensions: ["html"]
10
- }));
11
-
12
- app.serveChemical();
13
-
14
- listen(port, () => {
15
- console.log(`Chemical example vite listening on port ${port}`);
16
- });