enigmatic 0.27.0 → 0.29.0
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/CLIENT_JS_DOCS.md +322 -0
- package/__tests__/e2.test.js +270 -52
- package/__tests__/jest.config.js +7 -0
- package/{jest.setup.js → __tests__/jest.setup.js} +0 -1
- package/bun-server.js +130 -0
- package/package.json +12 -12
- package/public/client.js +98 -0
- package/public/custom.js +29 -0
- package/public/index.html +45 -0
- package/README.md +0 -218
- package/__tests__/enigmatic.test.js +0 -328
- package/components.js +0 -58
- package/e2.js +0 -38
- package/enigmatic.js +0 -248
- package/index.html +0 -34
- package/jest.config.js +0 -7
- /package/{enigmatic.css → public/client.css} +0 -0
- /package/{theme.css → public/theme.css} +0 -0
package/index.html
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
<script src="components.js"></script>
|
|
2
|
-
<script src="enigmatic.js"></script>
|
|
3
|
-
<script src="e2.js"></script>
|
|
4
|
-
<link rel="stylesheet" href="enigmatic.css">
|
|
5
|
-
|
|
6
|
-
<body style="--cols:1fr; --rows:1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr">
|
|
7
|
-
<hello-world data="name"></hello-world>
|
|
8
|
-
<my-element></my-element>
|
|
9
|
-
|
|
10
|
-
<div id=one fetch="https://randomuser.me/api/?results=1" t="e=>e.results">{email}</div>
|
|
11
|
-
|
|
12
|
-
<script>
|
|
13
|
-
// Wait for DOM and enigmatic.js to be ready
|
|
14
|
-
document.addEventListener('DOMContentLoaded', async () => {
|
|
15
|
-
// Wait for e to be available (enigmatic.js assigns it)
|
|
16
|
-
while (typeof window.e === 'undefined') {
|
|
17
|
-
await new Promise(r => setTimeout(r, 10))
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
e('my-element', {
|
|
21
|
-
init: (e) => e.innerText = 'ready',
|
|
22
|
-
click: (ev) => ev.target.style.color = 'green',
|
|
23
|
-
mouseover: (ev) => ev.target.style.color = 'yellow',
|
|
24
|
-
}, {
|
|
25
|
-
color: 'red',
|
|
26
|
-
"text-decoration": 'underline'
|
|
27
|
-
})
|
|
28
|
-
|
|
29
|
-
// Set state for components
|
|
30
|
-
await ready()
|
|
31
|
-
state.name = { name: 'World' }
|
|
32
|
-
})
|
|
33
|
-
</script>
|
|
34
|
-
</body>
|
package/jest.config.js
DELETED
|
File without changes
|
|
File without changes
|