@makeswift/runtime 0.0.0-622c784 → 0.0.0-646104a

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 (304) hide show
  1. package/api.js +1 -0
  2. package/builder.js +1 -0
  3. package/dist/actions.cjs.js +116 -17
  4. package/dist/actions.cjs.js.map +1 -1
  5. package/dist/actions.es.js +102 -16
  6. package/dist/actions.es.js.map +1 -1
  7. package/dist/api.cjs.js +5 -0
  8. package/dist/api.cjs.js.map +1 -0
  9. package/dist/api.es.js +2 -0
  10. package/dist/api.es.js.map +1 -0
  11. package/dist/box-model.cjs.js +2 -2
  12. package/dist/box-model.es.js +1 -0
  13. package/dist/box-model.es.js.map +1 -1
  14. package/dist/box-models.cjs.js +28 -156
  15. package/dist/box-models.cjs.js.map +1 -1
  16. package/dist/box-models.es.js +31 -159
  17. package/dist/box-models.es.js.map +1 -1
  18. package/dist/builder.cjs.js +9 -0
  19. package/dist/builder.cjs.js.map +1 -0
  20. package/dist/builder.es.js +3 -0
  21. package/dist/builder.es.js.map +1 -0
  22. package/dist/components.cjs.js +57 -19955
  23. package/dist/components.cjs.js.map +1 -1
  24. package/dist/components.es.js +27 -19911
  25. package/dist/components.es.js.map +1 -1
  26. package/dist/constants.cjs.js +241 -0
  27. package/dist/constants.cjs.js.map +1 -0
  28. package/dist/constants.es.js +240 -0
  29. package/dist/constants.es.js.map +1 -0
  30. package/dist/control-serialization.cjs.js +91 -0
  31. package/dist/control-serialization.cjs.js.map +1 -0
  32. package/dist/control-serialization.es.js +87 -0
  33. package/dist/control-serialization.es.js.map +1 -0
  34. package/dist/descriptors.cjs.js +34 -3
  35. package/dist/descriptors.cjs.js.map +1 -1
  36. package/dist/descriptors.es.js +3 -4
  37. package/dist/descriptors.es.js.map +1 -1
  38. package/dist/instances.cjs.js +106 -0
  39. package/dist/instances.cjs.js.map +1 -0
  40. package/dist/instances.es.js +103 -0
  41. package/dist/instances.es.js.map +1 -0
  42. package/dist/main.cjs.js +13 -2
  43. package/dist/main.cjs.js.map +1 -1
  44. package/dist/main.es.js +5 -1
  45. package/dist/main.es.js.map +1 -1
  46. package/dist/next.cjs.js +171 -0
  47. package/dist/next.cjs.js.map +1 -0
  48. package/dist/next.es.js +161 -0
  49. package/dist/next.es.js.map +1 -0
  50. package/dist/prop-controllers.cjs.js +4 -2
  51. package/dist/prop-controllers.cjs.js.map +1 -1
  52. package/dist/prop-controllers.es.js +1 -0
  53. package/dist/prop-controllers.es.js.map +1 -1
  54. package/dist/react-builder-preview.cjs.js +271 -4131
  55. package/dist/react-builder-preview.cjs.js.map +1 -1
  56. package/dist/react-builder-preview.es.js +262 -4126
  57. package/dist/react-builder-preview.es.js.map +1 -1
  58. package/dist/react-page.cjs.js +262 -0
  59. package/dist/react-page.cjs.js.map +1 -0
  60. package/dist/react-page.es.js +241 -0
  61. package/dist/react-page.es.js.map +1 -0
  62. package/dist/react.cjs.js +28 -3
  63. package/dist/react.cjs.js.map +1 -1
  64. package/dist/react.cjs2.js +7556 -649
  65. package/dist/react.cjs2.js.map +1 -1
  66. package/dist/react.es.js +25 -1
  67. package/dist/react.es.js.map +1 -1
  68. package/dist/react.es2.js +7486 -627
  69. package/dist/react.es2.js.map +1 -1
  70. package/dist/types/api/constants.d.ts +4 -0
  71. package/dist/types/api/constants.d.ts.map +1 -0
  72. package/dist/types/api/generated/graphql.d.ts +120 -0
  73. package/dist/types/api/generated/graphql.d.ts.map +1 -0
  74. package/dist/types/api/index.d.ts +3 -0
  75. package/dist/types/api/index.d.ts.map +1 -0
  76. package/dist/types/api/react.d.ts +8 -0
  77. package/dist/types/api/react.d.ts.map +1 -0
  78. package/dist/types/api/types.d.ts +4 -0
  79. package/dist/types/api/types.d.ts.map +1 -0
  80. package/dist/types/builder/index.d.ts +2 -0
  81. package/dist/types/builder/index.d.ts.map +1 -0
  82. package/dist/types/builder/serialization/control-serialization.d.ts +30 -0
  83. package/dist/types/builder/serialization/control-serialization.d.ts.map +1 -0
  84. package/dist/types/builder/serialization/function-serialization.d.ts +11 -0
  85. package/dist/types/builder/serialization/function-serialization.d.ts.map +1 -0
  86. package/dist/types/builder/serialization/index.d.ts +3 -0
  87. package/dist/types/builder/serialization/index.d.ts.map +1 -0
  88. package/dist/types/components/builtin/Box/Box.d.ts +5 -2
  89. package/dist/types/components/builtin/Box/Box.d.ts.map +1 -1
  90. package/dist/types/components/builtin/Box/index.d.ts +1 -1
  91. package/dist/types/components/builtin/Box/index.d.ts.map +1 -1
  92. package/dist/types/components/builtin/Button/Button.d.ts +5 -2
  93. package/dist/types/components/builtin/Button/Button.d.ts.map +1 -1
  94. package/dist/types/components/builtin/Button/index.d.ts +1 -1
  95. package/dist/types/components/builtin/Button/index.d.ts.map +1 -1
  96. package/dist/types/components/builtin/Carousel/Carousel.d.ts +5 -2
  97. package/dist/types/components/builtin/Carousel/Carousel.d.ts.map +1 -1
  98. package/dist/types/components/builtin/Carousel/index.d.ts +1 -1
  99. package/dist/types/components/builtin/Carousel/index.d.ts.map +1 -1
  100. package/dist/types/components/builtin/Countdown/Countdown.d.ts +5 -2
  101. package/dist/types/components/builtin/Countdown/Countdown.d.ts.map +1 -1
  102. package/dist/types/components/builtin/Countdown/index.d.ts +1 -1
  103. package/dist/types/components/builtin/Countdown/index.d.ts.map +1 -1
  104. package/dist/types/components/builtin/Divider/Divider.d.ts +5 -2
  105. package/dist/types/components/builtin/Divider/Divider.d.ts.map +1 -1
  106. package/dist/types/components/builtin/Divider/index.d.ts +1 -1
  107. package/dist/types/components/builtin/Divider/index.d.ts.map +1 -1
  108. package/dist/types/components/builtin/Embed/Embed.d.ts +5 -2
  109. package/dist/types/components/builtin/Embed/Embed.d.ts.map +1 -1
  110. package/dist/types/components/builtin/Embed/index.d.ts +1 -1
  111. package/dist/types/components/builtin/Embed/index.d.ts.map +1 -1
  112. package/dist/types/components/builtin/Form/Form.d.ts +41 -0
  113. package/dist/types/components/builtin/Form/Form.d.ts.map +1 -0
  114. package/dist/types/components/builtin/Form/components/Field/components/Checkbox/index.d.ts +15 -0
  115. package/dist/types/components/builtin/Form/components/Field/components/Checkbox/index.d.ts.map +1 -0
  116. package/dist/types/components/builtin/Form/components/Field/components/CheckboxTableField/index.d.ts +15 -0
  117. package/dist/types/components/builtin/Form/components/Field/components/CheckboxTableField/index.d.ts.map +1 -0
  118. package/dist/types/components/builtin/Form/components/Field/components/EmailTableField/index.d.ts +11 -0
  119. package/dist/types/components/builtin/Form/components/Field/components/EmailTableField/index.d.ts.map +1 -0
  120. package/dist/types/components/builtin/Form/components/Field/components/Input/index.d.ts +14 -0
  121. package/dist/types/components/builtin/Form/components/Field/components/Input/index.d.ts.map +1 -0
  122. package/dist/types/components/builtin/Form/components/Field/components/Label/index.d.ts +16 -0
  123. package/dist/types/components/builtin/Form/components/Field/components/Label/index.d.ts.map +1 -0
  124. package/dist/types/components/builtin/Form/components/Field/components/LongTextTableField/index.d.ts +10 -0
  125. package/dist/types/components/builtin/Form/components/Field/components/LongTextTableField/index.d.ts.map +1 -0
  126. package/dist/types/components/builtin/Form/components/Field/components/MultipleSelectTableField/index.d.ts +23 -0
  127. package/dist/types/components/builtin/Form/components/Field/components/MultipleSelectTableField/index.d.ts.map +1 -0
  128. package/dist/types/components/builtin/Form/components/Field/components/NumberTableField/index.d.ts +11 -0
  129. package/dist/types/components/builtin/Form/components/Field/components/NumberTableField/index.d.ts.map +1 -0
  130. package/dist/types/components/builtin/Form/components/Field/components/PhoneNumberTableField/index.d.ts +11 -0
  131. package/dist/types/components/builtin/Form/components/Field/components/PhoneNumberTableField/index.d.ts.map +1 -0
  132. package/dist/types/components/builtin/Form/components/Field/components/PlaceholderTableField/index.d.ts +3 -0
  133. package/dist/types/components/builtin/Form/components/Field/components/PlaceholderTableField/index.d.ts.map +1 -0
  134. package/dist/types/components/builtin/Form/components/Field/components/RadioButton/index.d.ts +17 -0
  135. package/dist/types/components/builtin/Form/components/Field/components/RadioButton/index.d.ts.map +1 -0
  136. package/dist/types/components/builtin/Form/components/Field/components/SingleLineTextTableField/index.d.ts +11 -0
  137. package/dist/types/components/builtin/Form/components/Field/components/SingleLineTextTableField/index.d.ts.map +1 -0
  138. package/dist/types/components/builtin/Form/components/Field/components/SingleSelectTableField/components/TableColumnRadioButtonGroup/index.d.ts +23 -0
  139. package/dist/types/components/builtin/Form/components/Field/components/SingleSelectTableField/components/TableColumnRadioButtonGroup/index.d.ts.map +1 -0
  140. package/dist/types/components/builtin/Form/components/Field/components/SingleSelectTableField/components/TableColumnSingleSelect/index.d.ts +19 -0
  141. package/dist/types/components/builtin/Form/components/Field/components/SingleSelectTableField/components/TableColumnSingleSelect/index.d.ts.map +1 -0
  142. package/dist/types/components/builtin/Form/components/Field/components/SingleSelectTableField/index.d.ts +24 -0
  143. package/dist/types/components/builtin/Form/components/Field/components/SingleSelectTableField/index.d.ts.map +1 -0
  144. package/dist/types/components/builtin/Form/components/Field/components/TextArea/index.d.ts +13 -0
  145. package/dist/types/components/builtin/Form/components/Field/components/TextArea/index.d.ts.map +1 -0
  146. package/dist/types/components/builtin/Form/components/Field/components/URLTableField/index.d.ts +11 -0
  147. package/dist/types/components/builtin/Form/components/Field/components/URLTableField/index.d.ts.map +1 -0
  148. package/dist/types/components/builtin/Form/components/Field/index.d.ts +19 -0
  149. package/dist/types/components/builtin/Form/components/Field/index.d.ts.map +1 -0
  150. package/dist/types/components/builtin/Form/components/Field/services/cssField.d.ts +11 -0
  151. package/dist/types/components/builtin/Form/components/Field/services/cssField.d.ts.map +1 -0
  152. package/dist/types/components/{Embed/Embed.d.ts → builtin/Form/components/Placeholder/index.d.ts} +2 -4
  153. package/dist/types/components/builtin/Form/components/Placeholder/index.d.ts.map +1 -0
  154. package/dist/types/components/builtin/Form/components/Spinner/index.d.ts +3 -0
  155. package/dist/types/components/builtin/Form/components/Spinner/index.d.ts.map +1 -0
  156. package/dist/types/components/builtin/Form/context/FormContext.d.ts +32 -0
  157. package/dist/types/components/builtin/Form/context/FormContext.d.ts.map +1 -0
  158. package/dist/types/components/builtin/Form/index.d.ts +2 -0
  159. package/dist/types/components/builtin/Form/index.d.ts.map +1 -0
  160. package/dist/types/components/builtin/Image/Image.d.ts +5 -2
  161. package/dist/types/components/builtin/Image/Image.d.ts.map +1 -1
  162. package/dist/types/components/builtin/Image/index.d.ts +1 -1
  163. package/dist/types/components/builtin/Image/index.d.ts.map +1 -1
  164. package/dist/types/components/builtin/Navigation/Navigation.d.ts +5 -2
  165. package/dist/types/components/builtin/Navigation/Navigation.d.ts.map +1 -1
  166. package/dist/types/components/builtin/Navigation/index.d.ts +1 -1
  167. package/dist/types/components/builtin/Navigation/index.d.ts.map +1 -1
  168. package/dist/types/components/builtin/Root/Root.d.ts +5 -2
  169. package/dist/types/components/builtin/Root/Root.d.ts.map +1 -1
  170. package/dist/types/components/builtin/Root/index.d.ts +1 -1
  171. package/dist/types/components/builtin/Root/index.d.ts.map +1 -1
  172. package/dist/types/components/builtin/SocialLinks/SocialLinks.d.ts +5 -2
  173. package/dist/types/components/builtin/SocialLinks/SocialLinks.d.ts.map +1 -1
  174. package/dist/types/components/builtin/SocialLinks/index.d.ts +1 -1
  175. package/dist/types/components/builtin/SocialLinks/index.d.ts.map +1 -1
  176. package/dist/types/components/builtin/Text/Text.d.ts +19 -0
  177. package/dist/types/components/builtin/Text/Text.d.ts.map +1 -0
  178. package/dist/types/components/builtin/Text/components/RichTextEditor/components/Block/index.d.ts +24 -0
  179. package/dist/types/components/builtin/Text/components/RichTextEditor/components/Block/index.d.ts.map +1 -0
  180. package/dist/types/components/builtin/Text/components/RichTextEditor/components/Mark/hooks/useTypographyMark.d.ts +25 -0
  181. package/dist/types/components/builtin/Text/components/RichTextEditor/components/Mark/hooks/useTypographyMark.d.ts.map +1 -0
  182. package/dist/types/components/builtin/Text/components/RichTextEditor/components/Mark/index.d.ts +13 -0
  183. package/dist/types/components/builtin/Text/components/RichTextEditor/components/Mark/index.d.ts.map +1 -0
  184. package/dist/types/components/builtin/Text/components/RichTextEditor/index.d.ts +5 -0
  185. package/dist/types/components/builtin/Text/components/RichTextEditor/index.d.ts.map +1 -0
  186. package/dist/types/components/builtin/Text/components/RichTextEditor/plugins/DeviceOverridesBlocks.d.ts +3 -0
  187. package/dist/types/components/builtin/Text/components/RichTextEditor/plugins/DeviceOverridesBlocks.d.ts.map +1 -0
  188. package/dist/types/components/builtin/Text/components/RichTextEditor/plugins/DeviceOverridesMarks.d.ts +3 -0
  189. package/dist/types/components/builtin/Text/components/RichTextEditor/plugins/DeviceOverridesMarks.d.ts.map +1 -0
  190. package/dist/types/components/builtin/Text/components/RichTextEditor/plugins/Inlines.d.ts +3 -0
  191. package/dist/types/components/builtin/Text/components/RichTextEditor/plugins/Inlines.d.ts.map +1 -0
  192. package/dist/types/components/builtin/Text/components/RichTextEditor/plugins/Link.d.ts +3 -0
  193. package/dist/types/components/builtin/Text/components/RichTextEditor/plugins/Link.d.ts.map +1 -0
  194. package/dist/types/components/builtin/Text/index.d.ts +2 -0
  195. package/dist/types/components/builtin/Text/index.d.ts.map +1 -0
  196. package/dist/types/components/builtin/index.d.ts +4 -0
  197. package/dist/types/components/builtin/index.d.ts.map +1 -1
  198. package/dist/types/components/hooks/index.d.ts +1 -0
  199. package/dist/types/components/hooks/index.d.ts.map +1 -1
  200. package/dist/types/components/hooks/useBackgrounds.d.ts.map +1 -1
  201. package/dist/types/components/hooks/useBorder.d.ts.map +1 -1
  202. package/dist/types/components/hooks/useBoxShadow.d.ts.map +1 -1
  203. package/dist/types/components/hooks/useColor.d.ts.map +1 -1
  204. package/dist/types/components/hooks/useFile.d.ts.map +1 -1
  205. package/dist/types/components/hooks/usePage.d.ts.map +1 -1
  206. package/dist/types/components/hooks/useTable.d.ts +66 -0
  207. package/dist/types/components/hooks/useTable.d.ts.map +1 -0
  208. package/dist/types/components/hooks/useTableFormFieldRefs.d.ts +8 -0
  209. package/dist/types/components/hooks/useTableFormFieldRefs.d.ts.map +1 -0
  210. package/dist/types/components/hooks/useTypography.d.ts +24 -0
  211. package/dist/types/components/hooks/useTypography.d.ts.map +1 -0
  212. package/dist/types/components/index.d.ts +1 -0
  213. package/dist/types/components/index.d.ts.map +1 -1
  214. package/dist/types/components/utils/devices.d.ts +1 -0
  215. package/dist/types/components/utils/devices.d.ts.map +1 -1
  216. package/dist/types/components/utils/queries.d.ts +7 -4
  217. package/dist/types/components/utils/queries.d.ts.map +1 -1
  218. package/dist/types/components/utils/types.d.ts +1 -2
  219. package/dist/types/components/utils/types.d.ts.map +1 -1
  220. package/dist/types/index.d.ts +2 -1
  221. package/dist/types/index.d.ts.map +1 -1
  222. package/dist/types/next.d.ts +21 -0
  223. package/dist/types/next.d.ts.map +1 -0
  224. package/dist/types/prop-controllers/descriptors.d.ts +9 -8
  225. package/dist/types/prop-controllers/descriptors.d.ts.map +1 -1
  226. package/dist/types/prop-controllers/index.d.ts +3 -1
  227. package/dist/types/prop-controllers/index.d.ts.map +1 -1
  228. package/dist/types/prop-controllers/instances.d.ts +95 -4
  229. package/dist/types/prop-controllers/instances.d.ts.map +1 -1
  230. package/dist/types/react.d.ts +1 -1
  231. package/dist/types/react.d.ts.map +1 -1
  232. package/dist/types/runtimes/react.d.ts +25 -12
  233. package/dist/types/runtimes/react.d.ts.map +1 -1
  234. package/dist/types/state/actions.d.ts +153 -13
  235. package/dist/types/state/actions.d.ts.map +1 -1
  236. package/dist/types/state/modules/box-models.d.ts +5 -5
  237. package/dist/types/state/modules/box-models.d.ts.map +1 -1
  238. package/dist/types/state/modules/prop-controller-handles.d.ts +4 -8
  239. package/dist/types/state/modules/prop-controller-handles.d.ts.map +1 -1
  240. package/dist/types/state/modules/read-only-documents.d.ts +8 -4
  241. package/dist/types/state/modules/read-only-documents.d.ts.map +1 -1
  242. package/dist/types/state/modules/read-write-documents.d.ts +1 -1
  243. package/dist/types/state/modules/read-write-documents.d.ts.map +1 -1
  244. package/dist/types/state/react-builder-preview.d.ts +5 -1
  245. package/dist/types/state/react-builder-preview.d.ts.map +1 -1
  246. package/dist/types/state/react-page.d.ts +4 -3
  247. package/dist/types/state/react-page.d.ts.map +1 -1
  248. package/dist/types/utils/coalesce.d.ts +3 -0
  249. package/dist/types/utils/coalesce.d.ts.map +1 -0
  250. package/dist/types/utils/constants.d.ts +6 -0
  251. package/dist/types/utils/constants.d.ts.map +1 -0
  252. package/dist/types/utils/intersection.d.ts +4 -0
  253. package/dist/types/utils/intersection.d.ts.map +1 -0
  254. package/dist/types/utils/keys.d.ts +5 -0
  255. package/dist/types/utils/keys.d.ts.map +1 -0
  256. package/dist/types/utils/shallowMerge.d.ts +2 -0
  257. package/dist/types/utils/shallowMerge.d.ts.map +1 -0
  258. package/next.js +1 -0
  259. package/package.json +57 -25
  260. package/dist/types/components/BackgroundsContainer/components/BackgroundVideo/index.d.ts +0 -11
  261. package/dist/types/components/BackgroundsContainer/components/BackgroundVideo/index.d.ts.map +0 -1
  262. package/dist/types/components/BackgroundsContainer/components/Backgrounds/index.d.ts +0 -8
  263. package/dist/types/components/BackgroundsContainer/components/Backgrounds/index.d.ts.map +0 -1
  264. package/dist/types/components/BackgroundsContainer/components/Parallax/index.d.ts +0 -11
  265. package/dist/types/components/BackgroundsContainer/components/Parallax/index.d.ts.map +0 -1
  266. package/dist/types/components/BackgroundsContainer/index.d.ts +0 -11
  267. package/dist/types/components/BackgroundsContainer/index.d.ts.map +0 -1
  268. package/dist/types/components/Box/Box.d.ts +0 -30
  269. package/dist/types/components/Box/Box.d.ts.map +0 -1
  270. package/dist/types/components/Box/animations.d.ts +0 -69
  271. package/dist/types/components/Box/animations.d.ts.map +0 -1
  272. package/dist/types/components/Box/components/Placeholder/index.d.ts +0 -7
  273. package/dist/types/components/Box/components/Placeholder/index.d.ts.map +0 -1
  274. package/dist/types/components/Box/index.d.ts +0 -3
  275. package/dist/types/components/Box/index.d.ts.map +0 -1
  276. package/dist/types/components/Carousel/Carousel.d.ts +0 -25
  277. package/dist/types/components/Carousel/Carousel.d.ts.map +0 -1
  278. package/dist/types/components/Carousel/index.d.ts +0 -2
  279. package/dist/types/components/Carousel/index.d.ts.map +0 -1
  280. package/dist/types/components/Countdown/Countdown.d.ts +0 -24
  281. package/dist/types/components/Countdown/Countdown.d.ts.map +0 -1
  282. package/dist/types/components/Countdown/index.d.ts +0 -2
  283. package/dist/types/components/Countdown/index.d.ts.map +0 -1
  284. package/dist/types/components/Divider/Divider.d.ts +0 -14
  285. package/dist/types/components/Divider/Divider.d.ts.map +0 -1
  286. package/dist/types/components/Divider/index.d.ts +0 -2
  287. package/dist/types/components/Divider/index.d.ts.map +0 -1
  288. package/dist/types/components/Embed/Embed.d.ts.map +0 -1
  289. package/dist/types/components/Embed/index.d.ts +0 -2
  290. package/dist/types/components/Embed/index.d.ts.map +0 -1
  291. package/dist/types/components/Image/Image.d.ts +0 -26
  292. package/dist/types/components/Image/Image.d.ts.map +0 -1
  293. package/dist/types/components/Image/index.d.ts +0 -2
  294. package/dist/types/components/Image/index.d.ts.map +0 -1
  295. package/dist/types/components/Link/index.d.ts +0 -9
  296. package/dist/types/components/Link/index.d.ts.map +0 -1
  297. package/dist/types/components/RichText/index.d.ts +0 -5
  298. package/dist/types/components/RichText/index.d.ts.map +0 -1
  299. package/dist/types/components/Root/Root.d.ts +0 -11
  300. package/dist/types/components/Root/Root.d.ts.map +0 -1
  301. package/dist/types/components/Root/components/Placeholder/index.d.ts +0 -5
  302. package/dist/types/components/Root/components/Placeholder/index.d.ts.map +0 -1
  303. package/dist/types/components/Root/index.d.ts +0 -2
  304. package/dist/types/components/Root/index.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/prop-controllers/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,UAAU,IAAI,wBAAwB,EACtC,mBAAmB,IAAI,iCAAiC,EACxD,eAAe,EACf,MAAM,EACN,cAAc,EACd,eAAe,EACf,mBAAmB,EACnB,MAAM,GACP,MAAM,eAAe,CAAA;AACtB,OAAO,KAAK,KAAK,MAAM,eAAe,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/prop-controllers/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,IAAI,EACJ,UAAU,IAAI,wBAAwB,EACtC,mBAAmB,IAAI,iCAAiC,EACxD,MAAM,EACN,cAAc,EACd,MAAM,EACN,cAAc,EACd,SAAS,EACT,WAAW,EACX,eAAe,EACf,eAAe,EACf,mBAAmB,GACpB,MAAM,eAAe,CAAA;AACtB,OAAO,KAAK,KAAK,MAAM,eAAe,CAAA;AACtC,YAAY,EACV,qBAAqB,EACrB,6BAA6B,EAC7B,sBAAsB,GACvB,MAAM,aAAa,CAAA;AACpB,OAAO,EAAE,iCAAiC,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAA"}
@@ -1,10 +1,101 @@
1
- import type { Descriptor } from './descriptors';
2
- declare type Send<T> = (message: T) => void;
3
- export declare abstract class PropController<T = unknown> {
1
+ import { Editor } from 'slate-react';
2
+ import { ValueJSON } from 'slate';
3
+ import { OnChangeParam } from 'slate-react';
4
+ import { Descriptor, RichTextDescriptor, TableFormFieldsDescriptor, Types } from './descriptors';
5
+ import { BuilderEditMode } from '../utils/constants';
6
+ import { BoxModel } from '../state/modules/box-models';
7
+ export declare const RichTextPropControllerMessageType: {
8
+ readonly CHANGE_BUILDER_EDIT_MODE: "CHANGE_BUILDER_EDIT_MODE";
9
+ readonly INITIALIZE_EDITOR: "INITIALIZE_EDITOR";
10
+ readonly CHANGE_EDITOR_VALUE: "CHANGE_EDITOR_VALUE";
11
+ readonly FOCUS: "FOCUS";
12
+ readonly BLUR: "BLUR";
13
+ readonly UNDO: "UNDO";
14
+ readonly REDO: "REDO";
15
+ };
16
+ declare type ChangeBuilderEditModeRichTextPropControllerMessage = {
17
+ type: typeof RichTextPropControllerMessageType.CHANGE_BUILDER_EDIT_MODE;
18
+ editMode: BuilderEditMode;
19
+ };
20
+ declare type InitializeEditorRichTextPropControllerMessage = {
21
+ type: typeof RichTextPropControllerMessageType.INITIALIZE_EDITOR;
22
+ value: ValueJSON;
23
+ };
24
+ declare type ChangeEditorValueRichTextPropControllerMessage = {
25
+ type: typeof RichTextPropControllerMessageType.CHANGE_EDITOR_VALUE;
26
+ value: ValueJSON;
27
+ };
28
+ declare type FocusRichTextPropControllerMessage = {
29
+ type: typeof RichTextPropControllerMessageType.FOCUS;
30
+ };
31
+ declare type BlurRichTextPropControllerMessage = {
32
+ type: typeof RichTextPropControllerMessageType.BLUR;
33
+ };
34
+ declare type UndoRichTextPropControllerMessage = {
35
+ type: typeof RichTextPropControllerMessageType.UNDO;
36
+ };
37
+ declare type RedoRichTextPropControllerMessage = {
38
+ type: typeof RichTextPropControllerMessageType.REDO;
39
+ };
40
+ export declare type RichTextPropControllerMessage = ChangeBuilderEditModeRichTextPropControllerMessage | InitializeEditorRichTextPropControllerMessage | ChangeEditorValueRichTextPropControllerMessage | FocusRichTextPropControllerMessage | BlurRichTextPropControllerMessage | UndoRichTextPropControllerMessage | RedoRichTextPropControllerMessage;
41
+ export declare type PropControllerMessage = RichTextPropControllerMessage | TableFormFieldsMessage;
42
+ declare type Send<T = PropControllerMessage> = (message: T) => void;
43
+ export declare abstract class PropController<T = PropControllerMessage> {
4
44
  protected send: Send<T>;
5
45
  constructor(send: Send<T>);
6
46
  abstract recv(message: T): void;
7
47
  }
8
- export declare function createPropController(descriptor: Descriptor, send: (message: unknown) => void): PropController;
48
+ declare class DefaultPropController extends PropController {
49
+ recv(_message: PropControllerMessage): void;
50
+ }
51
+ declare class RichTextPropController extends PropController<RichTextPropControllerMessage> {
52
+ private editor;
53
+ recv(message: RichTextPropControllerMessage): void;
54
+ setSlateEditor(editor: Editor): void;
55
+ onChange(change: OnChangeParam): void;
56
+ focus(): void;
57
+ blur(): void;
58
+ undo(): void;
59
+ redo(): void;
60
+ }
61
+ export declare const TableFormFieldsMessageType: {
62
+ readonly TABLE_FORM_LAYOUT_CHANGE: "TABLE_FORM_LAYOUT_CHANGE";
63
+ readonly TABLE_FORM_FIELD_LAYOUT_CHANGE: "TABLE_FORM_FIELD_LAYOUT_CHANGE";
64
+ };
65
+ declare type TableLayoutTableFormFieldsMessage = {
66
+ type: typeof TableFormFieldsMessageType.TABLE_FORM_LAYOUT_CHANGE;
67
+ payload: {
68
+ layout: BoxModel;
69
+ };
70
+ };
71
+ declare type TableFieldLayoutTableFormFieldsMessage = {
72
+ type: typeof TableFormFieldsMessageType.TABLE_FORM_FIELD_LAYOUT_CHANGE;
73
+ payload: {
74
+ layout: BoxModel;
75
+ index: number;
76
+ };
77
+ };
78
+ export declare type TableFormFieldsMessage = TableLayoutTableFormFieldsMessage | TableFieldLayoutTableFormFieldsMessage;
79
+ export declare class TableFormFieldsPropController extends PropController<TableFormFieldsMessage> {
80
+ recv(): void;
81
+ tableFormLayoutChange(payload: {
82
+ layout: BoxModel;
83
+ }): void;
84
+ tableFormFieldLayoutChange(payload: {
85
+ layout: BoxModel;
86
+ index: number;
87
+ }): void;
88
+ }
89
+ declare type DescriptorPropController<T extends Descriptor> = T extends {
90
+ type: typeof Types.RichText;
91
+ } ? RichTextPropController : T extends {
92
+ type: typeof Types.TableFormFields;
93
+ } ? TableFormFieldsPropController : DefaultPropController;
94
+ export declare type DescriptorsPropControllers<T extends Record<string, Descriptor>> = {
95
+ [K in keyof T]: undefined extends T[K] ? DescriptorPropController<Exclude<T[K], undefined>> : DescriptorPropController<T[K]>;
96
+ };
97
+ export declare function createPropController(descriptor: RichTextDescriptor, send: Send<RichTextPropControllerMessage>): RichTextPropController;
98
+ export declare function createPropController(descriptor: TableFormFieldsDescriptor, send: Send<TableFormFieldsMessage>): TableFormFieldsPropController;
99
+ export declare function createPropController(descriptor: Descriptor, send: Send): DefaultPropController;
9
100
  export {};
10
101
  //# sourceMappingURL=instances.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"instances.d.ts","sourceRoot":"","sources":["../../../src/prop-controllers/instances.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CA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AAC;CACnC,CAAA;AAOD,wBAAgB,oBAAoB,CAClC,UAAU,EAAE,kBAAkB,EAC9B,IAAI,EAAE,IAAI,CAAC,6BAA6B,CAAC,GACxC,sBAAsB,CAAA;AACzB,wBAAgB,oBAAoB,CAClC,UAAU,EAAE,yBAAyB,EACrC,IAAI,EAAE,IAAI,CAAC,sBAAsB,CAAC,GACjC,6BAA6B,CAAA;AAChC,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,GAAG,qBAAqB,CAAA"}
@@ -1,4 +1,4 @@
1
1
  export type { Action } from './state/actions';
2
2
  export { ActionTypes, changeDocument } from './state/actions';
3
- export { Document, Element, RuntimeProvider, ReactRuntime, useIsInBuilder } from './runtimes/react';
3
+ export { Element, RuntimeProvider, ReactRuntime, useIsInBuilder, DocumentReference, PageProvider, usePageId, } from './runtimes/react';
4
4
  //# sourceMappingURL=react.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../../src/react.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AAC7C,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAC7D,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA"}
1
+ {"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../../src/react.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AAC7C,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAC7D,OAAO,EACL,OAAO,EACP,eAAe,EACf,YAAY,EACZ,cAAc,EACd,iBAAiB,EACjB,YAAY,EACZ,SAAS,GACV,MAAM,kBAAkB,CAAA"}
@@ -1,30 +1,43 @@
1
- import { ReactNode } from 'react';
1
+ import { ComponentPropsWithoutRef, ReactNode } from 'react';
2
2
  import * as ReactPage from '../state/react-page';
3
3
  import type { PropControllerDescriptor, PropControllerDescriptorValueType } from '../prop-controllers';
4
4
  import { ComponentIcon } from '../state/modules/components-meta';
5
- export declare const ReactRuntime: {
6
- registerComponent<P extends Record<string, PropControllerDescriptor<ReactPage.Data>>, C extends ReactPage.ComponentType<{ [K in keyof P]?: PropControllerDescriptorValueType<P[K]> | undefined; }, any>>(component: C, { type, label, icon, hidden, props, }: {
5
+ export interface ReactRuntime {
6
+ registerComponent<P extends Record<string, PropControllerDescriptor>, C extends ReactPage.ComponentType<{
7
+ [K in keyof P]?: PropControllerDescriptorValueType<P[K]>;
8
+ }>>(component: C, meta: {
7
9
  type: string;
8
10
  label: string;
9
- icon?: ComponentIcon | undefined;
10
- hidden?: boolean | undefined;
11
- props?: P | undefined;
11
+ icon?: ComponentIcon;
12
+ hidden?: boolean;
13
+ props?: P;
12
14
  }): () => void;
13
- };
15
+ }
16
+ export declare function createReactRuntime(store: ReactPage.Store): ReactRuntime;
17
+ export declare const ReactRuntime: ReactRuntime;
14
18
  declare type RuntimeProviderProps = {
15
19
  defaultRootElements?: Map<string, ReactPage.Element>;
16
20
  children?: ReactNode;
21
+ registerComponents?: (runtime: ReactRuntime) => () => void;
22
+ makeswiftApiEndpoint?: string;
23
+ };
24
+ export declare function RuntimeProvider({ children, defaultRootElements, registerComponents, makeswiftApiEndpoint, }: RuntimeProviderProps): JSX.Element;
25
+ declare const PageContext: import("react").Context<string | null>;
26
+ export declare function usePageId(): string;
27
+ declare type PageProviderProps = {
28
+ id: string;
29
+ children: ComponentPropsWithoutRef<typeof PageContext['Provider']>['children'];
17
30
  };
18
- export declare function RuntimeProvider({ children, defaultRootElements, }: RuntimeProviderProps): JSX.Element;
31
+ export declare function PageProvider({ id, children }: PageProviderProps): JSX.Element;
19
32
  export declare function useElementId(elementKey: string | null | undefined): string | null;
20
33
  export declare function useIsInBuilder(): boolean;
21
34
  declare type ElementProps = {
22
35
  element: ReactPage.Element;
23
36
  };
24
- export declare const Element: import("react").NamedExoticComponent<ElementProps>;
25
- declare type DocumentProps = {
26
- documentKey: string;
37
+ export declare const Element: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<ElementProps & import("react").RefAttributes<unknown>>>;
38
+ declare type DocumentReferenceProps = {
39
+ documentReference: ReactPage.DocumentReference;
27
40
  };
28
- export declare const Document: import("react").NamedExoticComponent<DocumentProps>;
41
+ export declare const DocumentReference: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<DocumentReferenceProps & import("react").RefAttributes<unknown>>>;
29
42
  export {};
30
43
  //# sourceMappingURL=react.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../../../src/runtimes/react.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,SAAS,EAMV,MAAM,OAAO,CAAA;AAGd,OAAO,KAAK,SAAS,MAAM,qBAAqB,CAAA;AAQhD,OAAO,KAAK,EACV,wBAAwB,EACxB,iCAAiC,EAClC,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAA;AAIhE,eAAO,MAAM,YAAY;;cAYV,MAAM;eAAS,MAAM;;;;QAC/B,MAAM,IAAI;CAcd,CAAA;AAID,aAAK,oBAAoB,GAAG;IAC1B,mBAAmB,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,SAAS,CAAC,OAAO,CAAC,CAAA;IACpD,QAAQ,CAAC,EAAE,SAAS,CAAA;CACrB,CAAA;AAED,wBAAgB,eAAe,CAAC,EAC9B,QAAQ,EACR,mBAAmB,GACpB,EAAE,oBAAoB,GAAG,GAAG,CAAC,OAAO,CAwCpC;AAoBD,wBAAgB,YAAY,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,IAAI,CAQjF;AAMD,wBAAgB,cAAc,IAAI,OAAO,CAExC;AAwDD,aAAK,YAAY,GAAG;IACl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AC,EAAE,SAAS,CAAA;IACpB,kBAAkB,CAAC,EAAE,CAAC,OAAO,EAAE,YAAY,KAAK,MAAM,IAAI,CAAA;IAC1D,oBAAoB,CAAC,EAAE,MAAM,CAAA;CAC9B,CAAA;AAED,wBAAgB,eAAe,CAAC,EAC9B,QAAQ,EACR,mBAAmB,EACnB,kBAAkB,EAClB,oBAAoB,GACrB,EAAE,oBAAoB,GAAG,GAAG,CAAC,OAAO,CA+EpC;AAED,QAAA,MAAM,WAAW,wCAAqC,CAAA;AAMtD,wBAAgB,SAAS,IAAI,MAAM,CAMlC;AAED,aAAK,iBAAiB,GAAG;IACvB,EAAE,EAAE,MAAM,CAAA;IACV,QAAQ,EAAE,wBAAwB,CAAC,OAAO,WAAW,CAAC,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAA;CAC/E,CAAA;AAED,wBAAgB,YAAY,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,iBAAiB,eAE/D;AAoBD,wBAAgB,YAAY,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,IAAI,CAQjF;AAMD,wBAAgB,cAAc,IAAI,OAAO,CAExC;AAyFD,aAAK,YAAY,GAAG;IAClB,OAAO,EAAE,SAAS,CAAC,OAAO,CAAA;CAC3B,CAAA;AAED,eAAO,MAAM,OAAO,uIA2BnB,CAAA;AAgBD,aAAK,sBAAsB,GAAG;IAC5B,iBAAiB,EAAE,SAAS,CAAC,iBAAiB,CAAA;CAC/C,CAAA;AAED,eAAO,MAAM,iBAAiB,iJAoB7B,CAAA"}
@@ -1,24 +1,63 @@
1
1
  import type { Operation } from 'ot-json0';
2
+ import type { Document } from './modules/read-only-documents';
2
3
  import type { ComponentType } from './modules/react-components';
3
4
  import type { Measurable, BoxModel } from './modules/box-models';
4
5
  import type { ThunkAction } from 'redux-thunk';
5
6
  import { ComponentMeta } from './modules/components-meta';
6
7
  import { PropControllerDescriptor } from '../prop-controllers';
7
8
  import type { Size } from './react-builder-preview';
9
+ import type { PropControllersHandle } from './modules/prop-controller-handles';
10
+ import type { PropController, PropControllerMessage } from '../prop-controllers/instances';
11
+ import type { APIResource } from '../api/types';
12
+ import type { SerializedControl } from '../builder';
8
13
  export declare const ActionTypes: {
14
+ readonly INIT: "INIT";
15
+ readonly CLEAN_UP: "CLEAN_UP";
16
+ readonly REGISTER_DOCUMENT: "REGISTER_DOCUMENT";
17
+ readonly UNREGISTER_DOCUMENT: "UNREGISTER_DOCUMENT";
9
18
  readonly CHANGE_DOCUMENT: "CHANGE_DOCUMENT";
10
19
  readonly REGISTER_COMPONENT: "REGISTER_COMPONENT";
11
20
  readonly UNREGISTER_COMPONENT: "UNREGISTER_COMPONENT";
21
+ readonly REGISTER_BUILDER_COMPONENT: "REGISTER_BUILDER_COMPONENT";
22
+ readonly UNREGISTER_BUILDER_COMPONENT: "UNREGISTER_BUILDER_COMPONENT";
12
23
  readonly REGISTER_REACT_COMPONENT: "REGISTER_REACT_COMPONENT";
13
24
  readonly UNREGISTER_REACT_COMPONENT: "UNREGISTER_REACT_COMPONENT";
14
25
  readonly MOUNT_COMPONENT: "MOUNT_COMPONENT";
15
26
  readonly UNMOUNT_COMPONENT: "UNMOUNT_COMPONENT";
16
- readonly CHANGE_COMPONENT_HANDLE: "CHANGE_COMPONENT_HANDLE";
27
+ readonly REGISTER_COMPONENT_HANDLE: "REGISTER_COMPONENT_HANDLE";
28
+ readonly UNREGISTER_COMPONENT_HANDLE: "UNREGISTER_COMPONENT_HANDLE";
17
29
  readonly REGISTER_MEASURABLE: "REGISTER_MEASURABLE";
18
30
  readonly UNREGISTER_MEASURABLE: "UNREGISTER_MEASURABLE";
19
31
  readonly CHANGE_ELEMENT_BOX_MODELS: "CHANGE_ELEMENT_BOX_MODELS";
20
32
  readonly CHANGE_DOCUMENT_ELEMENT_SIZE: "CHANGE_DOCUMENT_ELEMENT_SIZE";
21
33
  readonly CHANGE_DOCUMENT_ELEMENT_SCROLL_TOP: "CHANGE_DOCUMENT_ELEMENT_SCROLL_TOP";
34
+ readonly REGISTER_PROP_CONTROLLERS_HANDLE: "REGISTER_PROP_CONTROLLERS_HANDLE";
35
+ readonly UNREGISTER_PROP_CONTROLLERS_HANDLE: "UNREGISTER_PROP_CONTROLLERS_HANDLE";
36
+ readonly REGISTER_PROP_CONTROLLERS: "REGISTER_PROP_CONTROLLERS";
37
+ readonly UNREGISTER_PROP_CONTROLLERS: "UNREGISTER_PROP_CONTROLLERS";
38
+ readonly MESSAGE_HOST_PROP_CONTROLLER: "MESSAGE_HOST_PROP_CONTROLLER";
39
+ readonly MESSAGE_BUILDER_PROP_CONTROLLER: "MESSAGE_BUILDER_PROP_CONTROLLER";
40
+ readonly CHANGE_API_RESOURCE: "CHANGE_API_RESOURCE";
41
+ readonly EVICT_API_RESOURCE: "EVICT_API_RESOURCE";
42
+ };
43
+ declare type InitAction = {
44
+ type: typeof ActionTypes.INIT;
45
+ };
46
+ declare type CleanUpAction = {
47
+ type: typeof ActionTypes.CLEAN_UP;
48
+ };
49
+ declare type RegisterDocumentAction = {
50
+ type: typeof ActionTypes.REGISTER_DOCUMENT;
51
+ payload: {
52
+ documentKey: string;
53
+ document: Document;
54
+ };
55
+ };
56
+ declare type UnregisterDocumentAction = {
57
+ type: typeof ActionTypes.UNREGISTER_DOCUMENT;
58
+ payload: {
59
+ documentKey: string;
60
+ };
22
61
  };
23
62
  declare type ChangeDocumentAction = {
24
63
  type: typeof ActionTypes.CHANGE_DOCUMENT;
@@ -41,6 +80,20 @@ declare type UnregisterComponentAction = {
41
80
  type: string;
42
81
  };
43
82
  };
83
+ declare type RegisterBuilderComponentAction = {
84
+ type: typeof ActionTypes.REGISTER_BUILDER_COMPONENT;
85
+ payload: {
86
+ type: string;
87
+ meta: ComponentMeta;
88
+ serializedControls: Record<string, SerializedControl>;
89
+ };
90
+ };
91
+ declare type UnregisterBuilderComponentAction = {
92
+ type: typeof ActionTypes.UNREGISTER_BUILDER_COMPONENT;
93
+ payload: {
94
+ type: string;
95
+ };
96
+ };
44
97
  declare type RegisterReactComponentAction = {
45
98
  type: typeof ActionTypes.REGISTER_REACT_COMPONENT;
46
99
  payload: {
@@ -57,25 +110,36 @@ declare type UnregisterReactComponentAction = {
57
110
  declare type MountComponentAction = {
58
111
  type: typeof ActionTypes.MOUNT_COMPONENT;
59
112
  payload: {
113
+ documentKey: string;
60
114
  elementKey: string;
61
115
  };
62
116
  };
63
117
  declare type UnmountComponentAction = {
64
118
  type: typeof ActionTypes.UNMOUNT_COMPONENT;
65
119
  payload: {
120
+ documentKey: string;
66
121
  elementKey: string;
67
122
  };
68
123
  };
69
- declare type ChangeComponentHandleAction = {
70
- type: typeof ActionTypes.CHANGE_COMPONENT_HANDLE;
124
+ declare type RegisterComponentHandleAction = {
125
+ type: typeof ActionTypes.REGISTER_COMPONENT_HANDLE;
71
126
  payload: {
127
+ documentKey: string;
72
128
  elementKey: string;
73
129
  componentHandle: unknown;
74
130
  };
75
131
  };
132
+ declare type UnregisterComponentHandleAction = {
133
+ type: typeof ActionTypes.UNREGISTER_COMPONENT_HANDLE;
134
+ payload: {
135
+ documentKey: string;
136
+ elementKey: string;
137
+ };
138
+ };
76
139
  declare type RegisterMeasurableAction = {
77
140
  type: typeof ActionTypes.REGISTER_MEASURABLE;
78
141
  payload: {
142
+ documentKey: string;
79
143
  elementKey: string;
80
144
  measurable: Measurable;
81
145
  };
@@ -83,13 +147,14 @@ declare type RegisterMeasurableAction = {
83
147
  declare type UnregisterMeasurableAction = {
84
148
  type: typeof ActionTypes.UNREGISTER_MEASURABLE;
85
149
  payload: {
150
+ documentKey: string;
86
151
  elementKey: string;
87
152
  };
88
153
  };
89
154
  declare type ChangeElementBoxModelsAction = {
90
155
  type: typeof ActionTypes.CHANGE_ELEMENT_BOX_MODELS;
91
156
  payload: {
92
- changedElementBoxModels: Map<string, BoxModel | null>;
157
+ changedElementBoxModels: Map<string, Map<string, BoxModel | null>>;
93
158
  };
94
159
  };
95
160
  declare type ChangeDocumentElementSizeAction = {
@@ -104,21 +169,96 @@ declare type ChangeDocumentElementScrollTopAction = {
104
169
  scrollTop: number;
105
170
  };
106
171
  };
107
- export declare type Action = ChangeDocumentAction | RegisterComponentAction | UnregisterComponentAction | RegisterReactComponentAction | UnregisterReactComponentAction | MountComponentAction | UnmountComponentAction | ChangeComponentHandleAction | RegisterMeasurableAction | UnregisterMeasurableAction | ChangeElementBoxModelsAction | ChangeDocumentElementSizeAction | ChangeDocumentElementScrollTopAction;
172
+ declare type RegisterPropControllersHandleAction = {
173
+ type: typeof ActionTypes.REGISTER_PROP_CONTROLLERS_HANDLE;
174
+ payload: {
175
+ documentKey: string;
176
+ elementKey: string;
177
+ handle: PropControllersHandle;
178
+ };
179
+ };
180
+ declare type UnregisterPropControllersHandleAction = {
181
+ type: typeof ActionTypes.UNREGISTER_PROP_CONTROLLERS_HANDLE;
182
+ payload: {
183
+ documentKey: string;
184
+ elementKey: string;
185
+ };
186
+ };
187
+ declare type RegisterPropControllersAction = {
188
+ type: typeof ActionTypes.REGISTER_PROP_CONTROLLERS;
189
+ payload: {
190
+ documentKey: string;
191
+ elementKey: string;
192
+ propControllers: Record<string, PropController>;
193
+ };
194
+ };
195
+ declare type UnregisterPropControllersAction = {
196
+ type: typeof ActionTypes.UNREGISTER_PROP_CONTROLLERS;
197
+ payload: {
198
+ documentKey: string;
199
+ elementKey: string;
200
+ };
201
+ };
202
+ declare type MessageHostPropControllerAction<T = PropControllerMessage> = {
203
+ type: typeof ActionTypes.MESSAGE_HOST_PROP_CONTROLLER;
204
+ payload: {
205
+ documentKey: string;
206
+ elementKey: string;
207
+ propName: string;
208
+ message: T;
209
+ };
210
+ };
211
+ declare type MessageBuilderPropControllerAction<T = PropControllerMessage> = {
212
+ type: typeof ActionTypes.MESSAGE_BUILDER_PROP_CONTROLLER;
213
+ payload: {
214
+ documentKey: string;
215
+ elementKey: string;
216
+ propName: string;
217
+ message: T;
218
+ };
219
+ };
220
+ declare type ChangeAPIResourceAction = {
221
+ type: typeof ActionTypes.CHANGE_API_RESOURCE;
222
+ payload: {
223
+ resource: APIResource;
224
+ };
225
+ };
226
+ declare type EvictAPIResourceAction = {
227
+ type: typeof ActionTypes.EVICT_API_RESOURCE;
228
+ payload: {
229
+ id: string;
230
+ };
231
+ };
232
+ export declare type Action = InitAction | CleanUpAction | ChangeDocumentAction | RegisterDocumentAction | UnregisterDocumentAction | RegisterComponentAction | UnregisterComponentAction | RegisterBuilderComponentAction | UnregisterBuilderComponentAction | RegisterReactComponentAction | UnregisterReactComponentAction | MountComponentAction | UnmountComponentAction | RegisterComponentHandleAction | UnregisterComponentHandleAction | RegisterMeasurableAction | UnregisterMeasurableAction | ChangeElementBoxModelsAction | ChangeDocumentElementSizeAction | ChangeDocumentElementScrollTopAction | RegisterPropControllersHandleAction | UnregisterPropControllersHandleAction | RegisterPropControllersAction | UnregisterPropControllersAction | MessageHostPropControllerAction | MessageBuilderPropControllerAction | ChangeAPIResourceAction | EvictAPIResourceAction;
233
+ export declare function init(): InitAction;
234
+ export declare function cleanUp(): CleanUpAction;
235
+ export declare function registerDocument(document: Document): RegisterDocumentAction;
236
+ export declare function unregisterDocument(documentKey: string): UnregisterDocumentAction;
237
+ export declare function registerDocumentEffect(document: Document): ThunkAction<() => void, unknown, unknown, Action>;
108
238
  export declare function changeDocument(documentKey: string, operation: Operation): ChangeDocumentAction;
109
239
  export declare function registerComponent(type: string, meta: ComponentMeta, propControllerDescriptors: Record<string, PropControllerDescriptor>): RegisterComponentAction;
110
240
  export declare function unregisterComponent(type: string): UnregisterComponentAction;
111
241
  export declare function registerComponentEffect(type: string, meta: ComponentMeta, propControllerDescriptors: Record<string, PropControllerDescriptor>): ThunkAction<() => void, unknown, unknown, Action>;
242
+ export declare function registerBuilderComponent(type: string, meta: ComponentMeta, serializedControls: Record<string, SerializedControl>): RegisterBuilderComponentAction;
243
+ export declare function unregisterBuilderComponent(type: string): UnregisterBuilderComponentAction;
112
244
  export declare function registerReactComponentEffect(type: string, component: ComponentType): ThunkAction<() => void, unknown, unknown, Action>;
113
- export declare function mountComponent(elementKey: string): MountComponentAction;
114
- export declare function unmountComponent(elementKey: string): UnmountComponentAction;
115
- export declare function mountComponentEffect(elementKey: string): ThunkAction<() => void, unknown, unknown, Action>;
116
- export declare function changeComponentHandle(elementKey: string, componentHandle: unknown): ChangeComponentHandleAction;
117
- export declare function registerMeasurable(elementKey: string, measurable: Measurable): RegisterMeasurableAction;
118
- export declare function unregisterMeasurable(elementKey: string): UnregisterMeasurableAction;
119
- export declare function registerMeasurableEffect(elementKey: string, measurable: Measurable): ThunkAction<() => void, unknown, unknown, Action>;
120
- export declare function changeElementBoxModels(changedElementBoxModels: Map<string, BoxModel | null>): ChangeElementBoxModelsAction;
245
+ export declare function mountComponent(documentKey: string, elementKey: string): MountComponentAction;
246
+ export declare function unmountComponent(documentKey: string, elementKey: string): UnmountComponentAction;
247
+ export declare function mountComponentEffect(documentKey: string, elementKey: string): ThunkAction<() => void, unknown, unknown, Action>;
248
+ export declare function registerComponentHandleEffect(documentKey: string, elementKey: string, componentHandle: unknown): ThunkAction<() => void, unknown, unknown, Action>;
249
+ export declare function registerMeasurable(documentKey: string, elementKey: string, measurable: Measurable): RegisterMeasurableAction;
250
+ export declare function unregisterMeasurable(documentKey: string, elementKey: string): UnregisterMeasurableAction;
251
+ export declare function registerMeasurableEffect(documentKey: string, elementKey: string, measurable: Measurable): ThunkAction<() => void, unknown, unknown, Action>;
252
+ export declare function changeElementBoxModels(changedElementBoxModels: Map<string, Map<string, BoxModel | null>>): ChangeElementBoxModelsAction;
121
253
  export declare function changeDocumentElementSize(size: Size): ChangeDocumentElementSizeAction;
122
254
  export declare function changeDocumentElementScrollTop(scrollTop: number): ChangeDocumentElementScrollTopAction;
255
+ export declare function registerPropControllersHandle(documentKey: string, elementKey: string, handle: PropControllersHandle): RegisterPropControllersHandleAction;
256
+ export declare function unregisterPropControllersHandle(documentKey: string, elementKey: string): UnregisterPropControllersHandleAction;
257
+ export declare function registerPropControllers(documentKey: string, elementKey: string, propControllers: Record<string, PropController>): RegisterPropControllersAction;
258
+ export declare function unregisterPropControllers(documentKey: string, elementKey: string): UnregisterPropControllersAction;
259
+ export declare function messageHostPropController<T>(documentKey: string, elementKey: string, propName: string, message: T): MessageHostPropControllerAction<T>;
260
+ export declare function messageBuilderPropController<T>(documentKey: string, elementKey: string, propName: string, message: T): MessageBuilderPropControllerAction<T>;
261
+ export declare function changeApiResource(resource: APIResource): ChangeAPIResourceAction;
262
+ export declare function evictApiResource(id: string): EvictAPIResourceAction;
123
263
  export {};
124
264
  //# sourceMappingURL=actions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../src/state/actions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AAEzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAC/D,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAChE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AACzD,OAAO,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAA;AAC9D,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAA;AAEnD,eAAO,MAAM,WAAW;;;;;;;;;;;;;;CAqBd,CAAA;AAEV,aAAK,oBAAoB,GAAG;IAC1B,IAAI,EAAE,OAAO,WAAW,CAAC,eAAe,CAAA;IACxC,OAAO,EAAE;QAAE,WAAW,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,SAAS,CAAA;KAAE,CAAA;CACvD,CAAA;AAED,aAAK,uBAAuB,GAAG;IAC7B,IAAI,EAAE,OAAO,WAAW,CAAC,kBAAkB,CAAA;IAC3C,OAAO,EAAE;QACP,IAAI,EAAE,MAAM,CAAA;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B;AAED,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,IAAI,GAAG,+BAA+B,CAErF;AAED,wBAAgB,8BAA8B,CAC5C,SAAS,EAAE,MAAM,GAChB,oCAAoC,CAEtC;AAED,wBAAgB,6BAA6B,CAC3C,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,qBAAqB,GAC5B,mCAAmC,CAKrC;AAED,wBAAgB,+BAA+B,CAC7C,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,MAAM,GACjB,qCAAqC,CAKvC;AAED,wBAAgB,uBAAuB,CACrC,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,MAAM,EAClB,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,GAC9C,6BAA6B,CAK/B;AAED,wBAAgB,yBAAyB,CACvC,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,MAAM,GACjB,+BAA+B,CAEjC;AAED,wBAAgB,yBAAyB,CAAC,CAAC,EACzC,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,CAAC,GACT,+BAA+B,CAAC,CAAC,CAAC,CAKpC;AAED,wBAAgB,4BAA4B,CAAC,CAAC,EAC5C,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,CAAC,GACT,kCAAkC,CAAC,CAAC,CAAC,CAKvC;AAED,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,WAAW,GAAG,uBAAuB,CAEhF;AAED,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,MAAM,GAAG,sBAAsB,CAEnE"}
@@ -11,12 +11,12 @@ export declare type Measurable = Element | BoxModelHandle;
11
11
  export declare function isMeasurable(value: unknown): value is Measurable;
12
12
  export declare function measure(measurable: Measurable): BoxModel | null;
13
13
  export declare type State = {
14
- measurables: Map<string, Measurable>;
15
- boxModels: Map<string, BoxModel>;
14
+ measurables: Map<string, Map<string, Measurable>>;
15
+ boxModels: Map<string, Map<string, BoxModel>>;
16
16
  };
17
17
  export declare function getInitialState(): State;
18
- export declare function getMeasurables(state: State): Map<string, Measurable>;
19
- export declare function getBoxModels(state: State): Map<string, BoxModel>;
20
- export declare function getBoxModel(state: State, elementKey: string): BoxModel | null;
18
+ export declare function getMeasurables(state: State): Map<string, Map<string, Measurable>>;
19
+ export declare function getBoxModels(state: State): Map<string, Map<string, BoxModel>>;
20
+ export declare function getBoxModel(state: State, documentKey: string, elementKey: string): BoxModel | null;
21
21
  export declare function reducer(state: State | undefined, action: Action): State;
22
22
  //# sourceMappingURL=box-models.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"box-models.d.ts","sourceRoot":"","sources":["../../../../src/state/modules/box-models.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAER,aAAa,EAGd,MAAM,eAAe,CAAA;AAEtB,OAAO,EAAE,MAAM,EAAe,MAAM,YAAY,CAAA;AAEhD,YAAY,EAAE,QAAQ,EAAE,CAAA;AAExB,wBAAgB,KAAK,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAI/C;AAED,wBAAgB,SAAS,CAAC,OAAO,EAAE,aAAa,GAAG,QAAQ,CAE1D;AAED,wBAAgB,MAAM,CAAC,OAAO,EAAE,OAAO,GAAG,QAAQ,CAEjD;AAED,MAAM,WAAW,cAAc;IAC7B,WAAW,IAAI,QAAQ,GAAG,IAAI,CAAA;CAC/B;AAED,oBAAY,UAAU,GAAG,OAAO,GAAG,cAAc,CAAA;AAEjD,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,UAAU,CAahE;AAED,wBAAgB,OAAO,CAAC,UAAU,EAAE,UAAU,GAAG,QAAQ,GAAG,IAAI,CAI/D;AAED,oBAAY,KAAK,GAAG;IAClB,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAA;IACpC,S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AC,MAAM,EAAE,UAAU,CAAC,CAAC,CAAA;IACjD,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAA;CAC9C,CAAA;AAED,wBAAgB,eAAe,IAAI,KAAK,CAEvC;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,KAAK,GAAG,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,CAEjF;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,KAAK,GAAG,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAE7E;AAED,wBAAgB,WAAW,CACzB,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,MAAM,GACjB,QAAQ,GAAG,IAAI,CAEjB;AAED,wBAAgB,OAAO,CAAC,KAAK,mBAA2B,EAAE,MAAM,EAAE,MAAM,SAkDvE"}
@@ -1,12 +1,8 @@
1
- import type { Dispatch as ReactDispatch, SetStateAction } from 'react';
2
1
  import { Action } from '../actions';
3
- import type { Data } from './read-only-documents';
4
- import { PropController } from '../../prop-controllers/instances';
5
- export declare type PropsPropControllers<T extends Record<string, Data> = Record<string, Data>> = {
6
- [K in keyof T]: PropController;
7
- };
8
- export interface PropControllersHandle<T extends Record<string, Data> = Record<string, Data>> {
9
- setPropControllers: ReactDispatch<SetStateAction<PropsPropControllers<T> | null>>;
2
+ import type { DescriptorsPropControllers, PropController } from '../../prop-controllers/instances';
3
+ import type { Descriptor } from '../../prop-controllers/descriptors';
4
+ export interface PropControllersHandle<T extends Record<string, Descriptor> = Record<string, Descriptor>> {
5
+ setPropControllers(propControllers: DescriptorsPropControllers<T> | null): void;
10
6
  }
11
7
  export declare function isPropControllersHandle(value: unknown): value is PropControllersHandle;
12
8
  export declare type State = {
@@ -1 +1 @@
1
- {"version":3,"file":"prop-controller-handles.d.ts","sourceRoot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KAAK,EACZ,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,GACf,cAAc,GAAG,IAAI,CAEvB;AAED,wBAAgB,OAAO,CAAC,KAAK,mBAA2B,EAAE,MAAM,EAAE,MAAM,GAAG,KAAK,CAmD/E"}
1
+ {"version":3,"file":"prop-controller-handles.d.ts","sourceRoot":"","sources":["../../../../src/state/modules/prop-controller-handles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAe,MAAM,YAAY,CAAA;AAChD,OAAO,KAAK,EAAE,0BAA0B,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAA;AAClG,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAA;AAEpE,MAAM,WAAW,qBAAqB,CACpC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC;IAEjE,kBAAkB,CAAC,eAAe,EAAE,0BAA0B,CAAC,CAAC,CAAC,GAAG,IAAI,GAAG,IAAI,CAAA;CAChF;AAED,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,qBAAqB,CAWtF;AAED,oBAAY,KAAK,GAAG;IAClB,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAAC,CAAA;IACxD,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC,CAAC,CAAA;CACpE,CAAA;AAED,wBAAgB,eAAe,IAAI,KAAK,CAEvC;AAED,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,MAAM,GACjB,qBAAqB,GAAG,IAAI,CAE9B;AAED,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,GACf,cAAc,GAAG,IAAI,CAEvB;AAED,wBAAgB,OAAO,CAAC,KAAK,mBAA2B,EAAE,MAAM,EAAE,MAAM,GAAG,KAAK,CAmD/E"}
@@ -1,4 +1,4 @@
1
- import type { Action } from '../actions';
1
+ import { Action } from '../actions';
2
2
  export declare type Data = undefined | null | boolean | number | string | Data[] | {
3
3
  [key: string]: Data;
4
4
  };
@@ -14,15 +14,19 @@ export declare type ElementReference = {
14
14
  };
15
15
  export declare type Element = ElementData | ElementReference;
16
16
  export declare function isElementReference(element: Element): element is ElementReference;
17
+ export declare type DocumentReference = {
18
+ key: string;
19
+ };
20
+ export declare function createDocumentReference(key: string): DocumentReference;
17
21
  export declare type Document = {
22
+ key: string;
18
23
  rootElement: Element;
19
24
  };
20
- export declare function createDocument(rootElement: Element): Document;
25
+ export declare function createDocument(key: string, rootElement: Element): Document;
21
26
  export declare type State = Map<string, Document>;
22
27
  export declare function getInitialState({ rootElements, }?: {
23
28
  rootElements?: Map<string, Element>;
24
29
  }): State;
25
30
  export declare function getDocument(state: State, documentKey: string): Document | null;
26
- export declare function getDocumentRootElement(state: State, documentKey: string): Element | null;
27
- export declare function reducer(state: State | undefined, _action: Action): State;
31
+ export declare function reducer(state: State | undefined, action: Action): State;
28
32
  //# sourceMappingURL=read-only-documents.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"read-only-documents.d.ts","sourceRoot":"","sources":["../../../../src/state/modules/read-only-documents.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AAExC,oBAAY,IAAI,GAAG,SAAS,GAAG,IAAI,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,EAAE,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAAA;AAElG,oBAAY,WAAW,GAAG;IAAE,IAAI,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 -8,6 +8,6 @@ export declare type State = ReadOnlyDocuments.State;
8
8
  export declare function getInitialState({ rootElements, }?: {
9
9
  rootElements?: Map<string, ReadOnlyDocuments.Element>;
10
10
  }): State;
11
- export declare function getDocumentRootElement(state: State, documentKey: string): ReadOnlyDocuments.Element | null;
11
+ export declare function getDocument(state: State, documentKey: string): ReadOnlyDocuments.Document | null;
12
12
  export declare function reducer(state: ReadOnlyDocuments.State | undefined, action: Action): State;
13
13
  //# sourceMappingURL=read-write-documents.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"read-write-documents.d.ts","sourceRoot":"","sources":["../../../../src/state/modules/read-write-documents.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AAGpC,OAAO,KAAK,iBAAiB,MAAM,uBAAuB,CAAA;AAC1D,OAAO,EAAE,MAAM,EAAe,MAAM,YAAY,CAAA;AAEhD,YAAY,EAAE,QAAQ,EAAE,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAC7F,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAA;AAC1D,YAAY,EAAE,SAAS,EAAE,CAAA;AAsBzB,oBAAY,KAAK,GAAG,iBAAiB,CAAC,KAAK,CAAA;AAE3C,wBAAgB,eAAe,CAAC,EAC9B,YAAY,GACb,GAAE;IACD,YAAY,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,iBAAiB,CAAC,OAAO,CAAC,CAAA;CACjD,GAAG,KAAK,CAEb;AAMD,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,MAAM,GAClB,iBAAiB,CAAC,OAAO,GAAG,IAAI,CAKlC;AAED,wBAAgB,OAAO,CAAC,KAAK,qCAA2B,EAAE,MAAM,EAAE,MAAM,GAAG,KAAK,CAoB/E"}
1
+ {"version":3,"file":"read-write-documents.d.ts","sourceRoot":"","sources":["../../../../src/state/modules/read-write-documents.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AAGpC,OAAO,KAAK,iBAAiB,MAAM,uBAAuB,CAAA;AAC1D,OAAO,EAAE,MAAM,EAAe,MAAM,YAAY,CAAA;AAEhD,YAAY,EAAE,QAAQ,EAAE,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAC7F,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAA;AAC1D,YAAY,EAAE,SAAS,EAAE,CAAA;AAsBzB,oBAAY,KAAK,GAAG,iBAAiB,CAAC,KAAK,CAAA;AAE3C,wBAAgB,eAAe,CAAC,EAC9B,YAAY,GACb,GAAE;IACD,YAAY,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,iBAAiB,CAAC,OAAO,CAAC,CAAA;CACjD,GAAG,KAAK,CAEb;AAMD,wBAAgB,WAAW,CAAC,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,GAAG,iBAAiB,CAAC,QAAQ,GAAG,IAAI,CAEhG;AAED,wBAAgB,OAAO,CAAC,KAAK,qCAA2B,EAAE,MAAM,EAAE,MAAM,GAAG,KAAK,CAsB/E"}
@@ -4,7 +4,9 @@ import * as ReactComponents from './modules/react-components';
4
4
  import * as BoxModels from './modules/box-models';
5
5
  import * as ComponentsMeta from './modules/components-meta';
6
6
  import * as PropControllers from './modules/prop-controllers';
7
+ import * as PropControllerHandles from './modules/prop-controller-handles';
7
8
  import { Action } from './actions';
9
+ import { ApolloClient, NormalizedCacheObject } from '@apollo/client';
8
10
  export type { Operation } from './modules/read-write-documents';
9
11
  export type { BoxModelHandle } from './modules/box-models';
10
12
  export { createBox, getBox, parse } from './modules/box-models';
@@ -14,6 +16,7 @@ declare const reducer: import("redux").Reducer<import("redux").CombinedState<{
14
16
  boxModels: BoxModels.State;
15
17
  componentsMeta: ComponentsMeta.State;
16
18
  propControllers: PropControllers.State;
19
+ propControllerHandles: PropControllerHandles.State;
17
20
  isInBuilder: boolean;
18
21
  }>, Action>;
19
22
  export declare type State = ReturnType<typeof reducer>;
@@ -34,7 +37,8 @@ export declare function messageChannelMiddleware(): Middleware<Dispatch, State,
34
37
  export declare type Store = ReduxStore<State, Action> & {
35
38
  dispatch: Dispatch;
36
39
  };
37
- export declare function configureStore({ preloadedState, }?: {
40
+ export declare function configureStore({ preloadedState, client, }: {
38
41
  preloadedState?: PreloadedState<State>;
42
+ client: ApolloClient<NormalizedCacheObject>;
39
43
  }): Store;
40
44
  //# sourceMappingURL=react-builder-preview.d.ts.map