@makeswift/runtime 0.0.0-e76fc43 → 0.0.0-e77889f

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 (117) hide show
  1. package/api.js +1 -0
  2. package/dist/actions.cjs.js +16 -1
  3. package/dist/actions.cjs.js.map +1 -1
  4. package/dist/actions.es.js +14 -2
  5. package/dist/actions.es.js.map +1 -1
  6. package/dist/api.cjs.js +6 -0
  7. package/dist/api.cjs.js.map +1 -0
  8. package/dist/api.es.js +2 -0
  9. package/dist/api.es.js.map +1 -0
  10. package/dist/components.cjs.js +37 -21632
  11. package/dist/components.cjs.js.map +1 -1
  12. package/dist/components.es.js +9 -21580
  13. package/dist/components.es.js.map +1 -1
  14. package/dist/constants.cjs.js +146 -0
  15. package/dist/constants.cjs.js.map +1 -0
  16. package/dist/constants.es.js +145 -0
  17. package/dist/constants.es.js.map +1 -0
  18. package/dist/descriptors.cjs.js +30 -0
  19. package/dist/descriptors.cjs.js.map +1 -1
  20. package/dist/descriptors.es.js +1 -1
  21. package/dist/main.cjs.js +3 -0
  22. package/dist/main.cjs.js.map +1 -1
  23. package/dist/main.es.js +1 -1
  24. package/dist/react-builder-preview.cjs.js +36 -3
  25. package/dist/react-builder-preview.cjs.js.map +1 -1
  26. package/dist/react-builder-preview.es.js +38 -5
  27. package/dist/react-builder-preview.es.js.map +1 -1
  28. package/dist/react.cjs.js +6 -0
  29. package/dist/react.cjs.js.map +1 -1
  30. package/dist/react.cjs2.js +33566 -538
  31. package/dist/react.cjs2.js.map +1 -1
  32. package/dist/react.es.js +6 -0
  33. package/dist/react.es.js.map +1 -1
  34. package/dist/react.es2.js +33510 -533
  35. package/dist/react.es2.js.map +1 -1
  36. package/dist/types/api/constants.d.ts +4 -0
  37. package/dist/types/api/constants.d.ts.map +1 -0
  38. package/dist/types/api/generated/graphql.d.ts +61 -0
  39. package/dist/types/api/generated/graphql.d.ts.map +1 -0
  40. package/dist/types/api/getFragment.d.ts +4 -0
  41. package/dist/types/api/getFragment.d.ts.map +1 -0
  42. package/dist/types/api/index.d.ts +3 -0
  43. package/dist/types/api/index.d.ts.map +1 -0
  44. package/dist/types/api/react.d.ts +6 -0
  45. package/dist/types/api/react.d.ts.map +1 -0
  46. package/dist/types/api/types.d.ts +4 -0
  47. package/dist/types/api/types.d.ts.map +1 -0
  48. package/dist/types/codegen-loader.d.ts +2 -0
  49. package/dist/types/codegen-loader.d.ts.map +1 -0
  50. package/dist/types/components/builtin/Box/Box.d.ts +5 -2
  51. package/dist/types/components/builtin/Box/Box.d.ts.map +1 -1
  52. package/dist/types/components/builtin/Box/index.d.ts +1 -1
  53. package/dist/types/components/builtin/Box/index.d.ts.map +1 -1
  54. package/dist/types/components/builtin/Button/Button.d.ts +5 -2
  55. package/dist/types/components/builtin/Button/Button.d.ts.map +1 -1
  56. package/dist/types/components/builtin/Button/index.d.ts +1 -1
  57. package/dist/types/components/builtin/Button/index.d.ts.map +1 -1
  58. package/dist/types/components/builtin/Carousel/Carousel.d.ts +5 -2
  59. package/dist/types/components/builtin/Carousel/Carousel.d.ts.map +1 -1
  60. package/dist/types/components/builtin/Carousel/index.d.ts +1 -1
  61. package/dist/types/components/builtin/Carousel/index.d.ts.map +1 -1
  62. package/dist/types/components/builtin/Countdown/Countdown.d.ts +5 -2
  63. package/dist/types/components/builtin/Countdown/Countdown.d.ts.map +1 -1
  64. package/dist/types/components/builtin/Countdown/index.d.ts +1 -1
  65. package/dist/types/components/builtin/Countdown/index.d.ts.map +1 -1
  66. package/dist/types/components/builtin/Divider/Divider.d.ts +5 -2
  67. package/dist/types/components/builtin/Divider/Divider.d.ts.map +1 -1
  68. package/dist/types/components/builtin/Divider/index.d.ts +1 -1
  69. package/dist/types/components/builtin/Divider/index.d.ts.map +1 -1
  70. package/dist/types/components/builtin/Embed/Embed.d.ts +5 -2
  71. package/dist/types/components/builtin/Embed/Embed.d.ts.map +1 -1
  72. package/dist/types/components/builtin/Embed/index.d.ts +1 -1
  73. package/dist/types/components/builtin/Embed/index.d.ts.map +1 -1
  74. package/dist/types/components/builtin/Image/Image.d.ts +5 -2
  75. package/dist/types/components/builtin/Image/Image.d.ts.map +1 -1
  76. package/dist/types/components/builtin/Image/index.d.ts +1 -1
  77. package/dist/types/components/builtin/Image/index.d.ts.map +1 -1
  78. package/dist/types/components/builtin/Navigation/Navigation.d.ts +5 -2
  79. package/dist/types/components/builtin/Navigation/Navigation.d.ts.map +1 -1
  80. package/dist/types/components/builtin/Navigation/index.d.ts +1 -1
  81. package/dist/types/components/builtin/Navigation/index.d.ts.map +1 -1
  82. package/dist/types/components/builtin/Root/Root.d.ts +5 -2
  83. package/dist/types/components/builtin/Root/Root.d.ts.map +1 -1
  84. package/dist/types/components/builtin/Root/index.d.ts +1 -1
  85. package/dist/types/components/builtin/Root/index.d.ts.map +1 -1
  86. package/dist/types/components/builtin/SocialLinks/SocialLinks.d.ts +5 -2
  87. package/dist/types/components/builtin/SocialLinks/SocialLinks.d.ts.map +1 -1
  88. package/dist/types/components/builtin/SocialLinks/index.d.ts +1 -1
  89. package/dist/types/components/builtin/SocialLinks/index.d.ts.map +1 -1
  90. package/dist/types/components/builtin/Text/Text.d.ts +5 -2
  91. package/dist/types/components/builtin/Text/Text.d.ts.map +1 -1
  92. package/dist/types/components/builtin/Text/index.d.ts +1 -1
  93. package/dist/types/components/builtin/Text/index.d.ts.map +1 -1
  94. package/dist/types/components/builtin/index.d.ts +2 -0
  95. package/dist/types/components/builtin/index.d.ts.map +1 -1
  96. package/dist/types/components/hooks/useBackgrounds.d.ts.map +1 -1
  97. package/dist/types/components/hooks/useBorder.d.ts.map +1 -1
  98. package/dist/types/components/hooks/useBoxShadow.d.ts.map +1 -1
  99. package/dist/types/components/hooks/useColor.d.ts.map +1 -1
  100. package/dist/types/components/hooks/useFile.d.ts.map +1 -1
  101. package/dist/types/components/hooks/usePage.d.ts.map +1 -1
  102. package/dist/types/components/hooks/useTypography.d.ts.map +1 -1
  103. package/dist/types/generated/graphql.d.ts +20 -0
  104. package/dist/types/generated/graphql.d.ts.map +1 -0
  105. package/dist/types/index.d.ts +1 -1
  106. package/dist/types/index.d.ts.map +1 -1
  107. package/dist/types/runtimes/react.d.ts +13 -7
  108. package/dist/types/runtimes/react.d.ts.map +1 -1
  109. package/dist/types/state/actions.d.ts +20 -1
  110. package/dist/types/state/actions.d.ts.map +1 -1
  111. package/dist/types/state/modules/makeswift-api-client.d.ts +17 -0
  112. package/dist/types/state/modules/makeswift-api-client.d.ts.map +1 -0
  113. package/dist/types/state/react-builder-preview.d.ts +3 -1
  114. package/dist/types/state/react-builder-preview.d.ts.map +1 -1
  115. package/dist/types/types.d.ts +2 -0
  116. package/dist/types/types.d.ts.map +1 -0
  117. package/package.json +19 -13
@@ -0,0 +1,146 @@
1
+ "use strict";
2
+ const SwatchFragmentDoc = {
3
+ kind: "Document",
4
+ definitions: [
5
+ {
6
+ kind: "FragmentDefinition",
7
+ name: { kind: "Name", value: "Swatch" },
8
+ typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Swatch" } },
9
+ selectionSet: {
10
+ kind: "SelectionSet",
11
+ selections: [
12
+ { kind: "Field", name: { kind: "Name", value: "__typename" } },
13
+ { kind: "Field", name: { kind: "Name", value: "id" } },
14
+ { kind: "Field", name: { kind: "Name", value: "hue" } },
15
+ { kind: "Field", name: { kind: "Name", value: "saturation" } },
16
+ { kind: "Field", name: { kind: "Name", value: "lightness" } }
17
+ ]
18
+ }
19
+ }
20
+ ]
21
+ };
22
+ const FileFragmentDoc = {
23
+ kind: "Document",
24
+ definitions: [
25
+ {
26
+ kind: "FragmentDefinition",
27
+ name: { kind: "Name", value: "File" },
28
+ typeCondition: { kind: "NamedType", name: { kind: "Name", value: "File" } },
29
+ selectionSet: {
30
+ kind: "SelectionSet",
31
+ selections: [
32
+ { kind: "Field", name: { kind: "Name", value: "__typename" } },
33
+ { kind: "Field", name: { kind: "Name", value: "id" } },
34
+ { kind: "Field", name: { kind: "Name", value: "name" } },
35
+ { kind: "Field", name: { kind: "Name", value: "publicUrl" } },
36
+ { kind: "Field", name: { kind: "Name", value: "extension" } },
37
+ {
38
+ kind: "Field",
39
+ name: { kind: "Name", value: "dimensions" },
40
+ selectionSet: {
41
+ kind: "SelectionSet",
42
+ selections: [
43
+ { kind: "Field", name: { kind: "Name", value: "width" } },
44
+ { kind: "Field", name: { kind: "Name", value: "height" } }
45
+ ]
46
+ }
47
+ }
48
+ ]
49
+ }
50
+ }
51
+ ]
52
+ };
53
+ const TypographyFragmentDoc = {
54
+ kind: "Document",
55
+ definitions: [
56
+ {
57
+ kind: "FragmentDefinition",
58
+ name: { kind: "Name", value: "Typography" },
59
+ typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Typography" } },
60
+ selectionSet: {
61
+ kind: "SelectionSet",
62
+ selections: [
63
+ { kind: "Field", name: { kind: "Name", value: "__typename" } },
64
+ { kind: "Field", name: { kind: "Name", value: "id" } },
65
+ { kind: "Field", name: { kind: "Name", value: "name" } },
66
+ {
67
+ kind: "Field",
68
+ name: { kind: "Name", value: "style" },
69
+ selectionSet: {
70
+ kind: "SelectionSet",
71
+ selections: [
72
+ { kind: "Field", name: { kind: "Name", value: "deviceId" } },
73
+ {
74
+ kind: "Field",
75
+ name: { kind: "Name", value: "value" },
76
+ selectionSet: {
77
+ kind: "SelectionSet",
78
+ selections: [
79
+ { kind: "Field", name: { kind: "Name", value: "fontFamily" } },
80
+ {
81
+ kind: "Field",
82
+ name: { kind: "Name", value: "fontSize" },
83
+ selectionSet: {
84
+ kind: "SelectionSet",
85
+ selections: [
86
+ { kind: "Field", name: { kind: "Name", value: "value" } },
87
+ { kind: "Field", name: { kind: "Name", value: "unit" } }
88
+ ]
89
+ }
90
+ },
91
+ {
92
+ kind: "Field",
93
+ name: { kind: "Name", value: "color" },
94
+ selectionSet: {
95
+ kind: "SelectionSet",
96
+ selections: [
97
+ { kind: "Field", name: { kind: "Name", value: "swatchId" } },
98
+ { kind: "Field", name: { kind: "Name", value: "alpha" } }
99
+ ]
100
+ }
101
+ },
102
+ { kind: "Field", name: { kind: "Name", value: "lineHeight" } },
103
+ { kind: "Field", name: { kind: "Name", value: "letterSpacing" } },
104
+ { kind: "Field", name: { kind: "Name", value: "fontWeight" } },
105
+ { kind: "Field", name: { kind: "Name", value: "textAlign" } },
106
+ { kind: "Field", name: { kind: "Name", value: "uppercase" } },
107
+ { kind: "Field", name: { kind: "Name", value: "underline" } },
108
+ { kind: "Field", name: { kind: "Name", value: "strikethrough" } },
109
+ { kind: "Field", name: { kind: "Name", value: "italic" } }
110
+ ]
111
+ }
112
+ }
113
+ ]
114
+ }
115
+ }
116
+ ]
117
+ }
118
+ }
119
+ ]
120
+ };
121
+ const PagePathnameSliceFragmentDoc = {
122
+ kind: "Document",
123
+ definitions: [
124
+ {
125
+ kind: "FragmentDefinition",
126
+ name: { kind: "Name", value: "PagePathnameSlice" },
127
+ typeCondition: { kind: "NamedType", name: { kind: "Name", value: "PagePathnameSlice" } },
128
+ selectionSet: {
129
+ kind: "SelectionSet",
130
+ selections: [
131
+ { kind: "Field", name: { kind: "Name", value: "__typename" } },
132
+ { kind: "Field", name: { kind: "Name", value: "id" } },
133
+ { kind: "Field", name: { kind: "Name", value: "pathname" } }
134
+ ]
135
+ }
136
+ }
137
+ ]
138
+ };
139
+ const Fragments = {
140
+ Swatch: SwatchFragmentDoc,
141
+ File: FileFragmentDoc,
142
+ Typography: TypographyFragmentDoc,
143
+ PagePathnameSlice: PagePathnameSliceFragmentDoc
144
+ };
145
+ exports.Fragments = Fragments;
146
+ //# sourceMappingURL=constants.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.cjs.js","sources":["../src/api/generated/graphql.ts","../src/api/constants.ts"],"sourcesContent":["import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'\nexport type SwatchFragment = {\n __typename: 'Swatch'\n id: string\n hue: number\n saturation: number\n lightness: number\n}\n\nexport type FileFragment = {\n __typename: 'File'\n id: string\n name: string\n publicUrl: any\n extension?: string | null\n dimensions?: { __typename?: 'ImageDimensions'; width: number; height: number } | null\n}\n\nexport type TypographyFragment = {\n __typename: 'Typography'\n id: string\n name: string\n style: Array<{\n __typename?: 'TypographyStyle'\n deviceId: string\n value: {\n __typename?: 'TypographyStyleValue'\n fontFamily?: string | null\n lineHeight?: number | null\n letterSpacing?: number | null\n fontWeight?: number | null\n textAlign?: string | null\n uppercase?: boolean | null\n underline?: boolean | null\n strikethrough?: boolean | null\n italic?: boolean | null\n fontSize?: { __typename?: 'Length'; value?: number | null; unit?: string | null } | null\n color?: { __typename?: 'Color'; swatchId?: string | null; alpha?: number | null } | null\n }\n }>\n}\n\nexport type PagePathnameSliceFragment = {\n __typename: 'PagePathnameSlice'\n id: string\n pathname: any\n}\n\nexport const SwatchFragmentDoc = {\n kind: 'Document',\n definitions: [\n {\n kind: 'FragmentDefinition',\n name: { kind: 'Name', value: 'Swatch' },\n typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'Swatch' } },\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n { kind: 'Field', name: { kind: 'Name', value: '__typename' } },\n { kind: 'Field', name: { kind: 'Name', value: 'id' } },\n { kind: 'Field', name: { kind: 'Name', value: 'hue' } },\n { kind: 'Field', name: { kind: 'Name', value: 'saturation' } },\n { kind: 'Field', name: { kind: 'Name', value: 'lightness' } },\n ],\n },\n },\n ],\n} as unknown as DocumentNode<SwatchFragment, unknown>\nexport const FileFragmentDoc = {\n kind: 'Document',\n definitions: [\n {\n kind: 'FragmentDefinition',\n name: { kind: 'Name', value: 'File' },\n typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'File' } },\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n { kind: 'Field', name: { kind: 'Name', value: '__typename' } },\n { kind: 'Field', name: { kind: 'Name', value: 'id' } },\n { kind: 'Field', name: { kind: 'Name', value: 'name' } },\n { kind: 'Field', name: { kind: 'Name', value: 'publicUrl' } },\n { kind: 'Field', name: { kind: 'Name', value: 'extension' } },\n {\n kind: 'Field',\n name: { kind: 'Name', value: 'dimensions' },\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n { kind: 'Field', name: { kind: 'Name', value: 'width' } },\n { kind: 'Field', name: { kind: 'Name', value: 'height' } },\n ],\n },\n },\n ],\n },\n },\n ],\n} as unknown as DocumentNode<FileFragment, unknown>\nexport const TypographyFragmentDoc = {\n kind: 'Document',\n definitions: [\n {\n kind: 'FragmentDefinition',\n name: { kind: 'Name', value: 'Typography' },\n typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'Typography' } },\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n { kind: 'Field', name: { kind: 'Name', value: '__typename' } },\n { kind: 'Field', name: { kind: 'Name', value: 'id' } },\n { kind: 'Field', name: { kind: 'Name', value: 'name' } },\n {\n kind: 'Field',\n name: { kind: 'Name', value: 'style' },\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n { kind: 'Field', name: { kind: 'Name', value: 'deviceId' } },\n {\n kind: 'Field',\n name: { kind: 'Name', value: 'value' },\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n { kind: 'Field', name: { kind: 'Name', value: 'fontFamily' } },\n {\n kind: 'Field',\n name: { kind: 'Name', value: 'fontSize' },\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n { kind: 'Field', name: { kind: 'Name', value: 'value' } },\n { kind: 'Field', name: { kind: 'Name', value: 'unit' } },\n ],\n },\n },\n {\n kind: 'Field',\n name: { kind: 'Name', value: 'color' },\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n { kind: 'Field', name: { kind: 'Name', value: 'swatchId' } },\n { kind: 'Field', name: { kind: 'Name', value: 'alpha' } },\n ],\n },\n },\n { kind: 'Field', name: { kind: 'Name', value: 'lineHeight' } },\n { kind: 'Field', name: { kind: 'Name', value: 'letterSpacing' } },\n { kind: 'Field', name: { kind: 'Name', value: 'fontWeight' } },\n { kind: 'Field', name: { kind: 'Name', value: 'textAlign' } },\n { kind: 'Field', name: { kind: 'Name', value: 'uppercase' } },\n { kind: 'Field', name: { kind: 'Name', value: 'underline' } },\n { kind: 'Field', name: { kind: 'Name', value: 'strikethrough' } },\n { kind: 'Field', name: { kind: 'Name', value: 'italic' } },\n ],\n },\n },\n ],\n },\n },\n ],\n },\n },\n ],\n} as unknown as DocumentNode<TypographyFragment, unknown>\nexport const PagePathnameSliceFragmentDoc = {\n kind: 'Document',\n definitions: [\n {\n kind: 'FragmentDefinition',\n name: { kind: 'Name', value: 'PagePathnameSlice' },\n typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'PagePathnameSlice' } },\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n { kind: 'Field', name: { kind: 'Name', value: '__typename' } },\n { kind: 'Field', name: { kind: 'Name', value: 'id' } },\n { kind: 'Field', name: { kind: 'Name', value: 'pathname' } },\n ],\n },\n },\n ],\n} as unknown as DocumentNode<PagePathnameSliceFragment, unknown>\n","import type { DocumentNode } from 'graphql'\n\nimport {\n SwatchFragmentDoc,\n FileFragmentDoc,\n TypographyFragmentDoc,\n PagePathnameSliceFragmentDoc,\n} from './generated/graphql'\nimport type { APIResourceType } from './types'\n\nexport const Fragments: Record<APIResourceType, DocumentNode> = {\n Swatch: SwatchFragmentDoc,\n File: FileFragmentDoc,\n Typography: TypographyFragmentDoc,\n PagePathnameSlice: PagePathnameSliceFragmentDoc,\n}\n"],"names":[],"mappings":";MAgDa,oBAAoB;AAAA,EAC/B,MAAM;AAAA,EACN,aAAa;AAAA,IACX;AAAA,MACE,MAAM;AAAA,MACN,MAAM,EAAE,MAAM,QAAQ,OAAO;AAAA,MAC7B,eAAe,EAAE,MAAM,aAAa,MAAM,EAAE,MAAM,QAAQ,OAAO;AAAA,MACjE,cAAc;AAAA,QACZ,MAAM;AAAA,QACN,YAAY;AAAA,UACV,EAAE,MAAM,SAAS,MAAM,EAAE,MAAM,QAAQ,OAAO;AAAA,UAC9C,EAAE,MAAM,SAAS,MAAM,EAAE,M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"Name", value: "Swatch" },
7
+ typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Swatch" } },
8
+ selectionSet: {
9
+ kind: "SelectionSet",
10
+ selections: [
11
+ { kind: "Field", name: { kind: "Name", value: "__typename" } },
12
+ { kind: "Field", name: { kind: "Name", value: "id" } },
13
+ { kind: "Field", name: { kind: "Name", value: "hue" } },
14
+ { kind: "Field", name: { kind: "Name", value: "saturation" } },
15
+ { kind: "Field", name: { kind: "Name", value: "lightness" } }
16
+ ]
17
+ }
18
+ }
19
+ ]
20
+ };
21
+ const FileFragmentDoc = {
22
+ kind: "Document",
23
+ definitions: [
24
+ {
25
+ kind: "FragmentDefinition",
26
+ name: { kind: "Name", value: "File" },
27
+ typeCondition: { kind: "NamedType", name: { kind: "Name", value: "File" } },
28
+ selectionSet: {
29
+ kind: "SelectionSet",
30
+ selections: [
31
+ { kind: "Field", name: { kind: "Name", value: "__typename" } },
32
+ { kind: "Field", name: { kind: "Name", value: "id" } },
33
+ { kind: "Field", name: { kind: "Name", value: "name" } },
34
+ { kind: "Field", name: { kind: "Name", value: "publicUrl" } },
35
+ { kind: "Field", name: { kind: "Name", value: "extension" } },
36
+ {
37
+ kind: "Field",
38
+ name: { kind: "Name", value: "dimensions" },
39
+ selectionSet: {
40
+ kind: "SelectionSet",
41
+ selections: [
42
+ { kind: "Field", name: { kind: "Name", value: "width" } },
43
+ { kind: "Field", name: { kind: "Name", value: "height" } }
44
+ ]
45
+ }
46
+ }
47
+ ]
48
+ }
49
+ }
50
+ ]
51
+ };
52
+ const TypographyFragmentDoc = {
53
+ kind: "Document",
54
+ definitions: [
55
+ {
56
+ kind: "FragmentDefinition",
57
+ name: { kind: "Name", value: "Typography" },
58
+ typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Typography" } },
59
+ selectionSet: {
60
+ kind: "SelectionSet",
61
+ selections: [
62
+ { kind: "Field", name: { kind: "Name", value: "__typename" } },
63
+ { kind: "Field", name: { kind: "Name", value: "id" } },
64
+ { kind: "Field", name: { kind: "Name", value: "name" } },
65
+ {
66
+ kind: "Field",
67
+ name: { kind: "Name", value: "style" },
68
+ selectionSet: {
69
+ kind: "SelectionSet",
70
+ selections: [
71
+ { kind: "Field", name: { kind: "Name", value: "deviceId" } },
72
+ {
73
+ kind: "Field",
74
+ name: { kind: "Name", value: "value" },
75
+ selectionSet: {
76
+ kind: "SelectionSet",
77
+ selections: [
78
+ { kind: "Field", name: { kind: "Name", value: "fontFamily" } },
79
+ {
80
+ kind: "Field",
81
+ name: { kind: "Name", value: "fontSize" },
82
+ selectionSet: {
83
+ kind: "SelectionSet",
84
+ selections: [
85
+ { kind: "Field", name: { kind: "Name", value: "value" } },
86
+ { kind: "Field", name: { kind: "Name", value: "unit" } }
87
+ ]
88
+ }
89
+ },
90
+ {
91
+ kind: "Field",
92
+ name: { kind: "Name", value: "color" },
93
+ selectionSet: {
94
+ kind: "SelectionSet",
95
+ selections: [
96
+ { kind: "Field", name: { kind: "Name", value: "swatchId" } },
97
+ { kind: "Field", name: { kind: "Name", value: "alpha" } }
98
+ ]
99
+ }
100
+ },
101
+ { kind: "Field", name: { kind: "Name", value: "lineHeight" } },
102
+ { kind: "Field", name: { kind: "Name", value: "letterSpacing" } },
103
+ { kind: "Field", name: { kind: "Name", value: "fontWeight" } },
104
+ { kind: "Field", name: { kind: "Name", value: "textAlign" } },
105
+ { kind: "Field", name: { kind: "Name", value: "uppercase" } },
106
+ { kind: "Field", name: { kind: "Name", value: "underline" } },
107
+ { kind: "Field", name: { kind: "Name", value: "strikethrough" } },
108
+ { kind: "Field", name: { kind: "Name", value: "italic" } }
109
+ ]
110
+ }
111
+ }
112
+ ]
113
+ }
114
+ }
115
+ ]
116
+ }
117
+ }
118
+ ]
119
+ };
120
+ const PagePathnameSliceFragmentDoc = {
121
+ kind: "Document",
122
+ definitions: [
123
+ {
124
+ kind: "FragmentDefinition",
125
+ name: { kind: "Name", value: "PagePathnameSlice" },
126
+ typeCondition: { kind: "NamedType", name: { kind: "Name", value: "PagePathnameSlice" } },
127
+ selectionSet: {
128
+ kind: "SelectionSet",
129
+ selections: [
130
+ { kind: "Field", name: { kind: "Name", value: "__typename" } },
131
+ { kind: "Field", name: { kind: "Name", value: "id" } },
132
+ { kind: "Field", name: { kind: "Name", value: "pathname" } }
133
+ ]
134
+ }
135
+ }
136
+ ]
137
+ };
138
+ const Fragments = {
139
+ Swatch: SwatchFragmentDoc,
140
+ File: FileFragmentDoc,
141
+ Typography: TypographyFragmentDoc,
142
+ PagePathnameSlice: PagePathnameSliceFragmentDoc
143
+ };
144
+ export { Fragments as F };
145
+ //# sourceMappingURL=constants.es.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.es.js","sources":["../src/api/generated/graphql.ts","../src/api/constants.ts"],"sourcesContent":["import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'\nexport type SwatchFragment = {\n __typename: 'Swatch'\n id: string\n hue: number\n saturation: number\n lightness: number\n}\n\nexport type FileFragment = {\n __typename: 'File'\n id: string\n name: string\n publicUrl: any\n extension?: string | null\n dimensions?: { __typename?: 'ImageDimensions'; width: number; height: number } | null\n}\n\nexport type TypographyFragment = {\n __typename: 'Typography'\n id: string\n name: string\n style: Array<{\n __typename?: 'TypographyStyle'\n deviceId: string\n value: {\n __typename?: 'TypographyStyleValue'\n fontFamily?: string | null\n lineHeight?: number | null\n letterSpacing?: number | null\n fontWeight?: number | null\n textAlign?: string | null\n uppercase?: boolean | null\n underline?: boolean | null\n strikethrough?: boolean | null\n italic?: boolean | null\n fontSize?: { __typename?: 'Length'; value?: number | null; unit?: string | null } | null\n color?: { __typename?: 'Color'; swatchId?: string | null; alpha?: number | null } | null\n }\n }>\n}\n\nexport type PagePathnameSliceFragment = {\n __typename: 'PagePathnameSlice'\n id: string\n pathname: any\n}\n\nexport const SwatchFragmentDoc = {\n kind: 'Document',\n definitions: [\n {\n kind: 'FragmentDefinition',\n name: { kind: 'Name', value: 'Swatch' },\n typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'Swatch' } },\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n { kind: 'Field', name: { kind: 'Name', value: '__typename' } },\n { kind: 'Field', name: { kind: 'Name', value: 'id' } },\n { kind: 'Field', name: { kind: 'Name', value: 'hue' } },\n { kind: 'Field', name: { kind: 'Name', value: 'saturation' } },\n { kind: 'Field', name: { kind: 'Name', value: 'lightness' } },\n ],\n },\n },\n ],\n} as unknown as DocumentNode<SwatchFragment, unknown>\nexport const FileFragmentDoc = {\n kind: 'Document',\n definitions: [\n {\n kind: 'FragmentDefinition',\n name: { kind: 'Name', value: 'File' },\n typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'File' } },\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n { kind: 'Field', name: { kind: 'Name', value: '__typename' } },\n { kind: 'Field', name: { kind: 'Name', value: 'id' } },\n { kind: 'Field', name: { kind: 'Name', value: 'name' } },\n { kind: 'Field', name: { kind: 'Name', value: 'publicUrl' } },\n { kind: 'Field', name: { kind: 'Name', value: 'extension' } },\n {\n kind: 'Field',\n name: { kind: 'Name', value: 'dimensions' },\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n { kind: 'Field', name: { kind: 'Name', value: 'width' } },\n { kind: 'Field', name: { kind: 'Name', value: 'height' } },\n ],\n },\n },\n ],\n },\n },\n ],\n} as unknown as DocumentNode<FileFragment, unknown>\nexport const TypographyFragmentDoc = {\n kind: 'Document',\n definitions: [\n {\n kind: 'FragmentDefinition',\n name: { kind: 'Name', value: 'Typography' },\n typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'Typography' } },\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n { kind: 'Field', name: { kind: 'Name', value: '__typename' } },\n { kind: 'Field', name: { kind: 'Name', value: 'id' } },\n { kind: 'Field', name: { kind: 'Name', value: 'name' } },\n {\n kind: 'Field',\n name: { kind: 'Name', value: 'style' },\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n { kind: 'Field', name: { kind: 'Name', value: 'deviceId' } },\n {\n kind: 'Field',\n name: { kind: 'Name', value: 'value' },\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n { kind: 'Field', name: { kind: 'Name', value: 'fontFamily' } },\n {\n kind: 'Field',\n name: { kind: 'Name', value: 'fontSize' },\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n { kind: 'Field', name: { kind: 'Name', value: 'value' } },\n { kind: 'Field', name: { kind: 'Name', value: 'unit' } },\n ],\n },\n },\n {\n kind: 'Field',\n name: { kind: 'Name', value: 'color' },\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n { kind: 'Field', name: { kind: 'Name', value: 'swatchId' } },\n { kind: 'Field', name: { kind: 'Name', value: 'alpha' } },\n ],\n },\n },\n { kind: 'Field', name: { kind: 'Name', value: 'lineHeight' } },\n { kind: 'Field', name: { kind: 'Name', value: 'letterSpacing' } },\n { kind: 'Field', name: { kind: 'Name', value: 'fontWeight' } },\n { kind: 'Field', name: { kind: 'Name', value: 'textAlign' } },\n { kind: 'Field', name: { kind: 'Name', value: 'uppercase' } },\n { kind: 'Field', name: { kind: 'Name', value: 'underline' } },\n { kind: 'Field', name: { kind: 'Name', value: 'strikethrough' } },\n { kind: 'Field', name: { kind: 'Name', value: 'italic' } },\n ],\n },\n },\n ],\n },\n },\n ],\n },\n },\n ],\n} as unknown as DocumentNode<TypographyFragment, unknown>\nexport const PagePathnameSliceFragmentDoc = {\n kind: 'Document',\n definitions: [\n {\n kind: 'FragmentDefinition',\n name: { kind: 'Name', value: 'PagePathnameSlice' },\n typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'PagePathnameSlice' } },\n selectionSet: {\n kind: 'SelectionSet',\n selections: [\n { kind: 'Field', name: { kind: 'Name', value: '__typename' } },\n { kind: 'Field', name: { kind: 'Name', value: 'id' } },\n { kind: 'Field', name: { kind: 'Name', value: 'pathname' } },\n ],\n },\n },\n ],\n} as unknown as DocumentNode<PagePathnameSliceFragment, unknown>\n","import type { DocumentNode } from 'graphql'\n\nimport {\n SwatchFragmentDoc,\n FileFragmentDoc,\n TypographyFragmentDoc,\n PagePathnameSliceFragmentDoc,\n} from './generated/graphql'\nimport type { APIResourceType } from './types'\n\nexport const Fragments: Record<APIResourceType, DocumentNode> = {\n Swatch: SwatchFragmentDoc,\n File: FileFragmentDoc,\n Typography: TypographyFragmentDoc,\n PagePathnameSlice: PagePathnameSliceFragmentDoc,\n}\n"],"names":[],"mappings":"MAgDa,oBAAoB;AAAA,EAC/B,MAAM;AAAA,EACN,aAAa;AAAA,IACX;AAAA,MACE,MAAM;AAAA,MACN,MAAM,EAAE,MAAM,QAAQ,OAAO;AAAA,MAC7B,eAAe,EAAE,MAAM,aAAa,MAAM,EAAE,MAAM,QAAQ,OAAO;AAAA,MACjE,cAAc;AAAA,QACZ,MAAM;AAAA,QACN,YAAY;AAAA,UACV,EAAE,MAAM,SAAS,MAAM,EAAE,MAAM,QAAQ,OAAO;AAAA,UAC9C,EAAE,MAAM,SAAS,MAAM,EAAE,MAAM,QAAQ,OAAO;AAAA,UAC9C,EAAE,MAAM,SAAS,MAAM,EAAE,MAAM,QAAQ,OAAO;AAAA,UAC9C,EAAE,MAAM,SAAS,MAAM,EAAE,MAAM,QAAQ,OAAO;AAAA,UAC9C,EAAE,MAAM,SAAS,MAAM,EAAE,MAAM,QAAQ,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;MAM3C,kBAAkB;AAAA,EAC7B,MAAM;AAAA,EACN,aAAa;AAAA,IACX;AAAA,MACE,MAAM;AAAA,MACN,MAAM,EAAE,MAAM,QAAQ,OAAO;AAAA,MAC7B,eAAe,EAAE,MAAM,aAAa,MAAM,EAAE,MAAM,QAAQ,OAAO;AAAA,MACjE,cAAc;AAAA,QACZ,MAAM;AAAA,QACN,YAAY;AAAA,UACV,EAAE,MAAM,SAAS,MAAM,EAAE,MAAM,QAAQ,OAAO;AAAA,UAC9C,EAAE,MAAM,SAAS,MAAM,EAAE,MAAM,QAAQ,OAAO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AA,EACN,aAAa;AAAA,IACX;AAAA,MACE,MAAM;AAAA,MACN,MAAM,EAAE,MAAM,QAAQ,OAAO;AAAA,MAC7B,eAAe,EAAE,MAAM,aAAa,MAAM,EAAE,MAAM,QAAQ,OAAO;AAAA,MACjE,cAAc;AAAA,QACZ,MAAM;AAAA,QACN,YAAY;AAAA,UACV,EAAE,MAAM,SAAS,MAAM,EAAE,MAAM,QAAQ,OAAO;AAAA,UAC9C,EAAE,MAAM,SAAS,MAAM,EAAE,MAAM,QAAQ,OAAO;AAAA,UAC9C,EAAE,MAAM,SAAS,MAAM,EAAE,MAAM,QAAQ,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;MCzK3C,YAAmD;AAAA,EAC9D,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,YAAY;AAAA,EACZ,mBAAmB;AAAA;;"}
@@ -181,6 +181,36 @@ var descriptors = /* @__PURE__ */ Object.freeze({
181
181
  Video,
182
182
  Width
183
183
  });
184
+ exports.Backgrounds = Backgrounds;
185
+ exports.Border = Border;
186
+ exports.BorderRadius = BorderRadius;
187
+ exports.Checkbox = Checkbox;
188
+ exports.Date = Date;
189
+ exports.ElementID = ElementID;
190
+ exports.Font = Font;
191
+ exports.GapX = GapX;
192
+ exports.GapY = GapY;
193
+ exports.Grid = Grid;
194
+ exports.Image = Image;
195
+ exports.Images = Images;
196
+ exports.Link = Link;
197
+ exports.Margin = Margin;
198
+ exports.NavigationLinks = NavigationLinks;
199
+ exports.Number = Number;
200
+ exports.Padding = Padding;
201
+ exports.ResponsiveColor = ResponsiveColor;
202
+ exports.ResponsiveIconRadioGroup = ResponsiveIconRadioGroup;
203
+ exports.ResponsiveLength = ResponsiveLength;
204
+ exports.ResponsiveNumber = ResponsiveNumber;
205
+ exports.ResponsiveOpacity = ResponsiveOpacity;
206
+ exports.ResponsiveSelect = ResponsiveSelect;
207
+ exports.RichText = RichText;
208
+ exports.Shadows = Shadows;
209
+ exports.SocialLinks = SocialLinks;
210
+ exports.TextArea = TextArea;
211
+ exports.TextInput = TextInput;
212
+ exports.TextStyle = TextStyle;
184
213
  exports.Types = Types;
214
+ exports.Width = Width;
185
215
  exports.descriptors = descriptors;
186
216
  //# sourceMappingURL=descriptors.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"descriptors.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 List: 'List',\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 Shape: 'Shape',\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 ListValueItem<T extends Data> = { id: string; value?: T }\n\ntype ListValue<T extends Data = Data> = ListValueItem<T>[]\n\ntype ListOptions<T extends Data> = Options<{\n type: PanelDescriptor<T>\n label?: string\n preset?: ListValue<T>\n defaultValue?: ListValue<T>\n}>\n\ntype ListDescriptor<T extends ListValue> = {\n type: typeof Types.List\n options: ListOptions<T[number]['value']>\n}\n\nexport function List<T extends Data>(options: ListOptions<T>): ListDescriptor<ListValue<T>> {\n return { type: Types.List, 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\nexport type 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\nexport type ShapeValue<T extends Data = Data> = Record<string, T>\n\ntype ShapeOptions<T extends Record<string, Descriptor>> = {\n type: T\n preset?: { [K in keyof T]?: DescriptorValueType<T[K]> }\n}\n\ntype ShapeDescriptor<_T extends Record<string, Data>, U extends Record<string, Descriptor>> = {\n type: typeof Types.Shape\n options: ShapeOptions<U>\n}\n\nexport function Shape<T extends Record<string, Descriptor>>(\n options: ShapeOptions<T>,\n): ShapeDescriptor<{ [K in keyof T]?: DescriptorValueType<T[K]> }, T> {\n return { type: Types.Shape, 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 | ListDescriptor<T extends ListValue ? T : ListValue>\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 | ShapeDescriptor<T extends ShapeValue ? T : ShapeValue, any>\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\ntype PanelDescriptorType =\n | typeof Types.Backgrounds\n | typeof Types.ResponsiveIconRadioGroup\n | typeof Types.Margin\n | typeof Types.Padding\n | typeof Types.Border\n | typeof Types.Shadows\n | typeof Types.GapY\n | typeof Types.GapX\n | typeof Types.BorderRadius\n | typeof Types.Checkbox\n | typeof Types.TextInput\n | typeof Types.Link\n | typeof Types.List\n | typeof Types.Shape\n | typeof Types.ResponsiveSelect\n | typeof Types.ResponsiveColor\n | typeof Types.TextStyle\n | typeof Types.Images\n | typeof Types.ResponsiveNumber\n | typeof Types.Number\n | typeof Types.Date\n | typeof Types.Font\n | typeof Types.TextArea\n | typeof Types.Table\n | typeof Types.RichText\n | typeof Types.Image\n | typeof Types.ResponsiveOpacity\n | typeof Types.SocialLinks\n | typeof Types.Video\n | typeof Types.NavigationLinks\n\nexport type PanelDescriptor<T extends Data = Data> = Extract<\n Descriptor<T>,\n { type: PanelDescriptorType }\n>\n\nexport type DescriptorValueType<T extends Descriptor> = T extends Descriptor<infer U> ? U : never\n"],"names":[],"mappings":";MAsFa,QAAQ;AAAA,EACnB,aAAa;AAAA,EACb,QAAQ;AAAA,EACR,cAAc;AAAA,EACd,UAAU;AAAA,EACV,MAAM;AAAA,EACN,WAAW;AAAA,EACX,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AAAA,EACN,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,iBAAiB;AAAA,EACjB,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,iBAAiB;AAAA,EACjB,0BAA0B;AAAA,EAC1B,kBAAkB;AAAA,EAClB,kBAAkB;AAAA,EAClB,mBAAmB;AAAA,EACnB,kBAAkB;AAAA,EAClB,UAAU;AAAA,EACV,SAAS;AAAA,EACT,OAAO;AAAA,EACP,aAAa;AAAA,EACb,OAAO;AAAA,EACP,iBAAiB;AAAA,EACjB,UAAU;AAAA,EACV,WAAW;AAAA,EACX,WAAW;AAAA,EACX,OAAO;AAAA,EACP,OAAO;AAAA;qBAsDmB,UAA8B,IAA2B;SAC5E,EAAE,MAAM,MAAM,aAAa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avC,UAAoC,IACP;SACtB,EAAE,MAAM,MAAM,mBAAmB;AAAA;0BA2BxC,SACsD;SAC/C,EAAE,MAAM,MAAM,kBAAkB;AAAA;kBAYhB,UAA2B,IAAwB;SACnE,EAAE,MAAM,MAAM,UAAU;AAAA;iBAoBT,UAA0B,IAAuB;SAChE,EAAE,MAAM,MAAM,SAAS;AAAA;eAgB9B,SACoE;SAC7D,EAAE,MAAM,MAAM,OAAO;AAAA;qBAwCF,UAA8B,IAA2B;SAC5E,EAAE,MAAM,MAAM,aAAa;AAAA;eASd,UAAwB,IAAqB;SAC1D,EAAE,MAAM,MAAM,OAAO;AAAA;yBA2BE,UAAkC,IAA+B;SACxF,EAAE,MAAM,MAAM,iBAAiB;AAAA;kBAYf,UAA2B,IAAwB;SACnE,EAAE,MAAM,MAAM,UAAU;AAAA;mBAYP,UAA4B,IAAyB;SACtE,EAAE,MAAM,MAAM,WAAW;AAAA;mBAYR,UAA4B,IAAyB;SACtE,EAAE,MAAM,MAAM,WAAW;AAAA;eAiBZ,UAAwB,IAAqB;SAC1D,EAAE,MAAM,MAAM,OAAO;AAAA;eASR,UAAwB,IAAqB;SAC1D,EAAE,MAAM,MAAM,OAAO;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"descriptors.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 List: 'List',\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 Shape: 'Shape',\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 ListValueItem<T extends Data> = { id: string; value?: T }\n\ntype ListValue<T extends Data = Data> = ListValueItem<T>[]\n\ntype ListOptions<T extends Data> = Options<{\n type: PanelDescriptor<T>\n label?: string\n preset?: ListValue<T>\n defaultValue?: ListValue<T>\n}>\n\ntype ListDescriptor<T extends ListValue> = {\n type: typeof Types.List\n options: ListOptions<T[number]['value']>\n}\n\nexport function List<T extends Data>(options: ListOptions<T>): ListDescriptor<ListValue<T>> {\n return { type: Types.List, 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\nexport type 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\nexport type ShapeValue<T extends Data = Data> = Record<string, T>\n\ntype ShapeOptions<T extends Record<string, Descriptor>> = {\n type: T\n preset?: { [K in keyof T]?: DescriptorValueType<T[K]> }\n}\n\ntype ShapeDescriptor<_T extends Record<string, Data>, U extends Record<string, Descriptor>> = {\n type: typeof Types.Shape\n options: ShapeOptions<U>\n}\n\nexport function Shape<T extends Record<string, Descriptor>>(\n options: ShapeOptions<T>,\n): ShapeDescriptor<{ [K in keyof T]?: DescriptorValueType<T[K]> }, T> {\n return { type: Types.Shape, 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 | ListDescriptor<T extends ListValue ? T : ListValue>\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 | ShapeDescriptor<T extends ShapeValue ? T : ShapeValue, any>\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\ntype PanelDescriptorType =\n | typeof Types.Backgrounds\n | typeof Types.ResponsiveIconRadioGroup\n | typeof Types.Margin\n | typeof Types.Padding\n | typeof Types.Border\n | typeof Types.Shadows\n | typeof Types.GapY\n | typeof Types.GapX\n | typeof Types.BorderRadius\n | typeof Types.Checkbox\n | typeof Types.TextInput\n | typeof Types.Link\n | typeof Types.List\n | typeof Types.Shape\n | typeof Types.ResponsiveSelect\n | typeof Types.ResponsiveColor\n | typeof Types.TextStyle\n | typeof Types.Images\n | typeof Types.ResponsiveNumber\n | typeof Types.Number\n | typeof Types.Date\n | typeof Types.Font\n | typeof Types.TextArea\n | typeof Types.Table\n | typeof Types.RichText\n | typeof Types.Image\n | typeof Types.ResponsiveOpacity\n | typeof Types.SocialLinks\n | typeof Types.Video\n | typeof Types.NavigationLinks\n\nexport type PanelDescriptor<T extends Data = Data> = Extract<\n Descriptor<T>,\n { type: PanelDescriptorType }\n>\n\nexport type DescriptorValueType<T extends Descriptor> = T extends Descriptor<infer U> ? U : never\n"],"names":[],"mappings":";MAsFa,QAAQ;AAAA,EACnB,aAAa;AAAA,EACb,QAAQ;AAAA,EACR,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;SACtE,EAAE,MAAM,MAAM,WAAW;AAAA;eAiBZ,UAAwB,IAAqB;SAC1D,EAAE,MAAM,MAAM,OAAO;AAAA;eASR,UAAwB,IAAqB;SAC1D,EAAE,MAAM,MAAM,OAAO;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -180,5 +180,5 @@ var descriptors = /* @__PURE__ */ Object.freeze({
180
180
  Video,
181
181
  Width
182
182
  });
183
- export { Types as T, descriptors as d };
183
+ export { Backgrounds as B, Checkbox as C, Date as D, ElementID as E, Font as F, GapY as G, Image as I, Link as L, Margin as M, Number as N, Padding as P, ResponsiveIconRadioGroup as R, Shadows as S, Types as T, Width as W, Border as a, BorderRadius as b, GapX as c, descriptors as d, ResponsiveSelect as e, ResponsiveNumber as f, Grid as g, TextInput as h, ResponsiveColor as i, TextStyle as j, ResponsiveOpacity as k, Images as l, ResponsiveLength as m, TextArea as n, NavigationLinks as o, SocialLinks as p, RichText as q };
184
184
  //# sourceMappingURL=descriptors.es.js.map
package/dist/main.cjs.js CHANGED
@@ -3,7 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports[Symbol.toStringTag] = "Module";
4
4
  var actions = require("./actions.cjs.js");
5
5
  exports.ActionTypes = actions.ActionTypes;
6
+ exports.changeApiResource = actions.changeApiResource;
6
7
  exports.changeDocument = actions.changeDocument;
7
8
  exports.changeDocumentElementScrollTop = actions.changeDocumentElementScrollTop;
9
+ exports.cleanUp = actions.cleanUp;
10
+ exports.init = actions.init;
8
11
  exports.messageHostPropController = actions.messageHostPropController;
9
12
  //# sourceMappingURL=main.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"main.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
1
+ {"version":3,"file":"main.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;"}
package/dist/main.es.js CHANGED
@@ -1,2 +1,2 @@
1
- export { A as ActionTypes, c as changeDocument, a as changeDocumentElementScrollTop, m as messageHostPropController } from "./actions.es.js";
1
+ export { A as ActionTypes, d as changeApiResource, c as changeDocument, a as changeDocumentElementScrollTop, b as cleanUp, i as init, m as messageHostPropController } from "./actions.es.js";
2
2
  //# sourceMappingURL=main.es.js.map
@@ -23,9 +23,15 @@ var react = require("./react.cjs2.js");
23
23
  var actions = require("./actions.cjs.js");
24
24
  var boxModels = require("./box-models.cjs.js");
25
25
  var instances = require("./instances.cjs.js");
26
+ var constants = require("./constants.cjs.js");
26
27
  require("react");
27
28
  require("./descriptors.cjs.js");
29
+ require("styled-components");
28
30
  require("react/jsx-runtime");
31
+ require("next/image");
32
+ require("next/link");
33
+ require("slate");
34
+ require("slate-react");
29
35
  function is$1(x, y) {
30
36
  if (x === y)
31
37
  return x !== 0 || y !== 0 || 1 / x === 1 / y;
@@ -4349,6 +4355,8 @@ function measureBoxModelsMiddleware() {
4349
4355
  function messageChannelMiddleware() {
4350
4356
  return ({ dispatch, getState }) => (next) => {
4351
4357
  const messageChannel = new MessageChannel();
4358
+ let cleanUp = () => {
4359
+ };
4352
4360
  window.parent.postMessage(messageChannel.port2, "*", [messageChannel.port2]);
4353
4361
  messageChannel.port1.onmessage = (event) => dispatch(event.data);
4354
4362
  const state = getState();
@@ -4373,6 +4381,12 @@ function messageChannelMiddleware() {
4373
4381
  case actions.ActionTypes.CHANGE_DOCUMENT_ELEMENT_SCROLL_TOP:
4374
4382
  window.document.documentElement.scrollTop = action.payload.scrollTop;
4375
4383
  break;
4384
+ case actions.ActionTypes.INIT:
4385
+ cleanUp = dispatch(initialize());
4386
+ break;
4387
+ case actions.ActionTypes.CLEAN_UP:
4388
+ cleanUp();
4389
+ break;
4376
4390
  }
4377
4391
  return next(action);
4378
4392
  };
@@ -4428,10 +4442,29 @@ function propControllerHandlesMiddleware() {
4428
4442
  };
4429
4443
  };
4430
4444
  }
4445
+ function apolloClientCacheSyncMiddleware(client) {
4446
+ return () => (next) => {
4447
+ return (action) => {
4448
+ switch (action.type) {
4449
+ case actions.ActionTypes.CHANGE_API_RESOURCE: {
4450
+ const { resource } = action.payload;
4451
+ client.cache.writeFragment({
4452
+ id: client.cache.identify(resource),
4453
+ fragment: constants.Fragments[resource.__typename],
4454
+ data: resource
4455
+ });
4456
+ break;
4457
+ }
4458
+ }
4459
+ return next(action);
4460
+ };
4461
+ };
4462
+ }
4431
4463
  function configureStore({
4432
- preloadedState
4433
- } = {}) {
4434
- return react.createStore(reducer, preloadedState, react.applyMiddleware(react.thunk, measureBoxModelsMiddleware(), messageChannelMiddleware(), propControllerHandlesMiddleware()));
4464
+ preloadedState,
4465
+ client
4466
+ }) {
4467
+ return react.createStore(reducer, preloadedState, react.applyMiddleware(react.thunk, measureBoxModelsMiddleware(), messageChannelMiddleware(), propControllerHandlesMiddleware(), apolloClientCacheSyncMiddleware(client)));
4435
4468
  }
4436
4469
  exports.createBox = boxModels.createBox;
4437
4470
  exports.getBox = boxModels.getBox;