@plitzi/sdk-shared 0.37.8 → 0.37.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (249) hide show
  1. package/CHANGELOG.md +817 -0
  2. package/dist/actions/functions.d.ts +12 -3
  3. package/dist/actions/functions.mjs +8 -5
  4. package/dist/actions/index.d.ts +2 -2
  5. package/dist/actions/index.mjs +6 -6
  6. package/dist/actions/triggerParams.mjs +7 -6
  7. package/dist/actions/validateDocument.d.ts +3 -0
  8. package/dist/actions/validateDocument.mjs +89 -88
  9. package/dist/auth/failureChannel.d.ts +8 -2
  10. package/dist/auth/failureChannel.mjs +1 -3
  11. package/dist/authoring/elementCallbacks.d.ts +65 -0
  12. package/dist/authoring/elementCallbacks.mjs +72 -8
  13. package/dist/authoring/index.mjs +3 -3
  14. package/dist/builder/contexts/BuilderContext.d.ts +18 -7
  15. package/dist/builder/contexts/BuilderContext.mjs +2 -3
  16. package/dist/connectors/index.d.ts +1 -1
  17. package/dist/connectors/index.mjs +2 -2
  18. package/dist/connectors/validateManifest.d.ts +3 -0
  19. package/dist/connectors/validateManifest.mjs +77 -76
  20. package/dist/dataSource/computed.mjs +25 -29
  21. package/dist/dataSource/globalSources.d.ts +15 -0
  22. package/dist/dataSource/globalSources.mjs +13 -0
  23. package/dist/dataSource/index.d.ts +2 -0
  24. package/dist/dataSource/index.mjs +8 -7
  25. package/dist/devTools/DevToolsContext.mjs +2 -3
  26. package/dist/devTools/utils/PlitziConsole.d.ts +9 -0
  27. package/dist/devTools/utils/PlitziConsole.mjs +27 -7
  28. package/dist/elements/ComponentContext.mjs +2 -3
  29. package/dist/flags/flagsCookie.d.ts +26 -0
  30. package/dist/flags/flagsCookie.mjs +20 -0
  31. package/dist/flags/index.d.ts +3 -0
  32. package/dist/flags/index.mjs +4 -0
  33. package/dist/flags/resolveFlags.d.ts +60 -0
  34. package/dist/flags/resolveFlags.mjs +38 -0
  35. package/dist/flags/schemaFlag.d.ts +11 -0
  36. package/dist/flags/schemaFlag.mjs +9 -0
  37. package/dist/flags/useFlagResolution.d.ts +13 -0
  38. package/dist/flags/useFlagResolution.mjs +43 -0
  39. package/dist/helpers/eventTarget.d.ts +10 -0
  40. package/dist/helpers/eventTarget.mjs +4 -0
  41. package/dist/helpers/images.d.ts +18 -0
  42. package/dist/helpers/images.mjs +13 -0
  43. package/dist/helpers/index.d.ts +3 -0
  44. package/dist/helpers/index.mjs +21 -18
  45. package/dist/helpers/interval.d.ts +18 -0
  46. package/dist/helpers/interval.mjs +7 -0
  47. package/dist/helpers/isRecord.d.ts +2 -0
  48. package/dist/helpers/isRecord.mjs +4 -0
  49. package/dist/helpers/scroll.d.ts +42 -0
  50. package/dist/helpers/scroll.mjs +30 -0
  51. package/dist/helpers/sharedContext.d.ts +14 -0
  52. package/dist/helpers/sharedContext.mjs +9 -0
  53. package/dist/helpers/twigWrapper/Evaluator/Evaluator.d.ts +9 -1
  54. package/dist/helpers/twigWrapper/Evaluator/Evaluator.mjs +13 -8
  55. package/dist/helpers/twigWrapper/Evaluator/index.d.ts +1 -1
  56. package/dist/helpers/twigWrapper/TemplateCache/TemplateCache.mjs +1 -1
  57. package/dist/helpers/twigWrapper/filters/filters.mjs +38 -2
  58. package/dist/helpers/twigWrapper/index.d.ts +1 -0
  59. package/dist/helpers/twigWrapper/processTwig/processTwig.d.ts +2 -1
  60. package/dist/helpers/twigWrapper/processTwig/processTwig.mjs +3 -3
  61. package/dist/helpers/utils.mjs +4 -2
  62. package/dist/history/describe.mjs +4 -1
  63. package/dist/history/diff.d.ts +1 -1
  64. package/dist/history/diff.mjs +11 -9
  65. package/dist/history/types.d.ts +1 -1
  66. package/dist/hooks/index.mjs +5 -5
  67. package/dist/hooks/usePlitziServiceContext.d.ts +1 -2
  68. package/dist/hooks/usePlitziServiceContext.mjs +3 -4
  69. package/dist/index.d.ts +1 -1
  70. package/dist/index.mjs +90 -77
  71. package/dist/navigation/routes.mjs +6 -4
  72. package/dist/network/NetworkContext.mjs +2 -3
  73. package/dist/network/NetworkInternalContext.d.ts +2 -4
  74. package/dist/network/NetworkInternalContext.mjs +2 -3
  75. package/dist/network/graphql/builder/Mutations/Space/SpaceAddSnippetMutation.d.ts +2 -0
  76. package/dist/network/graphql/builder/Mutations/Space/SpaceAddSnippetMutation.mjs +4 -0
  77. package/dist/network/graphql/builder/Mutations/Space/components/SpaceAddComponentMutation.d.ts +4 -0
  78. package/dist/network/graphql/builder/Mutations/Space/components/SpaceAddComponentMutation.mjs +4 -0
  79. package/dist/network/graphql/builder/Mutations/Space/components/SpaceDetachInstanceMutation.d.ts +4 -0
  80. package/dist/network/graphql/builder/Mutations/Space/components/SpaceDetachInstanceMutation.mjs +4 -0
  81. package/dist/network/graphql/builder/Mutations/Space/components/SpaceRemoveComponentMutation.d.ts +4 -0
  82. package/dist/network/graphql/builder/Mutations/Space/components/SpaceRemoveComponentMutation.mjs +4 -0
  83. package/dist/network/graphql/builder/Mutations/Space/components/SpaceUpdateComponentMutation.d.ts +4 -0
  84. package/dist/network/graphql/builder/Mutations/Space/components/SpaceUpdateComponentMutation.mjs +4 -0
  85. package/dist/network/graphql/builder/Mutations/Space/flags/SpacePublishFlagsMutation.d.ts +12 -0
  86. package/dist/network/graphql/builder/Mutations/Space/flags/SpacePublishFlagsMutation.mjs +4 -0
  87. package/dist/network/graphql/builder/Mutations/Space/flags/SpaceRemoveFlagMutation.d.ts +2 -0
  88. package/dist/network/graphql/builder/Mutations/Space/flags/SpaceRemoveFlagMutation.mjs +4 -0
  89. package/dist/network/graphql/builder/Mutations/Space/flags/SpaceSetFlagMutation.d.ts +3 -0
  90. package/dist/network/graphql/builder/Mutations/Space/flags/SpaceSetFlagMutation.mjs +4 -0
  91. package/dist/network/graphql/builder/Mutations/index.d.ts +13 -30
  92. package/dist/network/graphql/builder/Mutations/index.mjs +164 -200
  93. package/dist/network/graphql/builder/Queries/InitQuery.d.ts +4 -3
  94. package/dist/network/graphql/builder/Queries/InitQuery.mjs +1 -1
  95. package/dist/network/graphql/builder/Queries/Space/SpaceActionTasksQuery.d.ts +1 -1
  96. package/dist/network/graphql/builder/Queries/Space/SpaceActionTasksQuery.mjs +1 -1
  97. package/dist/network/graphql/builder/Queries/Space/SpaceIssuesQuery.d.ts +16 -2
  98. package/dist/network/graphql/builder/Queries/Space/SpaceIssuesQuery.mjs +1 -1
  99. package/dist/network/graphql/builder/Queries/Space/SpaceVersionContentsQuery.d.ts +7 -0
  100. package/dist/network/graphql/builder/Queries/Space/SpaceVersionContentsQuery.mjs +4 -0
  101. package/dist/network/graphql/builder/Queries/index.d.ts +3 -5
  102. package/dist/network/graphql/builder/Queries/index.mjs +36 -38
  103. package/dist/network/graphql/builder/Subscriptions/SpaceEventSubscription.d.ts +1 -1
  104. package/dist/network/graphql/sdk/Queries/InitQuery.d.ts +2 -3
  105. package/dist/network/graphql/sdk/Queries/InitQuery.mjs +1 -1
  106. package/dist/network/graphql/sdk/Queries/index.d.ts +0 -4
  107. package/dist/network/graphql/sdk/Queries/index.mjs +2 -8
  108. package/dist/network/index.mjs +8 -7
  109. package/dist/network/spaceEvents.d.ts +25 -195
  110. package/dist/network/spaceEvents.mjs +156 -241
  111. package/dist/realtime/client.mjs +123 -95
  112. package/dist/realtime/topics.mjs +18 -17
  113. package/dist/schema/SchemaContext.mjs +2 -3
  114. package/dist/schema/anchor.d.ts +8 -0
  115. package/dist/schema/anchor.mjs +4 -0
  116. package/dist/schema/index.d.ts +2 -0
  117. package/dist/schema/index.mjs +6 -4
  118. package/dist/schema/schemaConstants.d.ts +2 -0
  119. package/dist/schema/schemaConstants.mjs +4 -3
  120. package/dist/schema/serverElements.d.ts +6 -2
  121. package/dist/schema/serverElements.mjs +17 -16
  122. package/dist/schema/snippet.d.ts +7 -0
  123. package/dist/schema/snippet.mjs +9 -0
  124. package/dist/schema/wire.d.ts +11 -0
  125. package/dist/schema/wire.mjs +27 -0
  126. package/dist/server/actions/useImagesSync.d.ts +9 -0
  127. package/dist/server/actions/useImagesSync.mjs +7 -0
  128. package/dist/server/rsc/refreshRsc.d.ts +3 -1
  129. package/dist/server/rsc/refreshRsc.mjs +17 -16
  130. package/dist/source/export.d.ts +107 -0
  131. package/dist/source/export.mjs +4 -0
  132. package/dist/source/index.d.ts +4 -0
  133. package/dist/source/index.mjs +3 -0
  134. package/dist/source/snapshot.d.ts +51 -0
  135. package/dist/source/snapshot.mjs +81 -0
  136. package/dist/state/paintedState.mjs +13 -12
  137. package/dist/state/runtimeStatePersist.mjs +50 -49
  138. package/dist/store/index.d.ts +45 -45
  139. package/dist/store/renderSettings.d.ts +1 -0
  140. package/dist/store/renderSettings.mjs +9 -5
  141. package/dist/style/breakpoints.d.ts +11 -0
  142. package/dist/style/breakpoints.mjs +8 -0
  143. package/dist/style/displayModes.d.ts +5 -0
  144. package/dist/style/displayModes.mjs +8 -0
  145. package/dist/style/fontValidation.mjs +52 -51
  146. package/dist/style/fonts.d.ts +0 -12
  147. package/dist/style/fonts.mjs +11 -11
  148. package/dist/style/index.d.ts +4 -0
  149. package/dist/style/index.mjs +11 -7
  150. package/dist/style/layoutGrid.d.ts +30 -0
  151. package/dist/style/layoutGrid.mjs +33 -0
  152. package/dist/style/notifications.d.ts +52 -0
  153. package/dist/style/notifications.mjs +55 -0
  154. package/dist/style/snippetStyle.d.ts +23 -0
  155. package/dist/style/snippetStyle.mjs +32 -0
  156. package/dist/style/styleConstants.d.ts +7 -2
  157. package/dist/style/styleConstants.mjs +10 -0
  158. package/dist/style/styleStates.d.ts +11 -2
  159. package/dist/style/styleStates.mjs +12 -9
  160. package/dist/theme/ThemeProvider.mjs +20 -20
  161. package/dist/theme/ThemeScope.mjs +4 -3
  162. package/dist/types/ActionTypes.d.ts +5 -0
  163. package/dist/types/CommonTypes.d.ts +3 -0
  164. package/dist/types/DevToolsTypes.d.ts +29 -4
  165. package/dist/types/ElementTypes.d.ts +6 -5
  166. package/dist/types/EventBridgeTypes.d.ts +2 -2
  167. package/dist/types/FunctionTypes.d.ts +13 -0
  168. package/dist/types/InteractionTypes.d.ts +5 -0
  169. package/dist/types/PluginTypes.d.ts +1 -1
  170. package/dist/types/ResourceTypes.d.ts +2 -2
  171. package/dist/types/SchemaTypes.d.ts +100 -3
  172. package/dist/types/SdkTypes.d.ts +0 -2
  173. package/dist/types/ServerTypes.d.ts +47 -0
  174. package/dist/types/SnippetTypes.d.ts +28 -0
  175. package/dist/types/SpaceTypes.d.ts +36 -0
  176. package/dist/types/StoreTypes.d.ts +39 -3
  177. package/dist/types/StyleTypes.d.ts +1 -1
  178. package/dist/types/index.d.ts +1 -2
  179. package/package.json +143 -138
  180. package/tailwind.config.js +1 -6
  181. package/vite.config.ts +16 -4
  182. package/dist/network/graphql/builder/Mutations/Segment/SegmentAddMutation.d.ts +0 -4
  183. package/dist/network/graphql/builder/Mutations/Segment/SegmentAddMutation.mjs +0 -4
  184. package/dist/network/graphql/builder/Mutations/Segment/SegmentAddTemplateMutation.d.ts +0 -2
  185. package/dist/network/graphql/builder/Mutations/Segment/SegmentAddTemplateMutation.mjs +0 -4
  186. package/dist/network/graphql/builder/Mutations/Segment/SegmentPublishMutation.d.ts +0 -8
  187. package/dist/network/graphql/builder/Mutations/Segment/SegmentPublishMutation.mjs +0 -4
  188. package/dist/network/graphql/builder/Mutations/Segment/SegmentRemoveMutation.d.ts +0 -2
  189. package/dist/network/graphql/builder/Mutations/Segment/SegmentRemoveMutation.mjs +0 -4
  190. package/dist/network/graphql/builder/Mutations/Segment/SegmentUpdateMutation.d.ts +0 -4
  191. package/dist/network/graphql/builder/Mutations/Segment/SegmentUpdateMutation.mjs +0 -4
  192. package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentAddElementMutation.d.ts +0 -2
  193. package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentAddElementMutation.mjs +0 -4
  194. package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentCloneElementMutation.d.ts +0 -2
  195. package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentCloneElementMutation.mjs +0 -4
  196. package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentMoveElementMutation.d.ts +0 -2
  197. package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentMoveElementMutation.mjs +0 -4
  198. package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentRemoveElementMutation.d.ts +0 -2
  199. package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentRemoveElementMutation.mjs +0 -4
  200. package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentRenameElementMutation.d.ts +0 -3
  201. package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentRenameElementMutation.mjs +0 -4
  202. package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentUpdateElementMutation.d.ts +0 -2
  203. package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentUpdateElementMutation.mjs +0 -4
  204. package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentUpdateElementsMutation.d.ts +0 -2
  205. package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentUpdateElementsMutation.mjs +0 -4
  206. package/dist/network/graphql/builder/Mutations/Segment/space/variables/SegmentSpaceAddVariableMutation.d.ts +0 -2
  207. package/dist/network/graphql/builder/Mutations/Segment/space/variables/SegmentSpaceAddVariableMutation.mjs +0 -4
  208. package/dist/network/graphql/builder/Mutations/Segment/space/variables/SegmentSpaceRemoveVariableMutation.d.ts +0 -2
  209. package/dist/network/graphql/builder/Mutations/Segment/space/variables/SegmentSpaceRemoveVariableMutation.mjs +0 -4
  210. package/dist/network/graphql/builder/Mutations/Segment/space/variables/SegmentSpaceUpdateVariableMutation.d.ts +0 -2
  211. package/dist/network/graphql/builder/Mutations/Segment/space/variables/SegmentSpaceUpdateVariableMutation.mjs +0 -4
  212. package/dist/network/graphql/builder/Mutations/Segment/style/selectorVariables/SegmentStyleAddSelectorVariableMutation.d.ts +0 -2
  213. package/dist/network/graphql/builder/Mutations/Segment/style/selectorVariables/SegmentStyleAddSelectorVariableMutation.mjs +0 -4
  214. package/dist/network/graphql/builder/Mutations/Segment/style/selectorVariables/SegmentStyleRemoveSelectorVariableMutation.d.ts +0 -2
  215. package/dist/network/graphql/builder/Mutations/Segment/style/selectorVariables/SegmentStyleRemoveSelectorVariableMutation.mjs +0 -4
  216. package/dist/network/graphql/builder/Mutations/Segment/style/selectorVariables/SegmentStyleUpdateSelectorVariableMutation.d.ts +0 -2
  217. package/dist/network/graphql/builder/Mutations/Segment/style/selectorVariables/SegmentStyleUpdateSelectorVariableMutation.mjs +0 -4
  218. package/dist/network/graphql/builder/Mutations/Segment/style/selectors/SegmentStyleAddSelectorMutation.d.ts +0 -2
  219. package/dist/network/graphql/builder/Mutations/Segment/style/selectors/SegmentStyleAddSelectorMutation.mjs +0 -4
  220. package/dist/network/graphql/builder/Mutations/Segment/style/selectors/SegmentStyleRemoveSelectorMutation.d.ts +0 -2
  221. package/dist/network/graphql/builder/Mutations/Segment/style/selectors/SegmentStyleRemoveSelectorMutation.mjs +0 -4
  222. package/dist/network/graphql/builder/Mutations/Segment/style/selectors/SegmentStyleRemoveSelectorsMutation.d.ts +0 -2
  223. package/dist/network/graphql/builder/Mutations/Segment/style/selectors/SegmentStyleRemoveSelectorsMutation.mjs +0 -4
  224. package/dist/network/graphql/builder/Mutations/Segment/style/selectors/SegmentStyleUpdateSelectorMutation.d.ts +0 -2
  225. package/dist/network/graphql/builder/Mutations/Segment/style/selectors/SegmentStyleUpdateSelectorMutation.mjs +0 -4
  226. package/dist/network/graphql/builder/Mutations/Segment/style/variables/SegmentStyleAddVariableMutation.d.ts +0 -2
  227. package/dist/network/graphql/builder/Mutations/Segment/style/variables/SegmentStyleAddVariableMutation.mjs +0 -4
  228. package/dist/network/graphql/builder/Mutations/Segment/style/variables/SegmentStyleRemoveVariableMutation.d.ts +0 -2
  229. package/dist/network/graphql/builder/Mutations/Segment/style/variables/SegmentStyleRemoveVariableMutation.mjs +0 -4
  230. package/dist/network/graphql/builder/Mutations/Segment/style/variables/SegmentStyleUpdateVariableMutation.d.ts +0 -2
  231. package/dist/network/graphql/builder/Mutations/Segment/style/variables/SegmentStyleUpdateVariableMutation.mjs +0 -4
  232. package/dist/network/graphql/builder/Mutations/Space/SpaceAddTemplateMutation.d.ts +0 -2
  233. package/dist/network/graphql/builder/Mutations/Space/SpaceAddTemplateMutation.mjs +0 -4
  234. package/dist/network/graphql/builder/Queries/Segment/SegmentQuery.d.ts +0 -6
  235. package/dist/network/graphql/builder/Queries/Segment/SegmentQuery.mjs +0 -4
  236. package/dist/network/graphql/builder/Queries/Segment/SegmentsQuery.d.ts +0 -9
  237. package/dist/network/graphql/builder/Queries/Segment/SegmentsQuery.mjs +0 -4
  238. package/dist/network/graphql/sdk/Queries/Segment/SegmentQuery.d.ts +0 -6
  239. package/dist/network/graphql/sdk/Queries/Segment/SegmentQuery.mjs +0 -4
  240. package/dist/network/graphql/sdk/Queries/Segment/SegmentsQuery.d.ts +0 -9
  241. package/dist/network/graphql/sdk/Queries/Segment/SegmentsQuery.mjs +0 -4
  242. package/dist/segments/SegmentsContext.d.ts +0 -2
  243. package/dist/segments/SegmentsContext.mjs +0 -6
  244. package/dist/segments/index.d.ts +0 -3
  245. package/dist/segments/index.mjs +0 -2
  246. package/dist/types/SegmentTypes.d.ts +0 -41
  247. package/dist/types/TemplateTypes.d.ts +0 -20
  248. package/dist/types/TemplateTypes.mjs +0 -0
  249. /package/dist/types/{SegmentTypes.mjs → SnippetTypes.mjs} +0 -0
@@ -10,14 +10,14 @@ var l = {
10
10
  iterable: (e) => Array.isArray(e) || typeof e == "object" && !!e,
11
11
  even: (e) => typeof e == "number" && e % 2 == 0,
12
12
  odd: (e) => typeof e == "number" && Math.abs(e % 2) === 1
13
- }, u = (e) => e.type === "path" || e.type === "filter" && u(e.subject), d = (e, t) => t == null || t === "" && u(e), f = (e) => e.type === "path" && e.segments.length === 1 ? e.segments[0] : e.type === "literal" && e.value === null ? "null" : void 0, p = [], m = (e, t, n = !1, r = !1) => {
14
- let i = new g(t, n, r);
13
+ }, u = (e) => e.type === "path" || e.type === "filter" && u(e.subject), d = (e, t) => t == null || t === "" && u(e), f = (e) => e.type === "path" ? e.segments[0] : e.type === "filter" ? f(e.subject) : void 0, p = (e) => e.type === "path" && e.segments.length === 1 ? e.segments[0] : e.type === "literal" && e.value === null ? "null" : void 0, m = [], h = (e, t, n = !1, r = !1) => {
14
+ let i = new _(t, n, r);
15
15
  return {
16
16
  output: i.evalNodes(e),
17
17
  variables: i.variables,
18
18
  hasSet: i.hasSet
19
19
  };
20
- }, h = (e, t) => new g(t).evalExpression(e), g = class u {
20
+ }, g = (e, t) => new _(t).evalExpression(e), _ = class u {
21
21
  variables;
22
22
  keepEmptyTokens;
23
23
  jsonStrings;
@@ -29,6 +29,11 @@ var l = {
29
29
  constructor(e, t = !1, n = !1) {
30
30
  this.variables = { ...e }, this.keepEmptyTokens = t, this.jsonStrings = n;
31
31
  }
32
+ keeps(e) {
33
+ if (typeof this.keepEmptyTokens == "boolean") return this.keepEmptyTokens;
34
+ let t = f(e);
35
+ return t === void 0 || !this.keepEmptyTokens.settled.has(t);
36
+ }
32
37
  evalNodes(e) {
33
38
  let t = e.length;
34
39
  if (t === 0) return "";
@@ -51,7 +56,7 @@ var l = {
51
56
  }
52
57
  evalVariable(e) {
53
58
  let t = this.evalExpression(e.expression);
54
- return this.keepEmptyTokens && d(e.expression, t) ? e.source : o(t) ? String(s(t)) : typeof t == "function" ? "" : t != null && typeof t != "object" ? String(t) : e.raw ? t == null ? "" : String(t) : typeof t == "object" && t ? JSON.stringify(t) : "";
59
+ return this.keeps(e.expression) && d(e.expression, t) ? e.source : o(t) ? String(s(t)) : typeof t == "function" ? "" : t != null && typeof t != "object" ? String(t) : e.raw ? t == null ? "" : String(t) : typeof t == "object" && t ? JSON.stringify(t) : "";
55
60
  }
56
61
  followQuotes(e) {
57
62
  for (let t = 0; t < e.length; t++) {
@@ -66,7 +71,7 @@ var l = {
66
71
  }
67
72
  evalFor(e) {
68
73
  let r = this.evalExpression(e.collection);
69
- if (e.source !== void 0 && r === void 0) return e.source;
74
+ if (e.source !== void 0 && r === void 0 && this.keeps(e.collection)) return e.source;
70
75
  let i, a = null;
71
76
  if (e.keyVar !== null) {
72
77
  let t = n(r);
@@ -112,7 +117,7 @@ var l = {
112
117
  let n = e;
113
118
  for (let e of t) {
114
119
  let t = a[e.name];
115
- t !== void 0 && (n = t(n, e.args.length === 0 ? p : this.evalArgs(e.args)));
120
+ t !== void 0 && (n = t(n, e.args.length === 0 ? m : this.evalArgs(e.args)));
116
121
  }
117
122
  return n;
118
123
  }
@@ -221,7 +226,7 @@ var l = {
221
226
  return a;
222
227
  }
223
228
  evalBinary(t, n, i) {
224
- let a = f(i);
229
+ let a = p(i);
225
230
  if ((t === "is" || t === "is not") && a !== void 0) {
226
231
  let e = l[a];
227
232
  if (e) {
@@ -262,4 +267,4 @@ var l = {
262
267
  }
263
268
  };
264
269
  //#endregion
265
- export { m as evaluate, h as evaluateExpression };
270
+ export { h as evaluate, g as evaluateExpression };
@@ -1,2 +1,2 @@
1
1
  export { evaluate, evaluateExpression } from './Evaluator';
2
- export type { EvalResult } from './Evaluator';
2
+ export type { EvalResult, KeepEmptyTokens } from './Evaluator';
@@ -2,7 +2,7 @@ import { isDottedPath as e } from "../charClass.mjs";
2
2
  import { lex as t } from "../Lexer/Lexer.mjs";
3
3
  import { parse as n } from "../Parser/Parser.mjs";
4
4
  //#region src/helpers/twigWrapper/TemplateCache/TemplateCache.ts
5
- var r = /* @__PURE__ */ new Map(), i = 256, a = {
5
+ var r = /* @__PURE__ */ new Map(), i = 1024, a = {
6
6
  hits: 0,
7
7
  misses: 0
8
8
  }, o = () => ({
@@ -151,7 +151,20 @@ var e = Symbol("twigArrowParams"), t = (e) => e == null || e === "", n = (e, t)
151
151
  seconds: Number(i("second")),
152
152
  weekday: f.indexOf(i("weekday"))
153
153
  };
154
- }, _ = {
154
+ }, _ = (e) => {
155
+ if (typeof e == "number") return Number.isFinite(e) ? e : void 0;
156
+ if (typeof e == "string" && e.trim() !== "") {
157
+ let t = Number(e);
158
+ return Number.isFinite(t) ? t : void 0;
159
+ }
160
+ }, v = (e, t, n) => {
161
+ for (let r of [t == null ? "en" : i(t), "en"]) try {
162
+ return new Intl.NumberFormat(r, n).format(e);
163
+ } catch {
164
+ continue;
165
+ }
166
+ return String(e);
167
+ }, y = {
155
168
  raw: (e) => u(e),
156
169
  to_json: (e) => r(e),
157
170
  json_encode: (e) => r(e),
@@ -220,6 +233,29 @@ var e = Symbol("twigArrowParams"), t = (e) => e == null || e === "", n = (e, t)
220
233
  let s = o.split(".");
221
234
  return s[0] = s[0].replace(/\B(?=(\d{3})+(?!\d))/g, a), s.join(r);
222
235
  },
236
+ currency: (e, t) => {
237
+ let n = _(e);
238
+ if (n === void 0 || t.length === 0) return e;
239
+ let r = t[2], a = typeof r == "object" && !!r && "trimZeros" in r && r.trimZeros === !0 && Number.isInteger(n);
240
+ return v(n, t[1], {
241
+ style: "currency",
242
+ currency: i(t[0]),
243
+ ...a ? {
244
+ minimumFractionDigits: 0,
245
+ maximumFractionDigits: 0
246
+ } : {}
247
+ });
248
+ },
249
+ percent: (e, t) => {
250
+ let n = _(e);
251
+ if (n === void 0) return e;
252
+ let r = Number(t[0]) || 0;
253
+ return v(n, t[1], {
254
+ style: "percent",
255
+ minimumFractionDigits: 0,
256
+ maximumFractionDigits: r
257
+ });
258
+ },
223
259
  sort: (t, r) => {
224
260
  if (!Array.isArray(t)) return t;
225
261
  let i = [...t], a = r[0];
@@ -447,4 +483,4 @@ var e = Symbol("twigArrowParams"), t = (e) => e == null || e === "", n = (e, t)
447
483
  }
448
484
  };
449
485
  //#endregion
450
- export { e as ARROW_PARAMS, c as RAW_MARKER, _ as filters, l as isRawMarker, d as unwrapRaw, u as wrapRaw };
486
+ export { e as ARROW_PARAMS, c as RAW_MARKER, y as filters, l as isRawMarker, d as unwrapRaw, u as wrapRaw };
@@ -6,5 +6,6 @@ export { inspectTemplate } from './inspectTemplate';
6
6
  export { templatePaths, templateRootNames } from './templateRoots';
7
7
  export { filters } from './filters/filters';
8
8
  export type { ASTNode, Expression } from './AST';
9
+ export type { KeepEmptyTokens } from './Evaluator';
9
10
  export type { TemplateInspection } from './inspectTemplate';
10
11
  export type { TwigFilter } from './filters/filters';
@@ -1,4 +1,5 @@
1
- export declare const processTwig: (template: string, variables?: Record<string, unknown>, keepEmptyTokens?: boolean, asRaw?: boolean) => unknown;
1
+ import { KeepEmptyTokens } from '../Evaluator';
2
+ export declare const processTwig: (template: string, variables?: Record<string, unknown>, keepEmptyTokens?: KeepEmptyTokens, asRaw?: boolean) => unknown;
2
3
  /**
3
4
  * A template's VALUE, where it has one: `{{ rows|filter(r => r.open) }}` is the filtered array, `{{ count > 0 }}` a
4
5
  * boolean, `{{ total }}` the number it holds.
@@ -8,14 +8,14 @@ var s = (i, s = {}, c = !1, l = !1) => {
8
8
  if (i.indexOf("{%") === -1 && i.indexOf("{{") === -1) return i;
9
9
  let u = "variables" in s ? t(s) : s, d = o(i);
10
10
  if (!d) return i;
11
- if (!c && !d.hasTags && d.allSimpleOrDotted) {
11
+ if (c === !1 && !d.hasTags && d.allSimpleOrDotted) {
12
12
  let t = n(d, u);
13
13
  return l ? e(t) : t;
14
14
  }
15
- let f = a(d, c);
15
+ let f = a(d, c !== !1);
16
16
  if (!f) return i;
17
17
  let { output: p, variables: m, hasSet: h } = r(f, u, c);
18
- return h && Object.assign(s, m), c && p === i ? i : l ? e(p) : p;
18
+ return h && Object.assign(s, m), c !== !1 && p === i ? i : l ? e(p) : p;
19
19
  } catch {
20
20
  return i;
21
21
  }
@@ -8,7 +8,7 @@ Object.freeze(n);
8
8
  var r = (e, t = "", n = ".", i = !1) => !e || typeof e != "object" ? [] : Object.keys(e).reduce((a, o) => {
9
9
  o = o.replaceAll(n, "").replaceAll(".", "");
10
10
  let s = `${t}${t ? n : ""}${o}`;
11
- return typeof e[o] != "object" || Array.isArray(e[o]) && i ? [...a, s] : [
11
+ return typeof e[o] != "object" || Array.isArray(e[o]) && (i || e[o].length > 5) ? [...a, s] : [
12
12
  ...a,
13
13
  s,
14
14
  ...r(e[o], s, n, i)
@@ -29,7 +29,9 @@ function a(t, n) {
29
29
  } catch {
30
30
  return 0;
31
31
  }
32
- return n ? e(r, "data.spaceId", 0) : r;
32
+ if (!n) return r;
33
+ let i = Number(e(r, "sub", 0));
34
+ return Number.isInteger(i) && i > 0 ? i : 0;
33
35
  }
34
36
  function o(e) {
35
37
  !e && typeof window < "u" && (e = window.location.search);
@@ -1,5 +1,6 @@
1
+ import { isRecord as e } from "../helpers/isRecord.mjs";
1
2
  //#region src/history/describe.ts
2
- var e = (e) => typeof e == "object" && !!e && !Array.isArray(e), t = (n, r, i = "") => e(n) && e(r) ? [.../* @__PURE__ */ new Set([...Object.keys(n), ...Object.keys(r)])].flatMap((e) => t(n[e], r[e], i ? `${i}.${e}` : e)) : JSON.stringify(n) === JSON.stringify(r) ? [] : [{
3
+ var t = (n, r, i = "") => e(n) && e(r) ? [.../* @__PURE__ */ new Set([...Object.keys(n), ...Object.keys(r)])].flatMap((e) => t(n[e], r[e], i ? `${i}.${e}` : e)) : JSON.stringify(n) === JSON.stringify(r) ? [] : [{
3
4
  path: i,
4
5
  ...n === void 0 ? {} : { before: n },
5
6
  ...r === void 0 ? {} : { after: r }
@@ -25,8 +26,10 @@ var e = (e) => typeof e == "object" && !!e && !Array.isArray(e), t = (n, r, i =
25
26
  };
26
27
  return Object.hasOwn(i, r) ? i[r] : r;
27
28
  }, s = (e, t = 3) => e.length > t ? `${e.slice(0, t).join(", ")} and ${e.length - t} more` : e.join(", "), c = {
29
+ component: "component",
28
30
  folder: "folder",
29
31
  variable: "variable",
32
+ flag: "feature flag",
30
33
  setting: "setting",
31
34
  selector: "class",
32
35
  globalStyle: "global style for",
@@ -16,7 +16,7 @@ export declare const sameValue: (a: unknown, b: unknown) => boolean;
16
16
  */
17
17
  export declare const jsonCopy: <T>(value: T) => T;
18
18
  /** The part of a schema a history reads: what is stored, never what the runtime derives from it. */
19
- export type HistorySchema = Pick<Schema, 'flat' | 'pages' | 'pageFolders' | 'variables' | 'settings' | 'definition'>;
19
+ export type HistorySchema = Pick<Schema, 'flat' | 'pages' | 'pageFolders' | 'variables' | 'flags' | 'settings' | 'definition' | 'components'>;
20
20
  /**
21
21
  * What changed between two versions of a schema, entity by entity.
22
22
  *
@@ -26,10 +26,12 @@ var e = (t, n) => {
26
26
  before: a
27
27
  });
28
28
  return i;
29
- }, r = (e, t) => Object.fromEntries((e ?? []).map((e) => [t(e), e])), i = (e, t) => Object.fromEntries(Object.entries(t ?? {}).map(([t, n]) => [`${e}.${t}`, n])), a = (e, t) => [
30
- ...n("element", e.flat ?? {}, t.flat ?? {}),
29
+ }, r = (e, t) => Object.fromEntries((e ?? []).map((e) => [t(e), e])), i = (e, t) => Object.fromEntries(Object.entries(t ?? {}).map(([t, n]) => [`${e}.${t}`, n])), a = (e) => Object.fromEntries([e.flat ?? {}, ...Object.values(e.components ?? {}).map((e) => e.flat)].flatMap((e) => Object.entries(e))), o = (e) => Object.fromEntries(Object.entries(e.components ?? {}).map(([e, { flat: t, ...n }]) => [e, n])), s = (e, t) => [
30
+ ...n("element", a(e), a(t)),
31
+ ...n("component", o(e), o(t)),
31
32
  ...n("folder", r(e.pageFolders, (e) => e.id), r(t.pageFolders, (e) => e.id)),
32
33
  ...n("variable", r(e.variables, (e) => e.name), r(t.variables, (e) => e.name)),
34
+ ...n("flag", e.flags ?? {}, t.flags ?? {}),
33
35
  ...n("setting", {
34
36
  ...i("settings", e.settings),
35
37
  ...i("definition", e.definition),
@@ -39,26 +41,26 @@ var e = (t, n) => {
39
41
  ...i("definition", t.definition),
40
42
  pages: t.pages
41
43
  })
42
- ], o = {
44
+ ], c = {
43
45
  class: "selector",
44
46
  element: "globalStyle",
45
47
  id: "idStyle"
46
- }, s = (e) => {
48
+ }, l = (e) => {
47
49
  let t = {};
48
50
  for (let [n, r] of Object.entries(e ?? {})) for (let [e, i] of Object.entries(r)) {
49
- let r = o[i.type], a = t[r] ??= {};
51
+ let r = c[i.type], a = t[r] ??= {};
50
52
  (a[e] ??= {})[n] = i;
51
53
  }
52
54
  return t;
53
- }, c = (e) => Object.fromEntries(Object.entries(e ?? {}).flatMap(([e, t]) => Object.entries(t).map(([t, n]) => [`${e}/${t}`, n]))), l = (e, t) => {
54
- let i = s(e.platform), a = s(t.platform);
55
+ }, u = (e) => Object.fromEntries(Object.entries(e ?? {}).flatMap(([e, t]) => Object.entries(t).map(([t, n]) => [`${e}/${t}`, n]))), d = (e, t) => {
56
+ let i = l(e.platform), a = l(t.platform);
55
57
  return [
56
58
  ...[
57
59
  "selector",
58
60
  "globalStyle",
59
61
  "idStyle"
60
62
  ].flatMap((e) => n(e, i[e] ?? {}, a[e] ?? {})),
61
- ...n("token", c(e.variables), c(t.variables)),
63
+ ...n("token", u(e.variables), u(t.variables)),
62
64
  ...n("font", r(e.fonts, (e) => e.family), r(t.fonts, (e) => e.family)),
63
65
  ...n("setting", {
64
66
  theme: e.theme,
@@ -70,4 +72,4 @@ var e = (t, n) => {
70
72
  ];
71
73
  };
72
74
  //#endregion
73
- export { a as diffSchema, l as diffStyle, t as jsonCopy, e as sameValue };
75
+ export { s as diffSchema, d as diffStyle, t as jsonCopy, e as sameValue };
@@ -11,7 +11,7 @@ export type ChangeOrigin = 'builder' | 'mcp' | 'coworker' | 'autofix' | 'api' |
11
11
  * (a bare element selector), an id style, a design token (`<category>/<name>`), a font family, a style setting
12
12
  * (`theme`, `mode`). Functions: a file of their source, by its path (`index.ts`, `lib/feed.ts`).
13
13
  */
14
- export type ChangeKind = 'element' | 'folder' | 'variable' | 'setting' | 'selector' | 'globalStyle' | 'idStyle' | 'token' | 'font' | 'file';
14
+ export type ChangeKind = 'element' | 'component' | 'folder' | 'variable' | 'flag' | 'setting' | 'selector' | 'globalStyle' | 'idStyle' | 'token' | 'font' | 'file';
15
15
  /** One entity that changed, whole, before and after: the field-level difference is derived from the two. */
16
16
  export type ChangeEntry = {
17
17
  kind: ChangeKind;
@@ -1,5 +1,5 @@
1
- import e from "./useFontHead.mjs";
2
- import t from "./useNetwork.mjs";
3
- import n, { PlitziServiceContext as r, PlitziServiceProvider as i } from "./usePlitziServiceContext.mjs";
4
- import a from "./useStableValue.mjs";
5
- export { r as PlitziServiceContext, i as PlitziServiceProvider, e as useFontHead, t as useNetwork, n as usePlitziServiceContext, a as useStableValue };
1
+ import e from "./useStableValue.mjs";
2
+ import t from "./useFontHead.mjs";
3
+ import n from "./useNetwork.mjs";
4
+ import r, { PlitziServiceContext as i, PlitziServiceProvider as a } from "./usePlitziServiceContext.mjs";
5
+ export { i as PlitziServiceContext, a as PlitziServiceProvider, t as useFontHead, n as useNetwork, r as usePlitziServiceContext, e as useStableValue };
@@ -1,6 +1,6 @@
1
1
  import { BuilderContextValue } from '../builder';
2
2
  import { NetworkContextValue } from '../network';
3
- import { ComponentContextValue, EventBridgeContextValue, InteractionsContextValue, PluginsContextValue, ColorScheme, SegmentsContextValue } from '../types';
3
+ import { ComponentContextValue, EventBridgeContextValue, InteractionsContextValue, PluginsContextValue, ColorScheme } from '../types';
4
4
  import { Context, ReactNode, RefObject } from 'react';
5
5
  export type PlitziServiceContextValue<TEventBridge = any, TInteractions = any> = {
6
6
  settings: {
@@ -20,7 +20,6 @@ export type PlitziServiceContextValue<TEventBridge = any, TInteractions = any> =
20
20
  };
21
21
  customContexts: Record<string, Context<any>>;
22
22
  contexts: {
23
- SegmentsContext: Context<SegmentsContextValue>;
24
23
  ComponentContext: Context<ComponentContextValue>;
25
24
  EventBridgeContext: Context<EventBridgeContextValue<TEventBridge>>;
26
25
  PluginsContext: Context<PluginsContextValue>;
@@ -1,8 +1,7 @@
1
- import { createContext as e, use as t } from "react";
1
+ import { sharedContext as e } from "../helpers/sharedContext.mjs";
2
+ import { use as t } from "react";
2
3
  import { jsx as n } from "react/jsx-runtime";
3
- var r = e({});
4
- r.displayName = "PlitziServiceContext";
5
- var i = () => {
4
+ var r = e("PlitziServiceContext", {}), i = () => {
6
5
  let e = t(r);
7
6
  if (e === void 0) throw Error("ServiceContext value is undefined. Make sure you use the PlitziServiceProvider before using the hook.");
8
7
  return e;
package/dist/index.d.ts CHANGED
@@ -10,10 +10,10 @@ export * from './dataSource';
10
10
  export * from './connectors';
11
11
  export * from './network';
12
12
  export * from './network/graphql';
13
- export * from './segments';
14
13
  export * from './websockets';
15
14
  export * from './devTools';
16
15
  export * from './theme';
17
16
  export * from './server';
18
17
  export * from './state';
19
18
  export * from './history';
19
+ export * from './flags';
package/dist/index.mjs CHANGED
@@ -1,77 +1,90 @@
1
- import { authFailureFromResponse as e, onAuthFailure as t, reportAuthFailure as n, sameRegistrableDomain as r } from "./auth/failureChannel.mjs";
2
- import { VISITOR_NAME as i, checkVisitorRoles as a, visitorAccess as o } from "./auth/visitorRoles.mjs";
3
- import { filters as s } from "./helpers/twigWrapper/filters/filters.mjs";
4
- import { processTwig as c, processTwigParam as l, processTwigValue as u } from "./helpers/twigWrapper/processTwig/processTwig.mjs";
5
- import { hasTemplateSyntax as d } from "./helpers/twigWrapper/tokens/hasTemplateSyntax.mjs";
6
- import { hasValidToken as f } from "./helpers/twigWrapper/tokens/hasValidToken.mjs";
7
- import { MAX_PARAM_PASSES as p, resolveStepParam as m } from "./helpers/twigWrapper/processTwig/resolveStepParam.mjs";
8
- import { inspectTemplate as h } from "./helpers/twigWrapper/inspectTemplate.mjs";
9
- import { templatePaths as g, templateRootNames as _ } from "./helpers/twigWrapper/templateRoots.mjs";
10
- import v from "./builder/contexts/BuilderContext.mjs";
11
- import { contexts_exports as y } from "./builder/contexts/index.mjs";
12
- import { BODYLESS_METHODS as b, CONNECTOR_HTTP_METHODS as x, DEFAULT_READ_ENDPOINT as S, EMPTY_RESPONSE_METHODS as C, READ_ENDPOINT_NAMES as w, WRITE_ENDPOINT_NAMES as T } from "./connectors/constants.mjs";
13
- import { connectorTokens as E, getConnectorTokens as D } from "./connectors/manifestTokens.mjs";
14
- import { connectorPresets as O, emptyManifest as k } from "./connectors/presets.mjs";
15
- import { validateConnectorManifest as A } from "./connectors/validateManifest.mjs";
16
- import { evaluateComputed as j, liveSources as M } from "./dataSource/computed.mjs";
17
- import N from "./helpers/fetchManifest.mjs";
18
- import P from "./helpers/generateFacade.mjs";
19
- import F from "./helpers/syntaxHighlight.mjs";
20
- import { cookieFromHeader as I, documentCookies as L } from "./helpers/cookies.mjs";
21
- import { formatDate as R, formatDateUTC as z, formatFromNow as B, formatUTCToLocal as V, getDurationMs as H, isValidFormat as U, parseDate as W, toUnixSeconds as G } from "./helpers/formatDate.mjs";
22
- import { isDate as K } from "./helpers/isDate.mjs";
23
- import { isUserEdit as q } from "./helpers/reducerOrigin.mjs";
24
- import { evaluateRuleGroup as J } from "./helpers/ruleEvaluator.mjs";
25
- import { ParamsFromURL as Y, delay as X, emptyObject as Z, getDisplayName as Q, getKeyDecoded as $, getPathsFromObeject as ee, hexToRGB as te, isInViewport as ne, makeId as re } from "./helpers/utils.mjs";
26
- import { disableReactDevTools as ie } from "./helpers/security.mjs";
27
- import ae, { utilityOptions as oe } from "./dataSource/utility/index.mjs";
28
- import se from "./dataSource/getBindingsDetails.mjs";
29
- import ce from "./dataSource/helpers/getSourceName.mjs";
30
- import le from "./dataSource/hooks/useRegisterSource.mjs";
31
- import ue from "./dataSource/resolveVariables.mjs";
32
- import de from "./devTools/DevToolsContext.mjs";
33
- import { debugCookieName as fe } from "./devTools/debugCookie.mjs";
34
- import pe from "./devTools/interactionLog.mjs";
35
- import me, { createStoreDevToolsLogger as he, pConsole as ge } from "./devTools/utils/PlitziConsole.mjs";
36
- import _e from "./elements/ComponentContext.mjs";
37
- import { describeChange as ve, fieldChanges as ye, uniqueLines as be } from "./history/describe.mjs";
38
- import { diffSchema as xe, diffStyle as Se, jsonCopy as Ce, sameValue as we } from "./history/diff.mjs";
39
- import Te from "./hooks/useFontHead.mjs";
40
- import Ee from "./hooks/useNetwork.mjs";
41
- import De, { PlitziServiceContext as Oe, PlitziServiceProvider as ke } from "./hooks/usePlitziServiceContext.mjs";
42
- import Ae from "./hooks/useStableValue.mjs";
43
- import { WHILE_RUNNING_MODES as je } from "./types/SchemaTypes.mjs";
44
- import { StyleVariableCategory as Me } from "./types/StyleTypes.mjs";
45
- import Ne, { EMPTY_STYLE_SCHEMA as Pe, StyleBindingsAllowed as Fe, baseDefaultValue as Ie, inheritableAttributesBase as Le } from "./style/styleConstants.mjs";
46
- import { fontLinkAssets as Re } from "./style/fontAssets.mjs";
47
- import { SYSTEM_FONTS as ze, availableFonts as Be, familiesInCss as Ve, fontFamilyStack as He, fontUrlResolver as Ue, fontsToHead as We, googleCss2Url as Ge, googleTextSubsetUrl as Ke, isSafeFontUrl as qe, primaryFamily as Je } from "./style/fonts.mjs";
48
- import { FontValidationError as Ye, parseSpaceFont as Xe } from "./style/fontValidation.mjs";
49
- import { fallbackForFamily as Ze, fontsFromCss as Qe } from "./style/fontsFromCss.mjs";
50
- import { RUNTIME_STYLE_ID as $e, markStyleCache as et, styleCacheFromDocument as tt, styleCacheTravelsInDocument as nt } from "./style/runtimeStyle.mjs";
51
- import { HIDDEN_CLASS as rt, STYLE_STATES as it, STYLE_STATE_LABELS as at, inCascadeOrder as ot, isKnownState as st, isStartingState as ct, stateSuffix as lt } from "./style/styleStates.mjs";
52
- import ut from "./schema/SchemaContext.mjs";
53
- import { EMPTY_SCHEMA as dt, VARIABLE_REGEX as ft } from "./schema/schemaConstants.mjs";
54
- import { findLayoutCycle as pt, resolveLayoutChain as mt } from "./schema/layoutChain.mjs";
55
- import { collectServerElements as ht, hasServerElements as gt } from "./schema/serverElements.mjs";
56
- import _t from "./network/NetworkContext.mjs";
57
- import vt from "./network/NetworkInternalContext.mjs";
58
- import { SpaceEvents as yt, schemaFromWire as bt, schemaToWire as xt, spaceEventSchemas as St, validateSpaceEvent as Ct } from "./network/spaceEvents.mjs";
59
- import wt from "./network/graphql/builder/Mutations/index.mjs";
60
- import Tt from "./network/graphql/builder/Queries/index.mjs";
61
- import Et from "./network/graphql/builder/Subscriptions/index.mjs";
62
- import Dt from "./network/graphql/sdk/Mutations/index.mjs";
63
- import Ot from "./network/graphql/sdk/Queries/index.mjs";
64
- import kt from "./segments/SegmentsContext.mjs";
65
- import At, { RTEvent as jt, RTEventCloseCode as Mt, getInstance as Nt, isRTEvent as Pt, setInstance as Ft } from "./websockets/RTCodec.mjs";
66
- import { THEME_CLASSES as It, THEME_COOKIE_NAME as Lt, applyThemeClass as Rt, isTheme as zt, readThemeCookie as Bt, themeFromCookies as Vt, writeThemeCookie as Ht } from "./theme/themeCookie.mjs";
67
- import Ut, { createThemeState as Wt, createThemeStore as Gt, resolveScheme as Kt, setAreaTheme as qt, setMachineScheme as Jt, setThemeMode as Yt, themeFor as Xt } from "./theme/themeStore.mjs";
68
- import { useThemeStore as Zt } from "./theme/ThemeScope.mjs";
69
- import Qt from "./theme/ThemeProvider.mjs";
70
- import $t, { SPACE_THEME_AREA as en } from "./theme/useTheme.mjs";
71
- import tn from "./server/actions/useActionsSync.mjs";
72
- import nn, { currentRscLocation as rn, rscDataPath as an } from "./server/rsc/refreshRsc.mjs";
73
- import on from "./server/rsc/useRscRefresh.mjs";
74
- import sn from "./server/rsc/useRscSync.mjs";
75
- import { PAINTED_STATE_BUDGET as cn, clearPaintedEntry as ln, paintedEntryFromCookies as un, paintedKeys as dn, paintedStateCookieName as fn, paintedStateFor as pn, pickPainted as mn, readPaintedEntry as hn, writePaintedEntry as gn } from "./state/paintedState.mjs";
76
- import { runtimeStatePersist as _n, stateOwner as vn } from "./state/runtimeStatePersist.mjs";
77
- export { b as BODYLESS_METHODS, v as BuilderContext, wt as BuilderMutations, Tt as BuilderQueries, x as CONNECTOR_HTTP_METHODS, _e as ComponentContext, S as DEFAULT_READ_ENDPOINT, de as DevToolsContext, C as EMPTY_RESPONSE_METHODS, dt as EMPTY_SCHEMA, Pe as EMPTY_STYLE_SCHEMA, Ye as FontValidationError, rt as HIDDEN_CLASS, p as MAX_PARAM_PASSES, _t as NetworkContext, vt as NetworkInternalContext, cn as PAINTED_STATE_BUDGET, Y as ParamsFromURL, me as PlitziConsole, Oe as PlitziServiceContext, ke as PlitziServiceProvider, w as READ_ENDPOINT_NAMES, At as RTCodec, jt as RTEvent, Mt as RTEventCloseCode, $e as RUNTIME_STYLE_ID, en as SPACE_THEME_AREA, it as STYLE_STATES, at as STYLE_STATE_LABELS, ze as SYSTEM_FONTS, ut as SchemaContext, Dt as SdkMutations, Ot as SdkQueries, kt as SegmentsContext, Et as SpaceEventSubscription, yt as SpaceEvents, Fe as StyleBindingsAllowed, Me as StyleVariableCategory, It as THEME_CLASSES, Lt as THEME_COOKIE_NAME, Qt as ThemeProvider, ft as VARIABLE_REGEX, i as VISITOR_NAME, je as WHILE_RUNNING_MODES, T as WRITE_ENDPOINT_NAMES, Rt as applyThemeClass, e as authFailureFromResponse, Be as availableFonts, Ie as baseDefaultValue, a as checkVisitorRoles, ln as clearPaintedEntry, ht as collectServerElements, O as connectorPresets, E as connectorTokens, y as contexts, I as cookieFromHeader, he as createStoreDevToolsLogger, Wt as createThemeState, Gt as createThemeStore, rn as currentRscLocation, fe as debugCookieName, X as delay, ve as describeChange, xe as diffSchema, Se as diffStyle, ie as disableReactDevTools, L as documentCookies, k as emptyManifest, Z as emptyObject, j as evaluateComputed, J as evaluateRuleGroup, Ze as fallbackForFamily, Ve as familiesInCss, N as fetchManifest, ye as fieldChanges, s as filters, pt as findLayoutCycle, He as fontFamilyStack, Re as fontLinkAssets, Ue as fontUrlResolver, Qe as fontsFromCss, We as fontsToHead, R as formatDate, z as formatDateUTC, B as formatFromNow, V as formatUTCToLocal, P as generateFacade, se as getBindingsDetails, D as getConnectorTokens, Q as getDisplayName, H as getDurationMs, Nt as getInstance, $ as getKeyDecoded, ee as getPathsFromObeject, ce as getSourceName, Ge as googleCss2Url, Ke as googleTextSubsetUrl, gt as hasServerElements, d as hasTemplateSyntax, f as hasValidToken, te as hexToRGB, ot as inCascadeOrder, Le as inheritableAttributesBase, h as inspectTemplate, K as isDate, ne as isInViewport, pe as isInteractionFlow, st as isKnownState, Pt as isRTEvent, qe as isSafeFontUrl, ct as isStartingState, zt as isTheme, q as isUserEdit, U as isValidFormat, Ce as jsonCopy, M as liveSources, re as makeId, et as markStyleCache, t as onAuthFailure, ge as pConsole, un as paintedEntryFromCookies, dn as paintedKeys, fn as paintedStateCookieName, pn as paintedStateFor, W as parseDate, Xe as parseSpaceFont, mn as pickPainted, Je as primaryFamily, c as processTwig, l as processTwigParam, u as processTwigValue, hn as readPaintedEntry, Bt as readThemeCookie, nn as refreshRsc, n as reportAuthFailure, mt as resolveLayoutChain, Kt as resolveScheme, m as resolveStepParam, ue as resolveVariables, an as rscDataPath, _n as runtimeStatePersist, r as sameRegistrableDomain, we as sameValue, bt as schemaFromWire, xt as schemaToWire, qt as setAreaTheme, Ft as setInstance, Jt as setMachineScheme, Yt as setThemeMode, St as spaceEventSchemas, vn as stateOwner, lt as stateSuffix, tt as styleCacheFromDocument, nt as styleCacheTravelsInDocument, Ne as styleConstants, F as syntaxHighlight, g as templatePaths, _ as templateRootNames, Xt as themeFor, Vt as themeFromCookies, Ut as themeStore, G as toUnixSeconds, be as uniqueLines, tn as useActionsSync, Te as useFontHead, Ee as useNetwork, De as usePlitziServiceContext, le as useRegisterSource, on as useRscRefresh, sn as useRscSync, Ae as useStableValue, $t as useTheme, Zt as useThemeStore, ae as utility, oe as utilityOptions, A as validateConnectorManifest, Ct as validateSpaceEvent, o as visitorAccess, gn as writePaintedEntry, Ht as writeThemeCookie };
1
+ import { isRecord as e } from "./helpers/isRecord.mjs";
2
+ import { authFailureFromResponse as t, onAuthFailure as n, reportAuthFailure as r, sameRegistrableDomain as i } from "./auth/failureChannel.mjs";
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 { isConnectorManifestDraft as j, validateConnectorManifest as M } from "./connectors/validateManifest.mjs";
17
+ import { COMPUTED_GLOBALS as N, GLOBAL_SOURCES as P } from "./dataSource/globalSources.mjs";
18
+ import { evaluateComputed as F, liveSources as I } from "./dataSource/computed.mjs";
19
+ import L from "./helpers/fetchManifest.mjs";
20
+ import R from "./helpers/generateFacade.mjs";
21
+ import z from "./helpers/syntaxHighlight.mjs";
22
+ import { cookieFromHeader as B, documentCookies as V } from "./helpers/cookies.mjs";
23
+ import { elementOf as H, isElementTarget as U, isNodeTarget as W, nodeOf as G } from "./helpers/eventTarget.mjs";
24
+ import { formatDate as K, formatDateUTC as q, formatFromNow as J, formatUTCToLocal as Y, getDurationMs as X, isValidFormat as Z, parseDate as Q, toUnixSeconds as $ } from "./helpers/formatDate.mjs";
25
+ import { INTERVAL_TRIGGER as ee, MIN_INTERVAL_MS as te, intervalOf as ne } from "./helpers/interval.mjs";
26
+ import { isDate as re } from "./helpers/isDate.mjs";
27
+ import { isUserEdit as ie } from "./helpers/reducerOrigin.mjs";
28
+ import { evaluateRuleGroup as ae } from "./helpers/ruleEvaluator.mjs";
29
+ import { ParamsFromURL as oe, delay as se, emptyObject as ce, getDisplayName as le, getKeyDecoded as ue, getPathsFromObeject as de, hexToRGB as fe, isInViewport as pe, makeId as me } from "./helpers/utils.mjs";
30
+ import { disableReactDevTools as he } from "./helpers/security.mjs";
31
+ import ge, { utilityOptions as _e } from "./dataSource/utility/index.mjs";
32
+ import ve from "./dataSource/getBindingsDetails.mjs";
33
+ import ye from "./dataSource/helpers/getSourceName.mjs";
34
+ import be from "./dataSource/hooks/useRegisterSource.mjs";
35
+ import xe from "./dataSource/resolveVariables.mjs";
36
+ import Se from "./devTools/DevToolsContext.mjs";
37
+ import { debugCookieName as Ce } from "./devTools/debugCookie.mjs";
38
+ import we from "./devTools/interactionLog.mjs";
39
+ import Te, { createStoreDevToolsLogger as Ee, pConsole as De } from "./devTools/utils/PlitziConsole.mjs";
40
+ import Oe from "./elements/ComponentContext.mjs";
41
+ import { FLAG_GATE_PATTERN as ke, FLAG_NAME_PATTERN as Ae, isFlagName as je, isSchemaFlag as Me } from "./flags/schemaFlag.mjs";
42
+ import { flagsCookieName as Ne, forcedFlagsFromCookies as Pe, parseFlagList as Fe, serializeFlagList as Ie, withForcedFlag as Le, writeForcedFlags as Re } from "./flags/flagsCookie.mjs";
43
+ import { FLAG_LAYERS as ze, flagUserFromSSR as Be, flagValues as Ve, hasConditions as He, passesFlagGate as Ue, resolveFlags as We, undeclaredFlagOverrides as Ge } from "./flags/resolveFlags.mjs";
44
+ import Ke from "./hooks/useStableValue.mjs";
45
+ import { describeChange as qe, fieldChanges as Je, uniqueLines as Ye } from "./history/describe.mjs";
46
+ import { diffSchema as Xe, diffStyle as Ze, jsonCopy as Qe, sameValue as $e } from "./history/diff.mjs";
47
+ import et from "./hooks/useFontHead.mjs";
48
+ import tt from "./hooks/useNetwork.mjs";
49
+ import nt, { PlitziServiceContext as rt, PlitziServiceProvider as it } from "./hooks/usePlitziServiceContext.mjs";
50
+ import { WHILE_RUNNING_MODES as at } from "./types/SchemaTypes.mjs";
51
+ import { StyleVariableCategory as ot } from "./types/StyleTypes.mjs";
52
+ import st, { EMPTY_STYLE_SCHEMA as ct, StyleBindingsAllowed as lt, baseDefaultValue as ut, inheritableAttributesBase as dt } from "./style/styleConstants.mjs";
53
+ import { DISPLAY_MODE_MIN_WIDTH as ft, displayModeAt as pt, displayModeWidthRem as mt } from "./style/breakpoints.mjs";
54
+ import { DISPLAY_MODES as ht, isDisplayMode as gt } from "./style/displayModes.mjs";
55
+ import { fontLinkAssets as _t } from "./style/fontAssets.mjs";
56
+ import { SYSTEM_FONTS as vt, availableFonts as yt, familiesInCss as bt, fontFamilyStack as xt, fontUrlResolver as St, fontsToHead as Ct, googleCss2Url as wt, googleTextSubsetUrl as Tt, isSafeFontUrl as Et, primaryFamily as Dt } from "./style/fonts.mjs";
57
+ import { FontValidationError as Ot, parseSpaceFont as kt } from "./style/fontValidation.mjs";
58
+ import { fallbackForFamily as At, fontsFromCss as jt } from "./style/fontsFromCss.mjs";
59
+ import { LAYOUT_GRIDS as Mt, layoutGridCss as Nt, layoutGridLook as Pt } from "./style/layoutGrid.mjs";
60
+ import { RUNTIME_STYLE_ID as Ft, markStyleCache as It, styleCacheFromDocument as Lt, styleCacheTravelsInDocument as Rt } from "./style/runtimeStyle.mjs";
61
+ import { mergeSnippetStyle as zt, sameSelector as Bt, selectorsOf as Vt } from "./style/snippetStyle.mjs";
62
+ import { CURRENT_PAGE_SELECTOR as Ht, HIDDEN_CLASS as Ut, STYLE_STATES as Wt, STYLE_STATE_LABELS as Gt, inCascadeOrder as Kt, isKnownState as qt, isStartingState as Jt, stateSuffix as Yt } from "./style/styleStates.mjs";
63
+ import Xt from "./schema/SchemaContext.mjs";
64
+ import { ANCHOR_PATTERN as Zt, isAnchor as Qt } from "./schema/anchor.mjs";
65
+ import { COMPONENT_PROPS_SOURCE as $t, EMPTY_SCHEMA as en, VARIABLE_REGEX as tn } from "./schema/schemaConstants.mjs";
66
+ import { findLayoutCycle as nn, resolveLayoutChain as rn } from "./schema/layoutChain.mjs";
67
+ import { collectServerElements as an, hasServerElements as on } from "./schema/serverElements.mjs";
68
+ import { isSnippet as sn } from "./schema/snippet.mjs";
69
+ import cn from "./network/NetworkContext.mjs";
70
+ import ln from "./network/NetworkInternalContext.mjs";
71
+ import { elementFromWire as un, schemaFromWire as dn, schemaToWire as fn } from "./schema/wire.mjs";
72
+ import { SpaceEvents as pn, spaceEventSchemas as mn, validateSpaceEvent as hn } from "./network/spaceEvents.mjs";
73
+ import gn from "./network/graphql/builder/Mutations/index.mjs";
74
+ import _n from "./network/graphql/builder/Queries/index.mjs";
75
+ import vn from "./network/graphql/builder/Subscriptions/index.mjs";
76
+ import yn from "./network/graphql/sdk/Mutations/index.mjs";
77
+ import bn from "./network/graphql/sdk/Queries/index.mjs";
78
+ import xn, { RTEvent as Sn, RTEventCloseCode as Cn, getInstance as wn, isRTEvent as Tn, setInstance as En } from "./websockets/RTCodec.mjs";
79
+ import { THEME_CLASSES as Dn, THEME_COOKIE_NAME as On, applyThemeClass as kn, isTheme as An, readThemeCookie as jn, themeFromCookies as Mn, writeThemeCookie as Nn } from "./theme/themeCookie.mjs";
80
+ import Pn, { createThemeState as Fn, createThemeStore as In, resolveScheme as Ln, setAreaTheme as Rn, setMachineScheme as zn, setThemeMode as Bn, themeFor as Vn } from "./theme/themeStore.mjs";
81
+ import { useThemeStore as Hn } from "./theme/ThemeScope.mjs";
82
+ import Un from "./theme/ThemeProvider.mjs";
83
+ import Wn, { SPACE_THEME_AREA as Gn } from "./theme/useTheme.mjs";
84
+ import Kn from "./server/actions/useActionsSync.mjs";
85
+ import qn, { currentRscLocation as Jn, rscDataPath as Yn } from "./server/rsc/refreshRsc.mjs";
86
+ import Xn from "./server/rsc/useRscRefresh.mjs";
87
+ import Zn from "./server/rsc/useRscSync.mjs";
88
+ import { PAINTED_STATE_BUDGET as Qn, clearPaintedEntry as $n, paintedEntryFromCookies as er, paintedKeys as tr, paintedStateCookieName as nr, paintedStateFor as rr, pickPainted as ir, readPaintedEntry as ar, writePaintedEntry as or } from "./state/paintedState.mjs";
89
+ import { runtimeStatePersist as sr, stateOwner as cr } from "./state/runtimeStatePersist.mjs";
90
+ export { Zt as ANCHOR_PATTERN, x as BODYLESS_METHODS, y as BuilderContext, gn as BuilderMutations, _n as BuilderQueries, $t as COMPONENT_PROPS_SOURCE, N as COMPUTED_GLOBALS, S as CONNECTOR_HTTP_METHODS, Ht as CURRENT_PAGE_SELECTOR, Oe as ComponentContext, C as DEFAULT_READ_ENDPOINT, ht as DISPLAY_MODES, ft as DISPLAY_MODE_MIN_WIDTH, Se as DevToolsContext, w as EMPTY_RESPONSE_METHODS, en as EMPTY_SCHEMA, ct as EMPTY_STYLE_SCHEMA, ke as FLAG_GATE_PATTERN, ze as FLAG_LAYERS, Ae as FLAG_NAME_PATTERN, Ot as FontValidationError, P as GLOBAL_SOURCES, Ut as HIDDEN_CLASS, ee as INTERVAL_TRIGGER, Mt as LAYOUT_GRIDS, m as MAX_PARAM_PASSES, te as MIN_INTERVAL_MS, cn as NetworkContext, ln as NetworkInternalContext, Qn as PAINTED_STATE_BUDGET, oe as ParamsFromURL, Te as PlitziConsole, rt as PlitziServiceContext, it as PlitziServiceProvider, T as READ_ENDPOINT_NAMES, xn as RTCodec, Sn as RTEvent, Cn as RTEventCloseCode, Ft as RUNTIME_STYLE_ID, Gn as SPACE_THEME_AREA, Wt as STYLE_STATES, Gt as STYLE_STATE_LABELS, vt as SYSTEM_FONTS, Xt as SchemaContext, yn as SdkMutations, bn as SdkQueries, vn as SpaceEventSubscription, pn as SpaceEvents, lt as StyleBindingsAllowed, ot as StyleVariableCategory, Dn as THEME_CLASSES, On as THEME_COOKIE_NAME, Un as ThemeProvider, tn as VARIABLE_REGEX, a as VISITOR_NAME, at as WHILE_RUNNING_MODES, E as WRITE_ENDPOINT_NAMES, kn as applyThemeClass, t as authFailureFromResponse, yt as availableFonts, ut as baseDefaultValue, o as checkVisitorRoles, $n as clearPaintedEntry, an as collectServerElements, k as connectorPresets, D as connectorTokens, b as contexts, B as cookieFromHeader, Ee as createStoreDevToolsLogger, Fn as createThemeState, In as createThemeStore, Jn as currentRscLocation, Ce as debugCookieName, se as delay, qe as describeChange, Xe as diffSchema, Ze as diffStyle, he as disableReactDevTools, pt as displayModeAt, mt as displayModeWidthRem, V as documentCookies, un as elementFromWire, H as elementOf, A as emptyManifest, ce as emptyObject, F as evaluateComputed, ae as evaluateRuleGroup, At as fallbackForFamily, bt as familiesInCss, L as fetchManifest, Je as fieldChanges, c as filters, nn as findLayoutCycle, Be as flagUserFromSSR, Ve as flagValues, Ne as flagsCookieName, xt as fontFamilyStack, _t as fontLinkAssets, St as fontUrlResolver, jt as fontsFromCss, Ct as fontsToHead, Pe as forcedFlagsFromCookies, K as formatDate, q as formatDateUTC, J as formatFromNow, Y as formatUTCToLocal, R as generateFacade, ve as getBindingsDetails, O as getConnectorTokens, le as getDisplayName, X as getDurationMs, wn as getInstance, ue as getKeyDecoded, de as getPathsFromObeject, ye as getSourceName, wt as googleCss2Url, Tt as googleTextSubsetUrl, He as hasConditions, on as hasServerElements, f as hasTemplateSyntax, p as hasValidToken, fe as hexToRGB, Kt as inCascadeOrder, dt as inheritableAttributesBase, g as inspectTemplate, ne as intervalOf, Qt as isAnchor, j as isConnectorManifestDraft, re as isDate, gt as isDisplayMode, U as isElementTarget, je as isFlagName, pe as isInViewport, we as isInteractionFlow, qt as isKnownState, W as isNodeTarget, Tn as isRTEvent, e as isRecord, Et as isSafeFontUrl, Me as isSchemaFlag, sn as isSnippet, Jt as isStartingState, An as isTheme, ie as isUserEdit, Z as isValidFormat, Qe as jsonCopy, Nt as layoutGridCss, Pt as layoutGridLook, I as liveSources, me as makeId, It as markStyleCache, zt as mergeSnippetStyle, G as nodeOf, n as onAuthFailure, De as pConsole, er as paintedEntryFromCookies, tr as paintedKeys, nr as paintedStateCookieName, rr as paintedStateFor, Q as parseDate, Fe as parseFlagList, kt as parseSpaceFont, Ue as passesFlagGate, ir as pickPainted, Dt as primaryFamily, l as processTwig, u as processTwigParam, d as processTwigValue, ar as readPaintedEntry, jn as readThemeCookie, qn as refreshRsc, r as reportAuthFailure, We as resolveFlags, rn as resolveLayoutChain, Ln as resolveScheme, h as resolveStepParam, xe as resolveVariables, Yn as rscDataPath, sr as runtimeStatePersist, i as sameRegistrableDomain, Bt as sameSelector, $e as sameValue, dn as schemaFromWire, fn as schemaToWire, Vt as selectorsOf, Ie as serializeFlagList, Rn as setAreaTheme, En as setInstance, zn as setMachineScheme, Bn as setThemeMode, mn as spaceEventSchemas, cr as stateOwner, Yt as stateSuffix, Lt as styleCacheFromDocument, Rt as styleCacheTravelsInDocument, st as styleConstants, z as syntaxHighlight, _ as templatePaths, v as templateRootNames, Vn as themeFor, Mn as themeFromCookies, Pn as themeStore, $ as toUnixSeconds, Ge as undeclaredFlagOverrides, Ye as uniqueLines, Kn as useActionsSync, et as useFontHead, tt as useNetwork, nt as usePlitziServiceContext, be as useRegisterSource, Xn as useRscRefresh, Zn as useRscSync, Ke as useStableValue, Wn as useTheme, Hn as useThemeStore, ge as utility, _e as utilityOptions, M as validateConnectorManifest, hn as validateSpaceEvent, s as visitorAccess, Le as withForcedFlag, Re as writeForcedFlags, or as writePaintedEntry, Nn as writeThemeCookie };
@@ -35,10 +35,12 @@ function o(e, t, n, o = !1) {
35
35
  };
36
36
  }
37
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}`;
38
+ let r = n.indexOf("#");
39
+ if (r > 0) return `${s(e, t, n.slice(0, r))}${n.slice(r)}`;
40
+ let i = e[n];
41
+ if (!i) return n;
42
+ let { slug: a, default: c } = i.attributes;
43
+ return typeof a == "string" ? o(e, t, n, !0) : c ? "/" : `/${n}`;
42
44
  }, 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
45
  let l = Object.keys(e).reduce((s, l) => {
44
46
  let { attributes: { accessLevel: u, enabled: d = !0, unauthorizedBehaviour: f } } = e[l], p = e[l].attributes.unauthorizedPageRedirect;
@@ -1,5 +1,5 @@
1
- import { createContext as e } from "react";
2
- var t = e({
1
+ import { sharedContext as e } from "../helpers/sharedContext.mjs";
2
+ var t = e("NetworkContext", {
3
3
  mutate: async () => {},
4
4
  query: async () => {},
5
5
  subscribe: () => {},
@@ -15,6 +15,5 @@ var t = e({
15
15
  webId: "",
16
16
  environment: "development"
17
17
  });
18
- t.displayName = "NetworkContext";
19
18
  //#endregion
20
19
  export { t as default };
@@ -1,6 +1,4 @@
1
1
  import { OfflineData } from '../types';
2
- export type NetworkInternalContextValue = Omit<OfflineData, 'segments'> & {
3
- segments: NonNullable<OfflineData['segments']>;
4
- };
5
- declare const NetworkInternalContext: import('react').Context<NetworkInternalContextValue>;
2
+ export type NetworkInternalContextValue = OfflineData;
3
+ declare const NetworkInternalContext: import('react').Context<OfflineData>;
6
4
  export default NetworkInternalContext;
@@ -1,6 +1,5 @@
1
- import { createContext as e } from "react";
1
+ import { sharedContext as e } from "../helpers/sharedContext.mjs";
2
2
  //#region src/network/NetworkInternalContext.ts
3
- var t = e({});
4
- t.displayName = "NetworkInternalContext";
3
+ var t = e("NetworkInternalContext", {});
5
4
  //#endregion
6
5
  export { t as default };