tutuca 0.9.54 → 0.9.56
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 +1 -1
- package/skill/immutable-js/SKILL.md +12 -13
- package/skill/tutuca/SKILL.md +15 -25
package/package.json
CHANGED
|
@@ -1,22 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: immutable-js
|
|
3
|
-
description: Reference for the Immutable.js API organized by datatype (List, Map, Set, OrderedMap, OrderedSet, Stack, Record, Seq, Collection, Range, Repeat) and by topic (deep updates, equality, type predicates, JS conversion). Use when the user asks how to use a specific Immutable.js datatype or method, when writing or reviewing code
|
|
3
|
+
description: Reference for the Immutable.js API organized by datatype (List, Map, Set, OrderedMap, OrderedSet, Stack, Record, Seq, Collection, Range, Repeat) and by topic (deep updates, equality, type predicates, JS conversion). Use when the user asks how to use a specific Immutable.js datatype or method, when writing or reviewing code that imports from `immutable`, or when explaining Immutable.js semantics like persistent updates, value equality, or lazy evaluation.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Immutable.js
|
|
7
7
|
|
|
8
|
-
Persistent immutable data structures
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
`is(a, b)` or `a.equals(b)`, never `===`.
|
|
12
|
-
|
|
13
|
-
```js
|
|
14
|
-
import { Map } from 'immutable';
|
|
15
|
-
const m1 = Map({ a: 1, b: 2 });
|
|
16
|
-
const m2 = m1.set('b', 50);
|
|
17
|
-
m1.get('b'); // 2 — m1 is unchanged
|
|
18
|
-
m2.get('b'); // 50
|
|
19
|
-
```
|
|
8
|
+
Persistent immutable data structures: every operation returns a new collection,
|
|
9
|
+
never mutates. Treat collections as **values** — compare with `is(a, b)` or
|
|
10
|
+
`a.equals(b)`, never `===`. See [equality.md](references/equality.md).
|
|
20
11
|
|
|
21
12
|
## Inheritance cheatsheet
|
|
22
13
|
|
|
@@ -36,6 +27,14 @@ Seq mirrors the hierarchy lazily:
|
|
|
36
27
|
└─ Seq.Set ─ set-like lazy sequence
|
|
37
28
|
```
|
|
38
29
|
|
|
30
|
+
## How to use this skill
|
|
31
|
+
|
|
32
|
+
Load only the reference file(s) that match the question — do not preload
|
|
33
|
+
all of them. Pick a datatype file when the question is about one type's
|
|
34
|
+
methods; pick an operations/topics file when the question crosses types
|
|
35
|
+
(deep updates, equality, conversions). For exact signatures, fall back
|
|
36
|
+
to `type-definitions/immutable.d.ts` (see *Authoritative sources* below).
|
|
37
|
+
|
|
39
38
|
## Datatypes
|
|
40
39
|
|
|
41
40
|
Read the reference for a specific datatype when answering questions about
|
package/skill/tutuca/SKILL.md
CHANGED
|
@@ -1,37 +1,27 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: tutuca
|
|
3
|
-
description:
|
|
3
|
+
description: Use when authoring or reviewing tutuca modules — `component({...})` definitions, `html\`...\`` views, `@`-directives, `input` / `bubble` / `receive` / `response` / `alter` handlers, macros, or `getTests` exports — or when running the `tutuca` CLI (`lint` / `test` / `render` / `docs`). Covers the post-edit `tutuca <module> lint` → `test` → `render --title "<example>"` verification recipe.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
Tutuca is an immutable-state SPA framework: components have typed
|
|
9
|
-
`fields`, auto-generated mutators (`setX`, `pushInX`, …), HTML-template
|
|
10
|
-
`view`s with `@`-prefixed directives, and `bubble` / `receive` /
|
|
11
|
-
`response` handlers for orchestration.
|
|
12
|
-
|
|
13
|
-
## Verifying changes
|
|
6
|
+
<!-- This file is generated by scripts/build-skill.js from docs/llm/. Do not edit. -->
|
|
14
7
|
|
|
15
|
-
|
|
16
|
-
done:
|
|
17
|
-
|
|
18
|
-
1. **Lint** — catches undefined fields/handlers/macros/events. Exits
|
|
19
|
-
`2` on any error-level finding.
|
|
8
|
+
# Tutuca
|
|
20
9
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
10
|
+
Tutuca is an immutable-state SPA framework. See [core.md](./core.md)
|
|
11
|
+
for the framework primer and the post-edit verification recipe
|
|
12
|
+
(`tutuca <module> lint` → `test` → `render --title "<example>"`).
|
|
24
13
|
|
|
25
|
-
|
|
26
|
-
confirms the component mounts in a headless DOM with the new
|
|
27
|
-
behavior. Exits `3` on render crash.
|
|
14
|
+
## Companion skills
|
|
28
15
|
|
|
29
|
-
|
|
30
|
-
tutuca <module-path> render --title "<example title>"
|
|
31
|
-
```
|
|
16
|
+
When authoring tutuca code, also load these if available:
|
|
32
17
|
|
|
33
|
-
|
|
34
|
-
|
|
18
|
+
- **immutable-js** — every `immutable` export is reachable through
|
|
19
|
+
`tutuca` (`List`, `IMap`, `OMap`, `ISet`, `Record`, `Seq`,
|
|
20
|
+
`fromJS`, `is`, …). Reach for it whenever the work touches state
|
|
21
|
+
values.
|
|
22
|
+
- **margaui** — the Tailwind v4 / daisyUI-compatible class library.
|
|
23
|
+
Reach for it when the project uses MargaUI / Tailwind class lists in
|
|
24
|
+
`class=` / `:class=`.
|
|
35
25
|
|
|
36
26
|
## Routing
|
|
37
27
|
|