@makeswift/runtime 0.6.2 → 0.6.3

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.
Files changed (102) hide show
  1. package/dist/Box.cjs.js +1 -1
  2. package/dist/Box.es.js +1 -1
  3. package/dist/Button.cjs.js +1 -1
  4. package/dist/Button.es.js +1 -1
  5. package/dist/Carousel.cjs.js +1 -1
  6. package/dist/Carousel.es.js +1 -1
  7. package/dist/Countdown.cjs.js +1 -1
  8. package/dist/Countdown.es.js +1 -1
  9. package/dist/Divider.cjs.js +1 -1
  10. package/dist/Divider.es.js +1 -1
  11. package/dist/EditableText.cjs.js +11 -2
  12. package/dist/EditableText.cjs.js.map +1 -1
  13. package/dist/EditableText.es.js +13 -4
  14. package/dist/EditableText.es.js.map +1 -1
  15. package/dist/Embed.cjs.js +1 -1
  16. package/dist/Embed.es.js +1 -1
  17. package/dist/Form.cjs.js +1 -1
  18. package/dist/Form.es.js +1 -1
  19. package/dist/Image.cjs.js +3 -6
  20. package/dist/Image.cjs.js.map +1 -1
  21. package/dist/Image.es.js +4 -7
  22. package/dist/Image.es.js.map +1 -1
  23. package/dist/LiveProvider.cjs.js +1 -1
  24. package/dist/LiveProvider.es.js +1 -1
  25. package/dist/Navigation.cjs.js +1 -1
  26. package/dist/Navigation.es.js +1 -1
  27. package/dist/PreviewProvider.cjs.js +2 -2
  28. package/dist/PreviewProvider.cjs.js.map +1 -1
  29. package/dist/PreviewProvider.es.js +2 -2
  30. package/dist/ReadOnlyText.cjs.js +2 -2
  31. package/dist/ReadOnlyText.es.js +2 -2
  32. package/dist/Root.cjs.js +1 -1
  33. package/dist/Root.es.js +1 -1
  34. package/dist/SocialLinks.cjs.js +1 -1
  35. package/dist/SocialLinks.es.js +1 -1
  36. package/dist/Text.cjs.js +1 -1
  37. package/dist/Text.es.js +1 -1
  38. package/dist/Video.cjs.js +1 -1
  39. package/dist/Video.es.js +1 -1
  40. package/dist/builder.cjs.js +1 -1
  41. package/dist/builder.es.js +1 -1
  42. package/dist/components.cjs.js +1 -1
  43. package/dist/components.es.js +1 -1
  44. package/dist/constants.cjs.js +20 -20
  45. package/dist/constants.cjs.js.map +1 -1
  46. package/dist/constants.es.js +2 -2
  47. package/dist/control-serialization.cjs.js +37 -37
  48. package/dist/control-serialization.cjs.js.map +1 -1
  49. package/dist/control-serialization.es.js +1 -1
  50. package/dist/control.cjs.js +22 -22
  51. package/dist/control.cjs.js.map +1 -1
  52. package/dist/control.es.js +1 -1
  53. package/dist/controls.cjs.js +21 -17
  54. package/dist/controls.cjs.js.map +1 -1
  55. package/dist/controls.es.js +1 -1
  56. package/dist/index.cjs.js +235 -209
  57. package/dist/index.cjs.js.map +1 -1
  58. package/dist/index.cjs2.js +1 -1
  59. package/dist/index.cjs5.js +36 -139
  60. package/dist/index.cjs5.js.map +1 -1
  61. package/dist/index.cjs6.js +141 -0
  62. package/dist/index.cjs6.js.map +1 -0
  63. package/dist/index.es.js +48 -25
  64. package/dist/index.es.js.map +1 -1
  65. package/dist/index.es2.js +1 -1
  66. package/dist/index.es5.js +34 -138
  67. package/dist/index.es5.js.map +1 -1
  68. package/dist/index.es6.js +139 -0
  69. package/dist/index.es6.js.map +1 -0
  70. package/dist/main.cjs.js +1 -1
  71. package/dist/main.es.js +1 -1
  72. package/dist/next.cjs.js +1 -1
  73. package/dist/next.es.js +2 -2
  74. package/dist/prop-controllers.cjs.js +4 -4
  75. package/dist/prop-controllers.es.js +1 -1
  76. package/dist/react.cjs.js +1 -1
  77. package/dist/react.es.js +1 -1
  78. package/dist/{slot.cjs.js → rich-text.cjs.js} +84 -8
  79. package/dist/rich-text.cjs.js.map +1 -0
  80. package/dist/{slot.es.js → rich-text.es.js} +80 -8
  81. package/dist/rich-text.es.js.map +1 -0
  82. package/dist/types/src/components/builtin/Image/Image.d.ts.map +1 -1
  83. package/dist/types/src/components/builtin/Text/EditableText.d.ts.map +1 -1
  84. package/dist/types/src/controls/index.d.ts +1 -0
  85. package/dist/types/src/controls/index.d.ts.map +1 -1
  86. package/dist/types/src/controls/rich-text.d.ts +66 -0
  87. package/dist/types/src/controls/rich-text.d.ts.map +1 -0
  88. package/dist/types/src/controls/style.d.ts +16 -4
  89. package/dist/types/src/controls/style.d.ts.map +1 -1
  90. package/dist/types/src/prop-controllers/descriptors.d.ts +4 -2
  91. package/dist/types/src/prop-controllers/descriptors.d.ts.map +1 -1
  92. package/dist/types/src/prop-controllers/instances.d.ts +13 -3
  93. package/dist/types/src/prop-controllers/instances.d.ts.map +1 -1
  94. package/dist/types/src/runtimes/react/controls/rich-text.d.ts +8 -0
  95. package/dist/types/src/runtimes/react/controls/rich-text.d.ts.map +1 -0
  96. package/dist/types/src/runtimes/react/controls/slot.d.ts.map +1 -1
  97. package/dist/types/src/runtimes/react/controls.d.ts.map +1 -1
  98. package/dist/types/src/runtimes/react/poll-box-model.d.ts +6 -0
  99. package/dist/types/src/runtimes/react/poll-box-model.d.ts.map +1 -0
  100. package/package.json +1 -1
  101. package/dist/slot.cjs.js.map +0 -1
  102. package/dist/slot.es.js.map +0 -1
package/dist/index.cjs.js CHANGED
@@ -45,7 +45,7 @@ var css = require("@emotion/css");
45
45
  var serialize = require("@emotion/serialize");
46
46
  var utils = require("@emotion/utils");
47
47
  var jsxRuntime = require("react/jsx-runtime");
48
- var slot = require("./slot.cjs.js");
48
+ var richText = require("./rich-text.cjs.js");
49
49
  var textInput = require("./text-input.cjs.js");
50
50
  var combobox = require("./combobox.cjs.js");
51
51
  var control = require("./control.cjs.js");
@@ -180,13 +180,13 @@ async function introspect(element, client, store) {
180
180
  getResourcesFromElementDescriptors({ propName: descriptor.config.type }, { propName: item.value });
181
181
  });
182
182
  }
183
- if (descriptor.type === slot.Types.Shape) {
183
+ if (descriptor.type === richText.Types.Shape) {
184
184
  const prop = props[propName];
185
185
  if (prop == null)
186
186
  return;
187
187
  getResourcesFromElementDescriptors(descriptor.options.type, prop);
188
188
  }
189
- if (descriptor.type === slot.Types.List) {
189
+ if (descriptor.type === richText.Types.List) {
190
190
  const prop = props[propName];
191
191
  if (prop == null)
192
192
  return;
@@ -1083,7 +1083,7 @@ class Document$1 extends NextDocument__default["default"] {
1083
1083
  });
1084
1084
  }
1085
1085
  }
1086
- const version = "0.6.2";
1086
+ const version = "0.6.3";
1087
1087
  function isErrorWithMessage(error) {
1088
1088
  return typeof error === "object" && error !== null && "message" in error && typeof error.message === "string";
1089
1089
  }
@@ -1414,13 +1414,13 @@ function registerComponent$c(runtime) {
1414
1414
  type: constants.MakeswiftComponentType.Box,
1415
1415
  label: "Box",
1416
1416
  props: {
1417
- id: slot.ElementID(),
1418
- backgrounds: slot.Backgrounds(),
1419
- width: slot.Width({
1420
- format: slot.Width.Format.ClassName,
1417
+ id: richText.ElementID(),
1418
+ backgrounds: richText.Backgrounds(),
1419
+ width: richText.Width({
1420
+ format: richText.Width.Format.ClassName,
1421
1421
  defaultValue: { value: 100, unit: "%" }
1422
1422
  }),
1423
- height: slot.ResponsiveIconRadioGroup({
1423
+ height: richText.ResponsiveIconRadioGroup({
1424
1424
  label: "Height",
1425
1425
  options: [
1426
1426
  { value: "auto", label: "Auto", icon: "HeightAuto16" },
@@ -1428,7 +1428,7 @@ function registerComponent$c(runtime) {
1428
1428
  ],
1429
1429
  defaultValue: "auto"
1430
1430
  }),
1431
- verticalAlign: slot.ResponsiveIconRadioGroup({
1431
+ verticalAlign: richText.ResponsiveIconRadioGroup({
1432
1432
  label: "Align items",
1433
1433
  options: [
1434
1434
  { value: "flex-start", label: "Top", icon: "VerticalAlignStart16" },
@@ -1442,9 +1442,9 @@ function registerComponent$c(runtime) {
1442
1442
  ],
1443
1443
  defaultValue: "flex-start"
1444
1444
  }),
1445
- margin: slot.Margin({ format: slot.Margin.Format.ClassName }),
1446
- padding: slot.Padding({
1447
- format: slot.Padding.Format.ClassName,
1445
+ margin: richText.Margin({ format: richText.Margin.Format.ClassName }),
1446
+ padding: richText.Padding({
1447
+ format: richText.Padding.Format.ClassName,
1448
1448
  preset: [
1449
1449
  {
1450
1450
  deviceId: "desktop",
@@ -1457,16 +1457,16 @@ function registerComponent$c(runtime) {
1457
1457
  }
1458
1458
  ]
1459
1459
  }),
1460
- border: slot.Border({ format: slot.Border.Format.ClassName }),
1461
- borderRadius: slot.BorderRadius({ format: slot.BorderRadius.Format.ClassName }),
1462
- boxShadow: slot.Shadows({ format: slot.Shadows.Format.ClassName }),
1463
- rowGap: slot.GapY((props) => ({
1460
+ border: richText.Border({ format: richText.Border.Format.ClassName }),
1461
+ borderRadius: richText.BorderRadius({ format: richText.BorderRadius.Format.ClassName }),
1462
+ boxShadow: richText.Shadows({ format: richText.Shadows.Format.ClassName }),
1463
+ rowGap: richText.GapY((props) => ({
1464
1464
  hidden: props.children == null
1465
1465
  })),
1466
- columnGap: slot.GapX((props) => ({
1466
+ columnGap: richText.GapX((props) => ({
1467
1467
  hidden: props.children == null
1468
1468
  })),
1469
- boxAnimateType: slot.ResponsiveSelect({
1469
+ boxAnimateType: richText.ResponsiveSelect({
1470
1470
  label: "Animate box in",
1471
1471
  labelOrientation: "vertical",
1472
1472
  options: [
@@ -1482,7 +1482,7 @@ function registerComponent$c(runtime) {
1482
1482
  ],
1483
1483
  defaultValue: "none"
1484
1484
  }),
1485
- boxAnimateDuration: slot.ResponsiveNumber((props, device) => ({
1485
+ boxAnimateDuration: richText.ResponsiveNumber((props, device) => ({
1486
1486
  label: "Box duration",
1487
1487
  defaultValue: DEFAULT_BOX_ANIMATE_DURATION,
1488
1488
  min: 0.1,
@@ -1490,7 +1490,7 @@ function registerComponent$c(runtime) {
1490
1490
  suffix: "s",
1491
1491
  hidden: isHiddenBasedOnBoxAnimation(props, device)
1492
1492
  })),
1493
- boxAnimateDelay: slot.ResponsiveNumber((props, device) => ({
1493
+ boxAnimateDelay: richText.ResponsiveNumber((props, device) => ({
1494
1494
  label: "Box delay",
1495
1495
  defaultValue: DEFAULT_BOX_ANIMATE_DELAY,
1496
1496
  min: 0,
@@ -1498,7 +1498,7 @@ function registerComponent$c(runtime) {
1498
1498
  suffix: "s",
1499
1499
  hidden: isHiddenBasedOnBoxAnimation(props, device)
1500
1500
  })),
1501
- itemAnimateType: slot.ResponsiveSelect({
1501
+ itemAnimateType: richText.ResponsiveSelect({
1502
1502
  label: "Animate items in",
1503
1503
  labelOrientation: "vertical",
1504
1504
  options: [
@@ -1514,7 +1514,7 @@ function registerComponent$c(runtime) {
1514
1514
  ],
1515
1515
  defaultValue: "none"
1516
1516
  }),
1517
- itemAnimateDuration: slot.ResponsiveNumber((props, device) => ({
1517
+ itemAnimateDuration: richText.ResponsiveNumber((props, device) => ({
1518
1518
  label: "Items duration",
1519
1519
  defaultValue: DEFAULT_BOX_ANIMATE_DURATION,
1520
1520
  min: 0.1,
@@ -1522,7 +1522,7 @@ function registerComponent$c(runtime) {
1522
1522
  suffix: "s",
1523
1523
  hidden: isHiddenBasedOnItemAnimation(props, device)
1524
1524
  })),
1525
- itemAnimateDelay: slot.ResponsiveNumber((props, device) => ({
1525
+ itemAnimateDelay: richText.ResponsiveNumber((props, device) => ({
1526
1526
  label: "Items delay",
1527
1527
  defaultValue: DEFAULT_ITEM_ANIMATE_DELAY,
1528
1528
  min: 0,
@@ -1530,7 +1530,7 @@ function registerComponent$c(runtime) {
1530
1530
  suffix: "s",
1531
1531
  hidden: isHiddenBasedOnItemAnimation(props, device)
1532
1532
  })),
1533
- itemStaggerDuration: slot.ResponsiveNumber((props, device) => ({
1533
+ itemStaggerDuration: richText.ResponsiveNumber((props, device) => ({
1534
1534
  label: "Stagger",
1535
1535
  min: 0,
1536
1536
  step: 0.05,
@@ -1538,11 +1538,11 @@ function registerComponent$c(runtime) {
1538
1538
  defaultValue: DEFAULT_ITEM_STAGGER_DURATION,
1539
1539
  hidden: isHiddenBasedOnItemAnimation(props, device)
1540
1540
  })),
1541
- hidePlaceholder: slot.Checkbox((props) => ({
1541
+ hidePlaceholder: richText.Checkbox((props) => ({
1542
1542
  label: "Hide placeholder",
1543
1543
  hidden: props.children != null
1544
1544
  })),
1545
- children: slot.Grid()
1545
+ children: richText.Grid()
1546
1546
  }
1547
1547
  });
1548
1548
  }
@@ -1553,9 +1553,9 @@ function registerComponent$b(runtime) {
1553
1553
  type: constants.MakeswiftComponentType.Button,
1554
1554
  label: "Button",
1555
1555
  props: {
1556
- id: slot.ElementID(),
1557
- children: slot.TextInput({ placeholder: "Button text" }),
1558
- link: slot.Link({
1556
+ id: richText.ElementID(),
1557
+ children: richText.TextInput({ placeholder: "Button text" }),
1558
+ link: richText.Link({
1559
1559
  defaultValue: {
1560
1560
  type: "OPEN_PAGE",
1561
1561
  payload: {
@@ -1564,7 +1564,7 @@ function registerComponent$b(runtime) {
1564
1564
  }
1565
1565
  }
1566
1566
  }),
1567
- variant: slot.ResponsiveSelect({
1567
+ variant: richText.ResponsiveSelect({
1568
1568
  label: "Style",
1569
1569
  labelOrientation: "horizontal",
1570
1570
  options: [
@@ -1578,7 +1578,7 @@ function registerComponent$b(runtime) {
1578
1578
  ],
1579
1579
  defaultValue: "flat"
1580
1580
  }),
1581
- shape: slot.ResponsiveIconRadioGroup({
1581
+ shape: richText.ResponsiveIconRadioGroup({
1582
1582
  label: "Shape",
1583
1583
  options: [
1584
1584
  { label: "Pill", value: "pill", icon: "ButtonPill16" },
@@ -1587,7 +1587,7 @@ function registerComponent$b(runtime) {
1587
1587
  ],
1588
1588
  defaultValue: "rounded"
1589
1589
  }),
1590
- size: slot.ResponsiveIconRadioGroup({
1590
+ size: richText.ResponsiveIconRadioGroup({
1591
1591
  label: "Size",
1592
1592
  options: [
1593
1593
  { label: "Small", value: "small", icon: "SizeSmall16" },
@@ -1596,19 +1596,19 @@ function registerComponent$b(runtime) {
1596
1596
  ],
1597
1597
  defaultValue: "medium"
1598
1598
  }),
1599
- color: slot.ResponsiveColor((props, device) => {
1599
+ color: richText.ResponsiveColor((props, device) => {
1600
1600
  var _a;
1601
1601
  const variant = props.variant;
1602
1602
  const hidden = ((_a = findDeviceOverride(variant, device)) == null ? void 0 : _a.value) === "clear";
1603
1603
  return { placeholder: "black", hidden };
1604
1604
  }),
1605
- textColor: slot.ResponsiveColor({
1605
+ textColor: richText.ResponsiveColor({
1606
1606
  label: "Text color",
1607
1607
  placeholder: "white"
1608
1608
  }),
1609
- textStyle: slot.TextStyle(),
1610
- width: slot.Width(),
1611
- margin: slot.Margin({ format: slot.Margin.Format.ClassName })
1609
+ textStyle: richText.TextStyle(),
1610
+ width: richText.Width(),
1611
+ margin: richText.Margin({ format: richText.Margin.Format.ClassName })
1612
1612
  }
1613
1613
  });
1614
1614
  }
@@ -1620,20 +1620,20 @@ function registerComponent$a(runtime) {
1620
1620
  label: "Carousel",
1621
1621
  icon: "Carousel40",
1622
1622
  props: {
1623
- id: slot.ElementID(),
1624
- images: slot.Images({
1623
+ id: richText.ElementID(),
1624
+ images: richText.Images({
1625
1625
  preset: [
1626
1626
  { key: uuid__default["default"](), props: {} },
1627
1627
  { key: uuid__default["default"](), props: {} },
1628
1628
  { key: uuid__default["default"](), props: {} }
1629
1629
  ]
1630
1630
  }),
1631
- width: slot.Width({
1632
- format: slot.Width.Format.ClassName,
1631
+ width: richText.Width({
1632
+ format: richText.Width.Format.ClassName,
1633
1633
  defaultValue: { value: 400, unit: "px" }
1634
1634
  }),
1635
- margin: slot.Margin({ format: slot.Margin.Format.ClassName }),
1636
- pageSize: slot.ResponsiveNumber((props) => {
1635
+ margin: richText.Margin({ format: richText.Margin.Format.ClassName }),
1636
+ pageSize: richText.ResponsiveNumber((props) => {
1637
1637
  var _a;
1638
1638
  const images = props.images;
1639
1639
  const imagesLength = (_a = images == null ? void 0 : images.length) != null ? _a : 0;
@@ -1645,7 +1645,7 @@ function registerComponent$a(runtime) {
1645
1645
  step: 1
1646
1646
  };
1647
1647
  }),
1648
- step: slot.ResponsiveNumber((props, device) => {
1648
+ step: richText.ResponsiveNumber((props, device) => {
1649
1649
  var _a, _b;
1650
1650
  const pageSize = props.pageSize;
1651
1651
  const pageSizeValue = (_b = (_a = findDeviceOverride(pageSize, device)) == null ? void 0 : _a.value) != null ? _b : 1;
@@ -1657,7 +1657,7 @@ function registerComponent$a(runtime) {
1657
1657
  step: 1
1658
1658
  };
1659
1659
  }),
1660
- slideAlignment: slot.ResponsiveIconRadioGroup({
1660
+ slideAlignment: richText.ResponsiveIconRadioGroup({
1661
1661
  label: "Alignment",
1662
1662
  options: [
1663
1663
  { label: "Top", value: "flex-start", icon: "VerticalAlignStart16" },
@@ -1666,13 +1666,13 @@ function registerComponent$a(runtime) {
1666
1666
  ],
1667
1667
  defaultValue: "center"
1668
1668
  }),
1669
- gap: slot.GapX({
1669
+ gap: richText.GapX({
1670
1670
  label: "Gap",
1671
1671
  step: 5,
1672
1672
  defaultValue: { value: 0, unit: "px" }
1673
1673
  }),
1674
- autoplay: slot.Checkbox({ label: "Autoplay" }),
1675
- delay: slot.Number((props) => ({
1674
+ autoplay: richText.Checkbox({ label: "Autoplay" }),
1675
+ delay: richText.Number((props) => ({
1676
1676
  label: "Delay",
1677
1677
  preset: 5,
1678
1678
  min: 1,
@@ -1680,8 +1680,8 @@ function registerComponent$a(runtime) {
1680
1680
  suffix: "seconds",
1681
1681
  hidden: !props.autoplay
1682
1682
  })),
1683
- showArrows: slot.Checkbox({ preset: true, label: "Show arrows" }),
1684
- arrowPosition: slot.ResponsiveIconRadioGroup((props) => ({
1683
+ showArrows: richText.Checkbox({ preset: true, label: "Show arrows" }),
1684
+ arrowPosition: richText.ResponsiveIconRadioGroup((props) => ({
1685
1685
  label: "Arrow position",
1686
1686
  options: [
1687
1687
  { label: "Inside", value: "inside", icon: "ArrowInside16" },
@@ -1691,24 +1691,24 @@ function registerComponent$a(runtime) {
1691
1691
  defaultValue: "inside",
1692
1692
  hidden: props.showArrows === false
1693
1693
  })),
1694
- arrowColor: slot.ResponsiveColor((props) => ({
1694
+ arrowColor: richText.ResponsiveColor((props) => ({
1695
1695
  label: "Arrow color",
1696
1696
  placeholder: "black",
1697
1697
  hidden: props.showArrows === false
1698
1698
  })),
1699
- arrowBackground: slot.ResponsiveColor((props) => ({
1699
+ arrowBackground: richText.ResponsiveColor((props) => ({
1700
1700
  label: "Arrow background",
1701
1701
  placeholder: "white",
1702
1702
  hidden: props.showArrows === false
1703
1703
  })),
1704
- showDots: slot.Checkbox({ preset: true, label: "Show dots" }),
1705
- dotColor: slot.ResponsiveColor((props) => ({
1704
+ showDots: richText.Checkbox({ preset: true, label: "Show dots" }),
1705
+ dotColor: richText.ResponsiveColor((props) => ({
1706
1706
  label: "Dot color",
1707
1707
  placeholder: "black",
1708
1708
  hidden: props.showDots === false
1709
1709
  })),
1710
- slideBorder: slot.Border({ format: slot.Border.Format.ClassName }),
1711
- slideBorderRadius: slot.BorderRadius({ format: slot.BorderRadius.Format.ClassName })
1710
+ slideBorder: richText.Border({ format: richText.Border.Format.ClassName }),
1711
+ slideBorderRadius: richText.BorderRadius({ format: richText.BorderRadius.Format.ClassName })
1712
1712
  }
1713
1713
  });
1714
1714
  }
@@ -1720,11 +1720,11 @@ function registerComponent$9(runtime) {
1720
1720
  label: "Countdown",
1721
1721
  icon: "Countdown40",
1722
1722
  props: {
1723
- id: slot.ElementID(),
1724
- date: slot.Date(() => ({
1723
+ id: richText.ElementID(),
1724
+ date: richText.Date(() => ({
1725
1725
  preset: new Date(Date.now() + 1e3 * 60 * 60 * 24 * 2).toISOString()
1726
1726
  })),
1727
- variant: slot.ResponsiveIconRadioGroup({
1727
+ variant: richText.ResponsiveIconRadioGroup({
1728
1728
  label: "Style",
1729
1729
  options: [
1730
1730
  { label: "Filled", value: "filled", icon: "CountdownSolid16" },
@@ -1743,7 +1743,7 @@ function registerComponent$9(runtime) {
1743
1743
  ],
1744
1744
  defaultValue: "filled"
1745
1745
  }),
1746
- shape: slot.ResponsiveIconRadioGroup({
1746
+ shape: richText.ResponsiveIconRadioGroup({
1747
1747
  label: "Shape",
1748
1748
  options: [
1749
1749
  { label: "Pill", value: "pill", icon: "ButtonPill16" },
@@ -1752,7 +1752,7 @@ function registerComponent$9(runtime) {
1752
1752
  ],
1753
1753
  defaultValue: "rounded"
1754
1754
  }),
1755
- size: slot.ResponsiveIconRadioGroup({
1755
+ size: richText.ResponsiveIconRadioGroup({
1756
1756
  label: "Size",
1757
1757
  options: [
1758
1758
  { label: "Small", value: "small", icon: "SizeSmall16" },
@@ -1761,7 +1761,7 @@ function registerComponent$9(runtime) {
1761
1761
  ],
1762
1762
  defaultValue: "medium"
1763
1763
  }),
1764
- gap: slot.GapX({
1764
+ gap: richText.GapX({
1765
1765
  preset: [{ deviceId: "desktop", value: { value: 10, unit: "px" } }],
1766
1766
  label: "Gap",
1767
1767
  step: 1,
@@ -1769,32 +1769,32 @@ function registerComponent$9(runtime) {
1769
1769
  max: 100,
1770
1770
  defaultValue: { value: 0, unit: "px" }
1771
1771
  }),
1772
- numberFont: slot.Font({ label: "Number font" }),
1773
- numberColor: slot.ResponsiveColor({
1772
+ numberFont: richText.Font({ label: "Number font" }),
1773
+ numberColor: richText.ResponsiveColor({
1774
1774
  label: "Number color",
1775
1775
  placeholder: "white"
1776
1776
  }),
1777
- blockColor: slot.ResponsiveColor({
1777
+ blockColor: richText.ResponsiveColor({
1778
1778
  label: "Block color",
1779
1779
  placeholder: "black"
1780
1780
  }),
1781
- labelFont: slot.Font({ label: "Label font" }),
1782
- labelColor: slot.ResponsiveColor({
1781
+ labelFont: richText.Font({ label: "Label font" }),
1782
+ labelColor: richText.ResponsiveColor({
1783
1783
  label: "Label color",
1784
1784
  placeholder: "black"
1785
1785
  }),
1786
- width: slot.Width({
1787
- format: slot.Width.Format.ClassName,
1786
+ width: richText.Width({
1787
+ format: richText.Width.Format.ClassName,
1788
1788
  defaultValue: { value: 560, unit: "px" }
1789
1789
  }),
1790
- margin: slot.Margin({ format: slot.Margin.Format.ClassName }),
1791
- daysLabel: slot.TextInput({ label: "Days label", placeholder: "Days" }),
1792
- hoursLabel: slot.TextInput({ label: "Hours label", placeholder: "Hours" }),
1793
- minutesLabel: slot.TextInput({
1790
+ margin: richText.Margin({ format: richText.Margin.Format.ClassName }),
1791
+ daysLabel: richText.TextInput({ label: "Days label", placeholder: "Days" }),
1792
+ hoursLabel: richText.TextInput({ label: "Hours label", placeholder: "Hours" }),
1793
+ minutesLabel: richText.TextInput({
1794
1794
  label: "Minutes label",
1795
1795
  placeholder: "Minutes"
1796
1796
  }),
1797
- secondsLabel: slot.TextInput({
1797
+ secondsLabel: richText.TextInput({
1798
1798
  label: "Seconds label",
1799
1799
  placeholder: "Seconds"
1800
1800
  })
@@ -1809,8 +1809,8 @@ function registerComponent$8(runtime) {
1809
1809
  label: "Divider",
1810
1810
  icon: "Divider40",
1811
1811
  props: {
1812
- id: slot.ElementID(),
1813
- variant: slot.ResponsiveSelect({
1812
+ id: richText.ElementID(),
1813
+ variant: richText.ResponsiveSelect({
1814
1814
  label: "Style",
1815
1815
  labelOrientation: "horizontal",
1816
1816
  options: [
@@ -1821,17 +1821,17 @@ function registerComponent$8(runtime) {
1821
1821
  ],
1822
1822
  defaultValue: "solid"
1823
1823
  }),
1824
- thickness: slot.ResponsiveLength({
1824
+ thickness: richText.ResponsiveLength({
1825
1825
  label: "Height",
1826
1826
  defaultValue: { value: 1, unit: "px" },
1827
1827
  options: [{ value: "px", label: "Pixels", icon: "Px16" }]
1828
1828
  }),
1829
- color: slot.ResponsiveColor({ placeholder: "black" }),
1830
- width: slot.Width({
1831
- format: slot.Width.Format.ClassName,
1829
+ color: richText.ResponsiveColor({ placeholder: "black" }),
1830
+ width: richText.Width({
1831
+ format: richText.Width.Format.ClassName,
1832
1832
  defaultValue: { value: 100, unit: "%" }
1833
1833
  }),
1834
- margin: slot.Margin({ format: slot.Margin.Format.ClassName })
1834
+ margin: richText.Margin({ format: richText.Margin.Format.ClassName })
1835
1835
  }
1836
1836
  });
1837
1837
  }
@@ -1843,10 +1843,10 @@ function registerComponent$7(runtime) {
1843
1843
  label: "Embed",
1844
1844
  icon: "Code40",
1845
1845
  props: {
1846
- id: slot.ElementID(),
1847
- html: slot.TextArea({ label: "Code", rows: 20 }),
1848
- width: slot.Width({ format: slot.Width.Format.ClassName }),
1849
- margin: slot.Margin({ format: slot.Margin.Format.ClassName })
1846
+ id: richText.ElementID(),
1847
+ html: richText.TextArea({ label: "Code", rows: 20 }),
1848
+ width: richText.Width({ format: richText.Width.Format.ClassName }),
1849
+ margin: richText.Margin({ format: richText.Margin.Format.ClassName })
1850
1850
  }
1851
1851
  });
1852
1852
  }
@@ -1882,10 +1882,10 @@ function registerComponent$6(runtime) {
1882
1882
  label: "Form",
1883
1883
  icon: "Form40",
1884
1884
  props: {
1885
- id: slot.ElementID(),
1886
- tableId: slot.Table(),
1887
- fields: slot.TableFormFields(),
1888
- submitLink: slot.Link((props) => ({
1885
+ id: richText.ElementID(),
1886
+ tableId: richText.Table(),
1887
+ fields: richText.TableFormFields(),
1888
+ submitLink: richText.Link((props) => ({
1889
1889
  label: "Redirect to",
1890
1890
  options: [
1891
1891
  { value: "OPEN_PAGE", label: "Open page" },
@@ -1893,13 +1893,13 @@ function registerComponent$6(runtime) {
1893
1893
  ],
1894
1894
  hidden: props.tableId == null
1895
1895
  })),
1896
- gap: slot.GapY((props) => ({
1896
+ gap: richText.GapY((props) => ({
1897
1897
  preset: [{ deviceId: "desktop", value: { value: 10, unit: "px" } }],
1898
1898
  label: "Gap",
1899
1899
  defaultValue: { value: 0, unit: "px" },
1900
1900
  hidden: props.tableId == null
1901
1901
  })),
1902
- shape: slot.ResponsiveIconRadioGroup((props) => ({
1902
+ shape: richText.ResponsiveIconRadioGroup((props) => ({
1903
1903
  label: "Shape",
1904
1904
  options: [
1905
1905
  { label: "Pill", value: Shapes.PILL, icon: "ButtonPill16" },
@@ -1909,7 +1909,7 @@ function registerComponent$6(runtime) {
1909
1909
  defaultValue: Shapes.ROUNDED,
1910
1910
  hidden: props.tableId == null
1911
1911
  })),
1912
- size: slot.ResponsiveIconRadioGroup((props) => ({
1912
+ size: richText.ResponsiveIconRadioGroup((props) => ({
1913
1913
  label: "Size",
1914
1914
  options: [
1915
1915
  { label: "Small", value: Sizes.SMALL, icon: "SizeSmall16" },
@@ -1919,7 +1919,7 @@ function registerComponent$6(runtime) {
1919
1919
  defaultValue: Sizes.MEDIUM,
1920
1920
  hidden: (props == null ? void 0 : props.tableId) == null
1921
1921
  })),
1922
- contrast: slot.ResponsiveIconRadioGroup((props) => ({
1922
+ contrast: richText.ResponsiveIconRadioGroup((props) => ({
1923
1923
  label: "Color",
1924
1924
  options: [
1925
1925
  { label: "Light mode", value: Contrasts.LIGHT, icon: "Sun16" },
@@ -1928,8 +1928,8 @@ function registerComponent$6(runtime) {
1928
1928
  defaultValue: Contrasts.LIGHT,
1929
1929
  hidden: props.tableId == null
1930
1930
  })),
1931
- labelTextStyle: slot.TextStyle({ label: "Label text style" }),
1932
- labelTextColor: slot.ResponsiveColor((props, device) => {
1931
+ labelTextStyle: richText.TextStyle({ label: "Label text style" }),
1932
+ labelTextColor: richText.ResponsiveColor((props, device) => {
1933
1933
  const hidden = props.tableId == null;
1934
1934
  const responsiveContrast = props.contrast;
1935
1935
  const contrast = findDeviceOverride(responsiveContrast, device);
@@ -1939,23 +1939,23 @@ function registerComponent$6(runtime) {
1939
1939
  placeholder: (contrast == null ? void 0 : contrast.value) === Contrasts.DARK ? "rgba(255,255,255,0.95)" : "rgba(0,0,0,0.8)"
1940
1940
  };
1941
1941
  }),
1942
- submitTextStyle: slot.TextStyle({ label: "Button text style" }),
1943
- brandColor: slot.ResponsiveColor((props) => ({
1942
+ submitTextStyle: richText.TextStyle({ label: "Button text style" }),
1943
+ brandColor: richText.ResponsiveColor((props) => ({
1944
1944
  label: "Button color",
1945
1945
  placeholder: "black",
1946
1946
  hidden: props.tableId == null
1947
1947
  })),
1948
- submitTextColor: slot.ResponsiveColor((props) => ({
1948
+ submitTextColor: richText.ResponsiveColor((props) => ({
1949
1949
  label: "Button text color",
1950
1950
  placeholder: "white",
1951
1951
  hidden: props.tableId == null
1952
1952
  })),
1953
- submitLabel: slot.TextInput((props) => ({
1953
+ submitLabel: richText.TextInput((props) => ({
1954
1954
  label: "Button label",
1955
1955
  placeholder: "Submit",
1956
1956
  hidden: props.tableId == null
1957
1957
  })),
1958
- submitVariant: slot.ResponsiveSelect((props) => ({
1958
+ submitVariant: richText.ResponsiveSelect((props) => ({
1959
1959
  label: "Button style",
1960
1960
  options: [
1961
1961
  { value: "flat", label: "Flat" },
@@ -1969,11 +1969,11 @@ function registerComponent$6(runtime) {
1969
1969
  defaultValue: "flat",
1970
1970
  hidden: props.tableId == null
1971
1971
  })),
1972
- submitWidth: slot.ResponsiveLength((props) => ({
1972
+ submitWidth: richText.ResponsiveLength((props) => ({
1973
1973
  label: "Button width",
1974
1974
  hidden: props.tableId == null
1975
1975
  })),
1976
- submitAlignment: slot.ResponsiveIconRadioGroup((props) => ({
1976
+ submitAlignment: richText.ResponsiveIconRadioGroup((props) => ({
1977
1977
  label: "Button alignment",
1978
1978
  options: [
1979
1979
  { label: "Left", value: Alignments.LEFT, icon: "AlignLeft16" },
@@ -1983,12 +1983,12 @@ function registerComponent$6(runtime) {
1983
1983
  defaultValue: Alignments.CENTER,
1984
1984
  hidden: props.tableId == null
1985
1985
  })),
1986
- width: slot.Width({
1986
+ width: richText.Width({
1987
1987
  preset: [{ deviceId: "desktop", value: { value: 550, unit: "px" } }],
1988
1988
  defaultValue: { value: 100, unit: "%" },
1989
- format: slot.Width.Format.ClassName
1989
+ format: richText.Width.Format.ClassName
1990
1990
  }),
1991
- margin: slot.Margin({ format: slot.Margin.Format.ClassName })
1991
+ margin: richText.Margin({ format: richText.Margin.Format.ClassName })
1992
1992
  }
1993
1993
  });
1994
1994
  }
@@ -1999,17 +1999,17 @@ function registerComponent$5(runtime) {
1999
1999
  type: constants.MakeswiftComponentType.Image,
2000
2000
  label: "Image",
2001
2001
  props: {
2002
- id: slot.ElementID(),
2003
- file: slot.Image(),
2004
- altText: slot.TextInput({ label: "Alt text" }),
2005
- link: slot.Link({ label: "On click" }),
2006
- width: slot.Width(),
2007
- margin: slot.Margin({ format: slot.Margin.Format.ClassName }),
2008
- padding: slot.Padding({ format: slot.Padding.Format.ClassName }),
2009
- border: slot.Border({ format: slot.Border.Format.ClassName }),
2010
- borderRadius: slot.BorderRadius({ format: slot.BorderRadius.Format.ClassName }),
2011
- boxShadow: slot.Shadows({ format: slot.Shadows.Format.ClassName }),
2012
- opacity: slot.ResponsiveOpacity()
2002
+ id: richText.ElementID(),
2003
+ file: richText.Image(),
2004
+ altText: richText.TextInput({ label: "Alt text" }),
2005
+ link: richText.Link({ label: "On click" }),
2006
+ width: richText.Width(),
2007
+ margin: richText.Margin({ format: richText.Margin.Format.ClassName }),
2008
+ padding: richText.Padding({ format: richText.Padding.Format.ClassName }),
2009
+ border: richText.Border({ format: richText.Border.Format.ClassName }),
2010
+ borderRadius: richText.BorderRadius({ format: richText.BorderRadius.Format.ClassName }),
2011
+ boxShadow: richText.Shadows({ format: richText.Shadows.Format.ClassName }),
2012
+ opacity: richText.ResponsiveOpacity()
2013
2013
  }
2014
2014
  });
2015
2015
  }
@@ -2021,21 +2021,21 @@ function registerComponent$4(runtime) {
2021
2021
  label: "Navigation",
2022
2022
  icon: "Navigation40",
2023
2023
  props: {
2024
- id: slot.ElementID(),
2025
- links: slot.NavigationLinks(),
2026
- linkTextStyle: slot.TextStyle((props) => {
2024
+ id: richText.ElementID(),
2025
+ links: richText.NavigationLinks(),
2026
+ linkTextStyle: richText.TextStyle((props) => {
2027
2027
  const links = props.links;
2028
2028
  return {
2029
2029
  label: "Link text style",
2030
2030
  hidden: links == null || links.length === 0
2031
2031
  };
2032
2032
  }),
2033
- showLogo: slot.Checkbox({ preset: true, label: "Show logo" }),
2034
- logoFile: slot.Image((props) => ({
2033
+ showLogo: richText.Checkbox({ preset: true, label: "Show logo" }),
2034
+ logoFile: richText.Image((props) => ({
2035
2035
  label: "Logo",
2036
2036
  hidden: props.showLogo === false
2037
2037
  })),
2038
- logoWidth: slot.ResponsiveLength((props) => ({
2038
+ logoWidth: richText.ResponsiveLength((props) => ({
2039
2039
  preset: [{ deviceId: "desktop", value: { value: 100, unit: "px" } }],
2040
2040
  label: "Logo width",
2041
2041
  min: 0,
@@ -2043,15 +2043,15 @@ function registerComponent$4(runtime) {
2043
2043
  options: [{ value: "px", label: "Pixels", icon: "Px16" }],
2044
2044
  hidden: props.showLogo === false
2045
2045
  })),
2046
- logoAltText: slot.TextInput((props) => ({
2046
+ logoAltText: richText.TextInput((props) => ({
2047
2047
  label: "Logo alt text",
2048
2048
  hidden: props.showLogo === false
2049
2049
  })),
2050
- logoLink: slot.Link((props) => ({
2050
+ logoLink: richText.Link((props) => ({
2051
2051
  label: "Logo on click",
2052
2052
  hidden: props.showLogo === false
2053
2053
  })),
2054
- alignment: slot.ResponsiveIconRadioGroup({
2054
+ alignment: richText.ResponsiveIconRadioGroup({
2055
2055
  label: "Alignment",
2056
2056
  options: [
2057
2057
  { label: "Left", value: "flex-start", icon: "AlignLeft16" },
@@ -2060,7 +2060,7 @@ function registerComponent$4(runtime) {
2060
2060
  ],
2061
2061
  defaultValue: "flex-end"
2062
2062
  }),
2063
- gutter: slot.GapX({
2063
+ gutter: richText.GapX({
2064
2064
  preset: [{ deviceId: "desktop", value: { value: 10, unit: "px" } }],
2065
2065
  label: "Link gap",
2066
2066
  min: 0,
@@ -2068,14 +2068,14 @@ function registerComponent$4(runtime) {
2068
2068
  step: 1,
2069
2069
  defaultValue: { value: 0, unit: "px" }
2070
2070
  }),
2071
- mobileMenuAnimation: slot.ResponsiveSelect({
2071
+ mobileMenuAnimation: richText.ResponsiveSelect({
2072
2072
  label: "Mobile menu",
2073
2073
  options: [
2074
2074
  { value: "coverRight", label: "Cover from right" },
2075
2075
  { value: "coverLeft", label: "Cover from left" }
2076
2076
  ]
2077
2077
  }),
2078
- mobileMenuOpenIconColor: slot.ResponsiveColor((props, device) => {
2078
+ mobileMenuOpenIconColor: richText.ResponsiveColor((props, device) => {
2079
2079
  const mobileMenuAnimation = props.mobileMenuAnimation;
2080
2080
  const hidden = !findDeviceOverride(mobileMenuAnimation, device);
2081
2081
  return {
@@ -2084,7 +2084,7 @@ function registerComponent$4(runtime) {
2084
2084
  hidden
2085
2085
  };
2086
2086
  }),
2087
- mobileMenuCloseIconColor: slot.ResponsiveColor((props, device) => {
2087
+ mobileMenuCloseIconColor: richText.ResponsiveColor((props, device) => {
2088
2088
  const mobileMenuAnimation = props.mobileMenuAnimation;
2089
2089
  const hidden = !findDeviceOverride(mobileMenuAnimation, device);
2090
2090
  return {
@@ -2093,7 +2093,7 @@ function registerComponent$4(runtime) {
2093
2093
  hidden
2094
2094
  };
2095
2095
  }),
2096
- mobileMenuBackgroundColor: slot.ResponsiveColor((props, device) => {
2096
+ mobileMenuBackgroundColor: richText.ResponsiveColor((props, device) => {
2097
2097
  const mobileMenuAnimation = props.mobileMenuAnimation;
2098
2098
  const hidden = !findDeviceOverride(mobileMenuAnimation, device);
2099
2099
  return {
@@ -2102,11 +2102,11 @@ function registerComponent$4(runtime) {
2102
2102
  hidden
2103
2103
  };
2104
2104
  }),
2105
- width: slot.Width({
2106
- format: slot.Width.Format.ClassName,
2105
+ width: richText.Width({
2106
+ format: richText.Width.Format.ClassName,
2107
2107
  defaultValue: { value: 100, unit: "%" }
2108
2108
  }),
2109
- margin: slot.Margin({ format: slot.Margin.Format.ClassName })
2109
+ margin: richText.Margin({ format: richText.Margin.Format.ClassName })
2110
2110
  }
2111
2111
  });
2112
2112
  }
@@ -2118,10 +2118,10 @@ function registerComponent$3(runtime) {
2118
2118
  label: "Page",
2119
2119
  hidden: true,
2120
2120
  props: {
2121
- children: slot.Grid(),
2122
- backgrounds: slot.Backgrounds(),
2123
- rowGap: slot.GapY(),
2124
- columnGap: slot.GapX()
2121
+ children: richText.Grid(),
2122
+ backgrounds: richText.Backgrounds(),
2123
+ rowGap: richText.GapY(),
2124
+ columnGap: richText.GapX()
2125
2125
  }
2126
2126
  });
2127
2127
  }
@@ -2133,8 +2133,8 @@ function registerComponent$2(runtime) {
2133
2133
  label: "Social Links",
2134
2134
  icon: "SocialLinks40",
2135
2135
  props: {
2136
- id: slot.ElementID(),
2137
- links: slot.SocialLinks({
2136
+ id: richText.ElementID(),
2137
+ links: richText.SocialLinks({
2138
2138
  preset: {
2139
2139
  links: [
2140
2140
  {
@@ -2153,7 +2153,7 @@ function registerComponent$2(runtime) {
2153
2153
  openInNewTab: false
2154
2154
  }
2155
2155
  }),
2156
- shape: slot.ResponsiveIconRadioGroup((props) => {
2156
+ shape: richText.ResponsiveIconRadioGroup((props) => {
2157
2157
  const links = props.links;
2158
2158
  return {
2159
2159
  label: "Shape",
@@ -2167,7 +2167,7 @@ function registerComponent$2(runtime) {
2167
2167
  hidden: links == null || links.links.length === 0
2168
2168
  };
2169
2169
  }),
2170
- size: slot.ResponsiveIconRadioGroup((props) => {
2170
+ size: richText.ResponsiveIconRadioGroup((props) => {
2171
2171
  const links = props.links;
2172
2172
  return {
2173
2173
  label: "Size",
@@ -2180,7 +2180,7 @@ function registerComponent$2(runtime) {
2180
2180
  hidden: links == null || links.links.length === 0
2181
2181
  };
2182
2182
  }),
2183
- hoverStyle: slot.ResponsiveSelect((props) => {
2183
+ hoverStyle: richText.ResponsiveSelect((props) => {
2184
2184
  const links = props.links;
2185
2185
  const hidden = links == null || links.links.length === 0;
2186
2186
  return {
@@ -2196,7 +2196,7 @@ function registerComponent$2(runtime) {
2196
2196
  hidden
2197
2197
  };
2198
2198
  }),
2199
- fill: slot.ResponsiveColor((props) => {
2199
+ fill: richText.ResponsiveColor((props) => {
2200
2200
  const links = props.links;
2201
2201
  const hidden = links == null || links.links.length === 0;
2202
2202
  return {
@@ -2204,7 +2204,7 @@ function registerComponent$2(runtime) {
2204
2204
  hidden
2205
2205
  };
2206
2206
  }),
2207
- backgroundColor: slot.ResponsiveColor((props) => {
2207
+ backgroundColor: richText.ResponsiveColor((props) => {
2208
2208
  const links = props.links;
2209
2209
  const hidden = links == null || links.links.length === 0;
2210
2210
  return {
@@ -2212,7 +2212,7 @@ function registerComponent$2(runtime) {
2212
2212
  hidden
2213
2213
  };
2214
2214
  }),
2215
- alignment: slot.ResponsiveIconRadioGroup({
2215
+ alignment: richText.ResponsiveIconRadioGroup({
2216
2216
  label: "Alignment",
2217
2217
  options: [
2218
2218
  { label: "flex-start", value: "flex-start", icon: "AlignLeft16" },
@@ -2221,7 +2221,7 @@ function registerComponent$2(runtime) {
2221
2221
  ],
2222
2222
  defaultValue: "center"
2223
2223
  }),
2224
- gutter: slot.GapX({
2224
+ gutter: richText.GapX({
2225
2225
  preset: [{ deviceId: "desktop", value: { value: 10, unit: "px" } }],
2226
2226
  label: "Link gap",
2227
2227
  min: 0,
@@ -2229,12 +2229,12 @@ function registerComponent$2(runtime) {
2229
2229
  step: 1,
2230
2230
  defaultValue: { value: 0, unit: "px" }
2231
2231
  }),
2232
- width: slot.Width({
2233
- format: slot.Width.Format.ClassName,
2232
+ width: richText.Width({
2233
+ format: richText.Width.Format.ClassName,
2234
2234
  defaultValue: { value: 100, unit: "%" }
2235
2235
  }),
2236
- margin: slot.Margin({
2237
- format: slot.Margin.Format.ClassName,
2236
+ margin: richText.Margin({
2237
+ format: richText.Margin.Format.ClassName,
2238
2238
  preset: [
2239
2239
  {
2240
2240
  deviceId: "desktop",
@@ -2257,8 +2257,8 @@ function registerComponent$1(runtime) {
2257
2257
  type: constants.MakeswiftComponentType.Text,
2258
2258
  label: "Text",
2259
2259
  props: {
2260
- id: slot.ElementID(),
2261
- text: slot.RichText(() => ({
2260
+ id: richText.ElementID(),
2261
+ text: richText.RichText(() => ({
2262
2262
  preset: {
2263
2263
  document: {
2264
2264
  nodes: [
@@ -2301,13 +2301,13 @@ function registerComponent$1(runtime) {
2301
2301
  }
2302
2302
  }
2303
2303
  })),
2304
- width: slot.Width({
2305
- format: slot.Width.Format.ClassName,
2304
+ width: richText.Width({
2305
+ format: richText.Width.Format.ClassName,
2306
2306
  preset: [{ deviceId: "desktop", value: { value: 700, unit: "px" } }],
2307
2307
  defaultValue: { value: 100, unit: "%" }
2308
2308
  }),
2309
- margin: slot.Margin({
2310
- format: slot.Margin.Format.ClassName,
2309
+ margin: richText.Margin({
2310
+ format: richText.Margin.Format.ClassName,
2311
2311
  preset: [
2312
2312
  {
2313
2313
  deviceId: "desktop",
@@ -2331,14 +2331,14 @@ function registerComponent(runtime) {
2331
2331
  label: "Video",
2332
2332
  icon: "Video40",
2333
2333
  props: {
2334
- id: slot.ElementID(),
2335
- video: slot.Video({ preset: { controls: true } }),
2336
- width: slot.Width({
2337
- format: slot.Width.Format.ClassName,
2334
+ id: richText.ElementID(),
2335
+ video: richText.Video({ preset: { controls: true } }),
2336
+ width: richText.Width({
2337
+ format: richText.Width.Format.ClassName,
2338
2338
  defaultValue: { value: 560, unit: "px" }
2339
2339
  }),
2340
- margin: slot.Margin({ format: slot.Margin.Format.ClassName }),
2341
- borderRadius: slot.BorderRadius({ format: slot.BorderRadius.Format.ClassName })
2340
+ margin: richText.Margin({ format: richText.Margin.Format.ClassName }),
2341
+ borderRadius: richText.BorderRadius({ format: richText.BorderRadius.Format.ClassName })
2342
2342
  }
2343
2343
  });
2344
2344
  }
@@ -2854,7 +2854,7 @@ const defaultPadding = {
2854
2854
  };
2855
2855
  function useStyleControlCssObject(style, controlDefinition) {
2856
2856
  const { properties } = controlDefinition.config;
2857
- return __spreadValues(__spreadValues({}, properties.includes(slot.StyleControlProperty.Width) && {
2857
+ return __spreadValues(__spreadValues({}, properties.includes(richText.StyleControlProperty.Width) && {
2858
2858
  maxWidth: "100%"
2859
2859
  }), responsiveStyle([
2860
2860
  style == null ? void 0 : style.width,
@@ -2865,19 +2865,19 @@ function useStyleControlCssObject(style, controlDefinition) {
2865
2865
  style == null ? void 0 : style.textStyle
2866
2866
  ], ([width, margin, padding, border, borderRadius, textStyle]) => {
2867
2867
  var _a, _b, _c2, _d, _e, _f, _g, _h, _i, _j, _k;
2868
- return __spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, properties.includes(slot.StyleControlProperty.Width) && {
2868
+ return __spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, properties.includes(richText.StyleControlProperty.Width) && {
2869
2869
  width: (_a = widthToString(width)) != null ? _a : "100%"
2870
- }), properties.includes(slot.StyleControlProperty.Margin) && marginPropertyDataToStyle(margin != null ? margin : defaultMargin, defaultMargin)), properties.includes(slot.StyleControlProperty.Padding) && paddingPropertyDataToStyle(padding != null ? padding : defaultPadding, defaultPadding)), properties.includes(slot.StyleControlProperty.Border) && {
2870
+ }), properties.includes(richText.StyleControlProperty.Margin) && marginPropertyDataToStyle(margin != null ? margin : defaultMargin, defaultMargin)), properties.includes(richText.StyleControlProperty.Padding) && paddingPropertyDataToStyle(padding != null ? padding : defaultPadding, defaultPadding)), properties.includes(richText.StyleControlProperty.Border) && {
2871
2871
  borderTop: (_b = borderSideToString2(border == null ? void 0 : border.borderTop)) != null ? _b : "0 solid black",
2872
2872
  borderRight: (_c2 = borderSideToString2(border == null ? void 0 : border.borderRight)) != null ? _c2 : "0 solid black",
2873
2873
  borderBottom: (_d = borderSideToString2(border == null ? void 0 : border.borderBottom)) != null ? _d : "0 solid black",
2874
2874
  borderLeft: (_e = borderSideToString2(border == null ? void 0 : border.borderLeft)) != null ? _e : "0 solid black"
2875
- }), properties.includes(slot.StyleControlProperty.BorderRadius) && {
2875
+ }), properties.includes(richText.StyleControlProperty.BorderRadius) && {
2876
2876
  borderTopLeftRadius: (_f = borderRadiusToString(borderRadius == null ? void 0 : borderRadius.borderTopLeftRadius)) != null ? _f : 0,
2877
2877
  borderTopRightRadius: (_g = borderRadiusToString(borderRadius == null ? void 0 : borderRadius.borderTopRightRadius)) != null ? _g : 0,
2878
2878
  borderBottomRightRadius: (_h = borderRadiusToString(borderRadius == null ? void 0 : borderRadius.borderBottomRightRadius)) != null ? _h : 0,
2879
2879
  borderBottomLeftRadius: (_i = borderRadiusToString(borderRadius == null ? void 0 : borderRadius.borderBottomLeftRadius)) != null ? _i : 0
2880
- }), properties.includes(slot.StyleControlProperty.TextStyle) && __spreadProps(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, (textStyle == null ? void 0 : textStyle.fontFamily) && { fontFamily: textStyle.fontFamily }), (textStyle == null ? void 0 : textStyle.letterSpacing) && { letterSpacing: textStyle.letterSpacing }), (textStyle == null ? void 0 : textStyle.fontSize) && { fontSize: fontSizeToString(textStyle.fontSize) }), (textStyle == null ? void 0 : textStyle.fontWeight) && { fontWeight: textStyle.fontWeight }), {
2880
+ }), properties.includes(richText.StyleControlProperty.TextStyle) && __spreadProps(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, (textStyle == null ? void 0 : textStyle.fontFamily) && { fontFamily: textStyle.fontFamily }), (textStyle == null ? void 0 : textStyle.letterSpacing) && { letterSpacing: textStyle.letterSpacing }), (textStyle == null ? void 0 : textStyle.fontSize) && { fontSize: fontSizeToString(textStyle.fontSize) }), (textStyle == null ? void 0 : textStyle.fontWeight) && { fontWeight: textStyle.fontWeight }), {
2881
2881
  textTransform: (_j = textStyle == null ? void 0 : textStyle.textTransform) != null ? _j : [],
2882
2882
  fontStyle: (_k = textStyle == null ? void 0 : textStyle.fontStyle) != null ? _k : []
2883
2883
  }));
@@ -2940,10 +2940,10 @@ function useComboboxControlValue(data) {
2940
2940
  }
2941
2941
  function useImageControlValue(data, definition) {
2942
2942
  var _a;
2943
- const format = (_a = definition.config.format) != null ? _a : slot.ImageControlValueFormat.URL;
2943
+ const format = (_a = definition.config.format) != null ? _a : richText.ImageControlValueFormat.URL;
2944
2944
  const fileId = data != null ? data : null;
2945
2945
  const file = useFile(fileId);
2946
- if (format === slot.ImageControlValueFormat.URL) {
2946
+ if (format === richText.ImageControlValueFormat.URL) {
2947
2947
  return file == null ? void 0 : file.publicUrl;
2948
2948
  }
2949
2949
  if (file == null || file.dimensions == null)
@@ -3091,13 +3091,13 @@ function ControlValue({
3091
3091
  parameters: [data, definition],
3092
3092
  children: (value) => children(value)
3093
3093
  }, definition.type);
3094
- case slot.ColorControlType:
3094
+ case richText.ColorControlType:
3095
3095
  return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
3096
3096
  hook: useColorValue,
3097
3097
  parameters: [data, definition],
3098
3098
  children: (value) => children(value)
3099
3099
  }, definition.type);
3100
- case slot.ImageControlType:
3100
+ case richText.ImageControlType:
3101
3101
  return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
3102
3102
  hook: useImageControlValue,
3103
3103
  parameters: [data, definition],
@@ -3131,6 +3131,25 @@ function ControlValue({
3131
3131
  return children(data);
3132
3132
  }
3133
3133
  }
3134
+ function pollBoxModel({
3135
+ element,
3136
+ onBoxModelChange
3137
+ }) {
3138
+ let currentBoxModel = null;
3139
+ const handleAnimationFrameRequest = () => {
3140
+ const measuredBoxModel = boxModels.getBox(element);
3141
+ if (!deepEqual(currentBoxModel, measuredBoxModel)) {
3142
+ currentBoxModel = measuredBoxModel;
3143
+ onBoxModelChange(currentBoxModel);
3144
+ }
3145
+ animationFrameHandle = requestAnimationFrame(handleAnimationFrameRequest);
3146
+ };
3147
+ let animationFrameHandle = requestAnimationFrame(handleAnimationFrameRequest);
3148
+ return () => {
3149
+ cancelAnimationFrame(animationFrameHandle);
3150
+ onBoxModelChange(null);
3151
+ };
3152
+ }
3134
3153
  function useSlot(data, control2) {
3135
3154
  if (data == null || data.elements.length === 0) {
3136
3155
  return /* @__PURE__ */ jsxRuntime.jsx(Slot.Placeholder, {
@@ -3274,24 +3293,21 @@ function SlotPlaceholder({
3274
3293
  })
3275
3294
  });
3276
3295
  }
3277
- function pollBoxModel({
3278
- element,
3279
- onBoxModelChange
3280
- }) {
3281
- let currentBoxModel = null;
3282
- const handleAnimationFrameRequest = () => {
3283
- const measuredBoxModel = boxModels.getBox(element);
3284
- if (!deepEqual(currentBoxModel, measuredBoxModel)) {
3285
- currentBoxModel = measuredBoxModel;
3286
- onBoxModelChange(currentBoxModel);
3287
- }
3288
- animationFrameHandle = requestAnimationFrame(handleAnimationFrameRequest);
3289
- };
3290
- let animationFrameHandle = requestAnimationFrame(handleAnimationFrameRequest);
3291
- return () => {
3292
- cancelAnimationFrame(animationFrameHandle);
3293
- onBoxModelChange(null);
3294
- };
3296
+ const Text = forwardNextDynamicRef((patch) => dynamic__default["default"](() => patch(Promise.resolve().then(function() {
3297
+ return require("./index.cjs5.js");
3298
+ }))));
3299
+ function useRichText(data, control2) {
3300
+ const textCallbackRef = React.useCallback((handle) => {
3301
+ var _a;
3302
+ if (constants.isPropControllersHandle(handle))
3303
+ (_a = handle == null ? void 0 : handle.setPropControllers) == null ? void 0 : _a.call(handle, control2 == null ? null : {
3304
+ text: control2
3305
+ });
3306
+ }, [control2]);
3307
+ return /* @__PURE__ */ jsxRuntime.jsx(Text, {
3308
+ text: data,
3309
+ ref: textCallbackRef
3310
+ });
3295
3311
  }
3296
3312
  function useWidthStyle(value, descriptor) {
3297
3313
  return useStyle(responsiveWidth(value, descriptor.options.defaultValue));
@@ -3328,15 +3344,15 @@ function PropsValue({
3328
3344
  return constants.getPropControllers(state, documentKey, element.key);
3329
3345
  });
3330
3346
  return Object.entries(propControllerDescriptorsRef.current).reduceRight((renderFn, [propName, descriptor]) => (propsValue) => {
3331
- var _a2;
3347
+ var _a2, _b;
3332
3348
  switch (descriptor.type) {
3333
3349
  case textInput.CheckboxControlType:
3334
3350
  case textInput.NumberControlType:
3335
3351
  case textInput.TextInputControlType:
3336
3352
  case textInput.TextAreaControlType:
3337
3353
  case textInput.SelectControlType:
3338
- case slot.ColorControlType:
3339
- case slot.ImageControlType:
3354
+ case richText.ColorControlType:
3355
+ case richText.ImageControlType:
3340
3356
  case combobox.ComboboxControlType:
3341
3357
  case control.ShapeControlType:
3342
3358
  case control.ListControlType:
@@ -3348,7 +3364,7 @@ function PropsValue({
3348
3364
  [propName]: value
3349
3365
  }))
3350
3366
  });
3351
- case slot.StyleControlType:
3367
+ case richText.StyleControlType:
3352
3368
  return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
3353
3369
  hook: useFormattedStyle,
3354
3370
  parameters: [props[propName], descriptor],
@@ -3356,8 +3372,17 @@ function PropsValue({
3356
3372
  [propName]: value
3357
3373
  }))
3358
3374
  }, descriptor.type);
3359
- case slot.SlotControlType: {
3360
- const control2 = (_a2 = propControllers == null ? void 0 : propControllers[propName]) != null ? _a2 : null;
3375
+ case richText.RichTextControlType:
3376
+ const control$1 = (_a2 = propControllers == null ? void 0 : propControllers[propName]) != null ? _a2 : null;
3377
+ return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
3378
+ hook: useRichText,
3379
+ parameters: [props[propName], control$1],
3380
+ children: (value) => renderFn(__spreadProps(__spreadValues({}, propsValue), {
3381
+ [propName]: value
3382
+ }))
3383
+ }, descriptor.type);
3384
+ case richText.SlotControlType: {
3385
+ const control2 = (_b = propControllers == null ? void 0 : propControllers[propName]) != null ? _b : null;
3361
3386
  return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
3362
3387
  hook: useSlot,
3363
3388
  parameters: [props[propName], control2],
@@ -3366,9 +3391,9 @@ function PropsValue({
3366
3391
  }))
3367
3392
  }, descriptor.type);
3368
3393
  }
3369
- case slot.Types.Width:
3394
+ case richText.Types.Width:
3370
3395
  switch (descriptor.options.format) {
3371
- case slot.WidthPropControllerFormat.ClassName:
3396
+ case richText.WidthPropControllerFormat.ClassName:
3372
3397
  return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
3373
3398
  hook: useWidthStyle,
3374
3399
  parameters: [props[propName], descriptor],
@@ -3381,9 +3406,9 @@ function PropsValue({
3381
3406
  [propName]: props[propName]
3382
3407
  }));
3383
3408
  }
3384
- case slot.Types.Padding:
3409
+ case richText.Types.Padding:
3385
3410
  switch (descriptor.options.format) {
3386
- case slot.PaddingPropControllerFormat.ClassName:
3411
+ case richText.PaddingPropControllerFormat.ClassName:
3387
3412
  return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
3388
3413
  hook: usePaddingStyle,
3389
3414
  parameters: [props[propName]],
@@ -3396,9 +3421,9 @@ function PropsValue({
3396
3421
  [propName]: props[propName]
3397
3422
  }));
3398
3423
  }
3399
- case slot.Types.Margin:
3424
+ case richText.Types.Margin:
3400
3425
  switch (descriptor.options.format) {
3401
- case slot.MarginPropControllerFormat.ClassName:
3426
+ case richText.MarginPropControllerFormat.ClassName:
3402
3427
  return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
3403
3428
  hook: useMarginStyle,
3404
3429
  parameters: [props[propName]],
@@ -3411,9 +3436,9 @@ function PropsValue({
3411
3436
  [propName]: props[propName]
3412
3437
  }));
3413
3438
  }
3414
- case slot.Types.BorderRadius:
3439
+ case richText.Types.BorderRadius:
3415
3440
  switch (descriptor.options.format) {
3416
- case slot.BorderRadiusPropControllerFormat.ClassName:
3441
+ case richText.BorderRadiusPropControllerFormat.ClassName:
3417
3442
  return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
3418
3443
  hook: useBorderRadiusStyle,
3419
3444
  parameters: [props[propName]],
@@ -3426,9 +3451,9 @@ function PropsValue({
3426
3451
  [propName]: props[propName]
3427
3452
  }));
3428
3453
  }
3429
- case slot.Types.Shadows:
3454
+ case richText.Types.Shadows:
3430
3455
  switch (descriptor.options.format) {
3431
- case slot.ShadowsPropControllerFormat.ClassName:
3456
+ case richText.ShadowsPropControllerFormat.ClassName:
3432
3457
  return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
3433
3458
  hook: useShadowsStyle,
3434
3459
  parameters: [props[propName]],
@@ -3441,9 +3466,9 @@ function PropsValue({
3441
3466
  [propName]: props[propName]
3442
3467
  }));
3443
3468
  }
3444
- case slot.Types.Border:
3469
+ case richText.Types.Border:
3445
3470
  switch (descriptor.options.format) {
3446
- case slot.BorderPropControllerFormat.ClassName:
3471
+ case richText.BorderPropControllerFormat.ClassName:
3447
3472
  return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
3448
3473
  hook: useBorderStyle,
3449
3474
  parameters: [props[propName]],
@@ -3456,7 +3481,7 @@ function PropsValue({
3456
3481
  [propName]: props[propName]
3457
3482
  }));
3458
3483
  }
3459
- case slot.Types.ResponsiveColor:
3484
+ case richText.Types.ResponsiveColor:
3460
3485
  return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
3461
3486
  hook: useResponsiveColor,
3462
3487
  parameters: [props[propName]],
@@ -3781,6 +3806,7 @@ exports.forwardNextDynamicRef = forwardNextDynamicRef;
3781
3806
  exports.getServerSideProps = getServerSideProps;
3782
3807
  exports.getStaticPaths = getStaticPaths;
3783
3808
  exports.getStaticProps = getStaticProps;
3809
+ exports.pollBoxModel = pollBoxModel;
3784
3810
  exports.responsiveGridItem = responsiveGridItem;
3785
3811
  exports.responsiveStyle = responsiveStyle;
3786
3812
  exports.responsiveTextStyle = responsiveTextStyle;