webstudio 0.140.0 → 0.142.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/lib/cli.js CHANGED
@@ -581,6 +581,8 @@ var prebuild = async (options) => {
581
581
  "createPageMeta",
582
582
  "PageData",
583
583
  "Asset",
584
+ "ProjectMeta",
585
+ "System",
584
586
  "fontAssets",
585
587
  "pageData",
586
588
  "user",
@@ -631,25 +633,17 @@ var prebuild = async (options) => {
631
633
  const dataSources = new Map(pageData.build.dataSources);
632
634
  const resources = new Map(pageData.build.resources);
633
635
  const utilsExport = generateUtilsExport({ props });
634
- const pathParamsDataSourceId = pageData.page.pathParamsDataSourceId ?? "pathParamsDataSourceId";
635
- if (pageData.page.pathParamsDataSourceId === void 0) {
636
- dataSources.set(pathParamsDataSourceId, {
637
- id: pathParamsDataSourceId,
638
- name: "Path Params",
639
- type: "parameter"
640
- });
641
- }
642
636
  const pageComponent = generateWebstudioComponent({
643
637
  scope,
644
638
  name: "Page",
645
639
  rootInstanceId,
646
640
  parameters: [
647
641
  {
648
- id: `params`,
642
+ id: `system`,
649
643
  instanceId: "",
650
- name: "params",
644
+ name: "system",
651
645
  type: "parameter",
652
- value: pathParamsDataSourceId
646
+ value: pageData.page.systemDataSourceId ?? ""
653
647
  }
654
648
  ],
655
649
  instances,
@@ -666,7 +660,7 @@ var prebuild = async (options) => {
666
660
  /* This is a auto generated file for building the project */
667
661
 
668
662
  import { Fragment, useState } from "react";
669
- import type { Asset, FontAsset, ImageAsset, ProjectMeta } from "@webstudio-is/sdk";
663
+ import type { Asset, FontAsset, ImageAsset, ProjectMeta, System } from "@webstudio-is/sdk";
670
664
  import { useResource } from "@webstudio-is/react-sdk";
671
665
  import type { PageMeta } from "@webstudio-is/react-sdk";
672
666
  ${componentImports}
@@ -924,7 +918,7 @@ import makeCLI from "yargs";
924
918
  // package.json
925
919
  var package_default = {
926
920
  name: "webstudio",
927
- version: "0.140.0",
921
+ version: "0.142.0",
928
922
  description: "Webstudio CLI",
929
923
  author: "Webstudio <github@webstudio.is>",
930
924
  homepage: "https://webstudio.is",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "webstudio",
3
- "version": "0.140.0",
3
+ "version": "0.142.0",
4
4
  "description": "Webstudio CLI",
5
5
  "author": "Webstudio <github@webstudio.is>",
6
6
  "homepage": "https://webstudio.is",
@@ -28,20 +28,20 @@
28
28
  "title-case": "^4.1.0",
29
29
  "yargs": "^17.7.2",
30
30
  "zod": "^3.22.4",
31
- "@webstudio-is/http-client": "0.140.0",
32
- "@webstudio-is/react-sdk": "0.140.0",
33
- "@webstudio-is/sdk-components-react": "0.140.0",
34
- "@webstudio-is/image": "0.140.0",
35
- "@webstudio-is/sdk": "0.140.0",
36
- "@webstudio-is/sdk-components-react-radix": "0.140.0",
37
- "@webstudio-is/sdk-components-react-remix": "0.140.0"
31
+ "@webstudio-is/http-client": "0.142.0",
32
+ "@webstudio-is/react-sdk": "0.142.0",
33
+ "@webstudio-is/sdk": "0.142.0",
34
+ "@webstudio-is/sdk-components-react": "0.142.0",
35
+ "@webstudio-is/image": "0.142.0",
36
+ "@webstudio-is/sdk-components-react-remix": "0.142.0",
37
+ "@webstudio-is/sdk-components-react-radix": "0.142.0"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@types/node": "^18.17.1",
41
41
  "@types/prompts": "^2.4.5",
42
42
  "tsx": "^3.12.8",
43
43
  "typescript": "5.2.2",
44
- "@webstudio-is/form-handlers": "0.140.0",
44
+ "@webstudio-is/form-handlers": "0.142.0",
45
45
  "@webstudio-is/tsconfig": "1.0.7"
46
46
  },
47
47
  "scripts": {
@@ -35,8 +35,12 @@ export type PageData = {
35
35
 
36
36
  export const loader = async (arg: LoaderArgs) => {
37
37
  const params = getRemixParams(arg.params);
38
- const resources = await loadResources({ params });
39
- const pageMeta = getPageMeta({ params, resources });
38
+ const system = {
39
+ params,
40
+ search: {},
41
+ };
42
+ const resources = await loadResources({ system });
43
+ const pageMeta = getPageMeta({ system, resources });
40
44
 
41
45
  if (pageMeta.redirect) {
42
46
  const status =
@@ -63,7 +67,7 @@ export const loader = async (arg: LoaderArgs) => {
63
67
  host,
64
68
  url: url.href,
65
69
  excludeFromSearch: arg.context.EXCLUDE_FROM_SEARCH,
66
- params,
70
+ system,
67
71
  resources,
68
72
  pageMeta,
69
73
  },
@@ -316,7 +320,7 @@ export const action = async ({ request, context }: ActionArgs) => {
316
320
  };
317
321
 
318
322
  const Outlet = () => {
319
- const { params, resources } = useLoaderData<typeof loader>();
323
+ const { system, resources } = useLoaderData<typeof loader>();
320
324
  return (
321
325
  <ReactSdkContext.Provider
322
326
  value={{
@@ -326,7 +330,7 @@ const Outlet = () => {
326
330
  resources,
327
331
  }}
328
332
  >
329
- <Page params={params} />
333
+ <Page system={system} />
330
334
  </ReactSdkContext.Provider>
331
335
  );
332
336
  };
@@ -10,13 +10,13 @@
10
10
  "@remix-run/react": "^1.19.2",
11
11
  "@remix-run/server-runtime": "^1.19.2",
12
12
  "@remix-run/node": "^1.19.2",
13
- "@webstudio-is/react-sdk": "0.140.0",
14
- "@webstudio-is/sdk-components-react-radix": "0.140.0",
15
- "@webstudio-is/sdk-components-react-remix": "0.140.0",
16
- "@webstudio-is/sdk-components-react": "0.140.0",
17
- "@webstudio-is/form-handlers": "0.140.0",
18
- "@webstudio-is/image": "0.140.0",
19
- "@webstudio-is/sdk": "0.140.0",
13
+ "@webstudio-is/react-sdk": "0.142.0",
14
+ "@webstudio-is/sdk-components-react-radix": "0.142.0",
15
+ "@webstudio-is/sdk-components-react-remix": "0.142.0",
16
+ "@webstudio-is/sdk-components-react": "0.142.0",
17
+ "@webstudio-is/form-handlers": "0.142.0",
18
+ "@webstudio-is/image": "0.142.0",
19
+ "@webstudio-is/sdk": "0.142.0",
20
20
  "isbot": "^3.6.8",
21
21
  "react": "^18.2.0",
22
22
  "react-dom": "^18.2.0"