webstudio 0.202.0 → 0.204.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/README.md +1 -7
- package/lib/cli.js +23 -83
- package/package.json +18 -20
- package/templates/defaults/package.json +8 -8
- package/templates/react-router/package.json +34 -0
- package/templates/react-router-docker/package.json +4 -32
- package/templates/{netlify-edge-functions → react-router-netlify}/app/constants.mjs +1 -1
- package/templates/react-router-netlify/netlify.toml +6 -0
- package/templates/react-router-netlify/package.json +10 -0
- package/templates/react-router-netlify/vite.config.ts +7 -0
- package/templates/ssg/package.json +7 -7
- package/templates/netlify-edge-functions/app/entry.server.tsx +0 -21
- package/templates/netlify-edge-functions/netlify.toml +0 -16
- package/templates/netlify-edge-functions/package.json +0 -9
- package/templates/netlify-edge-functions/vite.config.ts +0 -18
- package/templates/netlify-functions/app/constants.mjs +0 -29
- package/templates/netlify-functions/app/entry.server.tsx +0 -1
- package/templates/netlify-functions/netlify.toml +0 -16
- package/templates/netlify-functions/package.json +0 -9
- package/templates/netlify-functions/vite.config.ts +0 -18
- /package/templates/{react-router-docker → react-router}/app/extension.ts +0 -0
- /package/templates/{react-router-docker → react-router}/app/root.tsx +0 -0
- /package/templates/{react-router-docker → react-router}/app/route-templates/default-sitemap.tsx +0 -0
- /package/templates/{react-router-docker → react-router}/app/route-templates/html.tsx +0 -0
- /package/templates/{react-router-docker → react-router}/app/route-templates/redirect.tsx +0 -0
- /package/templates/{react-router-docker → react-router}/app/route-templates/xml.tsx +0 -0
- /package/templates/{react-router-docker → react-router}/app/routes/[robots.txt].tsx +0 -0
- /package/templates/{react-router-docker → react-router}/app/routes.ts +0 -0
- /package/templates/{react-router-docker → react-router}/public/favicon.ico +0 -0
- /package/templates/{react-router-docker → react-router}/tsconfig.json +0 -0
- /package/templates/{react-router-docker → react-router}/vite.config.ts +0 -0
package/README.md
CHANGED
|
@@ -129,13 +129,7 @@ You can configure the project to support netlify serverless/edge-functions respe
|
|
|
129
129
|
You can manually change it using the `build` command. For serverless functions:
|
|
130
130
|
|
|
131
131
|
```bash
|
|
132
|
-
webstudio build --template netlify
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
and for edge functions:
|
|
136
|
-
|
|
137
|
-
```bash
|
|
138
|
-
webstudio build --template netlify-edge-functions
|
|
132
|
+
webstudio build --template netlify
|
|
139
133
|
```
|
|
140
134
|
|
|
141
135
|
## Important Notes
|
package/lib/cli.js
CHANGED
|
@@ -28,7 +28,6 @@ import { kebabCase, camelCase } from "change-case";
|
|
|
28
28
|
import "nanoid";
|
|
29
29
|
import { parseExpressionAt } from "acorn";
|
|
30
30
|
import { simple } from "acorn-walk";
|
|
31
|
-
import warnOnce from "warn-once";
|
|
32
31
|
import reservedIdentifiers from "reserved-identifiers";
|
|
33
32
|
import hash from "@emotion/hash";
|
|
34
33
|
import { x } from "tinyexec";
|
|
@@ -80,7 +79,7 @@ const PROJECT_TEMPLATES = [
|
|
|
80
79
|
{
|
|
81
80
|
value: "docker",
|
|
82
81
|
label: "Docker",
|
|
83
|
-
expand: ["react-router-docker"]
|
|
82
|
+
expand: ["react-router", "react-router-docker"]
|
|
84
83
|
},
|
|
85
84
|
{
|
|
86
85
|
value: "vercel",
|
|
@@ -88,14 +87,9 @@ const PROJECT_TEMPLATES = [
|
|
|
88
87
|
expand: ["defaults", "vercel"]
|
|
89
88
|
},
|
|
90
89
|
{
|
|
91
|
-
value: "netlify
|
|
92
|
-
label: "Netlify
|
|
93
|
-
expand: ["
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
value: "netlify-edge-functions",
|
|
97
|
-
label: "Netlify Edge Functions",
|
|
98
|
-
expand: ["defaults", "netlify-edge-functions"]
|
|
90
|
+
value: "netlify",
|
|
91
|
+
label: "Netlify",
|
|
92
|
+
expand: ["react-router", "react-router-netlify"]
|
|
99
93
|
},
|
|
100
94
|
{
|
|
101
95
|
value: "ssg",
|
|
@@ -742,19 +736,13 @@ const prefixStyles = (styleMap) => {
|
|
|
742
736
|
if (property === "backdrop-filter") {
|
|
743
737
|
newStyleMap.set("-webkit-backdrop-filter", value);
|
|
744
738
|
}
|
|
739
|
+
if (property === "view-timeline-name" || property === "scroll-timeline-name") {
|
|
740
|
+
newStyleMap.set(`--${property}`, value);
|
|
741
|
+
}
|
|
745
742
|
newStyleMap.set(property, value);
|
|
746
743
|
}
|
|
747
744
|
return newStyleMap;
|
|
748
745
|
};
|
|
749
|
-
const captureError = (error, value) => {
|
|
750
|
-
if (process.env.NODE_ENV === "development") {
|
|
751
|
-
throw error;
|
|
752
|
-
}
|
|
753
|
-
setTimeout(() => {
|
|
754
|
-
throw error;
|
|
755
|
-
});
|
|
756
|
-
return value;
|
|
757
|
-
};
|
|
758
746
|
const fallbackTransform = (styleValue) => {
|
|
759
747
|
var _a;
|
|
760
748
|
if (styleValue.type !== "fontFamily") {
|
|
@@ -846,7 +834,7 @@ const toValue = (styleValue, transformValue) => {
|
|
|
846
834
|
if (value.type === "guaranteedInvalid") {
|
|
847
835
|
return "";
|
|
848
836
|
}
|
|
849
|
-
return
|
|
837
|
+
return "";
|
|
850
838
|
};
|
|
851
839
|
const Unit = z.string();
|
|
852
840
|
const UnitValue = z.object({
|
|
@@ -3447,7 +3435,7 @@ ${prop.name}={${propValue}}`;
|
|
|
3447
3435
|
return "";
|
|
3448
3436
|
}
|
|
3449
3437
|
const indexVariable = scope.getName(`${instance.id}-index`, "index");
|
|
3450
|
-
generatedElement += `{${collectionDataValue}?.map((${collectionItemValue}: any, ${indexVariable}: number) =>
|
|
3438
|
+
generatedElement += `{${collectionDataValue}?.map?.((${collectionItemValue}: any, ${indexVariable}: number) =>
|
|
3451
3439
|
`;
|
|
3452
3440
|
generatedElement += `<Fragment key={${indexVariable}}>
|
|
3453
3441
|
`;
|
|
@@ -3645,47 +3633,6 @@ const generateWebstudioComponent = ({
|
|
|
3645
3633
|
`;
|
|
3646
3634
|
return generatedComponent;
|
|
3647
3635
|
};
|
|
3648
|
-
const imageSizes = [16, 32, 48, 64, 96, 128, 256, 384];
|
|
3649
|
-
const deviceSizes = [640, 750, 828, 1080, 1200, 1920, 2048, 3840];
|
|
3650
|
-
const allSizes = [...imageSizes, ...deviceSizes];
|
|
3651
|
-
const NON_EXISTING_DOMAIN = "https://a3cbcbec-cdb1-4ea4-ad60-43c795308ddc.ddc";
|
|
3652
|
-
const joinPath = (...segments) => {
|
|
3653
|
-
return segments.filter((segment) => segment !== "").map((segment) => segment.replace(/(^\/+|\/+$)/g, "")).join("/");
|
|
3654
|
-
};
|
|
3655
|
-
const encodePathFragment = (fragment) => {
|
|
3656
|
-
return encodeURIComponent(fragment).replace(/%2F/g, "/");
|
|
3657
|
-
};
|
|
3658
|
-
const wsImageLoader = (props2) => {
|
|
3659
|
-
const width = props2.format === "raw" ? 16 : props2.width;
|
|
3660
|
-
const quality = props2.format === "raw" ? 100 : props2.quality;
|
|
3661
|
-
if (process.env.NODE_ENV !== "production") {
|
|
3662
|
-
warnOnce(
|
|
3663
|
-
allSizes.includes(width) === false,
|
|
3664
|
-
"Width must be only from allowed values"
|
|
3665
|
-
);
|
|
3666
|
-
}
|
|
3667
|
-
let src = props2.src;
|
|
3668
|
-
if (src.startsWith("/cgi/asset")) {
|
|
3669
|
-
src = src.slice("/cgi/asset".length);
|
|
3670
|
-
}
|
|
3671
|
-
const resultUrl = new URL("/cgi/image/", NON_EXISTING_DOMAIN);
|
|
3672
|
-
if (props2.format !== "raw") {
|
|
3673
|
-
resultUrl.searchParams.set("width", width.toString());
|
|
3674
|
-
resultUrl.searchParams.set("quality", quality.toString());
|
|
3675
|
-
if (props2.height != null) {
|
|
3676
|
-
resultUrl.searchParams.set("height", props2.height.toString());
|
|
3677
|
-
}
|
|
3678
|
-
if (props2.fit != null) {
|
|
3679
|
-
resultUrl.searchParams.set("fit", props2.fit);
|
|
3680
|
-
}
|
|
3681
|
-
}
|
|
3682
|
-
resultUrl.searchParams.set("format", props2.format ?? "auto");
|
|
3683
|
-
resultUrl.pathname = joinPath(resultUrl.pathname, encodePathFragment(src));
|
|
3684
|
-
if (resultUrl.href.startsWith(NON_EXISTING_DOMAIN)) {
|
|
3685
|
-
return `${resultUrl.pathname}?${resultUrl.searchParams.toString()}`;
|
|
3686
|
-
}
|
|
3687
|
-
return resultUrl.href;
|
|
3688
|
-
};
|
|
3689
3636
|
const BOOLEAN_ATTRIBUTES = /* @__PURE__ */ new Set([
|
|
3690
3637
|
"async",
|
|
3691
3638
|
"autofocus",
|
|
@@ -4648,7 +4595,7 @@ const meta$4 = {
|
|
|
4648
4595
|
const meta$3 = {
|
|
4649
4596
|
category: "hidden",
|
|
4650
4597
|
icon: ResourceIcon,
|
|
4651
|
-
type: "
|
|
4598
|
+
type: "embed",
|
|
4652
4599
|
constraints: {
|
|
4653
4600
|
relation: "parent",
|
|
4654
4601
|
component: { $eq: "HeadSlot" }
|
|
@@ -4657,7 +4604,7 @@ const meta$3 = {
|
|
|
4657
4604
|
const meta$2 = {
|
|
4658
4605
|
category: "hidden",
|
|
4659
4606
|
icon: WindowInfoIcon,
|
|
4660
|
-
type: "
|
|
4607
|
+
type: "embed",
|
|
4661
4608
|
constraints: {
|
|
4662
4609
|
relation: "parent",
|
|
4663
4610
|
component: { $eq: "HeadSlot" }
|
|
@@ -5918,7 +5865,7 @@ Please check webstudio --help for more details`
|
|
|
5918
5865
|
let framework;
|
|
5919
5866
|
if (options.template.includes("ssg")) {
|
|
5920
5867
|
framework = await createFramework();
|
|
5921
|
-
} else if (options.template.includes("react-router
|
|
5868
|
+
} else if (options.template.includes("react-router")) {
|
|
5922
5869
|
framework = await createFramework$1();
|
|
5923
5870
|
} else {
|
|
5924
5871
|
framework = await createFramework$2();
|
|
@@ -6034,14 +5981,10 @@ Please check webstudio --help for more details`
|
|
|
6034
5981
|
const assetOrigin = siteData.origin;
|
|
6035
5982
|
for (const asset of siteData.assets) {
|
|
6036
5983
|
if (asset.type === "image") {
|
|
6037
|
-
const imagePath = wsImageLoader({
|
|
6038
|
-
src: asset.name,
|
|
6039
|
-
format: "raw"
|
|
6040
|
-
});
|
|
6041
5984
|
assetsToDownload.push(
|
|
6042
5985
|
limit(
|
|
6043
5986
|
() => downloadAsset(
|
|
6044
|
-
`${assetOrigin}
|
|
5987
|
+
`${assetOrigin}/cgi/image/${asset.name}?format=raw`,
|
|
6045
5988
|
asset.name,
|
|
6046
5989
|
assetBaseUrl
|
|
6047
5990
|
)
|
|
@@ -6458,8 +6401,7 @@ const getDeploymentInstructions = (deployTarget) => {
|
|
|
6458
6401
|
switch (deployTarget) {
|
|
6459
6402
|
case "vercel":
|
|
6460
6403
|
return `Run ${pc.dim("npx vercel")} to publish on Vercel.`;
|
|
6461
|
-
case "netlify
|
|
6462
|
-
case "netlify-edge-functions":
|
|
6404
|
+
case "netlify":
|
|
6463
6405
|
return [
|
|
6464
6406
|
`To deploy to Netlify, run the following commands: `,
|
|
6465
6407
|
`Run ${pc.dim("npx netlify-cli login")} to login to Netlify.`,
|
|
@@ -6472,7 +6414,7 @@ const getDeploymentInstructions = (deployTarget) => {
|
|
|
6472
6414
|
}
|
|
6473
6415
|
};
|
|
6474
6416
|
const name = "webstudio";
|
|
6475
|
-
const version = "0.
|
|
6417
|
+
const version = "0.204.0";
|
|
6476
6418
|
const description = "Webstudio CLI";
|
|
6477
6419
|
const author = "Webstudio <github@webstudio.is>";
|
|
6478
6420
|
const homepage = "https://webstudio.is";
|
|
@@ -6503,7 +6445,7 @@ const engines = {
|
|
|
6503
6445
|
node: ">=20.12"
|
|
6504
6446
|
};
|
|
6505
6447
|
const dependencies = {
|
|
6506
|
-
"@clack/prompts": "^0.
|
|
6448
|
+
"@clack/prompts": "^0.10.0",
|
|
6507
6449
|
"@emotion/hash": "^0.9.2",
|
|
6508
6450
|
acorn: "^8.14.0",
|
|
6509
6451
|
"acorn-walk": "^8.3.4",
|
|
@@ -6514,18 +6456,15 @@ const dependencies = {
|
|
|
6514
6456
|
"p-limit": "^6.2.0",
|
|
6515
6457
|
parse5: "7.2.1",
|
|
6516
6458
|
picocolors: "^1.1.1",
|
|
6517
|
-
react: "18.3.0-canary-14898b6a9-20240318",
|
|
6518
6459
|
"reserved-identifiers": "^1.0.0",
|
|
6519
6460
|
tinyexec: "^0.3.2",
|
|
6520
|
-
"warn-once": "^0.1.1",
|
|
6521
6461
|
yargs: "^17.7.2",
|
|
6522
6462
|
zod: "^3.22.4"
|
|
6523
6463
|
};
|
|
6524
6464
|
const devDependencies = {
|
|
6525
|
-
"@netlify/
|
|
6526
|
-
"@
|
|
6527
|
-
"@react-router/
|
|
6528
|
-
"@react-router/fs-routes": "^7.1.3",
|
|
6465
|
+
"@netlify/vite-plugin-react-router": "^1.0.0",
|
|
6466
|
+
"@react-router/dev": "^7.1.5",
|
|
6467
|
+
"@react-router/fs-routes": "^7.1.5",
|
|
6529
6468
|
"@remix-run/cloudflare": "^2.15.2",
|
|
6530
6469
|
"@remix-run/cloudflare-pages": "^2.15.2",
|
|
6531
6470
|
"@remix-run/dev": "^2.15.2",
|
|
@@ -6549,12 +6488,13 @@ const devDependencies = {
|
|
|
6549
6488
|
h3: "^1.14.0",
|
|
6550
6489
|
ipx: "^3.0.1",
|
|
6551
6490
|
prettier: "3.4.2",
|
|
6491
|
+
react: "18.3.0-canary-14898b6a9-20240318",
|
|
6552
6492
|
"react-dom": "18.3.0-canary-14898b6a9-20240318",
|
|
6553
|
-
"react-router": "^7.1.
|
|
6493
|
+
"react-router": "^7.1.5",
|
|
6554
6494
|
"ts-expect": "^1.3.0",
|
|
6555
|
-
vike: "^0.4.
|
|
6495
|
+
vike: "^0.4.220",
|
|
6556
6496
|
vite: "^5.4.11",
|
|
6557
|
-
vitest: "^3.0.
|
|
6497
|
+
vitest: "^3.0.4",
|
|
6558
6498
|
wrangler: "^3.63.2"
|
|
6559
6499
|
};
|
|
6560
6500
|
const packageJson = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "webstudio",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.204.0",
|
|
4
4
|
"description": "Webstudio CLI",
|
|
5
5
|
"author": "Webstudio <github@webstudio.is>",
|
|
6
6
|
"homepage": "https://webstudio.is",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"node": ">=20.12"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@clack/prompts": "^0.
|
|
29
|
+
"@clack/prompts": "^0.10.0",
|
|
30
30
|
"@emotion/hash": "^0.9.2",
|
|
31
31
|
"acorn": "^8.14.0",
|
|
32
32
|
"acorn-walk": "^8.3.4",
|
|
@@ -37,18 +37,15 @@
|
|
|
37
37
|
"p-limit": "^6.2.0",
|
|
38
38
|
"parse5": "7.2.1",
|
|
39
39
|
"picocolors": "^1.1.1",
|
|
40
|
-
"react": "18.3.0-canary-14898b6a9-20240318",
|
|
41
40
|
"reserved-identifiers": "^1.0.0",
|
|
42
41
|
"tinyexec": "^0.3.2",
|
|
43
|
-
"warn-once": "^0.1.1",
|
|
44
42
|
"yargs": "^17.7.2",
|
|
45
43
|
"zod": "^3.22.4"
|
|
46
44
|
},
|
|
47
45
|
"devDependencies": {
|
|
48
|
-
"@netlify/
|
|
49
|
-
"@
|
|
50
|
-
"@react-router/
|
|
51
|
-
"@react-router/fs-routes": "^7.1.3",
|
|
46
|
+
"@netlify/vite-plugin-react-router": "^1.0.0",
|
|
47
|
+
"@react-router/dev": "^7.1.5",
|
|
48
|
+
"@react-router/fs-routes": "^7.1.5",
|
|
52
49
|
"@remix-run/cloudflare": "^2.15.2",
|
|
53
50
|
"@remix-run/cloudflare-pages": "^2.15.2",
|
|
54
51
|
"@remix-run/dev": "^2.15.2",
|
|
@@ -62,22 +59,23 @@
|
|
|
62
59
|
"h3": "^1.14.0",
|
|
63
60
|
"ipx": "^3.0.1",
|
|
64
61
|
"prettier": "3.4.2",
|
|
62
|
+
"react": "18.3.0-canary-14898b6a9-20240318",
|
|
65
63
|
"react-dom": "18.3.0-canary-14898b6a9-20240318",
|
|
66
|
-
"react-router": "^7.1.
|
|
64
|
+
"react-router": "^7.1.5",
|
|
67
65
|
"ts-expect": "^1.3.0",
|
|
68
|
-
"vike": "^0.4.
|
|
66
|
+
"vike": "^0.4.220",
|
|
69
67
|
"vite": "^5.4.11",
|
|
70
|
-
"vitest": "^3.0.
|
|
68
|
+
"vitest": "^3.0.4",
|
|
71
69
|
"wrangler": "^3.63.2",
|
|
72
|
-
"@webstudio-is/http-client": "0.
|
|
73
|
-
"@webstudio-is/image": "0.
|
|
74
|
-
"@webstudio-is/react-sdk": "0.
|
|
75
|
-
"@webstudio-is/sdk": "0.
|
|
76
|
-
"@webstudio-is/sdk-components-animation": "0.
|
|
77
|
-
"@webstudio-is/sdk-components-react
|
|
78
|
-
"@webstudio-is/sdk-components-react": "0.
|
|
79
|
-
"@webstudio-is/sdk-components-react-
|
|
80
|
-
"@webstudio-is/sdk-components-react-
|
|
70
|
+
"@webstudio-is/http-client": "0.204.0",
|
|
71
|
+
"@webstudio-is/image": "0.204.0",
|
|
72
|
+
"@webstudio-is/react-sdk": "0.204.0",
|
|
73
|
+
"@webstudio-is/sdk": "0.204.0",
|
|
74
|
+
"@webstudio-is/sdk-components-animation": "0.204.0",
|
|
75
|
+
"@webstudio-is/sdk-components-react": "0.204.0",
|
|
76
|
+
"@webstudio-is/sdk-components-react-radix": "0.204.0",
|
|
77
|
+
"@webstudio-is/sdk-components-react-router": "0.204.0",
|
|
78
|
+
"@webstudio-is/sdk-components-react-remix": "0.204.0",
|
|
81
79
|
"@webstudio-is/tsconfig": "1.0.7"
|
|
82
80
|
},
|
|
83
81
|
"scripts": {
|
|
@@ -11,14 +11,14 @@
|
|
|
11
11
|
"@remix-run/node": "2.15.2",
|
|
12
12
|
"@remix-run/react": "2.15.2",
|
|
13
13
|
"@remix-run/server-runtime": "2.15.2",
|
|
14
|
-
"@webstudio-is/image": "0.
|
|
15
|
-
"@webstudio-is/react-sdk": "0.
|
|
16
|
-
"@webstudio-is/sdk": "0.
|
|
17
|
-
"@webstudio-is/sdk-components-react": "0.
|
|
18
|
-
"@webstudio-is/sdk-components-animation": "0.
|
|
19
|
-
"@webstudio-is/sdk-components-react-radix": "0.
|
|
20
|
-
"@webstudio-is/sdk-components-react-remix": "0.
|
|
21
|
-
"isbot": "^5.1.
|
|
14
|
+
"@webstudio-is/image": "0.204.0",
|
|
15
|
+
"@webstudio-is/react-sdk": "0.204.0",
|
|
16
|
+
"@webstudio-is/sdk": "0.204.0",
|
|
17
|
+
"@webstudio-is/sdk-components-react": "0.204.0",
|
|
18
|
+
"@webstudio-is/sdk-components-animation": "0.204.0",
|
|
19
|
+
"@webstudio-is/sdk-components-react-radix": "0.204.0",
|
|
20
|
+
"@webstudio-is/sdk-components-react-remix": "0.204.0",
|
|
21
|
+
"isbot": "^5.1.22",
|
|
22
22
|
"react": "18.3.0-canary-14898b6a9-20240318",
|
|
23
23
|
"react-dom": "18.3.0-canary-14898b6a9-20240318"
|
|
24
24
|
},
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "module",
|
|
3
|
+
"private": true,
|
|
4
|
+
"sideEffects": false,
|
|
5
|
+
"scripts": {
|
|
6
|
+
"build": "react-router build",
|
|
7
|
+
"dev": "react-router dev",
|
|
8
|
+
"typecheck": "tsc"
|
|
9
|
+
},
|
|
10
|
+
"dependencies": {
|
|
11
|
+
"@react-router/dev": "^7.1.5",
|
|
12
|
+
"@react-router/fs-routes": "^7.1.5",
|
|
13
|
+
"@webstudio-is/image": "0.204.0",
|
|
14
|
+
"@webstudio-is/react-sdk": "0.204.0",
|
|
15
|
+
"@webstudio-is/sdk": "0.204.0",
|
|
16
|
+
"@webstudio-is/sdk-components-animation": "0.204.0",
|
|
17
|
+
"@webstudio-is/sdk-components-react-radix": "0.204.0",
|
|
18
|
+
"@webstudio-is/sdk-components-react-router": "0.204.0",
|
|
19
|
+
"@webstudio-is/sdk-components-react": "0.204.0",
|
|
20
|
+
"isbot": "^5.1.22",
|
|
21
|
+
"react": "18.3.0-canary-14898b6a9-20240318",
|
|
22
|
+
"react-dom": "18.3.0-canary-14898b6a9-20240318",
|
|
23
|
+
"react-router": "^7.1.5",
|
|
24
|
+
"vite": "^5.4.11"
|
|
25
|
+
},
|
|
26
|
+
"devDependencies": {
|
|
27
|
+
"@types/react": "^18.2.70",
|
|
28
|
+
"@types/react-dom": "^18.2.25",
|
|
29
|
+
"typescript": "5.7.3"
|
|
30
|
+
},
|
|
31
|
+
"engines": {
|
|
32
|
+
"node": ">=20.0.0"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -1,39 +1,11 @@
|
|
|
1
1
|
{
|
|
2
|
-
"type": "module",
|
|
3
|
-
"private": true,
|
|
4
|
-
"sideEffects": false,
|
|
5
2
|
"scripts": {
|
|
6
|
-
"
|
|
7
|
-
"dev": "react-router dev",
|
|
8
|
-
"start": "react-router-serve ./build/server/index.js",
|
|
9
|
-
"typecheck": "tsc"
|
|
3
|
+
"start": "react-router-serve ./build/server/index.js"
|
|
10
4
|
},
|
|
11
5
|
"dependencies": {
|
|
12
|
-
"@react-router/
|
|
13
|
-
"@react-router/
|
|
14
|
-
"@react-router/node": "^7.1.3",
|
|
15
|
-
"@react-router/serve": "^7.1.3",
|
|
16
|
-
"@webstudio-is/image": "0.202.0",
|
|
17
|
-
"@webstudio-is/react-sdk": "0.202.0",
|
|
18
|
-
"@webstudio-is/sdk": "0.202.0",
|
|
19
|
-
"@webstudio-is/sdk-components-animation": "0.202.0",
|
|
20
|
-
"@webstudio-is/sdk-components-react-radix": "0.202.0",
|
|
21
|
-
"@webstudio-is/sdk-components-react-router": "0.202.0",
|
|
22
|
-
"@webstudio-is/sdk-components-react": "0.202.0",
|
|
6
|
+
"@react-router/node": "^7.1.5",
|
|
7
|
+
"@react-router/serve": "^7.1.5",
|
|
23
8
|
"h3": "^1.14.0",
|
|
24
|
-
"ipx": "^3.0.1"
|
|
25
|
-
"isbot": "^5.1.21",
|
|
26
|
-
"react": "18.3.0-canary-14898b6a9-20240318",
|
|
27
|
-
"react-dom": "18.3.0-canary-14898b6a9-20240318",
|
|
28
|
-
"react-router": "^7.1.3",
|
|
29
|
-
"vite": "^5.4.11"
|
|
30
|
-
},
|
|
31
|
-
"devDependencies": {
|
|
32
|
-
"@types/react": "^18.2.70",
|
|
33
|
-
"@types/react-dom": "^18.2.25",
|
|
34
|
-
"typescript": "5.7.3"
|
|
35
|
-
},
|
|
36
|
-
"engines": {
|
|
37
|
-
"node": ">=20.0.0"
|
|
9
|
+
"ipx": "^3.0.1"
|
|
38
10
|
}
|
|
39
11
|
}
|
|
@@ -8,15 +8,15 @@
|
|
|
8
8
|
"typecheck": "tsc"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@webstudio-is/image": "0.
|
|
12
|
-
"@webstudio-is/react-sdk": "0.
|
|
13
|
-
"@webstudio-is/sdk": "0.
|
|
14
|
-
"@webstudio-is/sdk-components-react": "0.
|
|
15
|
-
"@webstudio-is/sdk-components-animation": "0.
|
|
16
|
-
"@webstudio-is/sdk-components-react-radix": "0.
|
|
11
|
+
"@webstudio-is/image": "0.204.0",
|
|
12
|
+
"@webstudio-is/react-sdk": "0.204.0",
|
|
13
|
+
"@webstudio-is/sdk": "0.204.0",
|
|
14
|
+
"@webstudio-is/sdk-components-react": "0.204.0",
|
|
15
|
+
"@webstudio-is/sdk-components-animation": "0.204.0",
|
|
16
|
+
"@webstudio-is/sdk-components-react-radix": "0.204.0",
|
|
17
17
|
"react": "18.3.0-canary-14898b6a9-20240318",
|
|
18
18
|
"react-dom": "18.3.0-canary-14898b6a9-20240318",
|
|
19
|
-
"vike": "^0.4.
|
|
19
|
+
"vike": "^0.4.220"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"@types/react": "^18.2.70",
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { EntryContext } from "@remix-run/node";
|
|
2
|
-
import { RemixServer } from "@remix-run/react";
|
|
3
|
-
import { renderToString } from "react-dom/server";
|
|
4
|
-
|
|
5
|
-
export default function handleRequest(
|
|
6
|
-
request: Request,
|
|
7
|
-
responseStatusCode: number,
|
|
8
|
-
responseHeaders: Headers,
|
|
9
|
-
remixContext: EntryContext
|
|
10
|
-
) {
|
|
11
|
-
const markup = renderToString(
|
|
12
|
-
<RemixServer context={remixContext} url={request.url} />
|
|
13
|
-
);
|
|
14
|
-
|
|
15
|
-
responseHeaders.set("Content-Type", "text/html");
|
|
16
|
-
|
|
17
|
-
return new Response("<!DOCTYPE html>" + markup, {
|
|
18
|
-
headers: responseHeaders,
|
|
19
|
-
status: responseStatusCode,
|
|
20
|
-
});
|
|
21
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
[build]
|
|
2
|
-
command = "npm run build"
|
|
3
|
-
publish = "build/client"
|
|
4
|
-
|
|
5
|
-
[dev]
|
|
6
|
-
command = "npm run dev"
|
|
7
|
-
framework = "vite"
|
|
8
|
-
|
|
9
|
-
# Set immutable caching for static files, because they have fingerprinted filenames
|
|
10
|
-
|
|
11
|
-
[[headers]]
|
|
12
|
-
for = "/build/*"
|
|
13
|
-
|
|
14
|
-
[headers.values]
|
|
15
|
-
|
|
16
|
-
"Cache-Control" = "public, max-age=31560000, immutable"
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { vitePlugin as remix } from "@remix-run/dev";
|
|
2
|
-
import { defineConfig } from "vite";
|
|
3
|
-
import { netlifyPlugin } from "@netlify/remix-edge-adapter/plugin";
|
|
4
|
-
|
|
5
|
-
export default defineConfig({
|
|
6
|
-
plugins: [
|
|
7
|
-
remix({
|
|
8
|
-
future: {
|
|
9
|
-
v3_lazyRouteDiscovery: false,
|
|
10
|
-
v3_relativeSplatPath: false,
|
|
11
|
-
v3_singleFetch: false,
|
|
12
|
-
v3_fetcherPersist: false,
|
|
13
|
-
v3_throwAbortReason: false,
|
|
14
|
-
},
|
|
15
|
-
}),
|
|
16
|
-
netlifyPlugin(),
|
|
17
|
-
],
|
|
18
|
-
});
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* We use mjs extension as constants in this file is shared with the build script
|
|
3
|
-
* and we use `node --eval` to extract the constants.
|
|
4
|
-
*/
|
|
5
|
-
export const assetBaseUrl = "/assets/";
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* @type {import("@webstudio-is/image").ImageLoader}
|
|
9
|
-
*/
|
|
10
|
-
export const imageLoader = (props) => {
|
|
11
|
-
if (process.env.NODE_ENV !== "production") {
|
|
12
|
-
return props.src;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
if (props.format === "raw") {
|
|
16
|
-
return props.src;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
// https://docs.netlify.com/image-cdn/overview/
|
|
20
|
-
const searchParams = new URLSearchParams();
|
|
21
|
-
searchParams.set("url", props.src);
|
|
22
|
-
searchParams.set("w", props.width.toString());
|
|
23
|
-
if (props.height) {
|
|
24
|
-
searchParams.set("h", props.height.toString());
|
|
25
|
-
}
|
|
26
|
-
searchParams.set("q", props.quality.toString());
|
|
27
|
-
// fit=contain by default
|
|
28
|
-
return `/.netlify/images?${searchParams}`;
|
|
29
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { handleRequest as default } from "@netlify/remix-adapter";
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
[build]
|
|
2
|
-
command = "npm run build"
|
|
3
|
-
publish = "build/client"
|
|
4
|
-
|
|
5
|
-
[dev]
|
|
6
|
-
command = "npm run dev"
|
|
7
|
-
framework = "vite"
|
|
8
|
-
|
|
9
|
-
# Set immutable caching for static files, because they have fingerprinted filenames
|
|
10
|
-
|
|
11
|
-
[[headers]]
|
|
12
|
-
for = "/build/*"
|
|
13
|
-
|
|
14
|
-
[headers.values]
|
|
15
|
-
|
|
16
|
-
"Cache-Control" = "public, max-age=31560000, immutable"
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { vitePlugin as remix } from "@remix-run/dev";
|
|
2
|
-
import { defineConfig } from "vite";
|
|
3
|
-
import { netlifyPlugin } from "@netlify/remix-adapter/plugin";
|
|
4
|
-
|
|
5
|
-
export default defineConfig({
|
|
6
|
-
plugins: [
|
|
7
|
-
remix({
|
|
8
|
-
future: {
|
|
9
|
-
v3_lazyRouteDiscovery: false,
|
|
10
|
-
v3_relativeSplatPath: false,
|
|
11
|
-
v3_singleFetch: false,
|
|
12
|
-
v3_fetcherPersist: false,
|
|
13
|
-
v3_throwAbortReason: false,
|
|
14
|
-
},
|
|
15
|
-
}),
|
|
16
|
-
netlifyPlugin(),
|
|
17
|
-
],
|
|
18
|
-
});
|
|
File without changes
|
|
File without changes
|
/package/templates/{react-router-docker → react-router}/app/route-templates/default-sitemap.tsx
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|