github longbridge/nsh v0.8.0
nsh v0.8.0

22 minutes ago

A large release: 558 pull requests since v0.7.0 from 64 contributors (fixes already shipped in v0.7.1 and v0.7.2 are included). Highlights are spreadsheet-style DataTable selection, editor blocks and snippets, GpuView for an app's own wgpu renderer, Debian/RPM and Mac App Store packaging, release runners linked with only the parts an app imports, and broad performance work on macOS scrolling, canvases and text. This is the last minor release before the API freeze planned for 0.9.0, so the remaining Rust names are aligned with TSX here.

Breaking Changes

  • Sign-in sessions moved to nsh-oauth2. nsh_core::auth_session, element::open_auth_session / close_auth_session, Command::AuthSession and the matching testing hooks are removed. Run nsh add nsh-oauth2 and call nsh_oauth2::open_auth_session. (#3466)
  • SegmentedControl, Switch and DateTimePicker left nsh/mobile for the nsh-system-controls nshm: nsh add github:longbridge/nsh-system-controls. TabBar, Haptics, AppSettings, InputAccessoryView and BackHandler stay. (#3486)
  • Share moved to nsh-extra: nsh add nsh-extra --features share, then import { Share } from "nsh-extra". The JS API is unchanged; a folder now fails with EISDIR. (#3529)
  • Rust element names match TSX: element::Stack → NavStack, Screen → NavPage, Modal → Dialog. The old names remain as deprecated aliases. The alert request struct ops::Dialog is renamed AlertDialogRequest with no alias. (#3890)
  • An app without <Window> scenes quits when its window closes, on macOS too, unless application.quitMode is set. (#3283)
  • Build checks are stricter: the bundler fails on an import nothing resolves (#3425); assets! fails without an assets directory (#3666); a UI set file without a build path fails instead of being left out (#3873).
  • Leaner feature gates: the native global WebSocket needs the websocket feature and throws ERR_FEATURE_UNAVAILABLE_ON_PLATFORM without it (#3222); Rust-only builds no longer compile nsh-updater (#3187).
  • Desktop alerts no longer dim the window (#3738), and opening a dialog focuses its first control (#3719).

New Features

  • DataTable: spreadsheet-style cell range selection (#3304), panning both axes from one trackpad gesture (#3320), hiding a column without losing its width or place (#3778), renderCell content drawn in the cell (#3327).
  • Editor: blocks for app content between lines (#3715), snippet completions with placeholders (#3790), onScroll (#3171), scrollbarInset (#3170), decorations with labels, font family and size (#3177, #3178), Unicode soft wrapping (#3169); DiffView can ignore whitespace (#3784).
  • Rich editor: full-width tables (#3616), checked task boxes (#3617), menus for table rows and columns (#3383), code blocks highlighted like TextView with language aliases and a default language (#3403, #3458, #3467), selectedNode / focusedNode parts for node views (#3848).
  • TextView: email HTML tables and inline images rendered like a mail reader (#3372), a link context menu with the app's items (#3689), the link around an image passed to renderImage (#3359).
  • Components: OtpInput alphanumeric mode (#3510); Select query / onQueryChange (#3538); Slider renderThumb (#3542); DatePicker header / footer slots and preset descriptions (#3537, #3539); Calendar onChangeStart (#3540); Dock renderTabBarPrefix, a drop line while dragging tabs, and toolbars that use the free tab bar space (#3519, #3504, #3750); MenuItem destructive (#3717); Tab hitSlop (#3448); Video poster (#3398); textIndent (#3774); bottom and right sticky insets (#3766).
  • Graphics: GpuView draws with an app's own wgpu renderer (#3223); Rust drawings animate Bézier control points (#3410); maskImage transitions stop by stop (#3127).
  • Runtime APIs: device.reservedRegions() (#3276); ViewRef.selectAll() (#3461); memory in perfStats (#3183); window content kept at an aspect ratio while resizing (#3360); file drop positions on macOS and Windows (#3364); pen coalesced samples, eraser and barrel button (#3355); box-none windows that let presses through (#3478); a Rust Signal or Memo returned to TSX as a tracked Accessor (#3652); appInfo() reports a verified package header (#3619); process.run can run a bundled asset:/ file (#3615).
  • Web views: allowNavigation to narrow hosts (#3474); script evaluation and trusted input on Windows and Linux (#3888); URL schemes on Windows (#3748); page full-screen controls (#3198).
  • Desktop: application menus completed with each platform's standard menus (#3842); macOS-only menu roles mapped on Windows and Linux (#3303); editing ends when the user presses outside a field (#3846); Windows notification badges on taskbar buttons (#3709); Linux and Windows honor session-end quit requests (#3682, #3746).
  • i18n: type-safe translations.d.ts generated from locales/ (#3495); nsh check warns about missing keys and placeholder mismatches (#3521); Intl.ListFormat, Intl.RelativeTimeFormat and long time zone names (#3845, #3877, #3813).
  • Updater: feeds chosen at run time and shared by app and OTA updates (#3356, #3713); a Rust app can supply the download transport (#3436); update-manifest --base-url pins GitHub release URLs (#3585); retries and timeouts for stalled downloads (#3190).
  • nshm: modules can check a file, find an element's native view, hear Android broadcasts and wait for their scheme's links (#3522, #3565); an app can link an nshm for some targets only (#3162); crates can declare iOS linker arguments (#3814); pages can register native components on the web (#3834).
  • CLI and packaging: nsh package --format deb|rpm (#3625); Mac App Store packaging and publishing (#3667, #3818); nsh package --shared-runtime for web apps (#3247); nsh test --attach drives a running session on macOS, Linux and Windows (#3492, #3870); nsh run --sign (#3424); Android allowBackup off (#3854); parallel tests for apps with Rust crates (#3281); iOS simulator and Mac Catalyst hosts on Intel Macs (#3391).
  • Terminal backend: F1–F12, modified cursor keys and Alt as Meta (#3705); composing input sent as it changes (#3643); CJK line breaking (#3208); stand-ins for unsupported content and keyboard-reachable hints (#3206).
  • Accessibility: Button expanded / hasPopup (#3768); accessibilityDescribedBy on fields (#3840); axes reported for Slider, Toolbar, ToggleGroup and RadioGroup (#3699, #3704, #3797, #3819); VoiceOver actions on macOS (#3787); single-line inputs as labelled text boxes on Linux (#3574); the rich editor as one labelled multi-line text box (#3822).

Improvements

  • Smaller apps: release runners on Windows, macOS and Linux are linked at package time from prebuilt objects with only the parts an app imports (#3465, #3536, #3795, #3796, #3850); release runners build with fat LTO (#3856, #3857); the native runtimes shrink through leaner reactive wrappers, one ed25519-dalek and cold code tuned for size (#3831); web runtimes split into side modules loaded on first use (#3343, #3369, #3426); GStreamer and Media Foundation are linked only into runners that play media (#3228); release APKs compress native libraries (#3800).
  • macOS performance: AppKit no longer lays out the window every scroll frame (#3832); sticky views pin by their layers (#3806); text-only table cells and plain text leaves stay out of the view hierarchy (#3807, #3742); text surfaces are reused and created outside the pool lock (#3829, #3875); big canvases pan and zoom by compositing tiles (#3690, #3203, #3227); sprites, glass and shader frames do less work per frame (#3241, #3496, #3484).
  • Core performance: reordered keyed lists match in linear time (#3380); class styles and parsed Tailwind tokens are cached and shared (#3166, #3921); list offsets, overlay watches and queued computations avoid copies and quadratic work (#3593, #3668, #3592); content is made ahead of fast scrolls (#3782, #3783); streaming Markdown tables reuse completed rows and long list runs are deferred until scrolling approaches (#3878, #3880); rich editor edits walk only the changed blocks (#3826).
  • Other platforms: Linux redraws only changed canvas cells and moves panned rasters (#3213, #3196); Windows redraws only what changed and releases GPU surfaces when hidden or minimized (#3405, #3894); iOS and Android stop rendering shaders and GPU views out of sight (#3286, #3400, #3472).
  • Scrolling feel on macOS: edge stretch and trackpad glide match NSScrollView (#3500, #3718).
  • Selection and clipboard: copies keep list markers, paragraph breaks, bold, italic and links (#3307, #3348, #3358); Shift-arrow extends a selection (#3249); Windows reads copied HTML (#3262).
  • Text: fonts are read with skrifa instead of ttf-parser (#3655); a focus ring an ancestor would clip is drawn inside the view (#3824).

Fixes

  • Desktop: titleBar() and windowState() work outside a render (#3282); a Windows abort in openUrl and notifications is gone (#3402); a past-deadline macOS timer no longer spins the main thread (#3396); Windows window icons, resizing, frameless windows, modal owners and multiline Input behave correctly (#3413, #3427, #3506, #3599, #3411); traffic lights show in full screen beside a custom title bar (#3743); minimized windows and the Dock restore directly (#3664, #3626).
  • Mobile: an iPad SplitView crash is fixed (#3767); Android keeps the keyboard and safe area right when rotating (#3703), draws rounded borders with differing sides (#3641, #3645), and stops transform animations from flooding accessibility events (#3656); iOS takes an autoFocus asked for before its window was set (#3708).
  • Input methods and editing: the caret and marked text stay right while composing on iOS and macOS (#3338, #3340, #3394, #3649); Input text stays in place when focused on macOS (#3416); stale selections are dropped with stale values (#3820).
  • Web: the default browser context menu is back (#3702); presses honor hit slop (#3745); browser value slots are released and reused correctly (#3726, #3731).
  • Linux: text draws with the font file it was shaped in (#3584); Wayland file drops are accepted (#3301); tray icons follow the system scheme (#3687).
Contributors

@sunfuze @huacnlee @blueberrycongee @madcodelife @BeADre @RebelBIrd @gilbertwong96 @JeromeLee-ljl @sunli829 @1havecoke @Petit-Iceberg @atresnjo @sxy-trans-n @obito-t @hmziqrs @yuanzhuang-svg @Joy-jinyu @WenliangCao @aiiven @brookqin @me2seeks @sehandev @Haleclipse @hjgyuhuk @Laotree @caoxing9 @klaus01 @Teages @Geylnu @hsingjui @mengyinghu-sys @yerlytech @zxsky1 @TexasOct @YunZiA @jsiu93 @daoleno @Duskriver @Tzyito @hexiang1993 @faga295 @Blackman99 @helen-frank @yuluod @lurenjia534 @hold-baby @cosformula @ttizze @davo20019 @M4n5ter @nightwhite @ihavecoke @yangkx1024 @ClarkThan @zh239ns @passion729 @cokesprite @tobiasstrebitzer @benjibunbun @kenshin54 @Liguoqiang-code @tsukiyo20 @bobleer @teng-lin

What's Changed

What's Changed

New Contributors

Full Changelog: v0.7.0...v0.8.0

Don't miss a new nsh release

NewReleases is sending notifications on new releases.