Feature/improvements v3#19
Merged
Merged
Conversation
… hardening, tag(props, children) shorthand, typed element overloads, ErrorDisplay component
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Releases SibuJS v1.3.0. Large minor release built around three themes:
27 new reactive/DOM primitives across
sibujs/browser,sibujs/ui, reactivity, components, devtools, and testing —defer,transition,formAction,strict/strictEffect,asyncDerived,nextTick,createId,hover,interval,timeout,scrollLock,visibility,network,mouse,swipe,windowSize,urlState,broadcast,fullscreen,wakeLock,animationFrame,mutationObserver,bounds,keyboard,speech,gamepad,pointerLock,vibrate,favicon/svgFavicon,textSelection,imageLoader,createFocusManager,createListbox,createDialogAria,captureSignalGraph,diffSignalGraphs,createTraceProfiler, plus Testing-Library-stylequeryBy*/findBy*/waitForSignal/type.Full SSR + OWASP security hardening pass (A01, A02, A03, A10, CWE-1321).
renderToString/renderToStream/renderToDocumentvalidate attribute names, dropon*handlers, strip<script>/<style>, sanitize URL attributes, escape comment terminators, and escapeU+2028/U+2029in script payloads. Routernavigate()refusesjavascript:/data:/vbscript:/blob:at every entry (top-level + every guard redirect +route.redirect).routerSSR.parseURLusesObject.create(null)and filters forbidden keys;decodeURIComponentwrapped against malformed percent sequences.bindAttributerefuseson*.machine()context merge filters prototype-pollution keys.scopedStyledecodes CSS hex escapes before the dangerous-pattern scan.socket()/stream()restrict URLs tows:///wss:///http(s).Headvalidates attribute names, sanitizesbase.href, and drops<meta http-equiv="refresh" content="0;url=javascript:…">.hydrateIslandsusesObject.hasOwnto block prototype-pollution lookups.suspenseSwapScriptrequires IDs to match[A-Za-z0-9_-]+.Ergonomic wins — new
tag(props, children)positional shorthand removes the need for thenodes:key at every level of a nested tree; the legacy{ class, nodes }form still works. Per-element typed prop overloads (AnchorProps,InputProps,ButtonProps,FormProps,SelectProps,TextareaProps,LabelProps,OptionProps,ImgProps,VideoProps,AudioProps,MediaProps,InputType,TypedTagFunction<Props, El>) give IDE autocomplete and typo detection while preserving the[attr: string]: unknownescape hatch.LazyRouteshorthand:{ path, lazy: () => import("./Page") }normalized bycreateRouter()/setRoutes().ErrorBoundarygains aresetKeysprop. Newhydrate(component, container, { diagnostics })mismatch walker withonMismatchhook andHydrateOptions/HydrationMismatchtypes.serializeState/serializeRouteState/renderToSuspenseStreamaccept an optionalnoncefor strict-CSP.persisted()gainssyncTabscross-tab sync and a cleanabledispose()on the returned setter.New shared
ErrorDisplaycomponent with copy-to-clipboard (full message + stack + cause chain + metadata + env), colored severity header, colored error-code badge, parsed stack frames,Error.causewalking, retry/reload buttons, and a dev/prod split.ErrorBoundary's default fallback delegates to it automatically.Related Issue
Closes #
Type of Change
Checklist