@makeswift/runtime 0.0.0-f94dde1 → 0.0.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.
- package/controls.js +1 -0
- package/dist/Page.cjs.js +222 -0
- package/dist/Page.cjs.js.map +1 -0
- package/dist/Page.es.js +216 -0
- package/dist/Page.es.js.map +1 -0
- package/dist/actions.cjs.js +30 -1
- package/dist/actions.cjs.js.map +1 -1
- package/dist/actions.es.js +26 -2
- package/dist/actions.es.js.map +1 -1
- package/dist/box-models.cjs.js +2 -0
- package/dist/box-models.cjs.js.map +1 -1
- package/dist/box-models.es.js +2 -0
- package/dist/box-models.es.js.map +1 -1
- package/dist/builder.cjs.js +2 -0
- package/dist/builder.cjs.js.map +1 -1
- package/dist/builder.es.js +2 -1
- package/dist/builder.es.js.map +1 -1
- package/dist/components.cjs.js +54 -36
- package/dist/components.cjs.js.map +1 -1
- package/dist/components.es.js +15 -7
- package/dist/components.es.js.map +1 -1
- package/dist/constants.cjs.js +96 -1
- package/dist/constants.cjs.js.map +1 -1
- package/dist/constants.es.js +96 -1
- package/dist/constants.es.js.map +1 -1
- package/dist/control-serialization.cjs.js +335 -5
- package/dist/control-serialization.cjs.js.map +1 -1
- package/dist/control-serialization.es.js +335 -6
- package/dist/control-serialization.es.js.map +1 -1
- package/dist/controls.cjs.js +7 -0
- package/dist/controls.cjs.js.map +1 -0
- package/dist/controls.es.js +2 -0
- package/dist/controls.es.js.map +1 -0
- package/dist/descriptors.cjs.js +18 -1
- package/dist/descriptors.cjs.js.map +1 -1
- package/dist/descriptors.es.js +15 -2
- package/dist/descriptors.es.js.map +1 -1
- package/dist/{react.cjs2.js → index.cjs.js} +2893 -748
- package/dist/index.cjs.js.map +1 -0
- package/dist/{react.es2.js → index.es.js} +2836 -693
- package/dist/index.es.js.map +1 -0
- package/dist/instances.cjs.js +17 -0
- package/dist/instances.cjs.js.map +1 -1
- package/dist/instances.es.js +17 -1
- package/dist/instances.es.js.map +1 -1
- package/dist/main.cjs.js +10 -0
- package/dist/main.cjs.js.map +1 -1
- package/dist/main.es.js +6 -1
- package/dist/main.es.js.map +1 -1
- package/dist/next.cjs.js +63 -21
- package/dist/next.cjs.js.map +1 -1
- package/dist/next.es.js +61 -20
- package/dist/next.es.js.map +1 -1
- package/dist/prop-controllers.cjs.js +2 -0
- package/dist/prop-controllers.cjs.js.map +1 -1
- package/dist/prop-controllers.es.js +2 -1
- package/dist/prop-controllers.es.js.map +1 -1
- package/dist/react-builder-preview.cjs.js +24 -35
- package/dist/react-builder-preview.cjs.js.map +1 -1
- package/dist/react-builder-preview.es.js +23 -34
- package/dist/react-builder-preview.es.js.map +1 -1
- package/dist/react-page.cjs.js +263 -0
- package/dist/react-page.cjs.js.map +1 -0
- package/dist/react-page.es.js +241 -0
- package/dist/react-page.es.js.map +1 -0
- package/dist/react.cjs.js +21 -12
- package/dist/react.cjs.js.map +1 -1
- package/dist/react.es.js +14 -7
- package/dist/react.es.js.map +1 -1
- package/dist/style.cjs.js +38 -0
- package/dist/style.cjs.js.map +1 -0
- package/dist/style.es.js +35 -0
- package/dist/style.es.js.map +1 -0
- package/dist/types/api/constants.d.ts.map +1 -1
- package/dist/types/api/generated/graphql.d.ts +59 -0
- package/dist/types/api/generated/graphql.d.ts.map +1 -1
- package/dist/types/api/react.d.ts +26 -4
- package/dist/types/api/react.d.ts.map +1 -1
- package/dist/types/api/types.d.ts +2 -2
- package/dist/types/api/types.d.ts.map +1 -1
- package/dist/types/builder/serialization/control-serialization.d.ts +274 -7
- package/dist/types/builder/serialization/control-serialization.d.ts.map +1 -1
- package/dist/types/builder/serialization/function-serialization.d.ts +1 -0
- package/dist/types/builder/serialization/function-serialization.d.ts.map +1 -1
- package/dist/types/components/builtin/Box/Box.d.ts +2 -2
- package/dist/types/components/builtin/Box/Box.d.ts.map +1 -1
- package/dist/types/components/builtin/Button/Button.d.ts +7 -6
- package/dist/types/components/builtin/Button/Button.d.ts.map +1 -1
- package/dist/types/components/builtin/Carousel/Carousel.d.ts +6 -5
- package/dist/types/components/builtin/Carousel/Carousel.d.ts.map +1 -1
- package/dist/types/components/builtin/Countdown/Countdown.d.ts +6 -5
- package/dist/types/components/builtin/Countdown/Countdown.d.ts.map +1 -1
- package/dist/types/components/builtin/Divider/Divider.d.ts +4 -3
- package/dist/types/components/builtin/Divider/Divider.d.ts.map +1 -1
- package/dist/types/components/builtin/Embed/Embed.d.ts +2 -2
- package/dist/types/components/builtin/Embed/Embed.d.ts.map +1 -1
- package/dist/types/components/builtin/Form/Form.d.ts +42 -0
- package/dist/types/components/builtin/Form/Form.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/components/Checkbox/index.d.ts +15 -0
- package/dist/types/components/builtin/Form/components/Field/components/Checkbox/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/components/CheckboxTableField/index.d.ts +15 -0
- package/dist/types/components/builtin/Form/components/Field/components/CheckboxTableField/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/components/EmailTableField/index.d.ts +11 -0
- package/dist/types/components/builtin/Form/components/Field/components/EmailTableField/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/components/Input/index.d.ts +14 -0
- package/dist/types/components/builtin/Form/components/Field/components/Input/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/components/Label/index.d.ts +16 -0
- package/dist/types/components/builtin/Form/components/Field/components/Label/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/components/LongTextTableField/index.d.ts +10 -0
- package/dist/types/components/builtin/Form/components/Field/components/LongTextTableField/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/components/MultipleSelectTableField/index.d.ts +23 -0
- package/dist/types/components/builtin/Form/components/Field/components/MultipleSelectTableField/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/components/NumberTableField/index.d.ts +11 -0
- package/dist/types/components/builtin/Form/components/Field/components/NumberTableField/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/components/PhoneNumberTableField/index.d.ts +11 -0
- package/dist/types/components/builtin/Form/components/Field/components/PhoneNumberTableField/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/components/PlaceholderTableField/index.d.ts +3 -0
- package/dist/types/components/builtin/Form/components/Field/components/PlaceholderTableField/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/components/RadioButton/index.d.ts +17 -0
- package/dist/types/components/builtin/Form/components/Field/components/RadioButton/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/components/SingleLineTextTableField/index.d.ts +11 -0
- package/dist/types/components/builtin/Form/components/Field/components/SingleLineTextTableField/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/components/SingleSelectTableField/components/TableColumnRadioButtonGroup/index.d.ts +23 -0
- package/dist/types/components/builtin/Form/components/Field/components/SingleSelectTableField/components/TableColumnRadioButtonGroup/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/components/SingleSelectTableField/components/TableColumnSingleSelect/index.d.ts +19 -0
- package/dist/types/components/builtin/Form/components/Field/components/SingleSelectTableField/components/TableColumnSingleSelect/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/components/SingleSelectTableField/index.d.ts +24 -0
- package/dist/types/components/builtin/Form/components/Field/components/SingleSelectTableField/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/components/TextArea/index.d.ts +13 -0
- package/dist/types/components/builtin/Form/components/Field/components/TextArea/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/components/URLTableField/index.d.ts +11 -0
- package/dist/types/components/builtin/Form/components/Field/components/URLTableField/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/index.d.ts +19 -0
- package/dist/types/components/builtin/Form/components/Field/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Field/services/cssField.d.ts +11 -0
- package/dist/types/components/builtin/Form/components/Field/services/cssField.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Placeholder/index.d.ts +9 -0
- package/dist/types/components/builtin/Form/components/Placeholder/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/components/Spinner/index.d.ts +3 -0
- package/dist/types/components/builtin/Form/components/Spinner/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/context/FormContext.d.ts +33 -0
- package/dist/types/components/builtin/Form/context/FormContext.d.ts.map +1 -0
- package/dist/types/components/builtin/Form/index.d.ts +2 -0
- package/dist/types/components/builtin/Form/index.d.ts.map +1 -0
- package/dist/types/components/builtin/Image/Image.d.ts.map +1 -1
- package/dist/types/components/builtin/Navigation/Navigation.d.ts +6 -5
- package/dist/types/components/builtin/Navigation/Navigation.d.ts.map +1 -1
- package/dist/types/components/builtin/Navigation/components/MobileMenu/index.d.ts +4 -3
- package/dist/types/components/builtin/Navigation/components/MobileMenu/index.d.ts.map +1 -1
- package/dist/types/components/builtin/SocialLinks/SocialLinks.d.ts +5 -4
- package/dist/types/components/builtin/SocialLinks/SocialLinks.d.ts.map +1 -1
- package/dist/types/components/builtin/Text/Text.d.ts +2 -2
- package/dist/types/components/builtin/Text/Text.d.ts.map +1 -1
- package/dist/types/components/builtin/Text/components/RichTextEditor/components/Block/index.d.ts +2 -13
- package/dist/types/components/builtin/Text/components/RichTextEditor/components/Block/index.d.ts.map +1 -1
- package/dist/types/components/builtin/Video/Video.d.ts +15 -0
- package/dist/types/components/builtin/Video/Video.d.ts.map +1 -0
- package/dist/types/components/builtin/Video/index.d.ts +2 -0
- package/dist/types/components/builtin/Video/index.d.ts.map +1 -0
- package/dist/types/components/builtin/index.d.ts +1 -0
- package/dist/types/components/builtin/index.d.ts.map +1 -1
- package/dist/types/components/hooks/index.d.ts +1 -0
- package/dist/types/components/hooks/index.d.ts.map +1 -1
- package/dist/types/components/hooks/useTable.d.ts +66 -0
- package/dist/types/components/hooks/useTable.d.ts.map +1 -0
- package/dist/types/components/hooks/useTableFormFieldRefs.d.ts +8 -0
- package/dist/types/components/hooks/useTableFormFieldRefs.d.ts.map +1 -0
- package/dist/types/components/index.d.ts +2 -0
- package/dist/types/components/index.d.ts.map +1 -1
- package/dist/types/components/page/BodySnippet.d.ts +7 -0
- package/dist/types/components/page/BodySnippet.d.ts.map +1 -0
- package/dist/types/components/page/Page.d.ts +47 -0
- package/dist/types/components/page/Page.d.ts.map +1 -0
- package/dist/types/components/page/index.d.ts +2 -0
- package/dist/types/components/page/index.d.ts.map +1 -0
- package/dist/types/components/shared/BackgroundsContainer/components/Backgrounds/index.d.ts.map +1 -1
- package/dist/types/components/shared/FallbackComponent/FallbackComponent.d.ts +7 -0
- package/dist/types/components/shared/FallbackComponent/FallbackComponent.d.ts.map +1 -0
- package/dist/types/components/shared/FallbackComponent/index.d.ts +2 -0
- package/dist/types/components/shared/FallbackComponent/index.d.ts.map +1 -0
- package/dist/types/components/utils/placeholders.d.ts +7 -0
- package/dist/types/components/utils/placeholders.d.ts.map +1 -1
- package/dist/types/components/utils/queries.d.ts +1 -0
- package/dist/types/components/utils/queries.d.ts.map +1 -1
- package/dist/types/components/utils/responsive-style.d.ts +9 -0
- package/dist/types/components/utils/responsive-style.d.ts.map +1 -0
- package/dist/types/components/utils/types.d.ts +1 -2
- package/dist/types/components/utils/types.d.ts.map +1 -1
- package/dist/types/controls/index.d.ts +2 -0
- package/dist/types/controls/index.d.ts.map +1 -0
- package/dist/types/controls/style.d.ts +141 -0
- package/dist/types/controls/style.d.ts.map +1 -0
- package/dist/types/controls/types.d.ts +11 -0
- package/dist/types/controls/types.d.ts.map +1 -0
- package/dist/types/index.d.ts +2 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/next.d.ts +7 -4
- package/dist/types/next.d.ts.map +1 -1
- package/dist/types/prop-controllers/descriptors.d.ts +82 -46
- package/dist/types/prop-controllers/descriptors.d.ts.map +1 -1
- package/dist/types/prop-controllers/index.d.ts +3 -3
- package/dist/types/prop-controllers/index.d.ts.map +1 -1
- package/dist/types/prop-controllers/instances.d.ts +36 -4
- package/dist/types/prop-controllers/instances.d.ts.map +1 -1
- package/dist/types/react.d.ts +1 -1
- package/dist/types/react.d.ts.map +1 -1
- package/dist/types/runtimes/react/controls/style.d.ts +4 -0
- package/dist/types/runtimes/react/controls/style.d.ts.map +1 -0
- package/dist/types/runtimes/react/controls.d.ts +7 -0
- package/dist/types/runtimes/react/controls.d.ts.map +1 -0
- package/dist/types/runtimes/react/index.d.ts +44 -0
- package/dist/types/runtimes/react/index.d.ts.map +1 -0
- package/dist/types/state/actions.d.ts +36 -1
- package/dist/types/state/actions.d.ts.map +1 -1
- package/dist/types/state/modules/box-models.d.ts.map +1 -1
- package/dist/types/state/modules/read-only-documents.d.ts +8 -4
- package/dist/types/state/modules/read-only-documents.d.ts.map +1 -1
- package/dist/types/state/modules/read-write-documents.d.ts +1 -1
- package/dist/types/state/modules/read-write-documents.d.ts.map +1 -1
- package/dist/types/state/react-builder-preview.d.ts.map +1 -1
- package/dist/types/state/react-page.d.ts +4 -3
- package/dist/types/state/react-page.d.ts.map +1 -1
- package/package.json +22 -12
- package/dist/react.cjs2.js.map +0 -1
- package/dist/react.es2.js.map +0 -1
- package/dist/types/runtimes/react.d.ts +0 -36
- package/dist/types/runtimes/react.d.ts.map +0 -1
package/dist/react.es.js
CHANGED
|
@@ -1,26 +1,33 @@
|
|
|
1
1
|
export { A as ActionTypes, c as changeDocument } from "./actions.es.js";
|
|
2
|
-
export { D as
|
|
2
|
+
export { D as DocumentReference, E as Element, P as PageProvider, a as ReactRuntime, R as RuntimeProvider, u as useIsInBuilder, b as usePageId } from "./index.es.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "use-sync-external-store/shim/with-selector";
|
|
5
5
|
import "@apollo/client";
|
|
6
|
+
import "./react-page.es.js";
|
|
6
7
|
import "redux";
|
|
7
8
|
import "redux-thunk";
|
|
8
9
|
import "./descriptors.es.js";
|
|
10
|
+
import "./style.es.js";
|
|
9
11
|
import "styled-components";
|
|
10
12
|
import "framer-motion";
|
|
13
|
+
import "@emotion/css";
|
|
14
|
+
import "@apollo/client/react/ssr";
|
|
15
|
+
import "slate";
|
|
16
|
+
import "uuid/v4";
|
|
11
17
|
import "react/jsx-runtime";
|
|
12
|
-
import "
|
|
13
|
-
import "
|
|
14
|
-
import "next/image";
|
|
15
|
-
import "react-player";
|
|
18
|
+
import "html-react-parser";
|
|
19
|
+
import "next/head";
|
|
16
20
|
import "color";
|
|
17
21
|
import "scroll-into-view-if-needed";
|
|
18
22
|
import "next/link";
|
|
19
23
|
import "react-use-gesture";
|
|
20
24
|
import "@popmotion/popcorn";
|
|
21
|
-
import "
|
|
25
|
+
import "next/image";
|
|
26
|
+
import "formik";
|
|
27
|
+
import "./box-models.es.js";
|
|
28
|
+
import "css-box-model";
|
|
22
29
|
import "polished";
|
|
23
|
-
import "
|
|
30
|
+
import "react-player";
|
|
24
31
|
import "slate-hotkeys";
|
|
25
32
|
import "corporate-ipsum";
|
|
26
33
|
import "slate-react";
|
package/dist/react.es.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"react.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const StyleControlType = "makeswift::controls::style";
|
|
3
|
+
const StyleControlProperty = {
|
|
4
|
+
Width: "makeswift::controls::style::property::width",
|
|
5
|
+
Margin: "makeswift::controls::style::property::margin",
|
|
6
|
+
Padding: "makeswift::controls::style::property::padding",
|
|
7
|
+
Border: "makeswift::controls::style::property::border",
|
|
8
|
+
BorderRadius: "makeswift::controls::style::property::border-radius"
|
|
9
|
+
};
|
|
10
|
+
const StyleControlDefaultProperties = [
|
|
11
|
+
StyleControlProperty.Width,
|
|
12
|
+
StyleControlProperty.Margin
|
|
13
|
+
];
|
|
14
|
+
const AllStyleControlProperties = [
|
|
15
|
+
StyleControlProperty.Width,
|
|
16
|
+
StyleControlProperty.Margin,
|
|
17
|
+
StyleControlProperty.Padding,
|
|
18
|
+
StyleControlProperty.Border,
|
|
19
|
+
StyleControlProperty.BorderRadius
|
|
20
|
+
];
|
|
21
|
+
function Style(params) {
|
|
22
|
+
var _a;
|
|
23
|
+
return {
|
|
24
|
+
type: StyleControlType,
|
|
25
|
+
config: { properties: (_a = params == null ? void 0 : params.properties) != null ? _a : StyleControlDefaultProperties }
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
Style.Default = StyleControlDefaultProperties;
|
|
29
|
+
Style.All = AllStyleControlProperties;
|
|
30
|
+
Style.Width = StyleControlProperty.Width;
|
|
31
|
+
Style.Margin = StyleControlProperty.Margin;
|
|
32
|
+
Style.Padding = StyleControlProperty.Padding;
|
|
33
|
+
Style.Border = StyleControlProperty.Border;
|
|
34
|
+
Style.BorderRadius = StyleControlProperty.BorderRadius;
|
|
35
|
+
exports.Style = Style;
|
|
36
|
+
exports.StyleControlProperty = StyleControlProperty;
|
|
37
|
+
exports.StyleControlType = StyleControlType;
|
|
38
|
+
//# sourceMappingURL=style.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style.cjs.js","sources":["../src/controls/style.ts"],"sourcesContent":["import { ColorData, ResponsiveValue } from './types'\n\n/**\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/length\n *\n * @todos\n * - Add additional units\n * - Rename `value` field to `amount` or a more descriptive name representative of the \"distance\"\n * represented by a CSS length\n */\nexport type LengthData = { value: number; unit: 'px' }\n\n/** @see https://developer.mozilla.org/en-US/docs/Web/CSS/percentage */\nexport type PercentageData = { value: number; unit: '%' }\n\n/** @see https://developer.mozilla.org/en-US/docs/Web/CSS/length-percentage */\nexport type LengthPercentageData = LengthData | PercentageData\n\n/** @see https://developer.mozilla.org/en-US/docs/Web/CSS/width */\nexport type WidthPropertyData = LengthPercentageData\n\n/** @see https://developer.mozilla.org/en-US/docs/Web/CSS/margin#constituent_properties */\nexport type MarginLonghandPropertyData = LengthData | 'auto'\n\n/**\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/margin\n *\n * @todos\n * - Remove `null` from possible values\n * - Remove `undefined` from possible values and make fields optional\n */\nexport type MarginPropertyData = {\n marginTop: MarginLonghandPropertyData | null | undefined\n marginRight: MarginLonghandPropertyData | null | undefined\n marginBottom: MarginLonghandPropertyData | null | undefined\n marginLeft: MarginLonghandPropertyData | null | undefined\n}\n\n/** @see https://developer.mozilla.org/en-US/docs/Web/CSS/padding#constituent_properties */\nexport type PaddingLonghandPropertyData = LengthData\n\n/**\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/padding\n *\n * @todos\n * - Remove `null` from possible values\n * - Remove `undefined` from possible values and make fields optional\n */\nexport type PaddingPropertyData = {\n paddingTop: PaddingLonghandPropertyData | null | undefined\n paddingRight: PaddingLonghandPropertyData | null | undefined\n paddingBottom: PaddingLonghandPropertyData | null | undefined\n paddingLeft: PaddingLonghandPropertyData | null | undefined\n}\n\n/**\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-style\n */\ntype BorderStyle = 'dotted' | 'dashed' | 'solid'\n\n/**\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-top#constituent_properties\n *\n * @todos\n * - Change `width` to be a `Length`\n * - Remove `null` from possible values\n * - Remove `undefined` from possible values and make fields optional\n */\nexport type BorderSideShorthandPropertyData = {\n width: number | null | undefined\n style: BorderStyle\n color?: ColorData | null\n}\n\n/**\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border\n *\n * @todos\n * - Remove `null` from possible values\n * - Remove `undefined` from possible values and make fields optional\n */\nexport type BorderPropertyData = {\n borderTop: BorderSideShorthandPropertyData | null | undefined\n borderRight: BorderSideShorthandPropertyData | null | undefined\n borderBottom: BorderSideShorthandPropertyData | null | undefined\n borderLeft: BorderSideShorthandPropertyData | null | undefined\n}\n\n/** @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-radius#constituent_properties */\nexport type BorderRadiusLonghandPropertyData = LengthPercentageData\n\n/**\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-radius\n *\n * @todos\n * - Remove `null` from possible values of longhand properties\n * - Remove `undefined` from possible values and make fields optional\n */\nexport type BorderRadiusPropertyData = {\n borderTopLeftRadius: LengthPercentageData | null | undefined\n borderTopRightRadius: LengthPercentageData | null | undefined\n borderBottomRightRadius: LengthPercentageData | null | undefined\n borderBottomLeftRadius: LengthPercentageData | null | undefined\n}\n\nexport type StyleControlData = {\n width?: ResponsiveValue<WidthPropertyData>\n margin?: ResponsiveValue<MarginPropertyData>\n padding?: ResponsiveValue<PaddingPropertyData>\n border?: ResponsiveValue<BorderPropertyData>\n borderRadius?: ResponsiveValue<BorderRadiusPropertyData>\n}\n\nexport const StyleControlType = 'makeswift::controls::style'\n\nexport const StyleControlProperty = {\n Width: 'makeswift::controls::style::property::width',\n Margin: 'makeswift::controls::style::property::margin',\n Padding: 'makeswift::controls::style::property::padding',\n Border: 'makeswift::controls::style::property::border',\n BorderRadius: 'makeswift::controls::style::property::border-radius',\n} as const\n\nexport type StyleControlProperty = typeof StyleControlProperty[keyof typeof StyleControlProperty]\n\ntype StyleControlParams = { properties?: StyleControlProperty[] }\n\nexport type StyleControlConfig = { properties: StyleControlProperty[] }\n\nconst StyleControlDefaultProperties: StyleControlProperty[] = [\n StyleControlProperty.Width,\n StyleControlProperty.Margin,\n]\n\nconst AllStyleControlProperties: StyleControlProperty[] = [\n StyleControlProperty.Width,\n StyleControlProperty.Margin,\n StyleControlProperty.Padding,\n StyleControlProperty.Border,\n StyleControlProperty.BorderRadius,\n]\n\nexport type StyleControlDefinition = {\n type: typeof StyleControlType\n config: StyleControlConfig\n}\n\n/**\n * @todos\n * - Add support for custom panel labels.\n * - Add support for default values. Internally, default values must be represented with the same\n * format as the underlying data so that controls can show these values.\n */\nexport function Style(params?: StyleControlParams): StyleControlDefinition {\n return {\n type: StyleControlType,\n config: { properties: params?.properties ?? StyleControlDefaultProperties },\n }\n}\n\nStyle.Default = StyleControlDefaultProperties\nStyle.All = AllStyleControlProperties\n\nStyle.Width = StyleControlProperty.Width\nStyle.Margin = StyleControlProperty.Margin\nStyle.Padding = StyleControlProperty.Padding\nStyle.Border = StyleControlProperty.Border\nStyle.BorderRadius = StyleControlProperty.BorderRadius\n"],"names":[],"mappings":";AAiHO,MAAM,mBAAmB;AAEzB,MAAM,uBAAuB;AAAA,EAClC,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,cAAc;AAChB;AAQA,MAAM,gCAAwD;AAAA,EAC5D,qBAAqB;AAAA,EACrB,qBAAqB;AACvB;AAEA,MAAM,4BAAoD;AAAA,EACxD,qBAAqB;AAAA,EACrB,qBAAqB;AAAA,EACrB,qBAAqB;AAAA,EACrB,qBAAqB;AAAA,EACrB,qBAAqB;AACvB;AAaO,eAAe,QAAqD;;AAClE,SAAA;AAAA,IACL,MAAM;AAAA,IACN,QAAQ,EAAE,YAAY,uCAAQ,eAAR,YAAsB,8BAA8B;AAAA,EAAA;AAE9E;AAEA,MAAM,UAAU;AAChB,MAAM,MAAM;AAEZ,MAAM,QAAQ,qBAAqB;AACnC,MAAM,SAAS,qBAAqB;AACpC,MAAM,UAAU,qBAAqB;AACrC,MAAM,SAAS,qBAAqB;AACpC,MAAM,eAAe,qBAAqB;;;;"}
|
package/dist/style.es.js
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
const StyleControlType = "makeswift::controls::style";
|
|
2
|
+
const StyleControlProperty = {
|
|
3
|
+
Width: "makeswift::controls::style::property::width",
|
|
4
|
+
Margin: "makeswift::controls::style::property::margin",
|
|
5
|
+
Padding: "makeswift::controls::style::property::padding",
|
|
6
|
+
Border: "makeswift::controls::style::property::border",
|
|
7
|
+
BorderRadius: "makeswift::controls::style::property::border-radius"
|
|
8
|
+
};
|
|
9
|
+
const StyleControlDefaultProperties = [
|
|
10
|
+
StyleControlProperty.Width,
|
|
11
|
+
StyleControlProperty.Margin
|
|
12
|
+
];
|
|
13
|
+
const AllStyleControlProperties = [
|
|
14
|
+
StyleControlProperty.Width,
|
|
15
|
+
StyleControlProperty.Margin,
|
|
16
|
+
StyleControlProperty.Padding,
|
|
17
|
+
StyleControlProperty.Border,
|
|
18
|
+
StyleControlProperty.BorderRadius
|
|
19
|
+
];
|
|
20
|
+
function Style(params) {
|
|
21
|
+
var _a;
|
|
22
|
+
return {
|
|
23
|
+
type: StyleControlType,
|
|
24
|
+
config: { properties: (_a = params == null ? void 0 : params.properties) != null ? _a : StyleControlDefaultProperties }
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
Style.Default = StyleControlDefaultProperties;
|
|
28
|
+
Style.All = AllStyleControlProperties;
|
|
29
|
+
Style.Width = StyleControlProperty.Width;
|
|
30
|
+
Style.Margin = StyleControlProperty.Margin;
|
|
31
|
+
Style.Padding = StyleControlProperty.Padding;
|
|
32
|
+
Style.Border = StyleControlProperty.Border;
|
|
33
|
+
Style.BorderRadius = StyleControlProperty.BorderRadius;
|
|
34
|
+
export { StyleControlType as S, StyleControlProperty as a, Style as b };
|
|
35
|
+
//# sourceMappingURL=style.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style.es.js","sources":["../src/controls/style.ts"],"sourcesContent":["import { ColorData, ResponsiveValue } from './types'\n\n/**\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/length\n *\n * @todos\n * - Add additional units\n * - Rename `value` field to `amount` or a more descriptive name representative of the \"distance\"\n * represented by a CSS length\n */\nexport type LengthData = { value: number; unit: 'px' }\n\n/** @see https://developer.mozilla.org/en-US/docs/Web/CSS/percentage */\nexport type PercentageData = { value: number; unit: '%' }\n\n/** @see https://developer.mozilla.org/en-US/docs/Web/CSS/length-percentage */\nexport type LengthPercentageData = LengthData | PercentageData\n\n/** @see https://developer.mozilla.org/en-US/docs/Web/CSS/width */\nexport type WidthPropertyData = LengthPercentageData\n\n/** @see https://developer.mozilla.org/en-US/docs/Web/CSS/margin#constituent_properties */\nexport type MarginLonghandPropertyData = LengthData | 'auto'\n\n/**\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/margin\n *\n * @todos\n * - Remove `null` from possible values\n * - Remove `undefined` from possible values and make fields optional\n */\nexport type MarginPropertyData = {\n marginTop: MarginLonghandPropertyData | null | undefined\n marginRight: MarginLonghandPropertyData | null | undefined\n marginBottom: MarginLonghandPropertyData | null | undefined\n marginLeft: MarginLonghandPropertyData | null | undefined\n}\n\n/** @see https://developer.mozilla.org/en-US/docs/Web/CSS/padding#constituent_properties */\nexport type PaddingLonghandPropertyData = LengthData\n\n/**\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/padding\n *\n * @todos\n * - Remove `null` from possible values\n * - Remove `undefined` from possible values and make fields optional\n */\nexport type PaddingPropertyData = {\n paddingTop: PaddingLonghandPropertyData | null | undefined\n paddingRight: PaddingLonghandPropertyData | null | undefined\n paddingBottom: PaddingLonghandPropertyData | null | undefined\n paddingLeft: PaddingLonghandPropertyData | null | undefined\n}\n\n/**\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-style\n */\ntype BorderStyle = 'dotted' | 'dashed' | 'solid'\n\n/**\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-top#constituent_properties\n *\n * @todos\n * - Change `width` to be a `Length`\n * - Remove `null` from possible values\n * - Remove `undefined` from possible values and make fields optional\n */\nexport type BorderSideShorthandPropertyData = {\n width: number | null | undefined\n style: BorderStyle\n color?: ColorData | null\n}\n\n/**\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border\n *\n * @todos\n * - Remove `null` from possible values\n * - Remove `undefined` from possible values and make fields optional\n */\nexport type BorderPropertyData = {\n borderTop: BorderSideShorthandPropertyData | null | undefined\n borderRight: BorderSideShorthandPropertyData | null | undefined\n borderBottom: BorderSideShorthandPropertyData | null | undefined\n borderLeft: BorderSideShorthandPropertyData | null | undefined\n}\n\n/** @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-radius#constituent_properties */\nexport type BorderRadiusLonghandPropertyData = LengthPercentageData\n\n/**\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-radius\n *\n * @todos\n * - Remove `null` from possible values of longhand properties\n * - Remove `undefined` from possible values and make fields optional\n */\nexport type BorderRadiusPropertyData = {\n borderTopLeftRadius: LengthPercentageData | null | undefined\n borderTopRightRadius: LengthPercentageData | null | undefined\n borderBottomRightRadius: LengthPercentageData | null | undefined\n borderBottomLeftRadius: LengthPercentageData | null | undefined\n}\n\nexport type StyleControlData = {\n width?: ResponsiveValue<WidthPropertyData>\n margin?: ResponsiveValue<MarginPropertyData>\n padding?: ResponsiveValue<PaddingPropertyData>\n border?: ResponsiveValue<BorderPropertyData>\n borderRadius?: ResponsiveValue<BorderRadiusPropertyData>\n}\n\nexport const StyleControlType = 'makeswift::controls::style'\n\nexport const StyleControlProperty = {\n Width: 'makeswift::controls::style::property::width',\n Margin: 'makeswift::controls::style::property::margin',\n Padding: 'makeswift::controls::style::property::padding',\n Border: 'makeswift::controls::style::property::border',\n BorderRadius: 'makeswift::controls::style::property::border-radius',\n} as const\n\nexport type StyleControlProperty = typeof StyleControlProperty[keyof typeof StyleControlProperty]\n\ntype StyleControlParams = { properties?: StyleControlProperty[] }\n\nexport type StyleControlConfig = { properties: StyleControlProperty[] }\n\nconst StyleControlDefaultProperties: StyleControlProperty[] = [\n StyleControlProperty.Width,\n StyleControlProperty.Margin,\n]\n\nconst AllStyleControlProperties: StyleControlProperty[] = [\n StyleControlProperty.Width,\n StyleControlProperty.Margin,\n StyleControlProperty.Padding,\n StyleControlProperty.Border,\n StyleControlProperty.BorderRadius,\n]\n\nexport type StyleControlDefinition = {\n type: typeof StyleControlType\n config: StyleControlConfig\n}\n\n/**\n * @todos\n * - Add support for custom panel labels.\n * - Add support for default values. Internally, default values must be represented with the same\n * format as the underlying data so that controls can show these values.\n */\nexport function Style(params?: StyleControlParams): StyleControlDefinition {\n return {\n type: StyleControlType,\n config: { properties: params?.properties ?? StyleControlDefaultProperties },\n }\n}\n\nStyle.Default = StyleControlDefaultProperties\nStyle.All = AllStyleControlProperties\n\nStyle.Width = StyleControlProperty.Width\nStyle.Margin = StyleControlProperty.Margin\nStyle.Padding = StyleControlProperty.Padding\nStyle.Border = StyleControlProperty.Border\nStyle.BorderRadius = StyleControlProperty.BorderRadius\n"],"names":[],"mappings":"AAiHO,MAAM,mBAAmB;AAEzB,MAAM,uBAAuB;AAAA,EAClC,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,cAAc;AAChB;AAQA,MAAM,gCAAwD;AAAA,EAC5D,qBAAqB;AAAA,EACrB,qBAAqB;AACvB;AAEA,MAAM,4BAAoD;AAAA,EACxD,qBAAqB;AAAA,EACrB,qBAAqB;AAAA,EACrB,qBAAqB;AAAA,EACrB,qBAAqB;AAAA,EACrB,qBAAqB;AACvB;AAaO,eAAe,QAAqD;AAxCpE;AAyCE,SAAA;AAAA,IACL,MAAM;AAAA,IACN,QAAQ,EAAE,YAAY,uCAAQ,eAAR,YAAsB,8BAA8B;AAAA,EAAA;AAE9E;AAEA,MAAM,UAAU;AAChB,MAAM,MAAM;AAEZ,MAAM,QAAQ,qBAAqB;AACnC,MAAM,SAAS,qBAAqB;AACpC,MAAM,UAAU,qBAAqB;AACrC,MAAM,SAAS,qBAAqB;AACpC,MAAM,eAAe,qBAAqB;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/api/constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/api/constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAU3C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAE9C,eAAO,MAAM,SAAS,EAAE,MAAM,CAAC,eAAe,EAAE,YAAY,CAO3D,CAAA"}
|
|
@@ -54,8 +54,67 @@ export declare type PagePathnameSliceFragment = {
|
|
|
54
54
|
id: string;
|
|
55
55
|
pathname: any;
|
|
56
56
|
};
|
|
57
|
+
export declare type GlobalElementFragment = {
|
|
58
|
+
__typename: 'GlobalElement';
|
|
59
|
+
id: string;
|
|
60
|
+
data: any;
|
|
61
|
+
};
|
|
62
|
+
export declare type TableFragment = {
|
|
63
|
+
__typename: 'Table';
|
|
64
|
+
id: string;
|
|
65
|
+
name: string;
|
|
66
|
+
columns: Array<{
|
|
67
|
+
__typename?: 'CheckboxTableColumn';
|
|
68
|
+
id: string;
|
|
69
|
+
name: string;
|
|
70
|
+
} | {
|
|
71
|
+
__typename?: 'EmailTableColumn';
|
|
72
|
+
id: string;
|
|
73
|
+
name: string;
|
|
74
|
+
} | {
|
|
75
|
+
__typename?: 'LongTextTableColumn';
|
|
76
|
+
id: string;
|
|
77
|
+
name: string;
|
|
78
|
+
} | {
|
|
79
|
+
__typename?: 'MultipleSelectTableColumn';
|
|
80
|
+
id: string;
|
|
81
|
+
name: string;
|
|
82
|
+
options: Array<{
|
|
83
|
+
__typename?: 'MultipleSelectTableColumnOption';
|
|
84
|
+
id: string;
|
|
85
|
+
name: string;
|
|
86
|
+
}>;
|
|
87
|
+
} | {
|
|
88
|
+
__typename?: 'NumberTableColumn';
|
|
89
|
+
id: string;
|
|
90
|
+
name: string;
|
|
91
|
+
} | {
|
|
92
|
+
__typename?: 'PhoneNumberTableColumn';
|
|
93
|
+
id: string;
|
|
94
|
+
name: string;
|
|
95
|
+
} | {
|
|
96
|
+
__typename?: 'SingleLineTextTableColumn';
|
|
97
|
+
id: string;
|
|
98
|
+
name: string;
|
|
99
|
+
} | {
|
|
100
|
+
__typename?: 'SingleSelectTableColumn';
|
|
101
|
+
id: string;
|
|
102
|
+
name: string;
|
|
103
|
+
options: Array<{
|
|
104
|
+
__typename?: 'SingleSelectTableColumnOption';
|
|
105
|
+
id: string;
|
|
106
|
+
name: string;
|
|
107
|
+
}>;
|
|
108
|
+
} | {
|
|
109
|
+
__typename?: 'URLTableColumn';
|
|
110
|
+
id: string;
|
|
111
|
+
name: string;
|
|
112
|
+
}>;
|
|
113
|
+
};
|
|
57
114
|
export declare const SwatchFragmentDoc: DocumentNode<SwatchFragment, unknown>;
|
|
58
115
|
export declare const FileFragmentDoc: DocumentNode<FileFragment, unknown>;
|
|
59
116
|
export declare const TypographyFragmentDoc: DocumentNode<TypographyFragment, unknown>;
|
|
60
117
|
export declare const PagePathnameSliceFragmentDoc: DocumentNode<PagePathnameSliceFragment, unknown>;
|
|
118
|
+
export declare const GlobalElementFragmentDoc: DocumentNode<GlobalElementFragment, unknown>;
|
|
119
|
+
export declare const TableFragmentDoc: DocumentNode<TableFragment, unknown>;
|
|
61
120
|
//# sourceMappingURL=graphql.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graphql.d.ts","sourceRoot":"","sources":["../../../../src/api/generated/graphql.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,IAAI,YAAY,EAAE,MAAM,mCAAmC,CAAA;AACrF,oBAAY,cAAc,GAAG;IAC3B,UAAU,EAAE,QAAQ,CAAA;IACpB,EAAE,EAAE,MAAM,CAAA;IACV,GAAG,EAAE,MAAM,CAAA;IACX,UAAU,EAAE,MAAM,CAAA;IAClB,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,oBAAY,YAAY,GAAG;IACzB,UAAU,EAAE,MAAM,CAAA;IAClB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,GAAG,CAAA;IACd,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,UAAU,CAAC,EAAE;QA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AAC,CAAA;KAC3F,GACD;QAAE,UAAU,CAAC,EAAE,gBAAgB,CAAC;QAAC,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAC9D,CAAA;CACF,CAAA;AAED,eAAO,MAAM,iBAAiB,uCAmBuB,CAAA;AACrD,eAAO,MAAM,eAAe,qCA8BuB,CAAA;AACnD,eAAO,MAAM,qBAAqB,2CAmEuB,CAAA;AACzD,eAAO,MAAM,4BAA4B,kDAiBuB,CAAA;AAChE,eAAO,MAAM,wBAAwB,8CAiBuB,CAAA;AAC5D,eAAO,MAAM,gBAAgB,sCA0EuB,CAAA"}
|
|
@@ -1,6 +1,28 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import {
|
|
1
|
+
import { ApolloClient, DocumentNode, NormalizedCacheObject, OperationVariables, QueryHookOptions, QueryResult, TypedDocumentNode, DefaultContext, ApolloCache, MutationHookOptions, MutationTuple } from '@apollo/client';
|
|
2
|
+
export { gql } from '@apollo/client';
|
|
3
|
+
import { ReactNode } from 'react';
|
|
4
|
+
import { Element } from '../state/react-page';
|
|
5
|
+
export declare function useIsPrefetching(): boolean;
|
|
6
|
+
declare type CreateApolloClientParams = {
|
|
7
|
+
uri?: string;
|
|
8
|
+
cacheData?: NormalizedCacheObject;
|
|
9
|
+
};
|
|
10
|
+
export declare function createApolloClient({ uri, cacheData }: CreateApolloClientParams): ApolloClient<NormalizedCacheObject>;
|
|
11
|
+
export declare type MakeswiftClientOptions = {
|
|
12
|
+
uri?: string;
|
|
13
|
+
cacheData?: NormalizedCacheObject;
|
|
14
|
+
};
|
|
15
|
+
export declare class MakeswiftClient {
|
|
16
|
+
apolloClient: ApolloClient<NormalizedCacheObject>;
|
|
17
|
+
constructor({ uri, cacheData }: MakeswiftClientOptions);
|
|
18
|
+
prefetch(element: Element): Promise<NormalizedCacheObject>;
|
|
19
|
+
updateCacheData(cacheData: NormalizedCacheObject): void;
|
|
20
|
+
}
|
|
4
21
|
export declare function useQuery<TData = any, TVariables = OperationVariables>(query: DocumentNode | TypedDocumentNode<TData, TVariables>, options?: QueryHookOptions<TData, TVariables>): QueryResult<TData, TVariables>;
|
|
5
|
-
export declare function
|
|
22
|
+
export declare function useMutation<TData = any, TVariables = OperationVariables, TContext = DefaultContext, TCache extends ApolloCache<any> = ApolloCache<any>>(mutation: DocumentNode | TypedDocumentNode<TData, TVariables>, options?: MutationHookOptions<TData, TVariables, TContext>): MutationTuple<TData, TVariables, TContext, TCache>;
|
|
23
|
+
declare type MakeswiftProviderProps = {
|
|
24
|
+
client: MakeswiftClient;
|
|
25
|
+
children: ReactNode;
|
|
26
|
+
};
|
|
27
|
+
export declare function MakeswiftProvider({ client, children }: MakeswiftProviderProps): JSX.Element;
|
|
6
28
|
//# sourceMappingURL=react.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../../../src/api/react.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../../../src/api/react.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,qBAAqB,EACrB,kBAAkB,EAClB,gBAAgB,EAChB,WAAW,EACX,iBAAiB,EAGjB,cAAc,EACd,WAAW,EACX,mBAAmB,EACnB,aAAa,EAGd,MAAM,gBAAgB,CAAA;AAEvB,OAAO,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAA;AACpC,OAAO,EAAiB,SAAS,EAAc,MAAM,OAAO,CAAA;AAK5D,OAAO,EAA2B,OAAO,EAAE,MAAM,qBAAqB,CAAA;AA4CtE,wBAAgB,gBAAgB,IAAI,OAAO,CAE1C;AAED,aAAK,wBAAwB,GAAG;IAC9B,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,SAAS,CAAC,EAAE,qBAAqB,CAAA;CAClC,CAAA;AAED,wBAAgB,kBAAkB,CAAC,EAAE,GAAG,EAAE,SAAS,EAA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1,4 @@
|
|
|
1
|
-
import { SwatchFragment as Swatch, FileFragment as File, TypographyFragment as Typography, PagePathnameSliceFragment as PagePathnameSlice } from './generated/graphql';
|
|
2
|
-
export declare type APIResource = Swatch | File | Typography | PagePathnameSlice;
|
|
1
|
+
import { SwatchFragment as Swatch, FileFragment as File, TypographyFragment as Typography, PagePathnameSliceFragment as PagePathnameSlice, GlobalElementFragment as GlobalElement, TableFragment as Table } from './generated/graphql';
|
|
2
|
+
export declare type APIResource = Swatch | File | Typography | PagePathnameSlice | GlobalElement | Table;
|
|
3
3
|
export declare type APIResourceType = APIResource['__typename'];
|
|
4
4
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/api/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,IAAI,MAAM,EACxB,YAAY,IAAI,IAAI,EACpB,kBAAkB,IAAI,UAAU,EAChC,yBAAyB,IAAI,iBAAiB,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/api/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,IAAI,MAAM,EACxB,YAAY,IAAI,IAAI,EACpB,kBAAkB,IAAI,UAAU,EAChC,yBAAyB,IAAI,iBAAiB,EAC9C,qBAAqB,IAAI,aAAa,EACtC,aAAa,IAAI,KAAK,EACvB,MAAM,qBAAqB,CAAA;AAE5B,oBAAY,WAAW,GAAG,MAAM,GAAG,IAAI,GAAG,UAAU,GAAG,iBAAiB,GAAG,aAAa,GAAG,KAAK,CAAA;AAEhG,oBAAY,eAAe,GAAG,WAAW,CAAC,YAAY,CAAC,CAAA"}
|
|
@@ -1,7 +1,28 @@
|
|
|
1
|
-
import { Data, ListDescriptor as ListControl, ListOptions as ListControlConfig, ListValue as ListControlValue,
|
|
1
|
+
import { CheckboxDescriptor as CheckboxControl, CheckboxValue as CheckboxControlValue, Data, Device, DateDescriptor as DateControl, DateValue as DateControlValue, Gap, GapXDescriptor as GapXControl, GapXValue as GapXControlValue, GapYDescriptor as GapYControl, GapYValue as GapYControlValue, ImageDescriptor as ImageControl, ImageValue as ImageControlValue, LinkDescriptor as LinkControl, LinkValue as LinkControlValue, ListDescriptor as ListControl, ListOptions as ListControlConfig, ListValue as ListControlValue, NumberDescriptor as NumberControl, NumberValue as NumberControlValue, ResponsiveColorDescriptor as ResponsiveColorControl, ResponsiveColorValue as ResponsiveColorControlValue, ResponsiveNumberDescriptor as ResponsiveNumberControl, ResponsiveNumberValue as ResponsiveNumberControlValue, ResponsiveIconRadioGroupDescriptor as ResponsiveIconRadioGroupControl, ResponsiveIconRadioGroupValue as ResponsiveIconRadioGroupControlValue, ResponsiveSelectDescriptor as ResponsiveSelectControl, ResponsiveSelectValue as ResponsiveSelectControlValue, ResponsiveLengthDescriptor as ResponsiveLengthControl, ResponsiveLengthValue as ResponsiveLengthControlValue, RichTextDescriptor as RichTextControl, RichTextValue as RichTextControlValue, ShapeDescriptor as ShapeControl, ShapeValue as ShapeControlValue, TextInputDescriptor as TextInputControl, TextInputValue as TextInputControlValue, TextStyleDescriptor as TextStyleControl, TextStyleValue as TextStyleControlValue, TypeaheadDescriptor as TypeaheadControl, TypeaheadOptions as TypeaheadControlConfig, TypeaheadValue as TypeaheadControlValue, PanelDescriptorType as PanelControlType, PropControllerDescriptor as Control, Props as Controls } from '../../prop-controllers';
|
|
2
|
+
import { IconRadioGroupOption, LengthOption, SelectLabelOrientation, SelectOption, Length } from '../../prop-controllers/descriptors';
|
|
2
3
|
import { DeserializedFunction, SerializedFunction } from './function-serialization';
|
|
4
|
+
declare type SerializedShapeControlConfig<T extends Record<string, SerializedPanelControl>> = {
|
|
5
|
+
type: T;
|
|
6
|
+
preset?: {
|
|
7
|
+
[K in keyof T]?: SerializedPanelControlValueType<T[K]>;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
declare type SerializedShapeControl<_T extends Record<string, Data>, U extends Record<string, SerializedPanelControl>> = {
|
|
11
|
+
type: typeof Controls.Types.Shape;
|
|
12
|
+
options: SerializedShapeControlConfig<U>;
|
|
13
|
+
};
|
|
14
|
+
declare type DeserializedShapeControlConfig<T extends Record<string, DeserializedPanelControl>> = {
|
|
15
|
+
type: T;
|
|
16
|
+
preset?: {
|
|
17
|
+
[K in keyof T]?: DeserializedPanelControlValueType<T[K]>;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
declare type DeserializedShapeControl<_T extends Record<string, Data>, U extends Record<string, DeserializedPanelControl>> = {
|
|
21
|
+
type: typeof Controls.Types.Shape;
|
|
22
|
+
options: DeserializedShapeControlConfig<U>;
|
|
23
|
+
};
|
|
3
24
|
declare type SerializedListControlConfig<T extends Data> = {
|
|
4
|
-
type:
|
|
25
|
+
type: SerializedPanelControl<T>;
|
|
5
26
|
label?: string;
|
|
6
27
|
getItemLabel?: SerializedFunction<Exclude<ListControlConfig<T>['getItemLabel'], undefined>>;
|
|
7
28
|
preset?: ListControlValue<T>;
|
|
@@ -9,10 +30,10 @@ declare type SerializedListControlConfig<T extends Data> = {
|
|
|
9
30
|
};
|
|
10
31
|
declare type SerializedListControl<T extends ListControlValue = ListControlValue> = {
|
|
11
32
|
type: typeof Controls.Types.List;
|
|
12
|
-
options: SerializedListControlConfig<T
|
|
33
|
+
options: SerializedListControlConfig<T extends ListControlValue<infer U> ? U : never>;
|
|
13
34
|
};
|
|
14
35
|
declare type DeserializedListControlConfig<T extends Data> = {
|
|
15
|
-
type:
|
|
36
|
+
type: DeserializedPanelControl<T>;
|
|
16
37
|
label?: string;
|
|
17
38
|
getItemLabel?: DeserializedFunction<Exclude<ListControlConfig<T>['getItemLabel'], undefined>>;
|
|
18
39
|
preset?: ListControlValue<T>;
|
|
@@ -20,10 +41,256 @@ declare type DeserializedListControlConfig<T extends Data> = {
|
|
|
20
41
|
};
|
|
21
42
|
declare type DeserializedListControl<T extends ListControlValue = ListControlValue> = {
|
|
22
43
|
type: typeof Controls.Types.List;
|
|
23
|
-
options: DeserializedListControlConfig<T
|
|
44
|
+
options: DeserializedListControlConfig<T extends ListControlValue<infer U> ? U : never>;
|
|
45
|
+
};
|
|
46
|
+
declare type SerializedTypeaheadControlConfig<T extends Data> = {
|
|
47
|
+
getItems: SerializedFunction<TypeaheadControlConfig<T>['getItems']>;
|
|
48
|
+
label?: string;
|
|
49
|
+
preset?: TypeaheadControlValue<T>;
|
|
50
|
+
defaultValue?: TypeaheadControlValue<T>;
|
|
51
|
+
};
|
|
52
|
+
declare type SerializedTypeaheadControl<T extends TypeaheadControlValue = TypeaheadControlValue> = {
|
|
53
|
+
type: typeof Controls.Types.Typeahead;
|
|
54
|
+
options: SerializedTypeaheadControlConfig<T['value']>;
|
|
55
|
+
};
|
|
56
|
+
declare type DeserializedTypeaheadControlConfig<T extends Data> = {
|
|
57
|
+
getItems: DeserializedFunction<TypeaheadControlConfig<T>['getItems']>;
|
|
58
|
+
label?: string;
|
|
59
|
+
preset?: TypeaheadControlValue<T>;
|
|
60
|
+
defaultValue?: TypeaheadControlValue<T>;
|
|
61
|
+
};
|
|
62
|
+
declare type DeserializedTypeaheadControl<T extends TypeaheadControlValue = TypeaheadControlValue> = {
|
|
63
|
+
type: typeof Controls.Types.Typeahead;
|
|
64
|
+
options: DeserializedTypeaheadControlConfig<T['value']>;
|
|
65
|
+
};
|
|
66
|
+
declare type SerializedConfig<T> = T | SerializedFunction<(props: Record<string, unknown>, deviceMode: Device) => T>;
|
|
67
|
+
declare type DeserializedConfig<T> = T | DeserializedFunction<(props: Record<string, unknown>, deviceMode: Device) => T>;
|
|
68
|
+
declare type GapXControlConfig = {
|
|
69
|
+
preset?: GapXControlValue;
|
|
70
|
+
label?: string;
|
|
71
|
+
defaultValue?: Gap;
|
|
72
|
+
min?: number;
|
|
73
|
+
max?: number;
|
|
74
|
+
step?: number;
|
|
75
|
+
hidden?: boolean;
|
|
76
|
+
};
|
|
77
|
+
declare type SerializedGapXControl<_T = GapXControlValue> = {
|
|
78
|
+
type: typeof Controls.Types.GapX;
|
|
79
|
+
options: SerializedConfig<GapXControlConfig>;
|
|
80
|
+
};
|
|
81
|
+
declare type DeserializedGapXControl<_T = GapXControlValue> = {
|
|
82
|
+
type: typeof Controls.Types.GapX;
|
|
83
|
+
options: DeserializedConfig<GapXControlConfig>;
|
|
84
|
+
};
|
|
85
|
+
declare type GapYControlConfig = {
|
|
86
|
+
preset?: GapYControlValue;
|
|
87
|
+
label?: string;
|
|
88
|
+
defaultValue?: Gap;
|
|
89
|
+
min?: number;
|
|
90
|
+
max?: number;
|
|
91
|
+
step?: number;
|
|
92
|
+
hidden?: boolean;
|
|
93
|
+
};
|
|
94
|
+
declare type SerializedGapYControl<_T = GapYControlValue> = {
|
|
95
|
+
type: typeof Controls.Types.GapY;
|
|
96
|
+
options: SerializedConfig<GapYControlConfig>;
|
|
97
|
+
};
|
|
98
|
+
declare type DeserializedGapYControl<_T = GapYControlValue> = {
|
|
99
|
+
type: typeof Controls.Types.GapY;
|
|
100
|
+
options: DeserializedConfig<GapYControlConfig>;
|
|
101
|
+
};
|
|
102
|
+
declare type ResponsiveNumberControlConfig = {
|
|
103
|
+
preset?: ResponsiveNumberControlValue;
|
|
104
|
+
label?: string;
|
|
105
|
+
defaultValue?: number;
|
|
106
|
+
min?: number;
|
|
107
|
+
max?: number;
|
|
108
|
+
step?: number;
|
|
109
|
+
hidden?: boolean;
|
|
110
|
+
};
|
|
111
|
+
declare type SerializedResponsiveNumberControl<_T = ResponsiveNumberControlValue> = {
|
|
112
|
+
type: typeof Controls.Types.ResponsiveNumber;
|
|
113
|
+
options: SerializedConfig<ResponsiveNumberControlConfig>;
|
|
114
|
+
};
|
|
115
|
+
declare type DeserializedResponsiveNumberControl<_T = ResponsiveNumberControlValue> = {
|
|
116
|
+
type: typeof Controls.Types.ResponsiveNumber;
|
|
117
|
+
options: DeserializedConfig<ResponsiveNumberControlConfig>;
|
|
118
|
+
};
|
|
119
|
+
declare type CheckboxControlConfig = {
|
|
120
|
+
preset?: CheckboxControlValue;
|
|
121
|
+
label: string;
|
|
122
|
+
hidden?: boolean;
|
|
123
|
+
};
|
|
124
|
+
declare type SerializedCheckboxControl<_T = CheckboxControlValue> = {
|
|
125
|
+
type: typeof Controls.Types.Checkbox;
|
|
126
|
+
options: SerializedConfig<CheckboxControlConfig>;
|
|
127
|
+
};
|
|
128
|
+
declare type DeserializedCheckboxControl<_T = CheckboxControlValue> = {
|
|
129
|
+
type: typeof Controls.Types.Checkbox;
|
|
130
|
+
options: DeserializedConfig<CheckboxControlConfig>;
|
|
131
|
+
};
|
|
132
|
+
declare type ResponsiveColorControlConfig = {
|
|
133
|
+
label?: string;
|
|
134
|
+
placeholder?: string;
|
|
135
|
+
hidden?: boolean;
|
|
136
|
+
};
|
|
137
|
+
declare type SerializedResponsiveColorControl<_T = ResponsiveColorControlValue> = {
|
|
138
|
+
type: typeof Controls.Types.ResponsiveColor;
|
|
139
|
+
options: SerializedConfig<ResponsiveColorControlConfig>;
|
|
140
|
+
};
|
|
141
|
+
declare type DeserializedResponsiveColorControl<_T = ResponsiveColorControlValue> = {
|
|
142
|
+
type: typeof Controls.Types.ResponsiveColor;
|
|
143
|
+
options: DeserializedConfig<ResponsiveColorControlConfig>;
|
|
144
|
+
};
|
|
145
|
+
declare type NumberControlConfig = {
|
|
146
|
+
preset?: NumberControlValue;
|
|
147
|
+
label?: string;
|
|
148
|
+
defaultValue?: number;
|
|
149
|
+
min?: number;
|
|
150
|
+
max?: number;
|
|
151
|
+
step?: number;
|
|
152
|
+
suffix?: string;
|
|
153
|
+
hidden?: boolean;
|
|
154
|
+
};
|
|
155
|
+
declare type SerializedNumberControl<_T = NumberControlValue> = {
|
|
156
|
+
type: typeof Controls.Types.Number;
|
|
157
|
+
options: SerializedConfig<NumberControlConfig>;
|
|
158
|
+
};
|
|
159
|
+
declare type DeserializedNumberControl<_T = NumberControlValue> = {
|
|
160
|
+
type: typeof Controls.Types.Number;
|
|
161
|
+
options: DeserializedConfig<NumberControlConfig>;
|
|
162
|
+
};
|
|
163
|
+
declare type ResponsiveIconRadioGroupControlConfig<T extends string = string, U extends T = T> = {
|
|
164
|
+
label?: string;
|
|
165
|
+
options: IconRadioGroupOption<T>[];
|
|
166
|
+
defaultValue?: U;
|
|
167
|
+
hidden?: boolean;
|
|
168
|
+
};
|
|
169
|
+
declare type SerializedResponsiveIconRadioGroupControl<_T = ResponsiveIconRadioGroupControlValue> = {
|
|
170
|
+
type: typeof Controls.Types.ResponsiveIconRadioGroup;
|
|
171
|
+
options: SerializedConfig<ResponsiveIconRadioGroupControlConfig>;
|
|
172
|
+
};
|
|
173
|
+
declare type DeserializedResponsiveIconRadioGroupControl<_T = ResponsiveIconRadioGroupControlValue> = {
|
|
174
|
+
type: typeof Controls.Types.ResponsiveIconRadioGroup;
|
|
175
|
+
options: DeserializedConfig<ResponsiveIconRadioGroupControlConfig>;
|
|
176
|
+
};
|
|
177
|
+
declare type DateControlConfig = {
|
|
178
|
+
preset?: DateControlValue;
|
|
179
|
+
};
|
|
180
|
+
declare type SerializedDateControl<_T = DateControlValue> = {
|
|
181
|
+
type: typeof Controls.Types.Date;
|
|
182
|
+
options: SerializedConfig<DateControlConfig>;
|
|
183
|
+
};
|
|
184
|
+
declare type DeserializedDateControl<_T = DateControlValue> = {
|
|
185
|
+
type: typeof Controls.Types.Date;
|
|
186
|
+
options: DeserializedConfig<DateControlConfig>;
|
|
187
|
+
};
|
|
188
|
+
declare type LinkControlConfig = {
|
|
189
|
+
preset?: LinkControlValue;
|
|
190
|
+
label?: string;
|
|
191
|
+
defaultValue?: LinkControlValue;
|
|
192
|
+
options?: {
|
|
193
|
+
value: LinkControlValue['type'];
|
|
194
|
+
label: string;
|
|
195
|
+
}[];
|
|
196
|
+
hidden?: boolean;
|
|
197
|
+
};
|
|
198
|
+
declare type SerializedLinkControl<_T = LinkControlValue> = {
|
|
199
|
+
type: typeof Controls.Types.Link;
|
|
200
|
+
options: SerializedConfig<LinkControlConfig>;
|
|
201
|
+
};
|
|
202
|
+
declare type DeserializedLinkControl<_T = LinkControlValue> = {
|
|
203
|
+
type: typeof Controls.Types.Link;
|
|
204
|
+
options: DeserializedConfig<LinkControlConfig>;
|
|
205
|
+
};
|
|
206
|
+
declare type TextInputControlConfig = {
|
|
207
|
+
label?: string;
|
|
208
|
+
placeholder?: string;
|
|
209
|
+
hidden?: boolean;
|
|
210
|
+
};
|
|
211
|
+
declare type SerializedTextInputControl<_T = TextInputControlValue> = {
|
|
212
|
+
type: typeof Controls.Types.TextInput;
|
|
213
|
+
options: SerializedConfig<TextInputControlConfig>;
|
|
214
|
+
};
|
|
215
|
+
declare type DeserializedTextInputControl<_T = TextInputControlValue> = {
|
|
216
|
+
type: typeof Controls.Types.TextInput;
|
|
217
|
+
options: DeserializedConfig<TextInputControlConfig>;
|
|
218
|
+
};
|
|
219
|
+
declare type SerializedResponsiveSelectControl<_T = ResponsiveSelectControlValue> = {
|
|
220
|
+
type: typeof Controls.Types.ResponsiveSelect;
|
|
221
|
+
options: SerializedConfig<ResponsiveSelectControlConfig>;
|
|
222
|
+
};
|
|
223
|
+
declare type ResponsiveSelectControlConfig<T extends string = string, U extends T = T> = {
|
|
224
|
+
label?: string;
|
|
225
|
+
labelOrientation?: SelectLabelOrientation;
|
|
226
|
+
options: SelectOption<T>[];
|
|
227
|
+
defaultValue?: U;
|
|
228
|
+
hidden?: boolean;
|
|
229
|
+
};
|
|
230
|
+
declare type DeserializedResponsiveSelectControl<_T = ResponsiveSelectControlValue> = {
|
|
231
|
+
type: typeof Controls.Types.ResponsiveSelect;
|
|
232
|
+
options: DeserializedConfig<ResponsiveSelectControlConfig>;
|
|
233
|
+
};
|
|
234
|
+
declare type ResponsiveLengthControlConfig = {
|
|
235
|
+
label?: string;
|
|
236
|
+
options?: LengthOption[];
|
|
237
|
+
defaultValue?: Length;
|
|
238
|
+
hidden?: boolean;
|
|
239
|
+
};
|
|
240
|
+
declare type SerializedResponsiveLengthControl<_T = ResponsiveLengthControlValue> = {
|
|
241
|
+
type: typeof Controls.Types.ResponsiveLength;
|
|
242
|
+
options: SerializedConfig<ResponsiveLengthControlConfig>;
|
|
243
|
+
};
|
|
244
|
+
declare type DeserializedResponsiveLengthControl<_T = ResponsiveLengthControlValue> = {
|
|
245
|
+
type: typeof Controls.Types.ResponsiveLength;
|
|
246
|
+
options: DeserializedConfig<ResponsiveLengthControlConfig>;
|
|
247
|
+
};
|
|
248
|
+
declare type SerializedTextStyleControl<_T = TextStyleControlValue> = {
|
|
249
|
+
type: typeof Controls.Types.TextStyle;
|
|
250
|
+
options: SerializedConfig<TextStyleControlConfig>;
|
|
251
|
+
};
|
|
252
|
+
declare type TextStyleControlConfig = {
|
|
253
|
+
preset?: TextStyleControlValue;
|
|
254
|
+
label?: string;
|
|
255
|
+
hidden?: boolean;
|
|
256
|
+
};
|
|
257
|
+
declare type DeserializedTextStyleControl<_T = TextStyleControlValue> = {
|
|
258
|
+
type: typeof Controls.Types.TextStyle;
|
|
259
|
+
options: DeserializedConfig<TextStyleControlConfig>;
|
|
260
|
+
};
|
|
261
|
+
declare type ImageControlConfig = {
|
|
262
|
+
label?: string;
|
|
263
|
+
hidden?: boolean;
|
|
264
|
+
};
|
|
265
|
+
declare type SerializedImageControl<_T = ImageControlValue> = {
|
|
266
|
+
type: typeof Controls.Types.Image;
|
|
267
|
+
options: SerializedConfig<ImageControlConfig>;
|
|
268
|
+
};
|
|
269
|
+
declare type DeserializedImageControl<_T = ImageControlValue> = {
|
|
270
|
+
type: typeof Controls.Types.Image;
|
|
271
|
+
options: DeserializedConfig<ImageControlConfig>;
|
|
272
|
+
};
|
|
273
|
+
declare type RichTextControlConfig = {
|
|
274
|
+
preset?: RichTextControlValue;
|
|
275
|
+
};
|
|
276
|
+
declare type SerializedRichTextControl<_T = RichTextControlValue> = {
|
|
277
|
+
type: typeof Controls.Types.RichText;
|
|
278
|
+
options: SerializedConfig<RichTextControlConfig>;
|
|
279
|
+
};
|
|
280
|
+
declare type DeserializedRichTextControl<_T = RichTextControlValue> = {
|
|
281
|
+
type: typeof Controls.Types.RichText;
|
|
282
|
+
options: DeserializedConfig<RichTextControlConfig>;
|
|
24
283
|
};
|
|
25
|
-
export declare type SerializedControl = Exclude<Control
|
|
26
|
-
|
|
284
|
+
export declare type SerializedControl<T extends Data = Data> = Exclude<Control<T>, ListControl<T extends ListControlValue ? T : ListControlValue> | ShapeControl<T extends ShapeControlValue ? T : ShapeControlValue, any> | TypeaheadControl<T extends TypeaheadControlValue ? T : TypeaheadControlValue> | GapXControl<T> | GapYControl<T> | ResponsiveNumberControl<T> | CheckboxControl<T> | ResponsiveColorControl<T> | NumberControl<T> | ResponsiveIconRadioGroupControl<T extends ResponsiveIconRadioGroupControlValue ? T : ResponsiveIconRadioGroupControlValue> | ResponsiveSelectControl<T extends ResponsiveSelectControlValue ? T : ResponsiveSelectControlValue> | ResponsiveLengthControl<T> | DateControl<T> | LinkControl<T> | TextInputControl<T> | TextStyleControl<T> | ImageControl<T> | RichTextControl<T>> | SerializedListControl<T extends ListControlValue ? T : ListControlValue> | SerializedShapeControl<T extends ShapeControlValue ? T : ShapeControlValue, any> | SerializedTypeaheadControl<T extends TypeaheadControlValue ? T : TypeaheadControlValue> | SerializedGapXControl<T> | SerializedGapYControl<T> | SerializedResponsiveNumberControl<T> | SerializedCheckboxControl<T> | SerializedResponsiveColorControl<T> | SerializedNumberControl<T> | SerializedResponsiveIconRadioGroupControl<T> | SerializedResponsiveSelectControl<T> | SerializedResponsiveLengthControl<T> | SerializedDateControl<T> | SerializedLinkControl<T> | SerializedTextInputControl<T> | SerializedTextStyleControl<T> | SerializedImageControl<T> | SerializedRichTextControl<T>;
|
|
285
|
+
declare type SerializedPanelControl<T extends Data = Data> = Extract<SerializedControl<T>, {
|
|
286
|
+
type: PanelControlType;
|
|
287
|
+
}>;
|
|
288
|
+
declare type SerializedPanelControlValueType<T extends SerializedPanelControl> = T extends SerializedPanelControl<infer U> ? U : never;
|
|
289
|
+
export declare type DeserializedControl<T extends Data = Data> = Exclude<Control<T>, ListControl<T extends ListControlValue ? T : ListControlValue> | ShapeControl<T extends ShapeControlValue ? T : ShapeControlValue, any> | TypeaheadControl<T extends TypeaheadControlValue ? T : TypeaheadControlValue> | GapXControl<T> | GapYControl<T> | ResponsiveNumberControl<T> | CheckboxControl<T> | ResponsiveColorControl<T> | NumberControl<T> | ResponsiveIconRadioGroupControl<T extends ResponsiveIconRadioGroupControlValue ? T : ResponsiveIconRadioGroupControlValue> | ResponsiveSelectControl<T extends ResponsiveSelectControlValue ? T : ResponsiveSelectControlValue> | ResponsiveLengthControl<T> | DateControl<T> | LinkControl<T> | TextInputControl<T> | TextStyleControl<T> | ImageControl<T> | RichTextControl<T>> | DeserializedListControl<T extends ListControlValue ? T : ListControlValue> | DeserializedShapeControl<T extends ShapeControlValue ? T : ShapeControlValue, any> | DeserializedTypeaheadControl<T extends TypeaheadControlValue ? T : TypeaheadControlValue> | DeserializedGapXControl<T> | DeserializedGapYControl<T> | DeserializedResponsiveNumberControl<T> | DeserializedCheckboxControl<T> | DeserializedResponsiveColorControl<T> | DeserializedNumberControl<T> | DeserializedResponsiveIconRadioGroupControl<T> | DeserializedResponsiveSelectControl<T> | DeserializedResponsiveLengthControl<T> | DeserializedDateControl<T> | DeserializedLinkControl<T> | DeserializedTextInputControl<T> | DeserializedTextStyleControl<T> | DeserializedImageControl<T> | DeserializedRichTextControl<T>;
|
|
290
|
+
export declare type DeserializedPanelControl<T extends Data = Data> = Extract<DeserializedControl<T>, {
|
|
291
|
+
type: PanelControlType;
|
|
292
|
+
}>;
|
|
293
|
+
declare type DeserializedPanelControlValueType<T extends DeserializedPanelControl> = T extends DeserializedPanelControl<infer U> ? U : never;
|
|
27
294
|
export declare function serializeControls(controls: Record<string, Control>): [Record<string, SerializedControl>, Transferable[]];
|
|
28
295
|
export declare function deserializeControls(serializedControls: Record<string, SerializedControl>): Record<string, DeserializedControl>;
|
|
29
296
|
export {};
|