-
eb96e59: Add iOS native menu/submenu support to
ToolbarItembutton entries used bychrome.toolbarandchrome.navigationBar.ToolbarItembuttons now accept amenuobject with nestedsubmenuitems, and the generatedNativiteChrome.swifttemplate now builds recursiveUIMenu/UIActiontrees so menu selections emit the existingtoolbar.buttonTapped/navigationBar.buttonTappedevents by item id. -
adb775d: Add sheet header chrome with
title,leadingItems, andtrailingItemssupport across the shared API, Android runtime, and iOS runtime.The change also emits
sheet.leadingItemPressedandsheet.trailingItemPressedevents so sheet header actions can be handled like other native chrome buttons. -
a743663: Add an optional
nativite devstatus dashboard that checks the Vite dev server URL, reports configured native platform project paths, and points developers back to the existing Vite and native IDE workflows. -
477c095: Add new Vite-injected compile-time platform family globals driven by platform plugin traits:
__IS_NATIVE____IS_MOBILE____IS_DESKTOP__
Extend
definePlatformPlugin()with optional trait flags:nativemobiledesktop
The platform registry now serializes these traits into
NATIVITE_PLATFORM_METADATA, and the Vite plugin consumes that metadata so__IS_NATIVE__,__IS_MOBILE__, and__IS_DESKTOP__are driven by platform plugin declarations in normal CLI-driven builds/dev.Trait defaults when omitted are:
native: truemobile: falsedesktop: false
-
3cc42d6: Add platform-specific root HTML entry support to
nativite/vite.For native targets, the Vite plugin now resolves
index.<platform>.htmlvariants (for exampleindex.ios.html,index.mobile.html,index.native.html) before falling back toindex.html.In native builds, the resolved platform HTML entry is wired as the Rollup
indexinput while preserving the emitted output filename asindex.html. In dev, native WebView HTML document requests are rewritten to the same resolved platform HTML entry when one exists. -
de81fb5: Add repeatable
nativite init --platformselection and narrow host-aware defaults so generated configs no longer enable every first-party platform automatically. -
117d401: Add validated native icon and splash asset generation with deterministic platform output names and asset-content generation hashing.
-
3027cd0: Improve native dev server discovery by preserving explicit Vite host settings, writing local/network/device URL diagnostics to
.nativite/dev.json, and mirroring Android emulator, physical device, and USB reverse hints into debug assets. -
982e9cc: Add
nativite initto generate a minimal Nativite config for existing Vite projects and safely add the Nativite Vite plugin when the Vite config can be edited unambiguously. -
3375295: Implement NCLP v2 chrome snapshots and shell readiness handling.
The JavaScript chrome runtime now waits for validated
shell.ready, compiles merged chrome state into versionedchrome.snapshotmessages, filters unsupported host areas, emits state buckets for selected/disabled/hidden/badges/values, and maps incomingchrome.eventenvelopes back to the existingChromeEventAPI. iOS and Android shells now advertise supported areas, validate and revision-gate snapshot envelopes, enforce graph invariants and size caps, adapt snapshots to the current native renderer state shape, and preserve full NCLP node identity for native interaction events. -
cfbe0e1: Simplify the public API surface by removing redundant and internal exports.
button(...)navItem(...)menuItem(...)_handleIncoming(...)_resetChromeState()_drainFlush()
Use plain object literals for chrome items instead of constructor wrappers.
defineConfigre-exportplatformExtensionsPluginexport
Only
nativite()and supporting types are now exported fromnativite/vite.The following internal wire/build types are no longer exported:
BridgeCallMessageBridgeEventMessageJsToNativeMessageNativeToJsMessageDevJsonBuildManifest
nativite/css-vars→nativite/css
- CLI docs now reflect the currently supported command surface.
- Chrome docs now use plain object literals instead of removed constructor helpers.
-
193576b: Add production OTA safeguards for Apple runtimes, including signed manifest verification, HTTPS enforcement, app-version gating, and rollback handling for failed first launches.
-
a50c90c: Expose chrome platform capability helpers and warn when app code configures chrome areas unsupported by the active native runtime.
-
2d359a6: Remove the public
nativite devcommand and the associated terminal-owned native build, launch, hotkey, status polling, and dev URL resolver implementation. Generated debug native projects continue to use Vite dev server routing and.nativite/dev.json. -
a47e3f1: Refactor
chromeAPI to singleton instance API with named setters and expliciton*subscriptions.The per-element function call API (
chrome.navigationBar(opts),chrome.toolbar(opts), etc.) has been replaced with a singleton namespace API. Each chrome element is now accessed as a property ofchromewith dedicated methods for state updates and event subscriptions.chrome.navigationBar({ title: "Settings", toolbarRight: [ { type: "button", id: "save", title: "Save", style: "done" }, ], onButtonTap: ({ id }) => console.log("Tapped:", id), }); chrome.tabBar({ items: [{ id: "home", title: "Home", systemImage: "house.fill" }], onSelect: ({ id }) => navigate(id), });
chrome.navigationBar.setTitle("Settings"); chrome.navigationBar.setToolbarRight([ { type: "button", id: "save", title: "Save", style: "done" }, ]); chrome.navigationBar.show(); const unsub = chrome.navigationBar.onButtonTap(({ id }) => console.log("Tapped:", id) ); unsub(); // unsubscribe when done chrome.tabBar.setTabs([ { id: "home", title: "Home", systemImage: "house.fill" }, ]); chrome.tabBar.show(); const unsubTab = chrome.tabBar.onSelect(({ id }) => navigate(id));
Each element exposes a consistent set of methods:
show()/hide()— control visibility (sheet usespresent()/dismiss())- Named content setters —
setTitle(),setTabs(),setActiveTab(),setItems(), etc. configure(opts)— set appearance/styling properties (tint colour, translucency, etc.)on*subscriptions —onButtonTap(),onSelect(),onTextChange(), etc. Each returns an unsubscribe function
show(),hide(),setTitle(title),setToolbarLeft(items),setToolbarRight(items),configure({ tintColor, barTintColor, translucent, backButtonTitle, largeTitleMode }),onButtonTap(handler),onBackTap(handler)show(),hide(),setTabs(items),setActiveTab(id),configure({ tintColor, unselectedTintColor, barTintColor, translucent }),onSelect(handler)show(),hide(),setItems(items),configure({ barTintColor, translucent }),onButtonTap(handler)show(),hide(),setStyle("light" | "dark")show(),hide()setText(text),setPlaceholder(placeholder),configure({ barTintColor, showsCancelButton }),onTextChange(handler),onSubmit(handler),onCancel(handler)present(),dismiss(),setDetents(detents),setSelectedDetent(detent),configure({ grabberVisible, backgroundColor, cornerRadius }),onDetentChange(handler),onDismiss(handler)setAccessory(accessory | null),configure({ dismissMode }),onAccessoryItemTap(handler)show(),hide(),setItems(items),setActiveItem(id),onItemSelect(handler)setTitle(title),setSubtitle(subtitle),configure({ titlebarSeparatorStyle, titleHidden, fullSizeContent })setMenus(menus),onItemSelect(handler)- State is merged across calls to the same element — calling
setTitle("Hello")thensetToolbarRight([...])preserves the title in subsequent bridge sends. *Optionstypes removed from public API (NavigationBarOptions,TabBarOptions, etc.). Use the corresponding*Statetypes with named setters instead.- New
Unsubscribetype exported:() => void. chrome.on(),chrome.off(), andchrome.set()are unchanged.
-
05856cd: Expand
chrome.sheetinto a functional sheet-webview surface on iOS.chrome.sheet.setURL(url)to load URL content inside the sheet webview.- Relative URLs are resolved against the current main webview URL.
chrome.sheet.postMessage(message)to send messages from the main webview context to the sheet webview.chrome.sheet.onMessage(handler)and newsheet.messageevent payloads to receive messages from the sheet webview.chrome.sheet.onLoadFailed(handler)andsheet.loadFailedevent payloads for native load diagnostics.window.nativiteSheetambient typing for sheet-webview JavaScript messaging.
smalldetent is now supported in iOS native detent mapping forsetDetentsandsetSelectedDetent.- iOS sheet implementation now mounts a dedicated
NativiteWebView(with bridge parity) rather than a blank controller, while keeping existing detent + dismiss events. - Root-prefixed sheet URLs (for example
"/sheet") now bootstrap as SPA routes in bundledfile://mode by loadingdist/index.htmland applying the route via the History API. - Dev-server native request routing now preserves HTML document navigations for sheet routes so
"/sheet"is served as HTML instead of being misclassified as a module transform. __chrome__bridge mutations are now accepted only from the primary app webview, so usingchrome.*inside the sheet webview can no longer mutate parent app chrome state.- Primary and sheet webviews now use transparent backgrounds over
systemBackground, so pre-render blank/loading states follow light/dark mode instead of flashing white in dark mode. - Sheet-hosted
NativiteWebViewinstances now opt out of root scroll locking and keep scroll interaction enabled, and sheet scrolling no longer always expands detents from content drags. This restores reliable tap/scroll interactivity inside sheet web content. - Sheet webview scrolling now disables rubber-band bounce (
bounces = false) to prevent content moving beyond viewport bounds. chrome.sheet.postMessage(...)now routes towindow.nativiteSheet.postMessage(...)when called from inside the sheet context, so sheet-to-host messaging works with either API style.
- macOS continues to ignore
sheetchrome keys in this phase.
-
016ca76: Add
tabBottomAccessory()factory function for iOS 26tabViewBottomAccessorysupport.tabBottomAccessory(config)factory function to declare a persistent child webview between tab content and the tab bar.TabBottomAccessoryConfigtype extendingChildWebviewBasewithurl,presented, andbackgroundColorproperties.tabBottomAccessory.presented,tabBottomAccessory.dismissed, andtabBottomAccessory.loadFailedchrome events.- Native iOS template:
NativiteTabBottomAccessoryControllerchild webview positioned above the tab bar, with URL loading, SPA routing, and messaging support.
-
78026da: Align Android
shell.readychrome capabilities with the areas rendered by the Compose chrome root. -
6d8dce4: Wire Android debug builds to consume Vite dev server metadata by mirroring
.nativite/dev.jsoninto generated Android debug assets and removing stale metadata outside dev mode. -
e4176ba: Support Android native plugin contributions during project generation.
Android plugins can now provide Kotlin/Java sources, resources, Gradle dependencies, and bridge registrars through
platforms.android. Android registrar declarations can include fully-qualified Kotlin import paths so plugin registration functions compile when they live outside the generated app package. -
21f87bc: Clarify that OTA bundle staging and application currently apply to iOS and macOS only, while Android OTA checks return
{ available: false }until Android parity is implemented. -
8850c8b: Document the Android native plugin contribution contract.
Android Gradle project generation now includes plugin Kotlin sources, resources, dependencies, and a generated native registrant, so Android plugins are no longer silently ignored.
-
57f260e: Copy the Android production web bundle into generated Gradle assets for release builds.
Generated Android projects now copy
dist-androidinto Gradle-generated assets beforemergeReleaseAssets, and release builds fail clearly if the web bundle is missing. -
2867427: Add production-safe
bridge.call()failure handling with timeout support,AbortSignalcancellation, structuredNativiteBridgeErrorcodes, and strict mode rejection when no native bridge is available. -
907b24c: Fix OTA bridge/runtime behavior across generated native targets:
- Android
NativiteBridgenow registers built-in__nativite__.__ping__and__nativite__.__ota_check__handlers soota.check()no longer fails with "No handler" errors. - iOS/macOS
NativiteBridgenow wires__ota_check__to the OTA updater when updates are configured, returning live{ available, version? }status instead of a static placeholder. OTAUpdaternow usesupdates.channelwhen resolving manifest/assets (/<channel>/<platform>/...) with fallback to the legacy/<platform>/...path.- OTA status now reports staged updates and persists staged version metadata for bridge status responses.
- Added regression tests and updated OTA/bridge docs to match the generated behavior.
- Android
-
c2e7735: Print concise post-build next steps from
nativite buildafter all requested platform builds succeed. -
5494e98: Simplify the documented native setup around
nativite build, and report generated native project and web bundle paths after each platform build. -
5b07eba: Allow built-in platform helpers to be called without config by applying default iOS, macOS, and Android SDK settings during config normalization.
-
f3cba52: Cache platform-extension import resolution results and invalidate affected entries from Vite watcher events.
-
74d212f: Rename legacy
nk-prefixed identifiers tonvequivalents across native templates, runtime helpers, tests, and documentation.This includes:
- CSS custom properties (
--nv-*) - JS bridge helpers (
window.__nv_patch,__nv_vars__) - Platform data attributes (
data-nv-platform) - CSS variable helper exports (
NVVars,NVVarName)
This removes a legacy package-name prefix so generated variables are now aligned with the current naming convention.
- CSS custom properties (
-
a47e3f1: Improve native development error-overlay behavior.
- Add
ios({ errorOverlay: boolean })config support for toggling Vite runtime error overlays in native dev WebViews. - In
nativite dev, the selected platform'sdev.errorOverlaysetting now controlsserver.hmr.overlay(default remains disabled). - Keep Vite overlay controls inside native top/bottom insets so dismiss/action controls remain reachable when the overlay is enabled.
- Add regression tests for config normalization, dev-server overlay toggling, and native overlay inset styling.
- Add
-
fac74cd: Clarify that
nativite buildprepares production native projects and embedded web bundles, while final signed app-store artifacts are produced by native toolchains or CI. -
3d16b5c: Rework onboarding docs around the shortest path from an existing Vite app to a generated native shell.
-
44f2a4f: Prefer explicit native platform request markers for dev server environment routing while retaining User-Agent fallback support.
-
1ee89cd: Make
nativite initupdate common Vite config shapes, including plugin variables, multiline plugin arrays, missing plugin properties, andmergeConfigoverride objects. -
eb96e59: Add a small visual gap between the iOS keyboard and
chrome.keyboardinput accessory bar.The generated
NativiteKeyboard.swifttemplate now separates toolbar height from total accessory height and reserves a fixed gap so accessory controls are no longer flush against the keyboard. -
a47e3f1: Fix CSS custom properties not being set in iOS/macOS WKWebView.
The
buildInitScript()function inNativiteVars.swiftwas embedding Swift multi-line string literals (defaultsanddevOverlayInsets) directly into a single-quoted JavaScript string. Multi-line strings contain literal newlines, which are invalid inside a JS single-quoted string literal, causing a silent syntax error inWKUserScript. This prevented the<style>element from being created andwindow.__nv_patchfrom being defined, so no--nv-*CSS variables were ever given a value in the WebView.The fix collapses both strings to a single line (stripping newlines and surrounding whitespace) before embedding them in the JS, so the generated script is always syntactically valid.
-
d6ee04d: Add per-item tint support for navigation items and apply navigation/button tint consistently in native chrome renderers.
-
1bc16ac: Fix the published package layout for first-party native runtime templates.
Swift and Kotlin runtime templates are now copied to
dist/runtime, matching the path used by the bundled platform generators when generating iOS, macOS, and Android projects from the published package. -
0ae894e: Add fixture-based native build tests that exercise real Vite apps, platform HTML entries, source variants, build manifests, and generated iOS/macOS project output.
-
9b96aab: Align CSS variable injection across platforms.
Android now seeds the full shared
NVVarNamesurface, updates safe-area values from system insets, and refreshes keyboard values during IME animation. The Apple runtimes stop emitting undocumented--nv-sidebar-*defaults so the runtime variable set matches the public JavaScript contract. -
05856cd: Refactor platform runtime integration so built-in Apple platforms run through the platform plugin system:
- add first-party
nativite-iosandnativite-macosplatform plugins with built-in extension/environments metadata and generate/dev/build hooks. - resolve all configured platforms through plugin lookup in the platform registry, removing dedicated built-in runtime branching.
- route CLI and Vite lifecycle execution through
runtime.pluginhooks consistently, including richer hook context (rootConfig, generatemode). - harden generation stale checks in
generateProjectso legacy Xcode project metadata triggers regeneration even when the config hash is unchanged. - reserve
ios/macosplatform plugin identifiers in config validation so first-party platform plugins cannot be overridden accidentally.
- add first-party
-
d8759fd: Export
createCliProgram()fromnativite/cliand keep command-line parsing limited to thenativiteexecutable entrypoint. -
54f8b96: Hash OTA manifests from asset contents and include per-asset SHA-256 hashes and sizes so native runtimes can validate downloaded bundle bytes.
-
a47e3f1: Fix native dev HMR behavior so React Fast Refresh can run on native variant edits without forced full page reloads.
- Replace native variant
full-reloadbroadcasting with bridgedupdatepayloads sent to the client HMR channel. - Keep native-only hot updates deduped per file-change token to avoid duplicate HMR broadcasts.
- Add regression tests that assert native variant updates emit
updatepayloads instead of forcedfull-reload.
- Replace native variant
-
9dcc265: Resolve local and package plugin files from their module directory when
definePluginordefinePlatformPluginreceiveimport.meta.url. -
d69f1c9: Forward native chrome event envelopes through
nativite/clientunchanged sochrome.on("titleBar.menuItemPressed"),chrome.on("toolbar.menuItemPressed"), andchrome.on("menuBar.itemPressed")handlers receive menu item taps when the client bridge is imported. -
bb12f18: Run the iOS and Android native runtime test suites in GitHub Actions, and keep the iOS Swift runtime harness compilable on macOS by gating iOS-only sheet toolbar APIs.
-
67127d9: Wire iOS
errorOverlayconfig into Vite dev overlay defaults and validate AndroidtargetSdkvalues.nativite/vite: whenNATIVITE_DEV_ERROR_OVERLAYis not set, the plugin now readsios({ errorOverlay })fromnativite.config.tsto decide the default Vite HMR overlay setting.NATIVITE_DEV_ERROR_OVERLAYremains the highest-precedence override for forcing overlay on/off.- Config schema now requires
android.targetSdk(when provided) to be an integer. - Added regression tests for both behaviors and updated docs.
-
79f561d: Fix CommonJS package exports for the root, Vite, and CLI entrypoints by avoiding build output cycles and guarding CLI execution when imported.
-
1821157: Define the 1.0 public package API contract by making package exports ESM-only, keeping the CLI binary-only, and documenting that deep imports are unsupported.
-
a9ab4c6: Add Bun scripts for running the native iOS Swift and Android Kotlin runtime test suites.
-
2a93700: Improve public release metadata, contribution guidance, TypeScript input scoping, test layout hygiene, and internal Nativite webview instance naming.
-
6ffd2dc: Move TypeScript from peer dependencies to development dependencies because Nativite does not import or require the consumer's TypeScript compiler at runtime.
-
5e7e018: Include generated runtime and template contents in native project dirty-check hashes so package upgrades regenerate stale iOS, macOS, and Android projects.
-
dff8bf6: Use secure Android WebView mixed-content defaults by allowing mixed content only in debug builds and blocking it in release builds.
-
a47e3f1: Fix native asset loading in both dev and build modes:
- native dev middleware now bypasses direct static asset requests (like SVG image URLs) while still transforming module-style asset imports (
?import,?url) and Vite HTML proxy module requests. - native dev middleware now treats explicit Vite module-query requests as authoritative even when WKWebView sends ambiguous
Sec-Fetch-Dest/Acceptheaders. - native production builds now default to
base: "./"(unless the user already setbase) sofile://WKWebView bundles resolve generated asset URLs correctly. - in DEBUG builds, the generated native ViewController now persists the resolved dev server URL in
UserDefaults, so simulator app relaunches keep targeting the last known dev server even when launch-time env vars are absent. - in DEBUG builds, generated iOS/macOS WebViews now set
isInspectable = trueon supported OS versions so Safari Develop debugging works without manual native code edits.
- native dev middleware now bypasses direct static asset requests (like SVG image URLs) while still transforming module-style asset imports (
-
00c2e53: Improve native CSS variable accuracy across platforms.
- Android now reports
--nv-nav-*,--nv-tab-*, and--nv-toolbar-*from measured Compose chrome geometry instead of fixed height guesses. - Android now updates device/orientation/theme flags (
--nv-is-phone,--nv-is-tablet,--nv-is-portrait,--nv-is-dark, etc.) from runtime configuration changes. - iOS now uses consistent inset-top math (
safe-top + nav-height) so--nv-inset-topno longer double-counts status bar height. - macOS now seeds appearance variables on startup and pushes chrome geometry with measured navigation height semantics.
- Android now reports
-
a47e3f1: Remove legacy/deprecated API compatibility paths and keep the supported API surface focused:
- Stop synthesizing
app.platformsin parsed config output.platformsis now the single source of truth for configured platforms. - Remove internal/runtime reliance on
config.app.platformsacross generation, Vite integration, plugin resolution, and platform override logic. - Remove the legacy bridge RPC fallback path that depended on
window.nativiteReceiveresponse/errormessages. - Keep bridge RPC calls on the current
postMessageWithReplyAPI and usewindow.nativiteReceivefor native push events only. - Update test fixtures and schema expectations to reflect the simplified, forward-only API model.
- Stop synthesizing
-
a907be8: Enable Safari Web Inspector for SwiftUI-hosted child webviews on Apple platforms.
NativiteChromeStatenow marksNativiteChildWebViewinstances as inspectable inDEBUGbuilds (iOS 16.4+,macOS 13.3+) so sheet/drawer/popover/app-window webviews appear in Safari Develop tools. -
f925de9: Document NCLP v2 as the stable public host wire protocol for Nativite 1.0.
The README, Chrome API docs, and NCLP reference now distinguish the app-facing JavaScript chrome API from the host-facing wire protocol contract, define NCLP v2 compatibility and versioning rules, and clarify capability negotiation through
shell.ready areas. A regression test now covers the stablechrome.snapshotenvelope emitted by the JavaScript runtime. -
a47e3f1: Fix iOS splash behavior so a splash overlay remains visible until the first web page load finishes.
- Show a dark-mode-aware default splash overlay on iOS when
config.splashis not provided. - Add a centered loading spinner to the default splash overlay.
- Keep the splash overlay visible until
WKWebViewdidFinishfires. - Render the configured splash image in the runtime overlay when
config.splash.imageis set. - Add regression tests for the iOS splash overlay lifecycle.
- Show a dark-mode-aware default splash overlay on iOS when
-
a9ab4c6: Reorganise native platform template sources into
src/native/<platform>and update generator imports and docs to match. -
a47e3f1: Fix external link handling in generated native WebViews:
- iOS and macOS ViewController templates now intercept link-activated and new-window (
target="_blank") navigations inWKWebView. - HTTP(S) links that leave the current in-app origin now open in the device default browser instead of silently doing nothing.
- iOS and macOS ViewController templates now intercept link-activated and new-window (
-
1ad80ac: Add typed bridge contracts for native plugin authors and app code.
-
a907be8: Re-add the
nativite buildCLI command for production builds.- Added a production build command flow that loads configured runtimes, sets Nativite platform environment variables, and runs Vite in production mode.
nativite buildnow builds all configured platforms by default.- Added optional
--platform <platform>targeting for single-platform builds. - Added unit tests for build command behavior and failure cases.
- Updated docs to describe production build behavior and platform-specific output directories.
- Tightened production vs dev native runtime behavior:
- Apple copy phase now includes
dev.jsononly for non-Release builds. - Android webview now gates dev URL resolution and WebView debugging by
BuildConfig.DEBUG. - Android project generation now removes stale
assets/dev.jsonoutside dev mode.
- Apple copy phase now includes