webstudio 0.139.0 → 0.141.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",
@@ -630,29 +632,18 @@ var prebuild = async (options) => {
630
632
  const props = new Map(pageData.build.props);
631
633
  const dataSources = new Map(pageData.build.dataSources);
632
634
  const resources = new Map(pageData.build.resources);
633
- const utilsExport = generateUtilsExport({
634
- pages: siteData.build.pages,
635
- props
636
- });
637
- const pathParamsDataSourceId = pageData.page.pathParamsDataSourceId ?? "pathParamsDataSourceId";
638
- if (pageData.page.pathParamsDataSourceId === void 0) {
639
- dataSources.set(pathParamsDataSourceId, {
640
- id: pathParamsDataSourceId,
641
- name: "Path Params",
642
- type: "parameter"
643
- });
644
- }
635
+ const utilsExport = generateUtilsExport({ props });
645
636
  const pageComponent = generateWebstudioComponent({
646
637
  scope,
647
638
  name: "Page",
648
639
  rootInstanceId,
649
640
  parameters: [
650
641
  {
651
- id: `params`,
642
+ id: `system`,
652
643
  instanceId: "",
653
- name: "params",
644
+ name: "system",
654
645
  type: "parameter",
655
- value: pathParamsDataSourceId
646
+ value: pageData.page.systemDataSourceId ?? ""
656
647
  }
657
648
  ],
658
649
  instances,
@@ -669,7 +660,7 @@ var prebuild = async (options) => {
669
660
  /* This is a auto generated file for building the project */
670
661
 
671
662
  import { Fragment, useState } from "react";
672
- import type { Asset, FontAsset, ImageAsset, ProjectMeta } from "@webstudio-is/sdk";
663
+ import type { Asset, FontAsset, ImageAsset, ProjectMeta, System } from "@webstudio-is/sdk";
673
664
  import { useResource } from "@webstudio-is/react-sdk";
674
665
  import type { PageMeta } from "@webstudio-is/react-sdk";
675
666
  ${componentImports}
@@ -927,7 +918,7 @@ import makeCLI from "yargs";
927
918
  // package.json
928
919
  var package_default = {
929
920
  name: "webstudio",
930
- version: "0.139.0",
921
+ version: "0.141.0",
931
922
  description: "Webstudio CLI",
932
923
  author: "Webstudio <github@webstudio.is>",
933
924
  homepage: "https://webstudio.is",
@@ -968,7 +959,7 @@ var package_default = {
968
959
  "strip-indent": "^4.0.0",
969
960
  "title-case": "^4.1.0",
970
961
  yargs: "^17.7.2",
971
- zod: "^3.21.4"
962
+ zod: "^3.22.4"
972
963
  },
973
964
  devDependencies: {
974
965
  "@types/node": "^18.17.1",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "webstudio",
3
- "version": "0.139.0",
3
+ "version": "0.141.0",
4
4
  "description": "Webstudio CLI",
5
5
  "author": "Webstudio <github@webstudio.is>",
6
6
  "homepage": "https://webstudio.is",
@@ -27,22 +27,22 @@
27
27
  "strip-indent": "^4.0.0",
28
28
  "title-case": "^4.1.0",
29
29
  "yargs": "^17.7.2",
30
- "zod": "^3.21.4",
31
- "@webstudio-is/http-client": "0.139.0",
32
- "@webstudio-is/react-sdk": "0.139.0",
33
- "@webstudio-is/sdk": "0.139.0",
34
- "@webstudio-is/image": "0.139.0",
35
- "@webstudio-is/sdk-components-react-remix": "0.139.0",
36
- "@webstudio-is/sdk-components-react": "0.139.0",
37
- "@webstudio-is/sdk-components-react-radix": "0.139.0"
30
+ "zod": "^3.22.4",
31
+ "@webstudio-is/http-client": "0.141.0",
32
+ "@webstudio-is/react-sdk": "0.141.0",
33
+ "@webstudio-is/sdk-components-react": "0.141.0",
34
+ "@webstudio-is/sdk": "0.141.0",
35
+ "@webstudio-is/sdk-components-react-radix": "0.141.0",
36
+ "@webstudio-is/sdk-components-react-remix": "0.141.0",
37
+ "@webstudio-is/image": "0.141.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.139.0",
45
- "@webstudio-is/tsconfig": "1.0.7"
44
+ "@webstudio-is/tsconfig": "1.0.7",
45
+ "@webstudio-is/form-handlers": "0.141.0"
46
46
  },
47
47
  "scripts": {
48
48
  "typecheck": "tsc",
@@ -17,7 +17,6 @@ import {
17
17
  pageData,
18
18
  user,
19
19
  projectId,
20
- pagesPaths,
21
20
  formsProperties,
22
21
  Page,
23
22
  imageAssets,
@@ -36,8 +35,12 @@ export type PageData = {
36
35
 
37
36
  export const loader = async (arg: LoaderArgs) => {
38
37
  const params = getRemixParams(arg.params);
39
- const resources = await loadResources({ params });
40
- 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 });
41
44
 
42
45
  if (pageMeta.redirect) {
43
46
  const status =
@@ -64,7 +67,7 @@ export const loader = async (arg: LoaderArgs) => {
64
67
  host,
65
68
  url: url.href,
66
69
  excludeFromSearch: arg.context.EXCLUDE_FROM_SEARCH,
67
- params,
70
+ system,
68
71
  resources,
69
72
  pageMeta,
70
73
  },
@@ -317,18 +320,17 @@ export const action = async ({ request, context }: ActionArgs) => {
317
320
  };
318
321
 
319
322
  const Outlet = () => {
320
- const { params, resources } = useLoaderData<typeof loader>();
323
+ const { system, resources } = useLoaderData<typeof loader>();
321
324
  return (
322
325
  <ReactSdkContext.Provider
323
326
  value={{
324
327
  imageLoader,
325
328
  assetBaseUrl,
326
329
  imageBaseUrl,
327
- pagesPaths,
328
330
  resources,
329
331
  }}
330
332
  >
331
- <Page params={params} />
333
+ <Page system={system} />
332
334
  </ReactSdkContext.Provider>
333
335
  );
334
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.139.0",
14
- "@webstudio-is/sdk-components-react-radix": "0.139.0",
15
- "@webstudio-is/sdk-components-react-remix": "0.139.0",
16
- "@webstudio-is/sdk-components-react": "0.139.0",
17
- "@webstudio-is/form-handlers": "0.139.0",
18
- "@webstudio-is/image": "0.139.0",
19
- "@webstudio-is/sdk": "0.139.0",
13
+ "@webstudio-is/react-sdk": "0.141.0",
14
+ "@webstudio-is/sdk-components-react-radix": "0.141.0",
15
+ "@webstudio-is/sdk-components-react-remix": "0.141.0",
16
+ "@webstudio-is/sdk-components-react": "0.141.0",
17
+ "@webstudio-is/form-handlers": "0.141.0",
18
+ "@webstudio-is/image": "0.141.0",
19
+ "@webstudio-is/sdk": "0.141.0",
20
20
  "isbot": "^3.6.8",
21
21
  "react": "^18.2.0",
22
22
  "react-dom": "^18.2.0"