webstudio 0.213.0 → 0.214.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
@@ -2445,7 +2445,7 @@ var Json = z.object({
2445
2445
  type: z.literal("json"),
2446
2446
  defaultValue: z.unknown().optional()
2447
2447
  });
2448
- var Date = z.object({
2448
+ var Date$1 = z.object({
2449
2449
  ...common,
2450
2450
  control: z.literal("date"),
2451
2451
  // @todo not sure what type should be here
@@ -2490,7 +2490,7 @@ var PropMeta = z.union([
2490
2490
  File,
2491
2491
  Url,
2492
2492
  Json,
2493
- Date,
2493
+ Date$1,
2494
2494
  Action,
2495
2495
  TextContent,
2496
2496
  AnimationAction
@@ -2639,8 +2639,7 @@ z.object({
2639
2639
  // container - can accept other components with dnd or be edited as text
2640
2640
  // control - usually form controls like inputs, without children
2641
2641
  // embed - images, videos or other embeddable components, without children
2642
- // rich-text-child - formatted text fragment, not listed in components list
2643
- type: z.enum(["container", "control", "embed", "rich-text-child"]),
2642
+ type: z.enum(["container", "control", "embed"]),
2644
2643
  /**
2645
2644
  * a property used as textual placeholder when no content specified while in builder
2646
2645
  * also signals to not insert components inside unless dropped explicitly
@@ -4667,7 +4666,7 @@ const e$5 = {
4667
4666
  icon: SlotComponentIcon,
4668
4667
  order: 5
4669
4668
  };
4670
- const o$4 = {
4669
+ const o$5 = {
4671
4670
  type: "container",
4672
4671
  icon: ""
4673
4672
  };
@@ -4681,7 +4680,7 @@ const e$4 = {
4681
4680
  type: "boolean"
4682
4681
  }
4683
4682
  };
4684
- const r$c = {
4683
+ const r$b = {
4685
4684
  category: "general",
4686
4685
  type: "container",
4687
4686
  label: "HTML Embed",
@@ -4726,7 +4725,7 @@ const r$c = {
4726
4725
  },
4727
4726
  initialProps: ["className", "clientOnly", "executeScriptOnCanvas"]
4728
4727
  });
4729
- const a$e = {
4728
+ const a$b = {
4730
4729
  type: "container",
4731
4730
  icon: MarkdownEmbedIcon,
4732
4731
  contentModel: {
@@ -4784,9 +4783,9 @@ var h3 = div;
4784
4783
  var h4 = div;
4785
4784
  var h5 = div;
4786
4785
  var h6 = div;
4787
- var i$1 = div;
4786
+ var i$2 = div;
4788
4787
  var img = div;
4789
- var a$d = div;
4788
+ var a$a = div;
4790
4789
  var li = div;
4791
4790
  var ul = div;
4792
4791
  var ol = div;
@@ -5101,7 +5100,7 @@ var button = [
5101
5100
  { property: "text-transform", value: { type: "keyword", value: "none" } }
5102
5101
  ];
5103
5102
  var select = button;
5104
- const a$c = {
5103
+ const a$9 = {
5105
5104
  body: [
5106
5105
  ...body,
5107
5106
  {
@@ -5113,11 +5112,11 @@ const a$c = {
5113
5112
  value: { type: "keyword", value: "grayscale" }
5114
5113
  }
5115
5114
  ]
5116
- }, n$6 = {
5115
+ }, n$7 = {
5117
5116
  type: "container",
5118
5117
  icon: BodyIcon,
5119
5118
  states: defaultStates,
5120
- presetStyle: a$c
5119
+ presetStyle: a$9
5121
5120
  };
5122
5121
  const v$2 = {
5123
5122
  category: "general",
@@ -5169,26 +5168,26 @@ const d$6 = {
5169
5168
  };
5170
5169
  const p$8 = {
5171
5170
  p: p$9
5172
- }, n$5 = {
5171
+ }, n$6 = {
5173
5172
  type: "container",
5174
5173
  placeholder: "Paragraph",
5175
5174
  icon: TextAlignLeftIcon,
5176
5175
  states: defaultStates,
5177
5176
  presetStyle: p$8
5178
5177
  };
5179
- const a$b = {
5178
+ const a$8 = {
5180
5179
  a: [
5181
- ...a$d,
5180
+ ...a$a,
5182
5181
  {
5183
5182
  property: "display",
5184
5183
  value: { type: "keyword", value: "inline-block" }
5185
5184
  }
5186
5185
  ]
5187
- }, n$4 = {
5186
+ }, n$5 = {
5188
5187
  type: "container",
5189
5188
  placeholder: "Link",
5190
5189
  icon: LinkIcon,
5191
- presetStyle: a$b,
5190
+ presetStyle: a$8,
5192
5191
  states: [
5193
5192
  ...defaultStates,
5194
5193
  {
@@ -5202,14 +5201,14 @@ const a$b = {
5202
5201
  }
5203
5202
  ]
5204
5203
  };
5205
- const a$a = {
5206
- ...n$4,
5207
- type: "rich-text-child"
5204
+ const o$4 = {
5205
+ ...n$5,
5206
+ type: "container"
5208
5207
  };
5209
5208
  const s$5 = {
5210
5209
  span
5211
- }, c$6 = {
5212
- type: "rich-text-child",
5210
+ }, n$4 = {
5211
+ type: "container",
5213
5212
  label: "Text",
5214
5213
  icon: PaintBrushIcon,
5215
5214
  states: defaultStates,
@@ -5218,31 +5217,31 @@ const s$5 = {
5218
5217
  const p$7 = {
5219
5218
  b: b$8
5220
5219
  }, l$6 = {
5221
- type: "rich-text-child",
5220
+ type: "container",
5222
5221
  label: "Bold Text",
5223
5222
  icon: BoldIcon,
5224
5223
  states: defaultStates,
5225
5224
  presetStyle: p$7
5226
5225
  };
5227
- const r$b = {
5226
+ const i$1 = {
5228
5227
  i: [
5229
- ...i$1,
5228
+ ...i$2,
5230
5229
  {
5231
5230
  property: "font-style",
5232
5231
  value: { type: "keyword", value: "italic" }
5233
5232
  }
5234
5233
  ]
5235
- }, c$5 = {
5236
- type: "rich-text-child",
5234
+ }, c$7 = {
5235
+ type: "container",
5237
5236
  label: "Italic Text",
5238
5237
  icon: TextItalicIcon,
5239
5238
  states: defaultStates,
5240
- presetStyle: r$b
5239
+ presetStyle: i$1
5241
5240
  };
5242
5241
  const e$3 = {
5243
5242
  sup
5244
- }, a$9 = {
5245
- type: "rich-text-child",
5243
+ }, c$6 = {
5244
+ type: "container",
5246
5245
  label: "Superscript Text",
5247
5246
  icon: SuperscriptIcon,
5248
5247
  states: defaultStates,
@@ -5250,8 +5249,8 @@ const e$3 = {
5250
5249
  };
5251
5250
  const e$2 = {
5252
5251
  sub
5253
- }, a$8 = {
5254
- type: "rich-text-child",
5252
+ }, c$5 = {
5253
+ type: "container",
5255
5254
  label: "Subscript Text",
5256
5255
  icon: SubscriptIcon,
5257
5256
  states: defaultStates,
@@ -5821,39 +5820,39 @@ const r$4 = {
5821
5820
  const baseComponentMetas = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5822
5821
  __proto__: null,
5823
5822
  Blockquote: i,
5824
- Body: n$6,
5823
+ Body: n$7,
5825
5824
  Bold: l$6,
5826
5825
  Box: v$2,
5827
5826
  Button: p$6,
5828
5827
  Checkbox: d$3,
5829
5828
  CodeText: d$4,
5830
5829
  Form: c$3,
5831
- Fragment: o$4,
5830
+ Fragment: o$5,
5832
5831
  HeadLink: p$2,
5833
5832
  HeadMeta: p$1,
5834
5833
  HeadSlot: r$5,
5835
5834
  HeadTitle: c,
5836
5835
  Heading: d$6,
5837
- HtmlEmbed: r$c,
5836
+ HtmlEmbed: r$b,
5838
5837
  Image: l$4,
5839
5838
  Input: c$4,
5840
- Italic: c$5,
5839
+ Italic: c$7,
5841
5840
  Label: m$3,
5842
- Link: n$4,
5841
+ Link: n$5,
5843
5842
  List: d$5,
5844
5843
  ListItem: a$5,
5845
- MarkdownEmbed: a$e,
5844
+ MarkdownEmbed: a$b,
5846
5845
  Option: r$6,
5847
- Paragraph: n$5,
5846
+ Paragraph: n$6,
5848
5847
  RadioButton: s$3,
5849
5848
  RemixForm: n$3,
5850
- RichTextLink: a$a,
5849
+ RichTextLink: o$4,
5851
5850
  Select: c$1,
5852
5851
  Separator: n$2,
5853
5852
  Slot: e$5,
5854
- Span: c$6,
5855
- Subscript: a$8,
5856
- Superscript: a$9,
5853
+ Span: n$4,
5854
+ Subscript: c$5,
5855
+ Superscript: c$6,
5857
5856
  Text: s$6,
5858
5857
  Textarea: c$2,
5859
5858
  Time: s,
@@ -5939,11 +5938,11 @@ const animationComponentMetas = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Ob
5939
5938
  }, Symbol.toStringTag, { value: "Module" }));
5940
5939
  const remixComponentMetas = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5941
5940
  __proto__: null,
5942
- Body: n$6,
5941
+ Body: n$7,
5943
5942
  Form: c$3,
5944
- Link: n$4,
5943
+ Link: n$5,
5945
5944
  RemixForm: n$3,
5946
- RichTextLink: a$a
5945
+ RichTextLink: o$4
5947
5946
  }, Symbol.toStringTag, { value: "Module" }));
5948
5947
  const r = (t2) => new Proxy(
5949
5948
  {},
@@ -6817,11 +6816,11 @@ const createFramework$2 = async () => {
6817
6816
  };
6818
6817
  const reactRouterComponentMetas = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6819
6818
  __proto__: null,
6820
- Body: n$6,
6819
+ Body: n$7,
6821
6820
  Form: c$3,
6822
- Link: n$4,
6821
+ Link: n$5,
6823
6822
  RemixForm: n$3,
6824
- RichTextLink: a$a
6823
+ RichTextLink: o$4
6825
6824
  }, Symbol.toStringTag, { value: "Module" }));
6826
6825
  const createFramework$1 = async () => {
6827
6826
  const routeTemplatesDir = join("app", "route-templates");
@@ -7359,6 +7358,10 @@ Please check webstudio --help for more details`
7359
7358
  import { useResource, useVariableState } from "@webstudio-is/react-sdk/runtime";
7360
7359
  ${componentImports}
7361
7360
 
7361
+ export const projectId = "${siteData.build.projectId}";
7362
+
7363
+ export const lastPublished = "${new Date(siteData.build.createdAt).toISOString()}";
7364
+
7362
7365
  export const siteName = ${JSON.stringify(projectMeta == null ? void 0 : projectMeta.siteName)};
7363
7366
 
7364
7367
  export const breakpoints = ${JSON.stringify(breakpoints)};
@@ -7422,8 +7425,6 @@ Please check webstudio --help for more details`
7422
7425
 
7423
7426
  ${generateRemixParams(page.path)}
7424
7427
 
7425
- export const projectId = "${siteData.build.projectId}";
7426
-
7427
7428
  export const contactEmail = ${JSON.stringify(contactEmail)};
7428
7429
  `;
7429
7430
  const generatedBasename = generateRemixRoute(pagePath);
@@ -7641,7 +7642,7 @@ const getDeploymentInstructions = (deployTarget) => {
7641
7642
  }
7642
7643
  };
7643
7644
  const name = "webstudio";
7644
- const version = "0.213.0";
7645
+ const version = "0.214.0";
7645
7646
  const description = "Webstudio CLI";
7646
7647
  const author = "Webstudio <github@webstudio.is>";
7647
7648
  const homepage = "https://webstudio.is";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "webstudio",
3
- "version": "0.213.0",
3
+ "version": "0.214.0",
4
4
  "description": "Webstudio CLI",
5
5
  "author": "Webstudio <github@webstudio.is>",
6
6
  "homepage": "https://webstudio.is",
@@ -68,17 +68,17 @@
68
68
  "vite": "^5.4.11",
69
69
  "vitest": "^3.0.8",
70
70
  "wrangler": "^3.63.2",
71
- "@webstudio-is/css-engine": "0.213.0",
72
- "@webstudio-is/http-client": "0.213.0",
73
- "@webstudio-is/image": "0.213.0",
74
- "@webstudio-is/react-sdk": "0.213.0",
75
- "@webstudio-is/sdk-components-animation": "0.213.0",
76
- "@webstudio-is/sdk-components-react": "0.213.0",
77
- "@webstudio-is/sdk-components-react-radix": "0.213.0",
78
- "@webstudio-is/sdk-components-react-remix": "0.213.0",
79
- "@webstudio-is/sdk-components-react-router": "0.213.0",
71
+ "@webstudio-is/http-client": "0.214.0",
72
+ "@webstudio-is/image": "0.214.0",
73
+ "@webstudio-is/react-sdk": "0.214.0",
74
+ "@webstudio-is/sdk": "0.214.0",
75
+ "@webstudio-is/sdk-components-animation": "0.214.0",
76
+ "@webstudio-is/sdk-components-react": "0.214.0",
77
+ "@webstudio-is/sdk-components-react-radix": "0.214.0",
78
+ "@webstudio-is/sdk-components-react-remix": "0.214.0",
79
+ "@webstudio-is/sdk-components-react-router": "0.214.0",
80
80
  "@webstudio-is/tsconfig": "1.0.7",
81
- "@webstudio-is/sdk": "0.213.0"
81
+ "@webstudio-is/css-engine": "0.214.0"
82
82
  },
83
83
  "scripts": {
84
84
  "typecheck": "tsc",
@@ -3,7 +3,7 @@
3
3
  import { Links, Meta, Outlet, useMatches } from "@remix-run/react";
4
4
  // @todo think about how to make __generated__ typeable
5
5
  // @ts-ignore
6
- import { CustomCode } from "./__generated__/_index";
6
+ import { CustomCode, projectId, lastPublished } from "./__generated__/_index";
7
7
 
8
8
  const Root = () => {
9
9
  // Get language from matches
@@ -19,7 +19,11 @@ const Root = () => {
19
19
  const lang = lastMatchWithLanguage?.data?.pageMeta?.language ?? "en";
20
20
 
21
21
  return (
22
- <html lang={lang}>
22
+ <html
23
+ lang={lang}
24
+ data-ws-project={projectId}
25
+ data-ws-last-published={lastPublished}
26
+ >
23
27
  <head>
24
28
  <meta charSet="utf-8" />
25
29
  <meta name="viewport" content="width=device-width,initial-scale=1" />
@@ -23,6 +23,7 @@ import {
23
23
  PageSettingsCanonicalLink,
24
24
  } from "@webstudio-is/react-sdk/runtime";
25
25
  import {
26
+ projectId,
26
27
  Page,
27
28
  siteName,
28
29
  favIconAsset,
@@ -34,7 +35,6 @@ import {
34
35
  getResources,
35
36
  getPageMeta,
36
37
  getRemixParams,
37
- projectId,
38
38
  contactEmail,
39
39
  } from "__SERVER__";
40
40
  import { assetBaseUrl, imageLoader } from "__CONSTANTS__";
@@ -11,13 +11,13 @@
11
11
  "@remix-run/node": "2.16.4",
12
12
  "@remix-run/react": "2.16.4",
13
13
  "@remix-run/server-runtime": "2.16.4",
14
- "@webstudio-is/image": "0.213.0",
15
- "@webstudio-is/react-sdk": "0.213.0",
16
- "@webstudio-is/sdk": "0.213.0",
17
- "@webstudio-is/sdk-components-react": "0.213.0",
18
- "@webstudio-is/sdk-components-animation": "0.213.0",
19
- "@webstudio-is/sdk-components-react-radix": "0.213.0",
20
- "@webstudio-is/sdk-components-react-remix": "0.213.0",
14
+ "@webstudio-is/image": "0.214.0",
15
+ "@webstudio-is/react-sdk": "0.214.0",
16
+ "@webstudio-is/sdk": "0.214.0",
17
+ "@webstudio-is/sdk-components-react": "0.214.0",
18
+ "@webstudio-is/sdk-components-animation": "0.214.0",
19
+ "@webstudio-is/sdk-components-react-radix": "0.214.0",
20
+ "@webstudio-is/sdk-components-react-remix": "0.214.0",
21
21
  "isbot": "^5.1.25",
22
22
  "react": "18.3.0-canary-14898b6a9-20240318",
23
23
  "react-dom": "18.3.0-canary-14898b6a9-20240318"
@@ -3,7 +3,7 @@
3
3
  import { Links, Meta, Outlet, useMatches } from "react-router";
4
4
  // @todo think about how to make __generated__ typeable
5
5
  // @ts-ignore
6
- import { CustomCode } from "./__generated__/_index";
6
+ import { CustomCode, projectId, lastPublished } from "./__generated__/_index";
7
7
 
8
8
  const Root = () => {
9
9
  // Get language from matches
@@ -19,7 +19,11 @@ const Root = () => {
19
19
  const lang = lastMatchWithLanguage?.data?.pageMeta?.language ?? "en";
20
20
 
21
21
  return (
22
- <html lang={lang}>
22
+ <html
23
+ lang={lang}
24
+ data-ws-project={projectId}
25
+ data-ws-last-published={lastPublished}
26
+ >
23
27
  <head>
24
28
  <meta charSet="utf-8" />
25
29
  <meta name="viewport" content="width=device-width,initial-scale=1" />
@@ -22,6 +22,7 @@ import {
22
22
  PageSettingsTitle,
23
23
  } from "@webstudio-is/react-sdk/runtime";
24
24
  import {
25
+ projectId,
25
26
  Page,
26
27
  siteName,
27
28
  favIconAsset,
@@ -33,7 +34,6 @@ import {
33
34
  getResources,
34
35
  getPageMeta,
35
36
  getRemixParams,
36
- projectId,
37
37
  contactEmail,
38
38
  } from "__SERVER__";
39
39
  import { assetBaseUrl, imageLoader } from "__CONSTANTS__";
@@ -10,13 +10,13 @@
10
10
  "dependencies": {
11
11
  "@react-router/dev": "^7.5.0",
12
12
  "@react-router/fs-routes": "^7.5.0",
13
- "@webstudio-is/image": "0.213.0",
14
- "@webstudio-is/react-sdk": "0.213.0",
15
- "@webstudio-is/sdk": "0.213.0",
16
- "@webstudio-is/sdk-components-animation": "0.213.0",
17
- "@webstudio-is/sdk-components-react-radix": "0.213.0",
18
- "@webstudio-is/sdk-components-react-router": "0.213.0",
19
- "@webstudio-is/sdk-components-react": "0.213.0",
13
+ "@webstudio-is/image": "0.214.0",
14
+ "@webstudio-is/react-sdk": "0.214.0",
15
+ "@webstudio-is/sdk": "0.214.0",
16
+ "@webstudio-is/sdk-components-animation": "0.214.0",
17
+ "@webstudio-is/sdk-components-react-radix": "0.214.0",
18
+ "@webstudio-is/sdk-components-react-router": "0.214.0",
19
+ "@webstudio-is/sdk-components-react": "0.214.0",
20
20
  "isbot": "^5.1.25",
21
21
  "react": "18.3.0-canary-14898b6a9-20240318",
22
22
  "react-dom": "18.3.0-canary-14898b6a9-20240318",
@@ -8,12 +8,12 @@
8
8
  "typecheck": "tsc"
9
9
  },
10
10
  "dependencies": {
11
- "@webstudio-is/image": "0.213.0",
12
- "@webstudio-is/react-sdk": "0.213.0",
13
- "@webstudio-is/sdk": "0.213.0",
14
- "@webstudio-is/sdk-components-react": "0.213.0",
15
- "@webstudio-is/sdk-components-animation": "0.213.0",
16
- "@webstudio-is/sdk-components-react-radix": "0.213.0",
11
+ "@webstudio-is/image": "0.214.0",
12
+ "@webstudio-is/react-sdk": "0.214.0",
13
+ "@webstudio-is/sdk": "0.214.0",
14
+ "@webstudio-is/sdk-components-react": "0.214.0",
15
+ "@webstudio-is/sdk-components-animation": "0.214.0",
16
+ "@webstudio-is/sdk-components-react-radix": "0.214.0",
17
17
  "react": "18.3.0-canary-14898b6a9-20240318",
18
18
  "react-dom": "18.3.0-canary-14898b6a9-20240318",
19
19
  "vike": "^0.4.228"
@@ -1,10 +1,14 @@
1
1
  import { renderToString } from "react-dom/server";
2
2
  import { dangerouslySkipEscape, escapeInject } from "vike/server";
3
3
  import type { OnRenderHtmlSync } from "vike/types";
4
- // @todo think about how to make __generated__ typeable
5
- /* eslint-disable-next-line @typescript-eslint/ban-ts-comment */
6
- // @ts-ignore
7
- import { CustomCode } from "../app/__generated__/_index";
4
+ import {
5
+ CustomCode,
6
+ projectId,
7
+ lastPublished,
8
+ // @todo think about how to make __generated__ typeable
9
+ /* eslint-disable-next-line @typescript-eslint/ban-ts-comment */
10
+ // @ts-ignore
11
+ } from "../app/__generated__/_index";
8
12
 
9
13
  export const onRenderHtml: OnRenderHtmlSync = (pageContext) => {
10
14
  const lang = pageContext.data.pageMeta.language || "en";
@@ -12,7 +16,11 @@ export const onRenderHtml: OnRenderHtmlSync = (pageContext) => {
12
16
  const Page = pageContext.Page ?? (() => <></>);
13
17
  const html = dangerouslySkipEscape(
14
18
  renderToString(
15
- <html lang={lang}>
19
+ <html
20
+ lang={lang}
21
+ data-ws-project={projectId}
22
+ data-ws-last-published={lastPublished}
23
+ >
16
24
  <head>
17
25
  <meta charSet="UTF-8" />
18
26
  <meta name="viewport" content="width=device-width,initial-scale=1" />