@solidjs/web 2.0.0-rc.7 → 2.0.0-rc.8
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/server.dev.js +15 -2
- package/dist/server.js +15 -2
- package/dist/web.dev.js +41 -9
- package/dist/web.js +39 -8
- package/dist/{web.cjs → web.observe.js} +137 -239
- package/frames/dist/server.dev.js +19 -0
- package/frames/dist/server.js +19 -0
- package/frames/package.json +6 -24
- package/package.json +81 -314
- package/serialization/decode/package.json +3 -9
- package/serialization/package.json +3 -9
- package/serialization/types/serializer-decode.d.ts +49 -2
- package/server-functions/dist/server.dev.js +28 -10
- package/server-functions/dist/server.js +28 -10
- package/server-functions/package.json +6 -24
- package/server-functions/rich-args/package.json +3 -9
- package/storage/package.json +3 -9
- package/types/client.d.ts +17 -0
- package/types/frames/serializer-decode.d.ts +49 -2
- package/types/serializer-decode.d.ts +49 -2
- package/types/server-functions/server.d.ts +27 -4
- package/types/server.d.ts +1 -1
- package/dist/server.cjs +0 -3708
- package/dist/server.dev.cjs +0 -3794
- package/dist/web.dev.cjs +0 -2285
- package/frames/dist/client.cjs +0 -2043
- package/frames/dist/client.dev.cjs +0 -2063
- package/frames/dist/server.cjs +0 -4542
- package/frames/dist/server.dev.cjs +0 -4584
- package/serialization/dist/decode.cjs +0 -155
- package/serialization/dist/serialization.cjs +0 -275
- package/serialization/types-cjs/index.d.cts +0 -101
- package/serialization/types-cjs/package.json +0 -3
- package/serialization/types-cjs/serializer-decode.d.cts +0 -172
- package/serialization/types-cjs/serializer.d.cts +0 -101
- package/server-functions/dist/client.cjs +0 -1069
- package/server-functions/dist/rich-args.cjs +0 -11
- package/server-functions/dist/server.cjs +0 -2381
- package/server-functions/dist/server.dev.cjs +0 -2409
- package/storage/dist/storage.cjs +0 -12
- package/storage/types-cjs/index.d.cts +0 -28
- package/storage/types-cjs/package.json +0 -3
- package/types-cjs/client.d.cts +0 -197
- package/types-cjs/constants.d.cts +0 -20
- package/types-cjs/cookies.d.cts +0 -41
- package/types-cjs/frames/client.d.cts +0 -36
- package/types-cjs/frames/frame-client.d.cts +0 -370
- package/types-cjs/frames/frame-container-plugin.d.cts +0 -71
- package/types-cjs/frames/frame-sink.d.cts +0 -92
- package/types-cjs/frames/frame-transport.d.cts +0 -189
- package/types-cjs/frames/serializer-decode.d.cts +0 -172
- package/types-cjs/frames/serializer.d.cts +0 -101
- package/types-cjs/frames/server.d.cts +0 -52
- package/types-cjs/head.d.cts +0 -19
- package/types-cjs/index.d.cts +0 -191
- package/types-cjs/index.server.d.cts +0 -147
- package/types-cjs/jsx-properties.d.cts +0 -93
- package/types-cjs/jsx.d.cts +0 -4146
- package/types-cjs/package.json +0 -3
- package/types-cjs/reconcile.d.cts +0 -1
- package/types-cjs/render.d.cts +0 -6
- package/types-cjs/response.d.cts +0 -81
- package/types-cjs/serializer-decode.d.cts +0 -172
- package/types-cjs/serializer.d.cts +0 -101
- package/types-cjs/server-functions/client.d.cts +0 -184
- package/types-cjs/server-functions/flash.d.cts +0 -36
- package/types-cjs/server-functions/registry.d.cts +0 -100
- package/types-cjs/server-functions/rich-args.d.cts +0 -1
- package/types-cjs/server-functions/server.d.cts +0 -546
- package/types-cjs/server-functions/shared.d.cts +0 -283
- package/types-cjs/server-mock.d.cts +0 -337
- package/types-cjs/server.d.cts +0 -408
|
@@ -2543,10 +2543,13 @@ function escape(s, attr) {
|
|
|
2543
2543
|
if (!attr && Array.isArray(s)) {
|
|
2544
2544
|
const joined = tryJoinPlainSSRArray(s);
|
|
2545
2545
|
if (joined !== undefined) return joined;
|
|
2546
|
+
const src = s;
|
|
2546
2547
|
s = s.slice();
|
|
2547
2548
|
for (let i = 0; i < s.length; i++) s[i] = escape(s[i]);
|
|
2549
|
+
if (src.$slot) s.$slot = true;
|
|
2548
2550
|
return s;
|
|
2549
2551
|
}
|
|
2552
|
+
if (!attr && t === "function") return escapeLate(s);
|
|
2550
2553
|
if (attr) {
|
|
2551
2554
|
if (s == null || t === "boolean" || t === "number") return s;
|
|
2552
2555
|
return escape(String(s), attr);
|
|
@@ -2557,6 +2560,15 @@ function escape(s, attr) {
|
|
|
2557
2560
|
if (i < 0) return s;
|
|
2558
2561
|
return escapeSlow(s, attr, i);
|
|
2559
2562
|
}
|
|
2563
|
+
function escapeLate(fn) {
|
|
2564
|
+
if (fn.$esc) return fn;
|
|
2565
|
+
const w = () => escape(fn());
|
|
2566
|
+
w.$esc = true;
|
|
2567
|
+
if (fn.$lhSkip) w.$lhSkip = true;
|
|
2568
|
+
if (fn.$lhSuppress) w.$lhSuppress = true;
|
|
2569
|
+
if (fn.$lhBinding) w.$lhBinding = fn.$lhBinding;
|
|
2570
|
+
return w;
|
|
2571
|
+
}
|
|
2560
2572
|
const ESCAPE_CONTENT = /[&<]/;
|
|
2561
2573
|
const ESCAPE_ATTR = /[&"<]/;
|
|
2562
2574
|
function escapeSlow(s, attr, start) {
|
|
@@ -3079,6 +3091,13 @@ function bindDeferredBody(value, scope) {
|
|
|
3079
3091
|
}
|
|
3080
3092
|
return value;
|
|
3081
3093
|
}
|
|
3094
|
+
function processState(key, create) {
|
|
3095
|
+
const slot = Symbol.for(key);
|
|
3096
|
+
return globalThis[slot] || (globalThis[slot] = create());
|
|
3097
|
+
}
|
|
3098
|
+
processState("solid.ServerFunctionRegistrations", () => new Map());
|
|
3099
|
+
processState("solid.ServerFunctionMethods", () => new Map());
|
|
3100
|
+
processState("solid.ServerFunctionReferenceBindings", () => new WeakMap());
|
|
3082
3101
|
const INVOCATIONS = new WeakMap();
|
|
3083
3102
|
function getEventServerFunctionInvocation(event) {
|
|
3084
3103
|
return event && INVOCATIONS.get(event);
|
package/frames/dist/server.js
CHANGED
|
@@ -2500,10 +2500,13 @@ function escape(s, attr) {
|
|
|
2500
2500
|
if (!attr && Array.isArray(s)) {
|
|
2501
2501
|
const joined = tryJoinPlainSSRArray(s);
|
|
2502
2502
|
if (joined !== undefined) return joined;
|
|
2503
|
+
const src = s;
|
|
2503
2504
|
s = s.slice();
|
|
2504
2505
|
for (let i = 0; i < s.length; i++) s[i] = escape(s[i]);
|
|
2506
|
+
if (src.$slot) s.$slot = true;
|
|
2505
2507
|
return s;
|
|
2506
2508
|
}
|
|
2509
|
+
if (!attr && t === "function") return escapeLate(s);
|
|
2507
2510
|
if (attr) {
|
|
2508
2511
|
if (s == null || t === "boolean" || t === "number") return s;
|
|
2509
2512
|
return escape(String(s), attr);
|
|
@@ -2514,6 +2517,15 @@ function escape(s, attr) {
|
|
|
2514
2517
|
if (i < 0) return s;
|
|
2515
2518
|
return escapeSlow(s, attr, i);
|
|
2516
2519
|
}
|
|
2520
|
+
function escapeLate(fn) {
|
|
2521
|
+
if (fn.$esc) return fn;
|
|
2522
|
+
const w = () => escape(fn());
|
|
2523
|
+
w.$esc = true;
|
|
2524
|
+
if (fn.$lhSkip) w.$lhSkip = true;
|
|
2525
|
+
if (fn.$lhSuppress) w.$lhSuppress = true;
|
|
2526
|
+
if (fn.$lhBinding) w.$lhBinding = fn.$lhBinding;
|
|
2527
|
+
return w;
|
|
2528
|
+
}
|
|
2517
2529
|
const ESCAPE_CONTENT = /[&<]/;
|
|
2518
2530
|
const ESCAPE_ATTR = /[&"<]/;
|
|
2519
2531
|
function escapeSlow(s, attr, start) {
|
|
@@ -3035,6 +3047,13 @@ function bindDeferredBody(value, scope) {
|
|
|
3035
3047
|
}
|
|
3036
3048
|
return value;
|
|
3037
3049
|
}
|
|
3050
|
+
function processState(key, create) {
|
|
3051
|
+
const slot = Symbol.for(key);
|
|
3052
|
+
return globalThis[slot] || (globalThis[slot] = create());
|
|
3053
|
+
}
|
|
3054
|
+
processState("solid.ServerFunctionRegistrations", () => new Map());
|
|
3055
|
+
processState("solid.ServerFunctionMethods", () => new Map());
|
|
3056
|
+
processState("solid.ServerFunctionReferenceBindings", () => new WeakMap());
|
|
3038
3057
|
const INVOCATIONS = new WeakMap();
|
|
3039
3058
|
function getEventServerFunctionInvocation(event) {
|
|
3040
3059
|
return event && INVOCATIONS.get(event);
|
package/frames/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@solidjs/web/frames",
|
|
3
|
-
"main": "./dist/server.
|
|
3
|
+
"main": "./dist/server.js",
|
|
4
4
|
"module": "./dist/server.js",
|
|
5
5
|
"types": "../types/frames/server.d.ts",
|
|
6
6
|
"type": "module",
|
|
@@ -8,33 +8,15 @@
|
|
|
8
8
|
"exports": {
|
|
9
9
|
".": {
|
|
10
10
|
"browser": {
|
|
11
|
-
"
|
|
12
|
-
|
|
13
|
-
"default": "./dist/client.js"
|
|
14
|
-
},
|
|
15
|
-
"require": {
|
|
16
|
-
"types": "../types-cjs/frames/client.d.cts",
|
|
17
|
-
"default": "./dist/client.cjs"
|
|
18
|
-
}
|
|
11
|
+
"types": "../types/frames/client.d.ts",
|
|
12
|
+
"default": "./dist/client.js"
|
|
19
13
|
},
|
|
20
14
|
"development": {
|
|
21
|
-
"import": {
|
|
22
|
-
"types": "../types/frames/server.d.ts",
|
|
23
|
-
"default": "./dist/server.dev.js"
|
|
24
|
-
},
|
|
25
|
-
"require": {
|
|
26
|
-
"types": "../types-cjs/frames/server.d.cts",
|
|
27
|
-
"default": "./dist/server.dev.cjs"
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
"import": {
|
|
31
15
|
"types": "../types/frames/server.d.ts",
|
|
32
|
-
"default": "./dist/server.js"
|
|
16
|
+
"default": "./dist/server.dev.js"
|
|
33
17
|
},
|
|
34
|
-
"
|
|
35
|
-
|
|
36
|
-
"default": "./dist/server.cjs"
|
|
37
|
-
}
|
|
18
|
+
"types": "../types/frames/server.d.ts",
|
|
19
|
+
"default": "./dist/server.js"
|
|
38
20
|
}
|
|
39
21
|
}
|
|
40
22
|
}
|