Repository navigation
v2.0.0
Major Changes
-
e9afcbe: Deliver
PanelBindingvalues as their real JS type and serialize once at the AST boundaryPanelBinding.valueis nowunknown— a realnumber/boolean/object/array/stringrather than always a string — and a newPanelBinding.rawValue: stringcarries the exact source text.onChangenow takesunknownand serializes the value a single time, at the AST boundary where the declaredtypeis known, so there is no string-vs-expression guessing on either side. This fixes a string whose text begins with{or[being misclassified as a JS expression, and letsvalidateBindingValue'smin/maxcompare against an actual number instead of coercing a numeric string.Breaking change for custom
renderPanelconsumers:binding.valueis no longer a string. Usebinding.rawValuefor an<input>defaultValue, a<select>value, and forflattenEditableValue/setEditableValue; switch onbinding.valuefor its real type.binding.onChangeaccepts the value as its real type (onChange(42), notonChange('42')).
Minor Changes
-
820f5ba: Honor
satisfies/astype annotations on authoreddata-bindingarraysAn authored
data-binding={[...] satisfies BindingItem[]}(oras const, a type assertion, or extra parentheses) previously made the top-level node aTSSatisfiesExpression, so the array was not recognized and the whole binding was silently dropped. These build-time-erased wrappers are now unwrapped, so the inline type-safety pattern works end to end.Internally,
extractnow evaluatesdata-bindingstraight off the parsedArrayExpressioninstead of re-serializing it and re-parsing the string — removing the redundant parse round-trip with no change to the parsed result or the value contract.
What's Changed
- ♻️ refactor: deliver structured PanelBinding values, serialize once at the AST boundary by @pjb0811 in #266
- ♻️ refactor: drop the data-binding parse round-trip and honor type annotations by @pjb0811 in #268
- 👷 ci: run the draft check on Version Packages PRs so they can merge by @pjb0811 in #269
- 🔖 chore: version packages by @github-actions[bot] in #267
Full Changelog: v1.19.0...v2.0.0