@bleedingdev/modern-js-render 3.5.0-ultramodern.5 → 3.5.0-ultramodern.75
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/esm/0~server.mjs +8 -5
- package/dist/esm/client.mjs +1 -1
- package/dist/esm/rsc.mjs +9 -6
- package/dist/esm/rscWorker.mjs +9 -6
- package/dist/esm/ssr.mjs +1 -1
- package/package.json +10 -11
- /package/dist/esm/{712.mjs → 341.mjs} +0 -0
package/dist/esm/0~server.mjs
CHANGED
|
@@ -8,11 +8,12 @@ function injectRSCPayload(rscStream, { injectClosingTags = true }) {
|
|
|
8
8
|
const buffered = [];
|
|
9
9
|
let timeout = null;
|
|
10
10
|
function flushBufferedChunks(controller) {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
let buf = '';
|
|
12
|
+
for (const chunk of buffered)buf += decoder.decode(chunk, {
|
|
13
|
+
stream: true
|
|
14
|
+
});
|
|
15
|
+
if (closingTagsPattern.test(buf)) buf = buf.replace(closingTagsPattern, '');
|
|
16
|
+
if (buf) controller.enqueue(encoder.encode(buf));
|
|
16
17
|
buffered.length = 0;
|
|
17
18
|
timeout = null;
|
|
18
19
|
}
|
|
@@ -34,6 +35,8 @@ function injectRSCPayload(rscStream, { injectClosingTags = true }) {
|
|
|
34
35
|
clearTimeout(timeout);
|
|
35
36
|
flushBufferedChunks(controller);
|
|
36
37
|
}
|
|
38
|
+
const remaining = decoder.decode();
|
|
39
|
+
if (remaining) controller.enqueue(encoder.encode(remaining));
|
|
37
40
|
if (injectClosingTags) controller.enqueue(encoder.encode('</body></html>'));
|
|
38
41
|
}
|
|
39
42
|
});
|
package/dist/esm/client.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { ElementsContext, RSCServerSlot, ResetRootContext, RscClientRoot, ServerElementsProvider, callServer, createFromFetch, createFromReadableStream, createServerReference, rscStream, setServerCallback } from "./
|
|
1
|
+
export { ElementsContext, RSCServerSlot, ResetRootContext, RscClientRoot, ServerElementsProvider, callServer, createFromFetch, createFromReadableStream, createServerReference, rscStream, setServerCallback } from "./341.mjs";
|
package/dist/esm/rsc.mjs
CHANGED
|
@@ -9,11 +9,12 @@ function injectRSCPayload(rscStream, { injectClosingTags = true }) {
|
|
|
9
9
|
const buffered = [];
|
|
10
10
|
let timeout = null;
|
|
11
11
|
function flushBufferedChunks(controller) {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
let buf = '';
|
|
13
|
+
for (const chunk of buffered)buf += decoder.decode(chunk, {
|
|
14
|
+
stream: true
|
|
15
|
+
});
|
|
16
|
+
if (closingTagsPattern.test(buf)) buf = buf.replace(closingTagsPattern, '');
|
|
17
|
+
if (buf) controller.enqueue(server_encoder.encode(buf));
|
|
17
18
|
buffered.length = 0;
|
|
18
19
|
timeout = null;
|
|
19
20
|
}
|
|
@@ -35,6 +36,8 @@ function injectRSCPayload(rscStream, { injectClosingTags = true }) {
|
|
|
35
36
|
clearTimeout(timeout);
|
|
36
37
|
flushBufferedChunks(controller);
|
|
37
38
|
}
|
|
39
|
+
const remaining = decoder.decode();
|
|
40
|
+
if (remaining) controller.enqueue(server_encoder.encode(remaining));
|
|
38
41
|
if (injectClosingTags) controller.enqueue(server_encoder.encode('</body></html>'));
|
|
39
42
|
}
|
|
40
43
|
});
|
|
@@ -166,7 +169,7 @@ const createHandleAction = ({ decodeReply, loadServerAction, renderRsc })=>async
|
|
|
166
169
|
const response = new Response(stream, {
|
|
167
170
|
status: 200,
|
|
168
171
|
headers: {
|
|
169
|
-
'Content-Type': 'text/
|
|
172
|
+
'Content-Type': 'text/x-component'
|
|
170
173
|
}
|
|
171
174
|
});
|
|
172
175
|
return response;
|
package/dist/esm/rscWorker.mjs
CHANGED
|
@@ -9,11 +9,12 @@ function injectRSCPayload(rscStream, { injectClosingTags = true }) {
|
|
|
9
9
|
const buffered = [];
|
|
10
10
|
let timeout = null;
|
|
11
11
|
function flushBufferedChunks(controller) {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
let buf = '';
|
|
13
|
+
for (const chunk of buffered)buf += decoder.decode(chunk, {
|
|
14
|
+
stream: true
|
|
15
|
+
});
|
|
16
|
+
if (closingTagsPattern.test(buf)) buf = buf.replace(closingTagsPattern, '');
|
|
17
|
+
if (buf) controller.enqueue(server_encoder.encode(buf));
|
|
17
18
|
buffered.length = 0;
|
|
18
19
|
timeout = null;
|
|
19
20
|
}
|
|
@@ -35,6 +36,8 @@ function injectRSCPayload(rscStream, { injectClosingTags = true }) {
|
|
|
35
36
|
clearTimeout(timeout);
|
|
36
37
|
flushBufferedChunks(controller);
|
|
37
38
|
}
|
|
39
|
+
const remaining = decoder.decode();
|
|
40
|
+
if (remaining) controller.enqueue(server_encoder.encode(remaining));
|
|
38
41
|
if (injectClosingTags) controller.enqueue(server_encoder.encode('</body></html>'));
|
|
39
42
|
}
|
|
40
43
|
});
|
|
@@ -166,7 +169,7 @@ const createHandleAction = ({ decodeReply, loadServerAction, renderRsc })=>async
|
|
|
166
169
|
const response = new Response(stream, {
|
|
167
170
|
status: 200,
|
|
168
171
|
headers: {
|
|
169
|
-
'Content-Type': 'text/
|
|
172
|
+
'Content-Type': 'text/x-component'
|
|
170
173
|
}
|
|
171
174
|
});
|
|
172
175
|
return response;
|
package/dist/esm/ssr.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SSR_HYDRATION_ID_PREFIX } from "@modern-js/utils/universal/constants";
|
|
2
2
|
import react from "react";
|
|
3
3
|
import { renderToReadableStream } from "react-dom/server.edge";
|
|
4
|
-
import { ServerElementsProvider } from "./
|
|
4
|
+
import { ServerElementsProvider } from "./341.mjs";
|
|
5
5
|
function CSSLinks({ cssFiles }) {
|
|
6
6
|
if (0 === cssFiles.length) return null;
|
|
7
7
|
return /*#__PURE__*/ react.createElement(react.Fragment, null, cssFiles.map((css)=>/*#__PURE__*/ react.createElement("link", {
|
package/package.json
CHANGED
|
@@ -17,28 +17,28 @@
|
|
|
17
17
|
"modern",
|
|
18
18
|
"modern.js"
|
|
19
19
|
],
|
|
20
|
-
"version": "3.5.0-ultramodern.
|
|
20
|
+
"version": "3.5.0-ultramodern.75",
|
|
21
21
|
"files": [
|
|
22
22
|
"dist",
|
|
23
23
|
"hook.d.ts"
|
|
24
24
|
],
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@
|
|
27
|
-
"@modern-js/utils": "npm:@bleedingdev/modern-js-utils@3.5.0-ultramodern.
|
|
28
|
-
"@
|
|
26
|
+
"@modern-js/types": "npm:@bleedingdev/modern-js-types@3.5.0-ultramodern.75",
|
|
27
|
+
"@modern-js/utils": "npm:@bleedingdev/modern-js-utils@3.5.0-ultramodern.75",
|
|
28
|
+
"@swc/helpers": "^0.5.23"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@
|
|
31
|
+
"@modern-js/server-core": "npm:@bleedingdev/modern-js-server-core@3.5.0-ultramodern.75",
|
|
32
|
+
"@rslib/core": "0.23.2",
|
|
33
|
+
"@scripts/build": "2.66.0",
|
|
34
|
+
"@scripts/rstest-config": "2.66.0",
|
|
32
35
|
"@types/react": "^19.2.17",
|
|
33
36
|
"@types/react-dom": "^19.2.3",
|
|
34
|
-
"@typescript/native-preview": "7.0.0-dev.
|
|
37
|
+
"@typescript/native-preview": "7.0.0-dev.20260707.2",
|
|
35
38
|
"react": "^19.2.7",
|
|
36
39
|
"react-dom": "^19.2.7",
|
|
37
40
|
"react-server-dom-rspack": "0.0.2",
|
|
38
|
-
"typescript": "^
|
|
39
|
-
"@scripts/build": "2.66.0",
|
|
40
|
-
"@scripts/rstest-config": "2.66.0",
|
|
41
|
-
"@modern-js/server-core": "npm:@bleedingdev/modern-js-server-core@3.5.0-ultramodern.5"
|
|
41
|
+
"typescript": "^7.0.2"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
44
|
"react": "^19.2.7",
|
|
@@ -81,7 +81,6 @@
|
|
|
81
81
|
},
|
|
82
82
|
"sideEffects": false,
|
|
83
83
|
"publishConfig": {
|
|
84
|
-
"registry": "https://registry.npmjs.org/",
|
|
85
84
|
"access": "public"
|
|
86
85
|
},
|
|
87
86
|
"scripts": {
|
|
File without changes
|