@wrnrlr/prelude 0.1.2 → 0.1.3
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/deno.json +1 -1
- package/package.json +1 -1
- package/src/controlflow.ts +1 -1
- package/www/assets/css/style.css +3 -3
- package/www/demo.html +15 -0
- package/www/index.html +2 -2
- package/www/playground.html +1 -1
- package/www/public/example/counter.html +1 -1
- package/www/public/example/todo.html +1 -1
- /package/www/{assets → public}/fonts/fab.ttf +0 -0
- /package/www/{assets → public}/fonts/fab.woff2 +0 -0
- /package/www/{assets → public}/fonts/far.ttf +0 -0
- /package/www/{assets → public}/fonts/far.woff2 +0 -0
- /package/www/{assets → public}/fonts/fas.ttf +0 -0
- /package/www/{assets → public}/fonts/fas.woff2 +0 -0
package/deno.json
CHANGED
package/package.json
CHANGED
package/src/controlflow.ts
CHANGED
@@ -81,7 +81,7 @@ export function List<T>(props:ListProps<T>) {
|
|
81
81
|
}
|
82
82
|
const mapper = indexes ? mapperWithIndexes : mapperWithoutIndexes
|
83
83
|
return memo(() => {
|
84
|
-
const newItems = list.call ? list() :
|
84
|
+
const newItems = list.call ? list() : list
|
85
85
|
// (newItems)[$TRACK]; // top level tracking
|
86
86
|
return untrack(() => {
|
87
87
|
const temp = new Array(newItems.length) // new mapped array
|
package/www/assets/css/style.css
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
font-style: normal;
|
6
6
|
font-weight: 400;
|
7
7
|
font-display: block;
|
8
|
-
src: url("
|
8
|
+
src: url("/fonts/far.woff2") format("woff2"), url("/fonts/far.ttf") format("truetype");
|
9
9
|
}
|
10
10
|
|
11
11
|
@font-face {
|
@@ -13,7 +13,7 @@
|
|
13
13
|
font-style: normal;
|
14
14
|
font-weight: 900;
|
15
15
|
font-display: block;
|
16
|
-
src: url("
|
16
|
+
src: url("/fonts/fas.woff2") format("woff2"), url("/fonts/fas.ttf") format("truetype");
|
17
17
|
};
|
18
18
|
|
19
19
|
@font-face {
|
@@ -21,7 +21,7 @@
|
|
21
21
|
font-style: normal;
|
22
22
|
font-weight: 400;
|
23
23
|
font-display: block;
|
24
|
-
src: url("
|
24
|
+
src: url("/fonts/fab.woff2") format("woff2"), url("/fonts/fab.ttf") format("truetype");
|
25
25
|
}
|
26
26
|
|
27
27
|
.icon {display:flex; display:inline-block}
|
package/www/demo.html
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<title>Demo</title>
|
3
|
+
|
4
|
+
<script type="module">
|
5
|
+
|
6
|
+
import {h,signal,effect,batch,wrap,render,onMount,List} from '../src/mod.ts'
|
7
|
+
|
8
|
+
function App() {
|
9
|
+
const fruits = ['apple', 'banana', 'cherry']
|
10
|
+
return h(List, {each:fruits}, f => f)
|
11
|
+
}
|
12
|
+
|
13
|
+
render(App, document.body)
|
14
|
+
|
15
|
+
</script>
|
package/www/index.html
CHANGED
@@ -36,7 +36,7 @@
|
|
36
36
|
<section class="flex column items-center py-8 gap-8">
|
37
37
|
<h1 class="center text-5xl">Just write JavaScript!</h1>
|
38
38
|
<p class="center text-2xl">Instead of JSX, Prelude uses HyperScript,<br>
|
39
|
-
a DSL that lets you
|
39
|
+
a DSL that lets you define components in JavaScript.</p>
|
40
40
|
<div class="flex items-center content-center gap-8">
|
41
41
|
<pre><code class="language-js">import {h, signal, render} from 'prelude'
|
42
42
|
|
@@ -70,7 +70,7 @@ render(Counter, window.counter)</code></pre>
|
|
70
70
|
|
71
71
|
<footer class="flex px-2 py-2 gap-8" style="background-color: var(--neutral-100);">
|
72
72
|
<div class="flex column justify-center gap-3">
|
73
|
-
<a href="https://
|
73
|
+
<a href="https://www.npmjs.com/package/@wrnrlr/prelude">NPM</a>
|
74
74
|
<a href="https://jsr.io/@wrnrlr/prelude">JSR</a>
|
75
75
|
</div>
|
76
76
|
<div class="flex column justify-center gap-3">
|
package/www/playground.html
CHANGED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|