@makeswift/runtime 0.7.17 → 0.7.19
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/dist/Box.cjs.js +1 -1
- package/dist/Box.es.js +1 -1
- package/dist/Button.cjs.js +2 -2
- package/dist/Button.es.js +2 -2
- package/dist/Carousel.cjs.js +3 -3
- package/dist/Carousel.es.js +3 -3
- package/dist/Countdown.cjs.js +3 -3
- package/dist/Countdown.es.js +3 -3
- package/dist/Divider.cjs.js +3 -3
- package/dist/Divider.es.js +3 -3
- package/dist/Embed.cjs.js +3 -3
- package/dist/Embed.es.js +3 -3
- package/dist/Form.cjs.js +1 -1
- package/dist/Form.es.js +1 -1
- package/dist/Image.cjs.js +3 -3
- package/dist/Image.es.js +3 -3
- package/dist/LiveProvider.cjs.js +3 -3
- package/dist/LiveProvider.es.js +3 -3
- package/dist/Navigation.cjs.js +3 -3
- package/dist/Navigation.es.js +3 -3
- package/dist/PreviewProvider.cjs.js +8 -8
- package/dist/PreviewProvider.cjs.js.map +1 -1
- package/dist/PreviewProvider.es.js +1 -1
- package/dist/ReadOnlyText.cjs.js +55 -55
- package/dist/ReadOnlyText.cjs.js.map +1 -1
- package/dist/ReadOnlyText.es.js +3 -3
- package/dist/Root.cjs.js +3 -3
- package/dist/Root.es.js +3 -3
- package/dist/SocialLinks.cjs.js +2 -2
- package/dist/SocialLinks.es.js +2 -2
- package/dist/Text.cjs.js +3 -3
- package/dist/Text.es.js +3 -3
- package/dist/Video.cjs.js +3 -3
- package/dist/Video.es.js +3 -3
- package/dist/builder.cjs.js +2 -2
- package/dist/builder.es.js +2 -2
- package/dist/components.cjs.js +1 -1
- package/dist/components.es.js +1 -1
- package/dist/constants.cjs.js +14 -14
- package/dist/constants.cjs.js.map +1 -1
- package/dist/constants.es.js +1 -1
- package/dist/control-serialization.cjs.js +41 -41
- package/dist/control-serialization.cjs.js.map +1 -1
- package/dist/control-serialization.es.js +1 -1
- package/dist/controls.cjs.js +46 -44
- package/dist/controls.cjs.js.map +1 -1
- package/dist/controls.es.js +2 -2
- package/dist/{rich-text.cjs.js → descriptors.cjs.js} +476 -459
- package/dist/descriptors.cjs.js.map +1 -0
- package/dist/{rich-text.es.js → descriptors.es.js} +467 -452
- package/dist/descriptors.es.js.map +1 -0
- package/dist/index.cjs.js +243 -210
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.cjs2.js +1 -1
- package/dist/index.cjs5.js +16 -16
- package/dist/index.cjs5.js.map +1 -1
- package/dist/index.cjs6.js +3 -3
- package/dist/index.cjs7.js +35 -35
- package/dist/index.cjs7.js.map +1 -1
- package/dist/index.es.js +46 -13
- package/dist/index.es.js.map +1 -1
- package/dist/index.es2.js +1 -1
- package/dist/index.es5.js +1 -1
- package/dist/index.es6.js +3 -3
- package/dist/index.es7.js +1 -1
- package/dist/introspection.cjs.js +22 -22
- package/dist/introspection.cjs.js.map +1 -1
- package/dist/introspection.es.js +1 -1
- package/dist/main.cjs.js +1 -1
- package/dist/main.es.js +1 -1
- package/dist/next.cjs.js +3 -3
- package/dist/next.es.js +3 -3
- package/dist/prop-controllers.cjs.js +5 -5
- package/dist/prop-controllers.es.js +2 -2
- package/dist/react.cjs.js +3 -3
- package/dist/react.es.js +3 -3
- package/dist/slate.cjs.js +4 -4
- package/dist/slate.es.js +4 -4
- package/dist/types/src/components/builtin/Button/Button.d.ts +1 -1
- package/dist/types/src/components/builtin/Form/components/Field/components/Checkbox/index.d.ts +1 -1
- package/dist/types/src/components/builtin/Form/components/Field/components/PlaceholderTableField/index.d.ts +0 -1
- package/dist/types/src/components/builtin/Form/components/Field/components/PlaceholderTableField/index.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Form/components/Field/index.d.ts +0 -1
- package/dist/types/src/components/builtin/Form/components/Field/index.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Form/components/Spinner/index.d.ts +0 -1
- package/dist/types/src/components/builtin/Form/components/Spinner/index.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Navigation/components/LinksPlaceholder/index.d.ts +0 -1
- package/dist/types/src/components/builtin/Navigation/components/LinksPlaceholder/index.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Navigation/components/MobileMenu/index.d.ts +0 -1
- package/dist/types/src/components/builtin/Navigation/components/MobileMenu/index.d.ts.map +1 -1
- package/dist/types/src/components/builtin/SocialLinks/components/SocialLinksPlaceholder/index.d.ts +0 -1
- package/dist/types/src/components/builtin/SocialLinks/components/SocialLinksPlaceholder/index.d.ts.map +1 -1
- package/dist/types/src/components/builtin/SocialLinks/options.d.ts +0 -1
- package/dist/types/src/components/builtin/SocialLinks/options.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Text/components/Element/block.d.ts +0 -1
- package/dist/types/src/components/builtin/Text/components/Element/block.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Text/components/Element/element.d.ts +0 -1
- package/dist/types/src/components/builtin/Text/components/Element/element.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Text/components/Element/inline.d.ts +0 -1
- package/dist/types/src/components/builtin/Text/components/Element/inline.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Text/components/Leaf/leaf.d.ts +0 -1
- package/dist/types/src/components/builtin/Text/components/Leaf/leaf.d.ts.map +1 -1
- package/dist/types/src/components/page/Page.d.ts +0 -1
- package/dist/types/src/components/page/Page.d.ts.map +1 -1
- package/dist/types/src/components/shared/BackgroundsContainer/components/BackgroundVideo/index.d.ts +0 -1
- package/dist/types/src/components/shared/BackgroundsContainer/components/BackgroundVideo/index.d.ts.map +1 -1
- package/dist/types/src/components/shared/BackgroundsContainer/components/Backgrounds/index.d.ts +0 -1
- package/dist/types/src/components/shared/BackgroundsContainer/components/Backgrounds/index.d.ts.map +1 -1
- package/dist/types/src/controls/control.d.ts +3 -2
- package/dist/types/src/controls/control.d.ts.map +1 -1
- package/dist/types/src/controls/shape.d.ts +1 -1
- package/dist/types/src/controls/shape.d.ts.map +1 -1
- package/dist/types/src/controls/style.d.ts +17 -0
- package/dist/types/src/controls/style.d.ts.map +1 -1
- package/dist/types/src/next/api-handler.d.ts.map +1 -1
- package/dist/types/src/next/document.d.ts +0 -1
- package/dist/types/src/next/document.d.ts.map +1 -1
- package/dist/types/src/next/preview-mode.d.ts +0 -1
- package/dist/types/src/next/preview-mode.d.ts.map +1 -1
- package/dist/types/src/prop-controllers/descriptors.d.ts +1 -2
- package/dist/types/src/prop-controllers/descriptors.d.ts.map +1 -1
- package/dist/types/src/prop-controllers/instances.d.ts +3 -3
- package/dist/types/src/prop-controllers/instances.d.ts.map +1 -1
- package/dist/types/src/runtimes/react/components/render-hook.d.ts +0 -1
- package/dist/types/src/runtimes/react/components/render-hook.d.ts.map +1 -1
- package/dist/types/src/runtimes/react/controls/control.d.ts +3 -3
- package/dist/types/src/runtimes/react/controls/control.d.ts.map +1 -1
- package/dist/types/src/runtimes/react/controls/list.d.ts +0 -1
- package/dist/types/src/runtimes/react/controls/list.d.ts.map +1 -1
- package/dist/types/src/runtimes/react/controls/shape.d.ts +0 -1
- package/dist/types/src/runtimes/react/controls/shape.d.ts.map +1 -1
- package/dist/types/src/runtimes/react/controls/style.d.ts +2 -2
- package/dist/types/src/runtimes/react/controls/style.d.ts.map +1 -1
- package/dist/types/src/runtimes/react/controls.d.ts +0 -1
- package/dist/types/src/runtimes/react/controls.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/rich-text.cjs.js.map +0 -1
- package/dist/rich-text.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
|
|
48
|
+
var descriptors = require("./descriptors.cjs.js");
|
|
49
49
|
require("slate");
|
|
50
50
|
var textInput = require("./text-input.cjs.js");
|
|
51
51
|
var combobox = require("./combobox.cjs.js");
|
|
@@ -55,9 +55,9 @@ var introspection = require("./introspection.cjs.js");
|
|
|
55
55
|
var redux = require("redux");
|
|
56
56
|
var thunk = require("redux-thunk");
|
|
57
57
|
var types = require("./types.cjs.js");
|
|
58
|
+
var boxModels = require("./box-models.cjs.js");
|
|
58
59
|
var ColorHelper = require("color");
|
|
59
60
|
var scrollIntoView = require("scroll-into-view-if-needed");
|
|
60
|
-
var boxModels = require("./box-models.cjs.js");
|
|
61
61
|
var reactDom = require("react-dom");
|
|
62
62
|
var parse = require("html-react-parser");
|
|
63
63
|
var Head = require("next/head");
|
|
@@ -148,7 +148,7 @@ function BodySnippet({
|
|
|
148
148
|
return null;
|
|
149
149
|
}
|
|
150
150
|
async function introspect(element, client, store) {
|
|
151
|
-
const descriptors = constants.getPropControllerDescriptors(store.getState());
|
|
151
|
+
const descriptors$1 = constants.getPropControllerDescriptors(store.getState());
|
|
152
152
|
const swatchIds = /* @__PURE__ */ new Set();
|
|
153
153
|
const fileIds = /* @__PURE__ */ new Set();
|
|
154
154
|
const typographyIds = /* @__PURE__ */ new Set();
|
|
@@ -173,13 +173,13 @@ async function introspect(element, client, store) {
|
|
|
173
173
|
remaining.push(child);
|
|
174
174
|
}
|
|
175
175
|
});
|
|
176
|
-
if (descriptor.type ===
|
|
176
|
+
if (descriptor.type === descriptors.ShapeControlType) {
|
|
177
177
|
const prop = props[propName];
|
|
178
178
|
if (prop == null)
|
|
179
179
|
return;
|
|
180
180
|
getResourcesFromElementDescriptors(descriptor.config.type, prop);
|
|
181
181
|
}
|
|
182
|
-
if (descriptor.type ===
|
|
182
|
+
if (descriptor.type === descriptors.ListControlType) {
|
|
183
183
|
const prop = props[propName];
|
|
184
184
|
if (prop == null)
|
|
185
185
|
return;
|
|
@@ -187,13 +187,13 @@ async function introspect(element, client, store) {
|
|
|
187
187
|
getResourcesFromElementDescriptors({ propName: descriptor.config.type }, { propName: item.value });
|
|
188
188
|
});
|
|
189
189
|
}
|
|
190
|
-
if (descriptor.type ===
|
|
190
|
+
if (descriptor.type === descriptors.Types.Shape) {
|
|
191
191
|
const prop = props[propName];
|
|
192
192
|
if (prop == null)
|
|
193
193
|
return;
|
|
194
194
|
getResourcesFromElementDescriptors(descriptor.options.type, prop);
|
|
195
195
|
}
|
|
196
|
-
if (descriptor.type ===
|
|
196
|
+
if (descriptor.type === descriptors.Types.List) {
|
|
197
197
|
const prop = props[propName];
|
|
198
198
|
if (prop == null)
|
|
199
199
|
return;
|
|
@@ -213,7 +213,7 @@ async function introspect(element, client, store) {
|
|
|
213
213
|
} else {
|
|
214
214
|
element2 = current;
|
|
215
215
|
}
|
|
216
|
-
const elementDescriptors = descriptors.get(element2.type);
|
|
216
|
+
const elementDescriptors = descriptors$1.get(element2.type);
|
|
217
217
|
if (elementDescriptors == null)
|
|
218
218
|
continue;
|
|
219
219
|
getResourcesFromElementDescriptors(elementDescriptors, element2.props);
|
|
@@ -1002,7 +1002,7 @@ function useCachedSite(siteId) {
|
|
|
1002
1002
|
const site = shim.useSyncExternalStore(client.subscribe, getSnapshot, getSnapshot);
|
|
1003
1003
|
return site;
|
|
1004
1004
|
}
|
|
1005
|
-
const version = "0.7.
|
|
1005
|
+
const version = "0.7.19";
|
|
1006
1006
|
class Makeswift {
|
|
1007
1007
|
constructor(apiKey, { apiOrigin = "https://api.makeswift.com" } = {}) {
|
|
1008
1008
|
__publicField(this, "apiKey");
|
|
@@ -1352,6 +1352,8 @@ function MakeswiftApiHandler(apiKey, {
|
|
|
1352
1352
|
const previewModeProxy = httpProxy.createProxyServer();
|
|
1353
1353
|
previewModeProxy.on("proxyReq", (proxyReq) => {
|
|
1354
1354
|
proxyReq.removeHeader("X-Makeswift-Preview-Mode");
|
|
1355
|
+
proxyReq.removeHeader("X-Invoke-Path");
|
|
1356
|
+
proxyReq.removeHeader("X-Invoke-Query");
|
|
1355
1357
|
const url = new URL(proxyReq.path, "http://n");
|
|
1356
1358
|
url.searchParams.delete("x-makeswift-preview-mode");
|
|
1357
1359
|
proxyReq.path = url.pathname + url.search;
|
|
@@ -1809,13 +1811,13 @@ function registerComponent$c(runtime) {
|
|
|
1809
1811
|
type: constants.MakeswiftComponentType.Box,
|
|
1810
1812
|
label: "Box",
|
|
1811
1813
|
props: {
|
|
1812
|
-
id:
|
|
1813
|
-
backgrounds:
|
|
1814
|
-
width:
|
|
1815
|
-
format:
|
|
1814
|
+
id: descriptors.ElementID(),
|
|
1815
|
+
backgrounds: descriptors.Backgrounds(),
|
|
1816
|
+
width: descriptors.Width({
|
|
1817
|
+
format: descriptors.Width.Format.ClassName,
|
|
1816
1818
|
defaultValue: { value: 100, unit: "%" }
|
|
1817
1819
|
}),
|
|
1818
|
-
height:
|
|
1820
|
+
height: descriptors.ResponsiveIconRadioGroup({
|
|
1819
1821
|
label: "Height",
|
|
1820
1822
|
options: [
|
|
1821
1823
|
{ value: "auto", label: "Auto", icon: "HeightAuto16" },
|
|
@@ -1823,7 +1825,7 @@ function registerComponent$c(runtime) {
|
|
|
1823
1825
|
],
|
|
1824
1826
|
defaultValue: "auto"
|
|
1825
1827
|
}),
|
|
1826
|
-
verticalAlign:
|
|
1828
|
+
verticalAlign: descriptors.ResponsiveIconRadioGroup({
|
|
1827
1829
|
label: "Align items",
|
|
1828
1830
|
options: [
|
|
1829
1831
|
{ value: "flex-start", label: "Top", icon: "VerticalAlignStart16" },
|
|
@@ -1837,9 +1839,9 @@ function registerComponent$c(runtime) {
|
|
|
1837
1839
|
],
|
|
1838
1840
|
defaultValue: "flex-start"
|
|
1839
1841
|
}),
|
|
1840
|
-
margin:
|
|
1841
|
-
padding:
|
|
1842
|
-
format:
|
|
1842
|
+
margin: descriptors.Margin({ format: descriptors.Margin.Format.ClassName }),
|
|
1843
|
+
padding: descriptors.Padding({
|
|
1844
|
+
format: descriptors.Padding.Format.ClassName,
|
|
1843
1845
|
preset: [
|
|
1844
1846
|
{
|
|
1845
1847
|
deviceId: "desktop",
|
|
@@ -1852,16 +1854,16 @@ function registerComponent$c(runtime) {
|
|
|
1852
1854
|
}
|
|
1853
1855
|
]
|
|
1854
1856
|
}),
|
|
1855
|
-
border:
|
|
1856
|
-
borderRadius:
|
|
1857
|
-
boxShadow:
|
|
1858
|
-
rowGap:
|
|
1857
|
+
border: descriptors.Border({ format: descriptors.Border.Format.ClassName }),
|
|
1858
|
+
borderRadius: descriptors.BorderRadius({ format: descriptors.BorderRadius.Format.ClassName }),
|
|
1859
|
+
boxShadow: descriptors.Shadows({ format: descriptors.Shadows.Format.ClassName }),
|
|
1860
|
+
rowGap: descriptors.GapY((props) => ({
|
|
1859
1861
|
hidden: props.children == null
|
|
1860
1862
|
})),
|
|
1861
|
-
columnGap:
|
|
1863
|
+
columnGap: descriptors.GapX((props) => ({
|
|
1862
1864
|
hidden: props.children == null
|
|
1863
1865
|
})),
|
|
1864
|
-
boxAnimateType:
|
|
1866
|
+
boxAnimateType: descriptors.ResponsiveSelect({
|
|
1865
1867
|
label: "Animate box in",
|
|
1866
1868
|
labelOrientation: "vertical",
|
|
1867
1869
|
options: [
|
|
@@ -1877,7 +1879,7 @@ function registerComponent$c(runtime) {
|
|
|
1877
1879
|
],
|
|
1878
1880
|
defaultValue: "none"
|
|
1879
1881
|
}),
|
|
1880
|
-
boxAnimateDuration:
|
|
1882
|
+
boxAnimateDuration: descriptors.ResponsiveNumber((props, device) => ({
|
|
1881
1883
|
label: "Box duration",
|
|
1882
1884
|
defaultValue: DEFAULT_BOX_ANIMATE_DURATION,
|
|
1883
1885
|
min: 0.1,
|
|
@@ -1885,7 +1887,7 @@ function registerComponent$c(runtime) {
|
|
|
1885
1887
|
suffix: "s",
|
|
1886
1888
|
hidden: isHiddenBasedOnBoxAnimation(props, device)
|
|
1887
1889
|
})),
|
|
1888
|
-
boxAnimateDelay:
|
|
1890
|
+
boxAnimateDelay: descriptors.ResponsiveNumber((props, device) => ({
|
|
1889
1891
|
label: "Box delay",
|
|
1890
1892
|
defaultValue: DEFAULT_BOX_ANIMATE_DELAY,
|
|
1891
1893
|
min: 0,
|
|
@@ -1893,7 +1895,7 @@ function registerComponent$c(runtime) {
|
|
|
1893
1895
|
suffix: "s",
|
|
1894
1896
|
hidden: isHiddenBasedOnBoxAnimation(props, device)
|
|
1895
1897
|
})),
|
|
1896
|
-
itemAnimateType:
|
|
1898
|
+
itemAnimateType: descriptors.ResponsiveSelect({
|
|
1897
1899
|
label: "Animate items in",
|
|
1898
1900
|
labelOrientation: "vertical",
|
|
1899
1901
|
options: [
|
|
@@ -1909,7 +1911,7 @@ function registerComponent$c(runtime) {
|
|
|
1909
1911
|
],
|
|
1910
1912
|
defaultValue: "none"
|
|
1911
1913
|
}),
|
|
1912
|
-
itemAnimateDuration:
|
|
1914
|
+
itemAnimateDuration: descriptors.ResponsiveNumber((props, device) => ({
|
|
1913
1915
|
label: "Items duration",
|
|
1914
1916
|
defaultValue: DEFAULT_BOX_ANIMATE_DURATION,
|
|
1915
1917
|
min: 0.1,
|
|
@@ -1917,7 +1919,7 @@ function registerComponent$c(runtime) {
|
|
|
1917
1919
|
suffix: "s",
|
|
1918
1920
|
hidden: isHiddenBasedOnItemAnimation(props, device)
|
|
1919
1921
|
})),
|
|
1920
|
-
itemAnimateDelay:
|
|
1922
|
+
itemAnimateDelay: descriptors.ResponsiveNumber((props, device) => ({
|
|
1921
1923
|
label: "Items delay",
|
|
1922
1924
|
defaultValue: DEFAULT_ITEM_ANIMATE_DELAY,
|
|
1923
1925
|
min: 0,
|
|
@@ -1925,7 +1927,7 @@ function registerComponent$c(runtime) {
|
|
|
1925
1927
|
suffix: "s",
|
|
1926
1928
|
hidden: isHiddenBasedOnItemAnimation(props, device)
|
|
1927
1929
|
})),
|
|
1928
|
-
itemStaggerDuration:
|
|
1930
|
+
itemStaggerDuration: descriptors.ResponsiveNumber((props, device) => ({
|
|
1929
1931
|
label: "Stagger",
|
|
1930
1932
|
min: 0,
|
|
1931
1933
|
step: 0.05,
|
|
@@ -1933,11 +1935,11 @@ function registerComponent$c(runtime) {
|
|
|
1933
1935
|
defaultValue: DEFAULT_ITEM_STAGGER_DURATION,
|
|
1934
1936
|
hidden: isHiddenBasedOnItemAnimation(props, device)
|
|
1935
1937
|
})),
|
|
1936
|
-
hidePlaceholder:
|
|
1938
|
+
hidePlaceholder: descriptors.Checkbox((props) => ({
|
|
1937
1939
|
label: "Hide placeholder",
|
|
1938
1940
|
hidden: props.children != null
|
|
1939
1941
|
})),
|
|
1940
|
-
children:
|
|
1942
|
+
children: descriptors.Grid()
|
|
1941
1943
|
}
|
|
1942
1944
|
});
|
|
1943
1945
|
}
|
|
@@ -1948,9 +1950,9 @@ function registerComponent$b(runtime) {
|
|
|
1948
1950
|
type: constants.MakeswiftComponentType.Button,
|
|
1949
1951
|
label: "Button",
|
|
1950
1952
|
props: {
|
|
1951
|
-
id:
|
|
1952
|
-
children:
|
|
1953
|
-
link:
|
|
1953
|
+
id: descriptors.ElementID(),
|
|
1954
|
+
children: descriptors.TextInput({ placeholder: "Button text" }),
|
|
1955
|
+
link: descriptors.Link({
|
|
1954
1956
|
defaultValue: {
|
|
1955
1957
|
type: "OPEN_PAGE",
|
|
1956
1958
|
payload: {
|
|
@@ -1959,7 +1961,7 @@ function registerComponent$b(runtime) {
|
|
|
1959
1961
|
}
|
|
1960
1962
|
}
|
|
1961
1963
|
}),
|
|
1962
|
-
variant:
|
|
1964
|
+
variant: descriptors.ResponsiveSelect({
|
|
1963
1965
|
label: "Style",
|
|
1964
1966
|
labelOrientation: "horizontal",
|
|
1965
1967
|
options: [
|
|
@@ -1973,7 +1975,7 @@ function registerComponent$b(runtime) {
|
|
|
1973
1975
|
],
|
|
1974
1976
|
defaultValue: "flat"
|
|
1975
1977
|
}),
|
|
1976
|
-
shape:
|
|
1978
|
+
shape: descriptors.ResponsiveIconRadioGroup({
|
|
1977
1979
|
label: "Shape",
|
|
1978
1980
|
options: [
|
|
1979
1981
|
{ label: "Pill", value: "pill", icon: "ButtonPill16" },
|
|
@@ -1982,7 +1984,7 @@ function registerComponent$b(runtime) {
|
|
|
1982
1984
|
],
|
|
1983
1985
|
defaultValue: "rounded"
|
|
1984
1986
|
}),
|
|
1985
|
-
size:
|
|
1987
|
+
size: descriptors.ResponsiveIconRadioGroup({
|
|
1986
1988
|
label: "Size",
|
|
1987
1989
|
options: [
|
|
1988
1990
|
{ label: "Small", value: "small", icon: "SizeSmall16" },
|
|
@@ -1991,19 +1993,19 @@ function registerComponent$b(runtime) {
|
|
|
1991
1993
|
],
|
|
1992
1994
|
defaultValue: "medium"
|
|
1993
1995
|
}),
|
|
1994
|
-
color:
|
|
1996
|
+
color: descriptors.ResponsiveColor((props, device) => {
|
|
1995
1997
|
var _a;
|
|
1996
1998
|
const variant = props.variant;
|
|
1997
1999
|
const hidden = ((_a = findDeviceOverride(variant, device)) == null ? void 0 : _a.value) === "clear";
|
|
1998
2000
|
return { placeholder: "black", hidden };
|
|
1999
2001
|
}),
|
|
2000
|
-
textColor:
|
|
2002
|
+
textColor: descriptors.ResponsiveColor({
|
|
2001
2003
|
label: "Text color",
|
|
2002
2004
|
placeholder: "white"
|
|
2003
2005
|
}),
|
|
2004
|
-
textStyle:
|
|
2005
|
-
width:
|
|
2006
|
-
margin:
|
|
2006
|
+
textStyle: descriptors.TextStyle(),
|
|
2007
|
+
width: descriptors.Width(),
|
|
2008
|
+
margin: descriptors.Margin({ format: descriptors.Margin.Format.ClassName })
|
|
2007
2009
|
}
|
|
2008
2010
|
});
|
|
2009
2011
|
}
|
|
@@ -2015,20 +2017,20 @@ function registerComponent$a(runtime) {
|
|
|
2015
2017
|
label: "Carousel",
|
|
2016
2018
|
icon: "Carousel40",
|
|
2017
2019
|
props: {
|
|
2018
|
-
id:
|
|
2019
|
-
images:
|
|
2020
|
+
id: descriptors.ElementID(),
|
|
2021
|
+
images: descriptors.Images({
|
|
2020
2022
|
preset: [
|
|
2021
2023
|
{ key: uuid.v4(), props: {} },
|
|
2022
2024
|
{ key: uuid.v4(), props: {} },
|
|
2023
2025
|
{ key: uuid.v4(), props: {} }
|
|
2024
2026
|
]
|
|
2025
2027
|
}),
|
|
2026
|
-
width:
|
|
2027
|
-
format:
|
|
2028
|
+
width: descriptors.Width({
|
|
2029
|
+
format: descriptors.Width.Format.ClassName,
|
|
2028
2030
|
defaultValue: { value: 400, unit: "px" }
|
|
2029
2031
|
}),
|
|
2030
|
-
margin:
|
|
2031
|
-
pageSize:
|
|
2032
|
+
margin: descriptors.Margin({ format: descriptors.Margin.Format.ClassName }),
|
|
2033
|
+
pageSize: descriptors.ResponsiveNumber((props) => {
|
|
2032
2034
|
var _a;
|
|
2033
2035
|
const images = props.images;
|
|
2034
2036
|
const imagesLength = (_a = images == null ? void 0 : images.length) != null ? _a : 0;
|
|
@@ -2040,7 +2042,7 @@ function registerComponent$a(runtime) {
|
|
|
2040
2042
|
step: 1
|
|
2041
2043
|
};
|
|
2042
2044
|
}),
|
|
2043
|
-
step:
|
|
2045
|
+
step: descriptors.ResponsiveNumber((props, device) => {
|
|
2044
2046
|
var _a, _b;
|
|
2045
2047
|
const pageSize = props.pageSize;
|
|
2046
2048
|
const pageSizeValue = (_b = (_a = findDeviceOverride(pageSize, device)) == null ? void 0 : _a.value) != null ? _b : 1;
|
|
@@ -2052,7 +2054,7 @@ function registerComponent$a(runtime) {
|
|
|
2052
2054
|
step: 1
|
|
2053
2055
|
};
|
|
2054
2056
|
}),
|
|
2055
|
-
slideAlignment:
|
|
2057
|
+
slideAlignment: descriptors.ResponsiveIconRadioGroup({
|
|
2056
2058
|
label: "Alignment",
|
|
2057
2059
|
options: [
|
|
2058
2060
|
{ label: "Top", value: "flex-start", icon: "VerticalAlignStart16" },
|
|
@@ -2061,13 +2063,13 @@ function registerComponent$a(runtime) {
|
|
|
2061
2063
|
],
|
|
2062
2064
|
defaultValue: "center"
|
|
2063
2065
|
}),
|
|
2064
|
-
gap:
|
|
2066
|
+
gap: descriptors.GapX({
|
|
2065
2067
|
label: "Gap",
|
|
2066
2068
|
step: 5,
|
|
2067
2069
|
defaultValue: { value: 0, unit: "px" }
|
|
2068
2070
|
}),
|
|
2069
|
-
autoplay:
|
|
2070
|
-
delay:
|
|
2071
|
+
autoplay: descriptors.Checkbox({ label: "Autoplay" }),
|
|
2072
|
+
delay: descriptors.Number((props) => ({
|
|
2071
2073
|
label: "Delay",
|
|
2072
2074
|
preset: 5,
|
|
2073
2075
|
min: 1,
|
|
@@ -2075,8 +2077,8 @@ function registerComponent$a(runtime) {
|
|
|
2075
2077
|
suffix: "seconds",
|
|
2076
2078
|
hidden: !props.autoplay
|
|
2077
2079
|
})),
|
|
2078
|
-
showArrows:
|
|
2079
|
-
arrowPosition:
|
|
2080
|
+
showArrows: descriptors.Checkbox({ preset: true, label: "Show arrows" }),
|
|
2081
|
+
arrowPosition: descriptors.ResponsiveIconRadioGroup((props) => ({
|
|
2080
2082
|
label: "Arrow position",
|
|
2081
2083
|
options: [
|
|
2082
2084
|
{ label: "Inside", value: "inside", icon: "ArrowInside16" },
|
|
@@ -2086,24 +2088,24 @@ function registerComponent$a(runtime) {
|
|
|
2086
2088
|
defaultValue: "inside",
|
|
2087
2089
|
hidden: props.showArrows === false
|
|
2088
2090
|
})),
|
|
2089
|
-
arrowColor:
|
|
2091
|
+
arrowColor: descriptors.ResponsiveColor((props) => ({
|
|
2090
2092
|
label: "Arrow color",
|
|
2091
2093
|
placeholder: "black",
|
|
2092
2094
|
hidden: props.showArrows === false
|
|
2093
2095
|
})),
|
|
2094
|
-
arrowBackground:
|
|
2096
|
+
arrowBackground: descriptors.ResponsiveColor((props) => ({
|
|
2095
2097
|
label: "Arrow background",
|
|
2096
2098
|
placeholder: "white",
|
|
2097
2099
|
hidden: props.showArrows === false
|
|
2098
2100
|
})),
|
|
2099
|
-
showDots:
|
|
2100
|
-
dotColor:
|
|
2101
|
+
showDots: descriptors.Checkbox({ preset: true, label: "Show dots" }),
|
|
2102
|
+
dotColor: descriptors.ResponsiveColor((props) => ({
|
|
2101
2103
|
label: "Dot color",
|
|
2102
2104
|
placeholder: "black",
|
|
2103
2105
|
hidden: props.showDots === false
|
|
2104
2106
|
})),
|
|
2105
|
-
slideBorder:
|
|
2106
|
-
slideBorderRadius:
|
|
2107
|
+
slideBorder: descriptors.Border({ format: descriptors.Border.Format.ClassName }),
|
|
2108
|
+
slideBorderRadius: descriptors.BorderRadius({ format: descriptors.BorderRadius.Format.ClassName })
|
|
2107
2109
|
}
|
|
2108
2110
|
});
|
|
2109
2111
|
}
|
|
@@ -2115,11 +2117,11 @@ function registerComponent$9(runtime) {
|
|
|
2115
2117
|
label: "Countdown",
|
|
2116
2118
|
icon: "Countdown40",
|
|
2117
2119
|
props: {
|
|
2118
|
-
id:
|
|
2119
|
-
date:
|
|
2120
|
+
id: descriptors.ElementID(),
|
|
2121
|
+
date: descriptors.Date(() => ({
|
|
2120
2122
|
preset: new Date(Date.now() + 1e3 * 60 * 60 * 24 * 2).toISOString()
|
|
2121
2123
|
})),
|
|
2122
|
-
variant:
|
|
2124
|
+
variant: descriptors.ResponsiveIconRadioGroup({
|
|
2123
2125
|
label: "Style",
|
|
2124
2126
|
options: [
|
|
2125
2127
|
{ label: "Filled", value: "filled", icon: "CountdownSolid16" },
|
|
@@ -2138,7 +2140,7 @@ function registerComponent$9(runtime) {
|
|
|
2138
2140
|
],
|
|
2139
2141
|
defaultValue: "filled"
|
|
2140
2142
|
}),
|
|
2141
|
-
shape:
|
|
2143
|
+
shape: descriptors.ResponsiveIconRadioGroup({
|
|
2142
2144
|
label: "Shape",
|
|
2143
2145
|
options: [
|
|
2144
2146
|
{ label: "Pill", value: "pill", icon: "ButtonPill16" },
|
|
@@ -2147,7 +2149,7 @@ function registerComponent$9(runtime) {
|
|
|
2147
2149
|
],
|
|
2148
2150
|
defaultValue: "rounded"
|
|
2149
2151
|
}),
|
|
2150
|
-
size:
|
|
2152
|
+
size: descriptors.ResponsiveIconRadioGroup({
|
|
2151
2153
|
label: "Size",
|
|
2152
2154
|
options: [
|
|
2153
2155
|
{ label: "Small", value: "small", icon: "SizeSmall16" },
|
|
@@ -2156,7 +2158,7 @@ function registerComponent$9(runtime) {
|
|
|
2156
2158
|
],
|
|
2157
2159
|
defaultValue: "medium"
|
|
2158
2160
|
}),
|
|
2159
|
-
gap:
|
|
2161
|
+
gap: descriptors.GapX({
|
|
2160
2162
|
preset: [{ deviceId: "desktop", value: { value: 10, unit: "px" } }],
|
|
2161
2163
|
label: "Gap",
|
|
2162
2164
|
step: 1,
|
|
@@ -2164,32 +2166,32 @@ function registerComponent$9(runtime) {
|
|
|
2164
2166
|
max: 100,
|
|
2165
2167
|
defaultValue: { value: 0, unit: "px" }
|
|
2166
2168
|
}),
|
|
2167
|
-
numberFont:
|
|
2168
|
-
numberColor:
|
|
2169
|
+
numberFont: descriptors.Font({ label: "Number font" }),
|
|
2170
|
+
numberColor: descriptors.ResponsiveColor({
|
|
2169
2171
|
label: "Number color",
|
|
2170
2172
|
placeholder: "white"
|
|
2171
2173
|
}),
|
|
2172
|
-
blockColor:
|
|
2174
|
+
blockColor: descriptors.ResponsiveColor({
|
|
2173
2175
|
label: "Block color",
|
|
2174
2176
|
placeholder: "black"
|
|
2175
2177
|
}),
|
|
2176
|
-
labelFont:
|
|
2177
|
-
labelColor:
|
|
2178
|
+
labelFont: descriptors.Font({ label: "Label font" }),
|
|
2179
|
+
labelColor: descriptors.ResponsiveColor({
|
|
2178
2180
|
label: "Label color",
|
|
2179
2181
|
placeholder: "black"
|
|
2180
2182
|
}),
|
|
2181
|
-
width:
|
|
2182
|
-
format:
|
|
2183
|
+
width: descriptors.Width({
|
|
2184
|
+
format: descriptors.Width.Format.ClassName,
|
|
2183
2185
|
defaultValue: { value: 560, unit: "px" }
|
|
2184
2186
|
}),
|
|
2185
|
-
margin:
|
|
2186
|
-
daysLabel:
|
|
2187
|
-
hoursLabel:
|
|
2188
|
-
minutesLabel:
|
|
2187
|
+
margin: descriptors.Margin({ format: descriptors.Margin.Format.ClassName }),
|
|
2188
|
+
daysLabel: descriptors.TextInput({ label: "Days label", placeholder: "Days" }),
|
|
2189
|
+
hoursLabel: descriptors.TextInput({ label: "Hours label", placeholder: "Hours" }),
|
|
2190
|
+
minutesLabel: descriptors.TextInput({
|
|
2189
2191
|
label: "Minutes label",
|
|
2190
2192
|
placeholder: "Minutes"
|
|
2191
2193
|
}),
|
|
2192
|
-
secondsLabel:
|
|
2194
|
+
secondsLabel: descriptors.TextInput({
|
|
2193
2195
|
label: "Seconds label",
|
|
2194
2196
|
placeholder: "Seconds"
|
|
2195
2197
|
})
|
|
@@ -2204,8 +2206,8 @@ function registerComponent$8(runtime) {
|
|
|
2204
2206
|
label: "Divider",
|
|
2205
2207
|
icon: "Divider40",
|
|
2206
2208
|
props: {
|
|
2207
|
-
id:
|
|
2208
|
-
variant:
|
|
2209
|
+
id: descriptors.ElementID(),
|
|
2210
|
+
variant: descriptors.ResponsiveSelect({
|
|
2209
2211
|
label: "Style",
|
|
2210
2212
|
labelOrientation: "horizontal",
|
|
2211
2213
|
options: [
|
|
@@ -2216,17 +2218,17 @@ function registerComponent$8(runtime) {
|
|
|
2216
2218
|
],
|
|
2217
2219
|
defaultValue: "solid"
|
|
2218
2220
|
}),
|
|
2219
|
-
thickness:
|
|
2221
|
+
thickness: descriptors.ResponsiveLength({
|
|
2220
2222
|
label: "Height",
|
|
2221
2223
|
defaultValue: { value: 1, unit: "px" },
|
|
2222
2224
|
options: [{ value: "px", label: "Pixels", icon: "Px16" }]
|
|
2223
2225
|
}),
|
|
2224
|
-
color:
|
|
2225
|
-
width:
|
|
2226
|
-
format:
|
|
2226
|
+
color: descriptors.ResponsiveColor({ placeholder: "black" }),
|
|
2227
|
+
width: descriptors.Width({
|
|
2228
|
+
format: descriptors.Width.Format.ClassName,
|
|
2227
2229
|
defaultValue: { value: 100, unit: "%" }
|
|
2228
2230
|
}),
|
|
2229
|
-
margin:
|
|
2231
|
+
margin: descriptors.Margin({ format: descriptors.Margin.Format.ClassName })
|
|
2230
2232
|
}
|
|
2231
2233
|
});
|
|
2232
2234
|
}
|
|
@@ -2238,10 +2240,10 @@ function registerComponent$7(runtime) {
|
|
|
2238
2240
|
label: "Embed",
|
|
2239
2241
|
icon: "Code40",
|
|
2240
2242
|
props: {
|
|
2241
|
-
id:
|
|
2242
|
-
html:
|
|
2243
|
-
width:
|
|
2244
|
-
margin:
|
|
2243
|
+
id: descriptors.ElementID(),
|
|
2244
|
+
html: descriptors.TextArea({ label: "Code", rows: 20 }),
|
|
2245
|
+
width: descriptors.Width({ format: descriptors.Width.Format.ClassName }),
|
|
2246
|
+
margin: descriptors.Margin({ format: descriptors.Margin.Format.ClassName })
|
|
2245
2247
|
}
|
|
2246
2248
|
});
|
|
2247
2249
|
}
|
|
@@ -2277,10 +2279,10 @@ function registerComponent$6(runtime) {
|
|
|
2277
2279
|
label: "Form",
|
|
2278
2280
|
icon: "Form40",
|
|
2279
2281
|
props: {
|
|
2280
|
-
id:
|
|
2281
|
-
tableId:
|
|
2282
|
-
fields:
|
|
2283
|
-
submitLink:
|
|
2282
|
+
id: descriptors.ElementID(),
|
|
2283
|
+
tableId: descriptors.Table(),
|
|
2284
|
+
fields: descriptors.TableFormFields(),
|
|
2285
|
+
submitLink: descriptors.Link((props) => ({
|
|
2284
2286
|
label: "Redirect to",
|
|
2285
2287
|
options: [
|
|
2286
2288
|
{ value: "OPEN_PAGE", label: "Open page" },
|
|
@@ -2288,13 +2290,13 @@ function registerComponent$6(runtime) {
|
|
|
2288
2290
|
],
|
|
2289
2291
|
hidden: props.tableId == null
|
|
2290
2292
|
})),
|
|
2291
|
-
gap:
|
|
2293
|
+
gap: descriptors.GapY((props) => ({
|
|
2292
2294
|
preset: [{ deviceId: "desktop", value: { value: 10, unit: "px" } }],
|
|
2293
2295
|
label: "Gap",
|
|
2294
2296
|
defaultValue: { value: 0, unit: "px" },
|
|
2295
2297
|
hidden: props.tableId == null
|
|
2296
2298
|
})),
|
|
2297
|
-
shape:
|
|
2299
|
+
shape: descriptors.ResponsiveIconRadioGroup((props) => ({
|
|
2298
2300
|
label: "Shape",
|
|
2299
2301
|
options: [
|
|
2300
2302
|
{ label: "Pill", value: Shapes.PILL, icon: "ButtonPill16" },
|
|
@@ -2304,7 +2306,7 @@ function registerComponent$6(runtime) {
|
|
|
2304
2306
|
defaultValue: Shapes.ROUNDED,
|
|
2305
2307
|
hidden: props.tableId == null
|
|
2306
2308
|
})),
|
|
2307
|
-
size:
|
|
2309
|
+
size: descriptors.ResponsiveIconRadioGroup((props) => ({
|
|
2308
2310
|
label: "Size",
|
|
2309
2311
|
options: [
|
|
2310
2312
|
{ label: "Small", value: Sizes.SMALL, icon: "SizeSmall16" },
|
|
@@ -2314,7 +2316,7 @@ function registerComponent$6(runtime) {
|
|
|
2314
2316
|
defaultValue: Sizes.MEDIUM,
|
|
2315
2317
|
hidden: (props == null ? void 0 : props.tableId) == null
|
|
2316
2318
|
})),
|
|
2317
|
-
contrast:
|
|
2319
|
+
contrast: descriptors.ResponsiveIconRadioGroup((props) => ({
|
|
2318
2320
|
label: "Color",
|
|
2319
2321
|
options: [
|
|
2320
2322
|
{ label: "Light mode", value: Contrasts.LIGHT, icon: "Sun16" },
|
|
@@ -2323,8 +2325,8 @@ function registerComponent$6(runtime) {
|
|
|
2323
2325
|
defaultValue: Contrasts.LIGHT,
|
|
2324
2326
|
hidden: props.tableId == null
|
|
2325
2327
|
})),
|
|
2326
|
-
labelTextStyle:
|
|
2327
|
-
labelTextColor:
|
|
2328
|
+
labelTextStyle: descriptors.TextStyle({ label: "Label text style" }),
|
|
2329
|
+
labelTextColor: descriptors.ResponsiveColor((props, device) => {
|
|
2328
2330
|
const hidden = props.tableId == null;
|
|
2329
2331
|
const responsiveContrast = props.contrast;
|
|
2330
2332
|
const contrast = findDeviceOverride(responsiveContrast, device);
|
|
@@ -2334,23 +2336,23 @@ function registerComponent$6(runtime) {
|
|
|
2334
2336
|
placeholder: (contrast == null ? void 0 : contrast.value) === Contrasts.DARK ? "rgba(255,255,255,0.95)" : "rgba(0,0,0,0.8)"
|
|
2335
2337
|
};
|
|
2336
2338
|
}),
|
|
2337
|
-
submitTextStyle:
|
|
2338
|
-
brandColor:
|
|
2339
|
+
submitTextStyle: descriptors.TextStyle({ label: "Button text style" }),
|
|
2340
|
+
brandColor: descriptors.ResponsiveColor((props) => ({
|
|
2339
2341
|
label: "Button color",
|
|
2340
2342
|
placeholder: "black",
|
|
2341
2343
|
hidden: props.tableId == null
|
|
2342
2344
|
})),
|
|
2343
|
-
submitTextColor:
|
|
2345
|
+
submitTextColor: descriptors.ResponsiveColor((props) => ({
|
|
2344
2346
|
label: "Button text color",
|
|
2345
2347
|
placeholder: "white",
|
|
2346
2348
|
hidden: props.tableId == null
|
|
2347
2349
|
})),
|
|
2348
|
-
submitLabel:
|
|
2350
|
+
submitLabel: descriptors.TextInput((props) => ({
|
|
2349
2351
|
label: "Button label",
|
|
2350
2352
|
placeholder: "Submit",
|
|
2351
2353
|
hidden: props.tableId == null
|
|
2352
2354
|
})),
|
|
2353
|
-
submitVariant:
|
|
2355
|
+
submitVariant: descriptors.ResponsiveSelect((props) => ({
|
|
2354
2356
|
label: "Button style",
|
|
2355
2357
|
options: [
|
|
2356
2358
|
{ value: "flat", label: "Flat" },
|
|
@@ -2364,11 +2366,11 @@ function registerComponent$6(runtime) {
|
|
|
2364
2366
|
defaultValue: "flat",
|
|
2365
2367
|
hidden: props.tableId == null
|
|
2366
2368
|
})),
|
|
2367
|
-
submitWidth:
|
|
2369
|
+
submitWidth: descriptors.ResponsiveLength((props) => ({
|
|
2368
2370
|
label: "Button width",
|
|
2369
2371
|
hidden: props.tableId == null
|
|
2370
2372
|
})),
|
|
2371
|
-
submitAlignment:
|
|
2373
|
+
submitAlignment: descriptors.ResponsiveIconRadioGroup((props) => ({
|
|
2372
2374
|
label: "Button alignment",
|
|
2373
2375
|
options: [
|
|
2374
2376
|
{ label: "Left", value: Alignments.LEFT, icon: "AlignLeft16" },
|
|
@@ -2378,12 +2380,12 @@ function registerComponent$6(runtime) {
|
|
|
2378
2380
|
defaultValue: Alignments.CENTER,
|
|
2379
2381
|
hidden: props.tableId == null
|
|
2380
2382
|
})),
|
|
2381
|
-
width:
|
|
2383
|
+
width: descriptors.Width({
|
|
2382
2384
|
preset: [{ deviceId: "desktop", value: { value: 550, unit: "px" } }],
|
|
2383
2385
|
defaultValue: { value: 100, unit: "%" },
|
|
2384
|
-
format:
|
|
2386
|
+
format: descriptors.Width.Format.ClassName
|
|
2385
2387
|
}),
|
|
2386
|
-
margin:
|
|
2388
|
+
margin: descriptors.Margin({ format: descriptors.Margin.Format.ClassName })
|
|
2387
2389
|
}
|
|
2388
2390
|
});
|
|
2389
2391
|
}
|
|
@@ -2394,17 +2396,17 @@ function registerComponent$5(runtime) {
|
|
|
2394
2396
|
type: constants.MakeswiftComponentType.Image,
|
|
2395
2397
|
label: "Image",
|
|
2396
2398
|
props: {
|
|
2397
|
-
id:
|
|
2398
|
-
file:
|
|
2399
|
-
altText:
|
|
2400
|
-
link:
|
|
2401
|
-
width:
|
|
2402
|
-
margin:
|
|
2403
|
-
padding:
|
|
2404
|
-
border:
|
|
2405
|
-
borderRadius:
|
|
2406
|
-
boxShadow:
|
|
2407
|
-
opacity:
|
|
2399
|
+
id: descriptors.ElementID(),
|
|
2400
|
+
file: descriptors.Image(),
|
|
2401
|
+
altText: descriptors.TextInput({ label: "Alt text" }),
|
|
2402
|
+
link: descriptors.Link({ label: "On click" }),
|
|
2403
|
+
width: descriptors.Width(),
|
|
2404
|
+
margin: descriptors.Margin({ format: descriptors.Margin.Format.ClassName }),
|
|
2405
|
+
padding: descriptors.Padding({ format: descriptors.Padding.Format.ClassName }),
|
|
2406
|
+
border: descriptors.Border({ format: descriptors.Border.Format.ClassName }),
|
|
2407
|
+
borderRadius: descriptors.BorderRadius({ format: descriptors.BorderRadius.Format.ClassName }),
|
|
2408
|
+
boxShadow: descriptors.Shadows({ format: descriptors.Shadows.Format.ClassName }),
|
|
2409
|
+
opacity: descriptors.ResponsiveOpacity()
|
|
2408
2410
|
}
|
|
2409
2411
|
});
|
|
2410
2412
|
}
|
|
@@ -2416,21 +2418,21 @@ function registerComponent$4(runtime) {
|
|
|
2416
2418
|
label: "Navigation",
|
|
2417
2419
|
icon: "Navigation40",
|
|
2418
2420
|
props: {
|
|
2419
|
-
id:
|
|
2420
|
-
links:
|
|
2421
|
-
linkTextStyle:
|
|
2421
|
+
id: descriptors.ElementID(),
|
|
2422
|
+
links: descriptors.NavigationLinks(),
|
|
2423
|
+
linkTextStyle: descriptors.TextStyle((props) => {
|
|
2422
2424
|
const links = props.links;
|
|
2423
2425
|
return {
|
|
2424
2426
|
label: "Link text style",
|
|
2425
2427
|
hidden: links == null || links.length === 0
|
|
2426
2428
|
};
|
|
2427
2429
|
}),
|
|
2428
|
-
showLogo:
|
|
2429
|
-
logoFile:
|
|
2430
|
+
showLogo: descriptors.Checkbox({ preset: true, label: "Show logo" }),
|
|
2431
|
+
logoFile: descriptors.Image((props) => ({
|
|
2430
2432
|
label: "Logo",
|
|
2431
2433
|
hidden: props.showLogo === false
|
|
2432
2434
|
})),
|
|
2433
|
-
logoWidth:
|
|
2435
|
+
logoWidth: descriptors.ResponsiveLength((props) => ({
|
|
2434
2436
|
preset: [{ deviceId: "desktop", value: { value: 100, unit: "px" } }],
|
|
2435
2437
|
label: "Logo width",
|
|
2436
2438
|
min: 0,
|
|
@@ -2438,15 +2440,15 @@ function registerComponent$4(runtime) {
|
|
|
2438
2440
|
options: [{ value: "px", label: "Pixels", icon: "Px16" }],
|
|
2439
2441
|
hidden: props.showLogo === false
|
|
2440
2442
|
})),
|
|
2441
|
-
logoAltText:
|
|
2443
|
+
logoAltText: descriptors.TextInput((props) => ({
|
|
2442
2444
|
label: "Logo alt text",
|
|
2443
2445
|
hidden: props.showLogo === false
|
|
2444
2446
|
})),
|
|
2445
|
-
logoLink:
|
|
2447
|
+
logoLink: descriptors.Link((props) => ({
|
|
2446
2448
|
label: "Logo on click",
|
|
2447
2449
|
hidden: props.showLogo === false
|
|
2448
2450
|
})),
|
|
2449
|
-
alignment:
|
|
2451
|
+
alignment: descriptors.ResponsiveIconRadioGroup({
|
|
2450
2452
|
label: "Alignment",
|
|
2451
2453
|
options: [
|
|
2452
2454
|
{ label: "Left", value: "flex-start", icon: "AlignLeft16" },
|
|
@@ -2455,7 +2457,7 @@ function registerComponent$4(runtime) {
|
|
|
2455
2457
|
],
|
|
2456
2458
|
defaultValue: "flex-end"
|
|
2457
2459
|
}),
|
|
2458
|
-
gutter:
|
|
2460
|
+
gutter: descriptors.GapX({
|
|
2459
2461
|
preset: [{ deviceId: "desktop", value: { value: 10, unit: "px" } }],
|
|
2460
2462
|
label: "Link gap",
|
|
2461
2463
|
min: 0,
|
|
@@ -2463,14 +2465,14 @@ function registerComponent$4(runtime) {
|
|
|
2463
2465
|
step: 1,
|
|
2464
2466
|
defaultValue: { value: 0, unit: "px" }
|
|
2465
2467
|
}),
|
|
2466
|
-
mobileMenuAnimation:
|
|
2468
|
+
mobileMenuAnimation: descriptors.ResponsiveSelect({
|
|
2467
2469
|
label: "Mobile menu",
|
|
2468
2470
|
options: [
|
|
2469
2471
|
{ value: "coverRight", label: "Cover from right" },
|
|
2470
2472
|
{ value: "coverLeft", label: "Cover from left" }
|
|
2471
2473
|
]
|
|
2472
2474
|
}),
|
|
2473
|
-
mobileMenuOpenIconColor:
|
|
2475
|
+
mobileMenuOpenIconColor: descriptors.ResponsiveColor((props, device) => {
|
|
2474
2476
|
const mobileMenuAnimation = props.mobileMenuAnimation;
|
|
2475
2477
|
const hidden = !findDeviceOverride(mobileMenuAnimation, device);
|
|
2476
2478
|
return {
|
|
@@ -2479,7 +2481,7 @@ function registerComponent$4(runtime) {
|
|
|
2479
2481
|
hidden
|
|
2480
2482
|
};
|
|
2481
2483
|
}),
|
|
2482
|
-
mobileMenuCloseIconColor:
|
|
2484
|
+
mobileMenuCloseIconColor: descriptors.ResponsiveColor((props, device) => {
|
|
2483
2485
|
const mobileMenuAnimation = props.mobileMenuAnimation;
|
|
2484
2486
|
const hidden = !findDeviceOverride(mobileMenuAnimation, device);
|
|
2485
2487
|
return {
|
|
@@ -2488,7 +2490,7 @@ function registerComponent$4(runtime) {
|
|
|
2488
2490
|
hidden
|
|
2489
2491
|
};
|
|
2490
2492
|
}),
|
|
2491
|
-
mobileMenuBackgroundColor:
|
|
2493
|
+
mobileMenuBackgroundColor: descriptors.ResponsiveColor((props, device) => {
|
|
2492
2494
|
const mobileMenuAnimation = props.mobileMenuAnimation;
|
|
2493
2495
|
const hidden = !findDeviceOverride(mobileMenuAnimation, device);
|
|
2494
2496
|
return {
|
|
@@ -2497,11 +2499,11 @@ function registerComponent$4(runtime) {
|
|
|
2497
2499
|
hidden
|
|
2498
2500
|
};
|
|
2499
2501
|
}),
|
|
2500
|
-
width:
|
|
2501
|
-
format:
|
|
2502
|
+
width: descriptors.Width({
|
|
2503
|
+
format: descriptors.Width.Format.ClassName,
|
|
2502
2504
|
defaultValue: { value: 100, unit: "%" }
|
|
2503
2505
|
}),
|
|
2504
|
-
margin:
|
|
2506
|
+
margin: descriptors.Margin({ format: descriptors.Margin.Format.ClassName })
|
|
2505
2507
|
}
|
|
2506
2508
|
});
|
|
2507
2509
|
}
|
|
@@ -2513,10 +2515,10 @@ function registerComponent$3(runtime) {
|
|
|
2513
2515
|
label: "Page",
|
|
2514
2516
|
hidden: true,
|
|
2515
2517
|
props: {
|
|
2516
|
-
children:
|
|
2517
|
-
backgrounds:
|
|
2518
|
-
rowGap:
|
|
2519
|
-
columnGap:
|
|
2518
|
+
children: descriptors.Grid(),
|
|
2519
|
+
backgrounds: descriptors.Backgrounds(),
|
|
2520
|
+
rowGap: descriptors.GapY(),
|
|
2521
|
+
columnGap: descriptors.GapX()
|
|
2520
2522
|
}
|
|
2521
2523
|
});
|
|
2522
2524
|
}
|
|
@@ -2528,8 +2530,8 @@ function registerComponent$2(runtime) {
|
|
|
2528
2530
|
label: "Social Links",
|
|
2529
2531
|
icon: "SocialLinks40",
|
|
2530
2532
|
props: {
|
|
2531
|
-
id:
|
|
2532
|
-
links:
|
|
2533
|
+
id: descriptors.ElementID(),
|
|
2534
|
+
links: descriptors.SocialLinks({
|
|
2533
2535
|
preset: {
|
|
2534
2536
|
links: [
|
|
2535
2537
|
{
|
|
@@ -2548,7 +2550,7 @@ function registerComponent$2(runtime) {
|
|
|
2548
2550
|
openInNewTab: false
|
|
2549
2551
|
}
|
|
2550
2552
|
}),
|
|
2551
|
-
shape:
|
|
2553
|
+
shape: descriptors.ResponsiveIconRadioGroup((props) => {
|
|
2552
2554
|
const links = props.links;
|
|
2553
2555
|
return {
|
|
2554
2556
|
label: "Shape",
|
|
@@ -2562,7 +2564,7 @@ function registerComponent$2(runtime) {
|
|
|
2562
2564
|
hidden: links == null || links.links.length === 0
|
|
2563
2565
|
};
|
|
2564
2566
|
}),
|
|
2565
|
-
size:
|
|
2567
|
+
size: descriptors.ResponsiveIconRadioGroup((props) => {
|
|
2566
2568
|
const links = props.links;
|
|
2567
2569
|
return {
|
|
2568
2570
|
label: "Size",
|
|
@@ -2575,7 +2577,7 @@ function registerComponent$2(runtime) {
|
|
|
2575
2577
|
hidden: links == null || links.links.length === 0
|
|
2576
2578
|
};
|
|
2577
2579
|
}),
|
|
2578
|
-
hoverStyle:
|
|
2580
|
+
hoverStyle: descriptors.ResponsiveSelect((props) => {
|
|
2579
2581
|
const links = props.links;
|
|
2580
2582
|
const hidden = links == null || links.links.length === 0;
|
|
2581
2583
|
return {
|
|
@@ -2591,7 +2593,7 @@ function registerComponent$2(runtime) {
|
|
|
2591
2593
|
hidden
|
|
2592
2594
|
};
|
|
2593
2595
|
}),
|
|
2594
|
-
fill:
|
|
2596
|
+
fill: descriptors.ResponsiveColor((props) => {
|
|
2595
2597
|
const links = props.links;
|
|
2596
2598
|
const hidden = links == null || links.links.length === 0;
|
|
2597
2599
|
return {
|
|
@@ -2599,7 +2601,7 @@ function registerComponent$2(runtime) {
|
|
|
2599
2601
|
hidden
|
|
2600
2602
|
};
|
|
2601
2603
|
}),
|
|
2602
|
-
backgroundColor:
|
|
2604
|
+
backgroundColor: descriptors.ResponsiveColor((props) => {
|
|
2603
2605
|
const links = props.links;
|
|
2604
2606
|
const hidden = links == null || links.links.length === 0;
|
|
2605
2607
|
return {
|
|
@@ -2607,7 +2609,7 @@ function registerComponent$2(runtime) {
|
|
|
2607
2609
|
hidden
|
|
2608
2610
|
};
|
|
2609
2611
|
}),
|
|
2610
|
-
alignment:
|
|
2612
|
+
alignment: descriptors.ResponsiveIconRadioGroup({
|
|
2611
2613
|
label: "Alignment",
|
|
2612
2614
|
options: [
|
|
2613
2615
|
{ label: "flex-start", value: "flex-start", icon: "AlignLeft16" },
|
|
@@ -2616,7 +2618,7 @@ function registerComponent$2(runtime) {
|
|
|
2616
2618
|
],
|
|
2617
2619
|
defaultValue: "center"
|
|
2618
2620
|
}),
|
|
2619
|
-
gutter:
|
|
2621
|
+
gutter: descriptors.GapX({
|
|
2620
2622
|
preset: [{ deviceId: "desktop", value: { value: 10, unit: "px" } }],
|
|
2621
2623
|
label: "Link gap",
|
|
2622
2624
|
min: 0,
|
|
@@ -2624,12 +2626,12 @@ function registerComponent$2(runtime) {
|
|
|
2624
2626
|
step: 1,
|
|
2625
2627
|
defaultValue: { value: 0, unit: "px" }
|
|
2626
2628
|
}),
|
|
2627
|
-
width:
|
|
2628
|
-
format:
|
|
2629
|
+
width: descriptors.Width({
|
|
2630
|
+
format: descriptors.Width.Format.ClassName,
|
|
2629
2631
|
defaultValue: { value: 100, unit: "%" }
|
|
2630
2632
|
}),
|
|
2631
|
-
margin:
|
|
2632
|
-
format:
|
|
2633
|
+
margin: descriptors.Margin({
|
|
2634
|
+
format: descriptors.Margin.Format.ClassName,
|
|
2633
2635
|
preset: [
|
|
2634
2636
|
{
|
|
2635
2637
|
deviceId: "desktop",
|
|
@@ -2652,8 +2654,8 @@ function registerComponent$1(runtime) {
|
|
|
2652
2654
|
type: constants.MakeswiftComponentType.Text,
|
|
2653
2655
|
label: "Text",
|
|
2654
2656
|
props: {
|
|
2655
|
-
id:
|
|
2656
|
-
text:
|
|
2657
|
+
id: descriptors.ElementID(),
|
|
2658
|
+
text: descriptors.RichText(() => ({
|
|
2657
2659
|
preset: {
|
|
2658
2660
|
document: {
|
|
2659
2661
|
object: "document",
|
|
@@ -2697,13 +2699,13 @@ function registerComponent$1(runtime) {
|
|
|
2697
2699
|
}
|
|
2698
2700
|
}
|
|
2699
2701
|
})),
|
|
2700
|
-
width:
|
|
2701
|
-
format:
|
|
2702
|
+
width: descriptors.Width({
|
|
2703
|
+
format: descriptors.Width.Format.ClassName,
|
|
2702
2704
|
preset: [{ deviceId: "desktop", value: { value: 700, unit: "px" } }],
|
|
2703
2705
|
defaultValue: { value: 100, unit: "%" }
|
|
2704
2706
|
}),
|
|
2705
|
-
margin:
|
|
2706
|
-
format:
|
|
2707
|
+
margin: descriptors.Margin({
|
|
2708
|
+
format: descriptors.Margin.Format.ClassName,
|
|
2707
2709
|
preset: [
|
|
2708
2710
|
{
|
|
2709
2711
|
deviceId: "desktop",
|
|
@@ -2727,14 +2729,14 @@ function registerComponent(runtime) {
|
|
|
2727
2729
|
label: "Video",
|
|
2728
2730
|
icon: "Video40",
|
|
2729
2731
|
props: {
|
|
2730
|
-
id:
|
|
2731
|
-
video:
|
|
2732
|
-
width:
|
|
2733
|
-
format:
|
|
2732
|
+
id: descriptors.ElementID(),
|
|
2733
|
+
video: descriptors.Video({ preset: { controls: true } }),
|
|
2734
|
+
width: descriptors.Width({
|
|
2735
|
+
format: descriptors.Width.Format.ClassName,
|
|
2734
2736
|
defaultValue: { value: 560, unit: "px" }
|
|
2735
2737
|
}),
|
|
2736
|
-
margin:
|
|
2737
|
-
borderRadius:
|
|
2738
|
+
margin: descriptors.Margin({ format: descriptors.Margin.Format.ClassName }),
|
|
2739
|
+
borderRadius: descriptors.BorderRadius({ format: descriptors.BorderRadius.Format.ClassName })
|
|
2738
2740
|
}
|
|
2739
2741
|
});
|
|
2740
2742
|
}
|
|
@@ -3250,7 +3252,7 @@ const defaultPadding = {
|
|
|
3250
3252
|
};
|
|
3251
3253
|
function useStyleControlCssObject(style, controlDefinition) {
|
|
3252
3254
|
const { properties } = controlDefinition.config;
|
|
3253
|
-
return __spreadValues(__spreadValues({}, properties.includes(
|
|
3255
|
+
return __spreadValues(__spreadValues({}, properties.includes(descriptors.StyleControlProperty.Width) && {
|
|
3254
3256
|
maxWidth: "100%"
|
|
3255
3257
|
}), responsiveStyle([
|
|
3256
3258
|
style == null ? void 0 : style.width,
|
|
@@ -3261,19 +3263,19 @@ function useStyleControlCssObject(style, controlDefinition) {
|
|
|
3261
3263
|
style == null ? void 0 : style.textStyle
|
|
3262
3264
|
], ([width, margin, padding, border, borderRadius, textStyle]) => {
|
|
3263
3265
|
var _a, _b, _c2, _d, _e, _f, _g, _h, _i, _j, _k;
|
|
3264
|
-
return __spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, properties.includes(
|
|
3266
|
+
return __spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, properties.includes(descriptors.StyleControlProperty.Width) && {
|
|
3265
3267
|
width: (_a = widthToString(width)) != null ? _a : "100%"
|
|
3266
|
-
}), properties.includes(
|
|
3268
|
+
}), properties.includes(descriptors.StyleControlProperty.Margin) && marginPropertyDataToStyle(margin != null ? margin : defaultMargin, defaultMargin)), properties.includes(descriptors.StyleControlProperty.Padding) && paddingPropertyDataToStyle(padding != null ? padding : defaultPadding, defaultPadding)), properties.includes(descriptors.StyleControlProperty.Border) && {
|
|
3267
3269
|
borderTop: (_b = borderSideToString2(border == null ? void 0 : border.borderTop)) != null ? _b : "0 solid black",
|
|
3268
3270
|
borderRight: (_c2 = borderSideToString2(border == null ? void 0 : border.borderRight)) != null ? _c2 : "0 solid black",
|
|
3269
3271
|
borderBottom: (_d = borderSideToString2(border == null ? void 0 : border.borderBottom)) != null ? _d : "0 solid black",
|
|
3270
3272
|
borderLeft: (_e = borderSideToString2(border == null ? void 0 : border.borderLeft)) != null ? _e : "0 solid black"
|
|
3271
|
-
}), properties.includes(
|
|
3273
|
+
}), properties.includes(descriptors.StyleControlProperty.BorderRadius) && {
|
|
3272
3274
|
borderTopLeftRadius: (_f = borderRadiusToString(borderRadius == null ? void 0 : borderRadius.borderTopLeftRadius)) != null ? _f : 0,
|
|
3273
3275
|
borderTopRightRadius: (_g = borderRadiusToString(borderRadius == null ? void 0 : borderRadius.borderTopRightRadius)) != null ? _g : 0,
|
|
3274
3276
|
borderBottomRightRadius: (_h = borderRadiusToString(borderRadius == null ? void 0 : borderRadius.borderBottomRightRadius)) != null ? _h : 0,
|
|
3275
3277
|
borderBottomLeftRadius: (_i = borderRadiusToString(borderRadius == null ? void 0 : borderRadius.borderBottomLeftRadius)) != null ? _i : 0
|
|
3276
|
-
}), properties.includes(
|
|
3278
|
+
}), properties.includes(descriptors.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 }), {
|
|
3277
3279
|
textTransform: (_j = textStyle == null ? void 0 : textStyle.textTransform) != null ? _j : [],
|
|
3278
3280
|
fontStyle: (_k = textStyle == null ? void 0 : textStyle.fontStyle) != null ? _k : []
|
|
3279
3281
|
}));
|
|
@@ -3298,9 +3300,31 @@ function useStyleControlCssObject(style, controlDefinition) {
|
|
|
3298
3300
|
return `${fontSize.value}${fontSize.unit}`;
|
|
3299
3301
|
}
|
|
3300
3302
|
}
|
|
3301
|
-
function useFormattedStyle(styleControlData, controlDefinition) {
|
|
3303
|
+
function useFormattedStyle(styleControlData, controlDefinition, control) {
|
|
3302
3304
|
const style = useStyleControlCssObject(styleControlData, controlDefinition);
|
|
3303
|
-
|
|
3305
|
+
const guid = React.useId().replaceAll(":", "");
|
|
3306
|
+
const styleClassName = useStyle(style);
|
|
3307
|
+
const classNames = `${styleClassName} ${guid}`;
|
|
3308
|
+
React.useEffect(() => {
|
|
3309
|
+
let currentBoxModel = null;
|
|
3310
|
+
const handleAnimationFrameRequest = () => {
|
|
3311
|
+
if (control == null)
|
|
3312
|
+
return;
|
|
3313
|
+
const element = document.querySelector(`.${guid}`);
|
|
3314
|
+
const measuredBoxModel = element == null ? null : boxModels.getBox(element);
|
|
3315
|
+
if (!deepEqual(currentBoxModel, measuredBoxModel)) {
|
|
3316
|
+
currentBoxModel = measuredBoxModel;
|
|
3317
|
+
control.changeBoxModel(currentBoxModel);
|
|
3318
|
+
}
|
|
3319
|
+
animationFrameHandle = requestAnimationFrame(handleAnimationFrameRequest);
|
|
3320
|
+
};
|
|
3321
|
+
let animationFrameHandle = requestAnimationFrame(handleAnimationFrameRequest);
|
|
3322
|
+
return () => {
|
|
3323
|
+
cancelAnimationFrame(animationFrameHandle);
|
|
3324
|
+
control == null ? void 0 : control.changeBoxModel(null);
|
|
3325
|
+
};
|
|
3326
|
+
}, [guid, control]);
|
|
3327
|
+
return classNames;
|
|
3304
3328
|
}
|
|
3305
3329
|
function RenderHook({
|
|
3306
3330
|
hook: useHook,
|
|
@@ -3336,10 +3360,10 @@ function useComboboxControlValue(data) {
|
|
|
3336
3360
|
}
|
|
3337
3361
|
function useImageControlValue(data, definition) {
|
|
3338
3362
|
var _a;
|
|
3339
|
-
const format = (_a = definition.config.format) != null ? _a :
|
|
3363
|
+
const format = (_a = definition.config.format) != null ? _a : descriptors.ImageControlValueFormat.URL;
|
|
3340
3364
|
const fileId = data != null ? data : null;
|
|
3341
3365
|
const file = useFile(fileId);
|
|
3342
|
-
if (format ===
|
|
3366
|
+
if (format === descriptors.ImageControlValueFormat.URL) {
|
|
3343
3367
|
return file == null ? void 0 : file.publicUrl;
|
|
3344
3368
|
}
|
|
3345
3369
|
if (file == null || file.dimensions == null)
|
|
@@ -3676,19 +3700,19 @@ function ControlValue({
|
|
|
3676
3700
|
parameters: [data, definition],
|
|
3677
3701
|
children: (value) => children(value)
|
|
3678
3702
|
}, definition.type);
|
|
3679
|
-
case
|
|
3703
|
+
case descriptors.ColorControlType:
|
|
3680
3704
|
return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
|
|
3681
3705
|
hook: useColorValue,
|
|
3682
3706
|
parameters: [data, definition],
|
|
3683
3707
|
children: (value) => children(value)
|
|
3684
3708
|
}, definition.type);
|
|
3685
|
-
case
|
|
3709
|
+
case descriptors.ImageControlType:
|
|
3686
3710
|
return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
|
|
3687
3711
|
hook: useImageControlValue,
|
|
3688
3712
|
parameters: [data, definition],
|
|
3689
3713
|
children: (value) => children(value)
|
|
3690
3714
|
}, definition.type);
|
|
3691
|
-
case
|
|
3715
|
+
case descriptors.LinkControlType:
|
|
3692
3716
|
return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
|
|
3693
3717
|
hook: useLinkControlValue,
|
|
3694
3718
|
parameters: [data, definition],
|
|
@@ -3700,32 +3724,38 @@ function ControlValue({
|
|
|
3700
3724
|
parameters: [data],
|
|
3701
3725
|
children: (value) => children(value)
|
|
3702
3726
|
}, definition.type);
|
|
3703
|
-
case
|
|
3727
|
+
case descriptors.ShapeControlType:
|
|
3704
3728
|
return /* @__PURE__ */ jsxRuntime.jsx(ShapeControlValue, {
|
|
3705
3729
|
definition,
|
|
3706
3730
|
data,
|
|
3707
3731
|
control,
|
|
3708
3732
|
children: (value) => children(value)
|
|
3709
3733
|
});
|
|
3710
|
-
case
|
|
3734
|
+
case descriptors.ListControlType:
|
|
3711
3735
|
return /* @__PURE__ */ jsxRuntime.jsx(ListControlValue, {
|
|
3712
3736
|
definition,
|
|
3713
3737
|
data,
|
|
3714
3738
|
control,
|
|
3715
3739
|
children: (value) => children(value)
|
|
3716
3740
|
});
|
|
3717
|
-
case
|
|
3741
|
+
case descriptors.SlotControlType:
|
|
3718
3742
|
return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
|
|
3719
3743
|
hook: useSlot,
|
|
3720
3744
|
parameters: [data, control],
|
|
3721
3745
|
children: (value) => children(value)
|
|
3722
3746
|
}, definition.type);
|
|
3723
|
-
case
|
|
3747
|
+
case descriptors.RichTextControlType:
|
|
3724
3748
|
return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
|
|
3725
3749
|
hook: useRichText,
|
|
3726
3750
|
parameters: [data, control],
|
|
3727
3751
|
children: (value) => children(value)
|
|
3728
3752
|
}, definition.type);
|
|
3753
|
+
case descriptors.StyleControlType:
|
|
3754
|
+
return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
|
|
3755
|
+
hook: useFormattedStyle,
|
|
3756
|
+
parameters: [data, definition, control],
|
|
3757
|
+
children: (value) => children(value)
|
|
3758
|
+
}, definition.type);
|
|
3729
3759
|
default:
|
|
3730
3760
|
return children(data);
|
|
3731
3761
|
}
|
|
@@ -3765,19 +3795,19 @@ function PropsValue({
|
|
|
3765
3795
|
return constants.getPropControllers(state, documentKey, element.key);
|
|
3766
3796
|
});
|
|
3767
3797
|
return Object.entries(propControllerDescriptorsRef.current).reduceRight((renderFn, [propName, descriptor]) => (propsValue) => {
|
|
3768
|
-
var _a2, _b;
|
|
3798
|
+
var _a2, _b, _c2;
|
|
3769
3799
|
switch (descriptor.type) {
|
|
3770
3800
|
case textInput.CheckboxControlType:
|
|
3771
3801
|
case textInput.NumberControlType:
|
|
3772
3802
|
case textInput.TextInputControlType:
|
|
3773
3803
|
case textInput.TextAreaControlType:
|
|
3774
3804
|
case textInput.SelectControlType:
|
|
3775
|
-
case
|
|
3776
|
-
case
|
|
3805
|
+
case descriptors.ColorControlType:
|
|
3806
|
+
case descriptors.ImageControlType:
|
|
3777
3807
|
case combobox.ComboboxControlType:
|
|
3778
|
-
case
|
|
3779
|
-
case
|
|
3780
|
-
case
|
|
3808
|
+
case descriptors.ShapeControlType:
|
|
3809
|
+
case descriptors.ListControlType:
|
|
3810
|
+
case descriptors.LinkControlType:
|
|
3781
3811
|
return /* @__PURE__ */ jsxRuntime.jsx(ControlValue, {
|
|
3782
3812
|
definition: descriptor,
|
|
3783
3813
|
data: props[propName],
|
|
@@ -3786,16 +3816,18 @@ function PropsValue({
|
|
|
3786
3816
|
[propName]: value
|
|
3787
3817
|
}))
|
|
3788
3818
|
});
|
|
3789
|
-
case
|
|
3819
|
+
case descriptors.StyleControlType: {
|
|
3820
|
+
const control = (_a2 = propControllers == null ? void 0 : propControllers[propName]) != null ? _a2 : null;
|
|
3790
3821
|
return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
|
|
3791
3822
|
hook: useFormattedStyle,
|
|
3792
|
-
parameters: [props[propName], descriptor],
|
|
3823
|
+
parameters: [props[propName], descriptor, control],
|
|
3793
3824
|
children: (value) => renderFn(__spreadProps(__spreadValues({}, propsValue), {
|
|
3794
3825
|
[propName]: value
|
|
3795
3826
|
}))
|
|
3796
3827
|
}, descriptor.type);
|
|
3797
|
-
|
|
3798
|
-
|
|
3828
|
+
}
|
|
3829
|
+
case descriptors.RichTextControlType: {
|
|
3830
|
+
const control = (_b = propControllers == null ? void 0 : propControllers[propName]) != null ? _b : null;
|
|
3799
3831
|
return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
|
|
3800
3832
|
hook: useRichText,
|
|
3801
3833
|
parameters: [props[propName], control],
|
|
@@ -3803,19 +3835,20 @@ function PropsValue({
|
|
|
3803
3835
|
[propName]: value
|
|
3804
3836
|
}))
|
|
3805
3837
|
}, descriptor.type);
|
|
3806
|
-
|
|
3807
|
-
|
|
3838
|
+
}
|
|
3839
|
+
case descriptors.SlotControlType: {
|
|
3840
|
+
const control = (_c2 = propControllers == null ? void 0 : propControllers[propName]) != null ? _c2 : null;
|
|
3808
3841
|
return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
|
|
3809
3842
|
hook: useSlot,
|
|
3810
|
-
parameters: [props[propName],
|
|
3843
|
+
parameters: [props[propName], control],
|
|
3811
3844
|
children: (value) => renderFn(__spreadProps(__spreadValues({}, propsValue), {
|
|
3812
3845
|
[propName]: value
|
|
3813
3846
|
}))
|
|
3814
3847
|
}, descriptor.type);
|
|
3815
3848
|
}
|
|
3816
|
-
case
|
|
3849
|
+
case descriptors.Types.Width:
|
|
3817
3850
|
switch (descriptor.options.format) {
|
|
3818
|
-
case
|
|
3851
|
+
case descriptors.WidthPropControllerFormat.ClassName:
|
|
3819
3852
|
return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
|
|
3820
3853
|
hook: useWidthStyle,
|
|
3821
3854
|
parameters: [props[propName], descriptor],
|
|
@@ -3828,9 +3861,9 @@ function PropsValue({
|
|
|
3828
3861
|
[propName]: props[propName]
|
|
3829
3862
|
}));
|
|
3830
3863
|
}
|
|
3831
|
-
case
|
|
3864
|
+
case descriptors.Types.Padding:
|
|
3832
3865
|
switch (descriptor.options.format) {
|
|
3833
|
-
case
|
|
3866
|
+
case descriptors.PaddingPropControllerFormat.ClassName:
|
|
3834
3867
|
return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
|
|
3835
3868
|
hook: usePaddingStyle,
|
|
3836
3869
|
parameters: [props[propName]],
|
|
@@ -3843,9 +3876,9 @@ function PropsValue({
|
|
|
3843
3876
|
[propName]: props[propName]
|
|
3844
3877
|
}));
|
|
3845
3878
|
}
|
|
3846
|
-
case
|
|
3879
|
+
case descriptors.Types.Margin:
|
|
3847
3880
|
switch (descriptor.options.format) {
|
|
3848
|
-
case
|
|
3881
|
+
case descriptors.MarginPropControllerFormat.ClassName:
|
|
3849
3882
|
return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
|
|
3850
3883
|
hook: useMarginStyle,
|
|
3851
3884
|
parameters: [props[propName]],
|
|
@@ -3858,9 +3891,9 @@ function PropsValue({
|
|
|
3858
3891
|
[propName]: props[propName]
|
|
3859
3892
|
}));
|
|
3860
3893
|
}
|
|
3861
|
-
case
|
|
3894
|
+
case descriptors.Types.BorderRadius:
|
|
3862
3895
|
switch (descriptor.options.format) {
|
|
3863
|
-
case
|
|
3896
|
+
case descriptors.BorderRadiusPropControllerFormat.ClassName:
|
|
3864
3897
|
return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
|
|
3865
3898
|
hook: useBorderRadiusStyle,
|
|
3866
3899
|
parameters: [props[propName]],
|
|
@@ -3873,9 +3906,9 @@ function PropsValue({
|
|
|
3873
3906
|
[propName]: props[propName]
|
|
3874
3907
|
}));
|
|
3875
3908
|
}
|
|
3876
|
-
case
|
|
3909
|
+
case descriptors.Types.Shadows:
|
|
3877
3910
|
switch (descriptor.options.format) {
|
|
3878
|
-
case
|
|
3911
|
+
case descriptors.ShadowsPropControllerFormat.ClassName:
|
|
3879
3912
|
return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
|
|
3880
3913
|
hook: useShadowsStyle,
|
|
3881
3914
|
parameters: [props[propName]],
|
|
@@ -3888,9 +3921,9 @@ function PropsValue({
|
|
|
3888
3921
|
[propName]: props[propName]
|
|
3889
3922
|
}));
|
|
3890
3923
|
}
|
|
3891
|
-
case
|
|
3924
|
+
case descriptors.Types.Border:
|
|
3892
3925
|
switch (descriptor.options.format) {
|
|
3893
|
-
case
|
|
3926
|
+
case descriptors.BorderPropControllerFormat.ClassName:
|
|
3894
3927
|
return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
|
|
3895
3928
|
hook: useBorderStyle,
|
|
3896
3929
|
parameters: [props[propName]],
|
|
@@ -3903,7 +3936,7 @@ function PropsValue({
|
|
|
3903
3936
|
[propName]: props[propName]
|
|
3904
3937
|
}));
|
|
3905
3938
|
}
|
|
3906
|
-
case
|
|
3939
|
+
case descriptors.Types.ResponsiveColor:
|
|
3907
3940
|
return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
|
|
3908
3941
|
hook: useResponsiveColor,
|
|
3909
3942
|
parameters: [props[propName]],
|