@plitzi/sdk-shared 0.37.1 → 0.37.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (195) hide show
  1. package/CHANGELOG.md +1288 -0
  2. package/dist/actions/access.d.ts +12 -0
  3. package/dist/actions/access.mjs +13 -0
  4. package/dist/actions/cron.d.ts +21 -12
  5. package/dist/actions/cron.mjs +48 -17
  6. package/dist/actions/functions.d.ts +27 -0
  7. package/dist/actions/functions.mjs +18 -0
  8. package/dist/actions/index.d.ts +5 -1
  9. package/dist/actions/index.mjs +9 -7
  10. package/dist/actions/triggers.d.ts +4 -0
  11. package/dist/actions/triggers.mjs +4 -1
  12. package/dist/auth/index.d.ts +2 -0
  13. package/dist/auth/index.mjs +2 -1
  14. package/dist/auth/visitorRoles.d.ts +27 -0
  15. package/dist/auth/visitorRoles.mjs +48 -0
  16. package/dist/authoring/builder.mjs +1 -0
  17. package/dist/authoring/declare.d.ts +74 -0
  18. package/dist/authoring/declare.mjs +2 -2
  19. package/dist/authoring/index.mjs +5 -5
  20. package/dist/authoring/paramSpec.d.ts +1 -1
  21. package/dist/authoring/paramSpec.mjs +1 -0
  22. package/dist/authoring/spaceCallbacks.mjs +2 -2
  23. package/dist/dataSource/computed.d.ts +21 -0
  24. package/dist/dataSource/computed.mjs +45 -0
  25. package/dist/dataSource/getBindingsDetails.mjs +35 -33
  26. package/dist/dataSource/index.d.ts +1 -0
  27. package/dist/dataSource/index.mjs +7 -6
  28. package/dist/dataSource/utility/checkboxParams.d.ts +11 -0
  29. package/dist/dataSource/utility/checkboxParams.mjs +12 -0
  30. package/dist/dataSource/utility/not.mjs +4 -7
  31. package/dist/dataSource/utility/stringToArray.mjs +1 -1
  32. package/dist/dataSource/utility/truthiness.d.ts +1 -0
  33. package/dist/dataSource/utility/truthiness.mjs +8 -0
  34. package/dist/dataSource/utility/twigTemplate.d.ts +2 -1
  35. package/dist/dataSource/utility/twigTemplate.mjs +29 -17
  36. package/dist/devTools/utils/PlitziConsole.mjs +22 -22
  37. package/dist/helpers/cookies.d.ts +10 -0
  38. package/dist/helpers/cookies.mjs +19 -0
  39. package/dist/helpers/fetchManifest.d.ts +9 -0
  40. package/dist/helpers/fetchManifest.mjs +3 -6
  41. package/dist/helpers/formatDate.d.ts +5 -3
  42. package/dist/helpers/formatDate.mjs +34 -36
  43. package/dist/helpers/index.d.ts +2 -0
  44. package/dist/helpers/index.mjs +18 -13
  45. package/dist/helpers/isDate.d.ts +7 -0
  46. package/dist/helpers/isDate.mjs +15 -0
  47. package/dist/helpers/keys.d.ts +42 -0
  48. package/dist/helpers/keys.mjs +91 -0
  49. package/dist/helpers/twigWrapper/AST.d.ts +2 -2
  50. package/dist/helpers/twigWrapper/Evaluator/Evaluator.d.ts +12 -2
  51. package/dist/helpers/twigWrapper/Evaluator/Evaluator.mjs +69 -31
  52. package/dist/helpers/twigWrapper/Evaluator/index.d.ts +1 -1
  53. package/dist/helpers/twigWrapper/Evaluator/index.mjs +2 -2
  54. package/dist/helpers/twigWrapper/Parser/ExpressionParser.d.ts +2 -2
  55. package/dist/helpers/twigWrapper/Parser/ExpressionParser.mjs +147 -34
  56. package/dist/helpers/twigWrapper/Parser/Parser.d.ts +2 -1
  57. package/dist/helpers/twigWrapper/Parser/Parser.mjs +21 -20
  58. package/dist/helpers/twigWrapper/filters/filters.mjs +134 -111
  59. package/dist/helpers/twigWrapper/index.d.ts +6 -2
  60. package/dist/helpers/twigWrapper/index.mjs +7 -4
  61. package/dist/helpers/twigWrapper/inspectTemplate.d.ts +23 -0
  62. package/dist/helpers/twigWrapper/inspectTemplate.mjs +110 -0
  63. package/dist/helpers/twigWrapper/processTwig/helpers.d.ts +7 -0
  64. package/dist/helpers/twigWrapper/processTwig/helpers.mjs +2 -1
  65. package/dist/helpers/twigWrapper/processTwig/index.d.ts +2 -1
  66. package/dist/helpers/twigWrapper/processTwig/index.mjs +3 -2
  67. package/dist/helpers/twigWrapper/processTwig/processTwig.d.ts +28 -0
  68. package/dist/helpers/twigWrapper/processTwig/processTwig.mjs +73 -16
  69. package/dist/helpers/twigWrapper/processTwig/resolveStepParam.d.ts +17 -0
  70. package/dist/helpers/twigWrapper/processTwig/resolveStepParam.mjs +14 -0
  71. package/dist/helpers/twigWrapper/templateRoots.d.ts +11 -0
  72. package/dist/helpers/twigWrapper/templateRoots.mjs +4 -4
  73. package/dist/helpers/twigWrapper/tokens/hasTemplateSyntax.d.ts +9 -0
  74. package/dist/helpers/twigWrapper/tokens/hasTemplateSyntax.mjs +4 -0
  75. package/dist/history/describe.d.ts +29 -0
  76. package/dist/history/describe.mjs +93 -0
  77. package/dist/history/diff.d.ts +33 -0
  78. package/dist/history/diff.mjs +73 -0
  79. package/dist/history/index.d.ts +3 -0
  80. package/dist/history/index.mjs +3 -0
  81. package/dist/history/types.d.ts +48 -0
  82. package/dist/history/types.mjs +0 -0
  83. package/dist/hooks/usePlitziServiceContext.d.ts +1 -1
  84. package/dist/index.d.ts +1 -0
  85. package/dist/index.mjs +77 -65
  86. package/dist/navigation/index.d.ts +1 -1
  87. package/dist/navigation/index.mjs +2 -2
  88. package/dist/navigation/routes.d.ts +11 -1
  89. package/dist/navigation/routes.mjs +35 -30
  90. package/dist/network/graphql/builder/Mutations/Space/SpaceFixIssuesMutation.d.ts +14 -0
  91. package/dist/network/graphql/builder/Mutations/Space/SpaceFixIssuesMutation.mjs +16 -0
  92. package/dist/network/graphql/builder/Mutations/Space/SpaceUpdatePluginMutation.d.ts +4 -0
  93. package/dist/network/graphql/builder/Mutations/Space/SpaceUpdatePluginMutation.mjs +2 -2
  94. package/dist/network/graphql/builder/Mutations/Space/actions/SpaceRunActionMutation.mjs +1 -0
  95. package/dist/network/graphql/builder/Mutations/Space/functions/SpaceRemoveFunctionsMutation.d.ts +3 -0
  96. package/dist/network/graphql/builder/Mutations/Space/functions/SpaceRemoveFunctionsMutation.mjs +9 -0
  97. package/dist/network/graphql/builder/Mutations/Space/functions/SpaceSaveFunctionsMutation.d.ts +11 -0
  98. package/dist/network/graphql/builder/Mutations/Space/functions/SpaceSaveFunctionsMutation.mjs +24 -0
  99. package/dist/network/graphql/builder/Mutations/Space/functions/SpaceTryFunctionMutation.d.ts +4 -0
  100. package/dist/network/graphql/builder/Mutations/Space/functions/SpaceTryFunctionMutation.mjs +15 -0
  101. package/dist/network/graphql/builder/Mutations/Space/runtime/SpaceRemoveRuntimeMutation.d.ts +2 -0
  102. package/dist/network/graphql/builder/Mutations/Space/runtime/SpaceRemoveRuntimeMutation.mjs +9 -0
  103. package/dist/network/graphql/builder/Mutations/Space/runtime/SpaceRemoveRuntimeVariableMutation.d.ts +2 -0
  104. package/dist/network/graphql/builder/Mutations/Space/runtime/SpaceRemoveRuntimeVariableMutation.mjs +9 -0
  105. package/dist/network/graphql/builder/Mutations/Space/runtime/SpaceSetRuntimeSizeMutation.d.ts +2 -0
  106. package/dist/network/graphql/builder/Mutations/Space/runtime/SpaceSetRuntimeSizeMutation.mjs +9 -0
  107. package/dist/network/graphql/builder/Mutations/Space/runtime/SpaceSetRuntimeVariableMutation.d.ts +2 -0
  108. package/dist/network/graphql/builder/Mutations/Space/runtime/SpaceSetRuntimeVariableMutation.mjs +9 -0
  109. package/dist/network/graphql/builder/Mutations/Space/runtime/SpaceStartRuntimeMutation.d.ts +2 -0
  110. package/dist/network/graphql/builder/Mutations/Space/runtime/SpaceStartRuntimeMutation.mjs +9 -0
  111. package/dist/network/graphql/builder/Mutations/Space/runtime/SpaceStopRuntimeMutation.d.ts +2 -0
  112. package/dist/network/graphql/builder/Mutations/Space/runtime/SpaceStopRuntimeMutation.mjs +9 -0
  113. package/dist/network/graphql/builder/Mutations/Space/visitors/SpaceAddVisitorMutation.d.ts +2 -0
  114. package/dist/network/graphql/builder/Mutations/Space/visitors/SpaceAddVisitorMutation.mjs +11 -0
  115. package/dist/network/graphql/builder/Mutations/Space/visitors/SpaceRemoveVisitorMutation.d.ts +2 -0
  116. package/dist/network/graphql/builder/Mutations/Space/visitors/SpaceRemoveVisitorMutation.mjs +11 -0
  117. package/dist/network/graphql/builder/Mutations/index.d.ts +28 -0
  118. package/dist/network/graphql/builder/Mutations/index.mjs +108 -84
  119. package/dist/network/graphql/builder/Queries/Space/SpaceChangesQuery.d.ts +23 -0
  120. package/dist/network/graphql/builder/Queries/Space/SpaceChangesQuery.mjs +49 -0
  121. package/dist/network/graphql/builder/Queries/Space/SpaceFunctionsQuery.d.ts +6 -0
  122. package/dist/network/graphql/builder/Queries/Space/SpaceFunctionsQuery.mjs +13 -0
  123. package/dist/network/graphql/builder/Queries/Space/SpaceIssuesQuery.d.ts +17 -0
  124. package/dist/network/graphql/builder/Queries/Space/SpaceIssuesQuery.mjs +22 -0
  125. package/dist/network/graphql/builder/Queries/Space/SpaceRuntimeQuery.d.ts +6 -0
  126. package/dist/network/graphql/builder/Queries/Space/SpaceRuntimeQuery.mjs +32 -0
  127. package/dist/network/graphql/builder/Queries/Space/SpaceVisitorsQuery.d.ts +6 -0
  128. package/dist/network/graphql/builder/Queries/Space/SpaceVisitorsQuery.mjs +16 -0
  129. package/dist/network/graphql/builder/Queries/index.d.ts +17 -3
  130. package/dist/network/graphql/builder/Queries/index.mjs +30 -22
  131. package/dist/network/graphql/sdk/Mutations/index.d.ts +1 -1
  132. package/dist/network/graphql/sdk/Queries/InitQuery.d.ts +1 -1
  133. package/dist/network/graphql/sdk/Queries/InitQuery.mjs +2 -91
  134. package/dist/network/graphql/sdk/Queries/Segment/SegmentQuery.d.ts +1 -1
  135. package/dist/network/graphql/sdk/Queries/Segment/SegmentQuery.mjs +2 -44
  136. package/dist/network/graphql/sdk/Queries/Segment/SegmentsQuery.d.ts +1 -1
  137. package/dist/network/graphql/sdk/Queries/Segment/SegmentsQuery.mjs +2 -55
  138. package/dist/network/graphql/sdk/Queries/index.d.ts +1 -5
  139. package/dist/network/index.mjs +7 -7
  140. package/dist/network/spaceEvents.d.ts +33 -3
  141. package/dist/network/spaceEvents.mjs +102 -89
  142. package/dist/realtime/client.d.ts +46 -0
  143. package/dist/realtime/client.mjs +192 -0
  144. package/dist/realtime/index.d.ts +6 -0
  145. package/dist/realtime/index.mjs +4 -0
  146. package/dist/realtime/presence.d.ts +38 -0
  147. package/dist/realtime/presence.mjs +70 -0
  148. package/dist/realtime/topics.d.ts +36 -0
  149. package/dist/realtime/topics.mjs +25 -0
  150. package/dist/schema/serverElements.d.ts +5 -0
  151. package/dist/schema/serverElements.mjs +15 -14
  152. package/dist/server/actions/useRealtimeSync.d.ts +9 -0
  153. package/dist/server/actions/useRealtimeSync.mjs +7 -0
  154. package/dist/state/index.d.ts +1 -0
  155. package/dist/state/index.mjs +3 -2
  156. package/dist/state/paintedState.d.ts +52 -0
  157. package/dist/state/paintedState.mjs +37 -0
  158. package/dist/state/runtimeStatePersist.d.ts +24 -0
  159. package/dist/state/runtimeStatePersist.mjs +113 -10
  160. package/dist/store/index.d.ts +45 -45
  161. package/dist/store/renderSettings.d.ts +6 -3
  162. package/dist/store/tracing/index.d.ts +1 -0
  163. package/dist/store/tracing/tracingCollector.d.ts +17 -1
  164. package/dist/store/tracing/tracingCollector.mjs +5 -0
  165. package/dist/style/index.d.ts +1 -0
  166. package/dist/style/index.mjs +3 -2
  167. package/dist/style/runtimeStyle.d.ts +29 -0
  168. package/dist/style/runtimeStyle.mjs +7 -0
  169. package/dist/style/styleConstants.d.ts +3 -2
  170. package/dist/style/styleConstants.mjs +2 -0
  171. package/dist/style/styleStates.d.ts +14 -1
  172. package/dist/style/styleStates.mjs +10 -7
  173. package/dist/theme/ThemeProvider.d.ts +1 -1
  174. package/dist/theme/ThemeProvider.mjs +35 -29
  175. package/dist/theme/themeCookie.mjs +11 -15
  176. package/dist/types/ActionTypes.d.ts +193 -0
  177. package/dist/types/AuthTypes.d.ts +11 -1
  178. package/dist/types/CommonTypes.d.ts +6 -0
  179. package/dist/types/FunctionTypes.d.ts +52 -0
  180. package/dist/types/FunctionTypes.mjs +0 -0
  181. package/dist/types/PluginTypes.d.ts +0 -1
  182. package/dist/types/RealtimeTypes.d.ts +94 -0
  183. package/dist/types/RealtimeTypes.mjs +0 -0
  184. package/dist/types/SchemaTypes.d.ts +54 -0
  185. package/dist/types/SchemaTypes.mjs +8 -0
  186. package/dist/types/ServerTypes.d.ts +310 -15
  187. package/dist/types/SpaceTypes.d.ts +53 -0
  188. package/dist/types/StateTypes.d.ts +6 -0
  189. package/dist/types/StoreTypes.d.ts +12 -1
  190. package/dist/types/index.d.ts +2 -0
  191. package/dist/types/index.mjs +3 -2
  192. package/package.json +190 -21
  193. package/vite.config.ts +0 -12
  194. package/dist/network/graphql/builder/Queries/PluginsQuery.d.ts +0 -9
  195. package/dist/network/graphql/builder/Queries/PluginsQuery.mjs +0 -54
@@ -34,6 +34,6 @@ declare const usePlitziServiceContext: <TEventBridge = any, TInteractions = any>
34
34
  declare const PlitziServiceProvider: (props: {
35
35
  children?: ReactNode;
36
36
  value: PlitziServiceContextValue;
37
- }) => import("react").JSX.Element;
37
+ }) => import('react').JSX.Element;
38
38
  export { PlitziServiceProvider, PlitziServiceContext };
39
39
  export default usePlitziServiceContext;
package/dist/index.d.ts CHANGED
@@ -16,3 +16,4 @@ export * from './devTools';
16
16
  export * from './theme';
17
17
  export * from './server';
18
18
  export * from './state';
19
+ export * from './history';
package/dist/index.mjs CHANGED
@@ -1,67 +1,79 @@
1
1
  import { authFailureFromResponse as e, onAuthFailure as t, reportAuthFailure as n, sameRegistrableDomain as r } from "./auth/failureChannel.mjs";
2
2
  import { createAuthFailureLink as i } from "./auth/authFailureLink.mjs";
3
- import { filters as a } from "./helpers/twigWrapper/filters/filters.mjs";
4
- import { processTwig as o } from "./helpers/twigWrapper/processTwig/processTwig.mjs";
5
- import { hasValidToken as s } from "./helpers/twigWrapper/tokens/hasValidToken.mjs";
6
- import { templateRootNames as c } from "./helpers/twigWrapper/templateRoots.mjs";
7
- import l from "./builder/contexts/BuilderContext.mjs";
8
- import { contexts_exports as u } from "./builder/contexts/index.mjs";
9
- import { BODYLESS_METHODS as d, CONNECTOR_HTTP_METHODS as f, DEFAULT_READ_ENDPOINT as p, EMPTY_RESPONSE_METHODS as m, READ_ENDPOINT_NAMES as h, WRITE_ENDPOINT_NAMES as g } from "./connectors/constants.mjs";
10
- import { connectorTokens as _, getConnectorTokens as v } from "./connectors/manifestTokens.mjs";
11
- import { connectorPresets as y, emptyManifest as b } from "./connectors/presets.mjs";
12
- import { validateConnectorManifest as x } from "./connectors/validateManifest.mjs";
13
- import S from "./helpers/fetchManifest.mjs";
14
- import C from "./helpers/generateFacade.mjs";
15
- import w from "./helpers/syntaxHighlight.mjs";
16
- import { formatDate as T, formatDateUTC as E, formatFromNow as D, formatUTCToLocal as O, getDurationMs as k, isDate as A, isValidFormat as j, parseDate as M, toUnixSeconds as N } from "./helpers/formatDate.mjs";
17
- import { isUserEdit as P } from "./helpers/reducerOrigin.mjs";
18
- import { evaluateRuleGroup as F } from "./helpers/ruleEvaluator.mjs";
19
- import { ParamsFromURL as I, delay as L, emptyObject as R, getDisplayName as z, getKeyDecoded as B, getPathsFromObeject as V, hexToRGB as H, isInViewport as U, makeId as W } from "./helpers/utils.mjs";
20
- import { disableReactDevTools as G } from "./helpers/security.mjs";
21
- import { createStripTypenameLink as K, stripTypenameDeep as q } from "./helpers/stripTypename.mjs";
22
- import J, { utilityOptions as Y } from "./dataSource/utility/index.mjs";
23
- import X from "./dataSource/getBindingsDetails.mjs";
24
- import Z from "./dataSource/helpers/getSourceName.mjs";
25
- import Q from "./dataSource/hooks/useRegisterSource.mjs";
26
- import $ from "./dataSource/resolveVariables.mjs";
27
- import ee from "./devTools/DevToolsContext.mjs";
28
- import { debugCookieName as te } from "./devTools/debugCookie.mjs";
29
- import ne from "./devTools/interactionLog.mjs";
30
- import re, { createStoreDevToolsLogger as ie, pConsole as ae } from "./devTools/utils/PlitziConsole.mjs";
31
- import oe from "./elements/ComponentContext.mjs";
32
- import se from "./hooks/useFontHead.mjs";
33
- import ce from "./hooks/useNetwork.mjs";
34
- import le, { PlitziServiceContext as ue, PlitziServiceProvider as de } from "./hooks/usePlitziServiceContext.mjs";
35
- import fe from "./hooks/useStableValue.mjs";
36
- import { StyleVariableCategory as pe } from "./types/StyleTypes.mjs";
37
- import me, { EMPTY_STYLE_SCHEMA as he, StyleBindingsAllowed as ge, baseDefaultValue as _e, inheritableAttributesBase as ve } from "./style/styleConstants.mjs";
38
- import { fontLinkAssets as ye } from "./style/fontAssets.mjs";
39
- import { SYSTEM_FONTS as be, availableFonts as xe, familiesInCss as Se, fontFamilyStack as Ce, fontUrlResolver as we, fontsToHead as Te, googleCss2Url as Ee, googleTextSubsetUrl as De, isSafeFontUrl as Oe, primaryFamily as ke } from "./style/fonts.mjs";
40
- import { FontValidationError as Ae, parseSpaceFont as je } from "./style/fontValidation.mjs";
41
- import { fallbackForFamily as Me, fontsFromCss as Ne } from "./style/fontsFromCss.mjs";
42
- import { STYLE_STATES as Pe, STYLE_STATE_LABELS as Fe, inCascadeOrder as Ie, isKnownState as Le } from "./style/styleStates.mjs";
43
- import Re from "./schema/SchemaContext.mjs";
44
- import { EMPTY_SCHEMA as ze, VARIABLE_REGEX as Be } from "./schema/schemaConstants.mjs";
45
- import { findLayoutCycle as Ve, resolveLayoutChain as He } from "./schema/layoutChain.mjs";
46
- import { collectServerElements as Ue, hasServerElements as We } from "./schema/serverElements.mjs";
47
- import Ge from "./network/NetworkContext.mjs";
48
- import Ke from "./network/NetworkInternalContext.mjs";
49
- import { SpaceEvents as qe, spaceEventSchemas as Je, validateSpaceEvent as Ye } from "./network/spaceEvents.mjs";
50
- import Xe from "./network/graphql/builder/Mutations/index.mjs";
51
- import Ze from "./network/graphql/builder/Queries/index.mjs";
52
- import Qe from "./network/graphql/builder/Subscriptions/index.mjs";
53
- import $e from "./network/graphql/sdk/Mutations/index.mjs";
54
- import et from "./network/graphql/sdk/Queries/index.mjs";
55
- import tt from "./segments/SegmentsContext.mjs";
56
- import nt, { RTEvent as rt, RTEventCloseCode as it, getInstance as at, isRTEvent as ot, setInstance as st } from "./websockets/RTCodec.mjs";
57
- import { THEME_CLASSES as ct, THEME_COOKIE_NAME as lt, applyThemeClass as ut, isTheme as dt, readThemeCookie as ft, themeFromCookies as pt, writeThemeCookie as mt } from "./theme/themeCookie.mjs";
58
- import ht, { createThemeState as gt, createThemeStore as _t, resolveScheme as vt, setAreaTheme as yt, setMachineScheme as bt, setThemeMode as xt, themeFor as St } from "./theme/themeStore.mjs";
59
- import { useThemeStore as Ct } from "./theme/ThemeScope.mjs";
60
- import wt from "./theme/ThemeProvider.mjs";
61
- import Tt, { SPACE_THEME_AREA as Et } from "./theme/useTheme.mjs";
62
- import Dt from "./server/actions/useActionsSync.mjs";
63
- import Ot, { currentRscLocation as kt, rscDataPath as At } from "./server/rsc/refreshRsc.mjs";
64
- import jt from "./server/rsc/useRscRefresh.mjs";
65
- import Mt from "./server/rsc/useRscSync.mjs";
66
- import { runtimeStatePersist as Nt } from "./state/runtimeStatePersist.mjs";
67
- export { d as BODYLESS_METHODS, l as BuilderContext, Xe as BuilderMutations, Ze as BuilderQueries, f as CONNECTOR_HTTP_METHODS, oe as ComponentContext, p as DEFAULT_READ_ENDPOINT, ee as DevToolsContext, m as EMPTY_RESPONSE_METHODS, ze as EMPTY_SCHEMA, he as EMPTY_STYLE_SCHEMA, Ae as FontValidationError, Ge as NetworkContext, Ke as NetworkInternalContext, I as ParamsFromURL, re as PlitziConsole, ue as PlitziServiceContext, de as PlitziServiceProvider, h as READ_ENDPOINT_NAMES, nt as RTCodec, rt as RTEvent, it as RTEventCloseCode, Et as SPACE_THEME_AREA, Pe as STYLE_STATES, Fe as STYLE_STATE_LABELS, be as SYSTEM_FONTS, Re as SchemaContext, $e as SdkMutations, et as SdkQueries, tt as SegmentsContext, Qe as SpaceEventSubscription, qe as SpaceEvents, ge as StyleBindingsAllowed, pe as StyleVariableCategory, ct as THEME_CLASSES, lt as THEME_COOKIE_NAME, wt as ThemeProvider, Be as VARIABLE_REGEX, g as WRITE_ENDPOINT_NAMES, ut as applyThemeClass, e as authFailureFromResponse, xe as availableFonts, _e as baseDefaultValue, Ue as collectServerElements, y as connectorPresets, _ as connectorTokens, u as contexts, i as createAuthFailureLink, ie as createStoreDevToolsLogger, K as createStripTypenameLink, gt as createThemeState, _t as createThemeStore, kt as currentRscLocation, te as debugCookieName, L as delay, G as disableReactDevTools, b as emptyManifest, R as emptyObject, F as evaluateRuleGroup, Me as fallbackForFamily, Se as familiesInCss, S as fetchManifest, a as filters, Ve as findLayoutCycle, Ce as fontFamilyStack, ye as fontLinkAssets, we as fontUrlResolver, Ne as fontsFromCss, Te as fontsToHead, T as formatDate, E as formatDateUTC, D as formatFromNow, O as formatUTCToLocal, C as generateFacade, X as getBindingsDetails, v as getConnectorTokens, z as getDisplayName, k as getDurationMs, at as getInstance, B as getKeyDecoded, V as getPathsFromObeject, Z as getSourceName, Ee as googleCss2Url, De as googleTextSubsetUrl, We as hasServerElements, s as hasValidToken, H as hexToRGB, Ie as inCascadeOrder, ve as inheritableAttributesBase, A as isDate, U as isInViewport, ne as isInteractionFlow, Le as isKnownState, ot as isRTEvent, Oe as isSafeFontUrl, dt as isTheme, P as isUserEdit, j as isValidFormat, W as makeId, t as onAuthFailure, ae as pConsole, M as parseDate, je as parseSpaceFont, ke as primaryFamily, o as processTwig, ft as readThemeCookie, Ot as refreshRsc, n as reportAuthFailure, He as resolveLayoutChain, vt as resolveScheme, $ as resolveVariables, At as rscDataPath, Nt as runtimeStatePersist, r as sameRegistrableDomain, yt as setAreaTheme, st as setInstance, bt as setMachineScheme, xt as setThemeMode, Je as spaceEventSchemas, q as stripTypenameDeep, me as styleConstants, w as syntaxHighlight, c as templateRootNames, St as themeFor, pt as themeFromCookies, ht as themeStore, N as toUnixSeconds, Dt as useActionsSync, se as useFontHead, ce as useNetwork, le as usePlitziServiceContext, Q as useRegisterSource, jt as useRscRefresh, Mt as useRscSync, fe as useStableValue, Tt as useTheme, Ct as useThemeStore, J as utility, Y as utilityOptions, x as validateConnectorManifest, Ye as validateSpaceEvent, mt as writeThemeCookie };
3
+ import { VISITOR_NAME as a, checkVisitorRoles as o, visitorAccess as s } from "./auth/visitorRoles.mjs";
4
+ import { filters as c } from "./helpers/twigWrapper/filters/filters.mjs";
5
+ import { processTwig as l, processTwigParam as u, processTwigValue as d } from "./helpers/twigWrapper/processTwig/processTwig.mjs";
6
+ import { hasTemplateSyntax as f } from "./helpers/twigWrapper/tokens/hasTemplateSyntax.mjs";
7
+ import { hasValidToken as p } from "./helpers/twigWrapper/tokens/hasValidToken.mjs";
8
+ import { MAX_PARAM_PASSES as m, resolveStepParam as h } from "./helpers/twigWrapper/processTwig/resolveStepParam.mjs";
9
+ import { inspectTemplate as g } from "./helpers/twigWrapper/inspectTemplate.mjs";
10
+ import { templatePaths as _, templateRootNames as v } from "./helpers/twigWrapper/templateRoots.mjs";
11
+ import y from "./builder/contexts/BuilderContext.mjs";
12
+ import { contexts_exports as b } from "./builder/contexts/index.mjs";
13
+ import { BODYLESS_METHODS as x, CONNECTOR_HTTP_METHODS as S, DEFAULT_READ_ENDPOINT as C, EMPTY_RESPONSE_METHODS as w, READ_ENDPOINT_NAMES as T, WRITE_ENDPOINT_NAMES as E } from "./connectors/constants.mjs";
14
+ import { connectorTokens as D, getConnectorTokens as O } from "./connectors/manifestTokens.mjs";
15
+ import { connectorPresets as k, emptyManifest as A } from "./connectors/presets.mjs";
16
+ import { validateConnectorManifest as j } from "./connectors/validateManifest.mjs";
17
+ import { evaluateComputed as M, liveSources as N } from "./dataSource/computed.mjs";
18
+ import P from "./helpers/fetchManifest.mjs";
19
+ import F from "./helpers/generateFacade.mjs";
20
+ import I from "./helpers/syntaxHighlight.mjs";
21
+ import { cookieFromHeader as L, documentCookies as R } from "./helpers/cookies.mjs";
22
+ import { formatDate as z, formatDateUTC as B, formatFromNow as V, formatUTCToLocal as H, getDurationMs as U, isValidFormat as W, parseDate as G, toUnixSeconds as K } from "./helpers/formatDate.mjs";
23
+ import { isDate as q } from "./helpers/isDate.mjs";
24
+ import { isUserEdit as J } from "./helpers/reducerOrigin.mjs";
25
+ import { evaluateRuleGroup as Y } from "./helpers/ruleEvaluator.mjs";
26
+ import { ParamsFromURL as X, delay as Z, emptyObject as Q, getDisplayName as $, getKeyDecoded as ee, getPathsFromObeject as te, hexToRGB as ne, isInViewport as re, makeId as ie } from "./helpers/utils.mjs";
27
+ import { disableReactDevTools as ae } from "./helpers/security.mjs";
28
+ import { createStripTypenameLink as oe, stripTypenameDeep as se } from "./helpers/stripTypename.mjs";
29
+ import ce, { utilityOptions as le } from "./dataSource/utility/index.mjs";
30
+ import ue from "./dataSource/getBindingsDetails.mjs";
31
+ import de from "./dataSource/helpers/getSourceName.mjs";
32
+ import fe from "./dataSource/hooks/useRegisterSource.mjs";
33
+ import pe from "./dataSource/resolveVariables.mjs";
34
+ import me from "./devTools/DevToolsContext.mjs";
35
+ import { debugCookieName as he } from "./devTools/debugCookie.mjs";
36
+ import ge from "./devTools/interactionLog.mjs";
37
+ import _e, { createStoreDevToolsLogger as ve, pConsole as ye } from "./devTools/utils/PlitziConsole.mjs";
38
+ import be from "./elements/ComponentContext.mjs";
39
+ import { describeChange as xe, fieldChanges as Se, uniqueLines as Ce } from "./history/describe.mjs";
40
+ import { diffSchema as we, diffStyle as Te, jsonCopy as Ee, sameValue as De } from "./history/diff.mjs";
41
+ import Oe from "./hooks/useFontHead.mjs";
42
+ import ke from "./hooks/useNetwork.mjs";
43
+ import Ae, { PlitziServiceContext as je, PlitziServiceProvider as Me } from "./hooks/usePlitziServiceContext.mjs";
44
+ import Ne from "./hooks/useStableValue.mjs";
45
+ import { WHILE_RUNNING_MODES as Pe } from "./types/SchemaTypes.mjs";
46
+ import { StyleVariableCategory as Fe } from "./types/StyleTypes.mjs";
47
+ import Ie, { EMPTY_STYLE_SCHEMA as Le, StyleBindingsAllowed as Re, baseDefaultValue as ze, inheritableAttributesBase as Be } from "./style/styleConstants.mjs";
48
+ import { fontLinkAssets as Ve } from "./style/fontAssets.mjs";
49
+ import { SYSTEM_FONTS as He, availableFonts as Ue, familiesInCss as We, fontFamilyStack as Ge, fontUrlResolver as Ke, fontsToHead as qe, googleCss2Url as Je, googleTextSubsetUrl as Ye, isSafeFontUrl as Xe, primaryFamily as Ze } from "./style/fonts.mjs";
50
+ import { FontValidationError as Qe, parseSpaceFont as $e } from "./style/fontValidation.mjs";
51
+ import { fallbackForFamily as et, fontsFromCss as tt } from "./style/fontsFromCss.mjs";
52
+ import { RUNTIME_STYLE_ID as nt, markStyleCache as rt, styleCacheFromDocument as it, styleCacheTravelsInDocument as at } from "./style/runtimeStyle.mjs";
53
+ import { HIDDEN_CLASS as ot, STYLE_STATES as st, STYLE_STATE_LABELS as ct, inCascadeOrder as lt, isKnownState as ut, isStartingState as dt, stateSuffix as ft } from "./style/styleStates.mjs";
54
+ import pt from "./schema/SchemaContext.mjs";
55
+ import { EMPTY_SCHEMA as mt, VARIABLE_REGEX as ht } from "./schema/schemaConstants.mjs";
56
+ import { findLayoutCycle as gt, resolveLayoutChain as _t } from "./schema/layoutChain.mjs";
57
+ import { collectServerElements as vt, hasServerElements as yt } from "./schema/serverElements.mjs";
58
+ import bt from "./network/NetworkContext.mjs";
59
+ import xt from "./network/NetworkInternalContext.mjs";
60
+ import { SpaceEvents as St, schemaFromWire as Ct, schemaToWire as wt, spaceEventSchemas as Tt, validateSpaceEvent as Et } from "./network/spaceEvents.mjs";
61
+ import Dt from "./network/graphql/builder/Mutations/index.mjs";
62
+ import Ot from "./network/graphql/builder/Queries/index.mjs";
63
+ import kt from "./network/graphql/builder/Subscriptions/index.mjs";
64
+ import At from "./network/graphql/sdk/Mutations/index.mjs";
65
+ import jt from "./network/graphql/sdk/Queries/index.mjs";
66
+ import Mt from "./segments/SegmentsContext.mjs";
67
+ import Nt, { RTEvent as Pt, RTEventCloseCode as Ft, getInstance as It, isRTEvent as Lt, setInstance as Rt } from "./websockets/RTCodec.mjs";
68
+ import { THEME_CLASSES as zt, THEME_COOKIE_NAME as Bt, applyThemeClass as Vt, isTheme as Ht, readThemeCookie as Ut, themeFromCookies as Wt, writeThemeCookie as Gt } from "./theme/themeCookie.mjs";
69
+ import Kt, { createThemeState as qt, createThemeStore as Jt, resolveScheme as Yt, setAreaTheme as Xt, setMachineScheme as Zt, setThemeMode as Qt, themeFor as $t } from "./theme/themeStore.mjs";
70
+ import { useThemeStore as en } from "./theme/ThemeScope.mjs";
71
+ import tn from "./theme/ThemeProvider.mjs";
72
+ import nn, { SPACE_THEME_AREA as rn } from "./theme/useTheme.mjs";
73
+ import an from "./server/actions/useActionsSync.mjs";
74
+ import on, { currentRscLocation as sn, rscDataPath as cn } from "./server/rsc/refreshRsc.mjs";
75
+ import ln from "./server/rsc/useRscRefresh.mjs";
76
+ import un from "./server/rsc/useRscSync.mjs";
77
+ import { PAINTED_STATE_BUDGET as dn, clearPaintedEntry as fn, paintedEntryFromCookies as pn, paintedKeys as mn, paintedStateCookieName as hn, paintedStateFor as gn, pickPainted as _n, readPaintedEntry as vn, writePaintedEntry as yn } from "./state/paintedState.mjs";
78
+ import { runtimeStatePersist as bn, stateOwner as xn } from "./state/runtimeStatePersist.mjs";
79
+ export { x as BODYLESS_METHODS, y as BuilderContext, Dt as BuilderMutations, Ot as BuilderQueries, S as CONNECTOR_HTTP_METHODS, be as ComponentContext, C as DEFAULT_READ_ENDPOINT, me as DevToolsContext, w as EMPTY_RESPONSE_METHODS, mt as EMPTY_SCHEMA, Le as EMPTY_STYLE_SCHEMA, Qe as FontValidationError, ot as HIDDEN_CLASS, m as MAX_PARAM_PASSES, bt as NetworkContext, xt as NetworkInternalContext, dn as PAINTED_STATE_BUDGET, X as ParamsFromURL, _e as PlitziConsole, je as PlitziServiceContext, Me as PlitziServiceProvider, T as READ_ENDPOINT_NAMES, Nt as RTCodec, Pt as RTEvent, Ft as RTEventCloseCode, nt as RUNTIME_STYLE_ID, rn as SPACE_THEME_AREA, st as STYLE_STATES, ct as STYLE_STATE_LABELS, He as SYSTEM_FONTS, pt as SchemaContext, At as SdkMutations, jt as SdkQueries, Mt as SegmentsContext, kt as SpaceEventSubscription, St as SpaceEvents, Re as StyleBindingsAllowed, Fe as StyleVariableCategory, zt as THEME_CLASSES, Bt as THEME_COOKIE_NAME, tn as ThemeProvider, ht as VARIABLE_REGEX, a as VISITOR_NAME, Pe as WHILE_RUNNING_MODES, E as WRITE_ENDPOINT_NAMES, Vt as applyThemeClass, e as authFailureFromResponse, Ue as availableFonts, ze as baseDefaultValue, o as checkVisitorRoles, fn as clearPaintedEntry, vt as collectServerElements, k as connectorPresets, D as connectorTokens, b as contexts, L as cookieFromHeader, i as createAuthFailureLink, ve as createStoreDevToolsLogger, oe as createStripTypenameLink, qt as createThemeState, Jt as createThemeStore, sn as currentRscLocation, he as debugCookieName, Z as delay, xe as describeChange, we as diffSchema, Te as diffStyle, ae as disableReactDevTools, R as documentCookies, A as emptyManifest, Q as emptyObject, M as evaluateComputed, Y as evaluateRuleGroup, et as fallbackForFamily, We as familiesInCss, P as fetchManifest, Se as fieldChanges, c as filters, gt as findLayoutCycle, Ge as fontFamilyStack, Ve as fontLinkAssets, Ke as fontUrlResolver, tt as fontsFromCss, qe as fontsToHead, z as formatDate, B as formatDateUTC, V as formatFromNow, H as formatUTCToLocal, F as generateFacade, ue as getBindingsDetails, O as getConnectorTokens, $ as getDisplayName, U as getDurationMs, It as getInstance, ee as getKeyDecoded, te as getPathsFromObeject, de as getSourceName, Je as googleCss2Url, Ye as googleTextSubsetUrl, yt as hasServerElements, f as hasTemplateSyntax, p as hasValidToken, ne as hexToRGB, lt as inCascadeOrder, Be as inheritableAttributesBase, g as inspectTemplate, q as isDate, re as isInViewport, ge as isInteractionFlow, ut as isKnownState, Lt as isRTEvent, Xe as isSafeFontUrl, dt as isStartingState, Ht as isTheme, J as isUserEdit, W as isValidFormat, Ee as jsonCopy, N as liveSources, ie as makeId, rt as markStyleCache, t as onAuthFailure, ye as pConsole, pn as paintedEntryFromCookies, mn as paintedKeys, hn as paintedStateCookieName, gn as paintedStateFor, G as parseDate, $e as parseSpaceFont, _n as pickPainted, Ze as primaryFamily, l as processTwig, u as processTwigParam, d as processTwigValue, vn as readPaintedEntry, Ut as readThemeCookie, on as refreshRsc, n as reportAuthFailure, _t as resolveLayoutChain, Yt as resolveScheme, h as resolveStepParam, pe as resolveVariables, cn as rscDataPath, bn as runtimeStatePersist, r as sameRegistrableDomain, De as sameValue, Ct as schemaFromWire, wt as schemaToWire, Xt as setAreaTheme, Rt as setInstance, Zt as setMachineScheme, Qt as setThemeMode, Tt as spaceEventSchemas, xn as stateOwner, ft as stateSuffix, se as stripTypenameDeep, it as styleCacheFromDocument, at as styleCacheTravelsInDocument, Ie as styleConstants, I as syntaxHighlight, _ as templatePaths, v as templateRootNames, $t as themeFor, Wt as themeFromCookies, Kt as themeStore, K as toUnixSeconds, Ce as uniqueLines, an as useActionsSync, Oe as useFontHead, ke as useNetwork, Ae as usePlitziServiceContext, fe as useRegisterSource, ln as useRscRefresh, un as useRscSync, Ne as useStableValue, nn as useTheme, en as useThemeStore, ce as utility, le as utilityOptions, j as validateConnectorManifest, Et as validateSpaceEvent, s as visitorAccess, yn as writePaintedEntry, Gt as writeThemeCookie };
@@ -1,4 +1,4 @@
1
1
  export { matchPath } from './matchPath';
2
- export { getPageFullPath, getPaths, isAbsoluteUrl, isPageAuthored, matchRoutePath, getRouteParams } from './routes';
2
+ export { getPageFullPath, getPaths, isAbsoluteUrl, isPageAuthored, matchRoutePath, getRouteParams, getSlugParams, navigationTarget } from './routes';
3
3
  export type { PathMatch, PathPattern } from './matchPath';
4
4
  export type { NavigationAccessLevel, NavigationAction, Path } from './routes';
@@ -1,3 +1,3 @@
1
1
  import { matchPath as e } from "./matchPath.mjs";
2
- import { getPageFullPath as t, getPaths as n, getRouteParams as r, isAbsoluteUrl as i, isPageAuthored as a, matchRoutePath as o } from "./routes.mjs";
3
- export { t as getPageFullPath, n as getPaths, r as getRouteParams, i as isAbsoluteUrl, a as isPageAuthored, e as matchPath, o as matchRoutePath };
2
+ import { getPageFullPath as t, getPaths as n, getRouteParams as r, getSlugParams as i, isAbsoluteUrl as a, isPageAuthored as o, matchRoutePath as s, navigationTarget as c } from "./routes.mjs";
3
+ export { t as getPageFullPath, n as getPaths, r as getRouteParams, i as getSlugParams, a as isAbsoluteUrl, o as isPageAuthored, e as matchPath, s as matchRoutePath, c as navigationTarget };
@@ -22,6 +22,14 @@ export type Path = {
22
22
  export declare const isAbsoluteUrl: (url: string) => boolean;
23
23
  declare function getPageFullPath(pages: Record<string, Element>, pageFolders: PageFolder[], pageId: string, asString: true): string;
24
24
  declare function getPageFullPath(pages: Record<string, Element>, pageFolders: PageFolder[], pageId: string, asString?: false): Record<string, string>;
25
+ /**
26
+ * Where a navigation to `target` goes: a page id resolves to that page's full path — its folders' slugs before its own,
27
+ * exactly what a link to it resolves to — and anything else (a path, a slug) is taken as the path it already is.
28
+ *
29
+ * The router's navigation and a link used to disagree about a page in a folder: the link went to `/account/security`,
30
+ * a flow's `navigate` to `/security`, and to the home page for a folder's index — whose own slug is empty.
31
+ */
32
+ declare const navigationTarget: (pages: Record<string, Element>, pageFolders: PageFolder[], target: string) => string;
25
33
  declare const isPageAuthored: (accessLevel?: NavigationAccessLevel, authenticated?: boolean, previewMode?: boolean) => boolean;
26
34
  declare const getPaths: (pages?: Record<string, Element>, pageFolders?: PageFolder[], authenticated?: boolean, basePath?: string, previewMode?: boolean, strictMode?: boolean) => Path[];
27
35
  declare const matchRoutePath: (paths: Path[], pathName: string, authenticated: boolean) => {
@@ -33,4 +41,6 @@ declare const matchRoutePath: (paths: Path[], pathName: string, authenticated: b
33
41
  pageId?: string;
34
42
  };
35
43
  declare const getRouteParams: (path: string) => string[];
36
- export { getPageFullPath, getPaths, matchRoutePath, isPageAuthored, getRouteParams };
44
+ /** The params a page's slug declares, in either spelling a slug accepts: `post/{{slug}}` and `:spaceId/update`. */
45
+ declare const getSlugParams: (slug: string) => string[];
46
+ export { getPageFullPath, getPaths, matchRoutePath, isPageAuthored, getRouteParams, getSlugParams, navigationTarget };
@@ -1,45 +1,50 @@
1
1
  import { matchPath as e } from "./matchPath.mjs";
2
2
  //#region src/navigation/routes.ts
3
- var t = (e) => /^https?:\/\//i.test(e), n = (e) => t(e) || e.includes("{{"), r = (e) => e.replace(/{{([a-zA-Z0-9-_:*/]+)}}/i, ":$1").replaceAll(/[/]+/gim, "/"), i = (e, t) => {
3
+ var t = (e) => /^https?:\/\//i.test(e), n = (e) => t(e) || e.includes("{{"), r = (e) => e.replaceAll(/\/+/g, "/"), i = (e) => r(e.replace(/{{([a-zA-Z0-9-_:*/]+)}}/gi, ":$1")), a = (e, t) => {
4
4
  if (!t || !e[t]) return "";
5
5
  let { slug: n, parentId: r } = e[t];
6
- return r ? `${i(e, r)}/${n}` : n;
6
+ return r ? `${a(e, r)}/${n}` : n;
7
7
  };
8
- function a(e, t, n, a = !1) {
9
- let { slug: o = "", folder: s, default: c } = e[n]?.attributes ?? {
10
- slug: n,
8
+ function o(e, t, n, o = !1) {
9
+ let s = n.replace(/^\/+/, ""), { slug: c = "", folder: l, default: u } = e[s]?.attributes ?? {
10
+ slug: s,
11
11
  folder: "",
12
12
  default: !1
13
13
  };
14
- if (c && !a) return {
14
+ if (u && !o) return {
15
15
  "/": n,
16
16
  [`/${n}`]: n
17
17
  };
18
- if (c && a) return "/";
19
- if (!s && !a) return {
20
- [r(`/${o}`)]: n,
21
- [`/${n}`]: n
18
+ if (u && o) return "/";
19
+ if (!l && !o) return {
20
+ [i(`/${c}`)]: n,
21
+ [i(`/${n}`)]: n
22
22
  };
23
- if (!s && a) return `/${o}`;
24
- if (!t.find((e) => e.id === s)) return a ? `/${o}` : {
25
- [r(`/${o}`)]: n,
26
- [`/${n}`]: n
23
+ if (!l && o) return r(`/${c}`);
24
+ if (!t.find((e) => e.id === l)) return o ? r(`/${c}`) : {
25
+ [i(`/${c}`)]: n,
26
+ [i(`/${n}`)]: n
27
27
  };
28
- let l = [i(t.reduce((e, t) => ({
28
+ let d = [a(t.reduce((e, t) => ({
29
29
  ...e,
30
30
  [t.id]: t
31
- }), {}), s), o].filter(Boolean).join("/");
32
- return a ? `/${l}` : {
33
- [`/${l}`]: n,
34
- [`/${n}`]: n
31
+ }), {}), l), c].filter(Boolean).join("/");
32
+ return o ? r(`/${d}`) : {
33
+ [i(`/${d}`)]: n,
34
+ [i(`/${n}`)]: n
35
35
  };
36
36
  }
37
- var o = (e, t, n = !0) => !e || !n || t === void 0 || t && e === "authenticated" || !t && e === "public" ? !0 : t && e === "public" ? !1 : !e, s = (e = {}, t = [], r, i = "", s = !0, c = !0) => {
38
- let l = Object.keys(e).reduce((c, l) => {
37
+ var s = (e, t, n) => {
38
+ let r = e[n];
39
+ if (!r) return n;
40
+ let { slug: i, default: a } = r.attributes;
41
+ return typeof i == "string" ? o(e, t, n, !0) : a ? "/" : `/${n}`;
42
+ }, c = (e, t, n = !0) => !e || !n || t === void 0 || t && e === "authenticated" || !t && e === "public" ? !0 : t && e === "public" ? !1 : !e, l = (e = {}, t = [], r, i = "", a = !0, s = !0) => {
43
+ let l = Object.keys(e).reduce((s, l) => {
39
44
  let { attributes: { accessLevel: u, enabled: d = !0, unauthorizedBehaviour: f } } = e[l], p = e[l].attributes.unauthorizedPageRedirect;
40
- if (!d && s) return c;
41
- p &&= n(p) ? p : a(e, t, p.replace("/", ""), !0);
42
- let m = a(e, t, l), h = Object.keys(m).map((e) => ({
45
+ if (!d && a) return s;
46
+ p &&= n(p) ? p : o(e, t, p, !0);
47
+ let m = o(e, t, l), h = Object.keys(m).map((e) => ({
43
48
  pageId: l,
44
49
  path: `${i}${e}`.replaceAll("//", "/"),
45
50
  accessLevel: u,
@@ -47,11 +52,11 @@ var o = (e, t, n = !0) => !e || !n || t === void 0 || t && e === "authenticated"
47
52
  isRaw: `/${l}` === e,
48
53
  unauthorizedBehaviour: f,
49
54
  unauthorizedPageRedirect: p,
50
- hasAccess: o(u, r, s)
55
+ hasAccess: c(u, r, a)
51
56
  }));
52
- return [...c, ...h];
57
+ return [...s, ...h];
53
58
  }, []).filter((e) => e.path !== "*" || e.hasAccess).sort((e, t) => e.path === t.path ? e.accessLevel === "authenticated" ? -1 : 1 : e.path > t.path ? -1 : 1);
54
- if (!l.find((e) => e.path === "*") && !c) {
59
+ if (!l.find((e) => e.path === "*") && !s) {
55
60
  let e = l.find((e) => e.path === "/" && e.hasAccess);
56
61
  e && e.unauthorizedBehaviour === "redirect" && e.unauthorizedPageRedirect && l.push({
57
62
  ...e,
@@ -63,7 +68,7 @@ var o = (e, t, n = !0) => !e || !n || t === void 0 || t && e === "authenticated"
63
68
  });
64
69
  }
65
70
  return l;
66
- }, c = (t, n, r) => {
71
+ }, u = (t, n, r) => {
67
72
  if (!n) return {
68
73
  action: {
69
74
  type: "accessDenied",
@@ -119,6 +124,6 @@ var o = (e, t, n = !0) => !e || !n || t === void 0 || t && e === "authenticated"
119
124
  },
120
125
  pathMatch: void 0
121
126
  };
122
- }, l = (e) => !e || typeof e != "string" ? [] : (e.match(/:[a-zA-Z0-9-_:*]+/gim) || []).map((e) => e.replace(":", ""));
127
+ }, d = (e) => !e || typeof e != "string" ? [] : (e.match(/:[a-zA-Z0-9-_:*]+/gim) || []).map((e) => e.replace(":", "")), f = (e) => d(i(e));
123
128
  //#endregion
124
- export { a as getPageFullPath, s as getPaths, l as getRouteParams, t as isAbsoluteUrl, o as isPageAuthored, c as matchRoutePath };
129
+ export { o as getPageFullPath, l as getPaths, d as getRouteParams, f as getSlugParams, t as isAbsoluteUrl, c as isPageAuthored, u as matchRoutePath, s as navigationTarget };
@@ -0,0 +1,14 @@
1
+ import { SchemaRaw } from '../../../../../types';
2
+ /** One change the fix made, keyed by the issue it settles. */
3
+ export type TSpaceFix = {
4
+ code: string;
5
+ elementId: string | null;
6
+ message: string;
7
+ };
8
+ /** What was changed, and the schema as it is now stored — `flat` as a list, the shape the live channel carries. */
9
+ export type TSpaceFixIssuesMutation = {
10
+ applied: TSpaceFix[];
11
+ schema: SchemaRaw;
12
+ };
13
+ declare const SpaceFixIssuesMutation: import('graphql').DocumentNode;
14
+ export default SpaceFixIssuesMutation;
@@ -0,0 +1,16 @@
1
+ import { gql as e } from "@apollo/client/core";
2
+ //#region src/network/graphql/builder/Mutations/Space/SpaceFixIssuesMutation.ts
3
+ var t = e`
4
+ mutation SpaceFixIssues($environment: String!) {
5
+ SpaceFixIssues(environment: $environment) {
6
+ applied {
7
+ code
8
+ elementId
9
+ message
10
+ }
11
+ schema
12
+ }
13
+ }
14
+ `;
15
+ //#endregion
16
+ export { t as default };
@@ -2,5 +2,9 @@ import { PluginRaw } from '../../../../../types';
2
2
  export type TSpaceUpdatePluginMutation = {
3
3
  plugins: PluginRaw[];
4
4
  };
5
+ /**
6
+ * A plugin's address, its settings, or both — whichever is sent. What is left out is kept: saving the settings does not
7
+ * move the plugin, and a new version does not forget how the space configured it.
8
+ */
5
9
  declare const SpaceUpdatePluginMutation: import('graphql').DocumentNode;
6
10
  export default SpaceUpdatePluginMutation;
@@ -1,8 +1,8 @@
1
1
  import { gql as e } from "@apollo/client/core";
2
2
  //#region src/network/graphql/builder/Mutations/Space/SpaceUpdatePluginMutation.ts
3
3
  var t = e`
4
- mutation SpaceUpdatePluginMutation($environment: String!, $pluginType: String!, $resource: String!) {
5
- SpaceUpdatePlugin(environment: $environment, pluginType: $pluginType, resource: $resource) {
4
+ mutation SpaceUpdatePluginMutation($environment: String!, $pluginType: String!, $resource: String, $settings: Json) {
5
+ SpaceUpdatePlugin(environment: $environment, pluginType: $pluginType, resource: $resource, settings: $settings) {
6
6
  plugins {
7
7
  type
8
8
  resource
@@ -7,6 +7,7 @@ var t = e`
7
7
  status
8
8
  output
9
9
  trace
10
+ steps
10
11
  }
11
12
  }
12
13
  `;
@@ -0,0 +1,3 @@
1
+ export type TSpaceRemoveFunctionsMutation = boolean;
2
+ declare const SpaceRemoveFunctionsMutation: import('graphql').DocumentNode;
3
+ export default SpaceRemoveFunctionsMutation;
@@ -0,0 +1,9 @@
1
+ import { gql as e } from "@apollo/client/core";
2
+ //#region src/network/graphql/builder/Mutations/Space/functions/SpaceRemoveFunctionsMutation.ts
3
+ var t = e`
4
+ mutation SpaceRemoveFunctionsMutation {
5
+ SpaceRemoveFunctions
6
+ }
7
+ `;
8
+ //#endregion
9
+ export { t as default };
@@ -0,0 +1,11 @@
1
+ import { FunctionsManifest, FunctionsProblem, FunctionsRefusal } from '../../../../../../types';
2
+ /** As GraphQL carries it: one shape with every field, `ok` saying which of them mean something. */
3
+ export type TSpaceSaveFunctionsMutation = {
4
+ ok: boolean;
5
+ version: string | null;
6
+ manifest: FunctionsManifest | null;
7
+ problems: FunctionsProblem[];
8
+ refusal: FunctionsRefusal | null;
9
+ };
10
+ declare const SpaceSaveFunctionsMutation: import('graphql').DocumentNode;
11
+ export default SpaceSaveFunctionsMutation;
@@ -0,0 +1,24 @@
1
+ import { gql as e } from "@apollo/client/core";
2
+ //#region src/network/graphql/builder/Mutations/Space/functions/SpaceSaveFunctionsMutation.ts
3
+ var t = e`
4
+ mutation SpaceSaveFunctionsMutation($files: Json!, $base: String) {
5
+ SpaceSaveFunctions(files: $files, base: $base) {
6
+ ok
7
+ version
8
+ manifest
9
+ problems {
10
+ file
11
+ line
12
+ column
13
+ message
14
+ }
15
+ refusal {
16
+ status
17
+ error
18
+ limit
19
+ }
20
+ }
21
+ }
22
+ `;
23
+ //#endregion
24
+ export { t as default };
@@ -0,0 +1,4 @@
1
+ import { ActionRunReport } from '../../../../../../types';
2
+ export type TSpaceTryFunctionMutation = ActionRunReport;
3
+ declare const SpaceTryFunctionMutation: import('graphql').DocumentNode;
4
+ export default SpaceTryFunctionMutation;
@@ -0,0 +1,15 @@
1
+ import { gql as e } from "@apollo/client/core";
2
+ //#region src/network/graphql/builder/Mutations/Space/functions/SpaceTryFunctionMutation.ts
3
+ var t = e`
4
+ mutation SpaceTryFunctionMutation($task: String!, $params: Json) {
5
+ SpaceTryFunction(task: $task, params: $params) {
6
+ runId
7
+ status
8
+ output
9
+ trace
10
+ steps
11
+ }
12
+ }
13
+ `;
14
+ //#endregion
15
+ export { t as default };
@@ -0,0 +1,2 @@
1
+ declare const SpaceRemoveRuntimeMutation: import('graphql').DocumentNode;
2
+ export default SpaceRemoveRuntimeMutation;
@@ -0,0 +1,9 @@
1
+ import { gql as e } from "@apollo/client/core";
2
+ //#region src/network/graphql/builder/Mutations/Space/runtime/SpaceRemoveRuntimeMutation.ts
3
+ var t = e`
4
+ mutation SpaceRemoveRuntimeMutation {
5
+ SpaceRemoveRuntime
6
+ }
7
+ `;
8
+ //#endregion
9
+ export { t as default };
@@ -0,0 +1,2 @@
1
+ declare const SpaceRemoveRuntimeVariableMutation: import('graphql').DocumentNode;
2
+ export default SpaceRemoveRuntimeVariableMutation;
@@ -0,0 +1,9 @@
1
+ import { gql as e } from "@apollo/client/core";
2
+ //#region src/network/graphql/builder/Mutations/Space/runtime/SpaceRemoveRuntimeVariableMutation.ts
3
+ var t = e`
4
+ mutation SpaceRemoveRuntimeVariableMutation($name: String!) {
5
+ SpaceRemoveRuntimeVariable(name: $name)
6
+ }
7
+ `;
8
+ //#endregion
9
+ export { t as default };
@@ -0,0 +1,2 @@
1
+ declare const SpaceSetRuntimeSizeMutation: import('graphql').DocumentNode;
2
+ export default SpaceSetRuntimeSizeMutation;
@@ -0,0 +1,9 @@
1
+ import { gql as e } from "@apollo/client/core";
2
+ //#region src/network/graphql/builder/Mutations/Space/runtime/SpaceSetRuntimeSizeMutation.ts
3
+ var t = e`
4
+ mutation SpaceSetRuntimeSizeMutation($environment: String!, $size: String!) {
5
+ SpaceSetRuntimeSize(environment: $environment, size: $size)
6
+ }
7
+ `;
8
+ //#endregion
9
+ export { t as default };
@@ -0,0 +1,2 @@
1
+ declare const SpaceSetRuntimeVariableMutation: import('graphql').DocumentNode;
2
+ export default SpaceSetRuntimeVariableMutation;
@@ -0,0 +1,9 @@
1
+ import { gql as e } from "@apollo/client/core";
2
+ //#region src/network/graphql/builder/Mutations/Space/runtime/SpaceSetRuntimeVariableMutation.ts
3
+ var t = e`
4
+ mutation SpaceSetRuntimeVariableMutation($name: String!, $value: String!) {
5
+ SpaceSetRuntimeVariable(name: $name, value: $value)
6
+ }
7
+ `;
8
+ //#endregion
9
+ export { t as default };
@@ -0,0 +1,2 @@
1
+ declare const SpaceStartRuntimeMutation: import('graphql').DocumentNode;
2
+ export default SpaceStartRuntimeMutation;
@@ -0,0 +1,9 @@
1
+ import { gql as e } from "@apollo/client/core";
2
+ //#region src/network/graphql/builder/Mutations/Space/runtime/SpaceStartRuntimeMutation.ts
3
+ var t = e`
4
+ mutation SpaceStartRuntimeMutation($environment: String!) {
5
+ SpaceStartRuntime(environment: $environment)
6
+ }
7
+ `;
8
+ //#endregion
9
+ export { t as default };
@@ -0,0 +1,2 @@
1
+ declare const SpaceStopRuntimeMutation: import('graphql').DocumentNode;
2
+ export default SpaceStopRuntimeMutation;
@@ -0,0 +1,9 @@
1
+ import { gql as e } from "@apollo/client/core";
2
+ //#region src/network/graphql/builder/Mutations/Space/runtime/SpaceStopRuntimeMutation.ts
3
+ var t = e`
4
+ mutation SpaceStopRuntimeMutation($environment: String!) {
5
+ SpaceStopRuntime(environment: $environment)
6
+ }
7
+ `;
8
+ //#endregion
9
+ export { t as default };
@@ -0,0 +1,2 @@
1
+ declare const SpaceAddVisitorMutation: import('graphql').DocumentNode;
2
+ export default SpaceAddVisitorMutation;
@@ -0,0 +1,11 @@
1
+ import { gql as e } from "@apollo/client/core";
2
+ //#region src/network/graphql/builder/Mutations/Space/visitors/SpaceAddVisitorMutation.ts
3
+ var t = e`
4
+ mutation SpaceAddVisitorMutation($email: String!, $role: String!) {
5
+ SpaceAddVisitor(email: $email, role: $role) {
6
+ id
7
+ }
8
+ }
9
+ `;
10
+ //#endregion
11
+ export { t as default };
@@ -0,0 +1,2 @@
1
+ declare const SpaceRemoveVisitorMutation: import('graphql').DocumentNode;
2
+ export default SpaceRemoveVisitorMutation;
@@ -0,0 +1,11 @@
1
+ import { gql as e } from "@apollo/client/core";
2
+ //#region src/network/graphql/builder/Mutations/Space/visitors/SpaceRemoveVisitorMutation.ts
3
+ var t = e`
4
+ mutation SpaceRemoveVisitorMutation($id: Int!) {
5
+ SpaceRemoveVisitor(id: $id) {
6
+ id
7
+ }
8
+ }
9
+ `;
10
+ //#endregion
11
+ export { t as default };