@sigx/lynx 0.1.0 → 0.1.2
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.
- package/LICENSE +1 -1
- package/README.md +9 -9
- package/dist/index.d.ts +4 -0
- package/dist/index.js +4 -0
- package/dist/jsx-dev-runtime.js +2 -0
- package/dist/jsx-runtime.js +2 -0
- package/package.json +56 -18
- package/src/index.ts +0 -14
- /package/{jsx-dev-runtime.ts → dist/jsx-dev-runtime.d.ts} +0 -0
- /package/{jsx-runtime.ts → dist/jsx-runtime.d.ts} +0 -0
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @sigx/lynx
|
|
2
2
|
|
|
3
|
-
Public framework barrel for [SignalX](https://github.com/signalxjs) on Lynx. This is the package you import from in app code — it re-exports everything from `@sigx/reactivity`, `@sigx/runtime-core`, and `@sigx/runtime
|
|
3
|
+
Public framework barrel for [SignalX](https://github.com/signalxjs) on Lynx. This is the package you import from in app code — it re-exports everything from `@sigx/reactivity`, `@sigx/runtime-core`, and `@sigx/lynx-runtime` under one namespace.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
@@ -26,13 +26,13 @@ import {
|
|
|
26
26
|
| ---------------------- | -------------------------- | ------------------------------------------------------------- |
|
|
27
27
|
| `signal`, `effect`, `computed`, `batch`, `untrack`, `watch`, `effectScope` | `@sigx/reactivity` | Reactive state and computations on the BG thread. |
|
|
28
28
|
| `component`, `defineApp`, `defineDirective`, `onMounted`, `onUnmounted`, `onUpdated`, `onCreated`, `provide`/`inject` | `@sigx/runtime-core` | Component model, lifecycle, dependency injection. |
|
|
29
|
-
| `useMainThreadRef`, `MainThreadRef` | `@sigx/runtime
|
|
30
|
-
| `runOnMainThread`, `runOnBackground`, `transformToWorklet` | `@sigx/runtime
|
|
31
|
-
| `useSharedValue`, `SharedValue`, `SharedValueState` | `@sigx/runtime
|
|
32
|
-
| `useAnimatedStyle` | `@sigx/runtime
|
|
33
|
-
| `OP`, `pushOp`, `scheduleFlush`, `takeOps`, `flushNow` | `@sigx/runtime
|
|
34
|
-
| `registerBgSink`, `unregisterBgSink`, `ingestAvPublishes` | `@sigx/runtime
|
|
35
|
-
| `MainThread`, `Define`, `ViewAttributes`, etc. | `@sigx/runtime
|
|
29
|
+
| `useMainThreadRef`, `MainThreadRef` | `@sigx/lynx-runtime` | Refs whose `.current` value lives on the main UI thread. |
|
|
30
|
+
| `runOnMainThread`, `runOnBackground`, `transformToWorklet` | `@sigx/lynx-runtime` | Cross-thread function calls. |
|
|
31
|
+
| `useSharedValue`, `SharedValue`, `SharedValueState` | `@sigx/lynx-runtime` | **The cross-thread primitive** — MT-writable, BG-observable values (see below). |
|
|
32
|
+
| `useAnimatedStyle` | `@sigx/lynx-runtime` | Bind an element style to a `SharedValue` via a named mapper (linear or range-mapped), applied on MT every flush. |
|
|
33
|
+
| `OP`, `pushOp`, `scheduleFlush`, `takeOps`, `flushNow` | `@sigx/lynx-runtime` | Lower-level op-queue access for runtime authors. |
|
|
34
|
+
| `registerBgSink`, `unregisterBgSink`, `ingestAvPublishes` | `@sigx/lynx-runtime` | Lower-level SharedValue bridge primitives (the building blocks under `useSharedValue`). |
|
|
35
|
+
| `MainThread`, `Define`, `ViewAttributes`, etc. | `@sigx/lynx-runtime` | JSX type annotations. |
|
|
36
36
|
|
|
37
37
|
For touch handling and gesture components (`<Pressable>`, `<Draggable>`, `<Swipeable>`), install [`@sigx/gestures`](../gestures) on top. For spring/tween animation drivers, install [`@sigx/motion`](../motion).
|
|
38
38
|
|
|
@@ -97,7 +97,7 @@ Scroll → `<ScrollView>`'s internal MT worklet writes `scrollY.current.value`
|
|
|
97
97
|
|
|
98
98
|
### Differentiator
|
|
99
99
|
|
|
100
|
-
Neither vue-lynx nor react-lynx ships a BG-observable MT value. React-lynx's `MainThreadRef.current` *throws* on BG; framer-motion-style libraries store animation state in MT-only refs. The diff/publish bridge in `@sigx/runtime
|
|
100
|
+
Neither vue-lynx nor react-lynx ships a BG-observable MT value. React-lynx's `MainThreadRef.current` *throws* on BG; framer-motion-style libraries store animation state in MT-only refs. The diff/publish bridge in `@sigx/lynx-runtime` is what makes `effect(() => sv.value)` work — a primitive unique to sigx-lynx as of 2026-04.
|
|
101
101
|
|
|
102
102
|
### Deprecation note
|
|
103
103
|
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
package/package.json
CHANGED
|
@@ -1,30 +1,68 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sigx/lynx",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "sigx-lynx framework
|
|
3
|
+
"version": "0.1.2",
|
|
4
|
+
"description": "sigx-lynx framework",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"main": "./
|
|
7
|
-
"types": "./src/index.ts",
|
|
6
|
+
"main": "./dist/index.js",
|
|
8
7
|
"exports": {
|
|
9
|
-
".":
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
".": {
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"import": "./dist/index.js"
|
|
11
|
+
},
|
|
12
|
+
"./jsx-runtime": {
|
|
13
|
+
"types": "./dist/jsx-runtime.d.ts",
|
|
14
|
+
"import": "./dist/jsx-runtime.js"
|
|
15
|
+
},
|
|
16
|
+
"./jsx-dev-runtime": {
|
|
17
|
+
"types": "./dist/jsx-dev-runtime.d.ts",
|
|
18
|
+
"import": "./dist/jsx-dev-runtime.js"
|
|
19
|
+
},
|
|
20
|
+
"./package.json": "./package.json"
|
|
12
21
|
},
|
|
22
|
+
"repository": {
|
|
23
|
+
"type": "git",
|
|
24
|
+
"url": "git+https://github.com/signalxjs/lynx.git",
|
|
25
|
+
"directory": "packages/lynx"
|
|
26
|
+
},
|
|
27
|
+
"homepage": "https://github.com/signalxjs/lynx/tree/main/packages/lynx",
|
|
28
|
+
"bugs": {
|
|
29
|
+
"url": "https://github.com/signalxjs/lynx/issues"
|
|
30
|
+
},
|
|
31
|
+
"types": "./dist/index.d.ts",
|
|
13
32
|
"files": [
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
33
|
+
"dist",
|
|
34
|
+
"README.md",
|
|
35
|
+
"LICENSE"
|
|
17
36
|
],
|
|
18
|
-
"
|
|
19
|
-
"@sigx/reactivity": "^0.4.
|
|
20
|
-
"@sigx/runtime-
|
|
21
|
-
"@sigx/runtime
|
|
37
|
+
"dependencies": {
|
|
38
|
+
"@sigx/reactivity": "^0.4.3",
|
|
39
|
+
"@sigx/runtime-core": "^0.4.3",
|
|
40
|
+
"@sigx/lynx-runtime": "^0.2.4"
|
|
41
|
+
},
|
|
42
|
+
"devDependencies": {
|
|
43
|
+
"@sigx/vite": "^0.4.3",
|
|
44
|
+
"@typescript/native-preview": "7.0.0-dev.20260511.1",
|
|
45
|
+
"typescript": "^6.0.3",
|
|
46
|
+
"vite": "^8.0.12"
|
|
22
47
|
},
|
|
48
|
+
"publishConfig": {
|
|
49
|
+
"access": "public"
|
|
50
|
+
},
|
|
51
|
+
"keywords": [
|
|
52
|
+
"signalx",
|
|
53
|
+
"sigx",
|
|
54
|
+
"lynx",
|
|
55
|
+
"framework",
|
|
56
|
+
"reactive",
|
|
57
|
+
"cross-platform",
|
|
58
|
+
"mobile",
|
|
59
|
+
"native"
|
|
60
|
+
],
|
|
23
61
|
"author": "Andreas Ekdahl",
|
|
24
62
|
"license": "MIT",
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
63
|
+
"scripts": {
|
|
64
|
+
"build": "vite build && tsgo --emitDeclarationOnly",
|
|
65
|
+
"dev": "vite build --watch",
|
|
66
|
+
"clean": "rm -rf dist .turbo *.tsbuildinfo"
|
|
29
67
|
}
|
|
30
68
|
}
|
package/src/index.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/// <reference types="@sigx/runtime-lynx" />
|
|
2
|
-
// Side-effect import: registers lynxMount as the default mount, installs
|
|
3
|
-
// the platform model processor, augments PlatformTypes with ShadowElement,
|
|
4
|
-
// and adds the global JSX intrinsic element types for <view>, <text>, etc.
|
|
5
|
-
import '@sigx/runtime-lynx';
|
|
6
|
-
|
|
7
|
-
// Re-export the public surface so users only need a single import:
|
|
8
|
-
//
|
|
9
|
-
// import { component, signal, defineApp, type Define } from '@sigx/lynx';
|
|
10
|
-
//
|
|
11
|
-
// Mirrors the layering of `sigx` (web meta) and `@sigx/terminal` (terminal meta).
|
|
12
|
-
export * from '@sigx/reactivity';
|
|
13
|
-
export * from '@sigx/runtime-core';
|
|
14
|
-
export * from '@sigx/runtime-lynx';
|
|
File without changes
|
|
File without changes
|