@reactre/full-compat 0.0.0-stage → 0.0.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 +202 -0
- package/README.md +46 -2
- package/dist/chunk-11zdy4zv.js +167 -0
- package/dist/chunk-4er1w1vd.js +585 -0
- package/dist/chunk-b3y5xqd8.js +9 -0
- package/dist/chunk-e4yywtvf.js +7281 -0
- package/dist/chunk-ez9na11j.js +6 -0
- package/dist/chunk-m94gb9v9.js +6 -0
- package/dist/chunk-mtd8nnwt.js +6 -0
- package/dist/chunk-skse5h3m.js +277 -0
- package/dist/chunk-v1e4rr21.js +6 -0
- package/dist/core.js +171 -0
- package/dist/features/classes.js +2 -0
- package/dist/features/concurrent.js +2 -0
- package/dist/features/keys.js +2 -0
- package/dist/features/retry.js +2 -0
- package/dist/features/stacks.js +2 -0
- package/dist/features/undo.js +2 -0
- package/dist/features/viewTransitions.js +2 -0
- package/dist/index.js +178 -0
- package/dist/server.browser.js +6 -0
- package/dist/server.edge.js +6 -0
- package/dist/server.js +6 -0
- package/package.json +93 -4
- package/src/core.ts +8 -0
- package/src/features/classes.ts +2 -0
- package/src/features/concurrent.ts +2 -0
- package/src/features/keys.ts +2 -0
- package/src/features/retry.ts +2 -0
- package/src/features/stacks.ts +2 -0
- package/src/features/undo.ts +2 -0
- package/src/features/viewTransitions.ts +2 -0
- package/src/index.ts +11 -0
- package/src/server.browser.ts +3 -0
- package/src/server.edge.ts +3 -0
- package/src/server.ts +3 -0
- package/src/slicing.ts +4 -0
package/dist/server.js
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,95 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reactre/full-compat",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.0.2",
|
|
4
|
+
"description": "@reactre/compat with React's time slicing: a transition's render yields to the page every 5 ms, as React's concurrent render does.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"reactre",
|
|
7
|
+
"react",
|
|
8
|
+
"react-dom",
|
|
9
|
+
"compat",
|
|
10
|
+
"concurrent",
|
|
11
|
+
"time-slicing"
|
|
12
|
+
],
|
|
13
|
+
"homepage": "https://github.com/arafathusayn/reactre/tree/main/packages/full-compat#readme",
|
|
14
|
+
"bugs": "https://github.com/arafathusayn/reactre/issues",
|
|
15
|
+
"repository": {
|
|
16
|
+
"type": "git",
|
|
17
|
+
"url": "git+https://github.com/arafathusayn/reactre.git",
|
|
18
|
+
"directory": "packages/full-compat"
|
|
19
|
+
},
|
|
20
|
+
"license": "Apache-2.0",
|
|
21
|
+
"author": "Arafat Husayn",
|
|
22
|
+
"type": "module",
|
|
23
|
+
"sideEffects": [
|
|
24
|
+
"./src/index.ts",
|
|
25
|
+
"./src/core.ts",
|
|
26
|
+
"./src/slicing.ts",
|
|
27
|
+
"./src/features/*.ts",
|
|
28
|
+
"./dist/index.js",
|
|
29
|
+
"./dist/core.js",
|
|
30
|
+
"./dist/features/*.js",
|
|
31
|
+
"./dist/chunk-*.js"
|
|
32
|
+
],
|
|
33
|
+
"exports": {
|
|
34
|
+
".": {
|
|
35
|
+
"types": "./src/index.ts",
|
|
36
|
+
"bun": "./src/index.ts",
|
|
37
|
+
"default": "./dist/index.js"
|
|
38
|
+
},
|
|
39
|
+
"./core": {
|
|
40
|
+
"types": "./src/core.ts",
|
|
41
|
+
"bun": "./src/core.ts",
|
|
42
|
+
"default": "./dist/core.js"
|
|
43
|
+
},
|
|
44
|
+
"./features/*": {
|
|
45
|
+
"types": "./src/features/*.ts",
|
|
46
|
+
"bun": "./src/features/*.ts",
|
|
47
|
+
"default": "./dist/features/*.js"
|
|
48
|
+
},
|
|
49
|
+
"./server": {
|
|
50
|
+
"types": "./src/server.ts",
|
|
51
|
+
"workerd": "./dist/server.edge.js",
|
|
52
|
+
"edge-light": "./dist/server.edge.js",
|
|
53
|
+
"worker": "./dist/server.browser.js",
|
|
54
|
+
"browser": "./dist/server.browser.js",
|
|
55
|
+
"bun": "./src/server.edge.ts",
|
|
56
|
+
"default": "./dist/server.js"
|
|
57
|
+
},
|
|
58
|
+
"./static": {
|
|
59
|
+
"types": "./src/server.ts",
|
|
60
|
+
"workerd": "./dist/server.edge.js",
|
|
61
|
+
"edge-light": "./dist/server.edge.js",
|
|
62
|
+
"deno": "./dist/server.browser.js",
|
|
63
|
+
"worker": "./dist/server.browser.js",
|
|
64
|
+
"browser": "./dist/server.browser.js",
|
|
65
|
+
"bun": "./src/server.ts",
|
|
66
|
+
"default": "./dist/server.js"
|
|
67
|
+
},
|
|
68
|
+
"./server.node": {
|
|
69
|
+
"types": "./src/server.ts",
|
|
70
|
+
"bun": "./src/server.ts",
|
|
71
|
+
"default": "./dist/server.js"
|
|
72
|
+
},
|
|
73
|
+
"./server.browser": {
|
|
74
|
+
"types": "./src/server.browser.ts",
|
|
75
|
+
"bun": "./src/server.browser.ts",
|
|
76
|
+
"default": "./dist/server.browser.js"
|
|
77
|
+
},
|
|
78
|
+
"./server.edge": {
|
|
79
|
+
"types": "./src/server.edge.ts",
|
|
80
|
+
"bun": "./src/server.edge.ts",
|
|
81
|
+
"default": "./dist/server.edge.js"
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
"files": [
|
|
85
|
+
"src",
|
|
86
|
+
"dist"
|
|
87
|
+
],
|
|
88
|
+
"scripts": {
|
|
89
|
+
"build": "bun build.ts"
|
|
90
|
+
},
|
|
91
|
+
"dependencies": {
|
|
92
|
+
"@reactre/compat": "0.0.2",
|
|
93
|
+
"@reactre/dom": "0.0.2"
|
|
94
|
+
}
|
|
95
|
+
}
|
package/src/core.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// @reactre/full-compat/core: @reactre/compat/core with React's time slicing (see ./index.ts).
|
|
2
|
+
// @reactre/plugin builds an app's narrower entry on it, with the feature modules of what is on.
|
|
3
|
+
|
|
4
|
+
import "./slicing.ts";
|
|
5
|
+
import "@reactre/compat/features/timeSlicing";
|
|
6
|
+
|
|
7
|
+
export * from "@reactre/compat/core";
|
|
8
|
+
export { default } from "@reactre/compat/core";
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// @reactre/full-compat: @reactre/compat with React's time slicing. A transition's render yields to
|
|
2
|
+
// the page every 5 ms, so events, timers and paints run between its slices, and an urgent update
|
|
3
|
+
// made meanwhile commits first while the transition renders again from the start, as React's
|
|
4
|
+
// concurrent render does. The check before each fiber costs on every render, so it lives in this
|
|
5
|
+
// package's builds and not in @reactre/compat's.
|
|
6
|
+
|
|
7
|
+
import "./slicing.ts";
|
|
8
|
+
import "@reactre/compat/features/timeSlicing";
|
|
9
|
+
|
|
10
|
+
export * from "@reactre/compat";
|
|
11
|
+
export { default } from "@reactre/compat";
|
package/src/server.ts
ADDED
package/src/slicing.ts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
// Under Bun, which runs @reactre/compat's sources (its `bun` export condition), the core reads
|
|
2
|
+
// this flag where it would slice. The builds define it instead (../build.ts), so a source run gets
|
|
3
|
+
// it here, before anything renders. Set by name, so the builds' define leaves it alone.
|
|
4
|
+
Object.defineProperty(globalThis, "__REACTRE_SLICING__", { value: true, configurable: true, writable: true });
|