@makeswift/runtime 0.9.10 → 0.9.12
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 +1 -1
- package/dist/Button.es.js +1 -1
- package/dist/Carousel.cjs.js +1 -1
- package/dist/Carousel.es.js +1 -1
- package/dist/Countdown.cjs.js +1 -1
- package/dist/Countdown.es.js +1 -1
- package/dist/Divider.cjs.js +1 -1
- package/dist/Divider.es.js +1 -1
- package/dist/Form.cjs.js +1 -1
- package/dist/Form.es.js +1 -1
- package/dist/Image.cjs.js +1 -1
- package/dist/Image.es.js +1 -1
- package/dist/LiveProvider.cjs.js +1 -1
- package/dist/LiveProvider.es.js +3 -3
- package/dist/Navigation.cjs.js +1 -1
- package/dist/Navigation.es.js +1 -1
- package/dist/PreviewProvider.cjs.js +1 -1
- package/dist/PreviewProvider.es.js +3 -3
- package/dist/ReadOnlyText.cjs.js +18 -3
- package/dist/ReadOnlyText.cjs.js.map +1 -1
- package/dist/ReadOnlyText.es.js +20 -5
- package/dist/ReadOnlyText.es.js.map +1 -1
- package/dist/ReadOnlyTextV2.cjs.js +116 -240
- package/dist/ReadOnlyTextV2.cjs.js.map +1 -1
- package/dist/ReadOnlyTextV2.es.js +115 -238
- package/dist/ReadOnlyTextV2.es.js.map +1 -1
- package/dist/Root.cjs.js +1 -1
- package/dist/Root.es.js +1 -1
- package/dist/SocialLinks.cjs.js +1 -1
- package/dist/SocialLinks.es.js +1 -1
- package/dist/Text.cjs.js +1 -1
- package/dist/Text.es.js +1 -1
- package/dist/components.cjs.js +1 -1
- package/dist/components.es.js +1 -1
- package/dist/control-serialization.es.js +1 -1
- package/dist/controls.cjs.js +28 -18
- package/dist/controls.cjs.js.map +1 -1
- package/dist/controls.es.js +2 -2
- package/dist/index.cjs.js +47 -42
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.cjs10.js +2 -2
- package/dist/index.cjs2.js +3 -3
- package/dist/index.cjs2.js.map +1 -1
- package/dist/index.cjs5.js +5 -6
- package/dist/index.cjs5.js.map +1 -1
- package/dist/index.cjs6.js +20 -0
- package/dist/index.cjs6.js.map +1 -1
- package/dist/index.cjs8.js +1 -1
- package/dist/index.cjs9.js +27 -31
- package/dist/index.cjs9.js.map +1 -1
- package/dist/index.es.js +22 -18
- package/dist/index.es.js.map +1 -1
- package/dist/index.es10.js +4 -4
- package/dist/index.es2.js +2 -2
- package/dist/index.es3.js +1 -1
- package/dist/index.es5.js +1 -2
- package/dist/index.es5.js.map +1 -1
- package/dist/index.es6.js +21 -2
- package/dist/index.es6.js.map +1 -1
- package/dist/index.es8.js +1 -1
- package/dist/index.es9.js +31 -35
- package/dist/index.es9.js.map +1 -1
- package/dist/next.cjs.js +1 -1
- package/dist/next.es.js +2 -2
- package/dist/react-page.cjs.js +310 -147
- package/dist/react-page.cjs.js.map +1 -1
- package/dist/react-page.es.js +297 -146
- package/dist/react-page.es.js.map +1 -1
- package/dist/react.cjs.js +1 -1
- package/dist/react.es.js +1 -1
- package/dist/slate.cjs.js +40 -27
- package/dist/slate.cjs.js.map +1 -1
- package/dist/slate.es.js +49 -37
- package/dist/slate.es.js.map +1 -1
- package/dist/{typography.cjs.js → text-input.cjs.js} +1 -9
- package/dist/text-input.cjs.js.map +1 -0
- package/dist/{typography.es.js → text-input.es.js} +2 -8
- package/dist/text-input.es.js.map +1 -0
- package/dist/types/src/api/react.d.ts +1 -1
- package/dist/types/src/api/react.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Button/Button.d.ts +3 -39
- package/dist/types/src/components/builtin/Button/Button.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Form/components/Field/components/Checkbox/index.d.ts +2 -2
- package/dist/types/src/components/builtin/Form/components/Field/components/Input/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/components/RadioButton/index.d.ts +2 -2
- package/dist/types/src/components/builtin/Form/components/Field/components/TextArea/index.d.ts +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/DropDownButton/index.d.ts +1 -1
- package/dist/types/src/components/builtin/Navigation/components/DropDownButton/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/components/MobileDropDownButton/index.d.ts +1 -1
- package/dist/types/src/components/builtin/Navigation/components/MobileMenu/components/MobileDropDownButton/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 +23 -24
- package/dist/types/src/components/builtin/SocialLinks/options.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Text/ReadOnlyText.d.ts +2 -2
- package/dist/types/src/components/builtin/Text/ReadOnlyText.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Text/components/Element/block.d.ts +1 -2
- 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 +1 -2
- 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 +1 -2
- 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 +1 -2
- 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/components/shared/BackgroundsContainer/index.d.ts +1 -1
- package/dist/types/src/components/shared/GutterContainer/index.d.ts +1 -1
- package/dist/types/src/components/shared/GutterContainer/index.d.ts.map +1 -1
- package/dist/types/src/components/shared/Link/index.d.ts +1 -1
- package/dist/types/src/components/shared/Link/index.d.ts.map +1 -1
- package/dist/types/src/components/shared/grid-item.d.ts +1 -1
- package/dist/types/src/components/shared/grid-item.d.ts.map +1 -1
- package/dist/types/src/controls/list.d.ts +5 -2
- package/dist/types/src/controls/list.d.ts.map +1 -1
- package/dist/types/src/controls/rich-text/introspection.d.ts +5 -0
- package/dist/types/src/controls/rich-text/introspection.d.ts.map +1 -0
- package/dist/types/src/controls/rich-text/introspection.test.d.ts +2 -0
- package/dist/types/src/controls/rich-text/introspection.test.d.ts.map +1 -0
- package/dist/types/src/controls/rich-text-v2/introspection.d.ts +5 -0
- package/dist/types/src/controls/rich-text-v2/introspection.d.ts.map +1 -0
- package/dist/types/src/controls/rich-text-v2/introspection.test.d.ts +2 -0
- package/dist/types/src/controls/rich-text-v2/introspection.test.d.ts.map +1 -0
- package/dist/types/src/controls/rich-text-v2/rich-text-v2.d.ts +15 -3
- package/dist/types/src/controls/rich-text-v2/rich-text-v2.d.ts.map +1 -1
- package/dist/types/src/controls/rich-text-v2/translation.d.ts +1 -1
- package/dist/types/src/controls/rich-text-v2/translation.d.ts.map +1 -1
- package/dist/types/src/controls/shape.d.ts +5 -2
- package/dist/types/src/controls/shape.d.ts.map +1 -1
- package/dist/types/src/controls/typography.d.ts +2 -0
- package/dist/types/src/controls/typography.d.ts.map +1 -1
- package/dist/types/src/next/client.d.ts.map +1 -1
- package/dist/types/src/next/document.d.ts +1 -2
- package/dist/types/src/next/document.d.ts.map +1 -1
- package/dist/types/src/next/index.d.ts +1 -1
- package/dist/types/src/next/index.d.ts.map +1 -1
- package/dist/types/src/next/preview-mode.d.ts +1 -2
- package/dist/types/src/next/preview-mode.d.ts.map +1 -1
- package/dist/types/src/prop-controllers/descriptors.d.ts +10 -0
- package/dist/types/src/prop-controllers/descriptors.d.ts.map +1 -1
- package/dist/types/src/prop-controllers/introspection.d.ts +0 -2
- package/dist/types/src/prop-controllers/introspection.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 +0 -1
- 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/rich-text-v2/EditableTextV2/editable-text-v2.d.ts +1 -1
- package/dist/types/src/runtimes/react/controls/rich-text-v2/EditableTextV2/editable-text-v2.d.ts.map +1 -1
- package/dist/types/src/runtimes/react/controls/rich-text-v2/EditableTextV2/render-element.d.ts +1 -2
- package/dist/types/src/runtimes/react/controls/rich-text-v2/EditableTextV2/render-element.d.ts.map +1 -1
- package/dist/types/src/runtimes/react/controls/rich-text-v2/EditableTextV2/render-leaf.d.ts +1 -2
- package/dist/types/src/runtimes/react/controls/rich-text-v2/EditableTextV2/render-leaf.d.ts.map +1 -1
- package/dist/types/src/runtimes/react/controls/rich-text-v2/EditableTextV2/useRemoteChanges.d.ts +4 -0
- package/dist/types/src/runtimes/react/controls/rich-text-v2/EditableTextV2/useRemoteChanges.d.ts.map +1 -0
- package/dist/types/src/runtimes/react/controls/rich-text-v2/ReadOnlyTextV2.d.ts +7 -16
- package/dist/types/src/runtimes/react/controls/rich-text-v2/ReadOnlyTextV2.d.ts.map +1 -1
- package/dist/types/src/runtimes/react/controls/rich-text-v2/rich-text-v2.d.ts +1 -1
- package/dist/types/src/runtimes/react/controls/rich-text-v2/rich-text-v2.d.ts.map +1 -1
- package/dist/types/src/runtimes/react/controls/rich-text.d.ts +1 -1
- package/dist/types/src/runtimes/react/controls/rich-text.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/slot.d.ts +2 -2
- package/dist/types/src/runtimes/react/controls/slot.d.ts.map +1 -1
- package/dist/types/src/runtimes/react/controls/style-v2.d.ts +0 -1
- package/dist/types/src/runtimes/react/controls/style-v2.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/dist/types/src/runtimes/react/find-dom-node.d.ts.map +1 -1
- package/dist/types/src/runtimes/react/index.d.ts +1 -1
- package/dist/types/src/runtimes/react/index.d.ts.map +1 -1
- package/dist/types/src/slate/LinkPlugin/index.d.ts.map +1 -1
- package/dist/types/src/slate/LocalChangesPlugin/index.d.ts +16 -0
- package/dist/types/src/slate/LocalChangesPlugin/index.d.ts.map +1 -0
- package/dist/types/src/slate/TextAlignPlugin/index.d.ts +3 -3
- package/dist/types/src/slate/TextAlignPlugin/index.d.ts.map +1 -1
- package/dist/types/src/slate/index.d.ts +1 -0
- package/dist/types/src/slate/index.d.ts.map +1 -1
- package/dist/types/src/slate/types.d.ts +2 -2
- package/dist/types/src/slate/types.d.ts.map +1 -1
- package/dist/types/src/slate/utils/responsive.d.ts +1 -1
- package/dist/types/src/slate/utils/responsive.d.ts.map +1 -1
- package/dist/types/src/state/modules/react-components.d.ts +2 -2
- package/dist/types/src/state/modules/react-components.d.ts.map +1 -1
- package/dist/types.cjs2.js +67 -48
- package/dist/types.cjs2.js.map +1 -1
- package/dist/types.es2.js +64 -45
- package/dist/types.es2.js.map +1 -1
- package/package.json +4 -5
- package/dist/typography.cjs.js.map +0 -1
- package/dist/typography.es.js.map +0 -1
package/dist/controls.cjs.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
-
var
|
|
3
|
+
var textInput = require("./text-input.cjs.js");
|
|
4
4
|
var reactPage = require("./react-page.cjs.js");
|
|
5
5
|
var combobox = require("./combobox.cjs.js");
|
|
6
6
|
require("redux");
|
|
@@ -13,21 +13,19 @@ require("@emotion/css");
|
|
|
13
13
|
require("@emotion/serialize");
|
|
14
14
|
require("@emotion/utils");
|
|
15
15
|
require("slate");
|
|
16
|
-
exports.Checkbox =
|
|
17
|
-
exports.CheckboxControlType =
|
|
18
|
-
exports.IconRadioGroupControlType =
|
|
19
|
-
exports.Number =
|
|
20
|
-
exports.NumberControlType =
|
|
21
|
-
exports.Select =
|
|
22
|
-
exports.SelectControlType =
|
|
23
|
-
exports.TextArea =
|
|
24
|
-
exports.TextAreaControlType =
|
|
25
|
-
exports.TextInput =
|
|
26
|
-
exports.TextInputControlType =
|
|
27
|
-
exports.
|
|
28
|
-
exports.
|
|
29
|
-
exports.unstable_IconRadioGroupIcon = typography.unstable_IconRadioGroupIcon;
|
|
30
|
-
exports.unstable_Typography = typography.unstable_Typography;
|
|
16
|
+
exports.Checkbox = textInput.Checkbox;
|
|
17
|
+
exports.CheckboxControlType = textInput.CheckboxControlType;
|
|
18
|
+
exports.IconRadioGroupControlType = textInput.IconRadioGroupControlType;
|
|
19
|
+
exports.Number = textInput.Number;
|
|
20
|
+
exports.NumberControlType = textInput.NumberControlType;
|
|
21
|
+
exports.Select = textInput.Select;
|
|
22
|
+
exports.SelectControlType = textInput.SelectControlType;
|
|
23
|
+
exports.TextArea = textInput.TextArea;
|
|
24
|
+
exports.TextAreaControlType = textInput.TextAreaControlType;
|
|
25
|
+
exports.TextInput = textInput.TextInput;
|
|
26
|
+
exports.TextInputControlType = textInput.TextInputControlType;
|
|
27
|
+
exports.unstable_IconRadioGroup = textInput.unstable_IconRadioGroup;
|
|
28
|
+
exports.unstable_IconRadioGroupIcon = textInput.unstable_IconRadioGroupIcon;
|
|
31
29
|
exports.Color = reactPage.Color;
|
|
32
30
|
exports.ColorControlType = reactPage.ColorControlType;
|
|
33
31
|
exports.Image = reactPage.Image$1;
|
|
@@ -64,6 +62,7 @@ exports.StyleControlType = reactPage.StyleControlType;
|
|
|
64
62
|
exports.StyleV2Control = reactPage.StyleV2Control;
|
|
65
63
|
exports.StyleV2ControlMessageType = reactPage.StyleV2ControlMessageType;
|
|
66
64
|
exports.StyleV2ControlType = reactPage.StyleV2ControlType;
|
|
65
|
+
exports.TypographyControlType = reactPage.TypographyControlType;
|
|
67
66
|
exports.copy = reactPage.copy;
|
|
68
67
|
exports.copyColorData = reactPage.copyColorData;
|
|
69
68
|
exports.copyImageData = reactPage.copyImageData;
|
|
@@ -73,8 +72,18 @@ exports.copyShapeData = reactPage.copyShapeData;
|
|
|
73
72
|
exports.copySlotData = reactPage.copySlotData;
|
|
74
73
|
exports.copyStyleData = reactPage.copyStyleData;
|
|
75
74
|
exports.createRichTextV2Plugin = reactPage.createRichTextV2Plugin;
|
|
76
|
-
exports.
|
|
77
|
-
exports.
|
|
75
|
+
exports.getListElementChildren = reactPage.getListElementChildren;
|
|
76
|
+
exports.getListFileIds = reactPage.getListFileIds;
|
|
77
|
+
exports.getListPageIds = reactPage.getListPageIds;
|
|
78
|
+
exports.getListSwatchIds = reactPage.getListSwatchIds;
|
|
79
|
+
exports.getListTypographyIds = reactPage.getListTypographyIds;
|
|
80
|
+
exports.getShapeElementChildren = reactPage.getShapeElementChildren;
|
|
81
|
+
exports.getShapeFileIds = reactPage.getShapeFileIds;
|
|
82
|
+
exports.getShapePageIds = reactPage.getShapePageIds;
|
|
83
|
+
exports.getShapeSwatchIds = reactPage.getShapeSwatchIds;
|
|
84
|
+
exports.getShapeTypographyIds = reactPage.getShapeTypographyIds;
|
|
85
|
+
exports.getTypographySwatchIds = reactPage.getTypographySwatchIds;
|
|
86
|
+
exports.getTypographyTypographyIds = reactPage.getTypographyTypographyIds;
|
|
78
87
|
exports.isRichTextV1Data = reactPage.isRichTextV1Data;
|
|
79
88
|
exports.merge = reactPage.merge;
|
|
80
89
|
exports.mergeSlotData = reactPage.mergeSlotData;
|
|
@@ -86,6 +95,7 @@ exports.richTextV2DescendentsToData = reactPage.richTextV2DescendentsToData;
|
|
|
86
95
|
exports.toSelectionDTO = reactPage.toSelectionDTO;
|
|
87
96
|
exports.unstable_RichTextV2 = reactPage.unstable_RichTextV2;
|
|
88
97
|
exports.unstable_StyleV2 = reactPage.unstable_StyleV2;
|
|
98
|
+
exports.unstable_Typography = reactPage.unstable_Typography;
|
|
89
99
|
exports.unstable_useStyleV2ClassName = reactPage.unstable_useStyleV2ClassName;
|
|
90
100
|
exports.Combobox = combobox.Combobox;
|
|
91
101
|
exports.ComboboxControlType = combobox.ComboboxControlType;
|
package/dist/controls.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"controls.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"controls.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/controls.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
1
|
+
export { b as Checkbox, C as CheckboxControlType, I as IconRadioGroupControlType, d as Number, N as NumberControlType, e as Select, S as SelectControlType, f as TextArea, T as TextAreaControlType, g as TextInput, a as TextInputControlType, c as unstable_IconRadioGroup, u as unstable_IconRadioGroupIcon } from "./text-input.es.js";
|
|
2
|
+
export { az as Color, ad as ColorControlType, aD as Image, ac as ImageControlType, $ as ImageControlValueFormat, aF as Link, ab as LinkControlType, aH as List, aJ as ListControl, aI as ListControlMessageType, a9 as ListControlType, ba as ObjectType, bb as RichText, bd as RichTextControl, bc as RichTextControlMessageType, a6 as RichTextControlType, bm as RichTextV2Control, bl as RichTextV2ControlMessageType, a5 as RichTextV2ControlType, bi as RichTextV2Mode, aQ as Shape, aS as ShapeControl, aR as ShapeControlMessageType, aa as ShapeControlType, aZ as Slot, a$ as SlotControl, a_ as SlotControlMessageType, a7 as SlotControlType, b2 as Style, b4 as StyleControl, b3 as StyleControlMessageType, _ as StyleControlProperty, a4 as StyleControlType, b9 as StyleV2Control, b8 as StyleV2ControlMessageType, a8 as StyleV2ControlType, a3 as TypographyControlType, aB as copy, aA as copyColorData, aE as copyImageData, aG as copyLinkData, aK as copyListData, aT as copyShapeData, b0 as copySlotData, b5 as copyStyleData, bj as createRichTextV2Plugin, aL as getListElementChildren, aN as getListFileIds, aP as getListPageIds, aM as getListSwatchIds, aO as getListTypographyIds, aU as getShapeElementChildren, aY as getShapeFileIds, aX as getShapePageIds, aV as getShapeSwatchIds, aW as getShapeTypographyIds, bq as getTypographySwatchIds, br as getTypographyTypographyIds, a1 as isRichTextV1Data, aC as merge, b1 as mergeSlotData, bh as richTextDAOToDTO, bf as richTextDTOtoDAO, be as richTextDTOtoSelection, bn as richTextV2DataToDescendents, bo as richTextV2DescendentsToData, bg as toSelectionDTO, bk as unstable_RichTextV2, b7 as unstable_StyleV2, bp as unstable_Typography, b6 as unstable_useStyleV2ClassName } from "./react-page.es.js";
|
|
3
3
|
export { a as Combobox, C as ComboboxControlType } from "./combobox.es.js";
|
|
4
4
|
import "redux";
|
|
5
5
|
import "redux-thunk";
|
package/dist/index.cjs.js
CHANGED
|
@@ -41,7 +41,7 @@ var dynamic = require("next/dynamic");
|
|
|
41
41
|
var reactPage = require("./react-page.cjs.js");
|
|
42
42
|
var actions = require("./actions.cjs.js");
|
|
43
43
|
var jsxRuntime = require("react/jsx-runtime");
|
|
44
|
-
var
|
|
44
|
+
var textInput = require("./text-input.cjs.js");
|
|
45
45
|
var combobox = require("./combobox.cjs.js");
|
|
46
46
|
require("slate");
|
|
47
47
|
var shim = require("use-sync-external-store/shim");
|
|
@@ -950,7 +950,8 @@ Received "${apiKey}" instead.`);
|
|
|
950
950
|
return response;
|
|
951
951
|
}
|
|
952
952
|
async getPages() {
|
|
953
|
-
const
|
|
953
|
+
const isUsingVersioning = this.siteVersion != null;
|
|
954
|
+
const response = await this.fetch(`/${isUsingVersioning ? "v3" : "v2"}/pages`, {
|
|
954
955
|
headers: {
|
|
955
956
|
"Makeswift-Site-Version": MakeswiftSiteVersion.Live
|
|
956
957
|
}
|
|
@@ -968,7 +969,8 @@ Received "${apiKey}" instead.`);
|
|
|
968
969
|
}
|
|
969
970
|
async getSwatches(ids, preview) {
|
|
970
971
|
var _a;
|
|
971
|
-
const
|
|
972
|
+
const isUsingVersioning = this.siteVersion != null;
|
|
973
|
+
const url = new URL(`${isUsingVersioning ? "v2" : "v1"}/swatches/bulk`, this.apiOrigin);
|
|
972
974
|
ids.forEach((id) => {
|
|
973
975
|
url.searchParams.append("ids", id);
|
|
974
976
|
});
|
|
@@ -1051,8 +1053,8 @@ Received "${apiKey}" instead.`);
|
|
|
1051
1053
|
getResourcesFromElementDescriptors(elementDescriptors, element2.props);
|
|
1052
1054
|
}
|
|
1053
1055
|
const typographies = await this.getTypographies([...typographyIds]);
|
|
1054
|
-
typographies.forEach((
|
|
1055
|
-
|
|
1056
|
+
typographies.forEach((typography) => {
|
|
1057
|
+
typography == null ? void 0 : typography.style.forEach((style) => {
|
|
1056
1058
|
var _a;
|
|
1057
1059
|
const swatchId = (_a = style.value.color) == null ? void 0 : _a.swatchId;
|
|
1058
1060
|
if (swatchId != null)
|
|
@@ -1087,7 +1089,7 @@ Received "${apiKey}" instead.`);
|
|
|
1087
1089
|
var _a;
|
|
1088
1090
|
return {
|
|
1089
1091
|
id,
|
|
1090
|
-
value: (_a = typographies.find((
|
|
1092
|
+
value: (_a = typographies.find((typography) => (typography == null ? void 0 : typography.id) === id)) != null ? _a : null
|
|
1091
1093
|
};
|
|
1092
1094
|
}),
|
|
1093
1095
|
[types.APIResourceType.Table]: [...tableIds].map((id) => {
|
|
@@ -1120,11 +1122,12 @@ Received "${apiKey}" instead.`);
|
|
|
1120
1122
|
unstable_locale
|
|
1121
1123
|
} = {}) {
|
|
1122
1124
|
var _a;
|
|
1125
|
+
const isUsingVersioning = this.siteVersion != null;
|
|
1123
1126
|
const siteVersion = (_a = this.siteVersion) != null ? _a : previewOverride ? MakeswiftSiteVersion.Working : MakeswiftSiteVersion.Live;
|
|
1124
1127
|
const searchParams = new URLSearchParams();
|
|
1125
1128
|
if (unstable_locale)
|
|
1126
1129
|
searchParams.set("locale", unstable_locale);
|
|
1127
|
-
const response = await this.fetch(
|
|
1130
|
+
const response = await this.fetch(`/${isUsingVersioning ? "v3" : "v2"}/pages/${encodeURIComponent(pathname)}/document?${searchParams.toString()}`, {
|
|
1128
1131
|
headers: { "Makeswift-Site-Version": siteVersion }
|
|
1129
1132
|
});
|
|
1130
1133
|
if (!response.ok) {
|
|
@@ -1147,7 +1150,8 @@ Received "${apiKey}" instead.`);
|
|
|
1147
1150
|
};
|
|
1148
1151
|
}
|
|
1149
1152
|
async getSwatch(swatchId) {
|
|
1150
|
-
const
|
|
1153
|
+
const isUsingVersioning = this.siteVersion != null;
|
|
1154
|
+
const response = await this.fetch(`${isUsingVersioning ? "v2" : "v1"}/swatches/${swatchId}`);
|
|
1151
1155
|
if (!response.ok) {
|
|
1152
1156
|
if (response.status !== 404)
|
|
1153
1157
|
console.error("Failed to get swatch", await response.json());
|
|
@@ -1236,7 +1240,7 @@ async function fonts(_req, res, { getFonts } = {}) {
|
|
|
1236
1240
|
const fonts2 = (_a = await (getFonts == null ? void 0 : getFonts())) != null ? _a : [];
|
|
1237
1241
|
return res.json(fonts2);
|
|
1238
1242
|
}
|
|
1239
|
-
const version = "0.9.
|
|
1243
|
+
const version = "0.9.12";
|
|
1240
1244
|
async function handler(req, res, { apiKey, unstable_siteVersions }) {
|
|
1241
1245
|
if (req.query.secret !== apiKey) {
|
|
1242
1246
|
return res.status(401).json({ message: "Unauthorized" });
|
|
@@ -2593,6 +2597,9 @@ const FallbackComponent = React.forwardRef(function FallbackComponent2({
|
|
|
2593
2597
|
})]
|
|
2594
2598
|
});
|
|
2595
2599
|
});
|
|
2600
|
+
function isNonNullable(value) {
|
|
2601
|
+
return value != null;
|
|
2602
|
+
}
|
|
2596
2603
|
function useSwatch(swatchId) {
|
|
2597
2604
|
const client = useMakeswiftClient();
|
|
2598
2605
|
const readSwatch = () => swatchId == null ? null : client.readSwatch(swatchId);
|
|
@@ -2648,12 +2655,12 @@ function useFiles(fileIds) {
|
|
|
2648
2655
|
function useTypography(typographyId) {
|
|
2649
2656
|
const client = useMakeswiftClient();
|
|
2650
2657
|
const readTypography = () => typographyId == null ? null : client.readTypography(typographyId);
|
|
2651
|
-
const
|
|
2658
|
+
const typography = shim.useSyncExternalStore(client.subscribe, readTypography, readTypography);
|
|
2652
2659
|
React.useEffect(() => {
|
|
2653
2660
|
if (typographyId != null)
|
|
2654
2661
|
client.fetchTypography(typographyId).catch(console.error);
|
|
2655
2662
|
}, [client, typographyId]);
|
|
2656
|
-
return
|
|
2663
|
+
return typography;
|
|
2657
2664
|
}
|
|
2658
2665
|
function useGlobalElement(globalElementId) {
|
|
2659
2666
|
const client = useMakeswiftClient();
|
|
@@ -2701,7 +2708,7 @@ function mapSideColor(swatches, _e) {
|
|
|
2701
2708
|
return __spreadProps(__spreadValues({}, restOfSide), {
|
|
2702
2709
|
color: color && {
|
|
2703
2710
|
alpha: color.alpha,
|
|
2704
|
-
swatch: swatches.filter(
|
|
2711
|
+
swatch: swatches.filter(isNonNullable).find((s) => s && s.id === color.swatchId)
|
|
2705
2712
|
}
|
|
2706
2713
|
});
|
|
2707
2714
|
}
|
|
@@ -2747,7 +2754,7 @@ function useBoxShadow(value) {
|
|
|
2747
2754
|
return __spreadProps(__spreadValues({}, restOfShadow), {
|
|
2748
2755
|
payload: {
|
|
2749
2756
|
color: color != null ? {
|
|
2750
|
-
swatch: swatches.filter(
|
|
2757
|
+
swatch: swatches.filter(isNonNullable).find((s) => s && s.id === color.swatchId),
|
|
2751
2758
|
alpha: color.alpha
|
|
2752
2759
|
} : null,
|
|
2753
2760
|
inset: inset != null ? inset : ShadowDefaultValue.inset,
|
|
@@ -2771,7 +2778,7 @@ function useResponsiveColor(color) {
|
|
|
2771
2778
|
const { swatchId, alpha } = v;
|
|
2772
2779
|
const swatch = swatches.find((s) => s && s.id === swatchId);
|
|
2773
2780
|
return swatch == null ? null : __spreadProps(__spreadValues({}, rest), { value: { swatch, alpha } });
|
|
2774
|
-
}).filter(
|
|
2781
|
+
}).filter(isNonNullable);
|
|
2775
2782
|
}
|
|
2776
2783
|
const getIndexes = (spans, index) => {
|
|
2777
2784
|
const flattened = spans.reduce((a, s) => a.concat(s), []);
|
|
@@ -3267,7 +3274,7 @@ function useRichTextV2(data, definition, control) {
|
|
|
3267
3274
|
control
|
|
3268
3275
|
}) : /* @__PURE__ */ jsxRuntime.jsx(ReadOnlyText, {
|
|
3269
3276
|
text: data,
|
|
3270
|
-
|
|
3277
|
+
definition
|
|
3271
3278
|
});
|
|
3272
3279
|
}
|
|
3273
3280
|
function useSelectControlValue(data, definition) {
|
|
@@ -3493,15 +3500,12 @@ function useTextAreaValue(data, definition) {
|
|
|
3493
3500
|
function useTextInputValue(data, definition) {
|
|
3494
3501
|
return data != null ? data : definition.config.defaultValue;
|
|
3495
3502
|
}
|
|
3496
|
-
function
|
|
3497
|
-
|
|
3498
|
-
}
|
|
3499
|
-
function typographyFragementToTypographyControlData(typography2) {
|
|
3500
|
-
if (typography2 == null)
|
|
3503
|
+
function typographyFragementToTypographyControlData(typography) {
|
|
3504
|
+
if (typography == null)
|
|
3501
3505
|
return void 0;
|
|
3502
3506
|
return {
|
|
3503
|
-
id:
|
|
3504
|
-
style:
|
|
3507
|
+
id: typography.id,
|
|
3508
|
+
style: typography.style.map(({ deviceId, value }) => {
|
|
3505
3509
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
|
|
3506
3510
|
return {
|
|
3507
3511
|
deviceId,
|
|
@@ -3527,7 +3531,7 @@ function getTypographyStyleSwatchIds(style) {
|
|
|
3527
3531
|
return (_a = style == null ? void 0 : style.map((override) => override.value).flatMap((typographyStyle) => {
|
|
3528
3532
|
var _a2;
|
|
3529
3533
|
return (_a2 = typographyStyle.color) == null ? void 0 : _a2.swatchId;
|
|
3530
|
-
}).filter(isNonNullable)) != null ? _a : [];
|
|
3534
|
+
}).filter(reactPage.isNonNullable)) != null ? _a : [];
|
|
3531
3535
|
}
|
|
3532
3536
|
const withColor = (swatches) => (deviceRawTypographyValue) => {
|
|
3533
3537
|
var _b, _c;
|
|
@@ -3555,15 +3559,15 @@ const withColor = (swatches) => (deviceRawTypographyValue) => {
|
|
|
3555
3559
|
const getDeviceId = ({ deviceId }) => deviceId;
|
|
3556
3560
|
function useEnhancedTypography(value) {
|
|
3557
3561
|
var _a, _b, _c;
|
|
3558
|
-
const
|
|
3559
|
-
const source = (_b =
|
|
3562
|
+
const typography = typographyFragementToTypographyControlData(useTypography((_a = value == null ? void 0 : value.id) != null ? _a : null));
|
|
3563
|
+
const source = (_b = typography == null ? void 0 : typography.style) != null ? _b : [];
|
|
3560
3564
|
const override = (_c = value == null ? void 0 : value.style) != null ? _c : [];
|
|
3561
3565
|
const breakpoints = useBreakpoints();
|
|
3562
3566
|
const swatchIds = [
|
|
3563
3567
|
...getTypographyStyleSwatchIds(value == null ? void 0 : value.style),
|
|
3564
|
-
...getTypographyStyleSwatchIds(
|
|
3568
|
+
...getTypographyStyleSwatchIds(typography == null ? void 0 : typography.style)
|
|
3565
3569
|
];
|
|
3566
|
-
const swatches = useSwatches(swatchIds).filter(isNonNullable);
|
|
3570
|
+
const swatches = useSwatches(swatchIds).filter(reactPage.isNonNullable);
|
|
3567
3571
|
const enhancedSource = source.map(withColor(swatches));
|
|
3568
3572
|
const enhancedOverride = override.map(withColor(swatches));
|
|
3569
3573
|
const devices = [
|
|
@@ -3590,7 +3594,7 @@ function useEnhancedTypography(value) {
|
|
|
3590
3594
|
};
|
|
3591
3595
|
}
|
|
3592
3596
|
return null;
|
|
3593
|
-
}).filter(isNonNullable);
|
|
3597
|
+
}).filter(reactPage.isNonNullable);
|
|
3594
3598
|
}
|
|
3595
3599
|
function useTypographyClassName(value) {
|
|
3596
3600
|
return reactPage.useStyle(useResponsiveStyle([value], ([value2]) => {
|
|
@@ -3632,31 +3636,31 @@ function ControlValue({
|
|
|
3632
3636
|
control
|
|
3633
3637
|
}) {
|
|
3634
3638
|
switch (definition.type) {
|
|
3635
|
-
case
|
|
3639
|
+
case textInput.CheckboxControlType:
|
|
3636
3640
|
return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
|
|
3637
3641
|
hook: useCheckboxControlValue,
|
|
3638
3642
|
parameters: [data, definition],
|
|
3639
3643
|
children: (value) => children(value)
|
|
3640
3644
|
}, definition.type);
|
|
3641
|
-
case
|
|
3645
|
+
case textInput.NumberControlType:
|
|
3642
3646
|
return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
|
|
3643
3647
|
hook: useNumber,
|
|
3644
3648
|
parameters: [data, definition],
|
|
3645
3649
|
children: (value) => children(value)
|
|
3646
3650
|
}, definition.type);
|
|
3647
|
-
case
|
|
3651
|
+
case textInput.TextInputControlType:
|
|
3648
3652
|
return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
|
|
3649
3653
|
hook: useTextInputValue,
|
|
3650
3654
|
parameters: [data, definition],
|
|
3651
3655
|
children: (value) => children(value)
|
|
3652
3656
|
}, definition.type);
|
|
3653
|
-
case
|
|
3657
|
+
case textInput.TextAreaControlType:
|
|
3654
3658
|
return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
|
|
3655
3659
|
hook: useTextAreaValue,
|
|
3656
3660
|
parameters: [data, definition],
|
|
3657
3661
|
children: (value) => children(value)
|
|
3658
3662
|
}, definition.type);
|
|
3659
|
-
case
|
|
3663
|
+
case textInput.SelectControlType:
|
|
3660
3664
|
return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
|
|
3661
3665
|
hook: useSelectControlValue,
|
|
3662
3666
|
parameters: [data, definition],
|
|
@@ -3668,7 +3672,7 @@ function ControlValue({
|
|
|
3668
3672
|
parameters: [data, definition],
|
|
3669
3673
|
children: (value) => children(value)
|
|
3670
3674
|
}, definition.type);
|
|
3671
|
-
case
|
|
3675
|
+
case textInput.IconRadioGroupControlType:
|
|
3672
3676
|
return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
|
|
3673
3677
|
hook: useIconRadioGroupValue,
|
|
3674
3678
|
parameters: [data, definition],
|
|
@@ -3737,7 +3741,7 @@ function ControlValue({
|
|
|
3737
3741
|
parameters: [data, definition, control],
|
|
3738
3742
|
children: (value) => children(value)
|
|
3739
3743
|
}, definition.type);
|
|
3740
|
-
case
|
|
3744
|
+
case reactPage.TypographyControlType:
|
|
3741
3745
|
return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
|
|
3742
3746
|
hook: useTypographyValue,
|
|
3743
3747
|
parameters: [data],
|
|
@@ -3784,20 +3788,20 @@ function PropsValue({
|
|
|
3784
3788
|
return Object.entries(propControllerDescriptorsRef.current).reduceRight((renderFn, [propName, descriptor]) => (propsValue) => {
|
|
3785
3789
|
var _a2, _b, _c, _d;
|
|
3786
3790
|
switch (descriptor.type) {
|
|
3787
|
-
case
|
|
3788
|
-
case
|
|
3789
|
-
case
|
|
3790
|
-
case
|
|
3791
|
-
case
|
|
3791
|
+
case textInput.CheckboxControlType:
|
|
3792
|
+
case textInput.NumberControlType:
|
|
3793
|
+
case textInput.TextInputControlType:
|
|
3794
|
+
case textInput.TextAreaControlType:
|
|
3795
|
+
case textInput.SelectControlType:
|
|
3792
3796
|
case reactPage.ColorControlType:
|
|
3793
|
-
case
|
|
3797
|
+
case textInput.IconRadioGroupControlType:
|
|
3794
3798
|
case reactPage.ImageControlType:
|
|
3795
3799
|
case combobox.ComboboxControlType:
|
|
3796
3800
|
case reactPage.ShapeControlType:
|
|
3797
3801
|
case reactPage.ListControlType:
|
|
3798
3802
|
case reactPage.LinkControlType:
|
|
3799
3803
|
case reactPage.StyleV2ControlType:
|
|
3800
|
-
case
|
|
3804
|
+
case reactPage.TypographyControlType:
|
|
3801
3805
|
return /* @__PURE__ */ jsxRuntime.jsx(ControlValue, {
|
|
3802
3806
|
definition: descriptor,
|
|
3803
3807
|
data: props[propName],
|
|
@@ -4328,6 +4332,7 @@ exports.forwardNextDynamicRef = forwardNextDynamicRef;
|
|
|
4328
4332
|
exports.getServerSideProps = getServerSideProps;
|
|
4329
4333
|
exports.getStaticPaths = getStaticPaths;
|
|
4330
4334
|
exports.getStaticProps = getStaticProps;
|
|
4335
|
+
exports.isNonNullable = isNonNullable;
|
|
4331
4336
|
exports.pollBoxModel = pollBoxModel;
|
|
4332
4337
|
exports.shallowEqual = shallowEqual;
|
|
4333
4338
|
exports.useBorder = useBorder;
|