@makeswift/runtime 0.1.9 → 0.1.11

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 (146) hide show
  1. package/dist/Box.cjs.js +2 -3
  2. package/dist/Box.cjs.js.map +1 -1
  3. package/dist/Box.es.js +2 -3
  4. package/dist/Box.es.js.map +1 -1
  5. package/dist/Button.cjs.js +4 -3
  6. package/dist/Button.cjs.js.map +1 -1
  7. package/dist/Button.es.js +4 -3
  8. package/dist/Button.es.js.map +1 -1
  9. package/dist/Carousel.cjs.js +4 -3
  10. package/dist/Carousel.cjs.js.map +1 -1
  11. package/dist/Carousel.es.js +4 -3
  12. package/dist/Carousel.es.js.map +1 -1
  13. package/dist/Countdown.cjs.js +4 -3
  14. package/dist/Countdown.cjs.js.map +1 -1
  15. package/dist/Countdown.es.js +4 -3
  16. package/dist/Countdown.es.js.map +1 -1
  17. package/dist/Divider.cjs.js +4 -3
  18. package/dist/Divider.cjs.js.map +1 -1
  19. package/dist/Divider.es.js +4 -3
  20. package/dist/Divider.es.js.map +1 -1
  21. package/dist/Embed.cjs.js +4 -3
  22. package/dist/Embed.cjs.js.map +1 -1
  23. package/dist/Embed.es.js +4 -3
  24. package/dist/Embed.es.js.map +1 -1
  25. package/dist/Form.cjs.js +3 -4
  26. package/dist/Form.cjs.js.map +1 -1
  27. package/dist/Form.es.js +3 -4
  28. package/dist/Form.es.js.map +1 -1
  29. package/dist/Image.cjs2.js +4 -3
  30. package/dist/Image.cjs2.js.map +1 -1
  31. package/dist/Image.es2.js +4 -3
  32. package/dist/Image.es2.js.map +1 -1
  33. package/dist/Navigation.cjs.js +4 -3
  34. package/dist/Navigation.cjs.js.map +1 -1
  35. package/dist/Navigation.es.js +4 -3
  36. package/dist/Navigation.es.js.map +1 -1
  37. package/dist/Root.cjs.js +4 -3
  38. package/dist/Root.cjs.js.map +1 -1
  39. package/dist/Root.es.js +4 -3
  40. package/dist/Root.es.js.map +1 -1
  41. package/dist/SocialLinks.cjs.js +4 -3
  42. package/dist/SocialLinks.cjs.js.map +1 -1
  43. package/dist/SocialLinks.es.js +4 -3
  44. package/dist/SocialLinks.es.js.map +1 -1
  45. package/dist/Text.cjs.js +2 -3
  46. package/dist/Text.cjs.js.map +1 -1
  47. package/dist/Text.es.js +2 -3
  48. package/dist/Text.es.js.map +1 -1
  49. package/dist/Video.cjs.js +4 -3
  50. package/dist/Video.cjs.js.map +1 -1
  51. package/dist/Video.es.js +4 -3
  52. package/dist/Video.es.js.map +1 -1
  53. package/dist/actions.es.js +1 -1
  54. package/dist/builder.cjs.js +0 -2
  55. package/dist/builder.cjs.js.map +1 -1
  56. package/dist/builder.es.js +0 -2
  57. package/dist/builder.es.js.map +1 -1
  58. package/dist/components.cjs.js +2 -3
  59. package/dist/components.cjs.js.map +1 -1
  60. package/dist/components.es.js +2 -3
  61. package/dist/components.es.js.map +1 -1
  62. package/dist/control-serialization.cjs.js +37 -39
  63. package/dist/control-serialization.cjs.js.map +1 -1
  64. package/dist/control-serialization.es.js +1 -3
  65. package/dist/control-serialization.es.js.map +1 -1
  66. package/dist/controls.cjs.js +9 -5
  67. package/dist/controls.cjs.js.map +1 -1
  68. package/dist/controls.es.js +2 -2
  69. package/dist/cssMediaRules.cjs.js +1 -13
  70. package/dist/cssMediaRules.cjs.js.map +1 -1
  71. package/dist/cssMediaRules.es.js +1 -13
  72. package/dist/cssMediaRules.es.js.map +1 -1
  73. package/dist/image.cjs.js +269 -1
  74. package/dist/image.cjs.js.map +1 -1
  75. package/dist/image.es.js +230 -1
  76. package/dist/image.es.js.map +1 -1
  77. package/dist/index.cjs.js +382 -187
  78. package/dist/index.cjs.js.map +1 -1
  79. package/dist/index.es.js +212 -18
  80. package/dist/index.es.js.map +1 -1
  81. package/dist/index.es2.js +1 -1
  82. package/dist/index.es3.js +1 -1
  83. package/dist/main.cjs.js +2 -3
  84. package/dist/main.cjs.js.map +1 -1
  85. package/dist/main.es.js +2 -3
  86. package/dist/main.es.js.map +1 -1
  87. package/dist/next.cjs.js +4 -3
  88. package/dist/next.cjs.js.map +1 -1
  89. package/dist/next.es.js +5 -4
  90. package/dist/next.es.js.map +1 -1
  91. package/dist/prop-controllers.cjs.js +5 -6
  92. package/dist/prop-controllers.cjs.js.map +1 -1
  93. package/dist/prop-controllers.es.js +2 -3
  94. package/dist/prop-controllers.es.js.map +1 -1
  95. package/dist/react-builder-preview.cjs.js +21 -78
  96. package/dist/react-builder-preview.cjs.js.map +1 -1
  97. package/dist/react-builder-preview.es.js +28 -85
  98. package/dist/react-builder-preview.es.js.map +1 -1
  99. package/dist/react-page.cjs.js +110 -45
  100. package/dist/react-page.cjs.js.map +1 -1
  101. package/dist/react-page.es.js +77 -17
  102. package/dist/react-page.es.js.map +1 -1
  103. package/dist/react.cjs.js +4 -3
  104. package/dist/react.cjs.js.map +1 -1
  105. package/dist/react.es.js +4 -3
  106. package/dist/react.es.js.map +1 -1
  107. package/dist/{instances.cjs.js → slot.cjs.js} +28 -4
  108. package/dist/slot.cjs.js.map +1 -0
  109. package/dist/{instances.es.js → slot.es.js} +23 -3
  110. package/dist/slot.es.js.map +1 -0
  111. package/dist/types/box-model.d.ts +1 -1
  112. package/dist/types/box-model.d.ts.map +1 -1
  113. package/dist/types/controls/index.d.ts +1 -0
  114. package/dist/types/controls/index.d.ts.map +1 -1
  115. package/dist/types/controls/slot.d.ts +42 -0
  116. package/dist/types/controls/slot.d.ts.map +1 -0
  117. package/dist/types/prop-controllers/descriptors.d.ts +4 -3
  118. package/dist/types/prop-controllers/descriptors.d.ts.map +1 -1
  119. package/dist/types/prop-controllers/instances.d.ts +3 -2
  120. package/dist/types/prop-controllers/instances.d.ts.map +1 -1
  121. package/dist/types/prop-controllers/introspection.d.ts.map +1 -1
  122. package/dist/types/runtimes/react/controls/slot.d.ts +30 -0
  123. package/dist/types/runtimes/react/controls/slot.d.ts.map +1 -0
  124. package/dist/types/runtimes/react/controls/style.d.ts.map +1 -1
  125. package/dist/types/runtimes/react/controls.d.ts.map +1 -1
  126. package/dist/types/runtimes/react/index.d.ts +4 -0
  127. package/dist/types/runtimes/react/index.d.ts.map +1 -1
  128. package/dist/types/runtimes/react/use-style.d.ts +3 -0
  129. package/dist/types/runtimes/react/use-style.d.ts.map +1 -0
  130. package/dist/types/state/modules/prop-controller-handles.d.ts +1 -0
  131. package/dist/types/state/modules/prop-controller-handles.d.ts.map +1 -1
  132. package/dist/types/state/react-builder-preview.d.ts.map +1 -1
  133. package/dist/types/state/react-page.d.ts +3 -0
  134. package/dist/types/state/react-page.d.ts.map +1 -1
  135. package/dist/useBoxShadow.es.js +1 -1
  136. package/package.json +2 -2
  137. package/dist/descriptors.cjs.js +0 -232
  138. package/dist/descriptors.cjs.js.map +0 -1
  139. package/dist/descriptors.es.js +0 -196
  140. package/dist/descriptors.es.js.map +0 -1
  141. package/dist/instances.cjs.js.map +0 -1
  142. package/dist/instances.es.js.map +0 -1
  143. package/dist/style.cjs.js +0 -41
  144. package/dist/style.cjs.js.map +0 -1
  145. package/dist/style.es.js +0 -38
  146. package/dist/style.es.js.map +0 -1
package/dist/style.cjs.js DELETED
@@ -1,41 +0,0 @@
1
- "use strict";
2
- const StyleControlType = "makeswift::controls::style";
3
- const StyleControlProperty = {
4
- Width: "makeswift::controls::style::property::width",
5
- Margin: "makeswift::controls::style::property::margin",
6
- Padding: "makeswift::controls::style::property::padding",
7
- Border: "makeswift::controls::style::property::border",
8
- BorderRadius: "makeswift::controls::style::property::border-radius",
9
- TextStyle: "makeswift::controls::style::property::text-style"
10
- };
11
- const StyleControlDefaultProperties = [
12
- StyleControlProperty.Width,
13
- StyleControlProperty.Margin
14
- ];
15
- const AllStyleControlProperties = [
16
- StyleControlProperty.Width,
17
- StyleControlProperty.Margin,
18
- StyleControlProperty.Padding,
19
- StyleControlProperty.Border,
20
- StyleControlProperty.BorderRadius,
21
- StyleControlProperty.TextStyle
22
- ];
23
- function Style(params) {
24
- var _a;
25
- return {
26
- type: StyleControlType,
27
- config: { properties: (_a = params == null ? void 0 : params.properties) != null ? _a : StyleControlDefaultProperties }
28
- };
29
- }
30
- Style.Default = StyleControlDefaultProperties;
31
- Style.All = AllStyleControlProperties;
32
- Style.Width = StyleControlProperty.Width;
33
- Style.Margin = StyleControlProperty.Margin;
34
- Style.Padding = StyleControlProperty.Padding;
35
- Style.Border = StyleControlProperty.Border;
36
- Style.BorderRadius = StyleControlProperty.BorderRadius;
37
- Style.TextStyle = StyleControlProperty.TextStyle;
38
- exports.Style = Style;
39
- exports.StyleControlProperty = StyleControlProperty;
40
- exports.StyleControlType = StyleControlType;
41
- //# sourceMappingURL=style.cjs.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"style.cjs.js","sources":["../src/controls/style.ts"],"sourcesContent":["import { ColorData, ResponsiveValue } from './types'\n\n/**\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/length\n *\n * @todos\n * - Add additional units\n * - Rename `value` field to `amount` or a more descriptive name representative of the \"distance\"\n * represented by a CSS length\n */\nexport type LengthData = { value: number; unit: 'px' }\n\n/** @see https://developer.mozilla.org/en-US/docs/Web/CSS/percentage */\nexport type PercentageData = { value: number; unit: '%' }\n\n/** @see https://developer.mozilla.org/en-US/docs/Web/CSS/length-percentage */\nexport type LengthPercentageData = LengthData | PercentageData\n\n/** @see https://developer.mozilla.org/en-US/docs/Web/CSS/width */\nexport type WidthPropertyData = LengthPercentageData\n\n/** @see https://developer.mozilla.org/en-US/docs/Web/CSS/margin#constituent_properties */\nexport type MarginLonghandPropertyData = LengthData | 'auto'\n\n/**\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/margin\n *\n * @todos\n * - Remove `null` from possible values\n * - Remove `undefined` from possible values and make fields optional\n */\nexport type MarginPropertyData = {\n marginTop: MarginLonghandPropertyData | null | undefined\n marginRight: MarginLonghandPropertyData | null | undefined\n marginBottom: MarginLonghandPropertyData | null | undefined\n marginLeft: MarginLonghandPropertyData | null | undefined\n}\n\n/** @see https://developer.mozilla.org/en-US/docs/Web/CSS/padding#constituent_properties */\nexport type PaddingLonghandPropertyData = LengthData\n\n/**\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/padding\n *\n * @todos\n * - Remove `null` from possible values\n * - Remove `undefined` from possible values and make fields optional\n */\nexport type PaddingPropertyData = {\n paddingTop: PaddingLonghandPropertyData | null | undefined\n paddingRight: PaddingLonghandPropertyData | null | undefined\n paddingBottom: PaddingLonghandPropertyData | null | undefined\n paddingLeft: PaddingLonghandPropertyData | null | undefined\n}\n\n/**\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-style\n */\ntype BorderStyle = 'dotted' | 'dashed' | 'solid'\n\n/**\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-top#constituent_properties\n *\n * @todos\n * - Change `width` to be a `Length`\n * - Remove `null` from possible values\n * - Remove `undefined` from possible values and make fields optional\n */\nexport type BorderSideShorthandPropertyData = {\n width: number | null | undefined\n style: BorderStyle\n color?: ColorData | null\n}\n\n/**\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border\n *\n * @todos\n * - Remove `null` from possible values\n * - Remove `undefined` from possible values and make fields optional\n */\nexport type BorderPropertyData = {\n borderTop: BorderSideShorthandPropertyData | null | undefined\n borderRight: BorderSideShorthandPropertyData | null | undefined\n borderBottom: BorderSideShorthandPropertyData | null | undefined\n borderLeft: BorderSideShorthandPropertyData | null | undefined\n}\n\n/** @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-radius#constituent_properties */\nexport type BorderRadiusLonghandPropertyData = LengthPercentageData\n\n/**\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-radius\n *\n * @todos\n * - Remove `null` from possible values of longhand properties\n * - Remove `undefined` from possible values and make fields optional\n */\nexport type BorderRadiusPropertyData = {\n borderTopLeftRadius: LengthPercentageData | null | undefined\n borderTopRightRadius: LengthPercentageData | null | undefined\n borderBottomRightRadius: LengthPercentageData | null | undefined\n borderBottomLeftRadius: LengthPercentageData | null | undefined\n}\n\n/**\n * https://developer.mozilla.org/en-US/docs/Web/CSS/font-family\n *\n * @todos\n * - Remove `null` from possible values of longhand properties\n * - Remove `undefined` from possible values and make fields optional\n */\nexport type FontFamilyPropertyData = string | null | undefined\n\n/**\n * https://developer.mozilla.org/en-US/docs/Web/CSS/letter-spacing\n *\n * @todos\n * - Remove `null` from possible values of longhand properties\n * - Remove `undefined` from possible values and make fields optional\n */\nexport type LetterSpacingPropertyData = number | null | undefined\n\n/**\n * https://developer.mozilla.org/en-US/docs/Web/CSS/font-size\n *\n * @todos\n * - Remove `null` from possible values of longhand properties\n * - Remove `undefined` from possible values and make fields optional\n */\nexport type FontSizePropertyData =\n | {\n value: number\n unit: 'px'\n }\n | null\n | undefined\n\n/**\n * https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight\n *\n * @todos\n * - Remove `null` from possible values of longhand properties\n * - Remove `undefined` from possible values and make fields optional\n */\nexport type FontWeightPropertyData = number | null | undefined\n\n/**\n * https://developer.mozilla.org/en-US/docs/Web/CSS/text-transform\n *\n * @todos\n * - Match the type with specification\n */\nexport type TextTransformPropertyData = 'uppercase'[]\n\n/**\n * https://developer.mozilla.org/en-US/docs/Web/CSS/font-style\n *\n * @todos\n * - Match the type with specification\n */\nexport type FontStylePropertyData = 'italic'[]\n\n/**\n * @todos\n * - Remove `null` from possible values of longhand properties\n * - Remove `undefined` from possible values and make fields optional\n */\nexport type TextStylePropertyData = {\n fontFamily?: FontFamilyPropertyData | null | undefined\n letterSpacing: LetterSpacingPropertyData | null | undefined\n fontSize: FontSizePropertyData | null | undefined\n fontWeight: FontWeightPropertyData | null | undefined\n textTransform: TextTransformPropertyData\n fontStyle: FontStylePropertyData\n}\n\nexport type StyleControlData = {\n width?: ResponsiveValue<WidthPropertyData>\n margin?: ResponsiveValue<MarginPropertyData>\n padding?: ResponsiveValue<PaddingPropertyData>\n border?: ResponsiveValue<BorderPropertyData>\n borderRadius?: ResponsiveValue<BorderRadiusPropertyData>\n textStyle?: ResponsiveValue<TextStylePropertyData>\n}\n\nexport const StyleControlType = 'makeswift::controls::style'\n\nexport const StyleControlProperty = {\n Width: 'makeswift::controls::style::property::width',\n Margin: 'makeswift::controls::style::property::margin',\n Padding: 'makeswift::controls::style::property::padding',\n Border: 'makeswift::controls::style::property::border',\n BorderRadius: 'makeswift::controls::style::property::border-radius',\n TextStyle: 'makeswift::controls::style::property::text-style',\n} as const\n\nexport type StyleControlProperty = typeof StyleControlProperty[keyof typeof StyleControlProperty]\n\ntype StyleControlParams = { properties?: StyleControlProperty[] }\n\nexport type StyleControlConfig = { properties: StyleControlProperty[] }\n\nconst StyleControlDefaultProperties: StyleControlProperty[] = [\n StyleControlProperty.Width,\n StyleControlProperty.Margin,\n]\n\nconst AllStyleControlProperties: StyleControlProperty[] = [\n StyleControlProperty.Width,\n StyleControlProperty.Margin,\n StyleControlProperty.Padding,\n StyleControlProperty.Border,\n StyleControlProperty.BorderRadius,\n StyleControlProperty.TextStyle,\n]\n\nexport type StyleControlDefinition = {\n type: typeof StyleControlType\n config: StyleControlConfig\n}\n\n/**\n * @todos\n * - Add support for custom panel labels.\n * - Add support for default values. Internally, default values must be represented with the same\n * format as the underlying data so that controls can show these values.\n */\nexport function Style(params?: StyleControlParams): StyleControlDefinition {\n return {\n type: StyleControlType,\n config: { properties: params?.properties ?? StyleControlDefaultProperties },\n }\n}\n\nStyle.Default = StyleControlDefaultProperties\nStyle.All = AllStyleControlProperties\n\nStyle.Width = StyleControlProperty.Width\nStyle.Margin = StyleControlProperty.Margin\nStyle.Padding = StyleControlProperty.Padding\nStyle.Border = StyleControlProperty.Border\nStyle.BorderRadius = StyleControlProperty.BorderRadius\nStyle.TextStyle = StyleControlProperty.TextStyle\n"],"names":[],"mappings":";AA0LO,MAAM,mBAAmB;AAEzB,MAAM,uBAAuB;AAAA,EAClC,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,cAAc;AAAA,EACd,WAAW;AACb;AAQA,MAAM,gCAAwD;AAAA,EAC5D,qBAAqB;AAAA,EACrB,qBAAqB;AACvB;AAEA,MAAM,4BAAoD;AAAA,EACxD,qBAAqB;AAAA,EACrB,qBAAqB;AAAA,EACrB,qBAAqB;AAAA,EACrB,qBAAqB;AAAA,EACrB,qBAAqB;AAAA,EACrB,qBAAqB;AACvB;AAaO,eAAe,QAAqD;;AAClE,SAAA;AAAA,IACL,MAAM;AAAA,IACN,QAAQ,EAAE,YAAY,uCAAQ,eAAR,YAAsB,8BAA8B;AAAA,EAAA;AAE9E;AAEA,MAAM,UAAU;AAChB,MAAM,MAAM;AAEZ,MAAM,QAAQ,qBAAqB;AACnC,MAAM,SAAS,qBAAqB;AACpC,MAAM,UAAU,qBAAqB;AACrC,MAAM,SAAS,qBAAqB;AACpC,MAAM,eAAe,qBAAqB;AAC1C,MAAM,YAAY,qBAAqB;;;;"}
package/dist/style.es.js DELETED
@@ -1,38 +0,0 @@
1
- const StyleControlType = "makeswift::controls::style";
2
- const StyleControlProperty = {
3
- Width: "makeswift::controls::style::property::width",
4
- Margin: "makeswift::controls::style::property::margin",
5
- Padding: "makeswift::controls::style::property::padding",
6
- Border: "makeswift::controls::style::property::border",
7
- BorderRadius: "makeswift::controls::style::property::border-radius",
8
- TextStyle: "makeswift::controls::style::property::text-style"
9
- };
10
- const StyleControlDefaultProperties = [
11
- StyleControlProperty.Width,
12
- StyleControlProperty.Margin
13
- ];
14
- const AllStyleControlProperties = [
15
- StyleControlProperty.Width,
16
- StyleControlProperty.Margin,
17
- StyleControlProperty.Padding,
18
- StyleControlProperty.Border,
19
- StyleControlProperty.BorderRadius,
20
- StyleControlProperty.TextStyle
21
- ];
22
- function Style(params) {
23
- var _a;
24
- return {
25
- type: StyleControlType,
26
- config: { properties: (_a = params == null ? void 0 : params.properties) != null ? _a : StyleControlDefaultProperties }
27
- };
28
- }
29
- Style.Default = StyleControlDefaultProperties;
30
- Style.All = AllStyleControlProperties;
31
- Style.Width = StyleControlProperty.Width;
32
- Style.Margin = StyleControlProperty.Margin;
33
- Style.Padding = StyleControlProperty.Padding;
34
- Style.Border = StyleControlProperty.Border;
35
- Style.BorderRadius = StyleControlProperty.BorderRadius;
36
- Style.TextStyle = StyleControlProperty.TextStyle;
37
- export { StyleControlType as S, StyleControlProperty as a, Style as b };
38
- //# sourceMappingURL=style.es.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"style.es.js","sources":["../src/controls/style.ts"],"sourcesContent":["import { ColorData, ResponsiveValue } from './types'\n\n/**\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/length\n *\n * @todos\n * - Add additional units\n * - Rename `value` field to `amount` or a more descriptive name representative of the \"distance\"\n * represented by a CSS length\n */\nexport type LengthData = { value: number; unit: 'px' }\n\n/** @see https://developer.mozilla.org/en-US/docs/Web/CSS/percentage */\nexport type PercentageData = { value: number; unit: '%' }\n\n/** @see https://developer.mozilla.org/en-US/docs/Web/CSS/length-percentage */\nexport type LengthPercentageData = LengthData | PercentageData\n\n/** @see https://developer.mozilla.org/en-US/docs/Web/CSS/width */\nexport type WidthPropertyData = LengthPercentageData\n\n/** @see https://developer.mozilla.org/en-US/docs/Web/CSS/margin#constituent_properties */\nexport type MarginLonghandPropertyData = LengthData | 'auto'\n\n/**\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/margin\n *\n * @todos\n * - Remove `null` from possible values\n * - Remove `undefined` from possible values and make fields optional\n */\nexport type MarginPropertyData = {\n marginTop: MarginLonghandPropertyData | null | undefined\n marginRight: MarginLonghandPropertyData | null | undefined\n marginBottom: MarginLonghandPropertyData | null | undefined\n marginLeft: MarginLonghandPropertyData | null | undefined\n}\n\n/** @see https://developer.mozilla.org/en-US/docs/Web/CSS/padding#constituent_properties */\nexport type PaddingLonghandPropertyData = LengthData\n\n/**\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/padding\n *\n * @todos\n * - Remove `null` from possible values\n * - Remove `undefined` from possible values and make fields optional\n */\nexport type PaddingPropertyData = {\n paddingTop: PaddingLonghandPropertyData | null | undefined\n paddingRight: PaddingLonghandPropertyData | null | undefined\n paddingBottom: PaddingLonghandPropertyData | null | undefined\n paddingLeft: PaddingLonghandPropertyData | null | undefined\n}\n\n/**\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-style\n */\ntype BorderStyle = 'dotted' | 'dashed' | 'solid'\n\n/**\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-top#constituent_properties\n *\n * @todos\n * - Change `width` to be a `Length`\n * - Remove `null` from possible values\n * - Remove `undefined` from possible values and make fields optional\n */\nexport type BorderSideShorthandPropertyData = {\n width: number | null | undefined\n style: BorderStyle\n color?: ColorData | null\n}\n\n/**\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border\n *\n * @todos\n * - Remove `null` from possible values\n * - Remove `undefined` from possible values and make fields optional\n */\nexport type BorderPropertyData = {\n borderTop: BorderSideShorthandPropertyData | null | undefined\n borderRight: BorderSideShorthandPropertyData | null | undefined\n borderBottom: BorderSideShorthandPropertyData | null | undefined\n borderLeft: BorderSideShorthandPropertyData | null | undefined\n}\n\n/** @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-radius#constituent_properties */\nexport type BorderRadiusLonghandPropertyData = LengthPercentageData\n\n/**\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-radius\n *\n * @todos\n * - Remove `null` from possible values of longhand properties\n * - Remove `undefined` from possible values and make fields optional\n */\nexport type BorderRadiusPropertyData = {\n borderTopLeftRadius: LengthPercentageData | null | undefined\n borderTopRightRadius: LengthPercentageData | null | undefined\n borderBottomRightRadius: LengthPercentageData | null | undefined\n borderBottomLeftRadius: LengthPercentageData | null | undefined\n}\n\n/**\n * https://developer.mozilla.org/en-US/docs/Web/CSS/font-family\n *\n * @todos\n * - Remove `null` from possible values of longhand properties\n * - Remove `undefined` from possible values and make fields optional\n */\nexport type FontFamilyPropertyData = string | null | undefined\n\n/**\n * https://developer.mozilla.org/en-US/docs/Web/CSS/letter-spacing\n *\n * @todos\n * - Remove `null` from possible values of longhand properties\n * - Remove `undefined` from possible values and make fields optional\n */\nexport type LetterSpacingPropertyData = number | null | undefined\n\n/**\n * https://developer.mozilla.org/en-US/docs/Web/CSS/font-size\n *\n * @todos\n * - Remove `null` from possible values of longhand properties\n * - Remove `undefined` from possible values and make fields optional\n */\nexport type FontSizePropertyData =\n | {\n value: number\n unit: 'px'\n }\n | null\n | undefined\n\n/**\n * https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight\n *\n * @todos\n * - Remove `null` from possible values of longhand properties\n * - Remove `undefined` from possible values and make fields optional\n */\nexport type FontWeightPropertyData = number | null | undefined\n\n/**\n * https://developer.mozilla.org/en-US/docs/Web/CSS/text-transform\n *\n * @todos\n * - Match the type with specification\n */\nexport type TextTransformPropertyData = 'uppercase'[]\n\n/**\n * https://developer.mozilla.org/en-US/docs/Web/CSS/font-style\n *\n * @todos\n * - Match the type with specification\n */\nexport type FontStylePropertyData = 'italic'[]\n\n/**\n * @todos\n * - Remove `null` from possible values of longhand properties\n * - Remove `undefined` from possible values and make fields optional\n */\nexport type TextStylePropertyData = {\n fontFamily?: FontFamilyPropertyData | null | undefined\n letterSpacing: LetterSpacingPropertyData | null | undefined\n fontSize: FontSizePropertyData | null | undefined\n fontWeight: FontWeightPropertyData | null | undefined\n textTransform: TextTransformPropertyData\n fontStyle: FontStylePropertyData\n}\n\nexport type StyleControlData = {\n width?: ResponsiveValue<WidthPropertyData>\n margin?: ResponsiveValue<MarginPropertyData>\n padding?: ResponsiveValue<PaddingPropertyData>\n border?: ResponsiveValue<BorderPropertyData>\n borderRadius?: ResponsiveValue<BorderRadiusPropertyData>\n textStyle?: ResponsiveValue<TextStylePropertyData>\n}\n\nexport const StyleControlType = 'makeswift::controls::style'\n\nexport const StyleControlProperty = {\n Width: 'makeswift::controls::style::property::width',\n Margin: 'makeswift::controls::style::property::margin',\n Padding: 'makeswift::controls::style::property::padding',\n Border: 'makeswift::controls::style::property::border',\n BorderRadius: 'makeswift::controls::style::property::border-radius',\n TextStyle: 'makeswift::controls::style::property::text-style',\n} as const\n\nexport type StyleControlProperty = typeof StyleControlProperty[keyof typeof StyleControlProperty]\n\ntype StyleControlParams = { properties?: StyleControlProperty[] }\n\nexport type StyleControlConfig = { properties: StyleControlProperty[] }\n\nconst StyleControlDefaultProperties: StyleControlProperty[] = [\n StyleControlProperty.Width,\n StyleControlProperty.Margin,\n]\n\nconst AllStyleControlProperties: StyleControlProperty[] = [\n StyleControlProperty.Width,\n StyleControlProperty.Margin,\n StyleControlProperty.Padding,\n StyleControlProperty.Border,\n StyleControlProperty.BorderRadius,\n StyleControlProperty.TextStyle,\n]\n\nexport type StyleControlDefinition = {\n type: typeof StyleControlType\n config: StyleControlConfig\n}\n\n/**\n * @todos\n * - Add support for custom panel labels.\n * - Add support for default values. Internally, default values must be represented with the same\n * format as the underlying data so that controls can show these values.\n */\nexport function Style(params?: StyleControlParams): StyleControlDefinition {\n return {\n type: StyleControlType,\n config: { properties: params?.properties ?? StyleControlDefaultProperties },\n }\n}\n\nStyle.Default = StyleControlDefaultProperties\nStyle.All = AllStyleControlProperties\n\nStyle.Width = StyleControlProperty.Width\nStyle.Margin = StyleControlProperty.Margin\nStyle.Padding = StyleControlProperty.Padding\nStyle.Border = StyleControlProperty.Border\nStyle.BorderRadius = StyleControlProperty.BorderRadius\nStyle.TextStyle = StyleControlProperty.TextStyle\n"],"names":[],"mappings":"AA0LO,MAAM,mBAAmB;AAEzB,MAAM,uBAAuB;AAAA,EAClC,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,cAAc;AAAA,EACd,WAAW;AACb;AAQA,MAAM,gCAAwD;AAAA,EAC5D,qBAAqB;AAAA,EACrB,qBAAqB;AACvB;AAEA,MAAM,4BAAoD;AAAA,EACxD,qBAAqB;AAAA,EACrB,qBAAqB;AAAA,EACrB,qBAAqB;AAAA,EACrB,qBAAqB;AAAA,EACrB,qBAAqB;AAAA,EACrB,qBAAqB;AACvB;AAaO,eAAe,QAAqD;AA1CpE;AA2CE,SAAA;AAAA,IACL,MAAM;AAAA,IACN,QAAQ,EAAE,YAAY,uCAAQ,eAAR,YAAsB,8BAA8B;AAAA,EAAA;AAE9E;AAEA,MAAM,UAAU;AAChB,MAAM,MAAM;AAEZ,MAAM,QAAQ,qBAAqB;AACnC,MAAM,SAAS,qBAAqB;AACpC,MAAM,UAAU,qBAAqB;AACrC,MAAM,SAAS,qBAAqB;AACpC,MAAM,eAAe,qBAAqB;AAC1C,MAAM,YAAY,qBAAqB;;"}