webstudio 0.213.0 → 0.215.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 +171 -153
- package/package.json +11 -11
- package/templates/defaults/app/root.tsx +6 -2
- package/templates/defaults/app/route-templates/html.tsx +1 -1
- package/templates/defaults/package.json +7 -7
- package/templates/react-router/app/root.tsx +6 -2
- package/templates/react-router/app/route-templates/html.tsx +1 -1
- package/templates/react-router/package.json +7 -7
- package/templates/ssg/package.json +6 -6
- package/templates/ssg/renderer/+onRenderHtml.tsx +13 -5
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
|
|
@@ -2627,20 +2627,14 @@ var ContentModel = z.object({
|
|
|
2627
2627
|
* transparent - pass through possible children from parent
|
|
2628
2628
|
* rich-text - can be edited as rich text
|
|
2629
2629
|
* instance - other instances accepted
|
|
2630
|
-
* empty - no children accepted
|
|
2631
2630
|
* ComponentName - accept specific components with none category
|
|
2632
2631
|
*/
|
|
2633
|
-
children: z.array(
|
|
2634
|
-
z.string()
|
|
2635
|
-
)
|
|
2632
|
+
children: z.array(z.string())
|
|
2636
2633
|
});
|
|
2637
2634
|
z.object({
|
|
2638
2635
|
category: z.enum(componentCategories).optional(),
|
|
2639
|
-
// container - can accept other components with dnd or be edited as text
|
|
2640
|
-
|
|
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"]),
|
|
2636
|
+
// container - can accept other components with dnd or be edited as text ..
|
|
2637
|
+
type: z.enum(["container"]).optional(),
|
|
2644
2638
|
/**
|
|
2645
2639
|
* a property used as textual placeholder when no content specified while in builder
|
|
2646
2640
|
* also signals to not insert components inside unless dropped explicitly
|
|
@@ -2679,7 +2673,6 @@ var html = [
|
|
|
2679
2673
|
];
|
|
2680
2674
|
var rootComponent = "ws:root";
|
|
2681
2675
|
var rootMeta = {
|
|
2682
|
-
type: "container",
|
|
2683
2676
|
label: "Global Root",
|
|
2684
2677
|
icon: SettingsIcon,
|
|
2685
2678
|
presetStyle: {
|
|
@@ -2688,24 +2681,25 @@ var rootMeta = {
|
|
|
2688
2681
|
};
|
|
2689
2682
|
var elementComponent = "ws:element";
|
|
2690
2683
|
var elementMeta = {
|
|
2691
|
-
type: "container",
|
|
2692
2684
|
label: "Element",
|
|
2693
2685
|
icon: HtmlElementIcon
|
|
2694
2686
|
};
|
|
2695
2687
|
var collectionComponent = "ws:collection";
|
|
2696
2688
|
var collectionMeta = {
|
|
2697
|
-
type: "container",
|
|
2698
2689
|
label: "Collection",
|
|
2699
|
-
icon: ListViewIcon
|
|
2690
|
+
icon: ListViewIcon,
|
|
2691
|
+
contentModel: {
|
|
2692
|
+
category: "instance",
|
|
2693
|
+
children: ["instance"]
|
|
2694
|
+
}
|
|
2700
2695
|
};
|
|
2701
2696
|
var descendantComponent = "ws:descendant";
|
|
2702
2697
|
var descendantMeta = {
|
|
2703
|
-
type: "control",
|
|
2704
2698
|
label: "Descendant",
|
|
2705
2699
|
icon: PaintBrushIcon,
|
|
2706
2700
|
contentModel: {
|
|
2707
2701
|
category: "none",
|
|
2708
|
-
children: [
|
|
2702
|
+
children: []
|
|
2709
2703
|
},
|
|
2710
2704
|
// @todo infer possible presets
|
|
2711
2705
|
presetStyle: {}
|
|
@@ -2713,7 +2707,6 @@ var descendantMeta = {
|
|
|
2713
2707
|
var blockComponent = "ws:block";
|
|
2714
2708
|
var blockTemplateComponent = "ws:block-template";
|
|
2715
2709
|
var blockTemplateMeta = {
|
|
2716
|
-
type: "container",
|
|
2717
2710
|
icon: AddTemplateInstanceIcon,
|
|
2718
2711
|
contentModel: {
|
|
2719
2712
|
category: "none",
|
|
@@ -2721,7 +2714,6 @@ var blockTemplateMeta = {
|
|
|
2721
2714
|
}
|
|
2722
2715
|
};
|
|
2723
2716
|
var blockMeta = {
|
|
2724
|
-
type: "container",
|
|
2725
2717
|
label: "Content Block",
|
|
2726
2718
|
icon: ContentBlockIcon,
|
|
2727
2719
|
contentModel: {
|
|
@@ -3367,7 +3359,30 @@ var generateCss = ({
|
|
|
3367
3359
|
presetSheet.addMediaRule("presets");
|
|
3368
3360
|
const presetClasses = /* @__PURE__ */ new Map();
|
|
3369
3361
|
const scope = createScope([], normalizeClassName, "-");
|
|
3362
|
+
const tagsByComponent = /* @__PURE__ */ new Map();
|
|
3363
|
+
tagsByComponent.set(rootComponent, /* @__PURE__ */ new Set(["html"]));
|
|
3364
|
+
const tagByInstanceId = /* @__PURE__ */ new Map();
|
|
3365
|
+
for (const prop of props.values()) {
|
|
3366
|
+
if (prop.type === "string" && prop.name === "tag") {
|
|
3367
|
+
tagByInstanceId.set(prop.instanceId, prop.value);
|
|
3368
|
+
}
|
|
3369
|
+
}
|
|
3370
|
+
for (const instance of instances.values()) {
|
|
3371
|
+
const propTag = tagByInstanceId.get(instance.id);
|
|
3372
|
+
const meta = componentMetas.get(instance.component);
|
|
3373
|
+
const metaTag = Object.keys((meta == null ? void 0 : meta.presetStyle) ?? {}).at(0);
|
|
3374
|
+
let componentTags = tagsByComponent.get(instance.component);
|
|
3375
|
+
if (componentTags === void 0) {
|
|
3376
|
+
componentTags = /* @__PURE__ */ new Set();
|
|
3377
|
+
tagsByComponent.set(instance.component, componentTags);
|
|
3378
|
+
}
|
|
3379
|
+
const tag = instance.tag ?? propTag ?? metaTag;
|
|
3380
|
+
if (tag) {
|
|
3381
|
+
componentTags.add(tag);
|
|
3382
|
+
}
|
|
3383
|
+
}
|
|
3370
3384
|
for (const [component, meta] of componentMetas) {
|
|
3385
|
+
const componentTags = tagsByComponent.get(component);
|
|
3371
3386
|
const [_namespace, componentName] = parseComponentName(component);
|
|
3372
3387
|
const className = `w-${scope.getName(component, meta.label ?? componentName)}`;
|
|
3373
3388
|
const presetStyle = Object.entries(meta.presetStyle ?? {});
|
|
@@ -3375,6 +3390,9 @@ var generateCss = ({
|
|
|
3375
3390
|
presetClasses.set(component, className);
|
|
3376
3391
|
}
|
|
3377
3392
|
for (const [tag, styles2] of presetStyle) {
|
|
3393
|
+
if (!(componentTags == null ? void 0 : componentTags.has(tag))) {
|
|
3394
|
+
continue;
|
|
3395
|
+
}
|
|
3378
3396
|
const selector = component === rootComponent ? ":root" : `${tag}.${className}`;
|
|
3379
3397
|
const rule = presetSheet.addNestingRule(selector);
|
|
3380
3398
|
for (const declaration of styles2) {
|
|
@@ -4667,7 +4685,7 @@ const e$5 = {
|
|
|
4667
4685
|
icon: SlotComponentIcon,
|
|
4668
4686
|
order: 5
|
|
4669
4687
|
};
|
|
4670
|
-
const o$
|
|
4688
|
+
const o$5 = {
|
|
4671
4689
|
type: "container",
|
|
4672
4690
|
icon: ""
|
|
4673
4691
|
};
|
|
@@ -4681,7 +4699,7 @@ const e$4 = {
|
|
|
4681
4699
|
type: "boolean"
|
|
4682
4700
|
}
|
|
4683
4701
|
};
|
|
4684
|
-
const r$
|
|
4702
|
+
const r$a = {
|
|
4685
4703
|
category: "general",
|
|
4686
4704
|
type: "container",
|
|
4687
4705
|
label: "HTML Embed",
|
|
@@ -4726,7 +4744,7 @@ const r$c = {
|
|
|
4726
4744
|
},
|
|
4727
4745
|
initialProps: ["className", "clientOnly", "executeScriptOnCanvas"]
|
|
4728
4746
|
});
|
|
4729
|
-
const a$
|
|
4747
|
+
const a$a = {
|
|
4730
4748
|
type: "container",
|
|
4731
4749
|
icon: MarkdownEmbedIcon,
|
|
4732
4750
|
contentModel: {
|
|
@@ -4784,13 +4802,13 @@ var h3 = div;
|
|
|
4784
4802
|
var h4 = div;
|
|
4785
4803
|
var h5 = div;
|
|
4786
4804
|
var h6 = div;
|
|
4787
|
-
var i$
|
|
4805
|
+
var i$3 = div;
|
|
4788
4806
|
var img = div;
|
|
4789
|
-
var a$
|
|
4807
|
+
var a$9 = div;
|
|
4790
4808
|
var li = div;
|
|
4791
4809
|
var ul = div;
|
|
4792
4810
|
var ol = div;
|
|
4793
|
-
var p$
|
|
4811
|
+
var p$c = div;
|
|
4794
4812
|
var span = div;
|
|
4795
4813
|
var body = [
|
|
4796
4814
|
{ property: "margin-top", value: { type: "unit", unit: "number", value: 0 } },
|
|
@@ -5101,7 +5119,7 @@ var button = [
|
|
|
5101
5119
|
{ property: "text-transform", value: { type: "keyword", value: "none" } }
|
|
5102
5120
|
];
|
|
5103
5121
|
var select = button;
|
|
5104
|
-
const a$
|
|
5122
|
+
const a$8 = {
|
|
5105
5123
|
body: [
|
|
5106
5124
|
...body,
|
|
5107
5125
|
{
|
|
@@ -5113,11 +5131,11 @@ const a$c = {
|
|
|
5113
5131
|
value: { type: "keyword", value: "grayscale" }
|
|
5114
5132
|
}
|
|
5115
5133
|
]
|
|
5116
|
-
}, n$
|
|
5134
|
+
}, n$8 = {
|
|
5117
5135
|
type: "container",
|
|
5118
5136
|
icon: BodyIcon,
|
|
5119
5137
|
states: defaultStates,
|
|
5120
|
-
presetStyle: a$
|
|
5138
|
+
presetStyle: a$8
|
|
5121
5139
|
};
|
|
5122
5140
|
const v$2 = {
|
|
5123
5141
|
category: "general",
|
|
@@ -5153,7 +5171,7 @@ const s$6 = {
|
|
|
5153
5171
|
]
|
|
5154
5172
|
}
|
|
5155
5173
|
};
|
|
5156
|
-
const d$
|
|
5174
|
+
const d$5 = {
|
|
5157
5175
|
type: "container",
|
|
5158
5176
|
placeholder: "Heading",
|
|
5159
5177
|
icon: HeadingIcon,
|
|
@@ -5167,28 +5185,28 @@ const d$6 = {
|
|
|
5167
5185
|
h6
|
|
5168
5186
|
}
|
|
5169
5187
|
};
|
|
5170
|
-
const p$
|
|
5171
|
-
p: p$
|
|
5172
|
-
}, n$
|
|
5188
|
+
const p$b = {
|
|
5189
|
+
p: p$c
|
|
5190
|
+
}, n$7 = {
|
|
5173
5191
|
type: "container",
|
|
5174
5192
|
placeholder: "Paragraph",
|
|
5175
5193
|
icon: TextAlignLeftIcon,
|
|
5176
5194
|
states: defaultStates,
|
|
5177
|
-
presetStyle: p$
|
|
5195
|
+
presetStyle: p$b
|
|
5178
5196
|
};
|
|
5179
|
-
const a$
|
|
5197
|
+
const a$7 = {
|
|
5180
5198
|
a: [
|
|
5181
|
-
...a$
|
|
5199
|
+
...a$9,
|
|
5182
5200
|
{
|
|
5183
5201
|
property: "display",
|
|
5184
5202
|
value: { type: "keyword", value: "inline-block" }
|
|
5185
5203
|
}
|
|
5186
5204
|
]
|
|
5187
|
-
}, n$
|
|
5205
|
+
}, n$6 = {
|
|
5188
5206
|
type: "container",
|
|
5189
5207
|
placeholder: "Link",
|
|
5190
5208
|
icon: LinkIcon,
|
|
5191
|
-
presetStyle: a$
|
|
5209
|
+
presetStyle: a$7,
|
|
5192
5210
|
states: [
|
|
5193
5211
|
...defaultStates,
|
|
5194
5212
|
{
|
|
@@ -5202,47 +5220,47 @@ const a$b = {
|
|
|
5202
5220
|
}
|
|
5203
5221
|
]
|
|
5204
5222
|
};
|
|
5205
|
-
const
|
|
5206
|
-
...n$
|
|
5207
|
-
type: "
|
|
5223
|
+
const o$4 = {
|
|
5224
|
+
...n$6,
|
|
5225
|
+
type: "container"
|
|
5208
5226
|
};
|
|
5209
5227
|
const s$5 = {
|
|
5210
5228
|
span
|
|
5211
|
-
},
|
|
5212
|
-
type: "
|
|
5229
|
+
}, n$5 = {
|
|
5230
|
+
type: "container",
|
|
5213
5231
|
label: "Text",
|
|
5214
5232
|
icon: PaintBrushIcon,
|
|
5215
5233
|
states: defaultStates,
|
|
5216
5234
|
presetStyle: s$5
|
|
5217
5235
|
};
|
|
5218
|
-
const p$
|
|
5236
|
+
const p$a = {
|
|
5219
5237
|
b: b$8
|
|
5220
5238
|
}, l$6 = {
|
|
5221
|
-
type: "
|
|
5239
|
+
type: "container",
|
|
5222
5240
|
label: "Bold Text",
|
|
5223
5241
|
icon: BoldIcon,
|
|
5224
5242
|
states: defaultStates,
|
|
5225
|
-
presetStyle: p$
|
|
5243
|
+
presetStyle: p$a
|
|
5226
5244
|
};
|
|
5227
|
-
const
|
|
5245
|
+
const i$2 = {
|
|
5228
5246
|
i: [
|
|
5229
|
-
...i$
|
|
5247
|
+
...i$3,
|
|
5230
5248
|
{
|
|
5231
5249
|
property: "font-style",
|
|
5232
5250
|
value: { type: "keyword", value: "italic" }
|
|
5233
5251
|
}
|
|
5234
5252
|
]
|
|
5235
5253
|
}, c$5 = {
|
|
5236
|
-
type: "
|
|
5254
|
+
type: "container",
|
|
5237
5255
|
label: "Italic Text",
|
|
5238
5256
|
icon: TextItalicIcon,
|
|
5239
5257
|
states: defaultStates,
|
|
5240
|
-
presetStyle:
|
|
5258
|
+
presetStyle: i$2
|
|
5241
5259
|
};
|
|
5242
5260
|
const e$3 = {
|
|
5243
5261
|
sup
|
|
5244
|
-
},
|
|
5245
|
-
type: "
|
|
5262
|
+
}, c$4 = {
|
|
5263
|
+
type: "container",
|
|
5246
5264
|
label: "Superscript Text",
|
|
5247
5265
|
icon: SuperscriptIcon,
|
|
5248
5266
|
states: defaultStates,
|
|
@@ -5250,8 +5268,8 @@ const e$3 = {
|
|
|
5250
5268
|
};
|
|
5251
5269
|
const e$2 = {
|
|
5252
5270
|
sub
|
|
5253
|
-
},
|
|
5254
|
-
type: "
|
|
5271
|
+
}, c$3 = {
|
|
5272
|
+
type: "container",
|
|
5255
5273
|
label: "Subscript Text",
|
|
5256
5274
|
icon: SubscriptIcon,
|
|
5257
5275
|
states: defaultStates,
|
|
@@ -5259,7 +5277,7 @@ const e$2 = {
|
|
|
5259
5277
|
};
|
|
5260
5278
|
const l$5 = {
|
|
5261
5279
|
button
|
|
5262
|
-
}, p$
|
|
5280
|
+
}, p$9 = {
|
|
5263
5281
|
icon: ButtonElementIcon,
|
|
5264
5282
|
type: "container",
|
|
5265
5283
|
presetStyle: l$5,
|
|
@@ -5269,7 +5287,7 @@ const l$5 = {
|
|
|
5269
5287
|
{ selector: ":enabled", label: "Enabled" }
|
|
5270
5288
|
]
|
|
5271
5289
|
};
|
|
5272
|
-
const r$
|
|
5290
|
+
const r$9 = {
|
|
5273
5291
|
input: [
|
|
5274
5292
|
...input,
|
|
5275
5293
|
{
|
|
@@ -5277,13 +5295,12 @@ const r$a = {
|
|
|
5277
5295
|
value: { type: "keyword", value: "block" }
|
|
5278
5296
|
}
|
|
5279
5297
|
]
|
|
5280
|
-
}, c$
|
|
5298
|
+
}, c$2 = {
|
|
5281
5299
|
category: "forms",
|
|
5282
|
-
type: "control",
|
|
5283
5300
|
label: "Text Input",
|
|
5284
5301
|
description: "A single-line text input for collecting string data from your users.",
|
|
5285
5302
|
icon: FormTextFieldIcon,
|
|
5286
|
-
presetStyle: r$
|
|
5303
|
+
presetStyle: r$9,
|
|
5287
5304
|
order: 3,
|
|
5288
5305
|
states: [
|
|
5289
5306
|
...defaultStates,
|
|
@@ -5299,7 +5316,7 @@ const r$a = {
|
|
|
5299
5316
|
//{ selector: ":read-write", label: "Read Write" },
|
|
5300
5317
|
]
|
|
5301
5318
|
};
|
|
5302
|
-
const c$
|
|
5319
|
+
const c$1 = {
|
|
5303
5320
|
label: "Webhook Form",
|
|
5304
5321
|
icon: WebhookFormIcon,
|
|
5305
5322
|
type: "container",
|
|
@@ -5316,7 +5333,7 @@ const s$4 = {
|
|
|
5316
5333
|
...form,
|
|
5317
5334
|
{ property: "min-height", value: { type: "unit", unit: "px", value: 20 } }
|
|
5318
5335
|
]
|
|
5319
|
-
}, n$
|
|
5336
|
+
}, n$4 = {
|
|
5320
5337
|
category: "forms",
|
|
5321
5338
|
type: "container",
|
|
5322
5339
|
label: "Form",
|
|
@@ -5326,7 +5343,7 @@ const s$4 = {
|
|
|
5326
5343
|
presetStyle: s$4,
|
|
5327
5344
|
order: 0
|
|
5328
5345
|
};
|
|
5329
|
-
const a$
|
|
5346
|
+
const a$6 = {
|
|
5330
5347
|
img: [
|
|
5331
5348
|
...img,
|
|
5332
5349
|
// Otherwise on new image insert onto canvas it can overfit screen size multiple times
|
|
@@ -5350,14 +5367,13 @@ const a$7 = {
|
|
|
5350
5367
|
]
|
|
5351
5368
|
}, l$4 = {
|
|
5352
5369
|
category: "media",
|
|
5353
|
-
type: "embed",
|
|
5354
5370
|
description: "Add an image asset to the page. Webstudio automatically converts images to WebP or AVIF format and makes them responsive for best performance.",
|
|
5355
5371
|
icon: ImageIcon,
|
|
5356
5372
|
states: defaultStates,
|
|
5357
|
-
presetStyle: a$
|
|
5373
|
+
presetStyle: a$6,
|
|
5358
5374
|
order: 0
|
|
5359
5375
|
};
|
|
5360
|
-
const r$
|
|
5376
|
+
const r$8 = {
|
|
5361
5377
|
blockquote: [
|
|
5362
5378
|
{
|
|
5363
5379
|
property: "margin-top",
|
|
@@ -5404,14 +5420,14 @@ const r$9 = {
|
|
|
5404
5420
|
value: { type: "rgb", r: 226, g: 226, b: 226, alpha: 1 }
|
|
5405
5421
|
}
|
|
5406
5422
|
]
|
|
5407
|
-
}, i = {
|
|
5423
|
+
}, i$1 = {
|
|
5408
5424
|
type: "container",
|
|
5409
5425
|
placeholder: "Blockquote",
|
|
5410
5426
|
icon: BlockquoteIcon,
|
|
5411
5427
|
states: defaultStates,
|
|
5412
|
-
presetStyle: r$
|
|
5428
|
+
presetStyle: r$8
|
|
5413
5429
|
};
|
|
5414
|
-
const a$
|
|
5430
|
+
const a$5 = {
|
|
5415
5431
|
ol: [
|
|
5416
5432
|
...ol,
|
|
5417
5433
|
{
|
|
@@ -5442,13 +5458,13 @@ const a$6 = {
|
|
|
5442
5458
|
value: { type: "keyword", value: "40px" }
|
|
5443
5459
|
}
|
|
5444
5460
|
]
|
|
5445
|
-
}, d$
|
|
5461
|
+
}, d$4 = {
|
|
5446
5462
|
type: "container",
|
|
5447
5463
|
icon: ListIcon,
|
|
5448
5464
|
states: defaultStates,
|
|
5449
|
-
presetStyle: a$
|
|
5465
|
+
presetStyle: a$5
|
|
5450
5466
|
};
|
|
5451
|
-
const a$
|
|
5467
|
+
const a$4 = {
|
|
5452
5468
|
type: "container",
|
|
5453
5469
|
placeholder: "List item",
|
|
5454
5470
|
icon: ListItemIcon,
|
|
@@ -5457,7 +5473,7 @@ const a$5 = {
|
|
|
5457
5473
|
li
|
|
5458
5474
|
}
|
|
5459
5475
|
};
|
|
5460
|
-
const p$
|
|
5476
|
+
const p$8 = {
|
|
5461
5477
|
hr: [
|
|
5462
5478
|
...hr,
|
|
5463
5479
|
{
|
|
@@ -5485,16 +5501,15 @@ const p$5 = {
|
|
|
5485
5501
|
value: { type: "keyword", value: "none" }
|
|
5486
5502
|
}
|
|
5487
5503
|
]
|
|
5488
|
-
}, n$
|
|
5504
|
+
}, n$3 = {
|
|
5489
5505
|
category: "general",
|
|
5490
|
-
type: "embed",
|
|
5491
5506
|
description: "Used to visually divide sections of content, helping to improve readability and organization within a webpage.",
|
|
5492
5507
|
icon: MinusIcon,
|
|
5493
5508
|
states: defaultStates,
|
|
5494
|
-
presetStyle: p$
|
|
5509
|
+
presetStyle: p$8,
|
|
5495
5510
|
order: 3
|
|
5496
5511
|
};
|
|
5497
|
-
const p$
|
|
5512
|
+
const p$7 = {
|
|
5498
5513
|
code: [
|
|
5499
5514
|
...code,
|
|
5500
5515
|
{
|
|
@@ -5522,16 +5537,19 @@ const p$4 = {
|
|
|
5522
5537
|
value: { type: "rgb", r: 238, g: 238, b: 238, alpha: 1 }
|
|
5523
5538
|
}
|
|
5524
5539
|
]
|
|
5525
|
-
},
|
|
5540
|
+
}, i = {
|
|
5526
5541
|
category: "general",
|
|
5527
|
-
type: "embed",
|
|
5528
5542
|
description: "Use this component when you want to display code as text on the page.",
|
|
5529
5543
|
icon: BracesIcon,
|
|
5544
|
+
contentModel: {
|
|
5545
|
+
category: "instance",
|
|
5546
|
+
children: []
|
|
5547
|
+
},
|
|
5530
5548
|
states: defaultStates,
|
|
5531
|
-
presetStyle: p$
|
|
5549
|
+
presetStyle: p$7,
|
|
5532
5550
|
order: 5
|
|
5533
5551
|
};
|
|
5534
|
-
const a$
|
|
5552
|
+
const a$3 = {
|
|
5535
5553
|
label: [
|
|
5536
5554
|
...label,
|
|
5537
5555
|
{ property: "display", value: { type: "keyword", value: "block" } }
|
|
@@ -5541,7 +5559,7 @@ const a$4 = {
|
|
|
5541
5559
|
label: "Input Label",
|
|
5542
5560
|
icon: LabelIcon,
|
|
5543
5561
|
states: defaultStates,
|
|
5544
|
-
presetStyle: a$
|
|
5562
|
+
presetStyle: a$3
|
|
5545
5563
|
};
|
|
5546
5564
|
const l$3 = {
|
|
5547
5565
|
textarea: [
|
|
@@ -5553,14 +5571,17 @@ const l$3 = {
|
|
|
5553
5571
|
value: { type: "keyword", value: "block" }
|
|
5554
5572
|
}
|
|
5555
5573
|
]
|
|
5556
|
-
},
|
|
5574
|
+
}, n$2 = {
|
|
5557
5575
|
category: "forms",
|
|
5558
|
-
type: "control",
|
|
5559
5576
|
label: "Text Area",
|
|
5560
5577
|
description: "A multi-line text input for collecting longer string data from your users.",
|
|
5561
5578
|
icon: FormTextAreaIcon,
|
|
5562
5579
|
presetStyle: l$3,
|
|
5563
5580
|
order: 4,
|
|
5581
|
+
contentModel: {
|
|
5582
|
+
category: "instance",
|
|
5583
|
+
children: []
|
|
5584
|
+
},
|
|
5564
5585
|
states: [
|
|
5565
5586
|
...defaultStates,
|
|
5566
5587
|
{ selector: "::placeholder", label: "Placeholder" },
|
|
@@ -5575,7 +5596,7 @@ const l$3 = {
|
|
|
5575
5596
|
//{ selector: ":read-write", label: "Read Write" },
|
|
5576
5597
|
]
|
|
5577
5598
|
};
|
|
5578
|
-
const a$
|
|
5599
|
+
const a$2 = {
|
|
5579
5600
|
input: [
|
|
5580
5601
|
...radio,
|
|
5581
5602
|
{
|
|
@@ -5584,10 +5605,9 @@ const a$3 = {
|
|
|
5584
5605
|
}
|
|
5585
5606
|
]
|
|
5586
5607
|
}, s$3 = {
|
|
5587
|
-
type: "control",
|
|
5588
5608
|
label: "Radio",
|
|
5589
5609
|
icon: RadioCheckedIcon,
|
|
5590
|
-
presetStyle: a$
|
|
5610
|
+
presetStyle: a$2,
|
|
5591
5611
|
states: [
|
|
5592
5612
|
...defaultStates,
|
|
5593
5613
|
{ selector: ":checked", label: "Checked" },
|
|
@@ -5609,7 +5629,6 @@ const o$3 = {
|
|
|
5609
5629
|
}
|
|
5610
5630
|
]
|
|
5611
5631
|
}, d$3 = {
|
|
5612
|
-
type: "control",
|
|
5613
5632
|
icon: CheckboxCheckedIcon,
|
|
5614
5633
|
presetStyle: o$3,
|
|
5615
5634
|
states: [
|
|
@@ -5640,7 +5659,7 @@ const m$2 = {
|
|
|
5640
5659
|
div
|
|
5641
5660
|
}
|
|
5642
5661
|
};
|
|
5643
|
-
const p$
|
|
5662
|
+
const p$6 = {
|
|
5644
5663
|
type: "container",
|
|
5645
5664
|
icon: YoutubeIcon,
|
|
5646
5665
|
states: defaultStates,
|
|
@@ -5657,13 +5676,13 @@ const p$3 = {
|
|
|
5657
5676
|
div
|
|
5658
5677
|
}
|
|
5659
5678
|
};
|
|
5660
|
-
const
|
|
5679
|
+
const p$5 = {
|
|
5661
5680
|
...l$4,
|
|
5662
5681
|
category: "hidden",
|
|
5663
5682
|
label: "Preview Image",
|
|
5664
5683
|
contentModel: {
|
|
5665
5684
|
category: "none",
|
|
5666
|
-
children: [
|
|
5685
|
+
children: []
|
|
5667
5686
|
}
|
|
5668
5687
|
};
|
|
5669
5688
|
const s$2 = {
|
|
@@ -5708,7 +5727,7 @@ const a$1 = {
|
|
|
5708
5727
|
icon: CalendarIcon,
|
|
5709
5728
|
order: 7
|
|
5710
5729
|
};
|
|
5711
|
-
const r$
|
|
5730
|
+
const r$7 = {
|
|
5712
5731
|
time
|
|
5713
5732
|
}, s = {
|
|
5714
5733
|
category: "localization",
|
|
@@ -5716,9 +5735,9 @@ const r$8 = {
|
|
|
5716
5735
|
description: "Converts machine-readable date and time to a human-readable format.",
|
|
5717
5736
|
icon: CalendarIcon,
|
|
5718
5737
|
states: defaultStates,
|
|
5719
|
-
presetStyle: r$
|
|
5738
|
+
presetStyle: r$7
|
|
5720
5739
|
};
|
|
5721
|
-
const r$
|
|
5740
|
+
const r$6 = {
|
|
5722
5741
|
select: [
|
|
5723
5742
|
...select,
|
|
5724
5743
|
{
|
|
@@ -5726,10 +5745,10 @@ const r$7 = {
|
|
|
5726
5745
|
value: { type: "keyword", value: "block" }
|
|
5727
5746
|
}
|
|
5728
5747
|
]
|
|
5729
|
-
}, c
|
|
5748
|
+
}, c = {
|
|
5730
5749
|
type: "container",
|
|
5731
5750
|
icon: SelectIcon,
|
|
5732
|
-
presetStyle: r$
|
|
5751
|
+
presetStyle: r$6,
|
|
5733
5752
|
states: [
|
|
5734
5753
|
...defaultStates,
|
|
5735
5754
|
{ selector: "::placeholder", label: "Placeholder" },
|
|
@@ -5753,9 +5772,8 @@ const l$2 = {
|
|
|
5753
5772
|
}
|
|
5754
5773
|
}
|
|
5755
5774
|
]
|
|
5756
|
-
}, r$
|
|
5775
|
+
}, r$5 = {
|
|
5757
5776
|
category: "hidden",
|
|
5758
|
-
type: "control",
|
|
5759
5777
|
description: "An item within a drop-down menu that users can select as their chosen value.",
|
|
5760
5778
|
icon: ItemIcon,
|
|
5761
5779
|
presetStyle: l$2,
|
|
@@ -5770,7 +5788,7 @@ const l$2 = {
|
|
|
5770
5788
|
{ selector: ":disabled", label: "Disabled" }
|
|
5771
5789
|
]
|
|
5772
5790
|
};
|
|
5773
|
-
const r$
|
|
5791
|
+
const r$4 = {
|
|
5774
5792
|
icon: HeaderIcon,
|
|
5775
5793
|
type: "container",
|
|
5776
5794
|
description: "Inserts children into the head of the document",
|
|
@@ -5779,26 +5797,21 @@ const r$5 = {
|
|
|
5779
5797
|
children: ["HeadLink", "HeadMeta", "HeadTitle"]
|
|
5780
5798
|
}
|
|
5781
5799
|
};
|
|
5782
|
-
const p$
|
|
5783
|
-
category: "hidden",
|
|
5800
|
+
const p$4 = {
|
|
5784
5801
|
icon: ResourceIcon,
|
|
5785
|
-
type: "embed",
|
|
5786
5802
|
contentModel: {
|
|
5787
5803
|
category: "none",
|
|
5788
|
-
children: [
|
|
5804
|
+
children: []
|
|
5789
5805
|
}
|
|
5790
5806
|
};
|
|
5791
|
-
const p$
|
|
5792
|
-
category: "hidden",
|
|
5807
|
+
const p$3 = {
|
|
5793
5808
|
icon: WindowInfoIcon,
|
|
5794
|
-
type: "embed",
|
|
5795
5809
|
contentModel: {
|
|
5796
5810
|
category: "none",
|
|
5797
|
-
children: [
|
|
5811
|
+
children: []
|
|
5798
5812
|
}
|
|
5799
5813
|
};
|
|
5800
|
-
const
|
|
5801
|
-
category: "hidden",
|
|
5814
|
+
const p$2 = {
|
|
5802
5815
|
icon: WindowTitleIcon,
|
|
5803
5816
|
type: "container",
|
|
5804
5817
|
contentModel: {
|
|
@@ -5806,9 +5819,12 @@ const c = {
|
|
|
5806
5819
|
children: ["text"]
|
|
5807
5820
|
}
|
|
5808
5821
|
};
|
|
5809
|
-
const
|
|
5810
|
-
type: "control",
|
|
5822
|
+
const p$1 = {
|
|
5811
5823
|
icon: VideoIcon,
|
|
5824
|
+
contentModel: {
|
|
5825
|
+
category: "instance",
|
|
5826
|
+
children: []
|
|
5827
|
+
},
|
|
5812
5828
|
presetStyle: {
|
|
5813
5829
|
video: [
|
|
5814
5830
|
{
|
|
@@ -5820,51 +5836,51 @@ const r$4 = {
|
|
|
5820
5836
|
};
|
|
5821
5837
|
const baseComponentMetas = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5822
5838
|
__proto__: null,
|
|
5823
|
-
Blockquote: i,
|
|
5824
|
-
Body: n$
|
|
5839
|
+
Blockquote: i$1,
|
|
5840
|
+
Body: n$8,
|
|
5825
5841
|
Bold: l$6,
|
|
5826
5842
|
Box: v$2,
|
|
5827
|
-
Button: p$
|
|
5843
|
+
Button: p$9,
|
|
5828
5844
|
Checkbox: d$3,
|
|
5829
|
-
CodeText:
|
|
5830
|
-
Form: c$
|
|
5831
|
-
Fragment: o$
|
|
5832
|
-
HeadLink: p$
|
|
5833
|
-
HeadMeta: p$
|
|
5834
|
-
HeadSlot: r$
|
|
5835
|
-
HeadTitle:
|
|
5836
|
-
Heading: d$
|
|
5837
|
-
HtmlEmbed: r$
|
|
5845
|
+
CodeText: i,
|
|
5846
|
+
Form: c$1,
|
|
5847
|
+
Fragment: o$5,
|
|
5848
|
+
HeadLink: p$4,
|
|
5849
|
+
HeadMeta: p$3,
|
|
5850
|
+
HeadSlot: r$4,
|
|
5851
|
+
HeadTitle: p$2,
|
|
5852
|
+
Heading: d$5,
|
|
5853
|
+
HtmlEmbed: r$a,
|
|
5838
5854
|
Image: l$4,
|
|
5839
|
-
Input: c$
|
|
5855
|
+
Input: c$2,
|
|
5840
5856
|
Italic: c$5,
|
|
5841
5857
|
Label: m$3,
|
|
5842
|
-
Link: n$
|
|
5843
|
-
List: d$
|
|
5844
|
-
ListItem: a$
|
|
5845
|
-
MarkdownEmbed: a$
|
|
5846
|
-
Option: r$
|
|
5847
|
-
Paragraph: n$
|
|
5858
|
+
Link: n$6,
|
|
5859
|
+
List: d$4,
|
|
5860
|
+
ListItem: a$4,
|
|
5861
|
+
MarkdownEmbed: a$a,
|
|
5862
|
+
Option: r$5,
|
|
5863
|
+
Paragraph: n$7,
|
|
5848
5864
|
RadioButton: s$3,
|
|
5849
|
-
RemixForm: n$
|
|
5850
|
-
RichTextLink:
|
|
5851
|
-
Select: c
|
|
5852
|
-
Separator: n$
|
|
5865
|
+
RemixForm: n$4,
|
|
5866
|
+
RichTextLink: o$4,
|
|
5867
|
+
Select: c,
|
|
5868
|
+
Separator: n$3,
|
|
5853
5869
|
Slot: e$5,
|
|
5854
|
-
Span:
|
|
5855
|
-
Subscript:
|
|
5856
|
-
Superscript:
|
|
5870
|
+
Span: n$5,
|
|
5871
|
+
Subscript: c$3,
|
|
5872
|
+
Superscript: c$4,
|
|
5857
5873
|
Text: s$6,
|
|
5858
|
-
Textarea:
|
|
5874
|
+
Textarea: n$2,
|
|
5859
5875
|
Time: s,
|
|
5860
|
-
Video:
|
|
5876
|
+
Video: p$1,
|
|
5861
5877
|
Vimeo: m$2,
|
|
5862
5878
|
VimeoPlayButton: s$2,
|
|
5863
|
-
VimeoPreviewImage:
|
|
5879
|
+
VimeoPreviewImage: p$5,
|
|
5864
5880
|
VimeoSpinner: s$1,
|
|
5865
5881
|
XmlNode: e$1,
|
|
5866
5882
|
XmlTime: a$1,
|
|
5867
|
-
YouTube: p$
|
|
5883
|
+
YouTube: p$6
|
|
5868
5884
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5869
5885
|
const o$2 = {
|
|
5870
5886
|
category: "animations",
|
|
@@ -5939,11 +5955,11 @@ const animationComponentMetas = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Ob
|
|
|
5939
5955
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5940
5956
|
const remixComponentMetas = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5941
5957
|
__proto__: null,
|
|
5942
|
-
Body: n$
|
|
5943
|
-
Form: c$
|
|
5944
|
-
Link: n$
|
|
5945
|
-
RemixForm: n$
|
|
5946
|
-
RichTextLink:
|
|
5958
|
+
Body: n$8,
|
|
5959
|
+
Form: c$1,
|
|
5960
|
+
Link: n$6,
|
|
5961
|
+
RemixForm: n$4,
|
|
5962
|
+
RichTextLink: o$4
|
|
5947
5963
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5948
5964
|
const r = (t2) => new Proxy(
|
|
5949
5965
|
{},
|
|
@@ -6088,7 +6104,7 @@ const S$1 = {
|
|
|
6088
6104
|
}, h$1 = {
|
|
6089
6105
|
type: "container",
|
|
6090
6106
|
presetStyle: {
|
|
6091
|
-
p: p$
|
|
6107
|
+
p: p$c
|
|
6092
6108
|
},
|
|
6093
6109
|
icon: TextIcon,
|
|
6094
6110
|
constraints: {
|
|
@@ -6817,11 +6833,11 @@ const createFramework$2 = async () => {
|
|
|
6817
6833
|
};
|
|
6818
6834
|
const reactRouterComponentMetas = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
6819
6835
|
__proto__: null,
|
|
6820
|
-
Body: n$
|
|
6821
|
-
Form: c$
|
|
6822
|
-
Link: n$
|
|
6823
|
-
RemixForm: n$
|
|
6824
|
-
RichTextLink:
|
|
6836
|
+
Body: n$8,
|
|
6837
|
+
Form: c$1,
|
|
6838
|
+
Link: n$6,
|
|
6839
|
+
RemixForm: n$4,
|
|
6840
|
+
RichTextLink: o$4
|
|
6825
6841
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
6826
6842
|
const createFramework$1 = async () => {
|
|
6827
6843
|
const routeTemplatesDir = join("app", "route-templates");
|
|
@@ -7359,6 +7375,10 @@ Please check webstudio --help for more details`
|
|
|
7359
7375
|
import { useResource, useVariableState } from "@webstudio-is/react-sdk/runtime";
|
|
7360
7376
|
${componentImports}
|
|
7361
7377
|
|
|
7378
|
+
export const projectId = "${siteData.build.projectId}";
|
|
7379
|
+
|
|
7380
|
+
export const lastPublished = "${new Date(siteData.build.createdAt).toISOString()}";
|
|
7381
|
+
|
|
7362
7382
|
export const siteName = ${JSON.stringify(projectMeta == null ? void 0 : projectMeta.siteName)};
|
|
7363
7383
|
|
|
7364
7384
|
export const breakpoints = ${JSON.stringify(breakpoints)};
|
|
@@ -7422,8 +7442,6 @@ Please check webstudio --help for more details`
|
|
|
7422
7442
|
|
|
7423
7443
|
${generateRemixParams(page.path)}
|
|
7424
7444
|
|
|
7425
|
-
export const projectId = "${siteData.build.projectId}";
|
|
7426
|
-
|
|
7427
7445
|
export const contactEmail = ${JSON.stringify(contactEmail)};
|
|
7428
7446
|
`;
|
|
7429
7447
|
const generatedBasename = generateRemixRoute(pagePath);
|
|
@@ -7641,7 +7659,7 @@ const getDeploymentInstructions = (deployTarget) => {
|
|
|
7641
7659
|
}
|
|
7642
7660
|
};
|
|
7643
7661
|
const name = "webstudio";
|
|
7644
|
-
const version = "0.
|
|
7662
|
+
const version = "0.215.0";
|
|
7645
7663
|
const description = "Webstudio CLI";
|
|
7646
7664
|
const author = "Webstudio <github@webstudio.is>";
|
|
7647
7665
|
const homepage = "https://webstudio.is";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "webstudio",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.215.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.
|
|
72
|
-
"@webstudio-is/http-client": "0.
|
|
73
|
-
"@webstudio-is/image": "0.
|
|
74
|
-
"@webstudio-is/react-sdk": "0.
|
|
75
|
-
"@webstudio-is/sdk-components-
|
|
76
|
-
"@webstudio-is/sdk-components-react": "0.
|
|
77
|
-
"@webstudio-is/sdk-components-react-
|
|
78
|
-
"@webstudio-is/sdk-components-react-
|
|
79
|
-
"@webstudio-is/sdk-components-react-router": "0.213.0",
|
|
71
|
+
"@webstudio-is/css-engine": "0.215.0",
|
|
72
|
+
"@webstudio-is/http-client": "0.215.0",
|
|
73
|
+
"@webstudio-is/image": "0.215.0",
|
|
74
|
+
"@webstudio-is/react-sdk": "0.215.0",
|
|
75
|
+
"@webstudio-is/sdk-components-react": "0.215.0",
|
|
76
|
+
"@webstudio-is/sdk-components-react-radix": "0.215.0",
|
|
77
|
+
"@webstudio-is/sdk-components-react-remix": "0.215.0",
|
|
78
|
+
"@webstudio-is/sdk-components-react-router": "0.215.0",
|
|
80
79
|
"@webstudio-is/tsconfig": "1.0.7",
|
|
81
|
-
"@webstudio-is/sdk": "0.
|
|
80
|
+
"@webstudio-is/sdk": "0.215.0",
|
|
81
|
+
"@webstudio-is/sdk-components-animation": "0.215.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
|
|
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.
|
|
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.
|
|
14
|
+
"@webstudio-is/image": "0.215.0",
|
|
15
|
+
"@webstudio-is/react-sdk": "0.215.0",
|
|
16
|
+
"@webstudio-is/sdk": "0.215.0",
|
|
17
|
+
"@webstudio-is/sdk-components-react": "0.215.0",
|
|
18
|
+
"@webstudio-is/sdk-components-animation": "0.215.0",
|
|
19
|
+
"@webstudio-is/sdk-components-react-radix": "0.215.0",
|
|
20
|
+
"@webstudio-is/sdk-components-react-remix": "0.215.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
|
|
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.
|
|
14
|
-
"@webstudio-is/react-sdk": "0.
|
|
15
|
-
"@webstudio-is/sdk": "0.
|
|
16
|
-
"@webstudio-is/sdk-components-animation": "0.
|
|
17
|
-
"@webstudio-is/sdk-components-react-radix": "0.
|
|
18
|
-
"@webstudio-is/sdk-components-react-router": "0.
|
|
19
|
-
"@webstudio-is/sdk-components-react": "0.
|
|
13
|
+
"@webstudio-is/image": "0.215.0",
|
|
14
|
+
"@webstudio-is/react-sdk": "0.215.0",
|
|
15
|
+
"@webstudio-is/sdk": "0.215.0",
|
|
16
|
+
"@webstudio-is/sdk-components-animation": "0.215.0",
|
|
17
|
+
"@webstudio-is/sdk-components-react-radix": "0.215.0",
|
|
18
|
+
"@webstudio-is/sdk-components-react-router": "0.215.0",
|
|
19
|
+
"@webstudio-is/sdk-components-react": "0.215.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.
|
|
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.215.0",
|
|
12
|
+
"@webstudio-is/react-sdk": "0.215.0",
|
|
13
|
+
"@webstudio-is/sdk": "0.215.0",
|
|
14
|
+
"@webstudio-is/sdk-components-react": "0.215.0",
|
|
15
|
+
"@webstudio-is/sdk-components-animation": "0.215.0",
|
|
16
|
+
"@webstudio-is/sdk-components-react-radix": "0.215.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
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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
|
|
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" />
|