You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,6 +34,7 @@ xx.xx.xxxx
34
34
35
35
### Query
36
36
***Bug** - Fixed `instanceof` checks failing for `Query.wrap()` instances — brand property was a class field (set only in constructor) but `wrap()` uses `Object.create()`. Moved to prototype getter so all prototype-chain objects pass the check regardless of construction path.
37
+
***Bug** - Fixed `.position({ type: 'global' })` placing elements with the wrong offset when a CSS containing block (transform/filter/perspective/etc.) lived outside the element's shadow DOM — `positioningParent` now pierces shadow boundaries so the math matches what the browser actually uses. `isInView` now does the same for its default clipping viewport.
37
38
***Feature** - Added `includeMargin`, `includePadding`, and `includeBorder` options to `naturalWidth()` and `naturalHeight()` — allows measuring unconstrained intrinsic dimensions while preserving the element's box model.
Copy file name to clipboardExpand all lines: ai/skills/authoring/example-curriculum.md
+15-14Lines changed: 15 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -211,28 +211,29 @@ Proves SUI's reactivity works at animation speed — a `reaction()` drives `requ
211
211
212
212
---
213
213
214
-
### 15. `event-data` — Dynamic Signal Access
214
+
### 15. `solar-system-3d` — Wrapping a Graphics Pipeline
215
215
216
-
Uses `data-*` attributes to dynamically select which signal and which mutation method to call. A single event handler handles all cases via bracket notation.
216
+
A WebGL fragment shader rendering the solar system, with the component owning the canvas, the drag-to-orbit input, keyboard controls, and per-frame uniform uploads. Same reactivity-driven animation loop as the ball simulation, but extended into a full Processing.js-style imperative pipeline — keybindings, settings, and reactivity sit alongside the shader without fighting it. Sells SUI as a comfortable wrapper for graphics code.
217
217
218
-
**New patterns:**`state[dimension][helper](settings.delta)` dynamic signal access, data-driven event dispatch.
218
+
**New patterns:**Static `keys` with multi-character bindings (`'=, +'`), pointer-capture drag, sub-module imports (`fragment.js` / `vertex.js` / `webgl.js`), `state.frame.increment()` to tick the animation reaction, external preset orchestration via `$().settings({ visible: [...] })`.
219
219
220
220
**What to notice:**
221
-
-`state[dimension][helper](settings.delta)` — `dimension` and `helper` come from `data-dimension` and `data-helper` attributes on the button. One handler, many behaviors.
222
-
- This pattern eliminates repetitive event handlers. Instead of separate handlers for each action, one handler reads data attributes to determine what to do.
221
+
- Same `reaction()` + `requestAnimationFrame` shape as the ball simulation, but the tick is explicit: `state.frame.increment()` at the end of `render` advances the signal the reaction depends on.
222
+
- Keybindings as first-class framework concerns. `'=, +'` and `'-, _'` bind both characters at once; `space` pauses; `o`/`s` toggle settings. Each handler mutates a setting that the next render reads as a shader uniform.
223
+
- Shader source is a plain string exported from `fragment.js`. Sub-modules import into `component.js` the same way subtemplates do — the framework doesn't care that the strings happen to be GLSL.
224
+
-`page.js` ships preset visibility arrays through a `ui-menu` and pipes the selection into the component: `$('solar-system-3d').settings({ visible: presets[value] })`. Settings are reactive, so the shader picks up the change on the next frame.
223
225
224
226
---
225
227
226
-
### 16. `dropdown` — Real-World Form Component
228
+
### 16. `event-data` — Dynamic Signal Access
227
229
228
-
Form integration with hidden inputs, click-away dismissal, JSON arrays as HTML attributes.
230
+
Uses `data-*` attributes to dynamically select which signal and which mutation method to call. A single event handler handles all cases via bracket notation.
229
231
230
-
**New patterns:**Hidden `<input>` for forms, `onChange` callback alongside `dispatchEvent`, `el.contains(event.target)`, JSON in attributes, `{classIf}`.
232
+
**New patterns:**`state[dimension][helper](settings.delta)` dynamic signal access, data-driven event dispatch.
231
233
232
234
**What to notice:**
233
-
-`options='[{"value": "apple", "text": "Apple"}]'` — JSON in HTML attributes, auto-parsed for array/object settings.
234
-
-`settings.onChange` alongside `dispatchEvent` — supports both callbacks and DOM events.
235
-
-`{classIf isOpen 'visible'}` — simpler than `classMap` for a single conditional class.
235
+
-`state[dimension][helper](settings.delta)` — `dimension` and `helper` come from `data-dimension` and `data-helper` attributes on the button. One handler, many behaviors.
236
+
- This pattern eliminates repetitive event handlers. Instead of separate handlers for each action, one handler reads data attributes to determine what to do.
236
237
237
238
---
238
239
@@ -296,7 +297,7 @@ SVG rendering and the `interval` helper with automatic lifecycle cleanup.
0 commit comments