@plitzi/sdk-shared 0.39.0 → 0.39.2

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 (508) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/_virtual/_rolldown/runtime.mjs +1 -2
  3. package/dist/actions/access.mjs +1 -2
  4. package/dist/actions/cron.mjs +1 -2
  5. package/dist/actions/failureHandler.mjs +1 -2
  6. package/dist/actions/flowDelay.d.ts +6 -0
  7. package/dist/actions/flowDelay.mjs +3 -0
  8. package/dist/actions/functions.d.ts +6 -3
  9. package/dist/actions/functions.mjs +12 -8
  10. package/dist/actions/index.d.ts +2 -1
  11. package/dist/actions/index.mjs +10 -9
  12. package/dist/actions/jobs.mjs +1 -2
  13. package/dist/actions/smtp.mjs +1 -2
  14. package/dist/actions/triggerParams.mjs +1 -2
  15. package/dist/actions/triggers.mjs +1 -2
  16. package/dist/actions/validateDocument.mjs +133 -123
  17. package/dist/activity/describe.mjs +1 -2
  18. package/dist/activity/guard.mjs +1 -2
  19. package/dist/activity/types.mjs +1 -2
  20. package/dist/auth/failureChannel.mjs +1 -2
  21. package/dist/auth/visitorRoles.mjs +1 -2
  22. package/dist/authoring/builder.mjs +1 -2
  23. package/dist/authoring/declare.mjs +1 -2
  24. package/dist/authoring/elementCallbacks.mjs +1 -2
  25. package/dist/authoring/index.mjs +3 -3
  26. package/dist/authoring/paramSpec.mjs +1 -2
  27. package/dist/authoring/spaceCallbacks.mjs +1 -2
  28. package/dist/builder/contexts/BuilderContext.mjs +1 -2
  29. package/dist/builder/contexts/index.mjs +1 -2
  30. package/dist/conditions/dates.d.ts +2 -0
  31. package/dist/conditions/dates.mjs +12 -0
  32. package/dist/conditions/evaluateRuleGroup.d.ts +13 -0
  33. package/dist/conditions/evaluateRuleGroup.mjs +4 -0
  34. package/dist/conditions/evaluator.d.ts +39 -0
  35. package/dist/conditions/evaluator.mjs +75 -0
  36. package/dist/conditions/index.d.ts +10 -0
  37. package/dist/conditions/index.mjs +5 -0
  38. package/dist/conditions/rules.d.ts +3 -0
  39. package/dist/conditions/rules.mjs +3 -0
  40. package/dist/conditions/types.d.ts +44 -0
  41. package/dist/connectors/constants.mjs +1 -2
  42. package/dist/connectors/manifestTokens.mjs +1 -2
  43. package/dist/connectors/presets.mjs +1 -2
  44. package/dist/connectors/validateManifest.mjs +56 -57
  45. package/dist/dataSource/computed.mjs +16 -17
  46. package/dist/dataSource/getBindingsDetails.d.ts +5 -6
  47. package/dist/dataSource/getBindingsDetails.mjs +65 -40
  48. package/dist/dataSource/globalSources.d.ts +1 -1
  49. package/dist/dataSource/globalSources.mjs +1 -2
  50. package/dist/dataSource/helpers/getSourceName.mjs +1 -2
  51. package/dist/dataSource/index.mjs +5 -5
  52. package/dist/dataSource/utility/arrayMap.mjs +2 -2
  53. package/dist/dataSource/utility/capitalize.mjs +1 -2
  54. package/dist/dataSource/utility/checkboxParams.mjs +1 -2
  55. package/dist/dataSource/utility/dateConverter.mjs +0 -1
  56. package/dist/dataSource/utility/index.mjs +15 -16
  57. package/dist/dataSource/utility/not.mjs +1 -2
  58. package/dist/dataSource/utility/staticValue.mjs +0 -1
  59. package/dist/dataSource/utility/stringToArray.mjs +0 -1
  60. package/dist/dataSource/utility/styleSelector.mjs +1 -2
  61. package/dist/dataSource/utility/styleVariant.mjs +2 -3
  62. package/dist/dataSource/utility/truthiness.mjs +1 -2
  63. package/dist/dataSource/utility/twigTemplate.mjs +0 -1
  64. package/dist/dataSource/variables/resolveVariables.mjs +2 -3
  65. package/dist/dates/formatDate.mjs +29 -30
  66. package/dist/dates/isDate.mjs +1 -2
  67. package/dist/devTools/chrome.mjs +1 -2
  68. package/dist/devTools/debugCookie.mjs +1 -2
  69. package/dist/devTools/index.mjs +5 -5
  70. package/dist/devTools/interactionLog.mjs +1 -2
  71. package/dist/devTools/react/DevToolsContext.mjs +1 -2
  72. package/dist/devTools/sight/sight.mjs +1 -2
  73. package/dist/devTools/utils/PlitziConsole.mjs +1 -2
  74. package/dist/elements/ComponentContext.mjs +1 -2
  75. package/dist/flags/flagsCookie.mjs +5 -6
  76. package/dist/flags/index.d.ts +1 -0
  77. package/dist/flags/index.mjs +4 -3
  78. package/dist/flags/overrides.d.ts +36 -0
  79. package/dist/flags/overrides.mjs +13 -0
  80. package/dist/flags/react/useFlagResolution.mjs +5 -6
  81. package/dist/flags/resolveFlags.d.ts +1 -1
  82. package/dist/flags/resolveFlags.mjs +2 -3
  83. package/dist/flags/schemaFlag.mjs +1 -2
  84. package/dist/functions/contract.d.ts +326 -0
  85. package/dist/functions/contract.mjs +3 -0
  86. package/dist/functions/index.d.ts +15 -0
  87. package/dist/functions/index.mjs +9 -0
  88. package/dist/functions/kv.d.ts +80 -0
  89. package/dist/functions/kvChange.d.ts +67 -0
  90. package/dist/functions/kvChange.mjs +24 -0
  91. package/dist/functions/later.d.ts +18 -0
  92. package/dist/functions/messages.d.ts +4 -0
  93. package/dist/functions/messages.mjs +205 -0
  94. package/dist/functions/protocol.d.ts +416 -0
  95. package/dist/functions/protocol.mjs +37 -0
  96. package/dist/functions/rateLimit.d.ts +17 -0
  97. package/dist/functions/rateLimit.mjs +0 -0
  98. package/dist/functions/refusal.d.ts +26 -0
  99. package/dist/functions/refusal.mjs +11 -0
  100. package/dist/functions/runtime.d.ts +44 -0
  101. package/dist/functions/runtime.mjs +13 -0
  102. package/dist/functions/sizes.d.ts +27 -0
  103. package/dist/functions/sizes.mjs +7 -0
  104. package/dist/functions/wire.d.ts +11 -0
  105. package/dist/functions/wire.mjs +39 -0
  106. package/dist/helpers/canonicalJson.mjs +1 -2
  107. package/dist/helpers/clipboard.mjs +1 -2
  108. package/dist/helpers/cookies.mjs +1 -2
  109. package/dist/helpers/deepEqual/deepEqual.d.ts +5 -0
  110. package/dist/helpers/deepEqual/deepEqual.mjs +44 -0
  111. package/dist/helpers/deepEqual/index.d.ts +1 -0
  112. package/dist/helpers/deepEqual/index.mjs +1 -0
  113. package/dist/helpers/eventTarget.mjs +1 -2
  114. package/dist/helpers/fetchManifest.mjs +1 -2
  115. package/dist/helpers/images.mjs +1 -2
  116. package/dist/helpers/index.d.ts +4 -6
  117. package/dist/helpers/index.mjs +24 -20
  118. package/dist/helpers/interval.mjs +1 -2
  119. package/dist/helpers/isRecord.mjs +1 -2
  120. package/dist/helpers/keys.mjs +1 -2
  121. package/dist/helpers/lodash/camelCase.d.ts +1 -0
  122. package/dist/helpers/lodash/camelCase.mjs +7 -0
  123. package/dist/helpers/lodash/capitalize.d.ts +1 -0
  124. package/dist/helpers/lodash/capitalize.mjs +5 -0
  125. package/dist/helpers/lodash/cloneDeep.d.ts +8 -0
  126. package/dist/helpers/lodash/cloneDeep.mjs +53 -0
  127. package/dist/helpers/lodash/get.d.ts +11 -0
  128. package/dist/helpers/lodash/get.mjs +14 -0
  129. package/dist/helpers/lodash/has.d.ts +2 -0
  130. package/dist/helpers/lodash/has.mjs +12 -0
  131. package/dist/helpers/lodash/index.d.ts +11 -0
  132. package/dist/helpers/lodash/index.mjs +7 -0
  133. package/dist/helpers/lodash/omit.d.ts +4 -0
  134. package/dist/helpers/lodash/omit.mjs +35 -0
  135. package/dist/helpers/lodash/set.d.ts +2 -0
  136. package/dist/helpers/lodash/set.mjs +20 -0
  137. package/dist/helpers/lodash/shared.d.ts +2 -0
  138. package/dist/helpers/lodash/shared.mjs +37 -0
  139. package/dist/helpers/reducerOrigin.mjs +1 -2
  140. package/dist/helpers/replaceEqualDeep/index.d.ts +1 -0
  141. package/dist/helpers/replaceEqualDeep/index.mjs +1 -0
  142. package/dist/helpers/replaceEqualDeep/replaceEqualDeep.d.ts +12 -0
  143. package/dist/helpers/replaceEqualDeep/replaceEqualDeep.mjs +30 -0
  144. package/dist/helpers/resources.d.ts +21 -0
  145. package/dist/helpers/resources.mjs +40 -0
  146. package/dist/helpers/scroll.mjs +1 -2
  147. package/dist/helpers/security.d.ts +15 -0
  148. package/dist/helpers/security.mjs +8 -4
  149. package/dist/helpers/spaceRoot.mjs +1 -2
  150. package/dist/helpers/syntaxHighlight.mjs +1 -2
  151. package/dist/helpers/twigWrapper/Evaluator/Evaluator.mjs +75 -76
  152. package/dist/helpers/twigWrapper/Evaluator/helpers.mjs +1 -2
  153. package/dist/helpers/twigWrapper/Lexer/Lexer.mjs +1 -2
  154. package/dist/helpers/twigWrapper/Lexer/types.mjs +1 -2
  155. package/dist/helpers/twigWrapper/Parser/Cursor.mjs +1 -2
  156. package/dist/helpers/twigWrapper/Parser/ExpressionParser.mjs +1 -2
  157. package/dist/helpers/twigWrapper/Parser/Parser.mjs +1 -2
  158. package/dist/helpers/twigWrapper/Parser/helpers.mjs +1 -2
  159. package/dist/helpers/twigWrapper/TemplateCache/TemplateCache.mjs +1 -2
  160. package/dist/helpers/twigWrapper/charClass.mjs +1 -2
  161. package/dist/helpers/twigWrapper/filters/arrays.mjs +1 -2
  162. package/dist/helpers/twigWrapper/filters/catalog/index.mjs +1 -2
  163. package/dist/helpers/twigWrapper/filters/dateParts.mjs +1 -2
  164. package/dist/helpers/twigWrapper/filters/dates.mjs +13 -14
  165. package/dist/helpers/twigWrapper/filters/filters.mjs +21 -22
  166. package/dist/helpers/twigWrapper/filters/hashing.mjs +1 -2
  167. package/dist/helpers/twigWrapper/filters/misc.mjs +27 -28
  168. package/dist/helpers/twigWrapper/filters/numbers.mjs +1 -2
  169. package/dist/helpers/twigWrapper/filters/objects.mjs +1 -2
  170. package/dist/helpers/twigWrapper/filters/raw.mjs +1 -2
  171. package/dist/helpers/twigWrapper/filters/strings.mjs +23 -24
  172. package/dist/helpers/twigWrapper/filters/types.mjs +1 -2
  173. package/dist/helpers/twigWrapper/filters/values.mjs +1 -2
  174. package/dist/helpers/twigWrapper/index.mjs +8 -8
  175. package/dist/helpers/twigWrapper/inspectTemplate.mjs +12 -13
  176. package/dist/helpers/twigWrapper/processTwig/helpers.mjs +1 -2
  177. package/dist/helpers/twigWrapper/processTwig/processTwig.mjs +1 -2
  178. package/dist/helpers/twigWrapper/processTwig/resolveStepParam.mjs +1 -2
  179. package/dist/helpers/twigWrapper/templateRoots.d.ts +3 -9
  180. package/dist/helpers/twigWrapper/templateRoots.mjs +14 -9
  181. package/dist/helpers/twigWrapper/tokens/hasTemplateSyntax.mjs +1 -2
  182. package/dist/helpers/twigWrapper/tokens/hasValidToken.mjs +1 -2
  183. package/dist/helpers/twigWrapper/tokens/tokenPatterns.mjs +1 -2
  184. package/dist/helpers/utils.mjs +2 -3
  185. package/dist/history/describe.mjs +1 -2
  186. package/dist/history/diff.mjs +1 -2
  187. package/dist/hooks/index.mjs +5 -5
  188. package/dist/hooks/useFontHead.mjs +1 -2
  189. package/dist/hooks/useNetwork.mjs +1 -2
  190. package/dist/hooks/usePlitzi.d.ts +7 -6
  191. package/dist/hooks/usePlitzi.mjs +1 -2
  192. package/dist/hooks/useStableValue.mjs +5 -6
  193. package/dist/navigation/index.mjs +3 -3
  194. package/dist/navigation/matchPath.mjs +19 -11
  195. package/dist/navigation/routes.mjs +57 -38
  196. package/dist/navigation/sitemap.mjs +9 -10
  197. package/dist/network/entitlements.d.ts +21 -0
  198. package/dist/network/entitlements.mjs +1 -2
  199. package/dist/network/graphql/builder/Mutations/Space/SpaceAddElementMutation.mjs +1 -2
  200. package/dist/network/graphql/builder/Mutations/Space/SpaceAddPluginMutation.mjs +1 -2
  201. package/dist/network/graphql/builder/Mutations/Space/SpaceAddSnippetMutation.mjs +1 -2
  202. package/dist/network/graphql/builder/Mutations/Space/SpaceCloneElementMutation.mjs +1 -2
  203. package/dist/network/graphql/builder/Mutations/Space/SpaceDeployMutation.mjs +1 -2
  204. package/dist/network/graphql/builder/Mutations/Space/SpaceFixIssuesMutation.mjs +1 -2
  205. package/dist/network/graphql/builder/Mutations/Space/SpaceMoveElementMutation.mjs +1 -2
  206. package/dist/network/graphql/builder/Mutations/Space/SpacePublishMutation.mjs +1 -2
  207. package/dist/network/graphql/builder/Mutations/Space/SpaceRemoveElementMutation.mjs +1 -2
  208. package/dist/network/graphql/builder/Mutations/Space/SpaceRemovePluginMutation.mjs +1 -2
  209. package/dist/network/graphql/builder/Mutations/Space/SpaceRenameElementMutation.mjs +1 -2
  210. package/dist/network/graphql/builder/Mutations/Space/SpaceRunE2eTestsMutation.mjs +1 -2
  211. package/dist/network/graphql/builder/Mutations/Space/SpaceSetTestsMutation.mjs +1 -2
  212. package/dist/network/graphql/builder/Mutations/Space/SpaceUpdateElementMutation.mjs +1 -2
  213. package/dist/network/graphql/builder/Mutations/Space/SpaceUpdateElementsMutation.mjs +1 -2
  214. package/dist/network/graphql/builder/Mutations/Space/SpaceUpdateMutation.mjs +1 -2
  215. package/dist/network/graphql/builder/Mutations/Space/SpaceUpdatePluginMutation.mjs +1 -2
  216. package/dist/network/graphql/builder/Mutations/Space/SpaceUpdateSchemaMutation.mjs +1 -2
  217. package/dist/network/graphql/builder/Mutations/Space/SpaceUpdateSettingsMutation.mjs +1 -2
  218. package/dist/network/graphql/builder/Mutations/Space/actions/SpaceAddActionMutation.mjs +1 -2
  219. package/dist/network/graphql/builder/Mutations/Space/actions/SpaceRemoveActionMutation.mjs +1 -2
  220. package/dist/network/graphql/builder/Mutations/Space/actions/SpaceRunActionMutation.mjs +1 -2
  221. package/dist/network/graphql/builder/Mutations/Space/actions/SpaceUpdateActionMutation.mjs +1 -2
  222. package/dist/network/graphql/builder/Mutations/Space/cdns/SpaceAddCdnBucketMutation.mjs +1 -2
  223. package/dist/network/graphql/builder/Mutations/Space/cdns/SpaceAddCdnMutation.mjs +1 -2
  224. package/dist/network/graphql/builder/Mutations/Space/cdns/SpaceRemoveCdnBucketMutation.mjs +1 -2
  225. package/dist/network/graphql/builder/Mutations/Space/cdns/SpaceRemoveCdnMutation.mjs +1 -2
  226. package/dist/network/graphql/builder/Mutations/Space/cdns/SpaceSetCdnCredentialMutation.mjs +1 -2
  227. package/dist/network/graphql/builder/Mutations/Space/cdns/SpaceUpdateCdnBucketMutation.mjs +1 -2
  228. package/dist/network/graphql/builder/Mutations/Space/cdns/SpaceUpdateCdnMutation.mjs +1 -2
  229. package/dist/network/graphql/builder/Mutations/Space/components/SpaceAddComponentMutation.mjs +1 -2
  230. package/dist/network/graphql/builder/Mutations/Space/components/SpaceDetachInstanceMutation.mjs +1 -2
  231. package/dist/network/graphql/builder/Mutations/Space/components/SpaceRemoveComponentMutation.mjs +1 -2
  232. package/dist/network/graphql/builder/Mutations/Space/components/SpaceUpdateComponentMutation.mjs +1 -2
  233. package/dist/network/graphql/builder/Mutations/Space/connectors/SpaceAddConnectorMutation.mjs +1 -2
  234. package/dist/network/graphql/builder/Mutations/Space/connectors/SpaceRemoveConnectorMutation.mjs +1 -2
  235. package/dist/network/graphql/builder/Mutations/Space/connectors/SpaceUpdateConnectorMutation.mjs +1 -2
  236. package/dist/network/graphql/builder/Mutations/Space/credentials/SpaceAddCredentialMutation.mjs +1 -2
  237. package/dist/network/graphql/builder/Mutations/Space/credentials/SpaceRemoveCredentialMutation.mjs +1 -2
  238. package/dist/network/graphql/builder/Mutations/Space/credentials/SpaceUpdateCredentialMutation.mjs +1 -2
  239. package/dist/network/graphql/builder/Mutations/Space/data/SpaceSaveDataMutation.mjs +1 -2
  240. package/dist/network/graphql/builder/Mutations/Space/flags/SpacePublishFlagsMutation.mjs +1 -2
  241. package/dist/network/graphql/builder/Mutations/Space/flags/SpaceRemoveFlagMutation.mjs +1 -2
  242. package/dist/network/graphql/builder/Mutations/Space/flags/SpaceSetFlagMutation.mjs +1 -2
  243. package/dist/network/graphql/builder/Mutations/Space/folders/SpaceAddPageFolderMutation.mjs +1 -2
  244. package/dist/network/graphql/builder/Mutations/Space/folders/SpaceRemovePageFolderMutation.mjs +1 -2
  245. package/dist/network/graphql/builder/Mutations/Space/folders/SpaceUpdatePageFolderMutation.mjs +1 -2
  246. package/dist/network/graphql/builder/Mutations/Space/functions/SpaceInstallTemplateFunctionsMutation.mjs +1 -2
  247. package/dist/network/graphql/builder/Mutations/Space/functions/SpaceRemoveFunctionsMutation.mjs +1 -2
  248. package/dist/network/graphql/builder/Mutations/Space/functions/SpaceSaveFunctionsMutation.mjs +1 -2
  249. package/dist/network/graphql/builder/Mutations/Space/functions/SpaceTryFunctionMutation.mjs +1 -2
  250. package/dist/network/graphql/builder/Mutations/Space/jobs/SpaceControlJobMutation.mjs +1 -2
  251. package/dist/network/graphql/builder/Mutations/Space/pages/SpaceAddPageMutation.mjs +1 -2
  252. package/dist/network/graphql/builder/Mutations/Space/pages/SpaceHomePageMutation.mjs +1 -2
  253. package/dist/network/graphql/builder/Mutations/Space/pages/SpaceRemovePageMutation.mjs +1 -2
  254. package/dist/network/graphql/builder/Mutations/Space/pages/SpaceUpdatePageMutation.mjs +1 -2
  255. package/dist/network/graphql/builder/Mutations/Space/resources/SpaceAddResourceMutation.mjs +1 -2
  256. package/dist/network/graphql/builder/Mutations/Space/resources/SpaceMoveResourceMutation.mjs +1 -2
  257. package/dist/network/graphql/builder/Mutations/Space/resources/SpaceRemoveResourceMutation.mjs +1 -2
  258. package/dist/network/graphql/builder/Mutations/Space/runtime/SpaceRemoveRuntimeMutation.mjs +1 -2
  259. package/dist/network/graphql/builder/Mutations/Space/runtime/SpaceRemoveRuntimeVariableMutation.mjs +1 -2
  260. package/dist/network/graphql/builder/Mutations/Space/runtime/SpaceSetRuntimeSizeMutation.mjs +1 -2
  261. package/dist/network/graphql/builder/Mutations/Space/runtime/SpaceSetRuntimeVariableMutation.mjs +1 -2
  262. package/dist/network/graphql/builder/Mutations/Space/runtime/SpaceStartRuntimeMutation.mjs +1 -2
  263. package/dist/network/graphql/builder/Mutations/Space/runtime/SpaceStopRuntimeMutation.mjs +1 -2
  264. package/dist/network/graphql/builder/Mutations/Space/variables/SpaceAddVariableMutation.mjs +1 -2
  265. package/dist/network/graphql/builder/Mutations/Space/variables/SpaceRemoveVariableMutation.mjs +1 -2
  266. package/dist/network/graphql/builder/Mutations/Space/variables/SpaceUpdateVariableMutation.mjs +1 -2
  267. package/dist/network/graphql/builder/Mutations/Space/visitors/SpaceAddVisitorMutation.mjs +1 -2
  268. package/dist/network/graphql/builder/Mutations/Space/visitors/SpaceRemoveVisitorMutation.mjs +1 -2
  269. package/dist/network/graphql/builder/Mutations/Style/StyleUpdateMutation.mjs +1 -2
  270. package/dist/network/graphql/builder/Mutations/Style/StyleUpdateSettingsMutation.mjs +1 -2
  271. package/dist/network/graphql/builder/Mutations/Style/fonts/StyleAddFontMutation.mjs +1 -2
  272. package/dist/network/graphql/builder/Mutations/Style/fonts/StyleRemoveFontMutation.mjs +1 -2
  273. package/dist/network/graphql/builder/Mutations/Style/fonts/StyleUpdateFontMutation.mjs +1 -2
  274. package/dist/network/graphql/builder/Mutations/Style/selectorVariables/StyleAddSelectorVariableMutation.mjs +1 -2
  275. package/dist/network/graphql/builder/Mutations/Style/selectorVariables/StyleRemoveSelectorVariableMutation.mjs +1 -2
  276. package/dist/network/graphql/builder/Mutations/Style/selectorVariables/StyleUpdateSelectorVariableMutation.mjs +1 -2
  277. package/dist/network/graphql/builder/Mutations/Style/selectors/StyleAddSelectorMutation.mjs +1 -2
  278. package/dist/network/graphql/builder/Mutations/Style/selectors/StyleRemoveSelectorMutation.mjs +1 -2
  279. package/dist/network/graphql/builder/Mutations/Style/selectors/StyleRemoveSelectorsMutation.mjs +1 -2
  280. package/dist/network/graphql/builder/Mutations/Style/selectors/StyleUpdateSelectorMutation.mjs +1 -2
  281. package/dist/network/graphql/builder/Mutations/Style/variables/StyleAddVariableMutation.mjs +1 -2
  282. package/dist/network/graphql/builder/Mutations/Style/variables/StyleRemoveVariableMutation.mjs +1 -2
  283. package/dist/network/graphql/builder/Mutations/Style/variables/StyleUpdateVariableMutation.mjs +1 -2
  284. package/dist/network/graphql/builder/Mutations/index.mjs +155 -156
  285. package/dist/network/graphql/builder/Queries/InitQuery.mjs +1 -2
  286. package/dist/network/graphql/builder/Queries/Space/SpaceActionEventsQuery.mjs +1 -2
  287. package/dist/network/graphql/builder/Queries/Space/SpaceActionTasksQuery.mjs +1 -2
  288. package/dist/network/graphql/builder/Queries/Space/SpaceActionsQuery.mjs +1 -2
  289. package/dist/network/graphql/builder/Queries/Space/SpaceCdnsQuery.mjs +1 -2
  290. package/dist/network/graphql/builder/Queries/Space/SpaceChangesQuery.mjs +1 -2
  291. package/dist/network/graphql/builder/Queries/Space/SpaceCheckActionQuery.mjs +1 -2
  292. package/dist/network/graphql/builder/Queries/Space/SpaceConnectorsQuery.mjs +1 -2
  293. package/dist/network/graphql/builder/Queries/Space/SpaceCredentialsQuery.mjs +1 -2
  294. package/dist/network/graphql/builder/Queries/Space/SpaceDataQuery.mjs +1 -2
  295. package/dist/network/graphql/builder/Queries/Space/SpaceDeploymentsQuery.mjs +1 -2
  296. package/dist/network/graphql/builder/Queries/Space/SpaceFunctionsQuery.d.ts +1 -1
  297. package/dist/network/graphql/builder/Queries/Space/SpaceFunctionsQuery.mjs +2 -3
  298. package/dist/network/graphql/builder/Queries/Space/SpaceIssuesQuery.mjs +1 -2
  299. package/dist/network/graphql/builder/Queries/Space/SpaceJobsQuery.mjs +1 -2
  300. package/dist/network/graphql/builder/Queries/Space/SpaceLatestRevisionQuery.mjs +1 -2
  301. package/dist/network/graphql/builder/Queries/Space/SpaceQuotaQuery.mjs +1 -2
  302. package/dist/network/graphql/builder/Queries/Space/SpaceResourcesQuery.mjs +1 -2
  303. package/dist/network/graphql/builder/Queries/Space/SpaceRuntimeQuery.d.ts +1 -1
  304. package/dist/network/graphql/builder/Queries/Space/SpaceRuntimeQuery.mjs +2 -3
  305. package/dist/network/graphql/builder/Queries/Space/SpaceTestsQuery.mjs +1 -2
  306. package/dist/network/graphql/builder/Queries/Space/SpaceVersionContentsQuery.mjs +1 -2
  307. package/dist/network/graphql/builder/Queries/Space/SpaceVisitorsQuery.mjs +1 -2
  308. package/dist/network/graphql/builder/Queries/index.mjs +37 -38
  309. package/dist/network/graphql/builder/Subscriptions/SpaceEventSubscription.mjs +1 -2
  310. package/dist/network/graphql/builder/Subscriptions/index.mjs +1 -2
  311. package/dist/network/graphql/builder/fragments/cdnFields.mjs +1 -2
  312. package/dist/network/graphql/index.d.ts +0 -1
  313. package/dist/network/graphql/index.mjs +1 -3
  314. package/dist/network/index.d.ts +1 -5
  315. package/dist/network/index.mjs +7 -11
  316. package/dist/network/{NetworkContext.d.ts → react/NetworkContext.d.ts} +12 -11
  317. package/dist/network/{NetworkContext.mjs → react/NetworkContext.mjs} +1 -2
  318. package/dist/network/{NetworkInternalContext.d.ts → react/NetworkInternalContext.d.ts} +1 -1
  319. package/dist/network/react/NetworkInternalContext.mjs +4 -0
  320. package/dist/network/react/index.d.ts +5 -0
  321. package/dist/network/react/index.mjs +3 -0
  322. package/dist/network/spaceEvents.mjs +16 -17
  323. package/dist/plugins/bundle/bundle.mjs +1 -2
  324. package/dist/plugins/declaration.mjs +1 -2
  325. package/dist/plugins/react/ElementRegistryContext.d.ts +26 -0
  326. package/dist/plugins/react/ElementRegistryContext.mjs +17 -0
  327. package/dist/plugins/react/PluginAssetsContext.d.ts +11 -0
  328. package/dist/plugins/react/PluginAssetsContext.mjs +4 -0
  329. package/dist/plugins/react/PluginsContext.mjs +6 -3
  330. package/dist/plugins/react/index.d.ts +3 -0
  331. package/dist/plugins/react/index.mjs +4 -1
  332. package/dist/project/index.mjs +7 -7
  333. package/dist/project/layout/check.mjs +26 -27
  334. package/dist/project/layout/codes.mjs +1 -2
  335. package/dist/project/layout/contents.mjs +12 -13
  336. package/dist/project/layout/files.mjs +1 -2
  337. package/dist/project/layout/folders.mjs +43 -44
  338. package/dist/project/layout/index.mjs +3 -3
  339. package/dist/project/layout/plugins.mjs +56 -57
  340. package/dist/project/layout/vendor.mjs +14 -15
  341. package/dist/project/network.mjs +1 -2
  342. package/dist/project/pages/index.mjs +1 -2
  343. package/dist/project/paths/index.d.ts +8 -2
  344. package/dist/project/paths/index.mjs +3 -4
  345. package/dist/project/root.mjs +1 -2
  346. package/dist/queries/index.mjs +1 -2
  347. package/dist/queries/queryCache.mjs +1 -2
  348. package/dist/queries/serverQueries.mjs +1 -2
  349. package/dist/queries/useQuery.mjs +1 -2
  350. package/dist/queries/useServerQuery.mjs +1 -2
  351. package/dist/{helpers → react}/enclosingSpace.mjs +1 -2
  352. package/dist/react/generateFacade.d.ts +1 -0
  353. package/dist/{helpers → react}/generateFacade.mjs +4 -5
  354. package/dist/react/index.d.ts +8 -0
  355. package/dist/react/index.mjs +4 -0
  356. package/dist/{helpers → react}/sharedContext.mjs +0 -1
  357. package/dist/realtime/client.mjs +3 -4
  358. package/dist/realtime/index.mjs +4 -4
  359. package/dist/realtime/presence.mjs +1 -2
  360. package/dist/realtime/topics.mjs +1 -2
  361. package/dist/runs/index.mjs +1 -2
  362. package/dist/runs/report.mjs +1 -2
  363. package/dist/schema/anchor.mjs +1 -2
  364. package/dist/schema/index.mjs +18 -18
  365. package/dist/schema/layoutChain.mjs +1 -2
  366. package/dist/schema/markdownHeadings.mjs +1 -2
  367. package/dist/schema/motion.mjs +1 -2
  368. package/dist/schema/motionReveal.mjs +1 -2
  369. package/dist/schema/pageAccess.d.ts +9 -0
  370. package/dist/schema/pageAccess.mjs +42 -36
  371. package/dist/schema/pageElements.d.ts +3 -1
  372. package/dist/schema/pageElements.mjs +9 -3
  373. package/dist/schema/pageHead.d.ts +5 -2
  374. package/dist/schema/pageHead.mjs +3 -4
  375. package/dist/schema/providerAnswer.mjs +1 -2
  376. package/dist/schema/providerWhen.d.ts +1 -1
  377. package/dist/schema/providerWhen.mjs +6 -7
  378. package/dist/schema/react/SchemaContext.mjs +1 -2
  379. package/dist/schema/schemaConstants.mjs +1 -2
  380. package/dist/schema/schemaSettings.d.ts +1 -1
  381. package/dist/schema/schemaSettings.mjs +2 -3
  382. package/dist/schema/serverElements.d.ts +0 -24
  383. package/dist/schema/serverElements.mjs +60 -39
  384. package/dist/schema/serverInput.mjs +23 -24
  385. package/dist/schema/serverQuery.d.ts +15 -5
  386. package/dist/schema/serverQuery.mjs +47 -35
  387. package/dist/schema/snippet.mjs +1 -2
  388. package/dist/schema/wire.mjs +1 -2
  389. package/dist/security/index.d.ts +49 -0
  390. package/dist/security/index.mjs +44 -0
  391. package/dist/server/actions/useActionsSync.mjs +1 -2
  392. package/dist/server/actions/useImagesSync.mjs +1 -2
  393. package/dist/server/actions/useRealtimeSync.mjs +1 -2
  394. package/dist/server/index.mjs +7 -7
  395. package/dist/server/rsc/refreshRsc.mjs +23 -24
  396. package/dist/server/rsc/useRscRefresh.mjs +1 -2
  397. package/dist/server/rsc/useRscSync.mjs +1 -2
  398. package/dist/server/usePluginRoute.mjs +1 -2
  399. package/dist/source/export.d.ts +1 -1
  400. package/dist/source/export.mjs +1 -2
  401. package/dist/source/import.mjs +1 -2
  402. package/dist/source/index.mjs +4 -4
  403. package/dist/source/snapshot.mjs +1 -2
  404. package/dist/state/index.d.ts +0 -1
  405. package/dist/state/index.mjs +1 -3
  406. package/dist/state/paintedState.d.ts +20 -4
  407. package/dist/state/paintedState.mjs +21 -21
  408. package/dist/store/actionRuns/actionRunsRecorder.mjs +1 -2
  409. package/dist/store/actionRuns/actionRunsStore.mjs +1 -2
  410. package/dist/store/actionRuns/index.mjs +3 -3
  411. package/dist/store/actionRuns/useActionRuns.mjs +5 -6
  412. package/dist/store/index.d.ts +1 -0
  413. package/dist/store/index.mjs +2 -1
  414. package/dist/store/renderSettings.d.ts +1 -1
  415. package/dist/store/renderSettings.mjs +1 -2
  416. package/dist/store/runtimeStatePersist.mjs +171 -0
  417. package/dist/store/storeHooks.d.ts +45 -45
  418. package/dist/store/storeHooks.mjs +1 -2
  419. package/dist/store/tracing/index.mjs +5 -5
  420. package/dist/store/tracing/preview.mjs +1 -2
  421. package/dist/store/tracing/tracingCollector.d.ts +2 -2
  422. package/dist/store/tracing/tracingCollector.mjs +79 -78
  423. package/dist/store/tracing/tracingMiddleware.mjs +1 -2
  424. package/dist/store/tracing/tracingStore.mjs +1 -2
  425. package/dist/store/tracing/useTracing.mjs +6 -7
  426. package/dist/style/breakpoints.mjs +1 -2
  427. package/dist/style/cssLayers.mjs +1 -2
  428. package/dist/style/displayModes.mjs +1 -2
  429. package/dist/style/fontAssets.mjs +1 -2
  430. package/dist/style/fontValidation.mjs +14 -15
  431. package/dist/style/fonts.d.ts +5 -3
  432. package/dist/style/fonts.mjs +23 -24
  433. package/dist/style/fontsFromCss.mjs +1 -2
  434. package/dist/style/index.mjs +18 -18
  435. package/dist/style/keyframes.mjs +1 -2
  436. package/dist/style/layoutGrid.mjs +1 -2
  437. package/dist/style/notifications.mjs +1 -2
  438. package/dist/style/react/useDisplayMode.mjs +1 -2
  439. package/dist/style/react/useElementSize.mjs +1 -2
  440. package/dist/style/runtimeStyle.d.ts +19 -21
  441. package/dist/style/runtimeStyle.mjs +4 -7
  442. package/dist/style/snippetStyle.mjs +5 -6
  443. package/dist/style/styleConditions.mjs +1 -2
  444. package/dist/style/styleConstants.mjs +1 -2
  445. package/dist/style/stylePseudos.mjs +1 -2
  446. package/dist/style/styleStates.mjs +1 -2
  447. package/dist/style/styleTarget.mjs +24 -25
  448. package/dist/theme/cookie/index.mjs +1 -1
  449. package/dist/theme/cookie/themeCookie.d.ts +21 -1
  450. package/dist/theme/cookie/themeCookie.mjs +19 -4
  451. package/dist/theme/index.d.ts +1 -9
  452. package/dist/theme/index.mjs +1 -6
  453. package/dist/theme/{ThemeProvider.d.ts → react/ThemeProvider.d.ts} +8 -2
  454. package/dist/theme/react/ThemeProvider.mjs +78 -0
  455. package/dist/theme/{ThemeScope.d.ts → react/ThemeScope.d.ts} +6 -2
  456. package/dist/theme/react/ThemeScope.mjs +9 -0
  457. package/dist/theme/react/index.d.ts +9 -0
  458. package/dist/theme/react/index.mjs +5 -0
  459. package/dist/theme/{themeStore.d.ts → react/themeStore.d.ts} +5 -5
  460. package/dist/theme/{themeStore.mjs → react/themeStore.mjs} +4 -4
  461. package/dist/theme/{useTheme.d.ts → react/useTheme.d.ts} +1 -1
  462. package/dist/theme/react/useTheme.mjs +19 -0
  463. package/dist/types/ActionTypes.d.ts +33 -0
  464. package/dist/types/AuthTypes.d.ts +6 -0
  465. package/dist/types/CommonTypes.d.ts +14 -3
  466. package/dist/types/DataSourceTypes.d.ts +1 -1
  467. package/dist/types/FunctionTypes.d.ts +16 -6
  468. package/dist/types/InteractionTypes.d.ts +1 -1
  469. package/dist/types/JobTypes.d.ts +56 -182
  470. package/dist/types/PluginTypes.d.ts +8 -1
  471. package/dist/types/SchemaTypes.d.ts +8 -1
  472. package/dist/types/SchemaTypes.mjs +1 -2
  473. package/dist/types/ServerAdapterTypes.d.ts +0 -326
  474. package/dist/types/ServerTypes.d.ts +0 -311
  475. package/dist/types/SpaceTypes.d.ts +5 -2
  476. package/dist/types/StoreTypes.d.ts +9 -3
  477. package/dist/types/StyleTypes.d.ts +6 -0
  478. package/dist/types/StyleTypes.mjs +1 -2
  479. package/dist/types/index.d.ts +0 -3
  480. package/dist/websockets/RTCodec.mjs +1 -2
  481. package/eslint.config.mjs +25 -0
  482. package/package.json +29 -18
  483. package/vite.config.ts +58 -0
  484. package/dist/helpers/generateFacade.d.ts +0 -2
  485. package/dist/helpers/ruleEvaluator.d.ts +0 -16
  486. package/dist/helpers/ruleEvaluator.mjs +0 -5
  487. package/dist/network/NetworkInternalContext.mjs +0 -5
  488. package/dist/network/graphql/sdk/Mutations/index.d.ts +0 -3
  489. package/dist/network/graphql/sdk/Mutations/index.mjs +0 -4
  490. package/dist/network/graphql/sdk/Queries/InitQuery.d.ts +0 -16
  491. package/dist/network/graphql/sdk/Queries/InitQuery.mjs +0 -4
  492. package/dist/network/graphql/sdk/Queries/index.d.ts +0 -6
  493. package/dist/network/graphql/sdk/Queries/index.mjs +0 -5
  494. package/dist/network/graphql/sdk/index.d.ts +0 -5
  495. package/dist/network/graphql/sdk/index.mjs +0 -3
  496. package/dist/state/runtimeStatePersist.mjs +0 -119
  497. package/dist/theme/ThemeProvider.mjs +0 -69
  498. package/dist/theme/ThemeScope.mjs +0 -10
  499. package/dist/theme/useTheme.mjs +0 -20
  500. package/dist/types/OAuthTypes.d.ts +0 -246
  501. package/dist/types/ServerConfigTypes.d.ts +0 -527
  502. package/dist/types/ServerLogTypes.d.ts +0 -119
  503. /package/dist/{types/OAuthTypes.mjs → conditions/types.mjs} +0 -0
  504. /package/dist/{types/ServerConfigTypes.mjs → functions/kv.mjs} +0 -0
  505. /package/dist/{types/ServerLogTypes.mjs → functions/later.mjs} +0 -0
  506. /package/dist/{helpers → react}/enclosingSpace.d.ts +0 -0
  507. /package/dist/{helpers → react}/sharedContext.d.ts +0 -0
  508. /package/dist/{state → store}/runtimeStatePersist.d.ts +0 -0
@@ -0,0 +1,8 @@
1
+ /**
2
+ * What sdk-shared offers code that renders with React: a context that is one across every copy of the SDK a page loads
3
+ * (`sharedContext`), the facade a plugin's element is drawn through, and whether a space is drawn inside another. Apart
4
+ * from `/helpers`, which a server loads: nothing there reaches React (RFC 0032, D13).
5
+ */
6
+ export * from './sharedContext';
7
+ export * from './generateFacade';
8
+ export * from './enclosingSpace';
@@ -0,0 +1,4 @@
1
+ import { sharedContext as e } from "./sharedContext.mjs";
2
+ import { generateFacade as t } from "./generateFacade.mjs";
3
+ import { EnclosingSpaceContext as n } from "./enclosingSpace.mjs";
4
+ export { n as EnclosingSpaceContext, t as generateFacade, e as sharedContext };
@@ -5,5 +5,4 @@ var t = Symbol.for("plitzi.sharedContexts.v1"), n = (e) => (e[t] ??= /* @__PURE_
5
5
  let o = e(r);
6
6
  return o.displayName = t, i.set(t, o), o;
7
7
  };
8
- //#endregion
9
8
  export { r as sharedContext };
@@ -1,6 +1,6 @@
1
- import { pConsole as e } from "../devTools/utils/PlitziConsole.mjs";
2
1
  import "./topics.mjs";
3
- //#region src/realtime/client.ts
2
+ import { pConsole as e } from "../devTools/utils/PlitziConsole.mjs";
3
+ // src/realtime/client.ts
4
4
  var t = 30, n = [
5
5
  500,
6
6
  1e3,
@@ -154,7 +154,7 @@ var t = 30, n = [
154
154
  let t = l(e.data);
155
155
  t?.event === "ready" && a(t.data) ? (f = !0, F(g, t.data)) : t?.event === "message" && o(t.data) ? P(t.data) : t?.event === "ack" && s(t.data) && (c.get(t.data.id)?.(t.data.ok), c.delete(t.data.id));
156
156
  }, i.onclose = () => {
157
- h(), !(p || y !== g) && (f ? I(g) : (D = !1, z()));
157
+ h(), p || y !== g || (f ? I(g) : (D = !1, z()));
158
158
  }, g;
159
159
  };
160
160
  function z() {
@@ -222,5 +222,4 @@ var t = 30, n = [
222
222
  let i = d(e, { transport: t });
223
223
  return p.set(n, i), i;
224
224
  };
225
- //#endregion
226
225
  export { d as createRealtimeClient, m as realtimeClientFor };
@@ -1,4 +1,4 @@
1
- import { JOB_TYPE as e, JOIN_TYPE as t, LEAVE_TYPE as n, OBSERVER_COOKIE_NAME as r, PRESENCE_TYPE as i, REVOKED_TYPE as a, channelLimits as o, channelProblems as s, isValidTopic as c, jobOfTopic as l, jobTopic as u, matchChannel as d } from "./topics.mjs";
2
- import { createRealtimeClient as f, realtimeClientFor as p } from "./client.mjs";
3
- import { trackPresence as m } from "./presence.mjs";
4
- export { e as JOB_TYPE, t as JOIN_TYPE, n as LEAVE_TYPE, r as OBSERVER_COOKIE_NAME, i as PRESENCE_TYPE, a as REVOKED_TYPE, o as channelLimits, s as channelProblems, f as createRealtimeClient, c as isValidTopic, l as jobOfTopic, u as jobTopic, d as matchChannel, p as realtimeClientFor, m as trackPresence };
1
+ import { createRealtimeClient as e, realtimeClientFor as t } from "./client.mjs";
2
+ import { trackPresence as n } from "./presence.mjs";
3
+ import { JOB_TYPE as r, JOIN_TYPE as i, LEAVE_TYPE as a, OBSERVER_COOKIE_NAME as o, PRESENCE_TYPE as s, REVOKED_TYPE as c, channelLimits as l, channelProblems as u, isValidTopic as d, jobOfTopic as f, jobTopic as p, matchChannel as m } from "./topics.mjs";
4
+ export { r as JOB_TYPE, i as JOIN_TYPE, a as LEAVE_TYPE, o as OBSERVER_COOKIE_NAME, s as PRESENCE_TYPE, c as REVOKED_TYPE, l as channelLimits, u as channelProblems, e as createRealtimeClient, d as isValidTopic, f as jobOfTopic, p as jobTopic, m as matchChannel, t as realtimeClientFor, n as trackPresence };
@@ -1,5 +1,5 @@
1
1
  import { PRESENCE_TYPE as e } from "./topics.mjs";
2
- //#region src/realtime/presence.ts
2
+ // src/realtime/presence.ts
3
3
  var t = 2e4, n = 65e3, r = /* @__PURE__ */ new WeakMap(), i = (r, i, a) => {
4
4
  let o = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Set(), c = /* @__PURE__ */ new Set(), l = /* @__PURE__ */ new Map(), u, d = !1, f = () => [...d && r.me ? [{
5
5
  from: r.me,
@@ -72,5 +72,4 @@ var t = 2e4, n = 65e3, r = /* @__PURE__ */ new WeakMap(), i = (r, i, a) => {
72
72
  }
73
73
  };
74
74
  };
75
- //#endregion
76
75
  export { a as trackPresence };
@@ -1,5 +1,5 @@
1
1
  import { isRecord as e } from "../helpers/isRecord.mjs";
2
- //#region src/realtime/topics.ts
2
+ // src/realtime/topics.ts
3
3
  var t = /^[A-Za-z0-9:_.-]{1,128}$/, n = "[A-Za-z0-9_.-]{1,64}", r = (e) => t.test(e), i = /^\$job:([A-Za-z0-9:_.-]{1,128})$/, a = (e) => `$job:${e}`, o = (e) => i.exec(e)?.[1], s = "job", c = (e) => RegExp(`^${e.split(/(\{[A-Za-z0-9_]+\})/).map((e) => /^\{[A-Za-z0-9_]+\}$/.test(e) ? n : e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join("")}$`), l = (e, t) => {
4
4
  if (!t || !r(e)) return;
5
5
  let n = Object.keys(t).find((t) => c(t).test(e));
@@ -22,5 +22,4 @@ var t = /^[A-Za-z0-9:_.-]{1,128}$/, n = "[A-Za-z0-9_.-]{1,64}", r = (e) => t.tes
22
22
  maxMessageBytes: e.maxMessageBytes ?? 4096,
23
23
  messagesPerSecond: e.messagesPerSecond ?? 30
24
24
  }), m = "$presence", h = "$leave", g = "$join", _ = "$revoked", v = "plitzi-observer";
25
- //#endregion
26
25
  export { s as JOB_TYPE, g as JOIN_TYPE, h as LEAVE_TYPE, v as OBSERVER_COOKIE_NAME, m as PRESENCE_TYPE, _ as REVOKED_TYPE, p as channelLimits, f as channelProblems, r as isValidTopic, o as jobOfTopic, a as jobTopic, l as matchChannel };
@@ -1,6 +1,5 @@
1
1
  import { isRecord as e } from "../helpers/isRecord.mjs";
2
2
  import { RUN_REPORTS_ENV as t, RUN_REPORT_PATH as n, RUN_REPORT_STEPS_MOST as r, RUN_REPORT_TEXT_MOST as i, isRunReport as a, runReportProblems as o } from "./report.mjs";
3
- //#region src/runs/index.ts
3
+ // src/runs/index.ts
4
4
  var s = "/__plitzi/run", c = "PLITZI_RUN_STATUS", l = (t) => e(t) && typeof t.id == "string" && typeof t.title == "string" && typeof t.role == "string" && typeof t.status == "string" && typeof t.round == "number" && Array.isArray(t.files) && t.files.every((e) => typeof e == "string"), u = (t) => e(t) && typeof t.runId == "string" && typeof t.goal == "string" && typeof t.status == "string" && typeof t.done == "number" && typeof t.total == "number" && typeof t.at == "string" && Array.isArray(t.tasks) && t.tasks.every(l) && Array.isArray(t.attention) && t.attention.every((t) => e(t) && typeof t.text == "string" && typeof t.who == "string");
5
- //#endregion
6
5
  export { t as RUN_REPORTS_ENV, n as RUN_REPORT_PATH, r as RUN_REPORT_STEPS_MOST, i as RUN_REPORT_TEXT_MOST, c as RUN_STATUS_ENV, s as RUN_STATUS_PATH, a as isRunReport, u as isRunSnapshot, o as runReportProblems };
@@ -1,5 +1,5 @@
1
1
  import { isRecord as e } from "../helpers/isRecord.mjs";
2
- //#region src/runs/report.ts
2
+ // src/runs/report.ts
3
3
  var t = "/__plitzi/run/report", n = "PLITZI_RUN_REPORTS", r = 40, i = 2e3, a = (t) => e(t) && typeof t.element == "string" && t.element !== "" && (t.kind === "click" || t.kind === "type" && (typeof t.text == "string" || t.secret === !0)), o = (e) => typeof e == "number" && Number.isInteger(e) && e > 0, s = (t) => e(t) ? [
4
4
  ...typeof t.text == "string" && t.text.trim() !== "" ? [] : ["text: what is wrong, in words"],
5
5
  ...typeof t.text == "string" && t.text.length > 2e3 ? [`text: ${String(i)} characters at most`] : [],
@@ -13,5 +13,4 @@ var t = "/__plitzi/run/report", n = "PLITZI_RUN_REPORTS", r = 40, i = 2e3, a = (
13
13
  ...t.earlier === void 0 || typeof t.earlier == "number" && t.earlier > 0 ? [] : ["earlier: how many steps were left out"],
14
14
  ...typeof t.at == "string" && !Number.isNaN(Date.parse(t.at)) ? [] : ["at: when, ISO"]
15
15
  ] : ["a report is a JSON object"], c = (e) => s(e).length === 0;
16
- //#endregion
17
16
  export { n as RUN_REPORTS_ENV, t as RUN_REPORT_PATH, r as RUN_REPORT_STEPS_MOST, i as RUN_REPORT_TEXT_MOST, c as isRunReport, s as runReportProblems };
@@ -1,8 +1,7 @@
1
- //#region src/schema/anchor.ts
1
+ // src/schema/anchor.ts
2
2
  var e = /^[a-z][a-z0-9-]*$/, t = (t) => typeof t == "string" && e.test(t), n = (e) => e.normalize("NFKD").replace(/[̀-ͯ]/g, "").toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^[^a-z]+|-+$/g, "") || "section", r = (e, t) => {
3
3
  let r = n(e), i = r;
4
4
  for (let e = 2; t.has(i); e += 1) i = `${r}-${String(e)}`;
5
5
  return t.add(i), i;
6
6
  };
7
- //#endregion
8
7
  export { e as ANCHOR_PATTERN, n as anchorOf, t as isAnchor, r as uniqueAnchor };
@@ -1,18 +1,18 @@
1
- import { WITHHELD_ATTRIBUTE as e, mayReceive as t, pageAccessOf as n, pageAccessRefusal as r, pageWithheldOf as i, withheldPageOf as a, withholdPages as o } from "./pageAccess.mjs";
2
- import { elementFromWire as s, schemaFromWire as c, schemaToWire as l } from "./wire.mjs";
3
- import { ANCHOR_PATTERN as u, anchorOf as d, isAnchor as f, uniqueAnchor as p } from "./anchor.mjs";
4
- import { COMPONENT_PROPS_SOURCE as m, EMPTY_SCHEMA as h, VARIABLE_REGEX as g } from "./schemaConstants.mjs";
5
- import { findLayoutCycle as _, resolveLayoutChain as v } from "./layoutChain.mjs";
6
- import { RSC_FAILURE as y, collectServerElements as b, hasServerElements as x, jsonForScript as S, notFoundProvider as C, pageNotFound as w, pageSeoText as T, pageServerContext as E, pageStructuredData as D, rscFailureOf as O } from "./serverElements.mjs";
7
- import { isEmptyAnswer as k } from "./providerAnswer.mjs";
8
- import { isRuleGroup as A, serverProviderSource as j, serverWhenValues as M, whenOf as N, whenPaths as P, whenProviders as F, whenUnknownToServer as I } from "./providerWhen.mjs";
9
- import { browserServerInput as L, inputProviders as R, inputReadings as z, serverInputOf as B } from "./serverInput.mjs";
10
- import { serverQueryOf as V, serverQueryProblem as H } from "./serverQuery.mjs";
11
- import { DEFAULT_FAVICON as U, OG_TYPES as W, absoluteAddress as G, isHeadAddress as K, isOgType as q, pageHeadTags as J, spaceIdentity as Y, spaceIdentityProblems as X } from "./pageHead.mjs";
12
- import { SCHEMA_SETTINGS as Z, isSchemaSetting as Q } from "./schemaSettings.mjs";
13
- import { isSnippet as $ } from "./snippet.mjs";
14
- import { MOTION_DEFAULT_DURATION as ee, MOTION_EASING_KEYWORDS as te, MOTION_ENTERS as ne, MOTION_ENTER_EASING as re, MOTION_ENTER_FRAMES as ie, MOTION_ENTER_FROM as ae, MOTION_ENTER_TRAVEL as oe, MOTION_LOOPS as se, MOTION_LOOP_FRAMES as ce, MOTION_MAX_DISTANCE as le, MOTION_MAX_MS as ue, MOTION_PLAY_CSS as de, MOTION_SEEN_ATTRIBUTE as fe, MOTION_SEEN_CSS as pe, MOTION_STILL_CSS as me, MOTION_TRAVEL_PROPERTY as he, MOTION_TRIGGERS as ge, MOTION_VIEW_SELECTOR as _e, MOVING_SELECTOR as ve, isMotion as ye, isMotionAnimation as be, isMotionEasing as xe, motionAttributes as Se, motionProblems as Ce, travelled as we } from "./motion.mjs";
15
- import { revealOnView as Te } from "./motionReveal.mjs";
16
- import { pageElementTypes as Ee } from "./pageElements.mjs";
17
- import { headingText as De, markdownHeadings as Oe } from "./markdownHeadings.mjs";
18
- export { u as ANCHOR_PATTERN, m as COMPONENT_PROPS_SOURCE, U as DEFAULT_FAVICON, h as EMPTY_SCHEMA, ee as MOTION_DEFAULT_DURATION, te as MOTION_EASING_KEYWORDS, ne as MOTION_ENTERS, re as MOTION_ENTER_EASING, ie as MOTION_ENTER_FRAMES, ae as MOTION_ENTER_FROM, oe as MOTION_ENTER_TRAVEL, se as MOTION_LOOPS, ce as MOTION_LOOP_FRAMES, le as MOTION_MAX_DISTANCE, ue as MOTION_MAX_MS, de as MOTION_PLAY_CSS, fe as MOTION_SEEN_ATTRIBUTE, pe as MOTION_SEEN_CSS, me as MOTION_STILL_CSS, he as MOTION_TRAVEL_PROPERTY, ge as MOTION_TRIGGERS, _e as MOTION_VIEW_SELECTOR, ve as MOVING_SELECTOR, W as OG_TYPES, y as RSC_FAILURE, Z as SCHEMA_SETTINGS, g as VARIABLE_REGEX, e as WITHHELD_ATTRIBUTE, G as absoluteAddress, d as anchorOf, L as browserServerInput, b as collectServerElements, s as elementFromWire, _ as findLayoutCycle, x as hasServerElements, De as headingText, R as inputProviders, z as inputReadings, f as isAnchor, k as isEmptyAnswer, K as isHeadAddress, ye as isMotion, be as isMotionAnimation, xe as isMotionEasing, q as isOgType, A as isRuleGroup, Q as isSchemaSetting, $ as isSnippet, S as jsonForScript, Oe as markdownHeadings, t as mayReceive, Se as motionAttributes, Ce as motionProblems, C as notFoundProvider, n as pageAccessOf, r as pageAccessRefusal, Ee as pageElementTypes, J as pageHeadTags, w as pageNotFound, T as pageSeoText, E as pageServerContext, D as pageStructuredData, i as pageWithheldOf, v as resolveLayoutChain, Te as revealOnView, O as rscFailureOf, c as schemaFromWire, l as schemaToWire, B as serverInputOf, j as serverProviderSource, V as serverQueryOf, H as serverQueryProblem, M as serverWhenValues, Y as spaceIdentity, X as spaceIdentityProblems, we as travelled, p as uniqueAnchor, N as whenOf, P as whenPaths, F as whenProviders, I as whenUnknownToServer, a as withheldPageOf, o as withholdPages };
1
+ import { ANCHOR_PATTERN as e, anchorOf as t, isAnchor as n, uniqueAnchor as r } from "./anchor.mjs";
2
+ import { COMPONENT_PROPS_SOURCE as i, EMPTY_SCHEMA as a, VARIABLE_REGEX as o } from "./schemaConstants.mjs";
3
+ import { findLayoutCycle as s, resolveLayoutChain as c } from "./layoutChain.mjs";
4
+ import { RSC_FAILURE as l, collectServerElements as u, hasServerElements as d, jsonForScript as f, notFoundProvider as p, pageNotFound as m, pageSeoText as h, pageServerContext as g, pageStructuredData as _, rscFailureOf as v } from "./serverElements.mjs";
5
+ import { isEmptyAnswer as y } from "./providerAnswer.mjs";
6
+ import { isRuleGroup as b, serverProviderSource as x, serverWhenValues as S, whenOf as C, whenPaths as w, whenProviders as T, whenUnknownToServer as E } from "./providerWhen.mjs";
7
+ import { browserServerInput as D, inputProviders as O, inputReadings as k, serverInputOf as A } from "./serverInput.mjs";
8
+ import { serverQueryOf as j, serverQueryProblem as M } from "./serverQuery.mjs";
9
+ import { DEFAULT_FAVICON as N, OG_TYPES as P, absoluteAddress as F, isHeadAddress as I, isOgType as L, pageHeadTags as R, spaceIdentity as z, spaceIdentityProblems as B } from "./pageHead.mjs";
10
+ import { SCHEMA_SETTINGS as V, isSchemaSetting as H } from "./schemaSettings.mjs";
11
+ import { isSnippet as U } from "./snippet.mjs";
12
+ import { MOTION_DEFAULT_DURATION as W, MOTION_EASING_KEYWORDS as G, MOTION_ENTERS as K, MOTION_ENTER_EASING as q, MOTION_ENTER_FRAMES as J, MOTION_ENTER_FROM as Y, MOTION_ENTER_TRAVEL as X, MOTION_LOOPS as Z, MOTION_LOOP_FRAMES as Q, MOTION_MAX_DISTANCE as $, MOTION_MAX_MS as ee, MOTION_PLAY_CSS as te, MOTION_SEEN_ATTRIBUTE as ne, MOTION_SEEN_CSS as re, MOTION_STILL_CSS as ie, MOTION_TRAVEL_PROPERTY as ae, MOTION_TRIGGERS as oe, MOTION_VIEW_SELECTOR as se, MOVING_SELECTOR as ce, isMotion as le, isMotionAnimation as ue, isMotionEasing as de, motionAttributes as fe, motionProblems as pe, travelled as me } from "./motion.mjs";
13
+ import { revealOnView as he } from "./motionReveal.mjs";
14
+ import { elementFromWire as ge, schemaFromWire as _e, schemaToWire as ve } from "./wire.mjs";
15
+ import { pageElementTypes as ye } from "./pageElements.mjs";
16
+ import { headingText as be, markdownHeadings as xe } from "./markdownHeadings.mjs";
17
+ import { NOT_FOUND_WHEN_REFUSED as Se, WITHHELD_ATTRIBUTE as Ce, mayReceive as we, notFoundWhenRefused as Te, pageAccessOf as Ee, pageAccessRefusal as De, pageWithheldOf as Oe, withheldPageOf as ke, withholdPages as Ae } from "./pageAccess.mjs";
18
+ export { e as ANCHOR_PATTERN, i as COMPONENT_PROPS_SOURCE, N as DEFAULT_FAVICON, a as EMPTY_SCHEMA, W as MOTION_DEFAULT_DURATION, G as MOTION_EASING_KEYWORDS, K as MOTION_ENTERS, q as MOTION_ENTER_EASING, J as MOTION_ENTER_FRAMES, Y as MOTION_ENTER_FROM, X as MOTION_ENTER_TRAVEL, Z as MOTION_LOOPS, Q as MOTION_LOOP_FRAMES, $ as MOTION_MAX_DISTANCE, ee as MOTION_MAX_MS, te as MOTION_PLAY_CSS, ne as MOTION_SEEN_ATTRIBUTE, re as MOTION_SEEN_CSS, ie as MOTION_STILL_CSS, ae as MOTION_TRAVEL_PROPERTY, oe as MOTION_TRIGGERS, se as MOTION_VIEW_SELECTOR, ce as MOVING_SELECTOR, Se as NOT_FOUND_WHEN_REFUSED, P as OG_TYPES, l as RSC_FAILURE, V as SCHEMA_SETTINGS, o as VARIABLE_REGEX, Ce as WITHHELD_ATTRIBUTE, F as absoluteAddress, t as anchorOf, D as browserServerInput, u as collectServerElements, ge as elementFromWire, s as findLayoutCycle, d as hasServerElements, be as headingText, O as inputProviders, k as inputReadings, n as isAnchor, y as isEmptyAnswer, I as isHeadAddress, le as isMotion, ue as isMotionAnimation, de as isMotionEasing, L as isOgType, b as isRuleGroup, H as isSchemaSetting, U as isSnippet, f as jsonForScript, xe as markdownHeadings, we as mayReceive, fe as motionAttributes, pe as motionProblems, p as notFoundProvider, Te as notFoundWhenRefused, Ee as pageAccessOf, De as pageAccessRefusal, ye as pageElementTypes, R as pageHeadTags, m as pageNotFound, h as pageSeoText, g as pageServerContext, _ as pageStructuredData, Oe as pageWithheldOf, c as resolveLayoutChain, he as revealOnView, v as rscFailureOf, _e as schemaFromWire, ve as schemaToWire, A as serverInputOf, x as serverProviderSource, j as serverQueryOf, M as serverQueryProblem, S as serverWhenValues, z as spaceIdentity, B as spaceIdentityProblems, me as travelled, r as uniqueAnchor, C as whenOf, w as whenPaths, T as whenProviders, E as whenUnknownToServer, ke as withheldPageOf, Ae as withholdPages };
@@ -1,4 +1,4 @@
1
- //#region src/schema/layoutChain.ts
1
+ // src/schema/layoutChain.ts
2
2
  var e = (e, t) => {
3
3
  let n = e?.attributes[t];
4
4
  return typeof n == "string" ? n : "";
@@ -21,5 +21,4 @@ var e = (e, t) => {
21
21
  }
22
22
  return [];
23
23
  };
24
- //#endregion
25
24
  export { n as findLayoutCycle, t as resolveLayoutChain };
@@ -1,5 +1,5 @@
1
1
  import { uniqueAnchor as e } from "./anchor.mjs";
2
- //#region src/schema/markdownHeadings.ts
2
+ // src/schema/markdownHeadings.ts
3
3
  var t = /^ {0,3}(`{3,}|~{3,})/, n = /^ {0,3}(#{1,6})[ \t]+(.*?)(?:[ \t]+#+)?[ \t]*$/, r = (e) => e.replace(/!\[[^\]]*\]\([^)]*\)/g, "").replace(/<[^>]+>/g, "").replace(/\[([^\]]*)\]\([^)]*\)/g, "$1").replace(/`+([^`]*?)`+/g, "$1").replace(/(\*\*|~~)(.+?)\1/g, "$2").replace(/\*(.+?)\*/g, "$1").replace(/\b__(.+?)__\b/g, "$1").replace(/\b_(.+?)_\b/g, "$1").replace(/\\([\\`*_{}[\]()#+\-.!|~>])/g, "$1").trim(), i = (i) => {
4
4
  let a = /* @__PURE__ */ new Set(), o = [], s;
5
5
  for (let c of i.split("\n")) {
@@ -20,5 +20,4 @@ var t = /^ {0,3}(`{3,}|~{3,})/, n = /^ {0,3}(#{1,6})[ \t]+(.*?)(?:[ \t]+#+)?[ \t
20
20
  }
21
21
  return o;
22
22
  };
23
- //#endregion
24
23
  export { r as headingText, i as markdownHeadings };
@@ -1,5 +1,5 @@
1
1
  import { isRecord as e } from "../helpers/isRecord.mjs";
2
- //#region src/schema/motion.ts
2
+ // src/schema/motion.ts
3
3
  var t = [
4
4
  "fade",
5
5
  "fade-up",
@@ -295,5 +295,4 @@ var t = [
295
295
  k,
296
296
  "[data-motion-on=\"scroll\"][data-motion-enter], [data-motion-on=\"scroll\"][data-motion-stagger] > * { animation-timeline: auto, auto !important; }"
297
297
  ].join("\n"), j = (e) => "animationName" in e && typeof e.animationName == "string" && e.animationName.startsWith("plitzi-motion-");
298
- //#endregion
299
298
  export { i as MOTION_DEFAULT_DURATION, o as MOTION_EASING_KEYWORDS, t as MOTION_ENTERS, a as MOTION_ENTER_EASING, h as MOTION_ENTER_FRAMES, g as MOTION_ENTER_FROM, d as MOTION_ENTER_TRAVEL, r as MOTION_LOOPS, v as MOTION_LOOP_FRAMES, f as MOTION_MAX_DISTANCE, y as MOTION_MAX_MS, A as MOTION_PLAY_CSS, D as MOTION_SEEN_ATTRIBUTE, k as MOTION_SEEN_CSS, E as MOTION_STILL_CSS, p as MOTION_TRAVEL_PROPERTY, n as MOTION_TRIGGERS, O as MOTION_VIEW_SELECTOR, T as MOVING_SELECTOR, C as isMotion, j as isMotionAnimation, u as isMotionEasing, w as motionAttributes, S as motionProblems, m as travelled };
@@ -1,5 +1,5 @@
1
1
  import { MOTION_SEEN_ATTRIBUTE as e, MOTION_VIEW_SELECTOR as t } from "./motion.mjs";
2
- //#region src/schema/motionReveal.ts
2
+ // src/schema/motionReveal.ts
3
3
  var n = `${t}:not([${e}])`, r = (t) => {
4
4
  let r = (t) => t.setAttribute(e, ""), i = (e) => [...e.matches(n) ? [e] : [], ...Array.from(e.querySelectorAll(n))];
5
5
  if (typeof Reflect.get(globalThis, "IntersectionObserver") != "function") return i(t).forEach(r), () => void 0;
@@ -19,5 +19,4 @@ var n = `${t}:not([${e}])`, r = (t) => {
19
19
  a.disconnect(), s.disconnect();
20
20
  };
21
21
  };
22
- //#endregion
23
22
  export { r as revealOnView };
@@ -13,6 +13,15 @@ import { Schema } from '../types';
13
13
  export type PageAccess = {
14
14
  permissions: string[];
15
15
  };
16
+ /**
17
+ * What a page answers whoever it is not for (`unauthorizedBehaviour`): its refusal when it says nothing — 401 or 403
18
+ * and `settings.withheldPage` —, `redirect` to `unauthorizedPageRedirect` (signed out), or `notFound`: as if it did not
19
+ * exist — the space's 404 — and nothing of it is sent, not even its name or its path, because a refusal tells whoever
20
+ * probes a path that something is there (a back-office).
21
+ */
22
+ export declare const NOT_FOUND_WHEN_REFUSED = "notFound";
23
+ /** Whether a page answers as if it did not exist to whoever it is not for. */
24
+ export declare const notFoundWhenRefused: (attributes: Record<string, unknown> | undefined) => boolean;
16
25
  /** A page's access, when its attributes declare one — at least one permission, each a name — or nothing. */
17
26
  export declare const pageAccessOf: (attributes: Record<string, unknown> | undefined) => PageAccess | undefined;
18
27
  /** Why this visitor may not see a page that declares `access`, or nothing when they may — or when it declares none. */
@@ -1,59 +1,65 @@
1
1
  import { accessRefusal as e } from "../actions/access.mjs";
2
- //#region src/schema/pageAccess.ts
3
- var t = (e) => {
2
+ // src/schema/pageAccess.ts
3
+ var t = "notFound", n = (e) => e?.unauthorizedBehaviour === t, r = (e) => {
4
4
  let t = e?.access;
5
5
  if (typeof t != "object" || !t || !("permissions" in t)) return;
6
6
  let { permissions: n } = t;
7
7
  if (!Array.isArray(n)) return;
8
8
  let r = n.filter((e) => typeof e == "string" && e !== "");
9
9
  return r.length > 0 ? { permissions: r } : void 0;
10
- }, n = (t, n) => t ? e({
10
+ }, i = (t, n) => t ? e({
11
11
  mode: "role",
12
12
  permissions: t.permissions
13
- }, n) : void 0, r = "withheld", i = (e) => {
14
- let t = e?.[r];
13
+ }, n) : void 0, a = "withheld", o = (e) => {
14
+ let t = e?.[a];
15
15
  return t === "unauthenticated" || t === "forbidden" ? t : void 0;
16
- }, a = (e) => {
17
- let n = e.settings?.withheldPage;
18
- if (n === void 0 || !e.pages?.includes(n)) return;
19
- let r = e.flat[n];
20
- return r && !t(r.attributes) ? n : void 0;
21
- }, o = (e, i) => {
16
+ }, s = (e) => {
17
+ let t = e.settings?.withheldPage;
18
+ if (t === void 0 || !e.pages?.includes(t)) return;
19
+ let n = e.flat[t];
20
+ return n && !r(n.attributes) ? t : void 0;
21
+ }, c = (e, t) => {
22
22
  let a = /* @__PURE__ */ new Map(), o = [];
23
- for (let r of e.pages) {
24
- let s = t(e.flat[r]?.attributes);
25
- if (!s) continue;
26
- let c = n(s, i);
27
- c ? a.set(r, c) : o.push(s);
23
+ for (let s of e.pages) {
24
+ let c = e.flat[s]?.attributes, l = n(c), u = r(c) ?? (l && c?.accessLevel === "authenticated" ? { permissions: [] } : void 0);
25
+ if (!u) continue;
26
+ let d = i(u, t);
27
+ d ? a.set(s, l ? "hidden" : d) : o.push(u);
28
28
  }
29
- if (a.size === 0) return {
29
+ return a.size === 0 ? {
30
30
  schema: e,
31
31
  withheld: [],
32
32
  kept: o
33
+ } : {
34
+ schema: d(e, a),
35
+ withheld: [...a.keys()],
36
+ kept: o
33
37
  };
34
- let s = {};
35
- for (let [t, n] of Object.entries(e.flat)) {
36
- let e = a.get(t);
37
- e ? s[t] = {
38
- ...n,
38
+ }, l = /* @__PURE__ */ new WeakMap(), u = 16, d = (e, t) => {
39
+ let n = [...t].map(([e, t]) => `${e}:${t}`).join("\n"), r = l.get(e) ?? /* @__PURE__ */ new Map();
40
+ l.set(e, r);
41
+ let i = r.get(n);
42
+ if (i) return i;
43
+ let o = {};
44
+ for (let [n, r] of Object.entries(e.flat)) {
45
+ let e = t.get(n);
46
+ e !== "hidden" && (e ? o[n] = {
47
+ ...r,
39
48
  attributes: {
40
- ...n.attributes,
41
- [r]: e
49
+ ...r.attributes,
50
+ [a]: e
42
51
  },
43
52
  definition: {
44
- ...n.definition,
53
+ ...r.definition,
45
54
  items: []
46
55
  }
47
- } : t !== n.definition.rootId && a.has(n.definition.rootId) || (s[t] = n);
56
+ } : n !== r.definition.rootId && t.has(r.definition.rootId) || (o[n] = r));
48
57
  }
49
- return {
50
- schema: {
51
- ...e,
52
- flat: s
53
- },
54
- withheld: [...a.keys()],
55
- kept: o
58
+ let s = [...t].filter(([, e]) => e === "hidden").map(([e]) => e), c = {
59
+ ...e,
60
+ flat: o,
61
+ ...s.length > 0 ? { pages: e.pages.filter((e) => !s.includes(e)) } : {}
56
62
  };
57
- }, s = (e, t) => e.every((e) => n(e, t) === void 0);
58
- //#endregion
59
- export { r as WITHHELD_ATTRIBUTE, s as mayReceive, t as pageAccessOf, n as pageAccessRefusal, i as pageWithheldOf, a as withheldPageOf, o as withholdPages };
63
+ return r.size >= u && r.delete(r.keys().next().value ?? ""), r.set(n, c), c;
64
+ }, f = (e, t) => e.every((e) => i(e, t) === void 0);
65
+ export { t as NOT_FOUND_WHEN_REFUSED, a as WITHHELD_ATTRIBUTE, f as mayReceive, n as notFoundWhenRefused, r as pageAccessOf, i as pageAccessRefusal, o as pageWithheldOf, s as withheldPageOf, c as withholdPages };
@@ -8,5 +8,7 @@ import { Schema } from '../types';
8
8
  * every shell around it, into every component an instance names and every element a reference copies, and it counts
9
9
  * what a flag or a visibility binding might hide: those are decided as the page renders, and may change while it is
10
10
  * open. A `custom` element counts as the plugin it names (`renderType`), which is what it renders.
11
+ *
12
+ * Kept per schema object and page: the server asks it on every render of the same space.
11
13
  */
12
- export declare const pageElementTypes: (schema: Schema, pageId: string) => Set<string>;
14
+ export declare const pageElementTypes: (schema: Schema, pageId: string) => ReadonlySet<string>;
@@ -1,5 +1,5 @@
1
1
  import { resolveLayoutChain as e } from "./layoutChain.mjs";
2
- //#region src/schema/pageElements.ts
2
+ // src/schema/pageElements.ts
3
3
  var t = (e) => typeof e == "string" ? e : "", n = (n, r) => {
4
4
  let i = /* @__PURE__ */ new Set(), a = n.flat[r];
5
5
  if (!a) return i;
@@ -36,6 +36,12 @@ var t = (e) => typeof e == "string" ? e : "", n = (n, r) => {
36
36
  })));
37
37
  }
38
38
  return i;
39
+ }, r = /* @__PURE__ */ new WeakMap(), i = (e, t) => {
40
+ let i = r.get(e) ?? /* @__PURE__ */ new Map();
41
+ r.set(e, i);
42
+ let a = i.get(t);
43
+ if (a) return a;
44
+ let o = n(e, t);
45
+ return i.set(t, o), o;
39
46
  };
40
- //#endregion
41
- export { n as pageElementTypes };
47
+ export { i as pageElementTypes };
@@ -51,8 +51,11 @@ export declare const absoluteAddress: (value: string, origin: string) => string;
51
51
  * shows them as they are typed. None when they are right.
52
52
  */
53
53
  export declare const spaceIdentityProblems: (settings: SpaceIdentity) => string[];
54
- /** Plitzi's own icon: the tab of a space that names none. */
55
- export declare const DEFAULT_FAVICON = "https://cdn.plitzi.com/resources/img/favicon.svg";
54
+ /**
55
+ * Plitzi's own icon: the tab of a space that names none — on the page's own origin, where its server answers it
56
+ * (sdk-server's `defaultFaviconStage`): asked of another site, the browser sent that site's cookies with it.
57
+ */
58
+ export declare const DEFAULT_FAVICON = "/_plitzi/favicon.svg";
56
59
  /**
57
60
  * Every tag a page's head carries besides its title and its JSON-LD: its description, its robots, its Open Graph and
58
61
  * card — the title, the description, the picture and its words, the kind, the site, the language, the page's own
@@ -1,5 +1,5 @@
1
1
  import { isRecord as e } from "../helpers/isRecord.mjs";
2
- //#region src/schema/pageHead.ts
2
+ // src/schema/pageHead.ts
3
3
  var t = [
4
4
  "website",
5
5
  "article",
@@ -19,7 +19,7 @@ var t = [
19
19
  for (let [e, t] of [["favicon", c], ["shareImage", l]]) t !== void 0 && !s(t) && n.push(`${e} "${t}" is neither a file of the site nor an address: \`/${e === "favicon" ? "favicon.svg" : "og.png"}\` (in public/), or \`https://…\`.`);
20
20
  let d = u === void 0 ? [] : typeof u == "string" ? [["themeColor", u]] : Object.entries(u).map(([e, t]) => [`themeColor.${e}`, t]);
21
21
  e(u) && Object.keys(u).some((e) => e !== "light" && e !== "dark") && n.push("themeColor is one colour, or one a scheme: `{ light: \"#ffffff\", dark: \"#09090b\" }`.");
22
- for (let [e, t] of d) (typeof t != "string" || !o.test(t.trim())) && n.push(`${e} ${JSON.stringify(t)} is no colour a browser reads here: \`#ff6a3d\`, \`oklch(…)\`.`);
22
+ for (let [e, t] of d) typeof t == "string" && o.test(t.trim()) || n.push(`${e} ${JSON.stringify(t)} is no colour a browser reads here: \`#ff6a3d\`, \`oklch(…)\`.`);
23
23
  return n;
24
24
  }, d = (e) => {
25
25
  let t = e.split(/[?#]/)[0] ?? "";
@@ -29,7 +29,7 @@ var t = [
29
29
  ico: "image/x-icon",
30
30
  webp: "image/webp"
31
31
  }[t.slice(t.lastIndexOf(".") + 1).toLowerCase()];
32
- }, f = "https://cdn.plitzi.com/resources/img/favicon.svg", p = (e, t, n) => {
32
+ }, f = "/_plitzi/favicon.svg", p = (e, t, n) => {
33
33
  let i = /^https?:\/\/[^/]+/.exec(n)?.[0] ?? "", a = e.image ?? t.shareImage, o = a && s(a) ? c(a, i) : void 0, u = [], p = (e, t, n, r) => {
34
34
  n !== void 0 && n.trim() !== "" && u.push({
35
35
  attribute: e,
@@ -64,5 +64,4 @@ var t = [
64
64
  ...a === void 0 ? {} : { themeColor: a }
65
65
  };
66
66
  };
67
- //#endregion
68
67
  export { f as DEFAULT_FAVICON, t as OG_TYPES, c as absoluteAddress, s as isHeadAddress, n as isOgType, p as pageHeadTags, m as spaceIdentity, u as spaceIdentityProblems };
@@ -1,4 +1,3 @@
1
- //#region src/schema/providerAnswer.ts
1
+ // src/schema/providerAnswer.ts
2
2
  var e = (e) => e == null || e === "" || Array.isArray(e) && e.length === 0 || typeof e == "object" && !Array.isArray(e) && Object.keys(e).length === 0, t = (t, n, r) => r ? t.record === void 0 : Array.isArray(t.records) ? n.length === 0 : e(t.data);
3
- //#endregion
4
3
  export { t as isEmptyAnswer };
@@ -1,4 +1,4 @@
1
- import { RuleGroup, RuleValue } from '../helpers/ruleEvaluator';
1
+ import { RuleGroup, RuleValue } from '../conditions';
2
2
  import { Element, SSRUser } from '../types';
3
3
  /**
4
4
  * A provider's `when`: the rule group it waits on before it asks — read the same way by the browser, which waits on it,
@@ -1,9 +1,9 @@
1
- import { isRecord as e } from "../helpers/isRecord.mjs";
1
+ import { isEmptyAnswer as e } from "./providerAnswer.mjs";
2
2
  import { GLOBAL_SOURCES as t } from "../dataSource/globalSources.mjs";
3
3
  import n from "../dataSource/helpers/getSourceName.mjs";
4
- import { isEmptyAnswer as r } from "./providerAnswer.mjs";
5
- //#region src/schema/providerWhen.ts
6
- var i = (t) => e(t) && (t.combinator === "and" || t.combinator === "or") && Array.isArray(t.rules) && t.rules.every((t) => i(t) || e(t) && typeof t.field == "string" && typeof t.operator == "string"), a = (e) => {
4
+ import { isRecord as r } from "../helpers/isRecord.mjs";
5
+ // src/schema/providerWhen.ts
6
+ var i = (e) => r(e) && (e.combinator === "and" || e.combinator === "or") && Array.isArray(e.rules) && e.rules.every((e) => i(e) || r(e) && typeof e.field == "string" && typeof e.operator == "string"), a = (e) => {
7
7
  let { when: t } = e.attributes;
8
8
  return i(t) && t.rules.length > 0 && t.enabled !== !1 ? t : void 0;
9
9
  }, o = (e) => e.rules.flatMap((e) => "rules" in e ? o(e) : [e.field, ...e.isBinding && typeof e.value == "string" ? [e.value] : []]), s = "apiContainer", c = ["navigation", "auth"], l = (e, r, i) => {
@@ -16,7 +16,7 @@ var i = (t) => e(t) && (t.combinator === "and" || t.combinator === "or") && Arra
16
16
  let [n] = e.split("."), r = n.startsWith(`${s}_`) ? n.slice(s.length + 1) : void 0;
17
17
  return r !== void 0 && t.has(r) ? [r] : [];
18
18
  }))], f = (t, n) => {
19
- if (!e(t)) return {
19
+ if (!r(t)) return {
20
20
  isLoading: !1,
21
21
  isEmpty: !0,
22
22
  hasError: !0,
@@ -26,7 +26,7 @@ var i = (t) => e(t) && (t.combinator === "and" || t.combinator === "or") && Arra
26
26
  return {
27
27
  ...t,
28
28
  isLoading: !1,
29
- isEmpty: r(t, i, n),
29
+ isEmpty: e(t, i, n),
30
30
  hasError: !1,
31
31
  isStale: !1
32
32
  };
@@ -54,5 +54,4 @@ var i = (t) => e(t) && (t.combinator === "and" || t.combinator === "or") && Arra
54
54
  },
55
55
  ...Object.fromEntries(Object.entries(a).map(([e, { answer: t, singleRecord: r }]) => [n(s, e), f(t, r)]))
56
56
  });
57
- //#endregion
58
57
  export { i as isRuleGroup, f as serverProviderSource, p as serverWhenValues, a as whenOf, o as whenPaths, d as whenProviders, u as whenUnknownToServer };
@@ -1,4 +1,3 @@
1
- import { sharedContext as e } from "../../helpers/sharedContext.mjs";
1
+ import { sharedContext as e } from "../../react/sharedContext.mjs";
2
2
  var t = e("SchemaContext", { definition: { rootId: "" } });
3
- //#endregion
4
3
  export { t as default };
@@ -1,5 +1,5 @@
1
1
  import { EMPTY_STYLE_SCHEMA as e } from "../style/styleConstants.mjs";
2
- //#region src/schema/schemaConstants.ts
2
+ // src/schema/schemaConstants.ts
3
3
  var t = /var\(\s*--([a-zA-Z0-9_-]+)\s*\)|\{\{\s*([a-zA-Z0-9_-]+)\s*\}\}/, n = "props", r = {
4
4
  schema: {
5
5
  definition: {
@@ -16,5 +16,4 @@ var t = /var\(\s*--([a-zA-Z0-9_-]+)\s*\)|\{\{\s*([a-zA-Z0-9_-]+)\s*\}\}/, n = "p
16
16
  style: e,
17
17
  definition: { rootId: "" }
18
18
  };
19
- //#endregion
20
19
  export { n as COMPONENT_PROPS_SOURCE, r as EMPTY_SCHEMA, t as VARIABLE_REGEX };
@@ -4,7 +4,7 @@ import { Schema } from '../types';
4
4
  * builder writes (`SCHEMA_UPDATE_SETTINGS`) and the reader of a space keeps. A key outside it is one nothing reads any
5
5
  * more — `head`, from before a space declared its fonts.
6
6
  */
7
- export declare const SCHEMA_SETTINGS: readonly ["keepState", "stateStorage", "transientState", "keptState", "paintedState", "robotsTxt", "blockAiCrawlers", "viewTransitions", "siteName", "language", "favicon", "shareImage", "themeColor", "customCss", "withheldPage", "visitorRoles", "userProvider", "tokenStorage", "loginUrl", "userUrl", "refreshUrl", "logoutUrl", "revokeUrl", "detailsPath", "tokenPath", "refreshTokenPath", "expirationTimePath", "refreshExpirationTimePath", "sessionHintCookie", "sessionExchangeUrl", "mfaUrl", "sessionGate", "sessionRevalidateSeconds", "debugMode", "computed", "channels"];
7
+ export declare const SCHEMA_SETTINGS: readonly ["keepState", "stateStorage", "transientState", "keptState", "paintedState", "browserState", "robotsTxt", "blockAiCrawlers", "viewTransitions", "siteName", "language", "favicon", "shareImage", "themeColor", "customCss", "withheldPage", "visitorRoles", "userProvider", "tokenStorage", "loginUrl", "userUrl", "refreshUrl", "logoutUrl", "revokeUrl", "detailsPath", "tokenPath", "refreshTokenPath", "expirationTimePath", "refreshExpirationTimePath", "sessionHintCookie", "sessionExchangeUrl", "mfaUrl", "sessionGate", "sessionRevalidateSeconds", "debugMode", "computed", "channels"];
8
8
  /** Whether a key is a setting a space may carry: one the builder may write, though the space has no value for it yet. */
9
9
  export declare const isSchemaSetting: (key: string) => key is (typeof SCHEMA_SETTINGS)[number];
10
10
  /**
@@ -1,4 +1,3 @@
1
- //#region src/schema/schemaSettings.ts
2
- var e = /* @__PURE__ */ "keepState.stateStorage.transientState.keptState.paintedState.robotsTxt.blockAiCrawlers.viewTransitions.siteName.language.favicon.shareImage.themeColor.customCss.withheldPage.visitorRoles.userProvider.tokenStorage.loginUrl.userUrl.refreshUrl.logoutUrl.revokeUrl.detailsPath.tokenPath.refreshTokenPath.expirationTimePath.refreshExpirationTimePath.sessionHintCookie.sessionExchangeUrl.mfaUrl.sessionGate.sessionRevalidateSeconds.debugMode.computed.channels".split("."), t = new Set(e), n = (e) => t.has(e);
3
- //#endregion
1
+ // src/schema/schemaSettings.ts
2
+ var e = /* @__PURE__ */ "keepState.stateStorage.transientState.keptState.paintedState.browserState.robotsTxt.blockAiCrawlers.viewTransitions.siteName.language.favicon.shareImage.themeColor.customCss.withheldPage.visitorRoles.userProvider.tokenStorage.loginUrl.userUrl.refreshUrl.logoutUrl.revokeUrl.detailsPath.tokenPath.refreshTokenPath.expirationTimePath.refreshExpirationTimePath.sessionHintCookie.sessionExchangeUrl.mfaUrl.sessionGate.sessionRevalidateSeconds.debugMode.computed.channels".split("."), t = new Set(e), n = (e) => t.has(e);
4
3
  export { e as SCHEMA_SETTINGS, n as isSchemaSetting };
@@ -1,28 +1,4 @@
1
1
  import { Element, Schema } from '../types';
2
- /**
3
- * Which elements of a page want data from the server — the one definition of it, because both sides of RSC have to
4
- * agree on the answer. The rendering server asks before calling its `getRscData` adapter, and the client asks before
5
- * spending a request on `/_rsc`: a page whose subtree holds no `runtime: 'server'` element has nobody to give a
6
- * payload to, so resolving one costs an API call, a connector read or a round trip that nothing will ever read.
7
- *
8
- * Page-scoped and not schema-scoped on purpose. A space is normally a mix — one page backed by a CMS, the next one
9
- * static — and the whole point is that rendering the static one must not pay for the other one's providers.
10
- *
11
- * The walk is iterative to stay safe on deeply nested schemas, and follows `definition.items`, so a server element
12
- * nested under any number of plain containers is still found.
13
- *
14
- * **It starts from the page AND every shell around it.** A layout is rendered with the page — its sidebar, its header
15
- * — so a server element that lives in one is on this page as far as the visitor can tell. Walked from the page alone,
16
- * a provider in the dashboard's sidebar was never resolved: the payload came back empty, the element rendered with
17
- * nothing, and no layer reported it.
18
- *
19
- * A page withheld from its visitor holds nothing of its own; the page the space draws in its place
20
- * (`settings.withheldPage`) is walked instead, as its body.
21
- */
22
- /**
23
- * Given the flags as they resolved, an element gated off by one is skipped with its whole subtree — it will not be
24
- * rendered, so nothing in it wants data, and resolving it would put a feature that is off into the payload anyway.
25
- */
26
2
  export declare const collectServerElements: (schema: Pick<Schema, "flat"> & Partial<Pick<Schema, "pages" | "settings">>, pageId: string | undefined, ids?: string[], flags?: Record<string, boolean>) => Element[];
27
3
  /** Whether anything on this page consumes server data at all — the question both RSC gates actually ask. */
28
4
  export declare const hasServerElements: (schema: Schema, pageId: string | undefined, flags?: Record<string, boolean>) => boolean;