@plitzi/sdk-shared 0.37.8 → 0.37.10

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 (249) hide show
  1. package/CHANGELOG.md +817 -0
  2. package/dist/actions/functions.d.ts +12 -3
  3. package/dist/actions/functions.mjs +8 -5
  4. package/dist/actions/index.d.ts +2 -2
  5. package/dist/actions/index.mjs +6 -6
  6. package/dist/actions/triggerParams.mjs +7 -6
  7. package/dist/actions/validateDocument.d.ts +3 -0
  8. package/dist/actions/validateDocument.mjs +89 -88
  9. package/dist/auth/failureChannel.d.ts +8 -2
  10. package/dist/auth/failureChannel.mjs +1 -3
  11. package/dist/authoring/elementCallbacks.d.ts +65 -0
  12. package/dist/authoring/elementCallbacks.mjs +72 -8
  13. package/dist/authoring/index.mjs +3 -3
  14. package/dist/builder/contexts/BuilderContext.d.ts +18 -7
  15. package/dist/builder/contexts/BuilderContext.mjs +2 -3
  16. package/dist/connectors/index.d.ts +1 -1
  17. package/dist/connectors/index.mjs +2 -2
  18. package/dist/connectors/validateManifest.d.ts +3 -0
  19. package/dist/connectors/validateManifest.mjs +77 -76
  20. package/dist/dataSource/computed.mjs +25 -29
  21. package/dist/dataSource/globalSources.d.ts +15 -0
  22. package/dist/dataSource/globalSources.mjs +13 -0
  23. package/dist/dataSource/index.d.ts +2 -0
  24. package/dist/dataSource/index.mjs +8 -7
  25. package/dist/devTools/DevToolsContext.mjs +2 -3
  26. package/dist/devTools/utils/PlitziConsole.d.ts +9 -0
  27. package/dist/devTools/utils/PlitziConsole.mjs +27 -7
  28. package/dist/elements/ComponentContext.mjs +2 -3
  29. package/dist/flags/flagsCookie.d.ts +26 -0
  30. package/dist/flags/flagsCookie.mjs +20 -0
  31. package/dist/flags/index.d.ts +3 -0
  32. package/dist/flags/index.mjs +4 -0
  33. package/dist/flags/resolveFlags.d.ts +60 -0
  34. package/dist/flags/resolveFlags.mjs +38 -0
  35. package/dist/flags/schemaFlag.d.ts +11 -0
  36. package/dist/flags/schemaFlag.mjs +9 -0
  37. package/dist/flags/useFlagResolution.d.ts +13 -0
  38. package/dist/flags/useFlagResolution.mjs +43 -0
  39. package/dist/helpers/eventTarget.d.ts +10 -0
  40. package/dist/helpers/eventTarget.mjs +4 -0
  41. package/dist/helpers/images.d.ts +18 -0
  42. package/dist/helpers/images.mjs +13 -0
  43. package/dist/helpers/index.d.ts +3 -0
  44. package/dist/helpers/index.mjs +21 -18
  45. package/dist/helpers/interval.d.ts +18 -0
  46. package/dist/helpers/interval.mjs +7 -0
  47. package/dist/helpers/isRecord.d.ts +2 -0
  48. package/dist/helpers/isRecord.mjs +4 -0
  49. package/dist/helpers/scroll.d.ts +42 -0
  50. package/dist/helpers/scroll.mjs +30 -0
  51. package/dist/helpers/sharedContext.d.ts +14 -0
  52. package/dist/helpers/sharedContext.mjs +9 -0
  53. package/dist/helpers/twigWrapper/Evaluator/Evaluator.d.ts +9 -1
  54. package/dist/helpers/twigWrapper/Evaluator/Evaluator.mjs +13 -8
  55. package/dist/helpers/twigWrapper/Evaluator/index.d.ts +1 -1
  56. package/dist/helpers/twigWrapper/TemplateCache/TemplateCache.mjs +1 -1
  57. package/dist/helpers/twigWrapper/filters/filters.mjs +38 -2
  58. package/dist/helpers/twigWrapper/index.d.ts +1 -0
  59. package/dist/helpers/twigWrapper/processTwig/processTwig.d.ts +2 -1
  60. package/dist/helpers/twigWrapper/processTwig/processTwig.mjs +3 -3
  61. package/dist/helpers/utils.mjs +4 -2
  62. package/dist/history/describe.mjs +4 -1
  63. package/dist/history/diff.d.ts +1 -1
  64. package/dist/history/diff.mjs +11 -9
  65. package/dist/history/types.d.ts +1 -1
  66. package/dist/hooks/index.mjs +5 -5
  67. package/dist/hooks/usePlitziServiceContext.d.ts +1 -2
  68. package/dist/hooks/usePlitziServiceContext.mjs +3 -4
  69. package/dist/index.d.ts +1 -1
  70. package/dist/index.mjs +90 -77
  71. package/dist/navigation/routes.mjs +6 -4
  72. package/dist/network/NetworkContext.mjs +2 -3
  73. package/dist/network/NetworkInternalContext.d.ts +2 -4
  74. package/dist/network/NetworkInternalContext.mjs +2 -3
  75. package/dist/network/graphql/builder/Mutations/Space/SpaceAddSnippetMutation.d.ts +2 -0
  76. package/dist/network/graphql/builder/Mutations/Space/SpaceAddSnippetMutation.mjs +4 -0
  77. package/dist/network/graphql/builder/Mutations/Space/components/SpaceAddComponentMutation.d.ts +4 -0
  78. package/dist/network/graphql/builder/Mutations/Space/components/SpaceAddComponentMutation.mjs +4 -0
  79. package/dist/network/graphql/builder/Mutations/Space/components/SpaceDetachInstanceMutation.d.ts +4 -0
  80. package/dist/network/graphql/builder/Mutations/Space/components/SpaceDetachInstanceMutation.mjs +4 -0
  81. package/dist/network/graphql/builder/Mutations/Space/components/SpaceRemoveComponentMutation.d.ts +4 -0
  82. package/dist/network/graphql/builder/Mutations/Space/components/SpaceRemoveComponentMutation.mjs +4 -0
  83. package/dist/network/graphql/builder/Mutations/Space/components/SpaceUpdateComponentMutation.d.ts +4 -0
  84. package/dist/network/graphql/builder/Mutations/Space/components/SpaceUpdateComponentMutation.mjs +4 -0
  85. package/dist/network/graphql/builder/Mutations/Space/flags/SpacePublishFlagsMutation.d.ts +12 -0
  86. package/dist/network/graphql/builder/Mutations/Space/flags/SpacePublishFlagsMutation.mjs +4 -0
  87. package/dist/network/graphql/builder/Mutations/Space/flags/SpaceRemoveFlagMutation.d.ts +2 -0
  88. package/dist/network/graphql/builder/Mutations/Space/flags/SpaceRemoveFlagMutation.mjs +4 -0
  89. package/dist/network/graphql/builder/Mutations/Space/flags/SpaceSetFlagMutation.d.ts +3 -0
  90. package/dist/network/graphql/builder/Mutations/Space/flags/SpaceSetFlagMutation.mjs +4 -0
  91. package/dist/network/graphql/builder/Mutations/index.d.ts +13 -30
  92. package/dist/network/graphql/builder/Mutations/index.mjs +164 -200
  93. package/dist/network/graphql/builder/Queries/InitQuery.d.ts +4 -3
  94. package/dist/network/graphql/builder/Queries/InitQuery.mjs +1 -1
  95. package/dist/network/graphql/builder/Queries/Space/SpaceActionTasksQuery.d.ts +1 -1
  96. package/dist/network/graphql/builder/Queries/Space/SpaceActionTasksQuery.mjs +1 -1
  97. package/dist/network/graphql/builder/Queries/Space/SpaceIssuesQuery.d.ts +16 -2
  98. package/dist/network/graphql/builder/Queries/Space/SpaceIssuesQuery.mjs +1 -1
  99. package/dist/network/graphql/builder/Queries/Space/SpaceVersionContentsQuery.d.ts +7 -0
  100. package/dist/network/graphql/builder/Queries/Space/SpaceVersionContentsQuery.mjs +4 -0
  101. package/dist/network/graphql/builder/Queries/index.d.ts +3 -5
  102. package/dist/network/graphql/builder/Queries/index.mjs +36 -38
  103. package/dist/network/graphql/builder/Subscriptions/SpaceEventSubscription.d.ts +1 -1
  104. package/dist/network/graphql/sdk/Queries/InitQuery.d.ts +2 -3
  105. package/dist/network/graphql/sdk/Queries/InitQuery.mjs +1 -1
  106. package/dist/network/graphql/sdk/Queries/index.d.ts +0 -4
  107. package/dist/network/graphql/sdk/Queries/index.mjs +2 -8
  108. package/dist/network/index.mjs +8 -7
  109. package/dist/network/spaceEvents.d.ts +25 -195
  110. package/dist/network/spaceEvents.mjs +156 -241
  111. package/dist/realtime/client.mjs +123 -95
  112. package/dist/realtime/topics.mjs +18 -17
  113. package/dist/schema/SchemaContext.mjs +2 -3
  114. package/dist/schema/anchor.d.ts +8 -0
  115. package/dist/schema/anchor.mjs +4 -0
  116. package/dist/schema/index.d.ts +2 -0
  117. package/dist/schema/index.mjs +6 -4
  118. package/dist/schema/schemaConstants.d.ts +2 -0
  119. package/dist/schema/schemaConstants.mjs +4 -3
  120. package/dist/schema/serverElements.d.ts +6 -2
  121. package/dist/schema/serverElements.mjs +17 -16
  122. package/dist/schema/snippet.d.ts +7 -0
  123. package/dist/schema/snippet.mjs +9 -0
  124. package/dist/schema/wire.d.ts +11 -0
  125. package/dist/schema/wire.mjs +27 -0
  126. package/dist/server/actions/useImagesSync.d.ts +9 -0
  127. package/dist/server/actions/useImagesSync.mjs +7 -0
  128. package/dist/server/rsc/refreshRsc.d.ts +3 -1
  129. package/dist/server/rsc/refreshRsc.mjs +17 -16
  130. package/dist/source/export.d.ts +107 -0
  131. package/dist/source/export.mjs +4 -0
  132. package/dist/source/index.d.ts +4 -0
  133. package/dist/source/index.mjs +3 -0
  134. package/dist/source/snapshot.d.ts +51 -0
  135. package/dist/source/snapshot.mjs +81 -0
  136. package/dist/state/paintedState.mjs +13 -12
  137. package/dist/state/runtimeStatePersist.mjs +50 -49
  138. package/dist/store/index.d.ts +45 -45
  139. package/dist/store/renderSettings.d.ts +1 -0
  140. package/dist/store/renderSettings.mjs +9 -5
  141. package/dist/style/breakpoints.d.ts +11 -0
  142. package/dist/style/breakpoints.mjs +8 -0
  143. package/dist/style/displayModes.d.ts +5 -0
  144. package/dist/style/displayModes.mjs +8 -0
  145. package/dist/style/fontValidation.mjs +52 -51
  146. package/dist/style/fonts.d.ts +0 -12
  147. package/dist/style/fonts.mjs +11 -11
  148. package/dist/style/index.d.ts +4 -0
  149. package/dist/style/index.mjs +11 -7
  150. package/dist/style/layoutGrid.d.ts +30 -0
  151. package/dist/style/layoutGrid.mjs +33 -0
  152. package/dist/style/notifications.d.ts +52 -0
  153. package/dist/style/notifications.mjs +55 -0
  154. package/dist/style/snippetStyle.d.ts +23 -0
  155. package/dist/style/snippetStyle.mjs +32 -0
  156. package/dist/style/styleConstants.d.ts +7 -2
  157. package/dist/style/styleConstants.mjs +10 -0
  158. package/dist/style/styleStates.d.ts +11 -2
  159. package/dist/style/styleStates.mjs +12 -9
  160. package/dist/theme/ThemeProvider.mjs +20 -20
  161. package/dist/theme/ThemeScope.mjs +4 -3
  162. package/dist/types/ActionTypes.d.ts +5 -0
  163. package/dist/types/CommonTypes.d.ts +3 -0
  164. package/dist/types/DevToolsTypes.d.ts +29 -4
  165. package/dist/types/ElementTypes.d.ts +6 -5
  166. package/dist/types/EventBridgeTypes.d.ts +2 -2
  167. package/dist/types/FunctionTypes.d.ts +13 -0
  168. package/dist/types/InteractionTypes.d.ts +5 -0
  169. package/dist/types/PluginTypes.d.ts +1 -1
  170. package/dist/types/ResourceTypes.d.ts +2 -2
  171. package/dist/types/SchemaTypes.d.ts +100 -3
  172. package/dist/types/SdkTypes.d.ts +0 -2
  173. package/dist/types/ServerTypes.d.ts +47 -0
  174. package/dist/types/SnippetTypes.d.ts +28 -0
  175. package/dist/types/SpaceTypes.d.ts +36 -0
  176. package/dist/types/StoreTypes.d.ts +39 -3
  177. package/dist/types/StyleTypes.d.ts +1 -1
  178. package/dist/types/index.d.ts +1 -2
  179. package/package.json +143 -138
  180. package/tailwind.config.js +1 -6
  181. package/vite.config.ts +16 -4
  182. package/dist/network/graphql/builder/Mutations/Segment/SegmentAddMutation.d.ts +0 -4
  183. package/dist/network/graphql/builder/Mutations/Segment/SegmentAddMutation.mjs +0 -4
  184. package/dist/network/graphql/builder/Mutations/Segment/SegmentAddTemplateMutation.d.ts +0 -2
  185. package/dist/network/graphql/builder/Mutations/Segment/SegmentAddTemplateMutation.mjs +0 -4
  186. package/dist/network/graphql/builder/Mutations/Segment/SegmentPublishMutation.d.ts +0 -8
  187. package/dist/network/graphql/builder/Mutations/Segment/SegmentPublishMutation.mjs +0 -4
  188. package/dist/network/graphql/builder/Mutations/Segment/SegmentRemoveMutation.d.ts +0 -2
  189. package/dist/network/graphql/builder/Mutations/Segment/SegmentRemoveMutation.mjs +0 -4
  190. package/dist/network/graphql/builder/Mutations/Segment/SegmentUpdateMutation.d.ts +0 -4
  191. package/dist/network/graphql/builder/Mutations/Segment/SegmentUpdateMutation.mjs +0 -4
  192. package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentAddElementMutation.d.ts +0 -2
  193. package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentAddElementMutation.mjs +0 -4
  194. package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentCloneElementMutation.d.ts +0 -2
  195. package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentCloneElementMutation.mjs +0 -4
  196. package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentMoveElementMutation.d.ts +0 -2
  197. package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentMoveElementMutation.mjs +0 -4
  198. package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentRemoveElementMutation.d.ts +0 -2
  199. package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentRemoveElementMutation.mjs +0 -4
  200. package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentRenameElementMutation.d.ts +0 -3
  201. package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentRenameElementMutation.mjs +0 -4
  202. package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentUpdateElementMutation.d.ts +0 -2
  203. package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentUpdateElementMutation.mjs +0 -4
  204. package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentUpdateElementsMutation.d.ts +0 -2
  205. package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentUpdateElementsMutation.mjs +0 -4
  206. package/dist/network/graphql/builder/Mutations/Segment/space/variables/SegmentSpaceAddVariableMutation.d.ts +0 -2
  207. package/dist/network/graphql/builder/Mutations/Segment/space/variables/SegmentSpaceAddVariableMutation.mjs +0 -4
  208. package/dist/network/graphql/builder/Mutations/Segment/space/variables/SegmentSpaceRemoveVariableMutation.d.ts +0 -2
  209. package/dist/network/graphql/builder/Mutations/Segment/space/variables/SegmentSpaceRemoveVariableMutation.mjs +0 -4
  210. package/dist/network/graphql/builder/Mutations/Segment/space/variables/SegmentSpaceUpdateVariableMutation.d.ts +0 -2
  211. package/dist/network/graphql/builder/Mutations/Segment/space/variables/SegmentSpaceUpdateVariableMutation.mjs +0 -4
  212. package/dist/network/graphql/builder/Mutations/Segment/style/selectorVariables/SegmentStyleAddSelectorVariableMutation.d.ts +0 -2
  213. package/dist/network/graphql/builder/Mutations/Segment/style/selectorVariables/SegmentStyleAddSelectorVariableMutation.mjs +0 -4
  214. package/dist/network/graphql/builder/Mutations/Segment/style/selectorVariables/SegmentStyleRemoveSelectorVariableMutation.d.ts +0 -2
  215. package/dist/network/graphql/builder/Mutations/Segment/style/selectorVariables/SegmentStyleRemoveSelectorVariableMutation.mjs +0 -4
  216. package/dist/network/graphql/builder/Mutations/Segment/style/selectorVariables/SegmentStyleUpdateSelectorVariableMutation.d.ts +0 -2
  217. package/dist/network/graphql/builder/Mutations/Segment/style/selectorVariables/SegmentStyleUpdateSelectorVariableMutation.mjs +0 -4
  218. package/dist/network/graphql/builder/Mutations/Segment/style/selectors/SegmentStyleAddSelectorMutation.d.ts +0 -2
  219. package/dist/network/graphql/builder/Mutations/Segment/style/selectors/SegmentStyleAddSelectorMutation.mjs +0 -4
  220. package/dist/network/graphql/builder/Mutations/Segment/style/selectors/SegmentStyleRemoveSelectorMutation.d.ts +0 -2
  221. package/dist/network/graphql/builder/Mutations/Segment/style/selectors/SegmentStyleRemoveSelectorMutation.mjs +0 -4
  222. package/dist/network/graphql/builder/Mutations/Segment/style/selectors/SegmentStyleRemoveSelectorsMutation.d.ts +0 -2
  223. package/dist/network/graphql/builder/Mutations/Segment/style/selectors/SegmentStyleRemoveSelectorsMutation.mjs +0 -4
  224. package/dist/network/graphql/builder/Mutations/Segment/style/selectors/SegmentStyleUpdateSelectorMutation.d.ts +0 -2
  225. package/dist/network/graphql/builder/Mutations/Segment/style/selectors/SegmentStyleUpdateSelectorMutation.mjs +0 -4
  226. package/dist/network/graphql/builder/Mutations/Segment/style/variables/SegmentStyleAddVariableMutation.d.ts +0 -2
  227. package/dist/network/graphql/builder/Mutations/Segment/style/variables/SegmentStyleAddVariableMutation.mjs +0 -4
  228. package/dist/network/graphql/builder/Mutations/Segment/style/variables/SegmentStyleRemoveVariableMutation.d.ts +0 -2
  229. package/dist/network/graphql/builder/Mutations/Segment/style/variables/SegmentStyleRemoveVariableMutation.mjs +0 -4
  230. package/dist/network/graphql/builder/Mutations/Segment/style/variables/SegmentStyleUpdateVariableMutation.d.ts +0 -2
  231. package/dist/network/graphql/builder/Mutations/Segment/style/variables/SegmentStyleUpdateVariableMutation.mjs +0 -4
  232. package/dist/network/graphql/builder/Mutations/Space/SpaceAddTemplateMutation.d.ts +0 -2
  233. package/dist/network/graphql/builder/Mutations/Space/SpaceAddTemplateMutation.mjs +0 -4
  234. package/dist/network/graphql/builder/Queries/Segment/SegmentQuery.d.ts +0 -6
  235. package/dist/network/graphql/builder/Queries/Segment/SegmentQuery.mjs +0 -4
  236. package/dist/network/graphql/builder/Queries/Segment/SegmentsQuery.d.ts +0 -9
  237. package/dist/network/graphql/builder/Queries/Segment/SegmentsQuery.mjs +0 -4
  238. package/dist/network/graphql/sdk/Queries/Segment/SegmentQuery.d.ts +0 -6
  239. package/dist/network/graphql/sdk/Queries/Segment/SegmentQuery.mjs +0 -4
  240. package/dist/network/graphql/sdk/Queries/Segment/SegmentsQuery.d.ts +0 -9
  241. package/dist/network/graphql/sdk/Queries/Segment/SegmentsQuery.mjs +0 -4
  242. package/dist/segments/SegmentsContext.d.ts +0 -2
  243. package/dist/segments/SegmentsContext.mjs +0 -6
  244. package/dist/segments/index.d.ts +0 -3
  245. package/dist/segments/index.mjs +0 -2
  246. package/dist/types/SegmentTypes.d.ts +0 -41
  247. package/dist/types/TemplateTypes.d.ts +0 -20
  248. package/dist/types/TemplateTypes.mjs +0 -0
  249. /package/dist/types/{SegmentTypes.mjs → SnippetTypes.mjs} +0 -0
@@ -102,6 +102,11 @@ declare const styleConstants: {
102
102
  readonly APPEARANCE: "appearance";
103
103
  readonly SCROLL_BEHAVIOR: "scroll-behavior";
104
104
  readonly OVERSCROLL_BEHAVIOR: "overscroll-behavior";
105
+ readonly SCROLL_SNAP_TYPE: "scroll-snap-type";
106
+ readonly SCROLL_SNAP_ALIGN: "scroll-snap-align";
107
+ readonly SCROLL_SNAP_STOP: "scroll-snap-stop";
108
+ readonly SCROLL_PADDING_TOP: "scroll-padding-top";
109
+ readonly SCROLL_MARGIN_TOP: "scroll-margin-top";
105
110
  readonly ACCENT_COLOR: "accent-color";
106
111
  readonly CARET_COLOR: "caret-color";
107
112
  readonly COLOR_SCHEME: "color-scheme";
@@ -177,8 +182,8 @@ declare const styleConstants: {
177
182
  };
178
183
  export declare const inheritableAttributesBase: StyleCategory[];
179
184
  export declare const StyleBindingsAllowed: {
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";
185
+ path: "color" | "cursor" | "filter" | "fill" | "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" | "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" | "scroll-snap-type" | "scroll-snap-align" | "scroll-snap-stop" | "scroll-padding-top" | "scroll-margin-top" | "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";
186
+ label: "color" | "cursor" | "filter" | "fill" | "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" | "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" | "scroll-snap-type" | "scroll-snap-align" | "scroll-snap-stop" | "scroll-padding-top" | "scroll-margin-top" | "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";
182
187
  }[];
183
188
  export declare const baseDefaultValue: Record<StyleCategory, StyleValue>;
184
189
  export default styleConstants;
@@ -115,6 +115,11 @@ var e = {
115
115
  APPEARANCE: "appearance",
116
116
  SCROLL_BEHAVIOR: "scroll-behavior",
117
117
  OVERSCROLL_BEHAVIOR: "overscroll-behavior",
118
+ SCROLL_SNAP_TYPE: "scroll-snap-type",
119
+ SCROLL_SNAP_ALIGN: "scroll-snap-align",
120
+ SCROLL_SNAP_STOP: "scroll-snap-stop",
121
+ SCROLL_PADDING_TOP: "scroll-padding-top",
122
+ SCROLL_MARGIN_TOP: "scroll-margin-top",
118
123
  ACCENT_COLOR: "accent-color",
119
124
  CARET_COLOR: "caret-color",
120
125
  COLOR_SCHEME: "color-scheme",
@@ -315,6 +320,11 @@ var e = {
315
320
  [t.APPEARANCE]: "none",
316
321
  [t.SCROLL_BEHAVIOR]: "auto",
317
322
  [t.OVERSCROLL_BEHAVIOR]: "auto",
323
+ [t.SCROLL_SNAP_TYPE]: "none",
324
+ [t.SCROLL_SNAP_ALIGN]: "none",
325
+ [t.SCROLL_SNAP_STOP]: "normal",
326
+ [t.SCROLL_PADDING_TOP]: "auto",
327
+ [t.SCROLL_MARGIN_TOP]: "0px",
318
328
  [t.ACCENT_COLOR]: "auto",
319
329
  [t.CARET_COLOR]: "auto",
320
330
  [t.COLOR_SCHEME]: "normal",
@@ -7,11 +7,15 @@
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
9
  *
10
+ * `current` is the link to the page being shown — the navigation item of where the visitor is. The link says so itself
11
+ * (`aria-current="page"`, what a screen reader announces too), so a header written once in a layout marks the right item
12
+ * on every page, which a class chosen per page could not.
13
+ *
10
14
  * `hidden` is not a pseudo-class: it is how an element looks while its `visible` says no — where it goes as it hides,
11
15
  * and where it comes from as it shows. With a transition on the class (`display` among what it transitions, and
12
16
  * `transition-behavior: allow-discrete`), a panel fades or slides in and out instead of blinking.
13
17
  */
14
- export declare const STYLE_STATES: readonly ["hover", "focus", "focus-visible", "focus-within", "active", "disabled", "checked", "visited", "hidden"];
18
+ export declare const STYLE_STATES: readonly ["hover", "focus", "focus-visible", "focus-within", "active", "disabled", "checked", "visited", "current", "hidden"];
15
19
  /** What the SDK puts on an element whose `visible` says no: `display: none`, and what the `hidden` state selects. */
16
20
  export declare const HIDDEN_CLASS = "plitzi-component--hidden";
17
21
  export declare const STYLE_STATE_LABELS: Record<(typeof STYLE_STATES)[number], string>;
@@ -21,7 +25,12 @@ export declare const isKnownState: (state: string) => state is (typeof STYLE_STA
21
25
  * A state outside the list keeps its place after the known ones.
22
26
  */
23
27
  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. */
28
+ /** What a link to the page being shown carries, and what the `current` state selects. */
29
+ export declare const CURRENT_PAGE_SELECTOR = "[aria-current=\"page\"]";
30
+ /**
31
+ * How a state is written after the selector it modifies: its pseudo-class — or, for `hidden`, the class that hides, and
32
+ * for `current`, the attribute a link to this page carries.
33
+ */
25
34
  export declare const stateSuffix: (state: string) => string;
26
35
  /**
27
36
  * Whether a state is also where an element starts from as it appears (`@starting-style`): `hidden` is — a panel that
@@ -8,6 +8,7 @@ var e = [
8
8
  "disabled",
9
9
  "checked",
10
10
  "visited",
11
+ "current",
11
12
  "hidden"
12
13
  ], t = "plitzi-component--hidden", n = {
13
14
  hover: "Hover",
@@ -18,17 +19,19 @@ var e = [
18
19
  disabled: "Disabled",
19
20
  checked: "Checked",
20
21
  visited: "Visited",
22
+ current: "Current page",
21
23
  hidden: "Hidden"
22
24
  }, r = {
23
25
  visited: 0,
24
26
  checked: 1,
25
- "focus-within": 2,
26
- hover: 3,
27
- focus: 4,
28
- "focus-visible": 5,
29
- active: 6,
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";
27
+ current: 2,
28
+ "focus-within": 3,
29
+ hover: 4,
30
+ focus: 5,
31
+ "focus-visible": 6,
32
+ active: 7,
33
+ disabled: 8,
34
+ hidden: 9
35
+ }, 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 = "[aria-current=\"page\"]", c = (e) => e === "hidden" ? `.${t}` : e === "current" ? s : `:${e}`, l = (e) => e === "hidden";
33
36
  //#endregion
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 };
37
+ export { s as CURRENT_PAGE_SELECTOR, t as HIDDEN_CLASS, e as STYLE_STATES, n as STYLE_STATE_LABELS, o as inCascadeOrder, i as isKnownState, l as isStartingState, c as stateSuffix };
@@ -1,48 +1,48 @@
1
- import { THEME_COOKIE_NAME as e, applyThemeClass as t, readThemeCookie as n, writeThemeCookie as r } from "./themeCookie.mjs";
2
- import i, { createThemeStore as a, resolveScheme as o, setMachineScheme as s, setThemeMode as c } from "./themeStore.mjs";
3
- import l from "./ThemeScope.mjs";
4
- import { useCommonStoreSync as u } from "../store/index.mjs";
1
+ import { useCommonStoreSync as e } from "../store/index.mjs";
2
+ import { THEME_COOKIE_NAME as t, applyThemeClass as n, readThemeCookie as r, writeThemeCookie as i } from "./themeCookie.mjs";
3
+ import a, { createThemeStore as o, resolveScheme as s, setMachineScheme as c, setThemeMode as l } from "./themeStore.mjs";
4
+ import u from "./ThemeScope.mjs";
5
5
  import { use as d, useEffect as f, useId as p, useRef as m, useState as h, useSyncExternalStore as g } from "react";
6
6
  import { StoreContext as _, useIsomorphicLayoutEffect as v } from "@plitzi/nexus/react";
7
7
  import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
8
8
  //#region src/theme/ThemeProvider.tsx
9
- var S = "(prefers-color-scheme: dark)", C = () => window.matchMedia(S).matches ? "dark" : "light", w = ({ state: e }) => (u([
9
+ var S = "(prefers-color-scheme: dark)", C = () => window.matchMedia(S).matches ? "dark" : "light", w = ({ state: t }) => (e([
10
10
  "theme.mode",
11
11
  "theme.resolved",
12
12
  "theme.areas"
13
13
  ], [
14
- e.mode,
15
- o(e.mode, e.scheme),
16
- e.areas
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,
14
+ t.mode,
15
+ s(t.mode, t.scheme),
16
+ t.areas
17
+ ]), null), T = ({ defaultTheme: e = "system", theme: s, scope: T = "document", cookieName: E = t, children: D }) => {
18
+ let O = T === "container", k = p(), [A] = h(() => O ? o(`theme${k}`) : void 0), j = A ?? a, M = m({
19
+ mode: e,
20
20
  remembered: !1
21
21
  });
22
22
  v(() => {
23
- let e = O ? void 0 : n(E), t = u ?? e ?? o;
23
+ let t = O ? void 0 : r(E), n = s ?? t ?? e;
24
24
  M.current = {
25
- mode: t,
26
- remembered: e !== void 0
25
+ mode: n,
26
+ remembered: t !== void 0
27
27
  }, j.batch(() => {
28
- s(C(), j), c(t, j);
28
+ c(C(), j), l(n, j);
29
29
  });
30
30
  }, [
31
- o,
32
- u,
31
+ e,
32
+ s,
33
33
  E,
34
34
  O,
35
35
  j
36
36
  ]);
37
37
  let N = g(j.subscribe, j.getState, j.getState), P = d(_) !== void 0;
38
38
  f(() => {
39
- let e = window.matchMedia(S), t = () => s(e.matches ? "dark" : "light", j);
39
+ let e = window.matchMedia(S), t = () => c(e.matches ? "dark" : "light", j);
40
40
  return e.addEventListener("change", t), t(), () => e.removeEventListener("change", t);
41
41
  }, [j]), f(() => {
42
42
  if (O) return;
43
43
  let e = () => {
44
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);
45
+ (M.current.remembered || e !== M.current.mode) && (i(e, E), M.current.remembered = !0), n(e, document.documentElement);
46
46
  };
47
47
  return e(), j.subscribe(e);
48
48
  }, [
@@ -51,7 +51,7 @@ var S = "(prefers-color-scheme: dark)", C = () => window.matchMedia(S).matches ?
51
51
  j
52
52
  ]);
53
53
  let F = P ? /* @__PURE__ */ b(w, { state: N }) : null;
54
- return O ? /* @__PURE__ */ x(l, {
54
+ return O ? /* @__PURE__ */ x(u, {
55
55
  value: A,
56
56
  children: [F, D]
57
57
  }) : /* @__PURE__ */ x(y, { children: [F, D] });
@@ -1,6 +1,7 @@
1
- import e from "./themeStore.mjs";
2
- import { createContext as t, use as n } from "react";
1
+ import { sharedContext as e } from "../helpers/sharedContext.mjs";
2
+ import t from "./themeStore.mjs";
3
+ import { use as n } from "react";
3
4
  //#region src/theme/ThemeScope.ts
4
- var r = t(void 0), i = () => n(r) ?? e;
5
+ var r = e("ThemeScopeContext", void 0), i = () => n(r) ?? t;
5
6
  //#endregion
6
7
  export { r as default, i as useThemeStore };
@@ -208,6 +208,11 @@ export type ActionTaskDescriptor = {
208
208
  action: string;
209
209
  title: string;
210
210
  description?: string;
211
+ /**
212
+ * Whose step it is: the deployment's (`http.request`, `kv.get`…) or one of the space's own functions. A run treats
213
+ * both alike; the editor lists them apart.
214
+ */
215
+ origin: 'deployment' | 'space';
211
216
  params: Record<string, unknown>;
212
217
  };
213
218
  /**
@@ -50,6 +50,9 @@ export type ServerSSR = {
50
50
  realtimePath?: string;
51
51
  /** How pages connect to them — a stream (`sse`, when absent) or a socket (`websocket`). */
52
52
  realtimeTransport?: RealtimeTransport;
53
+ /** Path where this origin resizes remote pictures. Published only by a server that mounts the endpoint: its absence
54
+ * is what keeps an image on its own `src` in the builder, an embed or a project with no page server. */
55
+ imagePath?: string;
53
56
  /** Channel the SSR render writes its response into (status, redirect). Server-side only and by reference: it never
54
57
  * crosses to the browser, and nothing subscribes to it. */
55
58
  renderResult?: SSRRenderResult;
@@ -1,9 +1,11 @@
1
1
  import { InteractionNode, InteractionStatus } from './InteractionTypes';
2
2
  import { NavigationStatus } from './NavigationTypes';
3
+ import { RealtimeMessage, RealtimeTransport } from './RealtimeTypes';
3
4
  import { ElementInteraction } from './SchemaTypes';
5
+ import { RealtimeStatus } from '../realtime/client';
4
6
  import { ReactNode } from 'react';
5
7
  export type LogType = 'info' | 'warning' | 'danger' | 'success' | 'custom';
6
- export type LogCategory = 'navigation' | 'interactions' | 'store' | 'network' | 'actions';
8
+ export type LogCategory = 'navigation' | 'interactions' | 'store' | 'network' | 'actions' | 'realtime';
7
9
  export type LogNavigation = {
8
10
  category: 'navigation';
9
11
  params: {
@@ -93,10 +95,33 @@ export type LogNetwork = {
93
95
  payload?: unknown;
94
96
  };
95
97
  };
96
- export type LogParams = LogNavigation['params'] | LogInteraction['params'] | LogEventBridge['params'] | LogStore['params'] | LogNetwork['params'] | LogAction['params'];
98
+ /** What the page's realtime connection did: opened or dropped, a message in or out, a topic the server refused. */
99
+ export type LogRealtime = {
100
+ category: 'realtime';
101
+ params: {
102
+ event: 'status';
103
+ status: RealtimeStatus;
104
+ topics: string[];
105
+ transport: RealtimeTransport;
106
+ } | {
107
+ event: 'received';
108
+ message: RealtimeMessage;
109
+ } | {
110
+ event: 'published';
111
+ topic: string;
112
+ type: string;
113
+ data: unknown;
114
+ delivered: boolean;
115
+ } | {
116
+ event: 'refused';
117
+ topic: string;
118
+ reason: string;
119
+ };
120
+ };
121
+ export type LogParams = LogNavigation['params'] | LogInteraction['params'] | LogEventBridge['params'] | LogStore['params'] | LogNetwork['params'] | LogAction['params'] | LogRealtime['params'];
97
122
  export type Log = {
98
- logType: string;
123
+ logType: LogType;
99
124
  message: ReactNode;
100
125
  time?: string;
101
- } & (LogInteraction | LogNavigation | LogEventBridge | LogStore | LogNetwork | LogAction);
126
+ } & (LogInteraction | LogNavigation | LogEventBridge | LogStore | LogNetwork | LogAction | LogRealtime);
102
127
  export type ProviderCallback = (...args: unknown[]) => Record<string, unknown>;
@@ -1,14 +1,15 @@
1
1
  import { Asset, PluginManifest, PluginSchema } from './PluginTypes';
2
2
  import { Element } from './SchemaTypes';
3
- export type ElementLayoutType = 'layout' | 'segment' | 'element' | 'reference';
3
+ export type ElementLayoutType = 'layout' | 'component';
4
4
  /**
5
- * Which shell an element is rendered inside, and which of its containers is the slot.
5
+ * Which shell an element is rendered inside, and which of its containers are slots.
6
6
  *
7
- * Every element of the shell carries it, so it holds nothing that changes with the page: the body itself reaches the
8
- * slot through `LayoutBody` in `@plitzi/sdk-elements`.
7
+ * A layout has one slot, where the page goes; a component instance has the slots its component declares, each filled
8
+ * with the instance's children that name it. Every element of the shell carries this, so it holds nothing that changes
9
+ * with what fills the slots: that reaches each slot through `LayoutBody` in `@plitzi/sdk-elements`.
9
10
  */
10
11
  export type ElementLayout = {
11
- containerId: string;
12
+ slots: Element['id'][];
12
13
  rootId: string;
13
14
  type: ElementLayoutType;
14
15
  };
@@ -1,5 +1,5 @@
1
1
  export type EventBridgeContextValue<T = any> = {
2
2
  eventBridge: T;
3
3
  };
4
- export type EventBridgeModule = 'main' | 'builder' | 'segment' | 'template' | 'interaction' | 'element';
5
- export type EventBridgeEvent = 'schemaAddPage' | 'schemaHomePage' | 'schemaUpdatePage' | 'schemaRemovePage' | 'schemaAddPageFolder' | 'schemaUpdatePageFolder' | 'schemaRemovePageFolder' | 'schemaUpdateSettings' | 'schemaUpdate' | 'schemaAddElement' | 'schemaUpdateElement' | 'schemaRenameElement' | 'schemaUpdateElements' | 'schemaRemoveElement' | 'schemaMoveElement' | 'schemaCloneElement' | 'schemaAddVariable' | 'schemaUpdateVariable' | 'schemaRemoveVariable' | 'schemaAddTemplate' | 'styleUpdate' | 'styleAddSelector' | 'styleUpdateSelector' | 'styleRemoveSelector' | 'styleRemoveSelectors' | 'styleAddSelectorVariable' | 'styleUpdateSelectorVariable' | 'styleRemoveSelectorVariable' | 'styleAddVariable' | 'styleUpdateVariable' | 'styleRemoveVariable' | 'styleAddFont' | 'styleUpdateFont' | 'styleRemoveFont' | 'styleAddTemplate' | 'styleUpdateSettings' | 'builderSetBaseContext' | 'builderSetSelected' | 'builderSetHovered';
4
+ export type EventBridgeModule = 'main' | 'builder' | 'snippet' | 'interaction' | 'element';
5
+ export type EventBridgeEvent = 'schemaAddPage' | 'schemaHomePage' | 'schemaUpdatePage' | 'schemaRemovePage' | 'schemaAddPageFolder' | 'schemaUpdatePageFolder' | 'schemaRemovePageFolder' | 'schemaUpdateSettings' | 'schemaUpdate' | 'schemaAddElement' | 'schemaUpdateElement' | 'schemaRenameElement' | 'schemaUpdateElements' | 'schemaRemoveElement' | 'schemaMoveElement' | 'schemaCloneElement' | 'schemaAddVariable' | 'schemaUpdateVariable' | 'schemaRemoveVariable' | 'schemaSetFlag' | 'schemaRemoveFlag' | 'schemaAddSnippet' | 'schemaAddComponent' | 'schemaUpdateComponent' | 'schemaRemoveComponent' | 'schemaDetachInstance' | 'styleUpdate' | 'styleAddSelector' | 'styleUpdateSelector' | 'styleRemoveSelector' | 'styleRemoveSelectors' | 'styleAddSelectorVariable' | 'styleUpdateSelectorVariable' | 'styleRemoveSelectorVariable' | 'styleAddVariable' | 'styleUpdateVariable' | 'styleRemoveVariable' | 'styleAddFont' | 'styleUpdateFont' | 'styleRemoveFont' | 'styleAddSnippet' | 'styleUpdateSettings' | 'builderSetBaseContext' | 'builderSetSelected' | 'builderSetHovered';
@@ -3,6 +3,15 @@ import { InteractionCallbackParam } from './InteractionTypes';
3
3
  * A space's own functions, as everything outside the runner sees them: the builder, the CLI, the MCP and the
4
4
  * platform that stores them. The contract the code itself is written against is `@plitzi/sdk-server/functions`.
5
5
  */
6
+ /**
7
+ * What a task — or every task and route, declared once for all of them — asks to be given beyond an invocation's
8
+ * default: CPU time, awaits not counted, and wall time, from the moment it starts. Never more than the server allows;
9
+ * asking for more is a problem when the functions are saved.
10
+ */
11
+ export type FunctionTimeLimits = {
12
+ cpuMs?: number;
13
+ wallMs?: number;
14
+ };
6
15
  /** One task the functions declare: everything but its code — what the catalog shows and a step is drawn from. */
7
16
  export type FunctionTaskManifest = {
8
17
  namespace: string;
@@ -10,6 +19,8 @@ export type FunctionTaskManifest = {
10
19
  title: string;
11
20
  description?: string;
12
21
  params: Record<string, InteractionCallbackParam<Record<string, unknown>>>;
22
+ /** What it asks for beyond the default — over what the functions ask for all of their tasks. */
23
+ limits?: FunctionTimeLimits;
13
24
  };
14
25
  /** What a space's functions declare, read from the bundle when it is saved: its tasks, routes and reachable hosts. */
15
26
  export type FunctionsManifest = {
@@ -17,6 +28,8 @@ export type FunctionsManifest = {
17
28
  tasks: FunctionTaskManifest[];
18
29
  /** The route keys, `'GET /board-assets/:board/:asset'`, as declared. */
19
30
  routes: string[];
31
+ /** What every task and route asks for beyond the default, unless a task asks for its own. */
32
+ limits?: FunctionTimeLimits;
20
33
  };
21
34
  /** One reason functions were not saved, where it is — what an editor underlines. */
22
35
  export type FunctionsProblem = {
@@ -92,6 +92,11 @@ export type InteractionCallback<T extends Record<string, unknown> = Record<strin
92
92
  action: string;
93
93
  title: string;
94
94
  type: InteractionCallbackType;
95
+ /**
96
+ * The heading the editor's picker lists it under, when that is not its type's: a space's own functions are tasks to
97
+ * the run, and a category of their own to whoever picks a step.
98
+ */
99
+ group?: string;
95
100
  enabled?: boolean;
96
101
  params: Record<keyof T, InteractionCallbackParam<T>> | ((params: InteractionCallbackParamValues<T>) => Record<keyof T, InteractionCallbackParam<T>>);
97
102
  callback?: (params: InteractionCallbackParamValues<T>, context?: InteractionCallbackContext) => unknown;
@@ -61,7 +61,7 @@ export type PluginBuilder = {
61
61
  canDragDrop?: boolean;
62
62
  canSelect?: boolean;
63
63
  canMove?: boolean;
64
- canTemplate?: boolean;
64
+ canSnippet?: boolean;
65
65
  itemsAllowed?: string[];
66
66
  itemsNotAllowed?: string[];
67
67
  };
@@ -1,7 +1,7 @@
1
1
  import { PluginManifest } from './PluginTypes';
2
2
  import { SpaceCredential } from './SpaceTypes';
3
3
  /** `server`: a file of the space's server code — its functions or runtime — in a private bucket. */
4
- export type ResourceType = 'image' | 'video' | 'document' | 'application' | 'plugin' | 'template' | 'server';
4
+ export type ResourceType = 'image' | 'video' | 'document' | 'application' | 'plugin' | 'snippet' | 'server';
5
5
  export type Resource = {
6
6
  id: string;
7
7
  cdnIdentifier: string;
@@ -33,7 +33,7 @@ export type ResourceFile = File & {
33
33
  metadata?: PluginManifest;
34
34
  };
35
35
  /**
36
- * Who may read a bucket's files. `public`: anybody, at its domain — plugins, images, templates. `private`: only the
36
+ * Who may read a bucket's files. `public`: anybody, at its domain — plugins, images, snippets. `private`: only the
37
37
  * platform, with its CDN's credential — the space's server code. A private bucket has no domain.
38
38
  */
39
39
  export type CdnVisibility = 'public' | 'private';
@@ -1,6 +1,7 @@
1
1
  import { InteractionCallbackParamValues, InteractionCallbackType } from './InteractionTypes';
2
2
  import { ChannelDeclarations } from './RealtimeTypes';
3
- import { Style } from './StyleTypes';
3
+ import { SnippetStyle } from './SnippetTypes';
4
+ import { BuiltinParam } from '../authoring/paramSpec';
4
5
  import { RuleGroup } from '@plitzi/plitzi-ui/QueryBuilder';
5
6
  export type ElementRuntime = 'server' | 'client' | 'shared';
6
7
  /**
@@ -70,6 +71,20 @@ export type ElementInteraction<T extends Record<string, unknown> = Record<string
70
71
  /** On a trigger only: what a firing does while this flow is still running. `skip` when absent. */
71
72
  whileRunning?: WhileRunning;
72
73
  };
74
+ /**
75
+ * What a feature flag gates an element on: it exists only while the flag `name` resolves to `is`.
76
+ *
77
+ * Not a visibility. A hidden element is still rendered, its markup still in the page; a gated one whose flag says no
78
+ * is not rendered at all — not on the server, not in the browser, not its subtree — and the data of its server
79
+ * elements is not resolved. Its declaration still travels with the space's document, as every element's does, so a
80
+ * flag switches a feature off; it does not keep it secret. `is: false` is the other half of a rollout: the old
81
+ * version, shown until the flag turns on.
82
+ * On a page, a flag that says no makes the page not found.
83
+ */
84
+ export type ElementFlagGate = {
85
+ name: string;
86
+ is: boolean;
87
+ };
73
88
  export type ElementDefinition = {
74
89
  rootId: Element['id'];
75
90
  label: string;
@@ -92,6 +107,13 @@ export type ElementDefinition = {
92
107
  runtime?: ElementRuntime;
93
108
  /** When this element's items are mounted, relative to its `visibility`. See {@link ElementLoadStrategy}. */
94
109
  loadStrategy?: ElementLoadStrategy;
110
+ /** The feature flag this element exists under. See {@link ElementFlagGate}. */
111
+ flag?: ElementFlagGate;
112
+ /**
113
+ * The `id` this element carries in the DOM, so a link to `/page#anchor` lands on it — `data-id` names the element
114
+ * for the platform, this names it for the URL. One per rendered page, layouts included (`isAnchor`).
115
+ */
116
+ anchor?: string;
95
117
  };
96
118
  /**
97
119
  * An element, keyed by the one name it answers to.
@@ -119,12 +141,62 @@ type SchemaVariableBase<TType extends string, TValue> = {
119
141
  }[];
120
142
  };
121
143
  export type SchemaVariable = SchemaVariableBase<'number', number> | SchemaVariableBase<'checkbox' | 'switch', boolean> | SchemaVariableBase<'text' | 'email' | 'password' | 'select' | 'select2' | 'textarea' | 'color', string>;
144
+ /** A value a flag takes where its `when` matches. The first rule that matches decides. */
145
+ export type SchemaFlagRule = {
146
+ when: RuleGroup;
147
+ value: boolean;
148
+ };
149
+ /**
150
+ * A feature flag the space declares, under the name it is read by: `{{ flags.newCheckout }}`.
151
+ *
152
+ * Read with the document, stored apart from it: each environment has one set, shared by every revision it serves, so a
153
+ * flag is turned without a new revision and a rollback keeps the flags as they are. A revision keeps a copy of the flags
154
+ * it was published with, read only when the environment's own cannot be. The draft (`main`) applies whatever it says
155
+ * now; a published environment, what was last published to it. Its rules see the environment, the host, the URL and
156
+ * who is visiting (`user.authenticated`, `user.email`, `user.username`, `user.roles`). Whoever runs the space may
157
+ * override the answer — the server it is rendered by, then the SDK embedding it, then a tester with the dev tools —
158
+ * but only for flags declared here.
159
+ */
160
+ export type SchemaFlag = {
161
+ description?: string;
162
+ /** The answer when no rule matches. */
163
+ value: boolean;
164
+ rules: SchemaFlagRule[];
165
+ };
122
166
  export type PageFolder = {
123
167
  id: string;
124
168
  name: string;
125
169
  slug: string;
126
170
  parentId?: PageFolder['id'];
127
171
  };
172
+ /**
173
+ * A prop a component declares, as the document stores it: the part of a `BuiltinParam` that survives JSON — no `when`
174
+ * guard and no `builderType` worked out from other params, which are functions and only ever live in code.
175
+ */
176
+ export type ComponentProp = Pick<BuiltinParam, 'type' | 'description' | 'default' | 'options' | 'required' | 'label' | 'optionLabels' | 'elementType'>;
177
+ /**
178
+ * A reusable subtree of the space: declared once, placed on any page as an instance (a `reference` element with
179
+ * `referenceType: 'component'`), and versioned, published and copied with the space because it is part of it.
180
+ *
181
+ * Its tree is a `flat` of its own rather than roots inside `schema.flat`: that one is the tree of the pages, and a
182
+ * component belongs to none. Ids are still one namespace across every tree, so an id alone says which tree it is in.
183
+ */
184
+ export type SpaceComponent = {
185
+ /** The key it is stored under, and what an instance names in `referenceId`. */
186
+ id: string;
187
+ label?: string;
188
+ /** The page folder the builder files it under. It routes nothing: a component has no URL of its own. */
189
+ folder?: string;
190
+ /** What an instance hands in, each as an attribute of the instance; read inside as `{{ props.<name> }}`. */
191
+ props?: Record<string, ComponentProp>;
192
+ /** Elements of `flat` an instance fills with its children, each child naming the one it goes in (`slot`). */
193
+ slots?: Element['id'][];
194
+ rootId: Element['id'];
195
+ /** `rootId` with no parent, and everything under it. */
196
+ flat: Record<Element['id'], Element>;
197
+ };
198
+ /** What a component declares, apart from its tree: the part an update may change. */
199
+ export type SpaceComponentDeclaration = Pick<SpaceComponent, 'label' | 'folder' | 'props' | 'slots'>;
128
200
  export type Schema = {
129
201
  flat: Record<string, Element>;
130
202
  definition: {
@@ -132,6 +204,8 @@ export type Schema = {
132
204
  permanentUrl: string;
133
205
  };
134
206
  variables: SchemaVariable[];
207
+ /** Keyed by the name each is read by. A space that declares none has none — documents written before flags too. */
208
+ flags?: Record<string, SchemaFlag>;
135
209
  settings: {
136
210
  keepState?: boolean;
137
211
  stateStorage?: 'localStorage' | 'sessionStorage';
@@ -225,6 +299,7 @@ export type Schema = {
225
299
  rsc?: SchemaRsc;
226
300
  pages: Element['id'][];
227
301
  pageFolders: PageFolder[];
302
+ components: Record<SpaceComponent['id'], SpaceComponent>;
228
303
  };
229
304
  export type SchemaContextValue = {
230
305
  definition?: {
@@ -239,6 +314,13 @@ export type SchemaContextValue = {
239
314
  schemaMoveElement?: (from: string, to: string, elementId: string, dropPosition?: DropPosition, fromSubscriptions?: boolean) => void;
240
315
  schemaCloneElement?: (elementId: string, targetId?: string, fromSubscriptions?: boolean) => void;
241
316
  schemaRemoveElement?: (elementId: string, fromSubscriptions?: boolean) => void;
317
+ schemaAddComponent?: (component: SpaceComponent, from?: {
318
+ elementId: Element['id'];
319
+ instanceId: Element['id'];
320
+ }, fromSubscriptions?: boolean) => void;
321
+ schemaUpdateComponent?: (componentId: SpaceComponent['id'], declaration: SpaceComponentDeclaration, fromSubscriptions?: boolean) => void;
322
+ schemaRemoveComponent?: (componentId: SpaceComponent['id'], fromSubscriptions?: boolean) => void;
323
+ schemaDetachInstance?: (instanceId: Element['id'], fromSubscriptions?: boolean) => void;
242
324
  schemaAddPage?: (page: Element, fromSubscriptions?: boolean) => Promise<void>;
243
325
  schemaHomePage?: (pageId: string, fromSubscriptions?: boolean) => void;
244
326
  schemaUpdatePage?: (page: Element, fromSubscriptions?: boolean) => void;
@@ -249,16 +331,31 @@ export type SchemaContextValue = {
249
331
  schemaAddVariable?: (variable: SchemaVariable, fromSubscriptions?: boolean) => void;
250
332
  schemaUpdateVariable?: (variable: SchemaVariable, fromSubscriptions?: boolean) => void;
251
333
  schemaRemoveVariable?: (name: string, fromSubscriptions?: boolean) => void;
252
- schemaAddTemplate?: (to: string, data: Element, dropPosition?: DropPosition, initialItems?: Record<string, Element>, templatePlatform?: Style, variables?: SchemaVariable[], fromSubscriptions?: boolean) => void;
334
+ schemaSetFlag?: (name: string, flag: SchemaFlag, fromSubscriptions?: boolean) => void;
335
+ schemaRemoveFlag?: (name: string, fromSubscriptions?: boolean) => void;
336
+ schemaAddSnippet?: (to: string, data: Element, dropPosition?: DropPosition, initialItems?: Record<string, Element>, style?: SnippetStyle, variables?: SchemaVariable[], fromSubscriptions?: boolean) => void;
253
337
  schemaUpdateSettings?: (value: string | number | boolean, path?: string, fromSubscriptions?: boolean) => void;
254
338
  };
339
+ /** The fields of a definition an element may go without — absent in a document, `null` from GraphQL. */
340
+ type OptionalDefinitionKey = 'parentId' | 'items' | 'bindings' | 'interactions' | 'initialState' | 'runtime' | 'loadStrategy' | 'flag' | 'anchor';
341
+ /**
342
+ * An element as it arrives on the wire. GraphQL answers every field a query names, so one the element does not have
343
+ * comes back `null` — where the element itself has nothing. `schemaFromWire` drops them on arrival.
344
+ */
345
+ export type WireElement = Omit<Element, 'definition'> & {
346
+ definition: Omit<ElementDefinition, OptionalDefinitionKey> & {
347
+ [K in OptionalDefinitionKey]?: ElementDefinition[K] | null;
348
+ };
349
+ };
255
350
  export type SchemaRaw = {
256
351
  definition: Schema['definition'];
257
- flat: Element[];
352
+ flat: WireElement[];
258
353
  variables: SchemaVariable[];
354
+ flags?: Schema['flags'];
259
355
  settings: Schema['settings'];
260
356
  rsc?: Schema['rsc'];
261
357
  pages: Element['id'][];
262
358
  pageFolders: PageFolder[];
359
+ components: Schema['components'];
263
360
  };
264
361
  export {};
@@ -1,13 +1,11 @@
1
1
  import { ComponentDefinition } from './ElementTypes';
2
2
  import { PluginRaw } from './PluginTypes';
3
3
  import { Schema } from './SchemaTypes';
4
- import { Segment } from './SegmentTypes';
5
4
  import { Style } from './StyleTypes';
6
5
  export type OfflineDataRaw = {
7
6
  schema: Schema;
8
7
  style: Style;
9
8
  plugins?: PluginRaw[];
10
- segments?: Record<string, Segment>;
11
9
  };
12
10
  export type OfflineData = Omit<OfflineDataRaw, 'plugins'> & {
13
11
  plugins: Record<string, ComponentDefinition>;