diff --git a/frameworks/keyed/hellajs/package-lock.json b/frameworks/keyed/hellajs/package-lock.json index bb282d610..92d5f469c 100644 --- a/frameworks/keyed/hellajs/package-lock.json +++ b/frameworks/keyed/hellajs/package-lock.json @@ -8,16 +8,25 @@ "name": "js-framework-benchmark-hellajs", "version": "1.0.0", "dependencies": { - "@hellajs/core": "^0.6.3" + "@hellajs/core": "^0.10.0", + "@hellajs/dom": "^0.10.0" }, "devDependencies": { "bun": "^1.2.9" } }, "node_modules/@hellajs/core": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/@hellajs/core/-/core-0.6.3.tgz", - "integrity": "sha512-2YkamURMpwCs9KsKwRvnQPx77vDP7Mbj0n9AEX7RSDT2gPEYvj1D/NecX2zeRknhJ0H+UsNUZvAPrBR4wPoHug==" + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/@hellajs/core/-/core-0.10.0.tgz", + "integrity": "sha512-zaoVjAcvhBw15XOaHYscDBAXQnfXZXjLAaOS+S88u8oCeeoGHMsiAkbiyKluqjIq21yExzw1/BJRw0Dm1I7i9Q==" + }, + "node_modules/@hellajs/dom": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/@hellajs/dom/-/dom-0.10.0.tgz", + "integrity": "sha512-PC65A4LsI0apTLEmjMIgT4kPmz7OH34TF5TLsdtM+KXR1g9tFLbtSuBHpu3ZxROgl68IpR9TKTUZfN7H7aCT9Q==", + "peerDependencies": { + "@hellajs/core": "^0.10.0" + } }, "node_modules/@oven/bun-linux-x64": { "version": "1.2.9", diff --git a/frameworks/keyed/hellajs/package.json b/frameworks/keyed/hellajs/package.json index 168d84d40..62d2d633e 100644 --- a/frameworks/keyed/hellajs/package.json +++ b/frameworks/keyed/hellajs/package.json @@ -14,6 +14,7 @@ "bun": "^1.2.9" }, "dependencies": { - "@hellajs/core": "^0.6.3" + "@hellajs/core": "^0.10.0", + "@hellajs/dom": "^0.10.0" } } \ No newline at end of file diff --git a/frameworks/keyed/hellajs/src/main.js b/frameworks/keyed/hellajs/src/main.js index fd34b326f..ba65a9e16 100644 --- a/frameworks/keyed/hellajs/src/main.js +++ b/frameworks/keyed/hellajs/src/main.js @@ -1,4 +1,5 @@ -import { html, signal, batch, forEach, mount } from "@hellajs/core"; +import { signal, batch } from "@hellajs/core"; +import { html, forEach, mount } from "@hellajs/dom"; const { div, table, tbody, tr, td, button, span, a, h1 } = html; @@ -37,18 +38,18 @@ function Bench() { const selected = signal(undefined); const create = (count) => { - rows.set(buildData(count)); + rows(buildData(count)); } const append = (count) => { - rows.set([...rows(), ...buildData(count)]); + rows([...rows(), ...buildData(count)]); } const update = () => { batch(() => { for (let i = 0, d = rows(), len = d.length; i < len; i += 10) { const label = d[i].label; - label.set(`${label()} !!!`); + label(`${label()} !!!`); } }) }; @@ -59,16 +60,16 @@ function Bench() { let item = list[1]; list[1] = list[998]; list[998] = item; - rows.set(list); + rows(list); } }; const remove = (id) => { - rows.set(rows().filter(row => row.id !== id)); + rows(rows().filter(row => row.id !== id)); } const clear = () => { - rows.set([]); + rows([]); } return div({ id: 'main' }, @@ -94,7 +95,7 @@ function Bench() { tr({ class: () => (selected() === row.id ? 'danger' : '') }, td({ class: 'col-md-1' }, row.id), td({ class: 'col-md-4' }, - a({ class: 'lbl', onclick: () => selected.set(row.id) }, + a({ class: 'lbl', onclick: () => selected(row.id) }, row.label ), ), diff --git a/frameworks/keyed/solid/index.html b/frameworks/keyed/solid/index.html index 58d51962c..3d0be2e3d 100644 --- a/frameworks/keyed/solid/index.html +++ b/frameworks/keyed/solid/index.html @@ -1,12 +1,15 @@ + - + Solid-keyed - + + -
- +
+ - + + \ No newline at end of file