Skip to content

Releases: ryupold/vode

1.11.0

Choose a tag to compare

@ryupold ryupold released this 03 Jul 01:01
Immutable release. Only release title and notes can be modified.
  • feat: add keyed() helper for DOM node reconciliation by stable key
    const state = {
      items: [
        { id: "1", label: "item 1" },
        { id: "2", label: "item 2" },
        { id: "3", label: "item 3" },
      ],
    }
          
    app(container, state, (s) => [DIV,
      keyed([UL, { class: "todos" },
        ...s.items.map(it => [LI, { key: it.id }, it.label]),
      ]),
    ]);
  • feat: add reconciled to Props which allows you to set a callback when DOM nodes are assinged (reconciled)
    [DIV, {
      reconciled: (state, newVode, oldVode) => {
        const currentNode = newVode[$NODE];
        const previousNode = oldVode?.[$NODE];
        // previousNode will be undefined in first render
        // if children inside the parent are swapped/removed -> currentNode != previousNode
      }
    }]
  • refactor!: internal Vode properties encapsulate behind exported Symbols
  • refactor!: expose rendering stats on the state object via state[$STATS] (also still on appNode[$VODE].stats)
  • feat: add missing HTML and MathML tags

1.10.2

Choose a tag to compare

@ryupold ryupold released this 23 Jun 20:30
Immutable release. Only release title and notes can be modified.
  • feat: improve SSR compatibility

1.10.1

Choose a tag to compare

@ryupold ryupold released this 19 Jun 16:59
  • refine(catch): ensure correct lifecycle hooks for error boundaries
  • chore: upgrade to babel 8 & support node 26

1.10.0

Choose a tag to compare

@ryupold ryupold released this 16 Jun 01:33
  • feat: preserve identity of class instances (Date, RegExp, etc.) during state merges
  • feat: improve app() state type inference and event handler typings
  • fix: standardize mergeClass behavior for strings and objects
  • fix: handle string as 2nd argument to vode(tag, string) correctly
  • fix: style property clearing
  • fix: ensure async rendering only proceeds if asyncRenderer is explicitly available
  • fix: correctly skip bigint child nodes
  • refactor(mergeStyle): normalize return types and improve string merging
  • refactor(state-context): refine put() input type
  • feat: add fallback for mergeStyle() in non-browser environments

1.9.4

Choose a tag to compare

@ryupold ryupold released this 14 Jun 21:35
  • fix: clear stale inline styles

1.9.3

Choose a tag to compare

@ryupold ryupold released this 14 Jun 11:47
  • fix: animated patches could get stuck when document becomes hidden
  • test: harden tests and improve run time

1.9.2

Choose a tag to compare

@ryupold ryupold released this 13 Jun 16:32
  • refactor: refine type definitions
  • refactor: remove all any casts
  • perf: less allocations needed on unmount

1.9.1

Choose a tag to compare

@ryupold ryupold released this 10 Jun 15:00
  • fix: resolve error boundary from old vode when new component fails to render
  • fix: first level dom evaluation
  • fix: standardize return values for tag() and children()

1.9.0

Choose a tag to compare

@ryupold ryupold released this 09 Jun 19:15
  • fix(catch): usage of 'catch' on the root vode with different Tag

    NOTE: changing the root tag in vode during rendering is supported, but results in a new container node
    to get a reference to the new container node: const newContainer = oldContainer._vode.vode.node

  • feat(state-context): add overload to context() for alternative substate targeting

1.8.12

Choose a tag to compare

@ryupold ryupold released this 25 May 14:23
  • fix: mergeClass with (1. object, 2. array)