@bgub/fig-reconciler 0.0.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/LICENSE +21 -0
- package/README.md +12 -0
- package/dist/devtools.d.ts +69 -0
- package/dist/devtools.js +22 -0
- package/dist/devtools.js.map +1 -0
- package/dist/index.d.ts +125 -0
- package/dist/index.js +3719 -0
- package/dist/index.js.map +1 -0
- package/dist/refresh.d.ts +11 -0
- package/dist/refresh.js +6 -0
- package/dist/refresh.js.map +1 -0
- package/package.json +57 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
//#region src/refresh.d.ts
|
|
2
|
+
interface RefreshFamily {
|
|
3
|
+
current: unknown;
|
|
4
|
+
}
|
|
5
|
+
interface RefreshUpdate {
|
|
6
|
+
staleFamilies: Set<RefreshFamily>;
|
|
7
|
+
updatedFamilies: Set<RefreshFamily>;
|
|
8
|
+
}
|
|
9
|
+
declare function setRefreshHandler(handler: ((type: unknown) => RefreshFamily | undefined) | null): void;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { RefreshFamily, RefreshUpdate, setRefreshHandler };
|
package/dist/refresh.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"refresh.js","names":[],"sources":["../src/refresh.ts"],"sourcesContent":["import { setRefreshHandlerState } from \"./refresh-state.ts\";\n\ndeclare const __FIG_DEV__: boolean | undefined;\n\nconst __DEV__ = typeof __FIG_DEV__ === \"boolean\" ? __FIG_DEV__ : false;\n\n// A family groups every version of a component across hot edits; `current` is\n// the latest implementation. The handler is module-global (one refresh runtime\n// per app) so module-level reconcile helpers can consult it. In production no\n// handler is ever set, so all of this collapses to identity/equality paths.\nexport interface RefreshFamily {\n current: unknown;\n}\n\nexport interface RefreshUpdate {\n staleFamilies: Set<RefreshFamily>;\n updatedFamilies: Set<RefreshFamily>;\n}\n\nexport function setRefreshHandler(\n handler: ((type: unknown) => RefreshFamily | undefined) | null,\n): void {\n if (__DEV__) {\n setRefreshHandlerState(handler);\n }\n}\n"],"mappings":";AAmBA,SAAgB,kBACd,SACM,CAIR"}
|
package/package.json
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@bgub/fig-reconciler",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "Fig reconciler",
|
|
5
|
+
"keywords": [],
|
|
6
|
+
"homepage": "https://github.com/bgub/fig",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"import": "./dist/index.js",
|
|
12
|
+
"default": "./dist/index.js"
|
|
13
|
+
},
|
|
14
|
+
"./devtools": {
|
|
15
|
+
"types": "./dist/devtools.d.ts",
|
|
16
|
+
"import": "./dist/devtools.js",
|
|
17
|
+
"default": "./dist/devtools.js"
|
|
18
|
+
},
|
|
19
|
+
"./refresh": {
|
|
20
|
+
"types": "./dist/refresh.d.ts",
|
|
21
|
+
"import": "./dist/refresh.js",
|
|
22
|
+
"default": "./dist/refresh.js"
|
|
23
|
+
},
|
|
24
|
+
"./package.json": "./package.json"
|
|
25
|
+
},
|
|
26
|
+
"types": "./dist/index.d.ts",
|
|
27
|
+
"sideEffects": false,
|
|
28
|
+
"files": [
|
|
29
|
+
"dist"
|
|
30
|
+
],
|
|
31
|
+
"author": "Ben Gubler <nebrelbug@gmail.com>",
|
|
32
|
+
"repository": {
|
|
33
|
+
"type": "git",
|
|
34
|
+
"url": "https://github.com/bgub/fig",
|
|
35
|
+
"directory": "packages/fig-reconciler"
|
|
36
|
+
},
|
|
37
|
+
"bugs": {
|
|
38
|
+
"url": "https://github.com/bgub/fig/issues"
|
|
39
|
+
},
|
|
40
|
+
"license": "MIT",
|
|
41
|
+
"publishConfig": {
|
|
42
|
+
"access": "public"
|
|
43
|
+
},
|
|
44
|
+
"peerDependencies": {
|
|
45
|
+
"@bgub/fig": "0.0.1"
|
|
46
|
+
},
|
|
47
|
+
"devDependencies": {
|
|
48
|
+
"@bgub/fig": "0.0.1"
|
|
49
|
+
},
|
|
50
|
+
"engines": {
|
|
51
|
+
"node": "^20.19.0 || >=22.12.0"
|
|
52
|
+
},
|
|
53
|
+
"scripts": {
|
|
54
|
+
"build": "tsdown --config ../../tsdown.config.ts && node ../../scripts/strip-declaration-map-comments.mjs dist",
|
|
55
|
+
"test": "vitest run --config ../../vite.config.ts src"
|
|
56
|
+
}
|
|
57
|
+
}
|