<< All versions
Skill v1.0.1
currentLLM-judged scan90/100io-gui/io/io-gui-core
+1 new
──Details
PublishedOctober 21, 2026 at 09:23 AM
Content Hashsha256:86dfd1e886ee9194...
Git SHAd4c6a1bd860f
Bump Typepatch
──Files
Files (1 file, 2.9 KB)
SKILL.md2.9 KBactive
SKILL.md · 39 lines · 2.9 KB
version: "1.0.1" name: io-gui-core description: >- Author ReactiveObject/ReactiveElement subclasses with Io-Gui core primitives — @Register, @Property, @Field, bindings, change vs mutation, VDOM, Theme, Storage. Use when building on @io-gui/core, defining custom elements or models, or wiring two-way bindings and persistence.
@io-gui/core
Defaults
- Import from
@io-gui/core, never deep relative paths into the package. - Every subclass:
@Register(orRegister(Class)) before instantiate. - Reactive state →
@Property/static Properties. Init-only non-reactive →@Field/static Fields. - Elements:
static Styleselectors must start with:host. - Handlers named
on*/_on*/*Changed/*Mutated/*Debounced/*Throttledauto-bind — no.bind(this).
Gotchas
- change ≠ mutation. Change = property reassigned (
===). Mutation = in-place edit of a held object/array/node. Plain objects needdispatchMutation(obj)after in-place edits. - Nested plain-object mutations fire
[prop]Mutated()locally and do not auto-bubble further — re-dispatching upward is usually wrong. NodeArrayproperties needinit: 'this'. Only the owning node disposes the array.Bindingfrombind(node, 'prop')orthis.bind('prop')— assign onto another property to sync. Forward sync is a graph write inside a binding wave, not a plain assignment.- Elements have three relations: reactive graph (
_parents/_children), DOM tree, VDOM children fromrender(). Cross-domain reactivity lives where graph ≠ DOM. ThemeSingletonproperties become--io_*CSS variables; theme colors use core `Color`, not colors-package ColorValue.Storage({key, value, storage: 'local' | 'hash' | 'none'})returns a Binding to a singletonStorageNode— assign it onto properties for hash/local persistence.- Arrow-function methods are not auto-bound as listeners.
- Construction runs reactions inside `super()`:
init()→ properties,@Fields → args →ready()→*Changed(),mutated(),io-mutation, all before the subclass's class fields and constructor body. State thatready()or handlers touch must be a@Fieldor adeclared field created lazily; a plain field is missing then, and withoutdeclareit is re-initialized aftersuper(). Passon*methods (not arrow fields) as callbacks rendered fromready(). - A node held in a property reports mutations to
[prop]Mutated()only; the holder'smutated()does not run. Use a child node to keep a per-frame value out of the parent's change handling. IoGl: properties map to uniforms. For extra uniforms, declare them inFragandsetShaderProgram()+setUniform()beforesuper.onRender(); draw text onthis.ctxafter it. Uniforms are float32: pass pixel positions, not large values.
Read next
- Glossary: CONTEXT.md
- API tables / examples: README.md