@thyn/core 0.0.242 → 0.0.243

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thyn/core",
3
- "version": "0.0.242",
3
+ "version": "0.0.243",
4
4
  "scripts": {
5
5
  "build": "tsc",
6
6
  "pub": "tsc && npm version patch -f && npm -f publish --access=public",
@@ -1,8 +1,8 @@
1
1
  import { describe, expect, it } from "vitest";
2
- import { $signal, list, Signal } from "../src";
2
+ import { $signal, list } from "../src";
3
3
  import { wait } from "./utils";
4
4
 
5
- function makeList(signal: Signal<any>) {
5
+ function makeGenericList(signal: any) {
6
6
  return list({
7
7
  items: () => signal.get(),
8
8
  render: (item: number) => {
@@ -13,7 +13,18 @@ function makeList(signal: Signal<any>) {
13
13
  });
14
14
  }
15
15
 
16
- describe("list", () => {
16
+ function makeIsolatedTerminalList(signal: any) {
17
+ return list({
18
+ items: () => signal.get(),
19
+ render: (item: number) => {
20
+ const span = document.createElement("span");
21
+ span.textContent = `${item}`;
22
+ return span;
23
+ },
24
+ });
25
+ }
26
+
27
+ const run = (makeList: any) => describe("list", () => {
17
28
  it("renders", async () => {
18
29
  const items = $signal([0, 1, 2]);
19
30
  const root = makeList(items);
@@ -166,3 +177,6 @@ describe("list", () => {
166
177
  expect(root.textContent).toBe("01234567");
167
178
  });
168
179
  });
180
+
181
+ run(makeGenericList);
182
+ run(makeIsolatedTerminalList);