@sigx/lynx 0.1.2 → 0.4.0
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 +2 -0
- package/package.json +6 -3
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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sigx/lynx",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
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": {
|
|
@@ -37,7 +40,7 @@
|
|
|
37
40
|
"dependencies": {
|
|
38
41
|
"@sigx/reactivity": "^0.4.3",
|
|
39
42
|
"@sigx/runtime-core": "^0.4.3",
|
|
40
|
-
"@sigx/lynx-runtime": "^0.
|
|
43
|
+
"@sigx/lynx-runtime": "^0.4.0"
|
|
41
44
|
},
|
|
42
45
|
"devDependencies": {
|
|
43
46
|
"@sigx/vite": "^0.4.3",
|
|
@@ -61,7 +64,7 @@
|
|
|
61
64
|
"author": "Andreas Ekdahl",
|
|
62
65
|
"license": "MIT",
|
|
63
66
|
"scripts": {
|
|
64
|
-
"build": "vite build && tsgo --emitDeclarationOnly",
|
|
67
|
+
"build": "vite build && tsgo --emitDeclarationOnly && node ../../scripts/copy-assets.mjs src/client.d.ts dist/client.d.ts",
|
|
65
68
|
"dev": "vite build --watch",
|
|
66
69
|
"clean": "rm -rf dist .turbo *.tsbuildinfo"
|
|
67
70
|
}
|