webstudio 0.214.0 → 0.216.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
@@ -2627,19 +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
- // control - usually form controls like inputs, without children
2641
- // embed - images, videos or other embeddable components, without children
2642
- type: z.enum(["container", "control", "embed"]),
2636
+ // container - can accept other components with dnd or be edited as text ..
2637
+ type: z.enum(["container"]).optional(),
2643
2638
  /**
2644
2639
  * a property used as textual placeholder when no content specified while in builder
2645
2640
  * also signals to not insert components inside unless dropped explicitly
@@ -2678,7 +2673,6 @@ var html = [
2678
2673
  ];
2679
2674
  var rootComponent = "ws:root";
2680
2675
  var rootMeta = {
2681
- type: "container",
2682
2676
  label: "Global Root",
2683
2677
  icon: SettingsIcon,
2684
2678
  presetStyle: {
@@ -2687,24 +2681,25 @@ var rootMeta = {
2687
2681
  };
2688
2682
  var elementComponent = "ws:element";
2689
2683
  var elementMeta = {
2690
- type: "container",
2691
2684
  label: "Element",
2692
2685
  icon: HtmlElementIcon
2693
2686
  };
2694
2687
  var collectionComponent = "ws:collection";
2695
2688
  var collectionMeta = {
2696
- type: "container",
2697
2689
  label: "Collection",
2698
- icon: ListViewIcon
2690
+ icon: ListViewIcon,
2691
+ contentModel: {
2692
+ category: "instance",
2693
+ children: ["instance"]
2694
+ }
2699
2695
  };
2700
2696
  var descendantComponent = "ws:descendant";
2701
2697
  var descendantMeta = {
2702
- type: "control",
2703
2698
  label: "Descendant",
2704
2699
  icon: PaintBrushIcon,
2705
2700
  contentModel: {
2706
2701
  category: "none",
2707
- children: ["empty"]
2702
+ children: []
2708
2703
  },
2709
2704
  // @todo infer possible presets
2710
2705
  presetStyle: {}
@@ -2712,7 +2707,6 @@ var descendantMeta = {
2712
2707
  var blockComponent = "ws:block";
2713
2708
  var blockTemplateComponent = "ws:block-template";
2714
2709
  var blockTemplateMeta = {
2715
- type: "container",
2716
2710
  icon: AddTemplateInstanceIcon,
2717
2711
  contentModel: {
2718
2712
  category: "none",
@@ -2720,7 +2714,6 @@ var blockTemplateMeta = {
2720
2714
  }
2721
2715
  };
2722
2716
  var blockMeta = {
2723
- type: "container",
2724
2717
  label: "Content Block",
2725
2718
  icon: ContentBlockIcon,
2726
2719
  contentModel: {
@@ -3366,7 +3359,30 @@ var generateCss = ({
3366
3359
  presetSheet.addMediaRule("presets");
3367
3360
  const presetClasses = /* @__PURE__ */ new Map();
3368
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
+ }
3369
3384
  for (const [component, meta] of componentMetas) {
3385
+ const componentTags = tagsByComponent.get(component);
3370
3386
  const [_namespace, componentName] = parseComponentName(component);
3371
3387
  const className = `w-${scope.getName(component, meta.label ?? componentName)}`;
3372
3388
  const presetStyle = Object.entries(meta.presetStyle ?? {});
@@ -3374,6 +3390,9 @@ var generateCss = ({
3374
3390
  presetClasses.set(component, className);
3375
3391
  }
3376
3392
  for (const [tag, styles2] of presetStyle) {
3393
+ if (!(componentTags == null ? void 0 : componentTags.has(tag))) {
3394
+ continue;
3395
+ }
3377
3396
  const selector = component === rootComponent ? ":root" : `${tag}.${className}`;
3378
3397
  const rule = presetSheet.addNestingRule(selector);
3379
3398
  for (const declaration of styles2) {
@@ -4680,7 +4699,7 @@ const e$4 = {
4680
4699
  type: "boolean"
4681
4700
  }
4682
4701
  };
4683
- const r$b = {
4702
+ const r$8 = {
4684
4703
  category: "general",
4685
4704
  type: "container",
4686
4705
  label: "HTML Embed",
@@ -4725,7 +4744,7 @@ const r$b = {
4725
4744
  },
4726
4745
  initialProps: ["className", "clientOnly", "executeScriptOnCanvas"]
4727
4746
  });
4728
- const a$b = {
4747
+ const a$a = {
4729
4748
  type: "container",
4730
4749
  icon: MarkdownEmbedIcon,
4731
4750
  contentModel: {
@@ -4783,13 +4802,13 @@ var h3 = div;
4783
4802
  var h4 = div;
4784
4803
  var h5 = div;
4785
4804
  var h6 = div;
4786
- var i$2 = div;
4805
+ var i$3 = div;
4787
4806
  var img = div;
4788
- var a$a = div;
4807
+ var a$9 = div;
4789
4808
  var li = div;
4790
4809
  var ul = div;
4791
4810
  var ol = div;
4792
- var p$9 = div;
4811
+ var p$d = div;
4793
4812
  var span = div;
4794
4813
  var body = [
4795
4814
  { property: "margin-top", value: { type: "unit", unit: "number", value: 0 } },
@@ -5100,7 +5119,7 @@ var button = [
5100
5119
  { property: "text-transform", value: { type: "keyword", value: "none" } }
5101
5120
  ];
5102
5121
  var select = button;
5103
- const a$9 = {
5122
+ const a$8 = {
5104
5123
  body: [
5105
5124
  ...body,
5106
5125
  {
@@ -5112,11 +5131,11 @@ const a$9 = {
5112
5131
  value: { type: "keyword", value: "grayscale" }
5113
5132
  }
5114
5133
  ]
5115
- }, n$7 = {
5134
+ }, n$8 = {
5116
5135
  type: "container",
5117
5136
  icon: BodyIcon,
5118
5137
  states: defaultStates,
5119
- presetStyle: a$9
5138
+ presetStyle: a$8
5120
5139
  };
5121
5140
  const v$2 = {
5122
5141
  category: "general",
@@ -5138,7 +5157,7 @@ const v$2 = {
5138
5157
  },
5139
5158
  order: 0
5140
5159
  };
5141
- const s$6 = {
5160
+ const s$7 = {
5142
5161
  type: "container",
5143
5162
  icon: TextIcon,
5144
5163
  states: defaultStates,
@@ -5152,7 +5171,7 @@ const s$6 = {
5152
5171
  ]
5153
5172
  }
5154
5173
  };
5155
- const d$6 = {
5174
+ const d$5 = {
5156
5175
  type: "container",
5157
5176
  placeholder: "Heading",
5158
5177
  icon: HeadingIcon,
@@ -5166,28 +5185,28 @@ const d$6 = {
5166
5185
  h6
5167
5186
  }
5168
5187
  };
5169
- const p$8 = {
5170
- p: p$9
5171
- }, n$6 = {
5188
+ const p$c = {
5189
+ p: p$d
5190
+ }, n$7 = {
5172
5191
  type: "container",
5173
5192
  placeholder: "Paragraph",
5174
5193
  icon: TextAlignLeftIcon,
5175
5194
  states: defaultStates,
5176
- presetStyle: p$8
5195
+ presetStyle: p$c
5177
5196
  };
5178
- const a$8 = {
5197
+ const a$7 = {
5179
5198
  a: [
5180
- ...a$a,
5199
+ ...a$9,
5181
5200
  {
5182
5201
  property: "display",
5183
5202
  value: { type: "keyword", value: "inline-block" }
5184
5203
  }
5185
5204
  ]
5186
- }, n$5 = {
5205
+ }, n$6 = {
5187
5206
  type: "container",
5188
5207
  placeholder: "Link",
5189
5208
  icon: LinkIcon,
5190
- presetStyle: a$8,
5209
+ presetStyle: a$7,
5191
5210
  states: [
5192
5211
  ...defaultStates,
5193
5212
  {
@@ -5202,45 +5221,45 @@ const a$8 = {
5202
5221
  ]
5203
5222
  };
5204
5223
  const o$4 = {
5205
- ...n$5,
5224
+ ...n$6,
5206
5225
  type: "container"
5207
5226
  };
5208
- const s$5 = {
5227
+ const s$6 = {
5209
5228
  span
5210
- }, n$4 = {
5229
+ }, n$5 = {
5211
5230
  type: "container",
5212
5231
  label: "Text",
5213
5232
  icon: PaintBrushIcon,
5214
5233
  states: defaultStates,
5215
- presetStyle: s$5
5234
+ presetStyle: s$6
5216
5235
  };
5217
- const p$7 = {
5236
+ const p$b = {
5218
5237
  b: b$8
5219
5238
  }, l$6 = {
5220
5239
  type: "container",
5221
5240
  label: "Bold Text",
5222
5241
  icon: BoldIcon,
5223
5242
  states: defaultStates,
5224
- presetStyle: p$7
5243
+ presetStyle: p$b
5225
5244
  };
5226
- const i$1 = {
5245
+ const i$2 = {
5227
5246
  i: [
5228
- ...i$2,
5247
+ ...i$3,
5229
5248
  {
5230
5249
  property: "font-style",
5231
5250
  value: { type: "keyword", value: "italic" }
5232
5251
  }
5233
5252
  ]
5234
- }, c$7 = {
5253
+ }, c$5 = {
5235
5254
  type: "container",
5236
5255
  label: "Italic Text",
5237
5256
  icon: TextItalicIcon,
5238
5257
  states: defaultStates,
5239
- presetStyle: i$1
5258
+ presetStyle: i$2
5240
5259
  };
5241
5260
  const e$3 = {
5242
5261
  sup
5243
- }, c$6 = {
5262
+ }, c$4 = {
5244
5263
  type: "container",
5245
5264
  label: "Superscript Text",
5246
5265
  icon: SuperscriptIcon,
@@ -5249,7 +5268,7 @@ const e$3 = {
5249
5268
  };
5250
5269
  const e$2 = {
5251
5270
  sub
5252
- }, c$5 = {
5271
+ }, c$3 = {
5253
5272
  type: "container",
5254
5273
  label: "Subscript Text",
5255
5274
  icon: SubscriptIcon,
@@ -5258,7 +5277,7 @@ const e$2 = {
5258
5277
  };
5259
5278
  const l$5 = {
5260
5279
  button
5261
- }, p$6 = {
5280
+ }, p$a = {
5262
5281
  icon: ButtonElementIcon,
5263
5282
  type: "container",
5264
5283
  presetStyle: l$5,
@@ -5268,7 +5287,7 @@ const l$5 = {
5268
5287
  { selector: ":enabled", label: "Enabled" }
5269
5288
  ]
5270
5289
  };
5271
- const r$a = {
5290
+ const r$7 = {
5272
5291
  input: [
5273
5292
  ...input,
5274
5293
  {
@@ -5276,13 +5295,12 @@ const r$a = {
5276
5295
  value: { type: "keyword", value: "block" }
5277
5296
  }
5278
5297
  ]
5279
- }, c$4 = {
5298
+ }, c$2 = {
5280
5299
  category: "forms",
5281
- type: "control",
5282
5300
  label: "Text Input",
5283
5301
  description: "A single-line text input for collecting string data from your users.",
5284
5302
  icon: FormTextFieldIcon,
5285
- presetStyle: r$a,
5303
+ presetStyle: r$7,
5286
5304
  order: 3,
5287
5305
  states: [
5288
5306
  ...defaultStates,
@@ -5298,7 +5316,7 @@ const r$a = {
5298
5316
  //{ selector: ":read-write", label: "Read Write" },
5299
5317
  ]
5300
5318
  };
5301
- const c$3 = {
5319
+ const c$1 = {
5302
5320
  label: "Webhook Form",
5303
5321
  icon: WebhookFormIcon,
5304
5322
  type: "container",
@@ -5310,22 +5328,22 @@ const c$3 = {
5310
5328
  { selector: "[data-state=success]", label: "Success" }
5311
5329
  ]
5312
5330
  };
5313
- const s$4 = {
5331
+ const s$5 = {
5314
5332
  form: [
5315
5333
  ...form,
5316
5334
  { property: "min-height", value: { type: "unit", unit: "px", value: 20 } }
5317
5335
  ]
5318
- }, n$3 = {
5336
+ }, n$4 = {
5319
5337
  category: "forms",
5320
5338
  type: "container",
5321
5339
  label: "Form",
5322
5340
  description: "Create filters, surveys, searches and more.",
5323
5341
  icon: FormIcon,
5324
5342
  states: defaultStates,
5325
- presetStyle: s$4,
5343
+ presetStyle: s$5,
5326
5344
  order: 0
5327
5345
  };
5328
- const a$7 = {
5346
+ const a$6 = {
5329
5347
  img: [
5330
5348
  ...img,
5331
5349
  // Otherwise on new image insert onto canvas it can overfit screen size multiple times
@@ -5349,14 +5367,13 @@ const a$7 = {
5349
5367
  ]
5350
5368
  }, l$4 = {
5351
5369
  category: "media",
5352
- type: "embed",
5353
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.",
5354
5371
  icon: ImageIcon,
5355
5372
  states: defaultStates,
5356
- presetStyle: a$7,
5373
+ presetStyle: a$6,
5357
5374
  order: 0
5358
5375
  };
5359
- const r$9 = {
5376
+ const r$6 = {
5360
5377
  blockquote: [
5361
5378
  {
5362
5379
  property: "margin-top",
@@ -5403,14 +5420,14 @@ const r$9 = {
5403
5420
  value: { type: "rgb", r: 226, g: 226, b: 226, alpha: 1 }
5404
5421
  }
5405
5422
  ]
5406
- }, i = {
5423
+ }, i$1 = {
5407
5424
  type: "container",
5408
5425
  placeholder: "Blockquote",
5409
5426
  icon: BlockquoteIcon,
5410
5427
  states: defaultStates,
5411
- presetStyle: r$9
5428
+ presetStyle: r$6
5412
5429
  };
5413
- const a$6 = {
5430
+ const a$5 = {
5414
5431
  ol: [
5415
5432
  ...ol,
5416
5433
  {
@@ -5441,13 +5458,13 @@ const a$6 = {
5441
5458
  value: { type: "keyword", value: "40px" }
5442
5459
  }
5443
5460
  ]
5444
- }, d$5 = {
5461
+ }, d$4 = {
5445
5462
  type: "container",
5446
5463
  icon: ListIcon,
5447
5464
  states: defaultStates,
5448
- presetStyle: a$6
5465
+ presetStyle: a$5
5449
5466
  };
5450
- const a$5 = {
5467
+ const a$4 = {
5451
5468
  type: "container",
5452
5469
  placeholder: "List item",
5453
5470
  icon: ListItemIcon,
@@ -5456,7 +5473,7 @@ const a$5 = {
5456
5473
  li
5457
5474
  }
5458
5475
  };
5459
- const p$5 = {
5476
+ const p$9 = {
5460
5477
  hr: [
5461
5478
  ...hr,
5462
5479
  {
@@ -5484,16 +5501,15 @@ const p$5 = {
5484
5501
  value: { type: "keyword", value: "none" }
5485
5502
  }
5486
5503
  ]
5487
- }, n$2 = {
5504
+ }, n$3 = {
5488
5505
  category: "general",
5489
- type: "embed",
5490
5506
  description: "Used to visually divide sections of content, helping to improve readability and organization within a webpage.",
5491
5507
  icon: MinusIcon,
5492
5508
  states: defaultStates,
5493
- presetStyle: p$5,
5509
+ presetStyle: p$9,
5494
5510
  order: 3
5495
5511
  };
5496
- const p$4 = {
5512
+ const p$8 = {
5497
5513
  code: [
5498
5514
  ...code,
5499
5515
  {
@@ -5521,16 +5537,19 @@ const p$4 = {
5521
5537
  value: { type: "rgb", r: 238, g: 238, b: 238, alpha: 1 }
5522
5538
  }
5523
5539
  ]
5524
- }, d$4 = {
5540
+ }, i = {
5525
5541
  category: "general",
5526
- type: "embed",
5527
5542
  description: "Use this component when you want to display code as text on the page.",
5528
5543
  icon: BracesIcon,
5544
+ contentModel: {
5545
+ category: "instance",
5546
+ children: []
5547
+ },
5529
5548
  states: defaultStates,
5530
- presetStyle: p$4,
5549
+ presetStyle: p$8,
5531
5550
  order: 5
5532
5551
  };
5533
- const a$4 = {
5552
+ const a$3 = {
5534
5553
  label: [
5535
5554
  ...label,
5536
5555
  { property: "display", value: { type: "keyword", value: "block" } }
@@ -5540,7 +5559,7 @@ const a$4 = {
5540
5559
  label: "Input Label",
5541
5560
  icon: LabelIcon,
5542
5561
  states: defaultStates,
5543
- presetStyle: a$4
5562
+ presetStyle: a$3
5544
5563
  };
5545
5564
  const l$3 = {
5546
5565
  textarea: [
@@ -5552,14 +5571,17 @@ const l$3 = {
5552
5571
  value: { type: "keyword", value: "block" }
5553
5572
  }
5554
5573
  ]
5555
- }, c$2 = {
5574
+ }, n$2 = {
5556
5575
  category: "forms",
5557
- type: "control",
5558
5576
  label: "Text Area",
5559
5577
  description: "A multi-line text input for collecting longer string data from your users.",
5560
5578
  icon: FormTextAreaIcon,
5561
5579
  presetStyle: l$3,
5562
5580
  order: 4,
5581
+ contentModel: {
5582
+ category: "instance",
5583
+ children: []
5584
+ },
5563
5585
  states: [
5564
5586
  ...defaultStates,
5565
5587
  { selector: "::placeholder", label: "Placeholder" },
@@ -5574,7 +5596,7 @@ const l$3 = {
5574
5596
  //{ selector: ":read-write", label: "Read Write" },
5575
5597
  ]
5576
5598
  };
5577
- const a$3 = {
5599
+ const a$2 = {
5578
5600
  input: [
5579
5601
  ...radio,
5580
5602
  {
@@ -5582,11 +5604,10 @@ const a$3 = {
5582
5604
  value: { type: "unit", unit: "em", value: 0.5 }
5583
5605
  }
5584
5606
  ]
5585
- }, s$3 = {
5586
- type: "control",
5607
+ }, s$4 = {
5587
5608
  label: "Radio",
5588
5609
  icon: RadioCheckedIcon,
5589
- presetStyle: a$3,
5610
+ presetStyle: a$2,
5590
5611
  states: [
5591
5612
  ...defaultStates,
5592
5613
  { selector: ":checked", label: "Checked" },
@@ -5608,7 +5629,6 @@ const o$3 = {
5608
5629
  }
5609
5630
  ]
5610
5631
  }, d$3 = {
5611
- type: "control",
5612
5632
  icon: CheckboxCheckedIcon,
5613
5633
  presetStyle: o$3,
5614
5634
  states: [
@@ -5639,7 +5659,7 @@ const m$2 = {
5639
5659
  div
5640
5660
  }
5641
5661
  };
5642
- const p$3 = {
5662
+ const p$7 = {
5643
5663
  type: "container",
5644
5664
  icon: YoutubeIcon,
5645
5665
  states: defaultStates,
@@ -5656,16 +5676,16 @@ const p$3 = {
5656
5676
  div
5657
5677
  }
5658
5678
  };
5659
- const a$2 = {
5679
+ const p$6 = {
5660
5680
  ...l$4,
5661
5681
  category: "hidden",
5662
5682
  label: "Preview Image",
5663
5683
  contentModel: {
5664
5684
  category: "none",
5665
- children: ["empty"]
5685
+ children: []
5666
5686
  }
5667
5687
  };
5668
- const s$2 = {
5688
+ const s$3 = {
5669
5689
  category: "hidden",
5670
5690
  type: "container",
5671
5691
  label: "Play Button",
@@ -5679,7 +5699,7 @@ const s$2 = {
5679
5699
  button
5680
5700
  }
5681
5701
  };
5682
- const s$1 = {
5702
+ const s$2 = {
5683
5703
  type: "container",
5684
5704
  icon: BoxIcon,
5685
5705
  states: defaultStates,
@@ -5707,17 +5727,17 @@ const a$1 = {
5707
5727
  icon: CalendarIcon,
5708
5728
  order: 7
5709
5729
  };
5710
- const r$8 = {
5730
+ const r$5 = {
5711
5731
  time
5712
- }, s = {
5732
+ }, s$1 = {
5713
5733
  category: "localization",
5714
5734
  type: "container",
5715
5735
  description: "Converts machine-readable date and time to a human-readable format.",
5716
5736
  icon: CalendarIcon,
5717
5737
  states: defaultStates,
5718
- presetStyle: r$8
5738
+ presetStyle: r$5
5719
5739
  };
5720
- const r$7 = {
5740
+ const r$4 = {
5721
5741
  select: [
5722
5742
  ...select,
5723
5743
  {
@@ -5725,10 +5745,10 @@ const r$7 = {
5725
5745
  value: { type: "keyword", value: "block" }
5726
5746
  }
5727
5747
  ]
5728
- }, c$1 = {
5748
+ }, c = {
5729
5749
  type: "container",
5730
5750
  icon: SelectIcon,
5731
- presetStyle: r$7,
5751
+ presetStyle: r$4,
5732
5752
  states: [
5733
5753
  ...defaultStates,
5734
5754
  { selector: "::placeholder", label: "Placeholder" },
@@ -5752,9 +5772,8 @@ const l$2 = {
5752
5772
  }
5753
5773
  }
5754
5774
  ]
5755
- }, r$6 = {
5775
+ }, r$3 = {
5756
5776
  category: "hidden",
5757
- type: "control",
5758
5777
  description: "An item within a drop-down menu that users can select as their chosen value.",
5759
5778
  icon: ItemIcon,
5760
5779
  presetStyle: l$2,
@@ -5769,7 +5788,7 @@ const l$2 = {
5769
5788
  { selector: ":disabled", label: "Disabled" }
5770
5789
  ]
5771
5790
  };
5772
- const r$5 = {
5791
+ const r$2 = {
5773
5792
  icon: HeaderIcon,
5774
5793
  type: "container",
5775
5794
  description: "Inserts children into the head of the document",
@@ -5778,26 +5797,21 @@ const r$5 = {
5778
5797
  children: ["HeadLink", "HeadMeta", "HeadTitle"]
5779
5798
  }
5780
5799
  };
5781
- const p$2 = {
5782
- category: "hidden",
5800
+ const p$5 = {
5783
5801
  icon: ResourceIcon,
5784
- type: "embed",
5785
5802
  contentModel: {
5786
5803
  category: "none",
5787
- children: ["empty"]
5804
+ children: []
5788
5805
  }
5789
5806
  };
5790
- const p$1 = {
5791
- category: "hidden",
5807
+ const p$4 = {
5792
5808
  icon: WindowInfoIcon,
5793
- type: "embed",
5794
5809
  contentModel: {
5795
5810
  category: "none",
5796
- children: ["empty"]
5811
+ children: []
5797
5812
  }
5798
5813
  };
5799
- const c = {
5800
- category: "hidden",
5814
+ const p$3 = {
5801
5815
  icon: WindowTitleIcon,
5802
5816
  type: "container",
5803
5817
  contentModel: {
@@ -5805,9 +5819,12 @@ const c = {
5805
5819
  children: ["text"]
5806
5820
  }
5807
5821
  };
5808
- const r$4 = {
5809
- type: "control",
5822
+ const p$2 = {
5810
5823
  icon: VideoIcon,
5824
+ contentModel: {
5825
+ category: "instance",
5826
+ children: []
5827
+ },
5811
5828
  presetStyle: {
5812
5829
  video: [
5813
5830
  {
@@ -5819,51 +5836,51 @@ const r$4 = {
5819
5836
  };
5820
5837
  const baseComponentMetas = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5821
5838
  __proto__: null,
5822
- Blockquote: i,
5823
- Body: n$7,
5839
+ Blockquote: i$1,
5840
+ Body: n$8,
5824
5841
  Bold: l$6,
5825
5842
  Box: v$2,
5826
- Button: p$6,
5843
+ Button: p$a,
5827
5844
  Checkbox: d$3,
5828
- CodeText: d$4,
5829
- Form: c$3,
5845
+ CodeText: i,
5846
+ Form: c$1,
5830
5847
  Fragment: o$5,
5831
- HeadLink: p$2,
5832
- HeadMeta: p$1,
5833
- HeadSlot: r$5,
5834
- HeadTitle: c,
5835
- Heading: d$6,
5836
- HtmlEmbed: r$b,
5848
+ HeadLink: p$5,
5849
+ HeadMeta: p$4,
5850
+ HeadSlot: r$2,
5851
+ HeadTitle: p$3,
5852
+ Heading: d$5,
5853
+ HtmlEmbed: r$8,
5837
5854
  Image: l$4,
5838
- Input: c$4,
5839
- Italic: c$7,
5855
+ Input: c$2,
5856
+ Italic: c$5,
5840
5857
  Label: m$3,
5841
- Link: n$5,
5842
- List: d$5,
5843
- ListItem: a$5,
5844
- MarkdownEmbed: a$b,
5845
- Option: r$6,
5846
- Paragraph: n$6,
5847
- RadioButton: s$3,
5848
- RemixForm: n$3,
5858
+ Link: n$6,
5859
+ List: d$4,
5860
+ ListItem: a$4,
5861
+ MarkdownEmbed: a$a,
5862
+ Option: r$3,
5863
+ Paragraph: n$7,
5864
+ RadioButton: s$4,
5865
+ RemixForm: n$4,
5849
5866
  RichTextLink: o$4,
5850
- Select: c$1,
5851
- Separator: n$2,
5867
+ Select: c,
5868
+ Separator: n$3,
5852
5869
  Slot: e$5,
5853
- Span: n$4,
5854
- Subscript: c$5,
5855
- Superscript: c$6,
5856
- Text: s$6,
5857
- Textarea: c$2,
5858
- Time: s,
5859
- Video: r$4,
5870
+ Span: n$5,
5871
+ Subscript: c$3,
5872
+ Superscript: c$4,
5873
+ Text: s$7,
5874
+ Textarea: n$2,
5875
+ Time: s$1,
5876
+ Video: p$2,
5860
5877
  Vimeo: m$2,
5861
- VimeoPlayButton: s$2,
5862
- VimeoPreviewImage: a$2,
5863
- VimeoSpinner: s$1,
5878
+ VimeoPlayButton: s$3,
5879
+ VimeoPreviewImage: p$6,
5880
+ VimeoSpinner: s$2,
5864
5881
  XmlNode: e$1,
5865
5882
  XmlTime: a$1,
5866
- YouTube: p$3
5883
+ YouTube: p$7
5867
5884
  }, Symbol.toStringTag, { value: "Module" }));
5868
5885
  const o$2 = {
5869
5886
  category: "animations",
@@ -5884,10 +5901,10 @@ const n$1 = (t2) => new Proxy(
5884
5901
  return `${t2}${e2}`;
5885
5902
  }
5886
5903
  }
5887
- ), r$3 = n$1(
5904
+ ), r$1 = n$1(
5888
5905
  "@webstudio-is/sdk-components-animation:"
5889
5906
  );
5890
- const r$2 = {
5907
+ const p$1 = {
5891
5908
  category: "animations",
5892
5909
  type: "container",
5893
5910
  description: "Text animation allows you to split text by char or by word to animate it.",
@@ -5895,14 +5912,17 @@ const r$2 = {
5895
5912
  order: 6,
5896
5913
  label: "Text Animation",
5897
5914
  constraints: [
5898
- { relation: "parent", component: { $eq: r$3.AnimateChildren } },
5915
+ { relation: "parent", component: { $eq: r$1.AnimateChildren } },
5899
5916
  {
5900
5917
  relation: "child",
5901
5918
  text: false
5902
5919
  }
5903
- ]
5920
+ ],
5921
+ presetStyle: {
5922
+ div
5923
+ }
5904
5924
  };
5905
- const r$1 = {
5925
+ const s = {
5906
5926
  category: "animations",
5907
5927
  type: "container",
5908
5928
  description: "Stagger animation allows you to animate children elements with a sliding window.",
@@ -5910,19 +5930,22 @@ const r$1 = {
5910
5930
  order: 6,
5911
5931
  label: "Stagger Animation",
5912
5932
  constraints: [
5913
- { relation: "parent", component: { $eq: r$3.AnimateChildren } },
5933
+ { relation: "parent", component: { $eq: r$1.AnimateChildren } },
5914
5934
  {
5915
5935
  relation: "child",
5916
5936
  text: false
5917
5937
  }
5918
- ]
5938
+ ],
5939
+ presetStyle: {
5940
+ div
5941
+ }
5919
5942
  };
5920
5943
  const a = {
5921
5944
  type: "container",
5922
5945
  icon: Youtube1cIcon,
5923
5946
  label: "Video Animation",
5924
5947
  constraints: [
5925
- { relation: "parent", component: { $eq: r$3.AnimateChildren } },
5948
+ { relation: "parent", component: { $eq: r$1.AnimateChildren } },
5926
5949
  {
5927
5950
  relation: "child",
5928
5951
  text: false
@@ -5932,16 +5955,16 @@ const a = {
5932
5955
  const animationComponentMetas = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5933
5956
  __proto__: null,
5934
5957
  AnimateChildren: o$2,
5935
- AnimateText: r$2,
5936
- StaggerAnimation: r$1,
5958
+ AnimateText: p$1,
5959
+ StaggerAnimation: s,
5937
5960
  VideoAnimation: a
5938
5961
  }, Symbol.toStringTag, { value: "Module" }));
5939
5962
  const remixComponentMetas = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5940
5963
  __proto__: null,
5941
- Body: n$7,
5942
- Form: c$3,
5943
- Link: n$5,
5944
- RemixForm: n$3,
5964
+ Body: n$8,
5965
+ Form: c$1,
5966
+ Link: n$6,
5967
+ RemixForm: n$4,
5945
5968
  RichTextLink: o$4
5946
5969
  }, Symbol.toStringTag, { value: "Module" }));
5947
5970
  const r = (t2) => new Proxy(
@@ -6087,7 +6110,7 @@ const S$1 = {
6087
6110
  }, h$1 = {
6088
6111
  type: "container",
6089
6112
  presetStyle: {
6090
- p: p$9
6113
+ p: p$d
6091
6114
  },
6092
6115
  icon: TextIcon,
6093
6116
  constraints: {
@@ -6816,10 +6839,10 @@ const createFramework$2 = async () => {
6816
6839
  };
6817
6840
  const reactRouterComponentMetas = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6818
6841
  __proto__: null,
6819
- Body: n$7,
6820
- Form: c$3,
6821
- Link: n$5,
6822
- RemixForm: n$3,
6842
+ Body: n$8,
6843
+ Form: c$1,
6844
+ Link: n$6,
6845
+ RemixForm: n$4,
6823
6846
  RichTextLink: o$4
6824
6847
  }, Symbol.toStringTag, { value: "Module" }));
6825
6848
  const createFramework$1 = async () => {
@@ -7642,7 +7665,7 @@ const getDeploymentInstructions = (deployTarget) => {
7642
7665
  }
7643
7666
  };
7644
7667
  const name = "webstudio";
7645
- const version = "0.214.0";
7668
+ const version = "0.216.0";
7646
7669
  const description = "Webstudio CLI";
7647
7670
  const author = "Webstudio <github@webstudio.is>";
7648
7671
  const homepage = "https://webstudio.is";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "webstudio",
3
- "version": "0.214.0",
3
+ "version": "0.216.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/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
- "@webstudio-is/tsconfig": "1.0.7",
81
- "@webstudio-is/css-engine": "0.214.0"
71
+ "@webstudio-is/css-engine": "0.216.0",
72
+ "@webstudio-is/http-client": "0.216.0",
73
+ "@webstudio-is/image": "0.216.0",
74
+ "@webstudio-is/react-sdk": "0.216.0",
75
+ "@webstudio-is/sdk": "0.216.0",
76
+ "@webstudio-is/sdk-components-animation": "0.216.0",
77
+ "@webstudio-is/sdk-components-react": "0.216.0",
78
+ "@webstudio-is/sdk-components-react-remix": "0.216.0",
79
+ "@webstudio-is/sdk-components-react-radix": "0.216.0",
80
+ "@webstudio-is/sdk-components-react-router": "0.216.0",
81
+ "@webstudio-is/tsconfig": "1.0.7"
82
82
  },
83
83
  "scripts": {
84
84
  "typecheck": "tsc",
@@ -275,6 +275,7 @@ const Outlet = () => {
275
275
  assetBaseUrl,
276
276
  resources,
277
277
  breakpoints,
278
+ onError: console.error,
278
279
  }}
279
280
  >
280
281
  {/* Use the URL as the key to force scripts in HTML Embed to reload on dynamic pages */}
@@ -66,6 +66,7 @@ export const loader = async (arg: LoaderFunctionArgs) => {
66
66
  assetBaseUrl,
67
67
  resources,
68
68
  breakpoints,
69
+ onError: console.error,
69
70
  }}
70
71
  >
71
72
  <Page system={system} />
@@ -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.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",
14
+ "@webstudio-is/image": "0.216.0",
15
+ "@webstudio-is/react-sdk": "0.216.0",
16
+ "@webstudio-is/sdk": "0.216.0",
17
+ "@webstudio-is/sdk-components-react": "0.216.0",
18
+ "@webstudio-is/sdk-components-animation": "0.216.0",
19
+ "@webstudio-is/sdk-components-react-radix": "0.216.0",
20
+ "@webstudio-is/sdk-components-react-remix": "0.216.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"
@@ -274,6 +274,7 @@ const Outlet = () => {
274
274
  assetBaseUrl,
275
275
  resources,
276
276
  breakpoints,
277
+ onError: console.error,
277
278
  }}
278
279
  >
279
280
  {/* Use the URL as the key to force scripts in HTML Embed to reload on dynamic pages */}
@@ -66,6 +66,7 @@ export const loader = async (arg: LoaderFunctionArgs) => {
66
66
  assetBaseUrl,
67
67
  resources,
68
68
  breakpoints,
69
+ onError: console.error,
69
70
  }}
70
71
  >
71
72
  <Page system={system} />
@@ -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.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",
13
+ "@webstudio-is/image": "0.216.0",
14
+ "@webstudio-is/react-sdk": "0.216.0",
15
+ "@webstudio-is/sdk": "0.216.0",
16
+ "@webstudio-is/sdk-components-animation": "0.216.0",
17
+ "@webstudio-is/sdk-components-react-radix": "0.216.0",
18
+ "@webstudio-is/sdk-components-react-router": "0.216.0",
19
+ "@webstudio-is/sdk-components-react": "0.216.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",
@@ -12,6 +12,7 @@ const PageComponent = ({ data }: { data: PageContext["data"] }) => {
12
12
  assetBaseUrl,
13
13
  resources,
14
14
  breakpoints,
15
+ onError: console.error,
15
16
  }}
16
17
  >
17
18
  {/* Use the URL as the key to force scripts in HTML Embed to reload on dynamic pages */}
@@ -8,12 +8,12 @@
8
8
  "typecheck": "tsc"
9
9
  },
10
10
  "dependencies": {
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",
11
+ "@webstudio-is/image": "0.216.0",
12
+ "@webstudio-is/react-sdk": "0.216.0",
13
+ "@webstudio-is/sdk": "0.216.0",
14
+ "@webstudio-is/sdk-components-react": "0.216.0",
15
+ "@webstudio-is/sdk-components-animation": "0.216.0",
16
+ "@webstudio-is/sdk-components-react-radix": "0.216.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"