@plitzi/sdk-shared 0.32.24 → 0.33.0

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 (244) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/auth/authFailureLink.d.ts +9 -0
  3. package/dist/auth/authFailureLink.mjs +20 -0
  4. package/dist/auth/failureChannel.d.ts +31 -0
  5. package/dist/auth/failureChannel.mjs +26 -0
  6. package/dist/auth/index.d.ts +3 -0
  7. package/dist/auth/index.mjs +3 -0
  8. package/dist/connectors/constants.d.ts +28 -0
  9. package/dist/connectors/constants.mjs +29 -0
  10. package/dist/connectors/index.d.ts +7 -0
  11. package/dist/connectors/index.mjs +5 -0
  12. package/dist/connectors/manifestTokens.d.ts +17 -0
  13. package/dist/connectors/manifestTokens.mjs +70 -0
  14. package/dist/connectors/presets.d.ts +22 -0
  15. package/dist/connectors/presets.mjs +220 -0
  16. package/dist/connectors/validateManifest.d.ts +28 -0
  17. package/dist/connectors/validateManifest.mjs +183 -0
  18. package/dist/dataSource/getBindingsDetails.mjs +1 -1
  19. package/dist/hooks/useNetwork.mjs +32 -26
  20. package/dist/hooks/usePlitziServiceContext.d.ts +1 -3
  21. package/dist/index.d.ts +2 -1
  22. package/dist/index.mjs +47 -40
  23. package/dist/navigation/index.d.ts +4 -0
  24. package/dist/navigation/index.mjs +3 -0
  25. package/dist/navigation/matchPath.d.ts +12 -0
  26. package/dist/navigation/matchPath.mjs +42 -0
  27. package/dist/navigation/routes.d.ts +28 -0
  28. package/dist/navigation/routes.mjs +124 -0
  29. package/dist/network/NetworkContext.d.ts +5 -3
  30. package/dist/network/NetworkInternalContext.d.ts +1 -2
  31. package/dist/network/graphql/builder/Mutations/Space/connectors/SpaceAddConnectorMutation.d.ts +8 -0
  32. package/dist/network/graphql/builder/Mutations/Space/connectors/SpaceAddConnectorMutation.mjs +16 -0
  33. package/dist/network/graphql/builder/Mutations/Space/connectors/SpaceRemoveConnectorMutation.d.ts +8 -0
  34. package/dist/network/graphql/builder/Mutations/Space/connectors/SpaceRemoveConnectorMutation.mjs +12 -0
  35. package/dist/network/graphql/builder/Mutations/Space/connectors/SpaceUpdateConnectorMutation.d.ts +8 -0
  36. package/dist/network/graphql/builder/Mutations/Space/connectors/SpaceUpdateConnectorMutation.mjs +16 -0
  37. package/dist/network/graphql/builder/Mutations/index.d.ts +9 -18
  38. package/dist/network/graphql/builder/Mutations/index.mjs +150 -156
  39. package/dist/network/graphql/builder/Queries/InitQuery.d.ts +1 -4
  40. package/dist/network/graphql/builder/Queries/InitQuery.mjs +2 -33
  41. package/dist/network/graphql/builder/Queries/Space/SpaceConnectorsQuery.d.ts +9 -0
  42. package/dist/network/graphql/builder/Queries/Space/SpaceConnectorsQuery.mjs +25 -0
  43. package/dist/network/graphql/builder/Queries/Space/SpaceDeploymentsQuery.mjs +1 -0
  44. package/dist/network/graphql/builder/Queries/index.d.ts +3 -12
  45. package/dist/network/graphql/builder/Queries/index.mjs +22 -28
  46. package/dist/network/graphql/builder/Subscriptions/SpaceEventSubscription.d.ts +19 -0
  47. package/dist/network/graphql/builder/Subscriptions/SpaceEventSubscription.mjs +12 -0
  48. package/dist/network/graphql/builder/Subscriptions/index.d.ts +4 -163
  49. package/dist/network/graphql/builder/Subscriptions/index.mjs +3 -109
  50. package/dist/network/graphql/builder/index.d.ts +2 -2
  51. package/dist/network/graphql/builder/index.mjs +1 -1
  52. package/dist/network/graphql/index.mjs +1 -1
  53. package/dist/network/graphql/sdk/Mutations/index.d.ts +2 -13
  54. package/dist/network/graphql/sdk/Mutations/index.mjs +2 -9
  55. package/dist/network/graphql/sdk/Queries/InitQuery.d.ts +1 -4
  56. package/dist/network/graphql/sdk/Queries/InitQuery.mjs +1 -13
  57. package/dist/network/graphql/sdk/Queries/index.d.ts +0 -12
  58. package/dist/network/graphql/sdk/Queries/index.mjs +8 -16
  59. package/dist/network/index.d.ts +3 -1
  60. package/dist/network/index.mjs +7 -6
  61. package/dist/network/spaceEvents.d.ts +405 -0
  62. package/dist/network/spaceEvents.mjs +244 -0
  63. package/dist/server/index.d.ts +5 -5
  64. package/dist/server/index.mjs +4 -3
  65. package/dist/server/rsc/refreshRsc.d.ts +16 -0
  66. package/dist/server/rsc/refreshRsc.mjs +16 -0
  67. package/dist/server/rsc/useRscRefresh.d.ts +2 -0
  68. package/dist/server/rsc/useRscRefresh.mjs +10 -0
  69. package/dist/server/rsc/useRscSync.d.ts +11 -0
  70. package/dist/server/rsc/useRscSync.mjs +20 -0
  71. package/dist/store/index.d.ts +54 -53
  72. package/dist/store/index.mjs +4 -3
  73. package/dist/store/renderSettings.d.ts +26 -0
  74. package/dist/store/renderSettings.mjs +39 -0
  75. package/dist/types/AuthTypes.d.ts +33 -3
  76. package/dist/types/BuilderTypes.d.ts +15 -0
  77. package/dist/types/CollectionTypes.d.ts +3 -49
  78. package/dist/types/CommonTypes.d.ts +17 -2
  79. package/dist/types/ConnectorTypes.d.ts +147 -0
  80. package/dist/types/ConnectorTypes.mjs +0 -0
  81. package/dist/types/DevToolsTypes.d.ts +18 -3
  82. package/dist/types/InteractionTypes.d.ts +1 -1
  83. package/dist/types/McpTypes/index.d.ts +0 -4
  84. package/dist/types/NavigationTypes.d.ts +0 -10
  85. package/dist/types/SchemaTypes.d.ts +27 -5
  86. package/dist/types/SdkTypes.d.ts +19 -2
  87. package/dist/types/ServerTypes.d.ts +296 -103
  88. package/dist/types/SpaceTypes.d.ts +17 -1
  89. package/dist/types/StoreTypes.d.ts +36 -0
  90. package/dist/types/index.d.ts +1 -0
  91. package/dist/websockets/RTCodec.d.ts +6 -0
  92. package/package.json +108 -309
  93. package/vite.config.ts +21 -1
  94. package/dist/collections/CollectionContext.d.ts +0 -2
  95. package/dist/collections/CollectionContext.mjs +0 -5
  96. package/dist/collections/index.d.ts +0 -3
  97. package/dist/collections/index.mjs +0 -2
  98. package/dist/network/graphql/builder/Mutations/Collection/CollectionAddMutation.d.ts +0 -4
  99. package/dist/network/graphql/builder/Mutations/Collection/CollectionAddMutation.mjs +0 -24
  100. package/dist/network/graphql/builder/Mutations/Collection/CollectionAddRecordMutation.d.ts +0 -4
  101. package/dist/network/graphql/builder/Mutations/Collection/CollectionAddRecordMutation.mjs +0 -16
  102. package/dist/network/graphql/builder/Mutations/Collection/CollectionRemoveMutation.d.ts +0 -4
  103. package/dist/network/graphql/builder/Mutations/Collection/CollectionRemoveMutation.mjs +0 -17
  104. package/dist/network/graphql/builder/Mutations/Collection/CollectionRemoveRecordMutation.d.ts +0 -4
  105. package/dist/network/graphql/builder/Mutations/Collection/CollectionRemoveRecordMutation.mjs +0 -14
  106. package/dist/network/graphql/builder/Mutations/Collection/CollectionUpdateMutation.d.ts +0 -4
  107. package/dist/network/graphql/builder/Mutations/Collection/CollectionUpdateMutation.mjs +0 -32
  108. package/dist/network/graphql/builder/Mutations/Collection/CollectionUpdateRecordMutation.d.ts +0 -4
  109. package/dist/network/graphql/builder/Mutations/Collection/CollectionUpdateRecordMutation.mjs +0 -16
  110. package/dist/network/graphql/builder/Queries/Collection/CollectionQuery.d.ts +0 -6
  111. package/dist/network/graphql/builder/Queries/Collection/CollectionQuery.mjs +0 -35
  112. package/dist/network/graphql/builder/Queries/Collection/CollectionRecordQuery.d.ts +0 -6
  113. package/dist/network/graphql/builder/Queries/Collection/CollectionRecordQuery.mjs +0 -16
  114. package/dist/network/graphql/builder/Queries/Collection/CollectionRecordsQuery.d.ts +0 -9
  115. package/dist/network/graphql/builder/Queries/Collection/CollectionRecordsQuery.mjs +0 -27
  116. package/dist/network/graphql/builder/Queries/Collection/CollectionsQuery.d.ts +0 -9
  117. package/dist/network/graphql/builder/Queries/Collection/CollectionsQuery.mjs +0 -37
  118. package/dist/network/graphql/builder/Subscriptions/Collaborator/CollaboratorConnectedSubscription.d.ts +0 -11
  119. package/dist/network/graphql/builder/Subscriptions/Collaborator/CollaboratorConnectedSubscription.mjs +0 -17
  120. package/dist/network/graphql/builder/Subscriptions/Collaborator/CollaboratorDisconnectedSubscription.d.ts +0 -11
  121. package/dist/network/graphql/builder/Subscriptions/Collaborator/CollaboratorDisconnectedSubscription.mjs +0 -17
  122. package/dist/network/graphql/builder/Subscriptions/Segment/SegmentAddTemplateSubscription.d.ts +0 -2
  123. package/dist/network/graphql/builder/Subscriptions/Segment/SegmentAddTemplateSubscription.mjs +0 -41
  124. package/dist/network/graphql/builder/Subscriptions/Segment/space/elements/SegmentAddElementSubscription.d.ts +0 -11
  125. package/dist/network/graphql/builder/Subscriptions/Segment/space/elements/SegmentAddElementSubscription.mjs +0 -40
  126. package/dist/network/graphql/builder/Subscriptions/Segment/space/elements/SegmentCloneElementSubscription.d.ts +0 -10
  127. package/dist/network/graphql/builder/Subscriptions/Segment/space/elements/SegmentCloneElementSubscription.mjs +0 -30
  128. package/dist/network/graphql/builder/Subscriptions/Segment/space/elements/SegmentMoveElementSubscription.d.ts +0 -10
  129. package/dist/network/graphql/builder/Subscriptions/Segment/space/elements/SegmentMoveElementSubscription.mjs +0 -15
  130. package/dist/network/graphql/builder/Subscriptions/Segment/space/elements/SegmentRemoveElementSubscription.d.ts +0 -6
  131. package/dist/network/graphql/builder/Subscriptions/Segment/space/elements/SegmentRemoveElementSubscription.mjs +0 -12
  132. package/dist/network/graphql/builder/Subscriptions/Segment/space/elements/SegmentUpdateElementSubscription.d.ts +0 -11
  133. package/dist/network/graphql/builder/Subscriptions/Segment/space/elements/SegmentUpdateElementSubscription.mjs +0 -27
  134. package/dist/network/graphql/builder/Subscriptions/Segment/space/elements/SegmentUpdateElementsSubscription.d.ts +0 -7
  135. package/dist/network/graphql/builder/Subscriptions/Segment/space/elements/SegmentUpdateElementsSubscription.mjs +0 -27
  136. package/dist/network/graphql/builder/Subscriptions/Segment/space/variables/SegmentSpaceAddVariableSubscription.d.ts +0 -7
  137. package/dist/network/graphql/builder/Subscriptions/Segment/space/variables/SegmentSpaceAddVariableSubscription.mjs +0 -21
  138. package/dist/network/graphql/builder/Subscriptions/Segment/space/variables/SegmentSpaceRemoveVariableSubscription.d.ts +0 -7
  139. package/dist/network/graphql/builder/Subscriptions/Segment/space/variables/SegmentSpaceRemoveVariableSubscription.mjs +0 -14
  140. package/dist/network/graphql/builder/Subscriptions/Segment/space/variables/SegmentSpaceUpdateVariableSubscription.d.ts +0 -7
  141. package/dist/network/graphql/builder/Subscriptions/Segment/space/variables/SegmentSpaceUpdateVariableSubscription.mjs +0 -21
  142. package/dist/network/graphql/builder/Subscriptions/Segment/style/selectorVariables/SegmentStyleAddSelectorVariableSubscription.d.ts +0 -11
  143. package/dist/network/graphql/builder/Subscriptions/Segment/style/selectorVariables/SegmentStyleAddSelectorVariableSubscription.mjs +0 -16
  144. package/dist/network/graphql/builder/Subscriptions/Segment/style/selectorVariables/SegmentStyleRemoveSelectorVariableSubscription.d.ts +0 -10
  145. package/dist/network/graphql/builder/Subscriptions/Segment/style/selectorVariables/SegmentStyleRemoveSelectorVariableSubscription.mjs +0 -15
  146. package/dist/network/graphql/builder/Subscriptions/Segment/style/selectorVariables/SegmentStyleUpdateSelectorVariableSubscription.d.ts +0 -11
  147. package/dist/network/graphql/builder/Subscriptions/Segment/style/selectorVariables/SegmentStyleUpdateSelectorVariableSubscription.mjs +0 -16
  148. package/dist/network/graphql/builder/Subscriptions/Segment/style/selectors/SegmentStyleAddSelectorSubscription.d.ts +0 -17
  149. package/dist/network/graphql/builder/Subscriptions/Segment/style/selectors/SegmentStyleAddSelectorSubscription.mjs +0 -17
  150. package/dist/network/graphql/builder/Subscriptions/Segment/style/selectors/SegmentStyleRemoveSelectorSubscription.d.ts +0 -8
  151. package/dist/network/graphql/builder/Subscriptions/Segment/style/selectors/SegmentStyleRemoveSelectorSubscription.mjs +0 -13
  152. package/dist/network/graphql/builder/Subscriptions/Segment/style/selectors/SegmentStyleRemoveSelectorsSubscription.d.ts +0 -8
  153. package/dist/network/graphql/builder/Subscriptions/Segment/style/selectors/SegmentStyleRemoveSelectorsSubscription.mjs +0 -13
  154. package/dist/network/graphql/builder/Subscriptions/Segment/style/selectors/SegmentStyleUpdateSelectorSubscription.d.ts +0 -16
  155. package/dist/network/graphql/builder/Subscriptions/Segment/style/selectors/SegmentStyleUpdateSelectorSubscription.mjs +0 -17
  156. package/dist/network/graphql/builder/Subscriptions/Segment/style/variables/SegmentStyleAddVariableSubscription.d.ts +0 -9
  157. package/dist/network/graphql/builder/Subscriptions/Segment/style/variables/SegmentStyleAddVariableSubscription.mjs +0 -14
  158. package/dist/network/graphql/builder/Subscriptions/Segment/style/variables/SegmentStyleRemoveVariableSubscription.d.ts +0 -8
  159. package/dist/network/graphql/builder/Subscriptions/Segment/style/variables/SegmentStyleRemoveVariableSubscription.mjs +0 -13
  160. package/dist/network/graphql/builder/Subscriptions/Segment/style/variables/SegmentStyleUpdateVariableSubscription.d.ts +0 -9
  161. package/dist/network/graphql/builder/Subscriptions/Segment/style/variables/SegmentStyleUpdateVariableSubscription.mjs +0 -14
  162. package/dist/network/graphql/builder/Subscriptions/Space/SpaceAddTemplateSubscription.d.ts +0 -11
  163. package/dist/network/graphql/builder/Subscriptions/Space/SpaceAddTemplateSubscription.mjs +0 -40
  164. package/dist/network/graphql/builder/Subscriptions/Space/SpaceUpdateSettingsSubscription.d.ts +0 -6
  165. package/dist/network/graphql/builder/Subscriptions/Space/SpaceUpdateSettingsSubscription.mjs +0 -12
  166. package/dist/network/graphql/builder/Subscriptions/Space/SpaceUpdatedSubscription.d.ts +0 -6
  167. package/dist/network/graphql/builder/Subscriptions/Space/SpaceUpdatedSubscription.mjs +0 -29
  168. package/dist/network/graphql/builder/Subscriptions/Space/elements/SpaceAddElementSubscription.d.ts +0 -10
  169. package/dist/network/graphql/builder/Subscriptions/Space/elements/SpaceAddElementSubscription.mjs +0 -39
  170. package/dist/network/graphql/builder/Subscriptions/Space/elements/SpaceCloneElementSubscription.d.ts +0 -9
  171. package/dist/network/graphql/builder/Subscriptions/Space/elements/SpaceCloneElementSubscription.mjs +0 -29
  172. package/dist/network/graphql/builder/Subscriptions/Space/elements/SpaceMoveElementSubscription.d.ts +0 -9
  173. package/dist/network/graphql/builder/Subscriptions/Space/elements/SpaceMoveElementSubscription.mjs +0 -14
  174. package/dist/network/graphql/builder/Subscriptions/Space/elements/SpaceRemoveElementSubscription.d.ts +0 -5
  175. package/dist/network/graphql/builder/Subscriptions/Space/elements/SpaceRemoveElementSubscription.mjs +0 -11
  176. package/dist/network/graphql/builder/Subscriptions/Space/elements/SpaceUpdateElementSubscription.d.ts +0 -6
  177. package/dist/network/graphql/builder/Subscriptions/Space/elements/SpaceUpdateElementSubscription.mjs +0 -26
  178. package/dist/network/graphql/builder/Subscriptions/Space/elements/SpaceUpdateElementsSubscription.d.ts +0 -6
  179. package/dist/network/graphql/builder/Subscriptions/Space/elements/SpaceUpdateElementsSubscription.mjs +0 -26
  180. package/dist/network/graphql/builder/Subscriptions/Space/folders/SpaceAddPageFolderSubscription.d.ts +0 -6
  181. package/dist/network/graphql/builder/Subscriptions/Space/folders/SpaceAddPageFolderSubscription.mjs +0 -16
  182. package/dist/network/graphql/builder/Subscriptions/Space/folders/SpaceRemovePageFolderSubscription.d.ts +0 -5
  183. package/dist/network/graphql/builder/Subscriptions/Space/folders/SpaceRemovePageFolderSubscription.mjs +0 -11
  184. package/dist/network/graphql/builder/Subscriptions/Space/folders/SpaceUpdatePageFolderSubscription.d.ts +0 -6
  185. package/dist/network/graphql/builder/Subscriptions/Space/folders/SpaceUpdatePageFolderSubscription.mjs +0 -16
  186. package/dist/network/graphql/builder/Subscriptions/Space/pages/SpaceAddPageSubscription.d.ts +0 -6
  187. package/dist/network/graphql/builder/Subscriptions/Space/pages/SpaceAddPageSubscription.mjs +0 -26
  188. package/dist/network/graphql/builder/Subscriptions/Space/pages/SpaceHomePageSubscription.d.ts +0 -6
  189. package/dist/network/graphql/builder/Subscriptions/Space/pages/SpaceHomePageSubscription.mjs +0 -26
  190. package/dist/network/graphql/builder/Subscriptions/Space/pages/SpaceRemovePageSubscription.d.ts +0 -5
  191. package/dist/network/graphql/builder/Subscriptions/Space/pages/SpaceRemovePageSubscription.mjs +0 -11
  192. package/dist/network/graphql/builder/Subscriptions/Space/pages/SpaceUpdatePageSubscription.d.ts +0 -6
  193. package/dist/network/graphql/builder/Subscriptions/Space/pages/SpaceUpdatePageSubscription.mjs +0 -26
  194. package/dist/network/graphql/builder/Subscriptions/Space/variables/SpaceAddVariableSubscription.d.ts +0 -6
  195. package/dist/network/graphql/builder/Subscriptions/Space/variables/SpaceAddVariableSubscription.mjs +0 -20
  196. package/dist/network/graphql/builder/Subscriptions/Space/variables/SpaceRemoveVariableSubscription.d.ts +0 -5
  197. package/dist/network/graphql/builder/Subscriptions/Space/variables/SpaceRemoveVariableSubscription.mjs +0 -11
  198. package/dist/network/graphql/builder/Subscriptions/Space/variables/SpaceUpdateVariableSubscription.d.ts +0 -6
  199. package/dist/network/graphql/builder/Subscriptions/Space/variables/SpaceUpdateVariableSubscription.mjs +0 -20
  200. package/dist/network/graphql/builder/Subscriptions/Style/StyleUpdateSettingsSubscription.d.ts +0 -6
  201. package/dist/network/graphql/builder/Subscriptions/Style/StyleUpdateSettingsSubscription.mjs +0 -12
  202. package/dist/network/graphql/builder/Subscriptions/Style/StyleUpdatedSubscription.d.ts +0 -4
  203. package/dist/network/graphql/builder/Subscriptions/Style/StyleUpdatedSubscription.mjs +0 -13
  204. package/dist/network/graphql/builder/Subscriptions/Style/selector/StyleAddSelectorSubscription.d.ts +0 -16
  205. package/dist/network/graphql/builder/Subscriptions/Style/selector/StyleAddSelectorSubscription.mjs +0 -16
  206. package/dist/network/graphql/builder/Subscriptions/Style/selector/StyleRemoveSelectorSubscription.d.ts +0 -7
  207. package/dist/network/graphql/builder/Subscriptions/Style/selector/StyleRemoveSelectorSubscription.mjs +0 -12
  208. package/dist/network/graphql/builder/Subscriptions/Style/selector/StyleRemoveSelectorsSubscription.d.ts +0 -7
  209. package/dist/network/graphql/builder/Subscriptions/Style/selector/StyleRemoveSelectorsSubscription.mjs +0 -12
  210. package/dist/network/graphql/builder/Subscriptions/Style/selector/StyleUpdateSelectorSubscription.d.ts +0 -15
  211. package/dist/network/graphql/builder/Subscriptions/Style/selector/StyleUpdateSelectorSubscription.mjs +0 -16
  212. package/dist/network/graphql/builder/Subscriptions/Style/selectorVariables/StyleAddSelectorVariableSubscription.d.ts +0 -10
  213. package/dist/network/graphql/builder/Subscriptions/Style/selectorVariables/StyleAddSelectorVariableSubscription.mjs +0 -15
  214. package/dist/network/graphql/builder/Subscriptions/Style/selectorVariables/StyleRemoveSelectorVariableSubscription.d.ts +0 -9
  215. package/dist/network/graphql/builder/Subscriptions/Style/selectorVariables/StyleRemoveSelectorVariableSubscription.mjs +0 -14
  216. package/dist/network/graphql/builder/Subscriptions/Style/selectorVariables/StyleUpdateSelectorVariableSubscription.d.ts +0 -10
  217. package/dist/network/graphql/builder/Subscriptions/Style/selectorVariables/StyleUpdateSelectorVariableSubscription.mjs +0 -15
  218. package/dist/network/graphql/builder/Subscriptions/Style/variables/StyleAddVariableSubscription.d.ts +0 -8
  219. package/dist/network/graphql/builder/Subscriptions/Style/variables/StyleAddVariableSubscription.mjs +0 -13
  220. package/dist/network/graphql/builder/Subscriptions/Style/variables/StyleRemoveVariableSubscription.d.ts +0 -7
  221. package/dist/network/graphql/builder/Subscriptions/Style/variables/StyleRemoveVariableSubscription.mjs +0 -12
  222. package/dist/network/graphql/builder/Subscriptions/Style/variables/StyleUpdateVariableSubscription.d.ts +0 -8
  223. package/dist/network/graphql/builder/Subscriptions/Style/variables/StyleUpdateVariableSubscription.mjs +0 -13
  224. package/dist/network/graphql/sdk/Mutations/Collection/CollectionAddMutation.d.ts +0 -2
  225. package/dist/network/graphql/sdk/Mutations/Collection/CollectionAddRecordMutation.d.ts +0 -4
  226. package/dist/network/graphql/sdk/Mutations/Collection/CollectionAddRecordMutation.mjs +0 -16
  227. package/dist/network/graphql/sdk/Mutations/Collection/CollectionRemoveMutation.d.ts +0 -2
  228. package/dist/network/graphql/sdk/Mutations/Collection/CollectionRemoveRecordMutation.d.ts +0 -4
  229. package/dist/network/graphql/sdk/Mutations/Collection/CollectionRemoveRecordMutation.mjs +0 -14
  230. package/dist/network/graphql/sdk/Mutations/Collection/CollectionUpdateMutation.d.ts +0 -2
  231. package/dist/network/graphql/sdk/Mutations/Collection/CollectionUpdateRecordMutation.d.ts +0 -4
  232. package/dist/network/graphql/sdk/Mutations/Collection/CollectionUpdateRecordMutation.mjs +0 -16
  233. package/dist/network/graphql/sdk/Queries/Collection/CollectionQuery.d.ts +0 -6
  234. package/dist/network/graphql/sdk/Queries/Collection/CollectionQuery.mjs +0 -32
  235. package/dist/network/graphql/sdk/Queries/Collection/CollectionRecordQuery.d.ts +0 -6
  236. package/dist/network/graphql/sdk/Queries/Collection/CollectionRecordQuery.mjs +0 -14
  237. package/dist/network/graphql/sdk/Queries/Collection/CollectionRecordsQuery.d.ts +0 -9
  238. package/dist/network/graphql/sdk/Queries/Collection/CollectionRecordsQuery.mjs +0 -25
  239. package/dist/network/graphql/sdk/Queries/Collection/CollectionsQuery.d.ts +0 -9
  240. package/dist/network/graphql/sdk/Queries/Collection/CollectionsQuery.mjs +0 -25
  241. package/dist/server/rsc/RscContext.d.ts +0 -13
  242. package/dist/server/rsc/RscContext.mjs +0 -5
  243. package/dist/server/rsc/RscProvider.d.ts +0 -13
  244. package/dist/server/rsc/RscProvider.mjs +0 -42
@@ -0,0 +1,405 @@
1
+ import { z } from 'zod';
2
+ import { StyleVariableCategory } from '../types/StyleTypes';
3
+ import { DropPosition, Element, PageFolder, SchemaRaw, SchemaVariable, Style, StyleCategory, StyleItem, StyleVariableValue } from '../types';
4
+ export declare const spaceEventSchemas: {
5
+ readonly SPACE_UPDATED: z.ZodObject<{
6
+ schema: z.ZodCustom<SchemaRaw, SchemaRaw>;
7
+ }, z.core.$strip>;
8
+ readonly STYLE_UPDATED: z.ZodObject<{
9
+ platform: z.ZodCustom<Record<import('..').DisplayMode, Record<string, StyleItem>>, Record<import('..').DisplayMode, Record<string, StyleItem>>>;
10
+ variables: z.ZodCustom<Partial<import('..').StyleVariables>, Partial<import('..').StyleVariables>>;
11
+ cache: z.ZodString;
12
+ }, z.core.$strip>;
13
+ readonly SPACE_ADD_PAGE: z.ZodObject<{
14
+ page: z.ZodCustom<Element, Element>;
15
+ }, z.core.$strip>;
16
+ readonly SPACE_UPDATE_PAGE: z.ZodObject<{
17
+ page: z.ZodCustom<Element, Element>;
18
+ }, z.core.$strip>;
19
+ readonly SPACE_SET_HOME_PAGE: z.ZodObject<{
20
+ page: z.ZodCustom<Element, Element>;
21
+ }, z.core.$strip>;
22
+ readonly SPACE_REMOVE_PAGE: z.ZodObject<{
23
+ pageId: z.ZodString;
24
+ }, z.core.$strip>;
25
+ readonly SPACE_ADD_PAGE_FOLDER: z.ZodObject<{
26
+ pageFolder: z.ZodCustom<PageFolder, PageFolder>;
27
+ }, z.core.$strip>;
28
+ readonly SPACE_UPDATE_PAGE_FOLDER: z.ZodObject<{
29
+ pageFolder: z.ZodCustom<PageFolder, PageFolder>;
30
+ }, z.core.$strip>;
31
+ readonly SPACE_REMOVE_PAGE_FOLDER: z.ZodObject<{
32
+ pageFolderId: z.ZodString;
33
+ }, z.core.$strip>;
34
+ readonly SPACE_ADD_VARIABLE: z.ZodObject<{
35
+ variable: z.ZodCustom<SchemaVariable, SchemaVariable>;
36
+ }, z.core.$strip>;
37
+ readonly SPACE_UPDATE_VARIABLE: z.ZodObject<{
38
+ variable: z.ZodCustom<SchemaVariable, SchemaVariable>;
39
+ }, z.core.$strip>;
40
+ readonly SPACE_REMOVE_VARIABLE: z.ZodObject<{
41
+ name: z.ZodString;
42
+ }, z.core.$strip>;
43
+ readonly SPACE_ADD_ELEMENT: z.ZodObject<{
44
+ element: z.ZodCustom<Element, Element>;
45
+ dropPosition: z.ZodCustom<DropPosition, DropPosition>;
46
+ to: z.ZodString;
47
+ initialItems: z.ZodOptional<z.ZodArray<z.ZodCustom<Element, Element>>>;
48
+ variables: z.ZodOptional<z.ZodArray<z.ZodCustom<SchemaVariable, SchemaVariable>>>;
49
+ }, z.core.$strip>;
50
+ readonly SPACE_UPDATE_ELEMENT: z.ZodObject<{
51
+ element: z.ZodCustom<Element, Element>;
52
+ }, z.core.$strip>;
53
+ readonly SPACE_UPDATE_ELEMENTS: z.ZodObject<{
54
+ elements: z.ZodArray<z.ZodCustom<Element, Element>>;
55
+ }, z.core.$strip>;
56
+ readonly SPACE_REMOVE_ELEMENT: z.ZodObject<{
57
+ elementId: z.ZodString;
58
+ }, z.core.$strip>;
59
+ readonly SPACE_MOVE_ELEMENT: z.ZodObject<{
60
+ from: z.ZodString;
61
+ to: z.ZodString;
62
+ elementId: z.ZodString;
63
+ dropPosition: z.ZodCustom<DropPosition, DropPosition>;
64
+ }, z.core.$strip>;
65
+ readonly SPACE_CLONE_ELEMENT: z.ZodObject<{
66
+ to: z.ZodString;
67
+ element: z.ZodCustom<Element, Element>;
68
+ dropPosition: z.ZodCustom<DropPosition, DropPosition>;
69
+ initialItems: z.ZodArray<z.ZodCustom<Element, Element>>;
70
+ }, z.core.$strip>;
71
+ readonly SPACE_ADD_TEMPLATE: z.ZodObject<{
72
+ element: z.ZodCustom<Element, Element>;
73
+ style: z.ZodCustom<Style, Style>;
74
+ to: z.ZodString;
75
+ dropPosition: z.ZodCustom<DropPosition, DropPosition>;
76
+ initialItems: z.ZodOptional<z.ZodArray<z.ZodCustom<Element, Element>>>;
77
+ variables: z.ZodOptional<z.ZodArray<z.ZodCustom<SchemaVariable, SchemaVariable>>>;
78
+ }, z.core.$strip>;
79
+ readonly SPACE_UPDATE_SETTINGS: z.ZodObject<{
80
+ path: z.ZodString;
81
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
82
+ }, z.core.$strip>;
83
+ readonly STYLE_ADD_SELECTOR: z.ZodObject<{
84
+ displayMode: z.ZodEnum<{
85
+ desktop: "desktop";
86
+ tablet: "tablet";
87
+ mobile: "mobile";
88
+ }>;
89
+ selector: z.ZodString;
90
+ path: z.ZodOptional<z.ZodCustom<StyleCategory, StyleCategory>>;
91
+ type: z.ZodEnum<{
92
+ class: "class";
93
+ element: "element";
94
+ id: "id";
95
+ }>;
96
+ style: z.ZodOptional<z.ZodCustom<import('..').StyleAttributes, import('..').StyleAttributes>>;
97
+ params: z.ZodObject<{
98
+ componentType: z.ZodOptional<z.ZodString>;
99
+ styleSelector: z.ZodOptional<z.ZodString>;
100
+ styleState: z.ZodOptional<z.ZodEnum<{
101
+ disabled: "disabled";
102
+ hover: "hover";
103
+ active: "active";
104
+ focus: "focus";
105
+ checked: "checked";
106
+ visited: "visited";
107
+ }>>;
108
+ styleVariant: z.ZodOptional<z.ZodString>;
109
+ }, z.core.$strip>;
110
+ }, z.core.$strip>;
111
+ readonly STYLE_UPDATE_SELECTOR: z.ZodObject<{
112
+ displayMode: z.ZodEnum<{
113
+ desktop: "desktop";
114
+ tablet: "tablet";
115
+ mobile: "mobile";
116
+ }>;
117
+ selector: z.ZodString;
118
+ path: z.ZodOptional<z.ZodCustom<StyleCategory, StyleCategory>>;
119
+ style: z.ZodOptional<z.ZodCustom<import('..').StyleAttributes, import('..').StyleAttributes>>;
120
+ params: z.ZodObject<{
121
+ componentType: z.ZodOptional<z.ZodString>;
122
+ styleState: z.ZodOptional<z.ZodEnum<{
123
+ disabled: "disabled";
124
+ hover: "hover";
125
+ active: "active";
126
+ focus: "focus";
127
+ checked: "checked";
128
+ visited: "visited";
129
+ }>>;
130
+ styleVariant: z.ZodOptional<z.ZodString>;
131
+ styleSelector: z.ZodString;
132
+ }, z.core.$strip>;
133
+ }, z.core.$strip>;
134
+ readonly STYLE_REMOVE_SELECTOR: z.ZodObject<{
135
+ displayMode: z.ZodEnum<{
136
+ desktop: "desktop";
137
+ tablet: "tablet";
138
+ mobile: "mobile";
139
+ }>;
140
+ selector: z.ZodString;
141
+ }, z.core.$strip>;
142
+ readonly STYLE_REMOVE_SELECTORS: z.ZodObject<{
143
+ displayMode: z.ZodEnum<{
144
+ desktop: "desktop";
145
+ tablet: "tablet";
146
+ mobile: "mobile";
147
+ }>;
148
+ selectors: z.ZodArray<z.ZodString>;
149
+ }, z.core.$strip>;
150
+ readonly STYLE_ADD_SELECTOR_VARIABLE: z.ZodObject<{
151
+ displayMode: z.ZodEnum<{
152
+ desktop: "desktop";
153
+ tablet: "tablet";
154
+ mobile: "mobile";
155
+ }>;
156
+ selector: z.ZodString;
157
+ category: z.ZodEnum<typeof StyleVariableCategory>;
158
+ name: z.ZodString;
159
+ value: z.ZodCustom<StyleVariableValue, StyleVariableValue>;
160
+ }, z.core.$strip>;
161
+ readonly STYLE_UPDATE_SELECTOR_VARIABLE: z.ZodObject<{
162
+ displayMode: z.ZodEnum<{
163
+ desktop: "desktop";
164
+ tablet: "tablet";
165
+ mobile: "mobile";
166
+ }>;
167
+ selector: z.ZodString;
168
+ category: z.ZodEnum<typeof StyleVariableCategory>;
169
+ name: z.ZodString;
170
+ value: z.ZodCustom<StyleVariableValue, StyleVariableValue>;
171
+ }, z.core.$strip>;
172
+ readonly STYLE_REMOVE_SELECTOR_VARIABLE: z.ZodObject<{
173
+ displayMode: z.ZodEnum<{
174
+ desktop: "desktop";
175
+ tablet: "tablet";
176
+ mobile: "mobile";
177
+ }>;
178
+ selector: z.ZodString;
179
+ category: z.ZodEnum<typeof StyleVariableCategory>;
180
+ name: z.ZodString;
181
+ }, z.core.$strip>;
182
+ readonly STYLE_ADD_VARIABLE: z.ZodObject<{
183
+ category: z.ZodEnum<typeof StyleVariableCategory>;
184
+ name: z.ZodString;
185
+ value: z.ZodCustom<StyleVariableValue, StyleVariableValue>;
186
+ }, z.core.$strip>;
187
+ readonly STYLE_UPDATE_VARIABLE: z.ZodObject<{
188
+ category: z.ZodEnum<typeof StyleVariableCategory>;
189
+ name: z.ZodString;
190
+ value: z.ZodCustom<StyleVariableValue, StyleVariableValue>;
191
+ }, z.core.$strip>;
192
+ readonly STYLE_REMOVE_VARIABLE: z.ZodObject<{
193
+ category: z.ZodEnum<typeof StyleVariableCategory>;
194
+ name: z.ZodString;
195
+ }, z.core.$strip>;
196
+ readonly STYLE_UPDATE_SETTINGS: z.ZodObject<{
197
+ path: z.ZodString;
198
+ value: z.ZodString;
199
+ }, z.core.$strip>;
200
+ readonly SEGMENT_ADD_ELEMENT: z.ZodObject<{
201
+ element: z.ZodCustom<Element, Element>;
202
+ dropPosition: z.ZodCustom<DropPosition, DropPosition>;
203
+ to: z.ZodString;
204
+ initialItems: z.ZodOptional<z.ZodArray<z.ZodCustom<Element, Element>>>;
205
+ variables: z.ZodOptional<z.ZodArray<z.ZodCustom<SchemaVariable, SchemaVariable>>>;
206
+ contextId: z.ZodString;
207
+ }, z.core.$strip>;
208
+ readonly SEGMENT_UPDATE_ELEMENT: z.ZodObject<{
209
+ element: z.ZodCustom<Element, Element>;
210
+ contextId: z.ZodString;
211
+ }, z.core.$strip>;
212
+ readonly SEGMENT_UPDATE_ELEMENTS: z.ZodObject<{
213
+ elements: z.ZodArray<z.ZodCustom<Element, Element>>;
214
+ contextId: z.ZodString;
215
+ }, z.core.$strip>;
216
+ readonly SEGMENT_REMOVE_ELEMENT: z.ZodObject<{
217
+ elementId: z.ZodString;
218
+ contextId: z.ZodString;
219
+ }, z.core.$strip>;
220
+ readonly SEGMENT_MOVE_ELEMENT: z.ZodObject<{
221
+ elementId: z.ZodString;
222
+ from: z.ZodString;
223
+ to: z.ZodString;
224
+ dropPosition: z.ZodCustom<DropPosition, DropPosition>;
225
+ contextId: z.ZodString;
226
+ }, z.core.$strip>;
227
+ readonly SEGMENT_CLONE_ELEMENT: z.ZodObject<{
228
+ element: z.ZodCustom<Element, Element>;
229
+ dropPosition: z.ZodCustom<DropPosition, DropPosition>;
230
+ to: z.ZodString;
231
+ initialItems: z.ZodOptional<z.ZodArray<z.ZodCustom<Element, Element>>>;
232
+ contextId: z.ZodString;
233
+ }, z.core.$strip>;
234
+ readonly SEGMENT_ADD_TEMPLATE: z.ZodObject<{
235
+ element: z.ZodCustom<Element, Element>;
236
+ style: z.ZodCustom<Style, Style>;
237
+ to: z.ZodString;
238
+ dropPosition: z.ZodCustom<DropPosition, DropPosition>;
239
+ initialItems: z.ZodOptional<z.ZodArray<z.ZodCustom<Element, Element>>>;
240
+ variables: z.ZodOptional<z.ZodArray<z.ZodCustom<SchemaVariable, SchemaVariable>>>;
241
+ contextId: z.ZodString;
242
+ }, z.core.$strip>;
243
+ readonly SEGMENT_SPACE_ADD_VARIABLE: z.ZodObject<{
244
+ variable: z.ZodCustom<SchemaVariable, SchemaVariable>;
245
+ contextId: z.ZodString;
246
+ }, z.core.$strip>;
247
+ readonly SEGMENT_SPACE_UPDATE_VARIABLE: z.ZodObject<{
248
+ variable: z.ZodCustom<SchemaVariable, SchemaVariable>;
249
+ contextId: z.ZodString;
250
+ }, z.core.$strip>;
251
+ readonly SEGMENT_SPACE_REMOVE_VARIABLE: z.ZodObject<{
252
+ variable: z.ZodObject<{
253
+ name: z.ZodString;
254
+ }, z.core.$strip>;
255
+ contextId: z.ZodString;
256
+ }, z.core.$strip>;
257
+ readonly SEGMENT_STYLE_ADD_SELECTOR: z.ZodObject<{
258
+ displayMode: z.ZodEnum<{
259
+ desktop: "desktop";
260
+ tablet: "tablet";
261
+ mobile: "mobile";
262
+ }>;
263
+ selector: z.ZodString;
264
+ type: z.ZodEnum<{
265
+ class: "class";
266
+ element: "element";
267
+ id: "id";
268
+ }>;
269
+ path: z.ZodOptional<z.ZodCustom<StyleCategory, StyleCategory>>;
270
+ style: z.ZodOptional<z.ZodCustom<import('..').StyleAttributes, import('..').StyleAttributes>>;
271
+ params: z.ZodObject<{
272
+ componentType: z.ZodOptional<z.ZodString>;
273
+ styleSelector: z.ZodOptional<z.ZodString>;
274
+ styleState: z.ZodOptional<z.ZodEnum<{
275
+ disabled: "disabled";
276
+ hover: "hover";
277
+ active: "active";
278
+ focus: "focus";
279
+ checked: "checked";
280
+ visited: "visited";
281
+ }>>;
282
+ styleVariant: z.ZodOptional<z.ZodString>;
283
+ }, z.core.$strip>;
284
+ contextId: z.ZodString;
285
+ }, z.core.$strip>;
286
+ readonly SEGMENT_STYLE_UPDATE_SELECTOR: z.ZodObject<{
287
+ displayMode: z.ZodEnum<{
288
+ desktop: "desktop";
289
+ tablet: "tablet";
290
+ mobile: "mobile";
291
+ }>;
292
+ selector: z.ZodString;
293
+ path: z.ZodOptional<z.ZodCustom<StyleCategory, StyleCategory>>;
294
+ style: z.ZodOptional<z.ZodCustom<import('..').StyleAttributes, import('..').StyleAttributes>>;
295
+ params: z.ZodObject<{
296
+ componentType: z.ZodOptional<z.ZodString>;
297
+ styleState: z.ZodOptional<z.ZodEnum<{
298
+ disabled: "disabled";
299
+ hover: "hover";
300
+ active: "active";
301
+ focus: "focus";
302
+ checked: "checked";
303
+ visited: "visited";
304
+ }>>;
305
+ styleVariant: z.ZodOptional<z.ZodString>;
306
+ styleSelector: z.ZodString;
307
+ }, z.core.$strip>;
308
+ contextId: z.ZodString;
309
+ }, z.core.$strip>;
310
+ readonly SEGMENT_STYLE_REMOVE_SELECTOR: z.ZodObject<{
311
+ displayMode: z.ZodEnum<{
312
+ desktop: "desktop";
313
+ tablet: "tablet";
314
+ mobile: "mobile";
315
+ }>;
316
+ selector: z.ZodString;
317
+ contextId: z.ZodString;
318
+ }, z.core.$strip>;
319
+ readonly SEGMENT_STYLE_REMOVE_SELECTORS: z.ZodObject<{
320
+ displayMode: z.ZodEnum<{
321
+ desktop: "desktop";
322
+ tablet: "tablet";
323
+ mobile: "mobile";
324
+ }>;
325
+ selectors: z.ZodArray<z.ZodString>;
326
+ contextId: z.ZodString;
327
+ }, z.core.$strip>;
328
+ readonly SEGMENT_STYLE_ADD_SELECTOR_VARIABLE: z.ZodObject<{
329
+ displayMode: z.ZodEnum<{
330
+ desktop: "desktop";
331
+ tablet: "tablet";
332
+ mobile: "mobile";
333
+ }>;
334
+ selector: z.ZodString;
335
+ category: z.ZodEnum<typeof StyleVariableCategory>;
336
+ name: z.ZodString;
337
+ value: z.ZodCustom<StyleVariableValue, StyleVariableValue>;
338
+ contextId: z.ZodString;
339
+ }, z.core.$strip>;
340
+ readonly SEGMENT_STYLE_UPDATE_SELECTOR_VARIABLE: z.ZodObject<{
341
+ displayMode: z.ZodEnum<{
342
+ desktop: "desktop";
343
+ tablet: "tablet";
344
+ mobile: "mobile";
345
+ }>;
346
+ selector: z.ZodString;
347
+ category: z.ZodEnum<typeof StyleVariableCategory>;
348
+ name: z.ZodString;
349
+ value: z.ZodCustom<StyleVariableValue, StyleVariableValue>;
350
+ contextId: z.ZodString;
351
+ }, z.core.$strip>;
352
+ readonly SEGMENT_STYLE_REMOVE_SELECTOR_VARIABLE: z.ZodObject<{
353
+ displayMode: z.ZodEnum<{
354
+ desktop: "desktop";
355
+ tablet: "tablet";
356
+ mobile: "mobile";
357
+ }>;
358
+ selector: z.ZodString;
359
+ category: z.ZodEnum<typeof StyleVariableCategory>;
360
+ name: z.ZodString;
361
+ contextId: z.ZodString;
362
+ }, z.core.$strip>;
363
+ readonly SEGMENT_STYLE_ADD_VARIABLE: z.ZodObject<{
364
+ category: z.ZodEnum<typeof StyleVariableCategory>;
365
+ name: z.ZodString;
366
+ value: z.ZodCustom<StyleVariableValue, StyleVariableValue>;
367
+ contextId: z.ZodString;
368
+ }, z.core.$strip>;
369
+ readonly SEGMENT_STYLE_UPDATE_VARIABLE: z.ZodObject<{
370
+ category: z.ZodEnum<typeof StyleVariableCategory>;
371
+ name: z.ZodString;
372
+ value: z.ZodCustom<StyleVariableValue, StyleVariableValue>;
373
+ contextId: z.ZodString;
374
+ }, z.core.$strip>;
375
+ readonly SEGMENT_STYLE_REMOVE_VARIABLE: z.ZodObject<{
376
+ category: z.ZodEnum<typeof StyleVariableCategory>;
377
+ name: z.ZodString;
378
+ contextId: z.ZodString;
379
+ }, z.core.$strip>;
380
+ };
381
+ export type SpaceEventName = keyof typeof spaceEventSchemas;
382
+ /** The payload each event carries, inferred from its schema so there is no second definition to keep in step. */
383
+ export type SpaceEventMap = {
384
+ [K in SpaceEventName]: z.infer<(typeof spaceEventSchemas)[K]>;
385
+ };
386
+ /** The event names as values, for the publisher — the same list as the schemas, never a copy of it. */
387
+ export declare const SpaceEvents: { [K in SpaceEventName]: K; };
388
+ export type SpaceEventIssue = {
389
+ path: string;
390
+ message: string;
391
+ };
392
+ export type SpaceEventValidation<T extends SpaceEventName> = {
393
+ ok: true;
394
+ data: SpaceEventMap[T];
395
+ } | {
396
+ ok: false;
397
+ issues: SpaceEventIssue[];
398
+ };
399
+ /**
400
+ * Checks a payload against the event it claims to be. The wire is JSON, so nothing above this line proves what
401
+ * arrived: the compiler agrees with both ends only for the build they were compiled in, and a session talking to a
402
+ * server of another version is exactly where it stops being true.
403
+ */
404
+ export declare const validateSpaceEvent: <T extends SpaceEventName>(event: T, data: unknown) => SpaceEventValidation<T>;
405
+ export default SpaceEvents;
@@ -0,0 +1,244 @@
1
+ import { StyleVariableCategory as e } from "../types/StyleTypes.mjs";
2
+ import { z as t } from "zod";
3
+ //#region src/network/spaceEvents.ts
4
+ var n = (e) => typeof e == "object" && !!e && !Array.isArray(e), r = t.custom((e) => n(e) && typeof e.id == "string", { message: "expected an element with an id" }), i = t.array(r), a = t.custom((e) => n(e) && Array.isArray(e.flat), { message: "expected a schema whose `flat` is a list of elements" }), o = t.custom((e) => n(e) && typeof e.id == "string", { message: "expected a page folder with an id" }), s = t.custom((e) => n(e) && typeof e.name == "string", { message: "expected a variable with a name" }), c = t.custom(n, { message: "expected a style attributes object" }), l = t.custom((e) => typeof e == "string" || typeof e == "number" || n(e), { message: "expected a style variable value" }), u = t.enum([
5
+ "desktop",
6
+ "tablet",
7
+ "mobile"
8
+ ]), d = t.custom((e) => typeof e == "string", { message: "expected a drop position" }), f = t.custom((e) => typeof e == "string", { message: "expected a style category" }), p = t.enum([
9
+ "class",
10
+ "element",
11
+ "id"
12
+ ]), m = t.enum([
13
+ "hover",
14
+ "active",
15
+ "focus",
16
+ "disabled",
17
+ "checked",
18
+ "visited"
19
+ ]), h = t.enum(e), g = t.object({
20
+ componentType: t.string().optional(),
21
+ styleSelector: t.string().optional(),
22
+ styleState: m.optional(),
23
+ styleVariant: t.string().optional()
24
+ }), _ = g.extend({ styleSelector: t.string() }), v = { contextId: t.string() }, y = t.object({ variable: s }), b = t.object({
25
+ displayMode: u,
26
+ selector: t.string(),
27
+ category: h,
28
+ name: t.string(),
29
+ value: l
30
+ }), x = t.object({
31
+ displayMode: u,
32
+ selector: t.string(),
33
+ category: h,
34
+ name: t.string()
35
+ }), S = t.object({
36
+ category: h,
37
+ name: t.string(),
38
+ value: l
39
+ }), C = {
40
+ SPACE_UPDATED: t.object({ schema: a }),
41
+ STYLE_UPDATED: t.object({
42
+ platform: t.custom(n),
43
+ variables: t.custom(n),
44
+ cache: t.string()
45
+ }),
46
+ SPACE_ADD_PAGE: t.object({ page: r }),
47
+ SPACE_UPDATE_PAGE: t.object({ page: r }),
48
+ SPACE_SET_HOME_PAGE: t.object({ page: r }),
49
+ SPACE_REMOVE_PAGE: t.object({ pageId: t.string() }),
50
+ SPACE_ADD_PAGE_FOLDER: t.object({ pageFolder: o }),
51
+ SPACE_UPDATE_PAGE_FOLDER: t.object({ pageFolder: o }),
52
+ SPACE_REMOVE_PAGE_FOLDER: t.object({ pageFolderId: t.string() }),
53
+ SPACE_ADD_VARIABLE: y,
54
+ SPACE_UPDATE_VARIABLE: y,
55
+ SPACE_REMOVE_VARIABLE: t.object({ name: t.string() }),
56
+ SPACE_ADD_ELEMENT: t.object({
57
+ element: r,
58
+ dropPosition: d,
59
+ to: t.string(),
60
+ initialItems: i.optional(),
61
+ variables: t.array(s).optional()
62
+ }),
63
+ SPACE_UPDATE_ELEMENT: t.object({ element: r }),
64
+ SPACE_UPDATE_ELEMENTS: t.object({ elements: i }),
65
+ SPACE_REMOVE_ELEMENT: t.object({ elementId: t.string() }),
66
+ SPACE_MOVE_ELEMENT: t.object({
67
+ from: t.string(),
68
+ to: t.string(),
69
+ elementId: t.string(),
70
+ dropPosition: d
71
+ }),
72
+ SPACE_CLONE_ELEMENT: t.object({
73
+ to: t.string(),
74
+ element: r,
75
+ dropPosition: d,
76
+ initialItems: i
77
+ }),
78
+ SPACE_ADD_TEMPLATE: t.object({
79
+ element: r,
80
+ style: t.custom(n),
81
+ to: t.string(),
82
+ dropPosition: d,
83
+ initialItems: i.optional(),
84
+ variables: t.array(s).optional()
85
+ }),
86
+ SPACE_UPDATE_SETTINGS: t.object({
87
+ path: t.string(),
88
+ value: t.union([
89
+ t.string(),
90
+ t.number(),
91
+ t.boolean()
92
+ ])
93
+ }),
94
+ STYLE_ADD_SELECTOR: t.object({
95
+ displayMode: u,
96
+ selector: t.string(),
97
+ path: f.optional(),
98
+ type: p,
99
+ style: c.optional(),
100
+ params: g
101
+ }),
102
+ STYLE_UPDATE_SELECTOR: t.object({
103
+ displayMode: u,
104
+ selector: t.string(),
105
+ path: f.optional(),
106
+ style: c.optional(),
107
+ params: _
108
+ }),
109
+ STYLE_REMOVE_SELECTOR: t.object({
110
+ displayMode: u,
111
+ selector: t.string()
112
+ }),
113
+ STYLE_REMOVE_SELECTORS: t.object({
114
+ displayMode: u,
115
+ selectors: t.array(t.string())
116
+ }),
117
+ STYLE_ADD_SELECTOR_VARIABLE: b,
118
+ STYLE_UPDATE_SELECTOR_VARIABLE: b,
119
+ STYLE_REMOVE_SELECTOR_VARIABLE: x,
120
+ STYLE_ADD_VARIABLE: S,
121
+ STYLE_UPDATE_VARIABLE: S,
122
+ STYLE_REMOVE_VARIABLE: t.object({
123
+ category: h,
124
+ name: t.string()
125
+ }),
126
+ STYLE_UPDATE_SETTINGS: t.object({
127
+ path: t.string(),
128
+ value: t.string()
129
+ }),
130
+ SEGMENT_ADD_ELEMENT: t.object({
131
+ ...v,
132
+ element: r,
133
+ dropPosition: d,
134
+ to: t.string(),
135
+ initialItems: i.optional(),
136
+ variables: t.array(s).optional()
137
+ }),
138
+ SEGMENT_UPDATE_ELEMENT: t.object({
139
+ ...v,
140
+ element: r
141
+ }),
142
+ SEGMENT_UPDATE_ELEMENTS: t.object({
143
+ ...v,
144
+ elements: i
145
+ }),
146
+ SEGMENT_REMOVE_ELEMENT: t.object({
147
+ ...v,
148
+ elementId: t.string()
149
+ }),
150
+ SEGMENT_MOVE_ELEMENT: t.object({
151
+ ...v,
152
+ elementId: t.string(),
153
+ from: t.string(),
154
+ to: t.string(),
155
+ dropPosition: d
156
+ }),
157
+ SEGMENT_CLONE_ELEMENT: t.object({
158
+ ...v,
159
+ element: r,
160
+ dropPosition: d,
161
+ to: t.string(),
162
+ initialItems: i.optional()
163
+ }),
164
+ SEGMENT_ADD_TEMPLATE: t.object({
165
+ ...v,
166
+ element: r,
167
+ style: t.custom(n),
168
+ to: t.string(),
169
+ dropPosition: d,
170
+ initialItems: i.optional(),
171
+ variables: t.array(s).optional()
172
+ }),
173
+ SEGMENT_SPACE_ADD_VARIABLE: t.object({
174
+ ...v,
175
+ variable: s
176
+ }),
177
+ SEGMENT_SPACE_UPDATE_VARIABLE: t.object({
178
+ ...v,
179
+ variable: s
180
+ }),
181
+ SEGMENT_SPACE_REMOVE_VARIABLE: t.object({
182
+ ...v,
183
+ variable: t.object({ name: t.string() })
184
+ }),
185
+ SEGMENT_STYLE_ADD_SELECTOR: t.object({
186
+ ...v,
187
+ displayMode: u,
188
+ selector: t.string(),
189
+ type: p,
190
+ path: f.optional(),
191
+ style: c.optional(),
192
+ params: g
193
+ }),
194
+ SEGMENT_STYLE_UPDATE_SELECTOR: t.object({
195
+ ...v,
196
+ displayMode: u,
197
+ selector: t.string(),
198
+ path: f.optional(),
199
+ style: c.optional(),
200
+ params: _
201
+ }),
202
+ SEGMENT_STYLE_REMOVE_SELECTOR: t.object({
203
+ ...v,
204
+ displayMode: u,
205
+ selector: t.string()
206
+ }),
207
+ SEGMENT_STYLE_REMOVE_SELECTORS: t.object({
208
+ ...v,
209
+ displayMode: u,
210
+ selectors: t.array(t.string())
211
+ }),
212
+ SEGMENT_STYLE_ADD_SELECTOR_VARIABLE: b.extend(v),
213
+ SEGMENT_STYLE_UPDATE_SELECTOR_VARIABLE: b.extend(v),
214
+ SEGMENT_STYLE_REMOVE_SELECTOR_VARIABLE: x.extend(v),
215
+ SEGMENT_STYLE_ADD_VARIABLE: S.extend(v),
216
+ SEGMENT_STYLE_UPDATE_VARIABLE: S.extend(v),
217
+ SEGMENT_STYLE_REMOVE_VARIABLE: t.object({
218
+ ...v,
219
+ category: h,
220
+ name: t.string()
221
+ })
222
+ }, w = Object.fromEntries(Object.keys(C).map((e) => [e, e])), T = (e, t) => {
223
+ let n = C[e];
224
+ if (!n) return {
225
+ ok: !1,
226
+ issues: [{
227
+ path: "",
228
+ message: `Unknown space event "${e}"`
229
+ }]
230
+ };
231
+ let r = n.safeParse(t);
232
+ return r.success ? {
233
+ ok: !0,
234
+ data: r.data
235
+ } : {
236
+ ok: !1,
237
+ issues: r.error.issues.map((e) => ({
238
+ path: e.path.join("."),
239
+ message: e.message
240
+ }))
241
+ };
242
+ };
243
+ //#endregion
244
+ export { w as SpaceEvents, w as default, C as spaceEventSchemas, T as validateSpaceEvent };
@@ -1,5 +1,5 @@
1
- import { default as RscContext } from './rsc/RscContext';
2
- import { default as RscProvider } from './rsc/RscProvider';
3
- export * from './rsc/RscContext';
4
- export * from './rsc/RscProvider';
5
- export { RscContext, RscProvider };
1
+ import { default as refreshRsc } from './rsc/refreshRsc';
2
+ import { default as useRscRefresh } from './rsc/useRscRefresh';
3
+ import { default as useRscSync } from './rsc/useRscSync';
4
+ export * from './rsc/refreshRsc';
5
+ export { refreshRsc, useRscRefresh, useRscSync };
@@ -1,3 +1,4 @@
1
- import e from "./rsc/RscContext.mjs";
2
- import t from "./rsc/RscProvider.mjs";
3
- export { e as RscContext, t as RscProvider };
1
+ import e, { rscDataPath as t } from "./rsc/refreshRsc.mjs";
2
+ import n from "./rsc/useRscRefresh.mjs";
3
+ import r from "./rsc/useRscSync.mjs";
4
+ export { e as refreshRsc, t as rscDataPath, n as useRscRefresh, r as useRscSync };
@@ -0,0 +1,16 @@
1
+ import { CommonState } from '../../types';
2
+ import { PathOf, StoreApi } from '@plitzi/nexus';
3
+ export declare const rscDataPath: (id: string) => PathOf<CommonState>;
4
+ /**
5
+ * Re-fetches RSC data into the store.
6
+ *
7
+ * Plain function over a store rather than a context method: the payload lives in `rsc.data`, so every caller already
8
+ * has what it needs through the store it can reach, and an element buried under any number of scopes writes to the
9
+ * root by delegation (nothing but the root owns `rsc`).
10
+ *
11
+ * Pass `ids` to refresh only those elements — the response is merged over the existing payload. Omit them for a full
12
+ * refresh, which replaces it. `params` ride along on the query string; that is how a provider asks for a different
13
+ * page window.
14
+ */
15
+ export declare const refreshRsc: (store: StoreApi<CommonState>, ids?: string[], params?: Record<string, string>) => Promise<void>;
16
+ export default refreshRsc;