Describe every value kind in one table instead of spreading it over the code

A kind like colour or texture used to be spelled out in five parallel
lists, its port type, its empty value, its glyph, its label and its list
tag - 22 literal places for texture alone. core/properties/kinds.ts now
holds one row per kind and the rest is derived from it, so adding a kind
is one row. The five literal nodes collapse into literals.ts, the six
kind menus into one helper.

Number, Text, Boolean is now the one order everywhere; the variable and
port menus used to list Boolean before Text.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
rootandClaude Opus 5 committed 2026-09-12 14:47:17 +02:00
1 parent 8a7185948d
commit 3ed8b68ecf
39 files changed
+699 -565

No files matched your search

+10 -5
View File
@@ -140,14 +140,19 @@ shown on the node and editable in the inspector.
neighbouring item touched. A **struct item** carries its own shape the same way: its fields are
renamed, retyped, added (`+ Field ▾`) and removed on its own rows, which grows that one item and
not the list. Two kinds need saying, because JSON cannot tell them from the value beside them: a
**colour** is a number (`{"$color": 16711680}`) and a **texture** is an id, which is a text
(`{"$texture": "walk-up"}`, the picker a sprite's `texture` property has – a whole picture, one
frame of a sheet, or an animation). A field name cannot start with `$` (`isValidFieldName`), so a
tag can never collide with a struct item of one field. Either reads as what it wraps on a data
**colour** is a number and a **texture** is an id, which is a text. Such a *tagged* kind wears its
name as the one key of a small object – `{"$color": 16711680}`, `{"$texture": "walk-up"}` (the
picker a sprite's `texture` property has – a whole picture, one frame of a sheet, or an animation).
A field name cannot start with `$` (`isValidFieldName`), so a tag can never collide with a struct
item of one field. Either reads as what it wraps on a data
edge (`Item at`), the graph having neither colours nor pictures of its own, and `Set item` leaves
the slot the kind it was. A **texture is a kind wherever a kind is picked** – a variable, a struct
field, a list item, an Any port of `Properties`, a field of `Pack` – and the `Texture` node hands
one into the graph, as `Number` and `Text` do a number and a text. Declared (a variable, a struct
one into the graph, as `Number` and `Text` do a number and a text. **Every kind is one row of one
table** (`core/properties/kinds.ts`): its word and mark, what it travels as on an edge, its empty
value, how a value is read as it, whether it is tagged and where it may be picked. The kind lists,
the `+ …` menus, the tags, the port fields and the literal nodes all follow from the row, so a new
kind is that row plus, if it names something in the project, its picker. Declared (a variable, a struct
field of one, a port) it needs no tag: the declaration says what it is, and the value is the id –
the way a colour field is a number. A declared port of kind colour or texture carries the field
that edits it and travels as a number or a text, since the graph has neither; a port declared as