@makeswift/runtime 0.0.0-e7e30fa → 0.0.0-e89d176

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (186) hide show
  1. package/dist/components.cjs.js +14236 -1187
  2. package/dist/components.cjs.js.map +1 -1
  3. package/dist/components.es.js +13938 -892
  4. package/dist/components.es.js.map +1 -1
  5. package/dist/descriptors.cjs.js +186 -0
  6. package/dist/descriptors.cjs.js.map +1 -0
  7. package/dist/descriptors.es.js +184 -0
  8. package/dist/descriptors.es.js.map +1 -0
  9. package/dist/prop-controllers.cjs.js +2 -173
  10. package/dist/prop-controllers.cjs.js.map +1 -1
  11. package/dist/prop-controllers.es.js +1 -173
  12. package/dist/prop-controllers.es.js.map +1 -1
  13. package/dist/react-builder-preview.cjs.js +5 -4
  14. package/dist/react-builder-preview.cjs.js.map +1 -1
  15. package/dist/react-builder-preview.es.js +6 -5
  16. package/dist/react-builder-preview.es.js.map +1 -1
  17. package/dist/react.cjs.js +3 -0
  18. package/dist/react.cjs.js.map +1 -1
  19. package/dist/react.cjs2.js +144 -158
  20. package/dist/react.cjs2.js.map +1 -1
  21. package/dist/react.es.js +3 -1
  22. package/dist/react.es.js.map +1 -1
  23. package/dist/react.es2.js +127 -140
  24. package/dist/react.es2.js.map +1 -1
  25. package/dist/types/components/BackgroundsContainer/components/BackgroundVideo/index.d.ts +11 -0
  26. package/dist/types/components/BackgroundsContainer/components/BackgroundVideo/index.d.ts.map +1 -0
  27. package/dist/types/components/BackgroundsContainer/components/Backgrounds/index.d.ts +8 -0
  28. package/dist/types/components/BackgroundsContainer/components/Backgrounds/index.d.ts.map +1 -0
  29. package/dist/types/components/BackgroundsContainer/components/Parallax/index.d.ts +11 -0
  30. package/dist/types/components/BackgroundsContainer/components/Parallax/index.d.ts.map +1 -0
  31. package/dist/types/components/BackgroundsContainer/index.d.ts +11 -0
  32. package/dist/types/components/BackgroundsContainer/index.d.ts.map +1 -0
  33. package/dist/types/components/Box/Box.d.ts +4 -1
  34. package/dist/types/components/Box/Box.d.ts.map +1 -1
  35. package/dist/types/components/Carousel/Carousel.d.ts +25 -0
  36. package/dist/types/components/Carousel/Carousel.d.ts.map +1 -0
  37. package/dist/types/components/Carousel/index.d.ts +2 -0
  38. package/dist/types/components/Carousel/index.d.ts.map +1 -0
  39. package/dist/types/components/Countdown/Countdown.d.ts +24 -0
  40. package/dist/types/components/Countdown/Countdown.d.ts.map +1 -0
  41. package/dist/types/components/Countdown/index.d.ts +2 -0
  42. package/dist/types/components/Countdown/index.d.ts.map +1 -0
  43. package/dist/types/components/Divider/Divider.d.ts +14 -0
  44. package/dist/types/components/Divider/Divider.d.ts.map +1 -0
  45. package/dist/types/components/Divider/index.d.ts +2 -0
  46. package/dist/types/components/Divider/index.d.ts.map +1 -0
  47. package/dist/types/components/Embed/Embed.d.ts +11 -0
  48. package/dist/types/components/Embed/Embed.d.ts.map +1 -0
  49. package/dist/types/components/Embed/index.d.ts +2 -0
  50. package/dist/types/components/Embed/index.d.ts.map +1 -0
  51. package/dist/types/components/Image/Image.d.ts +26 -0
  52. package/dist/types/components/Image/Image.d.ts.map +1 -0
  53. package/dist/types/components/Image/index.d.ts +2 -0
  54. package/dist/types/components/Image/index.d.ts.map +1 -0
  55. package/dist/types/components/Link/index.d.ts +9 -0
  56. package/dist/types/components/Link/index.d.ts.map +1 -0
  57. package/dist/types/components/RichText/index.d.ts +5 -0
  58. package/dist/types/components/RichText/index.d.ts.map +1 -0
  59. package/dist/types/components/Root/Root.d.ts.map +1 -1
  60. package/dist/types/components/builtin/Box/Box.d.ts +30 -0
  61. package/dist/types/components/builtin/Box/Box.d.ts.map +1 -0
  62. package/dist/types/components/builtin/Box/animations.d.ts +69 -0
  63. package/dist/types/components/builtin/Box/animations.d.ts.map +1 -0
  64. package/dist/types/components/builtin/Box/components/Placeholder/index.d.ts +7 -0
  65. package/dist/types/components/builtin/Box/components/Placeholder/index.d.ts.map +1 -0
  66. package/dist/types/components/builtin/Box/index.d.ts +3 -0
  67. package/dist/types/components/builtin/Box/index.d.ts.map +1 -0
  68. package/dist/types/components/builtin/Button/Button.d.ts +115 -0
  69. package/dist/types/components/builtin/Button/Button.d.ts.map +1 -0
  70. package/dist/types/components/builtin/Button/index.d.ts +2 -0
  71. package/dist/types/components/builtin/Button/index.d.ts.map +1 -0
  72. package/dist/types/components/builtin/Carousel/Carousel.d.ts +25 -0
  73. package/dist/types/components/builtin/Carousel/Carousel.d.ts.map +1 -0
  74. package/dist/types/components/builtin/Carousel/index.d.ts +2 -0
  75. package/dist/types/components/builtin/Carousel/index.d.ts.map +1 -0
  76. package/dist/types/components/builtin/Countdown/Countdown.d.ts +24 -0
  77. package/dist/types/components/builtin/Countdown/Countdown.d.ts.map +1 -0
  78. package/dist/types/components/builtin/Countdown/index.d.ts +2 -0
  79. package/dist/types/components/builtin/Countdown/index.d.ts.map +1 -0
  80. package/dist/types/components/builtin/Divider/Divider.d.ts +14 -0
  81. package/dist/types/components/builtin/Divider/Divider.d.ts.map +1 -0
  82. package/dist/types/components/builtin/Divider/index.d.ts +2 -0
  83. package/dist/types/components/builtin/Divider/index.d.ts.map +1 -0
  84. package/dist/types/components/builtin/Embed/Embed.d.ts +11 -0
  85. package/dist/types/components/builtin/Embed/Embed.d.ts.map +1 -0
  86. package/dist/types/components/builtin/Embed/index.d.ts +2 -0
  87. package/dist/types/components/builtin/Embed/index.d.ts.map +1 -0
  88. package/dist/types/components/builtin/Image/Image.d.ts +26 -0
  89. package/dist/types/components/builtin/Image/Image.d.ts.map +1 -0
  90. package/dist/types/components/builtin/Image/index.d.ts +2 -0
  91. package/dist/types/components/builtin/Image/index.d.ts.map +1 -0
  92. package/dist/types/components/builtin/Navigation/Navigation.d.ts +23 -0
  93. package/dist/types/components/builtin/Navigation/Navigation.d.ts.map +1 -0
  94. package/dist/types/components/builtin/Navigation/components/DropDownButton/index.d.ts +100 -0
  95. package/dist/types/components/builtin/Navigation/components/DropDownButton/index.d.ts.map +1 -0
  96. package/dist/types/components/builtin/Navigation/components/LinksPlaceholder/index.d.ts +8 -0
  97. package/dist/types/components/builtin/Navigation/components/LinksPlaceholder/index.d.ts.map +1 -0
  98. package/dist/types/components/builtin/Navigation/components/MobileMenu/components/MobileDropDownButton/index.d.ts +101 -0
  99. package/dist/types/components/builtin/Navigation/components/MobileMenu/components/MobileDropDownButton/index.d.ts.map +1 -0
  100. package/dist/types/components/builtin/Navigation/components/MobileMenu/index.d.ts +13 -0
  101. package/dist/types/components/builtin/Navigation/components/MobileMenu/index.d.ts.map +1 -0
  102. package/dist/types/components/builtin/Navigation/index.d.ts +2 -0
  103. package/dist/types/components/builtin/Navigation/index.d.ts.map +1 -0
  104. package/dist/types/components/builtin/Root/Root.d.ts +11 -0
  105. package/dist/types/components/builtin/Root/Root.d.ts.map +1 -0
  106. package/dist/types/components/builtin/Root/components/Placeholder/index.d.ts +5 -0
  107. package/dist/types/components/builtin/Root/components/Placeholder/index.d.ts.map +1 -0
  108. package/dist/types/components/builtin/Root/index.d.ts +2 -0
  109. package/dist/types/components/builtin/Root/index.d.ts.map +1 -0
  110. package/dist/types/components/builtin/SocialLinks/SocialLinks.d.ts +18 -0
  111. package/dist/types/components/builtin/SocialLinks/SocialLinks.d.ts.map +1 -0
  112. package/dist/types/components/builtin/SocialLinks/components/SocialLinksPlaceholder/index.d.ts +8 -0
  113. package/dist/types/components/builtin/SocialLinks/components/SocialLinksPlaceholder/index.d.ts.map +1 -0
  114. package/dist/types/components/builtin/SocialLinks/index.d.ts +2 -0
  115. package/dist/types/components/builtin/SocialLinks/index.d.ts.map +1 -0
  116. package/dist/types/components/builtin/SocialLinks/options.d.ts +113 -0
  117. package/dist/types/components/builtin/SocialLinks/options.d.ts.map +1 -0
  118. package/dist/types/components/builtin/index.d.ts +11 -0
  119. package/dist/types/components/builtin/index.d.ts.map +1 -0
  120. package/dist/types/components/hooks/index.d.ts +6 -0
  121. package/dist/types/components/hooks/index.d.ts.map +1 -1
  122. package/dist/types/components/hooks/useBackgrounds.d.ts +59 -0
  123. package/dist/types/components/hooks/useBackgrounds.d.ts.map +1 -0
  124. package/dist/types/components/hooks/useBorder.d.ts +19 -0
  125. package/dist/types/components/hooks/useBorder.d.ts.map +1 -0
  126. package/dist/types/components/hooks/useBoxShadow.d.ts +19 -0
  127. package/dist/types/components/hooks/useBoxShadow.d.ts.map +1 -0
  128. package/dist/types/components/hooks/useColor.d.ts +7 -0
  129. package/dist/types/components/hooks/useColor.d.ts.map +1 -0
  130. package/dist/types/components/hooks/useFile.d.ts +13 -0
  131. package/dist/types/components/hooks/useFile.d.ts.map +1 -0
  132. package/dist/types/components/hooks/usePage.d.ts +7 -0
  133. package/dist/types/components/hooks/usePage.d.ts.map +1 -0
  134. package/dist/types/components/index.d.ts +1 -3
  135. package/dist/types/components/index.d.ts.map +1 -1
  136. package/dist/types/components/shared/BackgroundsContainer/components/BackgroundVideo/index.d.ts +11 -0
  137. package/dist/types/components/shared/BackgroundsContainer/components/BackgroundVideo/index.d.ts.map +1 -0
  138. package/dist/types/components/shared/BackgroundsContainer/components/Backgrounds/index.d.ts +8 -0
  139. package/dist/types/components/shared/BackgroundsContainer/components/Backgrounds/index.d.ts.map +1 -0
  140. package/dist/types/components/shared/BackgroundsContainer/components/Parallax/index.d.ts +11 -0
  141. package/dist/types/components/shared/BackgroundsContainer/components/Parallax/index.d.ts.map +1 -0
  142. package/dist/types/components/shared/BackgroundsContainer/index.d.ts +11 -0
  143. package/dist/types/components/shared/BackgroundsContainer/index.d.ts.map +1 -0
  144. package/dist/types/components/shared/GutterContainer/index.d.ts +8 -0
  145. package/dist/types/components/shared/GutterContainer/index.d.ts.map +1 -0
  146. package/dist/types/components/shared/Link/index.d.ts +9 -0
  147. package/dist/types/components/shared/Link/index.d.ts.map +1 -0
  148. package/dist/types/components/utils/colorToString.d.ts +3 -0
  149. package/dist/types/components/utils/colorToString.d.ts.map +1 -0
  150. package/dist/types/components/utils/cssMediaRules.d.ts +23 -1
  151. package/dist/types/components/utils/cssMediaRules.d.ts.map +1 -1
  152. package/dist/types/components/utils/isNonNullable.d.ts +2 -0
  153. package/dist/types/components/utils/isNonNullable.d.ts.map +1 -0
  154. package/dist/types/components/utils/placeholders.d.ts +10 -0
  155. package/dist/types/components/utils/placeholders.d.ts.map +1 -0
  156. package/dist/types/components/utils/queries.d.ts +5 -0
  157. package/dist/types/components/utils/queries.d.ts.map +1 -0
  158. package/dist/types/components/utils/types.d.ts +11 -0
  159. package/dist/types/components/utils/types.d.ts.map +1 -0
  160. package/dist/types/index.d.ts +1 -0
  161. package/dist/types/index.d.ts.map +1 -1
  162. package/dist/types/prop-controllers/descriptors.d.ts +37 -1
  163. package/dist/types/prop-controllers/descriptors.d.ts.map +1 -1
  164. package/dist/types/prop-controllers/index.d.ts +1 -1
  165. package/dist/types/prop-controllers/index.d.ts.map +1 -1
  166. package/dist/types/prop-controllers/instances.d.ts +10 -0
  167. package/dist/types/prop-controllers/instances.d.ts.map +1 -0
  168. package/dist/types/prop-controllers/introspection.d.ts +5 -0
  169. package/dist/types/prop-controllers/introspection.d.ts.map +1 -0
  170. package/dist/types/react.d.ts +1 -1
  171. package/dist/types/react.d.ts.map +1 -1
  172. package/dist/types/runtimes/react.d.ts +2 -0
  173. package/dist/types/runtimes/react.d.ts.map +1 -1
  174. package/dist/types/state/modules/prop-controller-handles.d.ts +20 -0
  175. package/dist/types/state/modules/prop-controller-handles.d.ts.map +1 -0
  176. package/dist/types/state/modules/prop-controllers.d.ts +1 -0
  177. package/dist/types/state/modules/prop-controllers.d.ts.map +1 -1
  178. package/dist/types/state/react-builder-preview.d.ts +11 -10
  179. package/dist/types/state/react-builder-preview.d.ts.map +1 -1
  180. package/dist/types/state/react-page.d.ts +4 -0
  181. package/dist/types/state/react-page.d.ts.map +1 -1
  182. package/dist/types/utils/clamp.d.ts +3 -0
  183. package/dist/types/utils/clamp.d.ts.map +1 -0
  184. package/dist/types/utils/deepEqual.d.ts.map +1 -1
  185. package/dist/types/utils/shallowEqual.d.ts.map +1 -1
  186. package/package.json +23 -3
@@ -1,177 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports[Symbol.toStringTag] = "Module";
4
- const Types = {
5
- Backgrounds: "Backgrounds",
6
- Border: "Border",
7
- BorderRadius: "BorderRadius",
8
- Checkbox: "Checkbox",
9
- Date: "Date",
10
- ElementID: "ElementID",
11
- Font: "Font",
12
- GapX: "GapX",
13
- GapY: "GapY",
14
- Grid: "Grid",
15
- Image: "Image",
16
- Images: "Images",
17
- Link: "Link",
18
- Margin: "Margin",
19
- NavigationLinks: "NavigationLinks",
20
- Number: "Number",
21
- Padding: "Padding",
22
- ResponsiveColor: "ResponsiveColor",
23
- ResponsiveIconRadioGroup: "ResponsiveIconRadioGroup",
24
- ResponsiveLength: "ResponsiveLength",
25
- ResponsiveNumber: "ResponsiveNumber",
26
- ResponsiveOpacity: "ResponsiveOpacity",
27
- ResponsiveSelect: "ResponsiveSelect",
28
- RichText: "RichText",
29
- Shadows: "Shadows",
30
- SocialLinks: "SocialLinks",
31
- Table: "Table",
32
- TableFormFields: "TableFormFields",
33
- TextArea: "TextArea",
34
- TextInput: "TextInput",
35
- TextStyle: "TextStyle",
36
- Video: "Video",
37
- Width: "Width"
38
- };
39
- function Backgrounds(options = {}) {
40
- return { type: Types.Backgrounds, options };
41
- }
42
- function Border(options = {}) {
43
- return { type: Types.Border, options };
44
- }
45
- function BorderRadius(options = {}) {
46
- return { type: Types.BorderRadius, options };
47
- }
48
- function Checkbox(options) {
49
- return { type: Types.Checkbox, options };
50
- }
51
- function Date(options = {}) {
52
- return { type: Types.Date, options };
53
- }
54
- function ElementID(options = {}) {
55
- return { type: Types.ElementID, options };
56
- }
57
- function Font(options = {}) {
58
- return { type: Types.Font, options };
59
- }
60
- function GapX(options = {}) {
61
- return { type: Types.GapX, options };
62
- }
63
- function GapY(options = {}) {
64
- return { type: Types.GapY, options };
65
- }
66
- function Grid(options = {}) {
67
- return { type: Types.Grid, options };
68
- }
69
- function Image(options = {}) {
70
- return { type: Types.Image, options };
71
- }
72
- function Images(options = {}) {
73
- return { type: Types.Images, options };
74
- }
75
- function Link(options = {}) {
76
- return { type: Types.Link, options };
77
- }
78
- function Margin(options = {}) {
79
- return { type: Types.Margin, options };
80
- }
81
- function NavigationLinks(options = {}) {
82
- return { type: Types.NavigationLinks, options };
83
- }
84
- function Number(options = {}) {
85
- return { type: Types.Number, options };
86
- }
87
- function Padding(options = {}) {
88
- return { type: Types.Padding, options };
89
- }
90
- function ResponsiveColor(options = {}) {
91
- return { type: Types.ResponsiveColor, options };
92
- }
93
- function ResponsiveIconRadioGroup(options) {
94
- return { type: Types.ResponsiveIconRadioGroup, options };
95
- }
96
- function ResponsiveLength(options = {}) {
97
- return { type: Types.ResponsiveLength, options };
98
- }
99
- function ResponsiveNumber(options = {}) {
100
- return { type: Types.ResponsiveNumber, options };
101
- }
102
- function ResponsiveOpacity(options = {}) {
103
- return { type: Types.ResponsiveOpacity, options };
104
- }
105
- function ResponsiveSelect(options) {
106
- return { type: Types.ResponsiveSelect, options };
107
- }
108
- function RichText(options = {}) {
109
- return { type: Types.RichText, options };
110
- }
111
- function Shadows(options = {}) {
112
- return { type: Types.Shadows, options };
113
- }
114
- function SocialLinks(options = {}) {
115
- return { type: Types.SocialLinks, options };
116
- }
117
- function Table(options = {}) {
118
- return { type: Types.Table, options };
119
- }
120
- function TableFormFields(options = {}) {
121
- return { type: Types.TableFormFields, options };
122
- }
123
- function TextArea(options = {}) {
124
- return { type: Types.TextArea, options };
125
- }
126
- function TextInput(options = {}) {
127
- return { type: Types.TextInput, options };
128
- }
129
- function TextStyle(options = {}) {
130
- return { type: Types.TextStyle, options };
131
- }
132
- function Video(options = {}) {
133
- return { type: Types.Video, options };
134
- }
135
- function Width(options = {}) {
136
- return { type: Types.Width, options };
137
- }
138
- var descriptors = /* @__PURE__ */ Object.freeze({
139
- __proto__: null,
140
- [Symbol.toStringTag]: "Module",
141
- Types,
142
- Backgrounds,
143
- Border,
144
- BorderRadius,
145
- Checkbox,
146
- Date,
147
- ElementID,
148
- Font,
149
- GapX,
150
- GapY,
151
- Grid,
152
- Image,
153
- Images,
154
- Link,
155
- Margin,
156
- NavigationLinks,
157
- Number,
158
- Padding,
159
- ResponsiveColor,
160
- ResponsiveIconRadioGroup,
161
- ResponsiveLength,
162
- ResponsiveNumber,
163
- ResponsiveOpacity,
164
- ResponsiveSelect,
165
- RichText,
166
- Shadows,
167
- SocialLinks,
168
- Table,
169
- TableFormFields,
170
- TextArea,
171
- TextInput,
172
- TextStyle,
173
- Video,
174
- Width
175
- });
176
- exports.Props = descriptors;
4
+ var descriptors = require("./descriptors.cjs.js");
5
+ exports.Props = descriptors.descriptors;
177
6
  //# sourceMappingURL=prop-controllers.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"prop-controllers.cjs.js","sources":["../src/prop-controllers/descriptors.ts"],"sourcesContent":["import type * as Slate from 'slate'\nimport type { Element, Data } from '../state/react-page'\n\n// See https://github.com/microsoft/TypeScript/issues/15300\nexport type IndexSignatureHack<T> = T extends Record<string, any>\n ? { [K in keyof T]: IndexSignatureHack<T[K]> }\n : T\n\nexport type Device = 'desktop' | 'tablet' | 'mobile'\n\nexport type DeviceOverride<T> = { deviceId: Device; value: T }\n\nexport type ResponsiveValue<T> = DeviceOverride<T>[]\n\nexport type ResponsiveValueType<T> = T extends ResponsiveValue<infer U> ? U : never\n\ntype Color = { swatchId: string; alpha: number }\n\ntype IconName =\n | 'HeightAuto16'\n | 'HeightMatch16'\n | 'VerticalAlignStart16'\n | 'VerticalAlignMiddle16'\n | 'VerticalAlignEnd16'\n | 'VerticalAlignSpaceBetween16'\n | 'ButtonPill16'\n | 'ButtonRounded16'\n | 'ButtonSquare16'\n | 'SizeSmall16'\n | 'SizeMedium16'\n | 'SizeLarge16'\n | 'ArrowInside16'\n | 'ArrowCenter16'\n | 'ArrowOutside16'\n | 'CountdownSolid16'\n | 'CountdownSolidSplit16'\n | 'CountdownOutline16'\n | 'CountdownOutlineSplit16'\n | 'CountdownNaked16'\n | 'Sun16'\n | 'Moon16'\n | 'AlignLeft16'\n | 'AlignCenter16'\n | 'AlignRight16'\n | 'Star16'\n | 'StarCircle16'\n | 'StarRoundedSquare16'\n | 'StarSquare16'\n\ntype Gap = { value: number; unit: 'px' }\n\nexport type Length = { value: number; unit: 'px' | '%' }\n\ntype OpenPageLink = {\n type: 'OPEN_PAGE'\n payload: { pageId: string | null | undefined; openInNewTab: boolean }\n}\n\ntype OpenURLLink = { type: 'OPEN_URL'; payload: { url: string; openInNewTab: boolean } }\n\ntype SendEmailLink = {\n type: 'SEND_EMAIL'\n payload: { to: string; subject?: string; body?: string }\n}\n\ntype CallPhoneLink = { type: 'CALL_PHONE'; payload: { phoneNumber: string } }\n\ntype ScrollToElementLink = {\n type: 'SCROLL_TO_ELEMENT'\n payload: {\n elementIdConfig: { elementKey: string; propName: string } | null | undefined\n block: 'start' | 'center' | 'end'\n }\n}\n\ntype Link = OpenPageLink | OpenURLLink | SendEmailLink | CallPhoneLink | ScrollToElementLink\n\ntype TextStyle = {\n fontFamily?: string | null | undefined\n letterSpacing: number | null | undefined\n fontSize: { value: number; unit: 'px' } | null | undefined\n fontWeight: number | null | undefined\n textTransform: 'uppercase'[]\n fontStyle: 'italic'[]\n}\n\nexport const Types = {\n Backgrounds: 'Backgrounds',\n Border: 'Border',\n BorderRadius: 'BorderRadius',\n Checkbox: 'Checkbox',\n Date: 'Date',\n ElementID: 'ElementID',\n Font: 'Font',\n GapX: 'GapX',\n GapY: 'GapY',\n Grid: 'Grid',\n Image: 'Image',\n Images: 'Images',\n Link: 'Link',\n Margin: 'Margin',\n NavigationLinks: 'NavigationLinks',\n Number: 'Number',\n Padding: 'Padding',\n ResponsiveColor: 'ResponsiveColor',\n ResponsiveIconRadioGroup: 'ResponsiveIconRadioGroup',\n ResponsiveLength: 'ResponsiveLength',\n ResponsiveNumber: 'ResponsiveNumber',\n ResponsiveOpacity: 'ResponsiveOpacity',\n ResponsiveSelect: 'ResponsiveSelect',\n RichText: 'RichText',\n Shadows: 'Shadows',\n SocialLinks: 'SocialLinks',\n Table: 'Table',\n TableFormFields: 'TableFormFields',\n TextArea: 'TextArea',\n TextInput: 'TextInput',\n TextStyle: 'TextStyle',\n Video: 'Video',\n Width: 'Width',\n} as const\n\ntype Options<T> = T | ((props: Record<string, unknown>, decideMode: Device) => T)\n\ntype ColorBackground = { type: 'color'; id: string; payload: Color | null }\n\ntype GradientStop = { id: string; location: number; color: Color | null }\n\ntype Gradient = { angle?: number; isRadial?: boolean; stops: GradientStop[] }\n\ntype GradientBackground = { type: 'gradient'; id: string; payload: Gradient }\n\ntype BackgroundImagePosition = { x: number; y: number }\n\ntype BackgroundImageSize = 'cover' | 'contain' | 'auto'\n\ntype BackgroundImageRepeat = 'no-repeat' | 'repeat-x' | 'repeat-y' | 'repeat'\n\ntype BackgroundImage = {\n imageId: string\n position: BackgroundImagePosition\n size?: BackgroundImageSize\n repeat?: BackgroundImageRepeat\n opacity?: number\n parallax?: number\n}\n\ntype ImageBackground = { type: 'image'; id: string; payload: BackgroundImage }\n\ntype BackgroundVideoAspectRatio = 'wide' | 'standard'\n\ntype BackgroundVideo = {\n url?: string\n maskColor?: Color | null\n opacity?: number\n zoom?: number\n aspectRatio?: BackgroundVideoAspectRatio\n parallax?: number\n}\n\ntype VideoBackground = { type: 'video'; id: string; payload: BackgroundVideo }\n\ntype Background = ColorBackground | GradientBackground | ImageBackground | VideoBackground\n\nexport type BackgroundsValue = ResponsiveValue<Background[]>\n\ntype BackgroundsOptions = Options<Record<string, never>>\n\ntype BackgroundsDescriptor<_T = BackgroundsValue> = {\n type: typeof Types.Backgrounds\n options: BackgroundsOptions\n}\n\nexport function Backgrounds(options: BackgroundsOptions = {}): BackgroundsDescriptor {\n return { type: Types.Backgrounds, options }\n}\n\ntype BorderSideStyle = 'dashed' | 'dotted' | 'solid'\n\ntype BorderSide = { width: number | null | undefined; style: BorderSideStyle; color?: Color | null }\n\ntype Border = {\n [K in 'top' | 'right' | 'bottom' | 'left' as `border${Capitalize<K>}`]:\n | BorderSide\n | null\n | undefined\n}\n\nexport type BorderValue = ResponsiveValue<Border>\n\ntype BorderOptions = Options<Record<string, never>>\n\ntype BorderDescriptor<_T = BorderValue> = { type: typeof Types.Border; options: BorderOptions }\n\nexport function Border(options: BorderOptions = {}): BorderDescriptor {\n return { type: Types.Border, options }\n}\n\ntype BorderRadius = {\n [K in 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight' as `border${Capitalize<K>}Radius`]:\n | Length\n | null\n | undefined\n}\n\nexport type BorderRadiusValue = ResponsiveValue<BorderRadius>\n\ntype BorderRadiusOptions = Options<Record<string, never>>\n\ntype BorderRadiusDescriptor<_T = BorderRadiusValue> = {\n type: typeof Types.BorderRadius\n options: BorderRadiusOptions\n}\n\nexport function BorderRadius(options: BorderRadiusOptions = {}): BorderRadiusDescriptor {\n return { type: Types.BorderRadius, options }\n}\n\nexport type CheckboxValue = boolean\n\ntype CheckboxOptions = Options<{\n preset?: CheckboxValue\n label: string\n hidden?: boolean\n}>\n\ntype CheckboxDescriptor<_T = CheckboxValue> = {\n type: typeof Types.Checkbox\n options: CheckboxOptions\n}\n\nexport function Checkbox(options: CheckboxOptions): CheckboxDescriptor {\n return { type: Types.Checkbox, options }\n}\n\nexport type DateValue = string\n\ntype DateOptions = Options<{ preset?: DateValue }>\n\ntype DateDescriptor<_T = DateValue> = { type: typeof Types.Date; options: DateOptions }\n\nexport function Date(options: DateOptions = {}): DateDescriptor {\n return { type: Types.Date, options }\n}\n\nexport type ElementIDValue = string\n\ntype ElementIDOptions = Options<Record<string, never>>\n\ntype ElementIDDescriptor<_T = ElementIDValue> = {\n type: typeof Types.ElementID\n options: ElementIDOptions\n}\n\nexport function ElementID(options: ElementIDOptions = {}): ElementIDDescriptor {\n return { type: Types.ElementID, options }\n}\n\nexport type FontValue = ResponsiveValue<string>\n\ntype FontOptions = Options<{ preset?: FontValue; label?: string }>\n\ntype FontDescriptor<_T = FontValue> = { type: typeof Types.Font; options: FontOptions }\n\nexport function Font(options: FontOptions = {}): FontDescriptor {\n return { type: Types.Font, options }\n}\n\nexport type GapXValue = ResponsiveValue<Gap>\n\ntype GapXOptions = Options<{\n preset?: GapXValue\n label?: string\n defaultValue?: Gap\n min?: number\n max?: number\n step?: number\n hidden?: boolean\n}>\n\ntype GapXDescriptor<_T = GapXValue> = { type: typeof Types.GapX; options: GapXOptions }\n\nexport function GapX(options: GapXOptions = {}): GapXDescriptor {\n return { type: Types.GapX, options }\n}\n\nexport type GapYValue = ResponsiveValue<Gap>\n\ntype GapYOptions = Options<{\n preset?: GapYValue\n label?: string\n defaultValue?: Gap\n step?: number\n min?: number\n max?: number\n hidden?: boolean\n}>\n\ntype GapYDescriptor<_T = GapYValue> = { type: typeof Types.GapY; options: GapYOptions }\n\nexport function GapY(options: GapYOptions = {}): GapYDescriptor {\n return { type: Types.GapY, options }\n}\n\ntype GridColumn = { count: number; spans: number[][] }\n\nexport type GridValue = { elements: Element[]; columns: ResponsiveValue<GridColumn> }\n\ntype GridOptions = Options<Record<string, never>>\n\ntype GridDescriptor<_T = GridValue> = { type: typeof Types.Grid; options: GridOptions }\n\nexport function Grid(options: GridOptions = {}): GridDescriptor {\n return { type: Types.Grid, options }\n}\n\nexport type ImageValue = string\n\ntype ImageOptions = Options<{ label?: string; hidden?: boolean }>\n\ntype ImageDescriptor<_T = ImageValue> = { type: typeof Types.Image; options: ImageOptions }\n\nexport function Image(options: ImageOptions = {}): ImageDescriptor {\n return { type: Types.Image, options }\n}\n\nexport type ImagesValue = { key: string; props: { link?: Link; file?: string; altText?: string } }[]\n\ntype ImagesOptions = Options<{ preset?: ImagesValue }>\n\ntype ImagesDescriptor<_T = ImagesValue> = { type: typeof Types.Images; options: ImagesOptions }\n\nexport function Images(options: ImagesOptions = {}): ImagesDescriptor {\n return { type: Types.Images, options }\n}\n\nexport type LinkValue = Link\n\ntype LinkOptions = Options<{\n preset?: LinkValue\n label?: string\n defaultValue?: Link\n options?: { value: Link['type']; label: string }[]\n hidden?: boolean\n}>\n\ntype LinkDescriptor<_T = LinkValue> = { type: typeof Types.Link; options: LinkOptions }\n\nexport function Link(options: LinkOptions = {}): LinkDescriptor {\n return { type: Types.Link, options }\n}\n\ntype MarginSide = { value: number; unit: 'px' } | 'auto'\n\ntype Margin = {\n [K in 'top' | 'right' | 'bottom' | 'left' as `margin${Capitalize<K>}`]:\n | MarginSide\n | null\n | undefined\n}\n\nexport type MarginValue = ResponsiveValue<Margin>\n\ntype MarginOptions = Options<{ preset?: MarginValue }>\n\ntype MarginDescriptor<_T = MarginValue> = { type: typeof Types.Margin; options: MarginOptions }\n\nexport function Margin(options: MarginOptions = {}): MarginDescriptor {\n return { type: Types.Margin, options }\n}\n\ntype ButtonVariant = 'flat' | 'outline' | 'shadow' | 'clear' | 'blocky' | 'bubbly' | 'skewed'\n\ntype ButtonShape = 'pill' | 'rounded' | 'square'\n\ntype ButtonSize = 'small' | 'medium' | 'large'\n\ntype NavigationButton = {\n id: string\n type: 'button'\n payload: {\n label: string\n link?: Link\n variant?: ResponsiveValue<ButtonVariant>\n shape?: ResponsiveValue<ButtonShape>\n size?: ResponsiveValue<ButtonSize>\n textColor?: ResponsiveValue<Color>\n color?: ResponsiveValue<Color>\n textStyle?: ResponsiveValue<TextStyle>\n }\n}\n\ntype NavigationDropdownCaretType = 'caret' | 'plus' | 'arrow-down' | 'chevron-down'\n\ntype NavigationDropdownLink = {\n id: string\n payload: {\n label: string\n link?: Link\n color?: ResponsiveValue<Color>\n textStyle?: ResponsiveValue<TextStyle>\n }\n}\n\ntype NavigationDropdown = {\n id: string\n type: 'dropdown'\n payload: {\n label: string\n caret?: NavigationDropdownCaretType\n links?: NavigationDropdownLink[]\n variant?: ResponsiveValue<ButtonVariant>\n shape?: ResponsiveValue<ButtonShape>\n size?: ResponsiveValue<ButtonSize>\n textColor?: ResponsiveValue<Color>\n color?: ResponsiveValue<Color>\n textStyle?: ResponsiveValue<TextStyle>\n }\n}\n\nexport type NavigationLinksValue = (NavigationButton | NavigationDropdown)[]\n\ntype NavigationLinksOptions = Options<Record<string, never>>\n\ntype NavigationLinksDescriptor<_T = NavigationLinksValue> = {\n type: typeof Types.NavigationLinks\n options: NavigationLinksOptions\n}\n\nexport function NavigationLinks(options: NavigationLinksOptions = {}): NavigationLinksDescriptor {\n return { type: Types.NavigationLinks, options }\n}\n\nexport type NumberValue = number\n\ntype NumberOptions = Options<{\n preset?: NumberValue\n label?: string\n defaultValue?: number\n min?: number\n max?: number\n step?: number\n suffix?: string\n hidden?: boolean\n}>\n\ntype NumberDescriptor<_T = NumberValue> = { type: typeof Types.Number; options: NumberOptions }\n\nexport function Number(options: NumberOptions = {}): NumberDescriptor {\n return { type: Types.Number, options }\n}\n\ntype PaddingSide = { value: number; unit: 'px' }\n\ntype Padding = {\n [K in 'top' | 'right' | 'bottom' | 'left' as `padding${Capitalize<K>}`]:\n | PaddingSide\n | null\n | undefined\n}\n\nexport type PaddingValue = ResponsiveValue<Padding>\n\ntype PaddingOptions = Options<{ preset?: PaddingValue }>\n\ntype PaddingDescriptor<_T = PaddingValue> = { type: typeof Types.Padding; options: PaddingOptions }\n\nexport function Padding(options: PaddingOptions = {}): PaddingDescriptor {\n return { type: Types.Padding, options }\n}\n\nexport type ResponsiveColorValue = ResponsiveValue<Color>\n\ntype ResponsiveColorOptions = Options<{ label?: string; placeholder?: string; hidden?: boolean }>\n\ntype ResponsiveColorDescriptor<_T = ResponsiveColorValue> = {\n type: typeof Types.ResponsiveColor\n options: ResponsiveColorOptions\n}\n\nexport function ResponsiveColor(options: ResponsiveColorOptions = {}): ResponsiveColorDescriptor {\n return { type: Types.ResponsiveColor, options }\n}\n\ntype IconRadioGroupOption<T extends string> = { value: T; label: string; icon: IconName }\n\nexport type ResponsiveIconRadioGroupValue<T extends string> = ResponsiveValue<T>\n\ntype ResponsiveIconRadioGroupOptions<T extends string, U extends T = T> = Options<{\n label?: string\n options: IconRadioGroupOption<T>[]\n defaultValue?: U\n hidden?: boolean\n}>\n\ntype ResponsiveIconRadioGroupDescriptor<T extends ResponsiveIconRadioGroupValue<string>> = {\n type: typeof Types.ResponsiveIconRadioGroup\n options: ResponsiveIconRadioGroupOptions<ResponsiveValueType<T>>\n}\n\n// HACK(miguel): We have to use a layer of indirection with `_T` and `T` because otherwise the\n// values provided would undergo type widening. For some reason, the extra layer of indirection\n// reuslts in TypeScript not widening types. Note, this only happens when the returned value of this\n// function is passed to another as an argument, which is common with the `registerComponent` API.\nexport function ResponsiveIconRadioGroup<_T extends string, T extends _T, U extends T>(\n options: ResponsiveIconRadioGroupOptions<T, U>,\n): ResponsiveIconRadioGroupDescriptor<ResponsiveIconRadioGroupValue<T>> {\n return { type: Types.ResponsiveIconRadioGroup, options }\n}\n\nexport type ResponsiveLengthValue = ResponsiveValue<Length>\n\ntype LengthOption =\n | { value: 'px'; label: 'Pixels'; icon: 'Px16' }\n | { value: '%'; label: 'Percentage'; icon: 'Percent16' }\n\ntype ResponsiveLengthOptions = Options<{\n label?: string\n options?: LengthOption[]\n defaultValue?: Length\n hidden?: boolean\n}>\n\ntype ResponsiveLengthDescriptor<_T = ResponsiveLengthValue> = {\n type: typeof Types.ResponsiveLength\n options: ResponsiveLengthOptions\n}\n\nexport function ResponsiveLength(\n options: ResponsiveLengthOptions = {},\n): ResponsiveLengthDescriptor {\n return { type: Types.ResponsiveLength, options }\n}\n\nexport type ResponsiveNumberValue = ResponsiveValue<number>\n\ntype ResponsiveNumberOptions = Options<{\n label?: string\n defaultValue?: number\n min?: number\n max?: number\n step?: number\n suffix?: string\n hidden?: boolean\n}>\n\ntype ResponsiveNumberDescriptor<_T = ResponsiveNumberValue> = {\n type: typeof Types.ResponsiveNumber\n options: ResponsiveNumberOptions\n}\n\nexport function ResponsiveNumber(\n options: ResponsiveNumberOptions = {},\n): ResponsiveNumberDescriptor {\n return { type: Types.ResponsiveNumber, options }\n}\n\nexport type ResponsiveOpacityValue = ResponsiveValue<number>\n\ntype ResponsiveOpacityOptions = Options<Record<string, never>>\n\ntype ResponsiveOpacityDescriptor<_T = ResponsiveOpacityValue> = {\n type: typeof Types.ResponsiveOpacity\n options: ResponsiveOpacityOptions\n}\n\nexport function ResponsiveOpacity(\n options: ResponsiveOpacityOptions = {},\n): ResponsiveOpacityDescriptor {\n return { type: Types.ResponsiveOpacity, options }\n}\n\nexport type ResponsiveSelectValue<T extends string> = ResponsiveValue<T>\n\ntype SelectLabelOrientation = 'vertical' | 'horizontal'\n\ntype SelectOption<T extends string> = { value: T; label: string }\n\ntype ResponsiveSelectOptions<T extends string, U extends T = T> = Options<{\n label?: string\n labelOrientation?: SelectLabelOrientation\n options: SelectOption<T>[]\n defaultValue?: U\n hidden?: boolean\n}>\n\ntype ResponsiveSelectDescriptor<T extends ResponsiveSelectValue<string>> = {\n type: typeof Types.ResponsiveSelect\n options: ResponsiveSelectOptions<ResponsiveValueType<T>>\n}\n\n// HACK(miguel): We have to use a layer of indirection with `_T` and `T` because otherwise the\n// values provided would undergo type widening. For some reason, the extra layer of indirection\n// reuslts in TypeScript not widening types. Note, this only happens when the returned value of this\n// function is passed to another as an argument, which is common with the `registerComponent` API.\nexport function ResponsiveSelect<_T extends string, T extends _T, U extends T>(\n options: ResponsiveSelectOptions<T, U>,\n): ResponsiveSelectDescriptor<ResponsiveSelectValue<T>> {\n return { type: Types.ResponsiveSelect, options }\n}\n\nexport type RichTextValue = IndexSignatureHack<Slate.ValueJSON>\n\ntype RichTextOptions = Options<{ preset?: RichTextValue }>\n\ntype RichTextDescriptor<_T extends Data = RichTextValue> = {\n type: typeof Types.RichText\n options: RichTextOptions\n}\n\nexport function RichText(options: RichTextOptions = {}): RichTextDescriptor {\n return { type: Types.RichText, options }\n}\n\ntype Shadow = {\n color?: Color | null\n blurRadius?: number\n spreadRadius?: number\n offsetX?: number\n offsetY?: number\n inset?: boolean\n}\n\ntype Shadows = { id: string; payload: Shadow }[]\n\nexport type ShadowsValue = ResponsiveValue<Shadows>\n\ntype ShadowsOptions = Options<Record<string, never>>\n\ntype ShadowsDescriptor<_T = ShadowsValue> = { type: typeof Types.Shadows; options: ShadowsOptions }\n\nexport function Shadows(options: ShadowsOptions = {}): ShadowsDescriptor {\n return { type: Types.Shadows, options }\n}\n\ntype SocialLinkType =\n | 'angellist'\n | 'codepen'\n | 'dribbble'\n | 'facebook'\n | 'github'\n | 'instagram'\n | 'linkedin'\n | 'medium'\n | 'pinterest'\n | 'reddit'\n | 'rss'\n | 'snapchat'\n | 'soundcloud'\n | 'spotify'\n | 'telegram'\n | 'tumblr'\n | 'twitch'\n | 'twitter'\n | 'vimeo'\n | 'whatsapp'\n | 'yelp'\n | 'youtube'\n\ntype SocialLink = { type: SocialLinkType; url: string }\n\ntype SocialLinksLink = { id: string; payload: SocialLink }\n\nexport type SocialLinksValue = { links: SocialLinksLink[]; openInNewTab: boolean }\n\ntype SocialLinksOptions = Options<{ preset?: SocialLinksValue }>\n\ntype SocialLinksDescriptor<_T = SocialLinksValue> = {\n type: typeof Types.SocialLinks\n options: SocialLinksOptions\n}\n\nexport function SocialLinks(options: SocialLinksOptions = {}): SocialLinksDescriptor {\n return { type: Types.SocialLinks, options }\n}\n\nexport type TableValue = string\n\ntype TableOptions = Options<{ preset?: TableValue }>\n\ntype TableDescriptor<_T = TableValue> = { type: typeof Types.Table; options: TableOptions }\n\nexport function Table(options: TableOptions = {}): TableDescriptor {\n return { type: Types.Table, options }\n}\n\ntype TableFormField = {\n id: string\n tableColumnId: string\n label?: string\n placeholder?: string\n defaultValue?: string | boolean | string[]\n required?: boolean\n hidden?: boolean\n type?: 'select' | 'radio'\n hideLabel?: boolean\n autofill?: boolean\n}\n\ntype Grid = { count: number; spans: number[][] }\n\nexport type TableFormFieldsValue = { fields: TableFormField[]; grid: ResponsiveValue<Grid> }\n\ntype TableFormFieldsOptions = Options<{ preset?: TableFormFieldsValue }>\n\ntype TableFormFieldsDescriptor<_T = TableFormFieldsValue> = {\n type: typeof Types.TableFormFields\n options: TableFormFieldsOptions\n}\n\nexport function TableFormFields(options: TableFormFieldsOptions = {}): TableFormFieldsDescriptor {\n return { type: Types.TableFormFields, options }\n}\n\nexport type TextAreaValue = string\n\ntype TextAreaOptions = Options<{ preset?: TextAreaValue; label?: string; rows?: number }>\n\ntype TextAreaDescriptor<_T = TextAreaValue> = {\n type: typeof Types.TextArea\n options: TextAreaOptions\n}\n\nexport function TextArea(options: TextAreaOptions = {}): TextAreaDescriptor {\n return { type: Types.TextArea, options }\n}\n\nexport type TextInputValue = string\n\ntype TextInputOptions = Options<{ label?: string; placeholder?: string; hidden?: boolean }>\n\ntype TextInputDescriptor<_T = TextInputValue> = {\n type: typeof Types.TextInput\n options: TextInputOptions\n}\n\nexport function TextInput(options: TextInputOptions = {}): TextInputDescriptor {\n return { type: Types.TextInput, options }\n}\n\nexport type TextStyleValue = ResponsiveValue<TextStyle>\n\ntype TextStyleOptions = Options<{ preset?: TextStyleValue; label?: string; hidden?: boolean }>\n\ntype TextStyleDescriptor<_T = TextStyleValue> = {\n type: typeof Types.TextStyle\n options: TextStyleOptions\n}\n\nexport function TextStyle(options: TextStyleOptions = {}): TextStyleDescriptor {\n return { type: Types.TextStyle, options }\n}\n\ntype Video = {\n url?: string\n muted?: boolean\n playing?: boolean\n loop?: boolean\n controls?: boolean\n}\n\nexport type VideoValue = Video\n\ntype VideoOptions = Options<{ preset?: VideoValue }>\n\ntype VideoDescriptor<_T = VideoValue> = { type: typeof Types.Video; options: VideoOptions }\n\nexport function Video(options: VideoOptions = {}): VideoDescriptor {\n return { type: Types.Video, options }\n}\n\nexport type WidthValue = ResponsiveValue<Length>\n\ntype WidthOptions = Options<{ preset?: WidthValue; defaultValue?: Length }>\n\ntype WidthDescriptor<_T = WidthValue> = { type: typeof Types.Width; options: WidthOptions }\n\nexport function Width(options: WidthOptions = {}): WidthDescriptor {\n return { type: Types.Width, options }\n}\n\nexport type Descriptor<T extends Data = Data> =\n | BackgroundsDescriptor<T>\n | BorderDescriptor<T>\n | BorderRadiusDescriptor<T>\n | CheckboxDescriptor<T>\n | DateDescriptor<T>\n | ElementIDDescriptor<T>\n | FontDescriptor<T>\n | GapXDescriptor<T>\n | GapYDescriptor<T>\n | GridDescriptor<T>\n | ImageDescriptor<T>\n | ImagesDescriptor<T>\n | LinkDescriptor<T>\n | MarginDescriptor<T>\n | NavigationLinksDescriptor<T>\n | NumberDescriptor<T>\n | PaddingDescriptor<T>\n | ResponsiveColorDescriptor<T>\n | ResponsiveIconRadioGroupDescriptor<\n T extends ResponsiveIconRadioGroupValue<string> ? T : ResponsiveIconRadioGroupValue<string>\n >\n | ResponsiveLengthDescriptor<T>\n | ResponsiveNumberDescriptor<T>\n | ResponsiveOpacityDescriptor<T>\n | ResponsiveSelectDescriptor<\n T extends ResponsiveSelectValue<string> ? T : ResponsiveSelectValue<string>\n >\n | RichTextDescriptor<T>\n | ShadowsDescriptor<T>\n | SocialLinksDescriptor<T>\n | TableDescriptor<T>\n | TableFormFieldsDescriptor<T>\n | TextAreaDescriptor<T>\n | TextInputDescriptor<T>\n | TextStyleDescriptor<T>\n | VideoDescriptor<T>\n | WidthDescriptor<T>\n\nexport type DescriptorValueType<T extends Descriptor> = T extends Descriptor<infer U> ? U : never\n"],"names":[],"mappings":"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"}
1
+ {"version":3,"file":"prop-controllers.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
@@ -1,174 +1,2 @@
1
- const Types = {
2
- Backgrounds: "Backgrounds",
3
- Border: "Border",
4
- BorderRadius: "BorderRadius",
5
- Checkbox: "Checkbox",
6
- Date: "Date",
7
- ElementID: "ElementID",
8
- Font: "Font",
9
- GapX: "GapX",
10
- GapY: "GapY",
11
- Grid: "Grid",
12
- Image: "Image",
13
- Images: "Images",
14
- Link: "Link",
15
- Margin: "Margin",
16
- NavigationLinks: "NavigationLinks",
17
- Number: "Number",
18
- Padding: "Padding",
19
- ResponsiveColor: "ResponsiveColor",
20
- ResponsiveIconRadioGroup: "ResponsiveIconRadioGroup",
21
- ResponsiveLength: "ResponsiveLength",
22
- ResponsiveNumber: "ResponsiveNumber",
23
- ResponsiveOpacity: "ResponsiveOpacity",
24
- ResponsiveSelect: "ResponsiveSelect",
25
- RichText: "RichText",
26
- Shadows: "Shadows",
27
- SocialLinks: "SocialLinks",
28
- Table: "Table",
29
- TableFormFields: "TableFormFields",
30
- TextArea: "TextArea",
31
- TextInput: "TextInput",
32
- TextStyle: "TextStyle",
33
- Video: "Video",
34
- Width: "Width"
35
- };
36
- function Backgrounds(options = {}) {
37
- return { type: Types.Backgrounds, options };
38
- }
39
- function Border(options = {}) {
40
- return { type: Types.Border, options };
41
- }
42
- function BorderRadius(options = {}) {
43
- return { type: Types.BorderRadius, options };
44
- }
45
- function Checkbox(options) {
46
- return { type: Types.Checkbox, options };
47
- }
48
- function Date(options = {}) {
49
- return { type: Types.Date, options };
50
- }
51
- function ElementID(options = {}) {
52
- return { type: Types.ElementID, options };
53
- }
54
- function Font(options = {}) {
55
- return { type: Types.Font, options };
56
- }
57
- function GapX(options = {}) {
58
- return { type: Types.GapX, options };
59
- }
60
- function GapY(options = {}) {
61
- return { type: Types.GapY, options };
62
- }
63
- function Grid(options = {}) {
64
- return { type: Types.Grid, options };
65
- }
66
- function Image(options = {}) {
67
- return { type: Types.Image, options };
68
- }
69
- function Images(options = {}) {
70
- return { type: Types.Images, options };
71
- }
72
- function Link(options = {}) {
73
- return { type: Types.Link, options };
74
- }
75
- function Margin(options = {}) {
76
- return { type: Types.Margin, options };
77
- }
78
- function NavigationLinks(options = {}) {
79
- return { type: Types.NavigationLinks, options };
80
- }
81
- function Number(options = {}) {
82
- return { type: Types.Number, options };
83
- }
84
- function Padding(options = {}) {
85
- return { type: Types.Padding, options };
86
- }
87
- function ResponsiveColor(options = {}) {
88
- return { type: Types.ResponsiveColor, options };
89
- }
90
- function ResponsiveIconRadioGroup(options) {
91
- return { type: Types.ResponsiveIconRadioGroup, options };
92
- }
93
- function ResponsiveLength(options = {}) {
94
- return { type: Types.ResponsiveLength, options };
95
- }
96
- function ResponsiveNumber(options = {}) {
97
- return { type: Types.ResponsiveNumber, options };
98
- }
99
- function ResponsiveOpacity(options = {}) {
100
- return { type: Types.ResponsiveOpacity, options };
101
- }
102
- function ResponsiveSelect(options) {
103
- return { type: Types.ResponsiveSelect, options };
104
- }
105
- function RichText(options = {}) {
106
- return { type: Types.RichText, options };
107
- }
108
- function Shadows(options = {}) {
109
- return { type: Types.Shadows, options };
110
- }
111
- function SocialLinks(options = {}) {
112
- return { type: Types.SocialLinks, options };
113
- }
114
- function Table(options = {}) {
115
- return { type: Types.Table, options };
116
- }
117
- function TableFormFields(options = {}) {
118
- return { type: Types.TableFormFields, options };
119
- }
120
- function TextArea(options = {}) {
121
- return { type: Types.TextArea, options };
122
- }
123
- function TextInput(options = {}) {
124
- return { type: Types.TextInput, options };
125
- }
126
- function TextStyle(options = {}) {
127
- return { type: Types.TextStyle, options };
128
- }
129
- function Video(options = {}) {
130
- return { type: Types.Video, options };
131
- }
132
- function Width(options = {}) {
133
- return { type: Types.Width, options };
134
- }
135
- var descriptors = /* @__PURE__ */ Object.freeze({
136
- __proto__: null,
137
- [Symbol.toStringTag]: "Module",
138
- Types,
139
- Backgrounds,
140
- Border,
141
- BorderRadius,
142
- Checkbox,
143
- Date,
144
- ElementID,
145
- Font,
146
- GapX,
147
- GapY,
148
- Grid,
149
- Image,
150
- Images,
151
- Link,
152
- Margin,
153
- NavigationLinks,
154
- Number,
155
- Padding,
156
- ResponsiveColor,
157
- ResponsiveIconRadioGroup,
158
- ResponsiveLength,
159
- ResponsiveNumber,
160
- ResponsiveOpacity,
161
- ResponsiveSelect,
162
- RichText,
163
- Shadows,
164
- SocialLinks,
165
- Table,
166
- TableFormFields,
167
- TextArea,
168
- TextInput,
169
- TextStyle,
170
- Video,
171
- Width
172
- });
173
- export { descriptors as Props };
1
+ export { d as Props } from "./descriptors.es.js";
174
2
  //# sourceMappingURL=prop-controllers.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"prop-controllers.es.js","sources":["../src/prop-controllers/descriptors.ts"],"sourcesContent":["import type * as Slate from 'slate'\nimport type { Element, Data } from '../state/react-page'\n\n// See https://github.com/microsoft/TypeScript/issues/15300\nexport type IndexSignatureHack<T> = T extends Record<string, any>\n ? { [K in keyof T]: IndexSignatureHack<T[K]> }\n : T\n\nexport type Device = 'desktop' | 'tablet' | 'mobile'\n\nexport type DeviceOverride<T> = { deviceId: Device; value: T }\n\nexport type ResponsiveValue<T> = DeviceOverride<T>[]\n\nexport type ResponsiveValueType<T> = T extends ResponsiveValue<infer U> ? U : never\n\ntype Color = { swatchId: string; alpha: number }\n\ntype IconName =\n | 'HeightAuto16'\n | 'HeightMatch16'\n | 'VerticalAlignStart16'\n | 'VerticalAlignMiddle16'\n | 'VerticalAlignEnd16'\n | 'VerticalAlignSpaceBetween16'\n | 'ButtonPill16'\n | 'ButtonRounded16'\n | 'ButtonSquare16'\n | 'SizeSmall16'\n | 'SizeMedium16'\n | 'SizeLarge16'\n | 'ArrowInside16'\n | 'ArrowCenter16'\n | 'ArrowOutside16'\n | 'CountdownSolid16'\n | 'CountdownSolidSplit16'\n | 'CountdownOutline16'\n | 'CountdownOutlineSplit16'\n | 'CountdownNaked16'\n | 'Sun16'\n | 'Moon16'\n | 'AlignLeft16'\n | 'AlignCenter16'\n | 'AlignRight16'\n | 'Star16'\n | 'StarCircle16'\n | 'StarRoundedSquare16'\n | 'StarSquare16'\n\ntype Gap = { value: number; unit: 'px' }\n\nexport type Length = { value: number; unit: 'px' | '%' }\n\ntype OpenPageLink = {\n type: 'OPEN_PAGE'\n payload: { pageId: string | null | undefined; openInNewTab: boolean }\n}\n\ntype OpenURLLink = { type: 'OPEN_URL'; payload: { url: string; openInNewTab: boolean } }\n\ntype SendEmailLink = {\n type: 'SEND_EMAIL'\n payload: { to: string; subject?: string; body?: string }\n}\n\ntype CallPhoneLink = { type: 'CALL_PHONE'; payload: { phoneNumber: string } }\n\ntype ScrollToElementLink = {\n type: 'SCROLL_TO_ELEMENT'\n payload: {\n elementIdConfig: { elementKey: string; propName: string } | null | undefined\n block: 'start' | 'center' | 'end'\n }\n}\n\ntype Link = OpenPageLink | OpenURLLink | SendEmailLink | CallPhoneLink | ScrollToElementLink\n\ntype TextStyle = {\n fontFamily?: string | null | undefined\n letterSpacing: number | null | undefined\n fontSize: { value: number; unit: 'px' } | null | undefined\n fontWeight: number | null | undefined\n textTransform: 'uppercase'[]\n fontStyle: 'italic'[]\n}\n\nexport const Types = {\n Backgrounds: 'Backgrounds',\n Border: 'Border',\n BorderRadius: 'BorderRadius',\n Checkbox: 'Checkbox',\n Date: 'Date',\n ElementID: 'ElementID',\n Font: 'Font',\n GapX: 'GapX',\n GapY: 'GapY',\n Grid: 'Grid',\n Image: 'Image',\n Images: 'Images',\n Link: 'Link',\n Margin: 'Margin',\n NavigationLinks: 'NavigationLinks',\n Number: 'Number',\n Padding: 'Padding',\n ResponsiveColor: 'ResponsiveColor',\n ResponsiveIconRadioGroup: 'ResponsiveIconRadioGroup',\n ResponsiveLength: 'ResponsiveLength',\n ResponsiveNumber: 'ResponsiveNumber',\n ResponsiveOpacity: 'ResponsiveOpacity',\n ResponsiveSelect: 'ResponsiveSelect',\n RichText: 'RichText',\n Shadows: 'Shadows',\n SocialLinks: 'SocialLinks',\n Table: 'Table',\n TableFormFields: 'TableFormFields',\n TextArea: 'TextArea',\n TextInput: 'TextInput',\n TextStyle: 'TextStyle',\n Video: 'Video',\n Width: 'Width',\n} as const\n\ntype Options<T> = T | ((props: Record<string, unknown>, decideMode: Device) => T)\n\ntype ColorBackground = { type: 'color'; id: string; payload: Color | null }\n\ntype GradientStop = { id: string; location: number; color: Color | null }\n\ntype Gradient = { angle?: number; isRadial?: boolean; stops: GradientStop[] }\n\ntype GradientBackground = { type: 'gradient'; id: string; payload: Gradient }\n\ntype BackgroundImagePosition = { x: number; y: number }\n\ntype BackgroundImageSize = 'cover' | 'contain' | 'auto'\n\ntype BackgroundImageRepeat = 'no-repeat' | 'repeat-x' | 'repeat-y' | 'repeat'\n\ntype BackgroundImage = {\n imageId: string\n position: BackgroundImagePosition\n size?: BackgroundImageSize\n repeat?: BackgroundImageRepeat\n opacity?: number\n parallax?: number\n}\n\ntype ImageBackground = { type: 'image'; id: string; payload: BackgroundImage }\n\ntype BackgroundVideoAspectRatio = 'wide' | 'standard'\n\ntype BackgroundVideo = {\n url?: string\n maskColor?: Color | null\n opacity?: number\n zoom?: number\n aspectRatio?: BackgroundVideoAspectRatio\n parallax?: number\n}\n\ntype VideoBackground = { type: 'video'; id: string; payload: BackgroundVideo }\n\ntype Background = ColorBackground | GradientBackground | ImageBackground | VideoBackground\n\nexport type BackgroundsValue = ResponsiveValue<Background[]>\n\ntype BackgroundsOptions = Options<Record<string, never>>\n\ntype BackgroundsDescriptor<_T = BackgroundsValue> = {\n type: typeof Types.Backgrounds\n options: BackgroundsOptions\n}\n\nexport function Backgrounds(options: BackgroundsOptions = {}): BackgroundsDescriptor {\n return { type: Types.Backgrounds, options }\n}\n\ntype BorderSideStyle = 'dashed' | 'dotted' | 'solid'\n\ntype BorderSide = { width: number | null | undefined; style: BorderSideStyle; color?: Color | null }\n\ntype Border = {\n [K in 'top' | 'right' | 'bottom' | 'left' as `border${Capitalize<K>}`]:\n | BorderSide\n | null\n | undefined\n}\n\nexport type BorderValue = ResponsiveValue<Border>\n\ntype BorderOptions = Options<Record<string, never>>\n\ntype BorderDescriptor<_T = BorderValue> = { type: typeof Types.Border; options: BorderOptions }\n\nexport function Border(options: BorderOptions = {}): BorderDescriptor {\n return { type: Types.Border, options }\n}\n\ntype BorderRadius = {\n [K in 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight' as `border${Capitalize<K>}Radius`]:\n | Length\n | null\n | undefined\n}\n\nexport type BorderRadiusValue = ResponsiveValue<BorderRadius>\n\ntype BorderRadiusOptions = Options<Record<string, never>>\n\ntype BorderRadiusDescriptor<_T = BorderRadiusValue> = {\n type: typeof Types.BorderRadius\n options: BorderRadiusOptions\n}\n\nexport function BorderRadius(options: BorderRadiusOptions = {}): BorderRadiusDescriptor {\n return { type: Types.BorderRadius, options }\n}\n\nexport type CheckboxValue = boolean\n\ntype CheckboxOptions = Options<{\n preset?: CheckboxValue\n label: string\n hidden?: boolean\n}>\n\ntype CheckboxDescriptor<_T = CheckboxValue> = {\n type: typeof Types.Checkbox\n options: CheckboxOptions\n}\n\nexport function Checkbox(options: CheckboxOptions): CheckboxDescriptor {\n return { type: Types.Checkbox, options }\n}\n\nexport type DateValue = string\n\ntype DateOptions = Options<{ preset?: DateValue }>\n\ntype DateDescriptor<_T = DateValue> = { type: typeof Types.Date; options: DateOptions }\n\nexport function Date(options: DateOptions = {}): DateDescriptor {\n return { type: Types.Date, options }\n}\n\nexport type ElementIDValue = string\n\ntype ElementIDOptions = Options<Record<string, never>>\n\ntype ElementIDDescriptor<_T = ElementIDValue> = {\n type: typeof Types.ElementID\n options: ElementIDOptions\n}\n\nexport function ElementID(options: ElementIDOptions = {}): ElementIDDescriptor {\n return { type: Types.ElementID, options }\n}\n\nexport type FontValue = ResponsiveValue<string>\n\ntype FontOptions = Options<{ preset?: FontValue; label?: string }>\n\ntype FontDescriptor<_T = FontValue> = { type: typeof Types.Font; options: FontOptions }\n\nexport function Font(options: FontOptions = {}): FontDescriptor {\n return { type: Types.Font, options }\n}\n\nexport type GapXValue = ResponsiveValue<Gap>\n\ntype GapXOptions = Options<{\n preset?: GapXValue\n label?: string\n defaultValue?: Gap\n min?: number\n max?: number\n step?: number\n hidden?: boolean\n}>\n\ntype GapXDescriptor<_T = GapXValue> = { type: typeof Types.GapX; options: GapXOptions }\n\nexport function GapX(options: GapXOptions = {}): GapXDescriptor {\n return { type: Types.GapX, options }\n}\n\nexport type GapYValue = ResponsiveValue<Gap>\n\ntype GapYOptions = Options<{\n preset?: GapYValue\n label?: string\n defaultValue?: Gap\n step?: number\n min?: number\n max?: number\n hidden?: boolean\n}>\n\ntype GapYDescriptor<_T = GapYValue> = { type: typeof Types.GapY; options: GapYOptions }\n\nexport function GapY(options: GapYOptions = {}): GapYDescriptor {\n return { type: Types.GapY, options }\n}\n\ntype GridColumn = { count: number; spans: number[][] }\n\nexport type GridValue = { elements: Element[]; columns: ResponsiveValue<GridColumn> }\n\ntype GridOptions = Options<Record<string, never>>\n\ntype GridDescriptor<_T = GridValue> = { type: typeof Types.Grid; options: GridOptions }\n\nexport function Grid(options: GridOptions = {}): GridDescriptor {\n return { type: Types.Grid, options }\n}\n\nexport type ImageValue = string\n\ntype ImageOptions = Options<{ label?: string; hidden?: boolean }>\n\ntype ImageDescriptor<_T = ImageValue> = { type: typeof Types.Image; options: ImageOptions }\n\nexport function Image(options: ImageOptions = {}): ImageDescriptor {\n return { type: Types.Image, options }\n}\n\nexport type ImagesValue = { key: string; props: { link?: Link; file?: string; altText?: string } }[]\n\ntype ImagesOptions = Options<{ preset?: ImagesValue }>\n\ntype ImagesDescriptor<_T = ImagesValue> = { type: typeof Types.Images; options: ImagesOptions }\n\nexport function Images(options: ImagesOptions = {}): ImagesDescriptor {\n return { type: Types.Images, options }\n}\n\nexport type LinkValue = Link\n\ntype LinkOptions = Options<{\n preset?: LinkValue\n label?: string\n defaultValue?: Link\n options?: { value: Link['type']; label: string }[]\n hidden?: boolean\n}>\n\ntype LinkDescriptor<_T = LinkValue> = { type: typeof Types.Link; options: LinkOptions }\n\nexport function Link(options: LinkOptions = {}): LinkDescriptor {\n return { type: Types.Link, options }\n}\n\ntype MarginSide = { value: number; unit: 'px' } | 'auto'\n\ntype Margin = {\n [K in 'top' | 'right' | 'bottom' | 'left' as `margin${Capitalize<K>}`]:\n | MarginSide\n | null\n | undefined\n}\n\nexport type MarginValue = ResponsiveValue<Margin>\n\ntype MarginOptions = Options<{ preset?: MarginValue }>\n\ntype MarginDescriptor<_T = MarginValue> = { type: typeof Types.Margin; options: MarginOptions }\n\nexport function Margin(options: MarginOptions = {}): MarginDescriptor {\n return { type: Types.Margin, options }\n}\n\ntype ButtonVariant = 'flat' | 'outline' | 'shadow' | 'clear' | 'blocky' | 'bubbly' | 'skewed'\n\ntype ButtonShape = 'pill' | 'rounded' | 'square'\n\ntype ButtonSize = 'small' | 'medium' | 'large'\n\ntype NavigationButton = {\n id: string\n type: 'button'\n payload: {\n label: string\n link?: Link\n variant?: ResponsiveValue<ButtonVariant>\n shape?: ResponsiveValue<ButtonShape>\n size?: ResponsiveValue<ButtonSize>\n textColor?: ResponsiveValue<Color>\n color?: ResponsiveValue<Color>\n textStyle?: ResponsiveValue<TextStyle>\n }\n}\n\ntype NavigationDropdownCaretType = 'caret' | 'plus' | 'arrow-down' | 'chevron-down'\n\ntype NavigationDropdownLink = {\n id: string\n payload: {\n label: string\n link?: Link\n color?: ResponsiveValue<Color>\n textStyle?: ResponsiveValue<TextStyle>\n }\n}\n\ntype NavigationDropdown = {\n id: string\n type: 'dropdown'\n payload: {\n label: string\n caret?: NavigationDropdownCaretType\n links?: NavigationDropdownLink[]\n variant?: ResponsiveValue<ButtonVariant>\n shape?: ResponsiveValue<ButtonShape>\n size?: ResponsiveValue<ButtonSize>\n textColor?: ResponsiveValue<Color>\n color?: ResponsiveValue<Color>\n textStyle?: ResponsiveValue<TextStyle>\n }\n}\n\nexport type NavigationLinksValue = (NavigationButton | NavigationDropdown)[]\n\ntype NavigationLinksOptions = Options<Record<string, never>>\n\ntype NavigationLinksDescriptor<_T = NavigationLinksValue> = {\n type: typeof Types.NavigationLinks\n options: NavigationLinksOptions\n}\n\nexport function NavigationLinks(options: NavigationLinksOptions = {}): NavigationLinksDescriptor {\n return { type: Types.NavigationLinks, options }\n}\n\nexport type NumberValue = number\n\ntype NumberOptions = Options<{\n preset?: NumberValue\n label?: string\n defaultValue?: number\n min?: number\n max?: number\n step?: number\n suffix?: string\n hidden?: boolean\n}>\n\ntype NumberDescriptor<_T = NumberValue> = { type: typeof Types.Number; options: NumberOptions }\n\nexport function Number(options: NumberOptions = {}): NumberDescriptor {\n return { type: Types.Number, options }\n}\n\ntype PaddingSide = { value: number; unit: 'px' }\n\ntype Padding = {\n [K in 'top' | 'right' | 'bottom' | 'left' as `padding${Capitalize<K>}`]:\n | PaddingSide\n | null\n | undefined\n}\n\nexport type PaddingValue = ResponsiveValue<Padding>\n\ntype PaddingOptions = Options<{ preset?: PaddingValue }>\n\ntype PaddingDescriptor<_T = PaddingValue> = { type: typeof Types.Padding; options: PaddingOptions }\n\nexport function Padding(options: PaddingOptions = {}): PaddingDescriptor {\n return { type: Types.Padding, options }\n}\n\nexport type ResponsiveColorValue = ResponsiveValue<Color>\n\ntype ResponsiveColorOptions = Options<{ label?: string; placeholder?: string; hidden?: boolean }>\n\ntype ResponsiveColorDescriptor<_T = ResponsiveColorValue> = {\n type: typeof Types.ResponsiveColor\n options: ResponsiveColorOptions\n}\n\nexport function ResponsiveColor(options: ResponsiveColorOptions = {}): ResponsiveColorDescriptor {\n return { type: Types.ResponsiveColor, options }\n}\n\ntype IconRadioGroupOption<T extends string> = { value: T; label: string; icon: IconName }\n\nexport type ResponsiveIconRadioGroupValue<T extends string> = ResponsiveValue<T>\n\ntype ResponsiveIconRadioGroupOptions<T extends string, U extends T = T> = Options<{\n label?: string\n options: IconRadioGroupOption<T>[]\n defaultValue?: U\n hidden?: boolean\n}>\n\ntype ResponsiveIconRadioGroupDescriptor<T extends ResponsiveIconRadioGroupValue<string>> = {\n type: typeof Types.ResponsiveIconRadioGroup\n options: ResponsiveIconRadioGroupOptions<ResponsiveValueType<T>>\n}\n\n// HACK(miguel): We have to use a layer of indirection with `_T` and `T` because otherwise the\n// values provided would undergo type widening. For some reason, the extra layer of indirection\n// reuslts in TypeScript not widening types. Note, this only happens when the returned value of this\n// function is passed to another as an argument, which is common with the `registerComponent` API.\nexport function ResponsiveIconRadioGroup<_T extends string, T extends _T, U extends T>(\n options: ResponsiveIconRadioGroupOptions<T, U>,\n): ResponsiveIconRadioGroupDescriptor<ResponsiveIconRadioGroupValue<T>> {\n return { type: Types.ResponsiveIconRadioGroup, options }\n}\n\nexport type ResponsiveLengthValue = ResponsiveValue<Length>\n\ntype LengthOption =\n | { value: 'px'; label: 'Pixels'; icon: 'Px16' }\n | { value: '%'; label: 'Percentage'; icon: 'Percent16' }\n\ntype ResponsiveLengthOptions = Options<{\n label?: string\n options?: LengthOption[]\n defaultValue?: Length\n hidden?: boolean\n}>\n\ntype ResponsiveLengthDescriptor<_T = ResponsiveLengthValue> = {\n type: typeof Types.ResponsiveLength\n options: ResponsiveLengthOptions\n}\n\nexport function ResponsiveLength(\n options: ResponsiveLengthOptions = {},\n): ResponsiveLengthDescriptor {\n return { type: Types.ResponsiveLength, options }\n}\n\nexport type ResponsiveNumberValue = ResponsiveValue<number>\n\ntype ResponsiveNumberOptions = Options<{\n label?: string\n defaultValue?: number\n min?: number\n max?: number\n step?: number\n suffix?: string\n hidden?: boolean\n}>\n\ntype ResponsiveNumberDescriptor<_T = ResponsiveNumberValue> = {\n type: typeof Types.ResponsiveNumber\n options: ResponsiveNumberOptions\n}\n\nexport function ResponsiveNumber(\n options: ResponsiveNumberOptions = {},\n): ResponsiveNumberDescriptor {\n return { type: Types.ResponsiveNumber, options }\n}\n\nexport type ResponsiveOpacityValue = ResponsiveValue<number>\n\ntype ResponsiveOpacityOptions = Options<Record<string, never>>\n\ntype ResponsiveOpacityDescriptor<_T = ResponsiveOpacityValue> = {\n type: typeof Types.ResponsiveOpacity\n options: ResponsiveOpacityOptions\n}\n\nexport function ResponsiveOpacity(\n options: ResponsiveOpacityOptions = {},\n): ResponsiveOpacityDescriptor {\n return { type: Types.ResponsiveOpacity, options }\n}\n\nexport type ResponsiveSelectValue<T extends string> = ResponsiveValue<T>\n\ntype SelectLabelOrientation = 'vertical' | 'horizontal'\n\ntype SelectOption<T extends string> = { value: T; label: string }\n\ntype ResponsiveSelectOptions<T extends string, U extends T = T> = Options<{\n label?: string\n labelOrientation?: SelectLabelOrientation\n options: SelectOption<T>[]\n defaultValue?: U\n hidden?: boolean\n}>\n\ntype ResponsiveSelectDescriptor<T extends ResponsiveSelectValue<string>> = {\n type: typeof Types.ResponsiveSelect\n options: ResponsiveSelectOptions<ResponsiveValueType<T>>\n}\n\n// HACK(miguel): We have to use a layer of indirection with `_T` and `T` because otherwise the\n// values provided would undergo type widening. For some reason, the extra layer of indirection\n// reuslts in TypeScript not widening types. Note, this only happens when the returned value of this\n// function is passed to another as an argument, which is common with the `registerComponent` API.\nexport function ResponsiveSelect<_T extends string, T extends _T, U extends T>(\n options: ResponsiveSelectOptions<T, U>,\n): ResponsiveSelectDescriptor<ResponsiveSelectValue<T>> {\n return { type: Types.ResponsiveSelect, options }\n}\n\nexport type RichTextValue = IndexSignatureHack<Slate.ValueJSON>\n\ntype RichTextOptions = Options<{ preset?: RichTextValue }>\n\ntype RichTextDescriptor<_T extends Data = RichTextValue> = {\n type: typeof Types.RichText\n options: RichTextOptions\n}\n\nexport function RichText(options: RichTextOptions = {}): RichTextDescriptor {\n return { type: Types.RichText, options }\n}\n\ntype Shadow = {\n color?: Color | null\n blurRadius?: number\n spreadRadius?: number\n offsetX?: number\n offsetY?: number\n inset?: boolean\n}\n\ntype Shadows = { id: string; payload: Shadow }[]\n\nexport type ShadowsValue = ResponsiveValue<Shadows>\n\ntype ShadowsOptions = Options<Record<string, never>>\n\ntype ShadowsDescriptor<_T = ShadowsValue> = { type: typeof Types.Shadows; options: ShadowsOptions }\n\nexport function Shadows(options: ShadowsOptions = {}): ShadowsDescriptor {\n return { type: Types.Shadows, options }\n}\n\ntype SocialLinkType =\n | 'angellist'\n | 'codepen'\n | 'dribbble'\n | 'facebook'\n | 'github'\n | 'instagram'\n | 'linkedin'\n | 'medium'\n | 'pinterest'\n | 'reddit'\n | 'rss'\n | 'snapchat'\n | 'soundcloud'\n | 'spotify'\n | 'telegram'\n | 'tumblr'\n | 'twitch'\n | 'twitter'\n | 'vimeo'\n | 'whatsapp'\n | 'yelp'\n | 'youtube'\n\ntype SocialLink = { type: SocialLinkType; url: string }\n\ntype SocialLinksLink = { id: string; payload: SocialLink }\n\nexport type SocialLinksValue = { links: SocialLinksLink[]; openInNewTab: boolean }\n\ntype SocialLinksOptions = Options<{ preset?: SocialLinksValue }>\n\ntype SocialLinksDescriptor<_T = SocialLinksValue> = {\n type: typeof Types.SocialLinks\n options: SocialLinksOptions\n}\n\nexport function SocialLinks(options: SocialLinksOptions = {}): SocialLinksDescriptor {\n return { type: Types.SocialLinks, options }\n}\n\nexport type TableValue = string\n\ntype TableOptions = Options<{ preset?: TableValue }>\n\ntype TableDescriptor<_T = TableValue> = { type: typeof Types.Table; options: TableOptions }\n\nexport function Table(options: TableOptions = {}): TableDescriptor {\n return { type: Types.Table, options }\n}\n\ntype TableFormField = {\n id: string\n tableColumnId: string\n label?: string\n placeholder?: string\n defaultValue?: string | boolean | string[]\n required?: boolean\n hidden?: boolean\n type?: 'select' | 'radio'\n hideLabel?: boolean\n autofill?: boolean\n}\n\ntype Grid = { count: number; spans: number[][] }\n\nexport type TableFormFieldsValue = { fields: TableFormField[]; grid: ResponsiveValue<Grid> }\n\ntype TableFormFieldsOptions = Options<{ preset?: TableFormFieldsValue }>\n\ntype TableFormFieldsDescriptor<_T = TableFormFieldsValue> = {\n type: typeof Types.TableFormFields\n options: TableFormFieldsOptions\n}\n\nexport function TableFormFields(options: TableFormFieldsOptions = {}): TableFormFieldsDescriptor {\n return { type: Types.TableFormFields, options }\n}\n\nexport type TextAreaValue = string\n\ntype TextAreaOptions = Options<{ preset?: TextAreaValue; label?: string; rows?: number }>\n\ntype TextAreaDescriptor<_T = TextAreaValue> = {\n type: typeof Types.TextArea\n options: TextAreaOptions\n}\n\nexport function TextArea(options: TextAreaOptions = {}): TextAreaDescriptor {\n return { type: Types.TextArea, options }\n}\n\nexport type TextInputValue = string\n\ntype TextInputOptions = Options<{ label?: string; placeholder?: string; hidden?: boolean }>\n\ntype TextInputDescriptor<_T = TextInputValue> = {\n type: typeof Types.TextInput\n options: TextInputOptions\n}\n\nexport function TextInput(options: TextInputOptions = {}): TextInputDescriptor {\n return { type: Types.TextInput, options }\n}\n\nexport type TextStyleValue = ResponsiveValue<TextStyle>\n\ntype TextStyleOptions = Options<{ preset?: TextStyleValue; label?: string; hidden?: boolean }>\n\ntype TextStyleDescriptor<_T = TextStyleValue> = {\n type: typeof Types.TextStyle\n options: TextStyleOptions\n}\n\nexport function TextStyle(options: TextStyleOptions = {}): TextStyleDescriptor {\n return { type: Types.TextStyle, options }\n}\n\ntype Video = {\n url?: string\n muted?: boolean\n playing?: boolean\n loop?: boolean\n controls?: boolean\n}\n\nexport type VideoValue = Video\n\ntype VideoOptions = Options<{ preset?: VideoValue }>\n\ntype VideoDescriptor<_T = VideoValue> = { type: typeof Types.Video; options: VideoOptions }\n\nexport function Video(options: VideoOptions = {}): VideoDescriptor {\n return { type: Types.Video, options }\n}\n\nexport type WidthValue = ResponsiveValue<Length>\n\ntype WidthOptions = Options<{ preset?: WidthValue; defaultValue?: Length }>\n\ntype WidthDescriptor<_T = WidthValue> = { type: typeof Types.Width; options: WidthOptions }\n\nexport function Width(options: WidthOptions = {}): WidthDescriptor {\n return { type: Types.Width, options }\n}\n\nexport type Descriptor<T extends Data = Data> =\n | BackgroundsDescriptor<T>\n | BorderDescriptor<T>\n | BorderRadiusDescriptor<T>\n | CheckboxDescriptor<T>\n | DateDescriptor<T>\n | ElementIDDescriptor<T>\n | FontDescriptor<T>\n | GapXDescriptor<T>\n | GapYDescriptor<T>\n | GridDescriptor<T>\n | ImageDescriptor<T>\n | ImagesDescriptor<T>\n | LinkDescriptor<T>\n | MarginDescriptor<T>\n | NavigationLinksDescriptor<T>\n | NumberDescriptor<T>\n | PaddingDescriptor<T>\n | ResponsiveColorDescriptor<T>\n | ResponsiveIconRadioGroupDescriptor<\n T extends ResponsiveIconRadioGroupValue<string> ? T : ResponsiveIconRadioGroupValue<string>\n >\n | ResponsiveLengthDescriptor<T>\n | ResponsiveNumberDescriptor<T>\n | ResponsiveOpacityDescriptor<T>\n | ResponsiveSelectDescriptor<\n T extends ResponsiveSelectValue<string> ? T : ResponsiveSelectValue<string>\n >\n | RichTextDescriptor<T>\n | ShadowsDescriptor<T>\n | SocialLinksDescriptor<T>\n | TableDescriptor<T>\n | TableFormFieldsDescriptor<T>\n | TextAreaDescriptor<T>\n | TextInputDescriptor<T>\n | TextStyleDescriptor<T>\n | VideoDescriptor<T>\n | WidthDescriptor<T>\n\nexport type DescriptorValueType<T extends Descriptor> = T extends Descriptor<infer U> ? U : never\n"],"names":[],"mappings":"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"}
1
+ {"version":3,"file":"prop-controllers.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -4,6 +4,8 @@ var react = require("./react.cjs2.js");
4
4
  var actions = require("./actions.cjs.js");
5
5
  var boxModels = require("./box-models.cjs.js");
6
6
  require("react");
7
+ require("./descriptors.cjs.js");
8
+ require("react/jsx-runtime");
7
9
  function is$1(x, y) {
8
10
  if (x === y)
9
11
  return x !== 0 || y !== 0 || 1 / x === 1 / y;
@@ -4131,7 +4133,8 @@ const reducer = react.combineReducers({
4131
4133
  reactComponents: react.reducer,
4132
4134
  boxModels: boxModels.reducer,
4133
4135
  componentsMeta: react.reducer$1,
4134
- propControllers: react.reducer$2
4136
+ propControllers: react.reducer$2,
4137
+ isInBuilder: (state = true, _action) => state
4135
4138
  });
4136
4139
  function getBoxModelsStateSlice(state) {
4137
4140
  return state.boxModels;
@@ -4258,9 +4261,7 @@ function measureBoxModelsMiddleware() {
4258
4261
  function messageChannelMiddleware() {
4259
4262
  return ({ dispatch, getState }) => (next) => {
4260
4263
  const messageChannel = new MessageChannel();
4261
- window.parent.postMessage(messageChannel.port2, "*", [
4262
- messageChannel.port2
4263
- ]);
4264
+ window.parent.postMessage(messageChannel.port2, "*", [messageChannel.port2]);
4264
4265
  messageChannel.port1.onmessage = (event) => dispatch(event.data);
4265
4266
  const state = getState();
4266
4267
  const registeredComponentsMeta = getComponentsMeta(state);