@plitzi/sdk-shared 0.37.1 → 0.37.3

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 (195) hide show
  1. package/CHANGELOG.md +1288 -0
  2. package/dist/actions/access.d.ts +12 -0
  3. package/dist/actions/access.mjs +13 -0
  4. package/dist/actions/cron.d.ts +21 -12
  5. package/dist/actions/cron.mjs +48 -17
  6. package/dist/actions/functions.d.ts +27 -0
  7. package/dist/actions/functions.mjs +18 -0
  8. package/dist/actions/index.d.ts +5 -1
  9. package/dist/actions/index.mjs +9 -7
  10. package/dist/actions/triggers.d.ts +4 -0
  11. package/dist/actions/triggers.mjs +4 -1
  12. package/dist/auth/index.d.ts +2 -0
  13. package/dist/auth/index.mjs +2 -1
  14. package/dist/auth/visitorRoles.d.ts +27 -0
  15. package/dist/auth/visitorRoles.mjs +48 -0
  16. package/dist/authoring/builder.mjs +1 -0
  17. package/dist/authoring/declare.d.ts +74 -0
  18. package/dist/authoring/declare.mjs +2 -2
  19. package/dist/authoring/index.mjs +5 -5
  20. package/dist/authoring/paramSpec.d.ts +1 -1
  21. package/dist/authoring/paramSpec.mjs +1 -0
  22. package/dist/authoring/spaceCallbacks.mjs +2 -2
  23. package/dist/dataSource/computed.d.ts +21 -0
  24. package/dist/dataSource/computed.mjs +45 -0
  25. package/dist/dataSource/getBindingsDetails.mjs +35 -33
  26. package/dist/dataSource/index.d.ts +1 -0
  27. package/dist/dataSource/index.mjs +7 -6
  28. package/dist/dataSource/utility/checkboxParams.d.ts +11 -0
  29. package/dist/dataSource/utility/checkboxParams.mjs +12 -0
  30. package/dist/dataSource/utility/not.mjs +4 -7
  31. package/dist/dataSource/utility/stringToArray.mjs +1 -1
  32. package/dist/dataSource/utility/truthiness.d.ts +1 -0
  33. package/dist/dataSource/utility/truthiness.mjs +8 -0
  34. package/dist/dataSource/utility/twigTemplate.d.ts +2 -1
  35. package/dist/dataSource/utility/twigTemplate.mjs +29 -17
  36. package/dist/devTools/utils/PlitziConsole.mjs +22 -22
  37. package/dist/helpers/cookies.d.ts +10 -0
  38. package/dist/helpers/cookies.mjs +19 -0
  39. package/dist/helpers/fetchManifest.d.ts +9 -0
  40. package/dist/helpers/fetchManifest.mjs +3 -6
  41. package/dist/helpers/formatDate.d.ts +5 -3
  42. package/dist/helpers/formatDate.mjs +34 -36
  43. package/dist/helpers/index.d.ts +2 -0
  44. package/dist/helpers/index.mjs +18 -13
  45. package/dist/helpers/isDate.d.ts +7 -0
  46. package/dist/helpers/isDate.mjs +15 -0
  47. package/dist/helpers/keys.d.ts +42 -0
  48. package/dist/helpers/keys.mjs +91 -0
  49. package/dist/helpers/twigWrapper/AST.d.ts +2 -2
  50. package/dist/helpers/twigWrapper/Evaluator/Evaluator.d.ts +12 -2
  51. package/dist/helpers/twigWrapper/Evaluator/Evaluator.mjs +69 -31
  52. package/dist/helpers/twigWrapper/Evaluator/index.d.ts +1 -1
  53. package/dist/helpers/twigWrapper/Evaluator/index.mjs +2 -2
  54. package/dist/helpers/twigWrapper/Parser/ExpressionParser.d.ts +2 -2
  55. package/dist/helpers/twigWrapper/Parser/ExpressionParser.mjs +147 -34
  56. package/dist/helpers/twigWrapper/Parser/Parser.d.ts +2 -1
  57. package/dist/helpers/twigWrapper/Parser/Parser.mjs +21 -20
  58. package/dist/helpers/twigWrapper/filters/filters.mjs +134 -111
  59. package/dist/helpers/twigWrapper/index.d.ts +6 -2
  60. package/dist/helpers/twigWrapper/index.mjs +7 -4
  61. package/dist/helpers/twigWrapper/inspectTemplate.d.ts +23 -0
  62. package/dist/helpers/twigWrapper/inspectTemplate.mjs +110 -0
  63. package/dist/helpers/twigWrapper/processTwig/helpers.d.ts +7 -0
  64. package/dist/helpers/twigWrapper/processTwig/helpers.mjs +2 -1
  65. package/dist/helpers/twigWrapper/processTwig/index.d.ts +2 -1
  66. package/dist/helpers/twigWrapper/processTwig/index.mjs +3 -2
  67. package/dist/helpers/twigWrapper/processTwig/processTwig.d.ts +28 -0
  68. package/dist/helpers/twigWrapper/processTwig/processTwig.mjs +73 -16
  69. package/dist/helpers/twigWrapper/processTwig/resolveStepParam.d.ts +17 -0
  70. package/dist/helpers/twigWrapper/processTwig/resolveStepParam.mjs +14 -0
  71. package/dist/helpers/twigWrapper/templateRoots.d.ts +11 -0
  72. package/dist/helpers/twigWrapper/templateRoots.mjs +4 -4
  73. package/dist/helpers/twigWrapper/tokens/hasTemplateSyntax.d.ts +9 -0
  74. package/dist/helpers/twigWrapper/tokens/hasTemplateSyntax.mjs +4 -0
  75. package/dist/history/describe.d.ts +29 -0
  76. package/dist/history/describe.mjs +93 -0
  77. package/dist/history/diff.d.ts +33 -0
  78. package/dist/history/diff.mjs +73 -0
  79. package/dist/history/index.d.ts +3 -0
  80. package/dist/history/index.mjs +3 -0
  81. package/dist/history/types.d.ts +48 -0
  82. package/dist/history/types.mjs +0 -0
  83. package/dist/hooks/usePlitziServiceContext.d.ts +1 -1
  84. package/dist/index.d.ts +1 -0
  85. package/dist/index.mjs +77 -65
  86. package/dist/navigation/index.d.ts +1 -1
  87. package/dist/navigation/index.mjs +2 -2
  88. package/dist/navigation/routes.d.ts +11 -1
  89. package/dist/navigation/routes.mjs +35 -30
  90. package/dist/network/graphql/builder/Mutations/Space/SpaceFixIssuesMutation.d.ts +14 -0
  91. package/dist/network/graphql/builder/Mutations/Space/SpaceFixIssuesMutation.mjs +16 -0
  92. package/dist/network/graphql/builder/Mutations/Space/SpaceUpdatePluginMutation.d.ts +4 -0
  93. package/dist/network/graphql/builder/Mutations/Space/SpaceUpdatePluginMutation.mjs +2 -2
  94. package/dist/network/graphql/builder/Mutations/Space/actions/SpaceRunActionMutation.mjs +1 -0
  95. package/dist/network/graphql/builder/Mutations/Space/functions/SpaceRemoveFunctionsMutation.d.ts +3 -0
  96. package/dist/network/graphql/builder/Mutations/Space/functions/SpaceRemoveFunctionsMutation.mjs +9 -0
  97. package/dist/network/graphql/builder/Mutations/Space/functions/SpaceSaveFunctionsMutation.d.ts +11 -0
  98. package/dist/network/graphql/builder/Mutations/Space/functions/SpaceSaveFunctionsMutation.mjs +24 -0
  99. package/dist/network/graphql/builder/Mutations/Space/functions/SpaceTryFunctionMutation.d.ts +4 -0
  100. package/dist/network/graphql/builder/Mutations/Space/functions/SpaceTryFunctionMutation.mjs +15 -0
  101. package/dist/network/graphql/builder/Mutations/Space/runtime/SpaceRemoveRuntimeMutation.d.ts +2 -0
  102. package/dist/network/graphql/builder/Mutations/Space/runtime/SpaceRemoveRuntimeMutation.mjs +9 -0
  103. package/dist/network/graphql/builder/Mutations/Space/runtime/SpaceRemoveRuntimeVariableMutation.d.ts +2 -0
  104. package/dist/network/graphql/builder/Mutations/Space/runtime/SpaceRemoveRuntimeVariableMutation.mjs +9 -0
  105. package/dist/network/graphql/builder/Mutations/Space/runtime/SpaceSetRuntimeSizeMutation.d.ts +2 -0
  106. package/dist/network/graphql/builder/Mutations/Space/runtime/SpaceSetRuntimeSizeMutation.mjs +9 -0
  107. package/dist/network/graphql/builder/Mutations/Space/runtime/SpaceSetRuntimeVariableMutation.d.ts +2 -0
  108. package/dist/network/graphql/builder/Mutations/Space/runtime/SpaceSetRuntimeVariableMutation.mjs +9 -0
  109. package/dist/network/graphql/builder/Mutations/Space/runtime/SpaceStartRuntimeMutation.d.ts +2 -0
  110. package/dist/network/graphql/builder/Mutations/Space/runtime/SpaceStartRuntimeMutation.mjs +9 -0
  111. package/dist/network/graphql/builder/Mutations/Space/runtime/SpaceStopRuntimeMutation.d.ts +2 -0
  112. package/dist/network/graphql/builder/Mutations/Space/runtime/SpaceStopRuntimeMutation.mjs +9 -0
  113. package/dist/network/graphql/builder/Mutations/Space/visitors/SpaceAddVisitorMutation.d.ts +2 -0
  114. package/dist/network/graphql/builder/Mutations/Space/visitors/SpaceAddVisitorMutation.mjs +11 -0
  115. package/dist/network/graphql/builder/Mutations/Space/visitors/SpaceRemoveVisitorMutation.d.ts +2 -0
  116. package/dist/network/graphql/builder/Mutations/Space/visitors/SpaceRemoveVisitorMutation.mjs +11 -0
  117. package/dist/network/graphql/builder/Mutations/index.d.ts +28 -0
  118. package/dist/network/graphql/builder/Mutations/index.mjs +108 -84
  119. package/dist/network/graphql/builder/Queries/Space/SpaceChangesQuery.d.ts +23 -0
  120. package/dist/network/graphql/builder/Queries/Space/SpaceChangesQuery.mjs +49 -0
  121. package/dist/network/graphql/builder/Queries/Space/SpaceFunctionsQuery.d.ts +6 -0
  122. package/dist/network/graphql/builder/Queries/Space/SpaceFunctionsQuery.mjs +13 -0
  123. package/dist/network/graphql/builder/Queries/Space/SpaceIssuesQuery.d.ts +17 -0
  124. package/dist/network/graphql/builder/Queries/Space/SpaceIssuesQuery.mjs +22 -0
  125. package/dist/network/graphql/builder/Queries/Space/SpaceRuntimeQuery.d.ts +6 -0
  126. package/dist/network/graphql/builder/Queries/Space/SpaceRuntimeQuery.mjs +32 -0
  127. package/dist/network/graphql/builder/Queries/Space/SpaceVisitorsQuery.d.ts +6 -0
  128. package/dist/network/graphql/builder/Queries/Space/SpaceVisitorsQuery.mjs +16 -0
  129. package/dist/network/graphql/builder/Queries/index.d.ts +17 -3
  130. package/dist/network/graphql/builder/Queries/index.mjs +30 -22
  131. package/dist/network/graphql/sdk/Mutations/index.d.ts +1 -1
  132. package/dist/network/graphql/sdk/Queries/InitQuery.d.ts +1 -1
  133. package/dist/network/graphql/sdk/Queries/InitQuery.mjs +2 -91
  134. package/dist/network/graphql/sdk/Queries/Segment/SegmentQuery.d.ts +1 -1
  135. package/dist/network/graphql/sdk/Queries/Segment/SegmentQuery.mjs +2 -44
  136. package/dist/network/graphql/sdk/Queries/Segment/SegmentsQuery.d.ts +1 -1
  137. package/dist/network/graphql/sdk/Queries/Segment/SegmentsQuery.mjs +2 -55
  138. package/dist/network/graphql/sdk/Queries/index.d.ts +1 -5
  139. package/dist/network/index.mjs +7 -7
  140. package/dist/network/spaceEvents.d.ts +33 -3
  141. package/dist/network/spaceEvents.mjs +102 -89
  142. package/dist/realtime/client.d.ts +46 -0
  143. package/dist/realtime/client.mjs +192 -0
  144. package/dist/realtime/index.d.ts +6 -0
  145. package/dist/realtime/index.mjs +4 -0
  146. package/dist/realtime/presence.d.ts +38 -0
  147. package/dist/realtime/presence.mjs +70 -0
  148. package/dist/realtime/topics.d.ts +36 -0
  149. package/dist/realtime/topics.mjs +25 -0
  150. package/dist/schema/serverElements.d.ts +5 -0
  151. package/dist/schema/serverElements.mjs +15 -14
  152. package/dist/server/actions/useRealtimeSync.d.ts +9 -0
  153. package/dist/server/actions/useRealtimeSync.mjs +7 -0
  154. package/dist/state/index.d.ts +1 -0
  155. package/dist/state/index.mjs +3 -2
  156. package/dist/state/paintedState.d.ts +52 -0
  157. package/dist/state/paintedState.mjs +37 -0
  158. package/dist/state/runtimeStatePersist.d.ts +24 -0
  159. package/dist/state/runtimeStatePersist.mjs +113 -10
  160. package/dist/store/index.d.ts +45 -45
  161. package/dist/store/renderSettings.d.ts +6 -3
  162. package/dist/store/tracing/index.d.ts +1 -0
  163. package/dist/store/tracing/tracingCollector.d.ts +17 -1
  164. package/dist/store/tracing/tracingCollector.mjs +5 -0
  165. package/dist/style/index.d.ts +1 -0
  166. package/dist/style/index.mjs +3 -2
  167. package/dist/style/runtimeStyle.d.ts +29 -0
  168. package/dist/style/runtimeStyle.mjs +7 -0
  169. package/dist/style/styleConstants.d.ts +3 -2
  170. package/dist/style/styleConstants.mjs +2 -0
  171. package/dist/style/styleStates.d.ts +14 -1
  172. package/dist/style/styleStates.mjs +10 -7
  173. package/dist/theme/ThemeProvider.d.ts +1 -1
  174. package/dist/theme/ThemeProvider.mjs +35 -29
  175. package/dist/theme/themeCookie.mjs +11 -15
  176. package/dist/types/ActionTypes.d.ts +193 -0
  177. package/dist/types/AuthTypes.d.ts +11 -1
  178. package/dist/types/CommonTypes.d.ts +6 -0
  179. package/dist/types/FunctionTypes.d.ts +52 -0
  180. package/dist/types/FunctionTypes.mjs +0 -0
  181. package/dist/types/PluginTypes.d.ts +0 -1
  182. package/dist/types/RealtimeTypes.d.ts +94 -0
  183. package/dist/types/RealtimeTypes.mjs +0 -0
  184. package/dist/types/SchemaTypes.d.ts +54 -0
  185. package/dist/types/SchemaTypes.mjs +8 -0
  186. package/dist/types/ServerTypes.d.ts +310 -15
  187. package/dist/types/SpaceTypes.d.ts +53 -0
  188. package/dist/types/StateTypes.d.ts +6 -0
  189. package/dist/types/StoreTypes.d.ts +12 -1
  190. package/dist/types/index.d.ts +2 -0
  191. package/dist/types/index.mjs +3 -2
  192. package/package.json +190 -21
  193. package/vite.config.ts +0 -12
  194. package/dist/network/graphql/builder/Queries/PluginsQuery.d.ts +0 -9
  195. package/dist/network/graphql/builder/Queries/PluginsQuery.mjs +0 -54
@@ -1,93 +1,4 @@
1
- import { gql as e } from "graphql-tag";
2
1
  //#region src/network/graphql/sdk/Queries/InitQuery.ts
3
- var t = e`
4
- query InitQuery($environment: String!, $revision: Int) {
5
- Space(environment: $environment, revision: $revision) {
6
- schema {
7
- settings
8
- flat {
9
- id
10
- definition {
11
- label
12
- type
13
- initialState
14
- styleSelectors
15
- bindings
16
- interactions
17
- parentId
18
- rootId
19
- items
20
- }
21
- attributes
22
- }
23
- pages
24
- pageFolders {
25
- id
26
- name
27
- slug
28
- parentId
29
- }
30
- variables {
31
- name
32
- type
33
- value
34
- subValues {
35
- when
36
- value
37
- }
38
- }
39
- }
40
- segments {
41
- id
42
- identifier
43
- definition
44
- schema {
45
- variables {
46
- name
47
- category
48
- type
49
- value
50
- subValues {
51
- value
52
- when
53
- }
54
- }
55
- flat {
56
- id
57
- definition {
58
- label
59
- type
60
- initialState
61
- styleSelectors
62
- bindings
63
- interactions
64
- parentId
65
- rootId
66
- items
67
- }
68
- attributes
69
- }
70
- }
71
- style {
72
- cache
73
- }
74
- }
75
- plugins {
76
- type
77
- resource
78
- settings
79
- }
80
- style {
81
- variables
82
- cache
83
- }
84
- # The schema fetch is the one moment a client-side render hears from the server at all, so the decision it
85
- # would have been handed in an SSR bootstrap travels here instead.
86
- render {
87
- overQuota
88
- }
89
- }
90
- }
91
- `;
2
+ var e = "\n query InitQuery($environment: String!, $revision: Int) {\n Space(environment: $environment, revision: $revision) {\n schema {\n settings\n flat {\n id\n definition {\n label\n type\n initialState\n styleSelectors\n bindings\n interactions\n parentId\n rootId\n items\n }\n attributes\n }\n pages\n pageFolders {\n id\n name\n slug\n parentId\n }\n variables {\n name\n type\n value\n subValues {\n when\n value\n }\n }\n }\n segments {\n id\n identifier\n definition\n schema {\n variables {\n name\n category\n type\n value\n subValues {\n value\n when\n }\n }\n flat {\n id\n definition {\n label\n type\n initialState\n styleSelectors\n bindings\n interactions\n parentId\n rootId\n items\n }\n attributes\n }\n }\n style {\n cache\n }\n }\n plugins {\n type\n resource\n settings\n }\n style {\n variables\n cache\n }\n # The schema fetch is the one moment a client-side render hears from the server at all, so the decision it\n # would have been handed in an SSR bootstrap travels here instead.\n render {\n overQuota\n }\n }\n }\n";
92
3
  //#endregion
93
- export { t as default };
4
+ export { e as default };
@@ -2,5 +2,5 @@ import { SegmentRaw } from '../../../../../types';
2
2
  export type TSegmentQuery = {
3
3
  Segment: SegmentRaw;
4
4
  };
5
- declare const SegmentQuery: import('graphql').DocumentNode;
5
+ declare const SegmentQuery = "\n query SegmentQuery($id: String, $identifier: String, $environment: String!) {\n Segment(id: $id, identifier: $identifier, environment: $environment) {\n id\n identifier\n definition\n schema {\n variables {\n name\n category\n type\n value\n subValues {\n value\n when\n }\n }\n flat {\n id\n definition {\n label\n type\n initialState\n styleSelectors\n bindings\n interactions\n parentId\n rootId\n items\n }\n attributes\n }\n }\n style {\n platform\n cache\n }\n createdAt\n updatedAt\n }\n }\n";
6
6
  export default SegmentQuery;
@@ -1,46 +1,4 @@
1
- import { gql as e } from "graphql-tag";
2
1
  //#region src/network/graphql/sdk/Queries/Segment/SegmentQuery.ts
3
- var t = e`
4
- query SegmentQuery($id: String, $identifier: String, $environment: String!) {
5
- Segment(id: $id, identifier: $identifier, environment: $environment) {
6
- id
7
- identifier
8
- definition
9
- schema {
10
- variables {
11
- name
12
- category
13
- type
14
- value
15
- subValues {
16
- value
17
- when
18
- }
19
- }
20
- flat {
21
- id
22
- definition {
23
- label
24
- type
25
- initialState
26
- styleSelectors
27
- bindings
28
- interactions
29
- parentId
30
- rootId
31
- items
32
- }
33
- attributes
34
- }
35
- }
36
- style {
37
- platform
38
- cache
39
- }
40
- createdAt
41
- updatedAt
42
- }
43
- }
44
- `;
2
+ var e = "\n query SegmentQuery($id: String, $identifier: String, $environment: String!) {\n Segment(id: $id, identifier: $identifier, environment: $environment) {\n id\n identifier\n definition\n schema {\n variables {\n name\n category\n type\n value\n subValues {\n value\n when\n }\n }\n flat {\n id\n definition {\n label\n type\n initialState\n styleSelectors\n bindings\n interactions\n parentId\n rootId\n items\n }\n attributes\n }\n }\n style {\n platform\n cache\n }\n createdAt\n updatedAt\n }\n }\n";
45
3
  //#endregion
46
- export { t as default };
4
+ export { e as default };
@@ -5,5 +5,5 @@ export type TSegmentsQuery = {
5
5
  pageInfo: PageInfo;
6
6
  };
7
7
  };
8
- declare const SegmentsQuery: import('graphql').DocumentNode;
8
+ declare const SegmentsQuery = "\n query SegmentsQuery($environment: String!, $filter: JsonObject, $cursor: String, $limit: Int) {\n Segments(environment: $environment, filter: $filter, cursor: $cursor, limit: $limit) {\n edges {\n id\n identifier\n definition\n schema {\n variables {\n name\n category\n type\n value\n subValues {\n value\n when\n }\n }\n flat {\n id\n definition {\n label\n type\n initialState\n styleSelectors\n bindings\n interactions\n parentId\n rootId\n items\n }\n attributes\n }\n }\n style {\n platform\n cache\n }\n createdAt\n updatedAt\n }\n pageInfo {\n hasPrevPage\n hasNextPage\n prevCursor\n nextCursor\n from\n to\n total\n }\n }\n }\n";
9
9
  export default SegmentsQuery;
@@ -1,57 +1,4 @@
1
- import { gql as e } from "graphql-tag";
2
1
  //#region src/network/graphql/sdk/Queries/Segment/SegmentsQuery.ts
3
- var t = e`
4
- query SegmentsQuery($environment: String!, $filter: JsonObject, $cursor: String, $limit: Int) {
5
- Segments(environment: $environment, filter: $filter, cursor: $cursor, limit: $limit) {
6
- edges {
7
- id
8
- identifier
9
- definition
10
- schema {
11
- variables {
12
- name
13
- category
14
- type
15
- value
16
- subValues {
17
- value
18
- when
19
- }
20
- }
21
- flat {
22
- id
23
- definition {
24
- label
25
- type
26
- initialState
27
- styleSelectors
28
- bindings
29
- interactions
30
- parentId
31
- rootId
32
- items
33
- }
34
- attributes
35
- }
36
- }
37
- style {
38
- platform
39
- cache
40
- }
41
- createdAt
42
- updatedAt
43
- }
44
- pageInfo {
45
- hasPrevPage
46
- hasNextPage
47
- prevCursor
48
- nextCursor
49
- from
50
- to
51
- total
52
- }
53
- }
54
- }
55
- `;
2
+ var e = "\n query SegmentsQuery($environment: String!, $filter: JsonObject, $cursor: String, $limit: Int) {\n Segments(environment: $environment, filter: $filter, cursor: $cursor, limit: $limit) {\n edges {\n id\n identifier\n definition\n schema {\n variables {\n name\n category\n type\n value\n subValues {\n value\n when\n }\n }\n flat {\n id\n definition {\n label\n type\n initialState\n styleSelectors\n bindings\n interactions\n parentId\n rootId\n items\n }\n attributes\n }\n }\n style {\n platform\n cache\n }\n createdAt\n updatedAt\n }\n pageInfo {\n hasPrevPage\n hasNextPage\n prevCursor\n nextCursor\n from\n to\n total\n }\n }\n }\n";
56
3
  //#endregion
57
- export { t as default };
4
+ export { e as default };
@@ -6,9 +6,5 @@ export type SdkQueriesMap = {
6
6
  Segment: TSegmentQuery;
7
7
  Segments: TSegmentsQuery;
8
8
  };
9
- declare const SdkQueries: {
10
- Init: import('graphql').DocumentNode;
11
- Segment: import('graphql').DocumentNode;
12
- Segments: import('graphql').DocumentNode;
13
- };
9
+ declare const SdkQueries: Record<keyof SdkQueriesMap, string>;
14
10
  export default SdkQueries;
@@ -1,9 +1,9 @@
1
1
  import e from "./NetworkContext.mjs";
2
2
  import t from "./NetworkInternalContext.mjs";
3
- import { SpaceEvents as n, spaceEventSchemas as r, validateSpaceEvent as i } from "./spaceEvents.mjs";
4
- import a from "./graphql/builder/Mutations/index.mjs";
5
- import o from "./graphql/builder/Queries/index.mjs";
6
- import s from "./graphql/builder/Subscriptions/index.mjs";
7
- import c from "./graphql/sdk/Mutations/index.mjs";
8
- import l from "./graphql/sdk/Queries/index.mjs";
9
- export { a as BuilderMutations, o as BuilderQueries, e as NetworkContext, t as NetworkInternalContext, c as SdkMutations, l as SdkQueries, s as SpaceEventSubscription, n as SpaceEvents, r as spaceEventSchemas, i as validateSpaceEvent };
3
+ import { SpaceEvents as n, schemaFromWire as r, schemaToWire as i, spaceEventSchemas as a, validateSpaceEvent as o } from "./spaceEvents.mjs";
4
+ import s from "./graphql/builder/Mutations/index.mjs";
5
+ import c from "./graphql/builder/Queries/index.mjs";
6
+ import l from "./graphql/builder/Subscriptions/index.mjs";
7
+ import u from "./graphql/sdk/Mutations/index.mjs";
8
+ import d from "./graphql/sdk/Queries/index.mjs";
9
+ export { s as BuilderMutations, c as BuilderQueries, e as NetworkContext, t as NetworkInternalContext, u as SdkMutations, d as SdkQueries, l as SpaceEventSubscription, n as SpaceEvents, r as schemaFromWire, i as schemaToWire, a as spaceEventSchemas, o as validateSpaceEvent };
@@ -1,6 +1,10 @@
1
1
  import { z } from 'zod';
2
2
  import { StyleVariableCategory } from '../types/StyleTypes';
3
- import { DropPosition, Element, PageFolder, SchemaRaw, SchemaVariable, SpaceFont, Style, StyleCategory, StyleItem, StyleVariableValue } from '../types';
3
+ import { DropPosition, Element, PageFolder, Schema, SchemaRaw, SchemaVariable, SpaceFont, Style, StyleCategory, StyleItem, StyleVariableValue } from '../types';
4
+ /** A schema as the channel carries it: `flat` as a list. What every publisher of a whole schema sends. */
5
+ export declare const schemaToWire: (schema: Schema) => SchemaRaw;
6
+ /** A schema off the channel, keyed again by element id: what a receiver stores. */
7
+ export declare const schemaFromWire: (raw: SchemaRaw) => Schema;
4
8
  export declare const spaceEventSchemas: {
5
9
  readonly SPACE_UPDATED: z.ZodObject<{
6
10
  schema: z.ZodCustom<SchemaRaw, SchemaRaw>;
@@ -80,6 +84,28 @@ export declare const spaceEventSchemas: {
80
84
  initialItems: z.ZodOptional<z.ZodArray<z.ZodCustom<Element, Element>>>;
81
85
  variables: z.ZodOptional<z.ZodArray<z.ZodCustom<SchemaVariable, SchemaVariable>>>;
82
86
  }, z.core.$strip>;
87
+ /**
88
+ * A plugin installed — or installed again at a new address, which is how a new version arrives: from the builder,
89
+ * or from `plitzi upload plugin` with no builder open. An open builder loads it without a reload.
90
+ */
91
+ readonly SPACE_ADD_PLUGIN: z.ZodObject<{
92
+ plugin: z.ZodObject<{
93
+ type: z.ZodString;
94
+ resource: z.ZodString;
95
+ settings: z.ZodCustom<Record<string, unknown>, Record<string, unknown>>;
96
+ }, z.core.$strip>;
97
+ }, z.core.$strip>;
98
+ /** Its address or its settings changed. */
99
+ readonly SPACE_UPDATE_PLUGIN: z.ZodObject<{
100
+ plugin: z.ZodObject<{
101
+ type: z.ZodString;
102
+ resource: z.ZodString;
103
+ settings: z.ZodCustom<Record<string, unknown>, Record<string, unknown>>;
104
+ }, z.core.$strip>;
105
+ }, z.core.$strip>;
106
+ readonly SPACE_REMOVE_PLUGIN: z.ZodObject<{
107
+ pluginType: z.ZodString;
108
+ }, z.core.$strip>;
83
109
  readonly SPACE_UPDATE_SETTINGS: z.ZodObject<{
84
110
  path: z.ZodString;
85
111
  value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
@@ -94,8 +120,8 @@ export declare const spaceEventSchemas: {
94
120
  path: z.ZodOptional<z.ZodCustom<StyleCategory, StyleCategory>>;
95
121
  type: z.ZodEnum<{
96
122
  id: "id";
97
- class: "class";
98
123
  element: "element";
124
+ class: "class";
99
125
  }>;
100
126
  style: z.ZodOptional<z.ZodCustom<import('..').StyleAttributes, import('..').StyleAttributes>>;
101
127
  params: z.ZodObject<{
@@ -110,6 +136,7 @@ export declare const spaceEventSchemas: {
110
136
  disabled: "disabled";
111
137
  checked: "checked";
112
138
  visited: "visited";
139
+ hidden: "hidden";
113
140
  }>>;
114
141
  styleVariant: z.ZodOptional<z.ZodString>;
115
142
  styleAncestor: z.ZodOptional<z.ZodString>;
@@ -135,6 +162,7 @@ export declare const spaceEventSchemas: {
135
162
  disabled: "disabled";
136
163
  checked: "checked";
137
164
  visited: "visited";
165
+ hidden: "hidden";
138
166
  }>>;
139
167
  styleVariant: z.ZodOptional<z.ZodString>;
140
168
  styleAncestor: z.ZodOptional<z.ZodString>;
@@ -288,8 +316,8 @@ export declare const spaceEventSchemas: {
288
316
  selector: z.ZodString;
289
317
  type: z.ZodEnum<{
290
318
  id: "id";
291
- class: "class";
292
319
  element: "element";
320
+ class: "class";
293
321
  }>;
294
322
  path: z.ZodOptional<z.ZodCustom<StyleCategory, StyleCategory>>;
295
323
  style: z.ZodOptional<z.ZodCustom<import('..').StyleAttributes, import('..').StyleAttributes>>;
@@ -305,6 +333,7 @@ export declare const spaceEventSchemas: {
305
333
  disabled: "disabled";
306
334
  checked: "checked";
307
335
  visited: "visited";
336
+ hidden: "hidden";
308
337
  }>>;
309
338
  styleVariant: z.ZodOptional<z.ZodString>;
310
339
  styleAncestor: z.ZodOptional<z.ZodString>;
@@ -331,6 +360,7 @@ export declare const spaceEventSchemas: {
331
360
  disabled: "disabled";
332
361
  checked: "checked";
333
362
  visited: "visited";
363
+ hidden: "hidden";
334
364
  }>>;
335
365
  styleVariant: z.ZodOptional<z.ZodString>;
336
366
  styleAncestor: z.ZodOptional<z.ZodString>;