@sigx/lynx 0.1.4 → 0.4.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.
- package/dist/client.d.ts +26 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +20 -4
- package/dist/jsx-dev-runtime.js +1 -2
- package/dist/jsx-runtime.js +1 -2
- package/package.json +11 -10
package/dist/client.d.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// Client-side ambient types for apps built on `@sigx/lynx`.
|
|
2
|
+
//
|
|
3
|
+
// Apps opt in via a one-line `env.d.ts` at their source root:
|
|
4
|
+
//
|
|
5
|
+
// /// <reference types="@sigx/lynx/client" />
|
|
6
|
+
//
|
|
7
|
+
// This mirrors the `vite/client` / `next/types/global` pattern: a single
|
|
8
|
+
// reference unlocks the bundler/HMR surface that every lynx app needs, so
|
|
9
|
+
// the ambient declarations don't have to be duplicated in every project.
|
|
10
|
+
|
|
11
|
+
// Side-effect imports of CSS assets, e.g. `import './styles.css'`. The lynx
|
|
12
|
+
// dev/build pipeline (rspeedy/rsbuild) handles these at bundle time, but TS
|
|
13
|
+
// under `moduleResolution: "bundler"` still needs a declaration for the
|
|
14
|
+
// module shape.
|
|
15
|
+
declare module '*.css';
|
|
16
|
+
|
|
17
|
+
// The webpack/rspeedy HMR `module.hot` global. We type only the surface lynx
|
|
18
|
+
// apps actually use (`accept` / `dispose`) to keep the ambient minimal and
|
|
19
|
+
// avoid pulling in `@types/webpack-env` or `@types/node`.
|
|
20
|
+
declare const module: {
|
|
21
|
+
readonly hot?: {
|
|
22
|
+
accept(): void;
|
|
23
|
+
accept(dependency: string | string[], callback?: () => void): void;
|
|
24
|
+
dispose(callback: (data: unknown) => void): void;
|
|
25
|
+
};
|
|
26
|
+
};
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,4 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
/// <reference types="@sigx/lynx-runtime" />
|
|
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/lynx-runtime';
|
|
6
|
+
// Re-export the public surface so users only need a single import:
|
|
7
|
+
//
|
|
8
|
+
// import { component, signal, defineApp, type Define } from '@sigx/lynx';
|
|
9
|
+
//
|
|
10
|
+
// Mirrors the layering of `sigx` (web meta) and `@sigx/terminal` (terminal meta).
|
|
11
|
+
export * from '@sigx/reactivity';
|
|
12
|
+
export * from '@sigx/runtime-core';
|
|
13
|
+
export * from '@sigx/lynx-runtime';
|
|
14
|
+
// Internal-use re-export, needed by the HMR loader. The loader injects an
|
|
15
|
+
// import of `__setCurrentInstanceForHMR` alongside `__registerComponentPlugin`
|
|
16
|
+
// so the HMR runtime can push the current ctx onto the renderer's instance
|
|
17
|
+
// stack before re-running a screen's setup function. Without this, hooks
|
|
18
|
+
// like `useNav()` that resolve through provide/inject throw during the HMR
|
|
19
|
+
// re-execution because the active instance is `null`.
|
|
20
|
+
export { setCurrentInstance as __setCurrentInstanceForHMR } from '@sigx/runtime-core/internals';
|
package/dist/jsx-dev-runtime.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { e as Fragment, t as jsxDEV };
|
|
1
|
+
export { jsxDEV, Fragment } from '@sigx/runtime-core';
|
package/dist/jsx-runtime.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { e as Fragment, t as jsx, n as jsxs };
|
|
1
|
+
export { jsx, jsxs, Fragment } from '@sigx/runtime-core';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sigx/lynx",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "sigx-lynx framework",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -17,6 +17,9 @@
|
|
|
17
17
|
"types": "./dist/jsx-dev-runtime.d.ts",
|
|
18
18
|
"import": "./dist/jsx-dev-runtime.js"
|
|
19
19
|
},
|
|
20
|
+
"./client": {
|
|
21
|
+
"types": "./dist/client.d.ts"
|
|
22
|
+
},
|
|
20
23
|
"./package.json": "./package.json"
|
|
21
24
|
},
|
|
22
25
|
"repository": {
|
|
@@ -35,15 +38,13 @@
|
|
|
35
38
|
"LICENSE"
|
|
36
39
|
],
|
|
37
40
|
"dependencies": {
|
|
38
|
-
"@sigx/reactivity": "^0.4.
|
|
39
|
-
"@sigx/runtime-core": "^0.4.
|
|
40
|
-
"@sigx/lynx-runtime": "^0.
|
|
41
|
+
"@sigx/reactivity": "^0.4.8",
|
|
42
|
+
"@sigx/runtime-core": "^0.4.8",
|
|
43
|
+
"@sigx/lynx-runtime": "^0.4.1"
|
|
41
44
|
},
|
|
42
45
|
"devDependencies": {
|
|
43
|
-
"@sigx/vite": "^0.4.3",
|
|
44
46
|
"@typescript/native-preview": "7.0.0-dev.20260511.1",
|
|
45
|
-
"typescript": "^6.0.3"
|
|
46
|
-
"vite": "^8.0.12"
|
|
47
|
+
"typescript": "^6.0.3"
|
|
47
48
|
},
|
|
48
49
|
"publishConfig": {
|
|
49
50
|
"access": "public"
|
|
@@ -61,8 +62,8 @@
|
|
|
61
62
|
"author": "Andreas Ekdahl",
|
|
62
63
|
"license": "MIT",
|
|
63
64
|
"scripts": {
|
|
64
|
-
"build": "
|
|
65
|
-
"dev": "
|
|
66
|
-
"clean": "
|
|
65
|
+
"build": "node ../../scripts/clean.mjs dist && tsgo && node ../../scripts/copy-assets.mjs src/client.d.ts dist/client.d.ts",
|
|
66
|
+
"dev": "tsgo --watch",
|
|
67
|
+
"clean": "node ../../scripts/clean.mjs dist .turbo"
|
|
67
68
|
}
|
|
68
69
|
}
|