first commit

This commit is contained in:
2026-07-12 15:55:18 +05:30
commit ee98026cc5
404 changed files with 44522 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
# @wrnexus/native
Cross-platform capabilities for browsers, Capacitor WebViews, and compiled native apps.
```ts
import { native } from "@wrnexus/native";
if (native.supports("share")) await native.run("share", { title: "WrNexus", url: location.href });
```
Built-ins include `camera`, `clipboard.write`, `share`, `geolocation`, `network`,
`haptics`, storage, filesystem, notifications, and device information. Browser
capabilities use Web APIs; mobile capabilities use installed Capacitor plugins.
`platform()` returns `server` during SSR, `browser` on the web, and the Capacitor
platform in a native WebView. Unsupported operations reject with
`NativeUnavailableError`; use `supports()` before presenting optional UI.
+34
View File
@@ -0,0 +1,34 @@
{
"name": "@wrnexus/native",
"version": "0.2.12",
"type": "module",
"description": "@wrnexus/native — part of the WrNexus framework.",
"license": "MIT",
"main": "./dist/index.js",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"engines": {
"bun": ">=1.1.0"
},
"publishConfig": {
"registry": "https://registry.npmjs.org/",
"access": "restricted"
},
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js"
},
"./browser": {
"types": "./dist/browser.d.ts",
"import": "./dist/browser.js"
},
"./mobile": {
"types": "./dist/mobile.d.ts",
"import": "./dist/mobile.js"
}
},
"files": [
"dist"
]
}