@sigx/lynx-core 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +31 -0
  3. package/package.json +10 -3
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2025 Andreas Ekdahl
3
+ Copyright (c) 2025-2026 Andreas Ekdahl
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md ADDED
@@ -0,0 +1,31 @@
1
+ # @sigx/lynx-core
2
+
3
+ Low-level native-module bridge for sigx-lynx. Every `@sigx/lynx-*` native module package (`-camera`, `-haptics`, `-storage`, `-network`, …) depends on this for its iOS/Android plumbing.
4
+
5
+ Most apps don't import this directly — they use the module packages by name.
6
+
7
+ ## API
8
+
9
+ ```ts
10
+ import {
11
+ getModule,
12
+ callSync,
13
+ callAsync,
14
+ isModuleAvailable,
15
+ guardModule,
16
+ } from '@sigx/lynx-core';
17
+ ```
18
+
19
+ - **`getModule(name)`** — return the `NativeModules[name]` proxy that the Lynx runtime injects, or `undefined` if the module isn't linked.
20
+ - **`callSync(name, method, ...args)`** — invoke a bridge method that returns synchronously.
21
+ - **`callAsync(name, method, ...args)`** — invoke a bridge method that returns a `Promise`.
22
+ - **`isModuleAvailable(name)`** — feature-detect a module without throwing.
23
+ - **`guardModule(name)`** — throw a descriptive error if the module isn't linked (use at module-package entry points).
24
+
25
+ ## Permissions helpers
26
+
27
+ For modules that need runtime permissions (camera, location, notifications, …) the package re-exports the shared `PermissionStatus` / `PermissionResponse` types used by `@sigx/lynx-permissions`.
28
+
29
+ ## Linking
30
+
31
+ Native modules are wired by `@sigx/lynx-cli`'s autolinker — list them under `modules: [...]` in `sigx.lynx.config.ts`, run `sigx prebuild`, and the generated registry takes care of the rest.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sigx/lynx-core",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Core native bridge for sigx-lynx — low-level access to NativeModules",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -24,11 +24,18 @@
24
24
  "license": "MIT",
25
25
  "repository": {
26
26
  "type": "git",
27
- "url": "git+https://github.com/signalxjs/core.git",
27
+ "url": "git+https://github.com/signalxjs/lynx.git",
28
28
  "directory": "packages/lynx-core"
29
29
  },
30
30
  "devDependencies": {
31
- "typescript": "^5.9.3"
31
+ "typescript": "^6.0.3"
32
+ },
33
+ "homepage": "https://github.com/signalxjs/lynx/tree/main/packages/lynx-core",
34
+ "bugs": {
35
+ "url": "https://github.com/signalxjs/lynx/issues"
36
+ },
37
+ "publishConfig": {
38
+ "access": "public"
32
39
  },
33
40
  "scripts": {
34
41
  "build": "tsc",