@plitzi/sdk-shared 0.37.2 → 0.37.4

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 (280) hide show
  1. package/CHANGELOG.md +1162 -0
  2. package/dist/actions/access.d.ts +12 -0
  3. package/dist/actions/access.mjs +13 -0
  4. package/dist/actions/functions.d.ts +27 -0
  5. package/dist/actions/functions.mjs +18 -0
  6. package/dist/actions/index.d.ts +4 -0
  7. package/dist/actions/index.mjs +9 -7
  8. package/dist/auth/index.d.ts +2 -1
  9. package/dist/auth/index.mjs +2 -2
  10. package/dist/auth/visitorRoles.d.ts +27 -0
  11. package/dist/auth/visitorRoles.mjs +48 -0
  12. package/dist/authoring/builder.mjs +1 -0
  13. package/dist/authoring/declare.d.ts +53 -0
  14. package/dist/authoring/declare.mjs +2 -2
  15. package/dist/authoring/index.mjs +5 -5
  16. package/dist/authoring/paramSpec.d.ts +1 -1
  17. package/dist/authoring/paramSpec.mjs +1 -0
  18. package/dist/authoring/spaceCallbacks.mjs +2 -2
  19. package/dist/dataSource/computed.d.ts +21 -0
  20. package/dist/dataSource/computed.mjs +45 -0
  21. package/dist/dataSource/getBindingsDetails.mjs +35 -34
  22. package/dist/dataSource/index.d.ts +1 -0
  23. package/dist/dataSource/index.mjs +7 -6
  24. package/dist/dataSource/utility/not.mjs +4 -7
  25. package/dist/dataSource/utility/stringToArray.mjs +1 -1
  26. package/dist/dataSource/utility/truthiness.d.ts +1 -0
  27. package/dist/dataSource/utility/truthiness.mjs +8 -0
  28. package/dist/dataSource/utility/twigTemplate.d.ts +2 -1
  29. package/dist/dataSource/utility/twigTemplate.mjs +29 -17
  30. package/dist/devTools/utils/PlitziConsole.mjs +22 -22
  31. package/dist/helpers/cookies.d.ts +10 -0
  32. package/dist/helpers/cookies.mjs +19 -0
  33. package/dist/helpers/fetchManifest.d.ts +9 -0
  34. package/dist/helpers/fetchManifest.mjs +3 -6
  35. package/dist/helpers/formatDate.d.ts +5 -3
  36. package/dist/helpers/formatDate.mjs +34 -36
  37. package/dist/helpers/index.d.ts +2 -1
  38. package/dist/helpers/index.mjs +17 -14
  39. package/dist/helpers/isDate.d.ts +7 -0
  40. package/dist/helpers/isDate.mjs +15 -0
  41. package/dist/helpers/keys.d.ts +42 -0
  42. package/dist/helpers/keys.mjs +91 -0
  43. package/dist/helpers/twigWrapper/AST.d.ts +2 -2
  44. package/dist/helpers/twigWrapper/Evaluator/Evaluator.d.ts +12 -2
  45. package/dist/helpers/twigWrapper/Evaluator/Evaluator.mjs +57 -34
  46. package/dist/helpers/twigWrapper/Evaluator/index.d.ts +1 -1
  47. package/dist/helpers/twigWrapper/Evaluator/index.mjs +2 -2
  48. package/dist/helpers/twigWrapper/Parser/ExpressionParser.d.ts +2 -2
  49. package/dist/helpers/twigWrapper/Parser/ExpressionParser.mjs +147 -34
  50. package/dist/helpers/twigWrapper/Parser/Parser.d.ts +2 -1
  51. package/dist/helpers/twigWrapper/Parser/Parser.mjs +21 -20
  52. package/dist/helpers/twigWrapper/filters/filters.mjs +130 -112
  53. package/dist/helpers/twigWrapper/index.d.ts +5 -2
  54. package/dist/helpers/twigWrapper/index.mjs +7 -5
  55. package/dist/helpers/twigWrapper/inspectTemplate.d.ts +23 -0
  56. package/dist/helpers/twigWrapper/inspectTemplate.mjs +110 -0
  57. package/dist/helpers/twigWrapper/processTwig/helpers.d.ts +7 -0
  58. package/dist/helpers/twigWrapper/processTwig/helpers.mjs +2 -1
  59. package/dist/helpers/twigWrapper/processTwig/index.d.ts +2 -1
  60. package/dist/helpers/twigWrapper/processTwig/index.mjs +3 -2
  61. package/dist/helpers/twigWrapper/processTwig/processTwig.d.ts +28 -0
  62. package/dist/helpers/twigWrapper/processTwig/processTwig.mjs +73 -16
  63. package/dist/helpers/twigWrapper/processTwig/resolveStepParam.d.ts +17 -0
  64. package/dist/helpers/twigWrapper/processTwig/resolveStepParam.mjs +14 -0
  65. package/dist/helpers/twigWrapper/templateRoots.d.ts +11 -0
  66. package/dist/helpers/twigWrapper/templateRoots.mjs +4 -4
  67. package/dist/helpers/twigWrapper/tokens/hasTemplateSyntax.d.ts +1 -1
  68. package/dist/history/describe.d.ts +29 -0
  69. package/dist/history/describe.mjs +93 -0
  70. package/dist/history/diff.d.ts +33 -0
  71. package/dist/history/diff.mjs +73 -0
  72. package/dist/history/index.d.ts +3 -0
  73. package/dist/history/index.mjs +3 -0
  74. package/dist/history/types.d.ts +48 -0
  75. package/dist/history/types.mjs +0 -0
  76. package/dist/index.d.ts +1 -0
  77. package/dist/index.mjs +76 -67
  78. package/dist/navigation/index.d.ts +1 -1
  79. package/dist/navigation/index.mjs +2 -2
  80. package/dist/navigation/routes.d.ts +11 -1
  81. package/dist/navigation/routes.mjs +15 -10
  82. package/dist/network/graphql/builder/Mutations/Segment/SegmentAddMutation.mjs +1 -1
  83. package/dist/network/graphql/builder/Mutations/Segment/SegmentAddTemplateMutation.mjs +1 -1
  84. package/dist/network/graphql/builder/Mutations/Segment/SegmentPublishMutation.mjs +1 -1
  85. package/dist/network/graphql/builder/Mutations/Segment/SegmentRemoveMutation.mjs +1 -1
  86. package/dist/network/graphql/builder/Mutations/Segment/SegmentUpdateMutation.mjs +1 -1
  87. package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentAddElementMutation.mjs +1 -1
  88. package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentCloneElementMutation.mjs +1 -1
  89. package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentMoveElementMutation.mjs +1 -1
  90. package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentRemoveElementMutation.mjs +1 -1
  91. package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentRenameElementMutation.mjs +1 -1
  92. package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentUpdateElementMutation.mjs +1 -1
  93. package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentUpdateElementsMutation.mjs +1 -1
  94. package/dist/network/graphql/builder/Mutations/Segment/space/variables/SegmentSpaceAddVariableMutation.mjs +1 -1
  95. package/dist/network/graphql/builder/Mutations/Segment/space/variables/SegmentSpaceRemoveVariableMutation.mjs +1 -1
  96. package/dist/network/graphql/builder/Mutations/Segment/space/variables/SegmentSpaceUpdateVariableMutation.mjs +1 -1
  97. package/dist/network/graphql/builder/Mutations/Segment/style/selectorVariables/SegmentStyleAddSelectorVariableMutation.mjs +1 -1
  98. package/dist/network/graphql/builder/Mutations/Segment/style/selectorVariables/SegmentStyleRemoveSelectorVariableMutation.mjs +1 -1
  99. package/dist/network/graphql/builder/Mutations/Segment/style/selectorVariables/SegmentStyleUpdateSelectorVariableMutation.mjs +1 -1
  100. package/dist/network/graphql/builder/Mutations/Segment/style/selectors/SegmentStyleAddSelectorMutation.mjs +1 -1
  101. package/dist/network/graphql/builder/Mutations/Segment/style/selectors/SegmentStyleRemoveSelectorMutation.mjs +1 -1
  102. package/dist/network/graphql/builder/Mutations/Segment/style/selectors/SegmentStyleRemoveSelectorsMutation.mjs +1 -1
  103. package/dist/network/graphql/builder/Mutations/Segment/style/selectors/SegmentStyleUpdateSelectorMutation.mjs +1 -1
  104. package/dist/network/graphql/builder/Mutations/Segment/style/variables/SegmentStyleAddVariableMutation.mjs +1 -1
  105. package/dist/network/graphql/builder/Mutations/Segment/style/variables/SegmentStyleRemoveVariableMutation.mjs +1 -1
  106. package/dist/network/graphql/builder/Mutations/Segment/style/variables/SegmentStyleUpdateVariableMutation.mjs +1 -1
  107. package/dist/network/graphql/builder/Mutations/Space/SpaceAddElementMutation.mjs +1 -1
  108. package/dist/network/graphql/builder/Mutations/Space/SpaceAddPluginMutation.mjs +1 -1
  109. package/dist/network/graphql/builder/Mutations/Space/SpaceAddTemplateMutation.mjs +1 -1
  110. package/dist/network/graphql/builder/Mutations/Space/SpaceCloneElementMutation.mjs +1 -1
  111. package/dist/network/graphql/builder/Mutations/Space/SpaceDeployMutation.mjs +1 -1
  112. package/dist/network/graphql/builder/Mutations/Space/SpaceFixIssuesMutation.d.ts +14 -0
  113. package/dist/network/graphql/builder/Mutations/Space/SpaceFixIssuesMutation.mjs +16 -0
  114. package/dist/network/graphql/builder/Mutations/Space/SpaceMoveElementMutation.mjs +1 -1
  115. package/dist/network/graphql/builder/Mutations/Space/SpacePublishMutation.mjs +1 -1
  116. package/dist/network/graphql/builder/Mutations/Space/SpaceRemoveElementMutation.mjs +1 -1
  117. package/dist/network/graphql/builder/Mutations/Space/SpaceRemovePluginMutation.mjs +1 -1
  118. package/dist/network/graphql/builder/Mutations/Space/SpaceRenameElementMutation.mjs +1 -1
  119. package/dist/network/graphql/builder/Mutations/Space/SpaceUpdateElementMutation.mjs +1 -1
  120. package/dist/network/graphql/builder/Mutations/Space/SpaceUpdateElementsMutation.mjs +1 -1
  121. package/dist/network/graphql/builder/Mutations/Space/SpaceUpdateMutation.mjs +1 -1
  122. package/dist/network/graphql/builder/Mutations/Space/SpaceUpdatePluginMutation.d.ts +4 -0
  123. package/dist/network/graphql/builder/Mutations/Space/SpaceUpdatePluginMutation.mjs +3 -3
  124. package/dist/network/graphql/builder/Mutations/Space/SpaceUpdateSchemaMutation.mjs +1 -1
  125. package/dist/network/graphql/builder/Mutations/Space/SpaceUpdateSettingsMutation.mjs +1 -1
  126. package/dist/network/graphql/builder/Mutations/Space/actions/SpaceAddActionMutation.mjs +1 -1
  127. package/dist/network/graphql/builder/Mutations/Space/actions/SpaceRemoveActionMutation.mjs +1 -1
  128. package/dist/network/graphql/builder/Mutations/Space/actions/SpaceRunActionMutation.mjs +2 -1
  129. package/dist/network/graphql/builder/Mutations/Space/actions/SpaceUpdateActionMutation.mjs +1 -1
  130. package/dist/network/graphql/builder/Mutations/Space/cdns/SpaceAddCdnMutation.mjs +1 -1
  131. package/dist/network/graphql/builder/Mutations/Space/cdns/SpaceRemoveCdnMutation.mjs +1 -1
  132. package/dist/network/graphql/builder/Mutations/Space/cdns/SpaceSetCdnCredentialMutation.mjs +1 -1
  133. package/dist/network/graphql/builder/Mutations/Space/cdns/SpaceUpdateCdnMutation.mjs +1 -1
  134. package/dist/network/graphql/builder/Mutations/Space/connectors/SpaceAddConnectorMutation.mjs +1 -1
  135. package/dist/network/graphql/builder/Mutations/Space/connectors/SpaceRemoveConnectorMutation.mjs +1 -1
  136. package/dist/network/graphql/builder/Mutations/Space/connectors/SpaceUpdateConnectorMutation.mjs +1 -1
  137. package/dist/network/graphql/builder/Mutations/Space/credentials/SpaceAddCredentialMutation.mjs +1 -1
  138. package/dist/network/graphql/builder/Mutations/Space/credentials/SpaceRemoveCredentialMutation.mjs +1 -1
  139. package/dist/network/graphql/builder/Mutations/Space/credentials/SpaceUpdateCredentialMutation.mjs +1 -1
  140. package/dist/network/graphql/builder/Mutations/Space/folders/SpaceAddPageFolderMutation.mjs +1 -1
  141. package/dist/network/graphql/builder/Mutations/Space/folders/SpaceRemovePageFolderMutation.mjs +1 -1
  142. package/dist/network/graphql/builder/Mutations/Space/folders/SpaceUpdatePageFolderMutation.mjs +1 -1
  143. package/dist/network/graphql/builder/Mutations/Space/functions/SpaceRemoveFunctionsMutation.d.ts +3 -0
  144. package/dist/network/graphql/builder/Mutations/Space/functions/SpaceRemoveFunctionsMutation.mjs +9 -0
  145. package/dist/network/graphql/builder/Mutations/Space/functions/SpaceSaveFunctionsMutation.d.ts +11 -0
  146. package/dist/network/graphql/builder/Mutations/Space/functions/SpaceSaveFunctionsMutation.mjs +24 -0
  147. package/dist/network/graphql/builder/Mutations/Space/functions/SpaceTryFunctionMutation.d.ts +4 -0
  148. package/dist/network/graphql/builder/Mutations/Space/functions/SpaceTryFunctionMutation.mjs +15 -0
  149. package/dist/network/graphql/builder/Mutations/Space/pages/SpaceAddPageMutation.mjs +1 -1
  150. package/dist/network/graphql/builder/Mutations/Space/pages/SpaceHomePageMutation.mjs +1 -1
  151. package/dist/network/graphql/builder/Mutations/Space/pages/SpaceRemovePageMutation.mjs +1 -1
  152. package/dist/network/graphql/builder/Mutations/Space/pages/SpaceUpdatePageMutation.mjs +1 -1
  153. package/dist/network/graphql/builder/Mutations/Space/resources/SpaceAddResourceMutation.mjs +1 -1
  154. package/dist/network/graphql/builder/Mutations/Space/resources/SpaceMoveResourceMutation.mjs +1 -1
  155. package/dist/network/graphql/builder/Mutations/Space/resources/SpaceRemoveResourceMutation.mjs +1 -1
  156. package/dist/network/graphql/builder/Mutations/Space/runtime/SpaceRemoveRuntimeMutation.d.ts +2 -0
  157. package/dist/network/graphql/builder/Mutations/Space/runtime/SpaceRemoveRuntimeMutation.mjs +9 -0
  158. package/dist/network/graphql/builder/Mutations/Space/runtime/SpaceRemoveRuntimeVariableMutation.d.ts +2 -0
  159. package/dist/network/graphql/builder/Mutations/Space/runtime/SpaceRemoveRuntimeVariableMutation.mjs +9 -0
  160. package/dist/network/graphql/builder/Mutations/Space/runtime/SpaceSetRuntimeSizeMutation.d.ts +2 -0
  161. package/dist/network/graphql/builder/Mutations/Space/runtime/SpaceSetRuntimeSizeMutation.mjs +9 -0
  162. package/dist/network/graphql/builder/Mutations/Space/runtime/SpaceSetRuntimeVariableMutation.d.ts +2 -0
  163. package/dist/network/graphql/builder/Mutations/Space/runtime/SpaceSetRuntimeVariableMutation.mjs +9 -0
  164. package/dist/network/graphql/builder/Mutations/Space/runtime/SpaceStartRuntimeMutation.d.ts +2 -0
  165. package/dist/network/graphql/builder/Mutations/Space/runtime/SpaceStartRuntimeMutation.mjs +9 -0
  166. package/dist/network/graphql/builder/Mutations/Space/runtime/SpaceStopRuntimeMutation.d.ts +2 -0
  167. package/dist/network/graphql/builder/Mutations/Space/runtime/SpaceStopRuntimeMutation.mjs +9 -0
  168. package/dist/network/graphql/builder/Mutations/Space/variables/SpaceAddVariableMutation.mjs +1 -1
  169. package/dist/network/graphql/builder/Mutations/Space/variables/SpaceRemoveVariableMutation.mjs +1 -1
  170. package/dist/network/graphql/builder/Mutations/Space/variables/SpaceUpdateVariableMutation.mjs +1 -1
  171. package/dist/network/graphql/builder/Mutations/Space/visitors/SpaceAddVisitorMutation.d.ts +2 -0
  172. package/dist/network/graphql/builder/Mutations/Space/visitors/SpaceAddVisitorMutation.mjs +11 -0
  173. package/dist/network/graphql/builder/Mutations/Space/visitors/SpaceRemoveVisitorMutation.d.ts +2 -0
  174. package/dist/network/graphql/builder/Mutations/Space/visitors/SpaceRemoveVisitorMutation.mjs +11 -0
  175. package/dist/network/graphql/builder/Mutations/Style/StyleUpdateMutation.mjs +1 -1
  176. package/dist/network/graphql/builder/Mutations/Style/StyleUpdateSettingsMutation.mjs +1 -1
  177. package/dist/network/graphql/builder/Mutations/Style/fonts/StyleAddFontMutation.mjs +1 -1
  178. package/dist/network/graphql/builder/Mutations/Style/fonts/StyleRemoveFontMutation.mjs +1 -1
  179. package/dist/network/graphql/builder/Mutations/Style/fonts/StyleUpdateFontMutation.mjs +1 -1
  180. package/dist/network/graphql/builder/Mutations/Style/selectorVariables/StyleAddSelectorVariableMutation.mjs +1 -1
  181. package/dist/network/graphql/builder/Mutations/Style/selectorVariables/StyleRemoveSelectorVariableMutation.mjs +1 -1
  182. package/dist/network/graphql/builder/Mutations/Style/selectorVariables/StyleUpdateSelectorVariableMutation.mjs +1 -1
  183. package/dist/network/graphql/builder/Mutations/Style/selectors/StyleAddSelectorMutation.mjs +1 -1
  184. package/dist/network/graphql/builder/Mutations/Style/selectors/StyleRemoveSelectorMutation.mjs +1 -1
  185. package/dist/network/graphql/builder/Mutations/Style/selectors/StyleRemoveSelectorsMutation.mjs +1 -1
  186. package/dist/network/graphql/builder/Mutations/Style/selectors/StyleUpdateSelectorMutation.mjs +1 -1
  187. package/dist/network/graphql/builder/Mutations/Style/variables/StyleAddVariableMutation.mjs +1 -1
  188. package/dist/network/graphql/builder/Mutations/Style/variables/StyleRemoveVariableMutation.mjs +1 -1
  189. package/dist/network/graphql/builder/Mutations/Style/variables/StyleUpdateVariableMutation.mjs +1 -1
  190. package/dist/network/graphql/builder/Mutations/index.d.ts +28 -0
  191. package/dist/network/graphql/builder/Mutations/index.mjs +108 -84
  192. package/dist/network/graphql/builder/Queries/InitQuery.mjs +1 -1
  193. package/dist/network/graphql/builder/Queries/Segment/SegmentQuery.mjs +1 -1
  194. package/dist/network/graphql/builder/Queries/Segment/SegmentsQuery.mjs +1 -1
  195. package/dist/network/graphql/builder/Queries/Space/SpaceActionEventsQuery.mjs +1 -1
  196. package/dist/network/graphql/builder/Queries/Space/SpaceActionTasksQuery.mjs +1 -1
  197. package/dist/network/graphql/builder/Queries/Space/SpaceActionsQuery.mjs +1 -1
  198. package/dist/network/graphql/builder/Queries/Space/SpaceCdnsQuery.mjs +1 -1
  199. package/dist/network/graphql/builder/Queries/Space/SpaceChangesQuery.d.ts +23 -0
  200. package/dist/network/graphql/builder/Queries/Space/SpaceChangesQuery.mjs +49 -0
  201. package/dist/network/graphql/builder/Queries/Space/SpaceCheckActionQuery.mjs +1 -1
  202. package/dist/network/graphql/builder/Queries/Space/SpaceConnectorsQuery.mjs +1 -1
  203. package/dist/network/graphql/builder/Queries/Space/SpaceCredentialsQuery.mjs +1 -1
  204. package/dist/network/graphql/builder/Queries/Space/SpaceDeploymentsQuery.mjs +1 -1
  205. package/dist/network/graphql/builder/Queries/Space/SpaceFunctionsQuery.d.ts +6 -0
  206. package/dist/network/graphql/builder/Queries/Space/SpaceFunctionsQuery.mjs +13 -0
  207. package/dist/network/graphql/builder/Queries/Space/SpaceIssuesQuery.d.ts +17 -0
  208. package/dist/network/graphql/builder/Queries/Space/SpaceIssuesQuery.mjs +22 -0
  209. package/dist/network/graphql/builder/Queries/Space/SpaceLatestRevisionQuery.mjs +1 -1
  210. package/dist/network/graphql/builder/Queries/Space/SpaceQuotaQuery.mjs +1 -1
  211. package/dist/network/graphql/builder/Queries/Space/SpaceResourcesQuery.mjs +1 -1
  212. package/dist/network/graphql/builder/Queries/Space/SpaceRuntimeQuery.d.ts +6 -0
  213. package/dist/network/graphql/builder/Queries/Space/SpaceRuntimeQuery.mjs +32 -0
  214. package/dist/network/graphql/builder/Queries/Space/SpaceVisitorsQuery.d.ts +6 -0
  215. package/dist/network/graphql/builder/Queries/Space/SpaceVisitorsQuery.mjs +16 -0
  216. package/dist/network/graphql/builder/Queries/index.d.ts +17 -3
  217. package/dist/network/graphql/builder/Queries/index.mjs +30 -22
  218. package/dist/network/graphql/builder/Subscriptions/SpaceEventSubscription.mjs +1 -1
  219. package/dist/network/graphql/sdk/Mutations/index.d.ts +1 -1
  220. package/dist/network/graphql/sdk/Queries/InitQuery.d.ts +1 -1
  221. package/dist/network/graphql/sdk/Queries/InitQuery.mjs +2 -91
  222. package/dist/network/graphql/sdk/Queries/Segment/SegmentQuery.d.ts +1 -1
  223. package/dist/network/graphql/sdk/Queries/Segment/SegmentQuery.mjs +2 -44
  224. package/dist/network/graphql/sdk/Queries/Segment/SegmentsQuery.d.ts +1 -1
  225. package/dist/network/graphql/sdk/Queries/Segment/SegmentsQuery.mjs +2 -55
  226. package/dist/network/graphql/sdk/Queries/index.d.ts +1 -5
  227. package/dist/network/index.mjs +7 -7
  228. package/dist/network/spaceEvents.d.ts +33 -3
  229. package/dist/network/spaceEvents.mjs +102 -89
  230. package/dist/realtime/client.d.ts +46 -0
  231. package/dist/realtime/client.mjs +192 -0
  232. package/dist/realtime/index.d.ts +6 -0
  233. package/dist/realtime/index.mjs +4 -0
  234. package/dist/realtime/presence.d.ts +38 -0
  235. package/dist/realtime/presence.mjs +70 -0
  236. package/dist/realtime/topics.d.ts +36 -0
  237. package/dist/realtime/topics.mjs +25 -0
  238. package/dist/server/actions/useRealtimeSync.d.ts +9 -0
  239. package/dist/server/actions/useRealtimeSync.mjs +7 -0
  240. package/dist/state/index.d.ts +1 -0
  241. package/dist/state/index.mjs +3 -2
  242. package/dist/state/paintedState.d.ts +52 -0
  243. package/dist/state/paintedState.mjs +37 -0
  244. package/dist/state/runtimeStatePersist.d.ts +8 -1
  245. package/dist/state/runtimeStatePersist.mjs +79 -29
  246. package/dist/store/index.d.ts +45 -45
  247. package/dist/store/renderSettings.d.ts +6 -3
  248. package/dist/store/tracing/index.d.ts +1 -0
  249. package/dist/store/tracing/tracingCollector.d.ts +17 -1
  250. package/dist/store/tracing/tracingCollector.mjs +5 -0
  251. package/dist/style/index.d.ts +1 -0
  252. package/dist/style/index.mjs +3 -2
  253. package/dist/style/runtimeStyle.d.ts +29 -0
  254. package/dist/style/runtimeStyle.mjs +7 -0
  255. package/dist/style/styleConstants.d.ts +3 -2
  256. package/dist/style/styleConstants.mjs +2 -0
  257. package/dist/style/styleStates.d.ts +14 -1
  258. package/dist/style/styleStates.mjs +10 -7
  259. package/dist/theme/ThemeProvider.mjs +35 -29
  260. package/dist/theme/themeCookie.mjs +11 -15
  261. package/dist/types/ActionTypes.d.ts +4 -0
  262. package/dist/types/AuthTypes.d.ts +11 -1
  263. package/dist/types/CommonTypes.d.ts +6 -0
  264. package/dist/types/FunctionTypes.d.ts +52 -0
  265. package/dist/types/FunctionTypes.mjs +0 -0
  266. package/dist/types/PluginTypes.d.ts +0 -1
  267. package/dist/types/RealtimeTypes.d.ts +94 -0
  268. package/dist/types/RealtimeTypes.mjs +0 -0
  269. package/dist/types/SchemaTypes.d.ts +54 -0
  270. package/dist/types/SchemaTypes.mjs +8 -0
  271. package/dist/types/ServerTypes.d.ts +259 -15
  272. package/dist/types/SpaceTypes.d.ts +53 -0
  273. package/dist/types/StateTypes.d.ts +6 -0
  274. package/dist/types/StoreTypes.d.ts +11 -0
  275. package/dist/types/index.d.ts +2 -0
  276. package/dist/types/index.mjs +3 -2
  277. package/package.json +180 -11
  278. package/vite.config.ts +0 -12
  279. package/dist/network/graphql/builder/Queries/PluginsQuery.d.ts +0 -9
  280. package/dist/network/graphql/builder/Queries/PluginsQuery.mjs +0 -54
@@ -9,9 +9,12 @@ export declare const DEFAULT_RENDER_SETTINGS: Required<RenderSettings>;
9
9
  * A nested scope that seeds `render` SHADOWS the whole slice — reads do not fall through key by key, whichever way
10
10
  * they are written — so a subtree that overrides one flag must restate the rest ({@link useRenderOverride}). */
11
11
  declare const useRenderSettings: () => Required<RenderSettings>;
12
- /** Builds the value for a `<StoreProvider>` that renders a subtree under different settings — the builder's preview
13
- * pane being preview whatever the editor's own toggle says. Carries the surrounding settings over explicitly,
14
- * because the scope shadows the slice: what an override leaves out is NOT inherited, it is lost.
12
+ /** Builds the value for a `<StoreProvider inherit="live">` that renders a subtree under different settings — the
13
+ * builder's preview pane being preview whatever the editor's own toggle says. Carries the surrounding settings over
14
+ * explicitly, because the scope shadows the slice: what an override leaves out is NOT inherited, it is lost.
15
+ *
16
+ * `inherit="live"` is not optional. A nexus scope inherits nothing by default, so without it the subtree sees a store
17
+ * holding `render` and nothing else — no `schema`, no `style` — and every element in it fails to find itself.
15
18
  *
16
19
  * `overrides` has to be referentially stable (a module-level constant), like any memo input. */
17
20
  export declare const useRenderOverride: (overrides: RenderSettings) => {
@@ -5,4 +5,5 @@ export { MAX_COMMITS, createTracingState } from './tracingStore';
5
5
  export { previewValue, diffProps } from './preview';
6
6
  export { tracingMiddleware } from './tracingMiddleware';
7
7
  export type { UseTracingReturn } from './useTracing';
8
+ export type { TracingReader } from './tracingCollector';
8
9
  export { tracingStore, tracingCollector, useTracing };
@@ -1,7 +1,23 @@
1
- import { PropChange } from '../../types';
1
+ import { CommitEntry, PropChange } from '../../types';
2
2
  import { ProfilerOnRenderCallback } from 'react';
3
+ /**
4
+ * What the SDK publishes as `window.plitziTracing` while its render tracing is on (`debugMode`): the commits since a
5
+ * mark, for a test to ask which elements an interaction rendered — `inspectRenders` in `@plitzi/sdk-authoring/testing`.
6
+ */
7
+ export type TracingReader = {
8
+ lastCommitId: () => number;
9
+ commitsSince: (commitId: number) => CommitEntry[];
10
+ };
11
+ declare global {
12
+ interface Window {
13
+ /** Present while render tracing is on (`debugMode`) — see {@link TracingReader}. */
14
+ plitziTracing?: TracingReader;
15
+ }
16
+ }
3
17
  declare const tracingCollector: {
4
18
  onRender: ProfilerOnRenderCallback;
19
+ lastCommitId: () => number;
20
+ commitsSince: (commitId: number) => CommitEntry[];
5
21
  linkParent: (id: string, parentId: string | undefined, elementId: string) => void;
6
22
  markMounted: (id: string) => void;
7
23
  markUnmounted: (id: string) => void;
@@ -73,6 +73,11 @@ var r = n({ max: 30 }), i = [], a = /* @__PURE__ */ new Map(), o = /* @__PURE__
73
73
  causes: D()
74
74
  })), h && (u.set(e, a.get(f)?.commitId ?? g), l = !0), _ || (_ = !0, y(T));
75
75
  },
76
+ lastCommitId: () => g,
77
+ commitsSince: (e) => {
78
+ let t = [...a.values()].sort((e, t) => e.timestamp - t.timestamp);
79
+ return [...i, ...t].filter((t) => t.commitId > e);
80
+ },
76
81
  linkParent: E,
77
82
  markMounted: (e) => {
78
83
  d.delete(e) && (l = !0);
@@ -3,6 +3,7 @@ export * from './fontAssets';
3
3
  export * from './fontValidation';
4
4
  export * from './fonts';
5
5
  export * from './fontsFromCss';
6
+ export * from './runtimeStyle';
6
7
  export * from './styleConstants';
7
8
  export * from './styleStates';
8
9
  export { styleConstants };
@@ -3,5 +3,6 @@ import { fontLinkAssets as a } from "./fontAssets.mjs";
3
3
  import { SYSTEM_FONTS as o, availableFonts as s, familiesInCss as c, fontFamilyStack as l, fontUrlResolver as u, fontsToHead as d, googleCss2Url as f, googleTextSubsetUrl as p, isSafeFontUrl as m, primaryFamily as h } from "./fonts.mjs";
4
4
  import { FontValidationError as g, parseSpaceFont as _ } from "./fontValidation.mjs";
5
5
  import { fallbackForFamily as v, fontsFromCss as y } from "./fontsFromCss.mjs";
6
- import { STYLE_STATES as b, STYLE_STATE_LABELS as x, inCascadeOrder as S, isKnownState as C } from "./styleStates.mjs";
7
- export { t as EMPTY_STYLE_SCHEMA, g as FontValidationError, b as STYLE_STATES, x as STYLE_STATE_LABELS, o as SYSTEM_FONTS, n as StyleBindingsAllowed, s as availableFonts, r as baseDefaultValue, v as fallbackForFamily, c as familiesInCss, l as fontFamilyStack, a as fontLinkAssets, u as fontUrlResolver, y as fontsFromCss, d as fontsToHead, f as googleCss2Url, p as googleTextSubsetUrl, S as inCascadeOrder, i as inheritableAttributesBase, C as isKnownState, m as isSafeFontUrl, _ as parseSpaceFont, h as primaryFamily, e as styleConstants };
6
+ import { RUNTIME_STYLE_ID as b, markStyleCache as x, styleCacheFromDocument as S, styleCacheTravelsInDocument as C } from "./runtimeStyle.mjs";
7
+ import { HIDDEN_CLASS as w, STYLE_STATES as T, STYLE_STATE_LABELS as E, inCascadeOrder as D, isKnownState as O, isStartingState as k, stateSuffix as A } from "./styleStates.mjs";
8
+ export { t as EMPTY_STYLE_SCHEMA, g as FontValidationError, w as HIDDEN_CLASS, b as RUNTIME_STYLE_ID, T as STYLE_STATES, E as STYLE_STATE_LABELS, o as SYSTEM_FONTS, n as StyleBindingsAllowed, s as availableFonts, r as baseDefaultValue, v as fallbackForFamily, c as familiesInCss, l as fontFamilyStack, a as fontLinkAssets, u as fontUrlResolver, y as fontsFromCss, d as fontsToHead, f as googleCss2Url, p as googleTextSubsetUrl, D as inCascadeOrder, i as inheritableAttributesBase, O as isKnownState, m as isSafeFontUrl, k as isStartingState, x as markStyleCache, _ as parseSpaceFont, h as primaryFamily, A as stateSuffix, S as styleCacheFromDocument, C as styleCacheTravelsInDocument, e as styleConstants };
@@ -0,0 +1,29 @@
1
+ /**
2
+ * The space's compiled stylesheet (`style.cache`) on a server-rendered page, which carries it once.
3
+ *
4
+ * The runtime `<style>` the page renders already holds the cache, verbatim, so sending it again in the hydration payload
5
+ * made every page ship its stylesheet twice. Instead the server leaves it out of the payload, and the browser reads it
6
+ * back from that `<style>` before hydrating — the same string, so the client renders the same markup and the store
7
+ * holds the same cache it always did.
8
+ *
9
+ * The cache sits between two comment markers inside the runtime stylesheet: a comment changes nothing about the
10
+ * cascade, and the element and its place in the tree stay exactly what they were.
11
+ */
12
+ /** The `data-id` of the stylesheet the SDK renders into the page. */
13
+ export declare const RUNTIME_STYLE_ID = "plitzi-runtime-style";
14
+ /** The cache as the runtime stylesheet embeds it, between the markers `styleCacheFromDocument` reads it by. */
15
+ export declare const markStyleCache: (cache: string) => string;
16
+ /**
17
+ * Whether the cache reads back from the document byte for byte, so it can be left out of the payload.
18
+ *
19
+ * - `{{ token }}`: the stylesheet holds the cache with its tokens already replaced, and the browser needs the tokens to
20
+ * replace them again when a variable changes.
21
+ * - `<`: React escapes a `<style` inside a stylesheet as it renders it, so the text would not come back as it went.
22
+ * - `\r` and `\0`: the HTML parser normalises both.
23
+ * - The end marker: the cache would end early.
24
+ *
25
+ * An empty cache has nothing to save.
26
+ */
27
+ export declare const styleCacheTravelsInDocument: (cache: string) => boolean;
28
+ /** The cache the server left in the runtime stylesheet under `root`, or `undefined` when there is none to read. */
29
+ export declare const styleCacheFromDocument: (root: ParentNode) => string | undefined;
@@ -0,0 +1,7 @@
1
+ //#region src/style/runtimeStyle.ts
2
+ var e = "plitzi-runtime-style", t = "/*plitzi:style-cache*/", n = "/*plitzi:style-cache-end*/", r = (e) => `${t}${e}${n}`, i = (e) => e !== "" && !/\{\{|<|\r|\0/.test(e) && !e.includes(n), a = (e) => {
3
+ let r = e.querySelector("style[data-id=\"plitzi-runtime-style\"]")?.textContent ?? "", i = r.indexOf(t), a = r.indexOf(n, i);
4
+ if (!(i < 0 || a < 0)) return r.slice(i + 22, a);
5
+ };
6
+ //#endregion
7
+ export { e as RUNTIME_STYLE_ID, r as markStyleCache, a as styleCacheFromDocument, i as styleCacheTravelsInDocument };
@@ -69,6 +69,7 @@ declare const styleConstants: {
69
69
  readonly TRANSITION_DURATION: "transition-duration";
70
70
  readonly TRANSITION_TIMING_FUNCTION: "transition-timing-function";
71
71
  readonly TRANSITION_DELAY: "transition-delay";
72
+ readonly TRANSITION_BEHAVIOR: "transition-behavior";
72
73
  readonly ANIMATION: "animation";
73
74
  readonly ANIMATION_NAME: "animation-name";
74
75
  readonly ANIMATION_DURATION: "animation-duration";
@@ -176,8 +177,8 @@ declare const styleConstants: {
176
177
  };
177
178
  export declare const inheritableAttributesBase: StyleCategory[];
178
179
  export declare const StyleBindingsAllowed: {
179
- path: "filter" | "fill" | "color" | "cursor" | "display" | "flex-wrap" | "flex-direction" | "align-items" | "justify-items" | "justify-content" | "align-content" | "row-gap" | "column-gap" | "grid-row-gap" | "grid-column-gap" | "grid-template-areas" | "grid-template-columns" | "grid-template-rows" | "grid-auto-flow" | "grid-auto-rows" | "grid-auto-columns" | "grid-row-start" | "grid-column-start" | "grid-row-end" | "grid-column-end" | "align-self" | "justify-self" | "order" | "flex-grow" | "flex-shrink" | "flex-basis" | "list-style" | "list-style-type" | "list-style-position" | "list-style-image" | "background-color" | "background-image" | "background-position" | "background-size" | "background-repeat" | "background-origin" | "background-clip" | "background-attachment" | "background-blend-mode" | "mask-image" | "border-top-style" | "border-top-width" | "border-top-color" | "border-bottom-style" | "border-bottom-width" | "border-bottom-color" | "border-left-style" | "border-left-width" | "border-left-color" | "border-right-style" | "border-right-width" | "border-right-color" | "border-top-left-radius" | "border-top-right-radius" | "border-bottom-left-radius" | "border-bottom-right-radius" | "border-collapse" | "border-spacing" | "table-layout" | "opacity" | "visibility" | "transition" | "transition-property" | "transition-duration" | "transition-timing-function" | "transition-delay" | "animation" | "animation-name" | "animation-duration" | "animation-timing-function" | "animation-delay" | "animation-iteration-count" | "animation-direction" | "animation-fill-mode" | "animation-play-state" | "animation-timeline" | "animation-range" | "box-shadow" | "backdrop-filter" | "mix-blend-mode" | "isolation" | "clip-path" | "transform" | "transform-origin" | "perspective" | "will-change" | "outline-width" | "outline-style" | "outline-color" | "outline-offset" | "pointer-events" | "user-select" | "touch-action" | "resize" | "appearance" | "scroll-behavior" | "overscroll-behavior" | "accent-color" | "caret-color" | "color-scheme" | "position" | "float" | "clear" | "z-index" | "top" | "bottom" | "left" | "right" | "box-sizing" | "aspect-ratio" | "width" | "height" | "min-width" | "min-height" | "max-width" | "max-height" | "overflow" | "overflow-x" | "overflow-y" | "scrollbar-width" | "scrollbar-color" | "object-fit" | "object-position" | "column-width" | "column-count" | "margin-top" | "margin-bottom" | "margin-left" | "margin-right" | "padding-top" | "padding-bottom" | "padding-left" | "padding-right" | "font-family" | "font-weight" | "font-size" | "line-height" | "text-align" | "font-style" | "font-variant" | "font-variant-numeric" | "font-feature-settings" | "text-decoration" | "text-decoration-line" | "text-decoration-color" | "text-decoration-style" | "text-decoration-thickness" | "text-underline-offset" | "letter-spacing" | "word-spacing" | "text-indent" | "text-transform" | "direction" | "white-space" | "text-wrap" | "word-break" | "overflow-wrap" | "hyphens" | "vertical-align" | "text-overflow" | "text-shadow" | "line-clamp" | "-webkit-line-clamp" | "-webkit-box-orient" | "-webkit-text-fill-color" | "stroke" | "stroke-width";
180
- label: "filter" | "fill" | "color" | "cursor" | "display" | "flex-wrap" | "flex-direction" | "align-items" | "justify-items" | "justify-content" | "align-content" | "row-gap" | "column-gap" | "grid-row-gap" | "grid-column-gap" | "grid-template-areas" | "grid-template-columns" | "grid-template-rows" | "grid-auto-flow" | "grid-auto-rows" | "grid-auto-columns" | "grid-row-start" | "grid-column-start" | "grid-row-end" | "grid-column-end" | "align-self" | "justify-self" | "order" | "flex-grow" | "flex-shrink" | "flex-basis" | "list-style" | "list-style-type" | "list-style-position" | "list-style-image" | "background-color" | "background-image" | "background-position" | "background-size" | "background-repeat" | "background-origin" | "background-clip" | "background-attachment" | "background-blend-mode" | "mask-image" | "border-top-style" | "border-top-width" | "border-top-color" | "border-bottom-style" | "border-bottom-width" | "border-bottom-color" | "border-left-style" | "border-left-width" | "border-left-color" | "border-right-style" | "border-right-width" | "border-right-color" | "border-top-left-radius" | "border-top-right-radius" | "border-bottom-left-radius" | "border-bottom-right-radius" | "border-collapse" | "border-spacing" | "table-layout" | "opacity" | "visibility" | "transition" | "transition-property" | "transition-duration" | "transition-timing-function" | "transition-delay" | "animation" | "animation-name" | "animation-duration" | "animation-timing-function" | "animation-delay" | "animation-iteration-count" | "animation-direction" | "animation-fill-mode" | "animation-play-state" | "animation-timeline" | "animation-range" | "box-shadow" | "backdrop-filter" | "mix-blend-mode" | "isolation" | "clip-path" | "transform" | "transform-origin" | "perspective" | "will-change" | "outline-width" | "outline-style" | "outline-color" | "outline-offset" | "pointer-events" | "user-select" | "touch-action" | "resize" | "appearance" | "scroll-behavior" | "overscroll-behavior" | "accent-color" | "caret-color" | "color-scheme" | "position" | "float" | "clear" | "z-index" | "top" | "bottom" | "left" | "right" | "box-sizing" | "aspect-ratio" | "width" | "height" | "min-width" | "min-height" | "max-width" | "max-height" | "overflow" | "overflow-x" | "overflow-y" | "scrollbar-width" | "scrollbar-color" | "object-fit" | "object-position" | "column-width" | "column-count" | "margin-top" | "margin-bottom" | "margin-left" | "margin-right" | "padding-top" | "padding-bottom" | "padding-left" | "padding-right" | "font-family" | "font-weight" | "font-size" | "line-height" | "text-align" | "font-style" | "font-variant" | "font-variant-numeric" | "font-feature-settings" | "text-decoration" | "text-decoration-line" | "text-decoration-color" | "text-decoration-style" | "text-decoration-thickness" | "text-underline-offset" | "letter-spacing" | "word-spacing" | "text-indent" | "text-transform" | "direction" | "white-space" | "text-wrap" | "word-break" | "overflow-wrap" | "hyphens" | "vertical-align" | "text-overflow" | "text-shadow" | "line-clamp" | "-webkit-line-clamp" | "-webkit-box-orient" | "-webkit-text-fill-color" | "stroke" | "stroke-width";
180
+ path: "color" | "cursor" | "display" | "flex-wrap" | "flex-direction" | "align-items" | "justify-items" | "justify-content" | "align-content" | "row-gap" | "column-gap" | "grid-row-gap" | "grid-column-gap" | "grid-template-areas" | "grid-template-columns" | "grid-template-rows" | "grid-auto-flow" | "grid-auto-rows" | "grid-auto-columns" | "grid-row-start" | "grid-column-start" | "grid-row-end" | "grid-column-end" | "align-self" | "justify-self" | "order" | "flex-grow" | "flex-shrink" | "flex-basis" | "list-style" | "list-style-type" | "list-style-position" | "list-style-image" | "background-color" | "background-image" | "background-position" | "background-size" | "background-repeat" | "background-origin" | "background-clip" | "background-attachment" | "background-blend-mode" | "mask-image" | "border-top-style" | "border-top-width" | "border-top-color" | "border-bottom-style" | "border-bottom-width" | "border-bottom-color" | "border-left-style" | "border-left-width" | "border-left-color" | "border-right-style" | "border-right-width" | "border-right-color" | "border-top-left-radius" | "border-top-right-radius" | "border-bottom-left-radius" | "border-bottom-right-radius" | "border-collapse" | "border-spacing" | "table-layout" | "opacity" | "visibility" | "transition" | "transition-property" | "transition-duration" | "transition-timing-function" | "transition-delay" | "transition-behavior" | "animation" | "animation-name" | "animation-duration" | "animation-timing-function" | "animation-delay" | "animation-iteration-count" | "animation-direction" | "animation-fill-mode" | "animation-play-state" | "animation-timeline" | "animation-range" | "box-shadow" | "filter" | "backdrop-filter" | "mix-blend-mode" | "isolation" | "clip-path" | "transform" | "transform-origin" | "perspective" | "will-change" | "outline-width" | "outline-style" | "outline-color" | "outline-offset" | "pointer-events" | "user-select" | "touch-action" | "resize" | "appearance" | "scroll-behavior" | "overscroll-behavior" | "accent-color" | "caret-color" | "color-scheme" | "position" | "float" | "clear" | "z-index" | "top" | "bottom" | "left" | "right" | "box-sizing" | "aspect-ratio" | "width" | "height" | "min-width" | "min-height" | "max-width" | "max-height" | "overflow" | "overflow-x" | "overflow-y" | "scrollbar-width" | "scrollbar-color" | "object-fit" | "object-position" | "column-width" | "column-count" | "margin-top" | "margin-bottom" | "margin-left" | "margin-right" | "padding-top" | "padding-bottom" | "padding-left" | "padding-right" | "font-family" | "font-weight" | "font-size" | "line-height" | "text-align" | "font-style" | "font-variant" | "font-variant-numeric" | "font-feature-settings" | "text-decoration" | "text-decoration-line" | "text-decoration-color" | "text-decoration-style" | "text-decoration-thickness" | "text-underline-offset" | "letter-spacing" | "word-spacing" | "text-indent" | "text-transform" | "direction" | "white-space" | "text-wrap" | "word-break" | "overflow-wrap" | "hyphens" | "vertical-align" | "text-overflow" | "text-shadow" | "line-clamp" | "-webkit-line-clamp" | "-webkit-box-orient" | "-webkit-text-fill-color" | "fill" | "stroke" | "stroke-width";
181
+ label: "color" | "cursor" | "display" | "flex-wrap" | "flex-direction" | "align-items" | "justify-items" | "justify-content" | "align-content" | "row-gap" | "column-gap" | "grid-row-gap" | "grid-column-gap" | "grid-template-areas" | "grid-template-columns" | "grid-template-rows" | "grid-auto-flow" | "grid-auto-rows" | "grid-auto-columns" | "grid-row-start" | "grid-column-start" | "grid-row-end" | "grid-column-end" | "align-self" | "justify-self" | "order" | "flex-grow" | "flex-shrink" | "flex-basis" | "list-style" | "list-style-type" | "list-style-position" | "list-style-image" | "background-color" | "background-image" | "background-position" | "background-size" | "background-repeat" | "background-origin" | "background-clip" | "background-attachment" | "background-blend-mode" | "mask-image" | "border-top-style" | "border-top-width" | "border-top-color" | "border-bottom-style" | "border-bottom-width" | "border-bottom-color" | "border-left-style" | "border-left-width" | "border-left-color" | "border-right-style" | "border-right-width" | "border-right-color" | "border-top-left-radius" | "border-top-right-radius" | "border-bottom-left-radius" | "border-bottom-right-radius" | "border-collapse" | "border-spacing" | "table-layout" | "opacity" | "visibility" | "transition" | "transition-property" | "transition-duration" | "transition-timing-function" | "transition-delay" | "transition-behavior" | "animation" | "animation-name" | "animation-duration" | "animation-timing-function" | "animation-delay" | "animation-iteration-count" | "animation-direction" | "animation-fill-mode" | "animation-play-state" | "animation-timeline" | "animation-range" | "box-shadow" | "filter" | "backdrop-filter" | "mix-blend-mode" | "isolation" | "clip-path" | "transform" | "transform-origin" | "perspective" | "will-change" | "outline-width" | "outline-style" | "outline-color" | "outline-offset" | "pointer-events" | "user-select" | "touch-action" | "resize" | "appearance" | "scroll-behavior" | "overscroll-behavior" | "accent-color" | "caret-color" | "color-scheme" | "position" | "float" | "clear" | "z-index" | "top" | "bottom" | "left" | "right" | "box-sizing" | "aspect-ratio" | "width" | "height" | "min-width" | "min-height" | "max-width" | "max-height" | "overflow" | "overflow-x" | "overflow-y" | "scrollbar-width" | "scrollbar-color" | "object-fit" | "object-position" | "column-width" | "column-count" | "margin-top" | "margin-bottom" | "margin-left" | "margin-right" | "padding-top" | "padding-bottom" | "padding-left" | "padding-right" | "font-family" | "font-weight" | "font-size" | "line-height" | "text-align" | "font-style" | "font-variant" | "font-variant-numeric" | "font-feature-settings" | "text-decoration" | "text-decoration-line" | "text-decoration-color" | "text-decoration-style" | "text-decoration-thickness" | "text-underline-offset" | "letter-spacing" | "word-spacing" | "text-indent" | "text-transform" | "direction" | "white-space" | "text-wrap" | "word-break" | "overflow-wrap" | "hyphens" | "vertical-align" | "text-overflow" | "text-shadow" | "line-clamp" | "-webkit-line-clamp" | "-webkit-box-orient" | "-webkit-text-fill-color" | "fill" | "stroke" | "stroke-width";
181
182
  }[];
182
183
  export declare const baseDefaultValue: Record<StyleCategory, StyleValue>;
183
184
  export default styleConstants;
@@ -82,6 +82,7 @@ var e = {
82
82
  TRANSITION_DURATION: "transition-duration",
83
83
  TRANSITION_TIMING_FUNCTION: "transition-timing-function",
84
84
  TRANSITION_DELAY: "transition-delay",
85
+ TRANSITION_BEHAVIOR: "transition-behavior",
85
86
  ANIMATION: "animation",
86
87
  ANIMATION_NAME: "animation-name",
87
88
  ANIMATION_DURATION: "animation-duration",
@@ -281,6 +282,7 @@ var e = {
281
282
  [t.TRANSITION_DURATION]: "0s",
282
283
  [t.TRANSITION_TIMING_FUNCTION]: "ease",
283
284
  [t.TRANSITION_DELAY]: "0s",
285
+ [t.TRANSITION_BEHAVIOR]: "normal",
284
286
  [t.ANIMATION]: "none",
285
287
  [t.ANIMATION_NAME]: "none",
286
288
  [t.ANIMATION_DURATION]: "0s",
@@ -6,8 +6,14 @@
6
6
  *
7
7
  * `focus-visible` is the focus ring a keyboard user needs and a mouse user does not; `focus-within` dresses a
8
8
  * container while anything inside it has focus — a field wrapper around its input.
9
+ *
10
+ * `hidden` is not a pseudo-class: it is how an element looks while its `visible` says no — where it goes as it hides,
11
+ * and where it comes from as it shows. With a transition on the class (`display` among what it transitions, and
12
+ * `transition-behavior: allow-discrete`), a panel fades or slides in and out instead of blinking.
9
13
  */
10
- export declare const STYLE_STATES: readonly ["hover", "focus", "focus-visible", "focus-within", "active", "disabled", "checked", "visited"];
14
+ export declare const STYLE_STATES: readonly ["hover", "focus", "focus-visible", "focus-within", "active", "disabled", "checked", "visited", "hidden"];
15
+ /** What the SDK puts on an element whose `visible` says no: `display: none`, and what the `hidden` state selects. */
16
+ export declare const HIDDEN_CLASS = "plitzi-component--hidden";
11
17
  export declare const STYLE_STATE_LABELS: Record<(typeof STYLE_STATES)[number], string>;
12
18
  export declare const isKnownState: (state: string) => state is (typeof STYLE_STATES)[number];
13
19
  /**
@@ -15,3 +21,10 @@ export declare const isKnownState: (state: string) => state is (typeof STYLE_STA
15
21
  * A state outside the list keeps its place after the known ones.
16
22
  */
17
23
  export declare const inCascadeOrder: <T>(states: Record<string, T>) => [string, T][];
24
+ /** How a state is written after the selector it modifies: its pseudo-class, or for `hidden` the class that hides. */
25
+ export declare const stateSuffix: (state: string) => string;
26
+ /**
27
+ * Whether a state is also where an element starts from as it appears (`@starting-style`): `hidden` is — a panel that
28
+ * fades out to nothing fades in from it — and every pseudo-class is not.
29
+ */
30
+ export declare const isStartingState: (state: string) => boolean;
@@ -7,8 +7,9 @@ var e = [
7
7
  "active",
8
8
  "disabled",
9
9
  "checked",
10
- "visited"
11
- ], t = {
10
+ "visited",
11
+ "hidden"
12
+ ], t = "plitzi-component--hidden", n = {
12
13
  hover: "Hover",
13
14
  focus: "Focus",
14
15
  "focus-visible": "Focus visible",
@@ -16,8 +17,9 @@ var e = [
16
17
  active: "Active",
17
18
  disabled: "Disabled",
18
19
  checked: "Checked",
19
- visited: "Visited"
20
- }, n = {
20
+ visited: "Visited",
21
+ hidden: "Hidden"
22
+ }, r = {
21
23
  visited: 0,
22
24
  checked: 1,
23
25
  "focus-within": 2,
@@ -25,7 +27,8 @@ var e = [
25
27
  focus: 4,
26
28
  "focus-visible": 5,
27
29
  active: 6,
28
- disabled: 7
29
- }, r = (e) => Object.hasOwn(n, e), i = (t) => r(t) ? n[t] : e.length, a = (e) => Object.entries(e).sort(([e], [t]) => i(e) - i(t));
30
+ disabled: 7,
31
+ hidden: 8
32
+ }, i = (e) => Object.hasOwn(r, e), a = (t) => i(t) ? r[t] : e.length, o = (e) => Object.entries(e).sort(([e], [t]) => a(e) - a(t)), s = (e) => e === "hidden" ? `.${t}` : `:${e}`, c = (e) => e === "hidden";
30
33
  //#endregion
31
- export { e as STYLE_STATES, t as STYLE_STATE_LABELS, a as inCascadeOrder, r as isKnownState };
34
+ export { t as HIDDEN_CLASS, e as STYLE_STATES, n as STYLE_STATE_LABELS, o as inCascadeOrder, i as isKnownState, c as isStartingState, s as stateSuffix };
@@ -2,11 +2,11 @@ import { THEME_COOKIE_NAME as e, applyThemeClass as t, readThemeCookie as n, wri
2
2
  import i, { createThemeStore as a, resolveScheme as o, setMachineScheme as s, setThemeMode as c } from "./themeStore.mjs";
3
3
  import l from "./ThemeScope.mjs";
4
4
  import { useCommonStoreSync as u } from "../store/index.mjs";
5
- import { use as d, useEffect as f, useId as p, useState as m, useSyncExternalStore as h } from "react";
6
- import { StoreContext as g, useIsomorphicLayoutEffect as _ } from "@plitzi/nexus/react";
7
- import { Fragment as v, jsx as y, jsxs as b } from "react/jsx-runtime";
5
+ import { use as d, useEffect as f, useId as p, useRef as m, useState as h, useSyncExternalStore as g } from "react";
6
+ import { StoreContext as _, useIsomorphicLayoutEffect as v } from "@plitzi/nexus/react";
7
+ import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
8
8
  //#region src/theme/ThemeProvider.tsx
9
- var x = "(prefers-color-scheme: dark)", S = () => window.matchMedia(x).matches ? "dark" : "light", C = ({ state: e }) => (u([
9
+ var S = "(prefers-color-scheme: dark)", C = () => window.matchMedia(S).matches ? "dark" : "light", w = ({ state: e }) => (u([
10
10
  "theme.mode",
11
11
  "theme.resolved",
12
12
  "theme.areas"
@@ -14,41 +14,47 @@ var x = "(prefers-color-scheme: dark)", S = () => window.matchMedia(x).matches ?
14
14
  e.mode,
15
15
  o(e.mode, e.scheme),
16
16
  e.areas
17
- ]), null), w = ({ defaultTheme: o = "system", theme: u, scope: w = "document", cookieName: T = e, children: E }) => {
18
- let D = w === "container", O = p(), [k] = m(() => D ? a(`theme${O}`) : void 0), A = k ?? i;
19
- _(() => {
20
- let e = D ? void 0 : n(T);
21
- A.batch(() => {
22
- s(S(), A), c(u ?? e ?? o, A);
17
+ ]), null), T = ({ defaultTheme: o = "system", theme: u, scope: T = "document", cookieName: E = e, children: D }) => {
18
+ let O = T === "container", k = p(), [A] = h(() => O ? a(`theme${k}`) : void 0), j = A ?? i, M = m({
19
+ mode: o,
20
+ remembered: !1
21
+ });
22
+ v(() => {
23
+ let e = O ? void 0 : n(E), t = u ?? e ?? o;
24
+ M.current = {
25
+ mode: t,
26
+ remembered: e !== void 0
27
+ }, j.batch(() => {
28
+ s(C(), j), c(t, j);
23
29
  });
24
30
  }, [
25
31
  o,
26
32
  u,
27
- T,
28
- D,
29
- A
33
+ E,
34
+ O,
35
+ j
30
36
  ]);
31
- let j = h(A.subscribe, A.getState, A.getState), M = d(g) !== void 0;
37
+ let N = g(j.subscribe, j.getState, j.getState), P = d(_) !== void 0;
32
38
  f(() => {
33
- let e = window.matchMedia(x), t = () => s(e.matches ? "dark" : "light", A);
39
+ let e = window.matchMedia(S), t = () => s(e.matches ? "dark" : "light", j);
34
40
  return e.addEventListener("change", t), t(), () => e.removeEventListener("change", t);
35
- }, [A]), f(() => {
36
- if (D) return;
41
+ }, [j]), f(() => {
42
+ if (O) return;
37
43
  let e = () => {
38
- let { mode: e } = A.getState();
39
- r(e, T), t(e, document.documentElement);
44
+ let { mode: e } = j.getState();
45
+ (M.current.remembered || e !== M.current.mode) && (r(e, E), M.current.remembered = !0), t(e, document.documentElement);
40
46
  };
41
- return e(), A.subscribe(e);
47
+ return e(), j.subscribe(e);
42
48
  }, [
43
- T,
44
- D,
45
- A
49
+ E,
50
+ O,
51
+ j
46
52
  ]);
47
- let N = M ? /* @__PURE__ */ y(C, { state: j }) : null;
48
- return D ? /* @__PURE__ */ b(l, {
49
- value: k,
50
- children: [N, E]
51
- }) : /* @__PURE__ */ b(v, { children: [N, E] });
53
+ let F = P ? /* @__PURE__ */ b(w, { state: N }) : null;
54
+ return O ? /* @__PURE__ */ x(l, {
55
+ value: A,
56
+ children: [F, D]
57
+ }) : /* @__PURE__ */ x(y, { children: [F, D] });
52
58
  };
53
59
  //#endregion
54
- export { w as default };
60
+ export { T as default };
@@ -1,24 +1,20 @@
1
+ import { cookieFromHeader as e } from "../helpers/cookies.mjs";
1
2
  //#region src/theme/themeCookie.ts
2
- var e = "theme", t = ["dark", "light"], n = [...t, "system"], r = 31536e3, i = (e) => n.includes(e), a = (e, n) => {
3
- for (let r of t) n.classList.toggle(r, e === r);
4
- }, o = (t, n = e) => {
5
- if (t) for (let e of t.split(";")) {
6
- let t = e.indexOf("=");
7
- if (t > -1 && e.slice(0, t).trim() === n) {
8
- let n = decodeURIComponent(e.slice(t + 1).trim());
9
- return i(n) ? n : void 0;
10
- }
11
- }
12
- }, s = (t = e) => {
3
+ var t = "theme", n = ["dark", "light"], r = [...n, "system"], i = 31536e3, a = (e) => r.includes(e), o = (e, t) => {
4
+ for (let r of n) t.classList.toggle(r, e === r);
5
+ }, s = (n, r = t) => {
6
+ let i = e(n, r);
7
+ return a(i) ? i : void 0;
8
+ }, c = (e = t) => {
13
9
  try {
14
- return o(document.cookie, t);
10
+ return s(document.cookie, e);
15
11
  } catch {
16
12
  return;
17
13
  }
18
- }, c = (t, n = e) => {
14
+ }, l = (e, n = t) => {
19
15
  try {
20
- document.cookie = `${n}=${encodeURIComponent(t)};path=/;max-age=${r};SameSite=Lax`;
16
+ document.cookie = `${n}=${encodeURIComponent(e)};path=/;max-age=${i};SameSite=Lax`;
21
17
  } catch {}
22
18
  };
23
19
  //#endregion
24
- export { t as THEME_CLASSES, e as THEME_COOKIE_NAME, a as applyThemeClass, i as isTheme, s as readThemeCookie, o as themeFromCookies, c as writeThemeCookie };
20
+ export { n as THEME_CLASSES, t as THEME_COOKIE_NAME, o as applyThemeClass, a as isTheme, c as readThemeCookie, s as themeFromCookies, l as writeThemeCookie };
@@ -221,6 +221,8 @@ export type ActionRunReport = {
221
221
  status: ActionRunStatus;
222
222
  output: Record<string, unknown>;
223
223
  trace: Record<string, unknown>[];
224
+ /** Each step as it ran — status, timing, error, and what it logged. */
225
+ steps: ActionRunStep[];
224
226
  };
225
227
  /**
226
228
  * Whether the CLIENT flow waits. The server side is synchronous in every mode: `detached` means the step does not
@@ -343,6 +345,8 @@ export type ActionRunStep = {
343
345
  endTime: number;
344
346
  /** Why it failed, redacted of every credential value the run resolved. */
345
347
  error?: string;
348
+ /** What the step logged (`ctx.log`), redacted the same way; at most a hundred lines of a thousand characters. */
349
+ logs?: string[];
346
350
  };
347
351
  /**
348
352
  * A run a page RENDER started, reported to a page whose debugging is authorized.
@@ -33,6 +33,16 @@ export type AuthGrant<U = Record<string, unknown>> = {
33
33
  user?: U;
34
34
  token?: TokenResult;
35
35
  };
36
+ /**
37
+ * A right password that bought a CHALLENGE and not a session: the account has a second factor, and `mfaToken` is what
38
+ * the code is completed against (`auth.login` with `mode: 'mfa'`). Not a failure of the session — nothing was lost —
39
+ * which is why it is not one of the {@link AuthFailureReason}s.
40
+ */
41
+ export type MfaChallenge = {
42
+ ok: false;
43
+ reason: 'mfa';
44
+ mfaToken: string;
45
+ };
36
46
  export type AuthResult<U = Record<string, unknown>> = ({
37
47
  ok: true;
38
48
  } & AuthGrant<U>) | {
@@ -54,7 +64,7 @@ export type LoginResult = ({
54
64
  } & TokenResult) | {
55
65
  ok: false;
56
66
  reason: AuthFailureReason;
57
- };
67
+ } | MfaChallenge;
58
68
  export type AuthContextValue = {
59
69
  /** The credentials your login endpoint expects. Values arrive from interaction parameters, hence `unknown`. */
60
70
  login: (params: Record<string, unknown>) => Promise<LoginResult>;
@@ -1,4 +1,5 @@
1
1
  import { User } from './AuthTypes';
2
+ import { RealtimeTransport } from './RealtimeTypes';
2
3
  import { SSRRenderResult, SSRRscData } from './ServerTypes';
3
4
  export type Environment = 'production' | 'staging' | 'development' | 'main';
4
5
  export type Server<T extends Record<string, unknown> = Record<string, unknown>> = {
@@ -44,6 +45,11 @@ export type ServerSSR = {
44
45
  * is what tells a client flow that a `serverAction` step has nowhere to run, rather than letting it fail per
45
46
  * click. A static export publishes nothing here and the step reports itself inert. */
46
47
  actionPath?: string;
48
+ /** Path where this origin's realtime channels answer. Published only by a server that mounts them: its absence is
49
+ * what keeps a `channel` element closed in the builder, an embed or a static export. */
50
+ realtimePath?: string;
51
+ /** How pages connect to them — a stream (`sse`, when absent) or a socket (`websocket`). */
52
+ realtimeTransport?: RealtimeTransport;
47
53
  /** Channel the SSR render writes its response into (status, redirect). Server-side only and by reference: it never
48
54
  * crosses to the browser, and nothing subscribes to it. */
49
55
  renderResult?: SSRRenderResult;
@@ -0,0 +1,52 @@
1
+ import { InteractionCallbackParam } from './InteractionTypes';
2
+ /**
3
+ * A space's own functions, as everything outside the runner sees them: the builder, the CLI, the MCP and the
4
+ * platform that stores them. The contract the code itself is written against is `@plitzi/sdk-server/functions`.
5
+ */
6
+ /** One task the functions declare: everything but its code — what the catalog shows and a step is drawn from. */
7
+ export type FunctionTaskManifest = {
8
+ namespace: string;
9
+ action: string;
10
+ title: string;
11
+ description?: string;
12
+ params: Record<string, InteractionCallbackParam<Record<string, unknown>>>;
13
+ };
14
+ /** What a space's functions declare, read from the bundle when it is saved: its tasks, routes and reachable hosts. */
15
+ export type FunctionsManifest = {
16
+ hosts: string[];
17
+ tasks: FunctionTaskManifest[];
18
+ /** The route keys, `'GET /board-assets/:board/:asset'`, as declared. */
19
+ routes: string[];
20
+ };
21
+ /** One reason functions were not saved, where it is — what an editor underlines. */
22
+ export type FunctionsProblem = {
23
+ file?: string;
24
+ line?: number;
25
+ column?: number;
26
+ message: string;
27
+ };
28
+ /** The live draft: the source files, which copy of them this is, and what they declared when last saved. */
29
+ export type FunctionsDraft = {
30
+ /** `{ "index.ts": "…", "lib/feed.ts": "…" }`. */
31
+ files: Record<string, string>;
32
+ /** Hand it back as `base` when saving: a draft that moved on since is refused rather than overwritten. */
33
+ version: string;
34
+ manifest: FunctionsManifest | null;
35
+ };
36
+ /** Why nothing was built: the draft moved on since the copy this save started from. */
37
+ export type FunctionsRefusal = {
38
+ status: 409;
39
+ error: string;
40
+ limit: 'version';
41
+ };
42
+ export type FunctionsSaveResult = {
43
+ ok: true;
44
+ version: string;
45
+ manifest: FunctionsManifest;
46
+ } | {
47
+ ok: false;
48
+ problems: FunctionsProblem[];
49
+ } | {
50
+ ok: false;
51
+ refusal: FunctionsRefusal;
52
+ };
File without changes
@@ -101,7 +101,6 @@ export type PluginsContextValue = {
101
101
  assets: Record<string, Asset>;
102
102
  plugins: Record<string, ComponentDefinition>;
103
103
  dispatchPlugins?: unknown;
104
- fetch?: (filter: object, cursor: string, limit: number) => Promise<unknown>;
105
104
  add?: (pluginType: string, resource?: string) => Promise<boolean>;
106
105
  setSettings?: (pluginType: string, attribute: string, value: string) => Promise<boolean>;
107
106
  getSettings?: (pluginType: string, attribute?: string, defaultValue?: string | number | boolean) => ComponentDefinition['settings'] | string | number | boolean;
@@ -0,0 +1,94 @@
1
+ import { ActionAccess } from './ActionTypes';
2
+ /**
3
+ * One kind of channel a space offers, declared under a topic PATTERN — `board:{id}` is every board, each its own topic.
4
+ *
5
+ * A topic no pattern of the space matches is refused, by the server and at authoring: a page cannot open a channel
6
+ * nobody decided should exist.
7
+ */
8
+ export type ChannelDeclaration = {
9
+ /** Who may subscribe and publish — the access vocabulary actions use. */
10
+ access: ActionAccess;
11
+ /**
12
+ * Who may send: `clients` (pages publish directly — cursors, reactions, what is cheap and ephemeral) or `server`
13
+ * (only a flow's `realtime.publish` — what was validated and saved first). `clients` when absent.
14
+ */
15
+ publish?: 'clients' | 'server';
16
+ /** Whether members announce themselves — who is here, and what they are pointing at. */
17
+ presence?: boolean;
18
+ /**
19
+ * Whether a page needs a GRANT to open a topic of it: a token a flow's `realtime.grant` issued for that exact topic —
20
+ * after checking a password, an invitation, an order's owner, whatever decides who is in. Without one the topic is
21
+ * refused, however well its name is known; `access` still applies on top. For a private room, a customer's order,
22
+ * a locked board.
23
+ */
24
+ grant?: boolean;
25
+ /** The largest `data` a page may send, as JSON bytes. 4 KB when absent. */
26
+ maxMessageBytes?: number;
27
+ /** How many messages one connection may send a second. 30 when absent. */
28
+ messagesPerSecond?: number;
29
+ };
30
+ export type ChannelDeclarations = Record<string, ChannelDeclaration>;
31
+ /** Who sent a message, as the SERVER knows them: a page cannot say it is someone else. */
32
+ export type RealtimeSender = {
33
+ /** The connection, as the server named it — stable for as long as the page stays connected. */
34
+ from: string;
35
+ /** The signed-in visitor, when the connection carries a session. */
36
+ user?: {
37
+ id: number;
38
+ name: string;
39
+ };
40
+ };
41
+ /**
42
+ * A message, as every subscriber receives it.
43
+ *
44
+ * `type` and `data` are the sender's own vocabulary; everything else is stamped by the server. Types starting with
45
+ * `$` are the channel's own: `$presence` (a member's state) and `$leave` (a member gone).
46
+ */
47
+ export type RealtimeMessage = RealtimeSender & {
48
+ topic: string;
49
+ type: string;
50
+ data: unknown;
51
+ /** Server time, in milliseconds. */
52
+ at: number;
53
+ };
54
+ /** What a page sends to publish: the secret its connection was given, and the message. */
55
+ export type RealtimePublishRequest = {
56
+ token: string;
57
+ topic: string;
58
+ type: string;
59
+ data: unknown;
60
+ };
61
+ /**
62
+ * How messages move between the processes and replicas of a deployment — transport only, strings in and out.
63
+ *
64
+ * Everything a channel DOES (who may, how big, how often, who sent it) is decided above it, once, for every
65
+ * deployment. In memory for one self-hosted process and its workers; Redis, NATS or a cloud service for a fleet.
66
+ */
67
+ export type PubSubAdapter = {
68
+ /** Delivers `message` to every subscriber of `topic`, in this process and every other sharing the adapter. */
69
+ publish: (topic: string, message: string) => Promise<void>;
70
+ /** Calls `listener` for each message on `topic` until the returned function is called. */
71
+ subscribe: (topic: string, listener: (message: string) => void) => Promise<() => Promise<void>>;
72
+ };
73
+ /**
74
+ * How a page connects: a Server-Sent Events stream it publishes to with requests, or one WebSocket both ways.
75
+ *
76
+ * The stream works through anything that passes HTTP; the socket sends a message as a frame instead of a request,
77
+ * which is what a page publishing a cursor twenty times a second wants. A page told to use the socket falls back to
78
+ * the stream on its own where one cannot open (behind HTTP/2, a proxy that drops upgrades).
79
+ */
80
+ export type RealtimeTransport = 'sse' | 'websocket';
81
+ /** A server's realtime channels. On by default; `false` turns the endpoint off. */
82
+ export type SSRRealtimeConfig = {
83
+ /** How messages reach the other processes and replicas. In memory (and across workers) when absent. */
84
+ pubsub?: PubSubAdapter;
85
+ /** Where pages connect. `/_realtime` when absent. */
86
+ path?: string;
87
+ /** How pages connect. `sse` when absent; both are always served, this is what pages are told to use. */
88
+ transport?: RealtimeTransport;
89
+ /**
90
+ * Origins, besides the server's own, whose pages may open a WebSocket here (`https://app.example.com`). A
91
+ * socket carries the visitor's cookies from any site, so every other origin is refused.
92
+ */
93
+ allowedOrigins?: string[];
94
+ } | false;
File without changes