@plitzi/sdk-shared 0.33.2 → 0.34.0

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 (204) hide show
  1. package/CHANGELOG.md +58 -0
  2. package/dist/actions/cron.d.ts +34 -0
  3. package/dist/actions/cron.mjs +72 -0
  4. package/dist/actions/index.d.ts +6 -0
  5. package/dist/actions/index.mjs +5 -0
  6. package/dist/actions/triggerParams.d.ts +41 -0
  7. package/dist/actions/triggerParams.mjs +40 -0
  8. package/dist/actions/triggers.d.ts +29 -0
  9. package/dist/actions/triggers.mjs +4 -0
  10. package/dist/actions/validateDocument.d.ts +23 -0
  11. package/dist/actions/validateDocument.mjs +267 -0
  12. package/dist/auth/failureChannel.d.ts +9 -4
  13. package/dist/auth/failureChannel.mjs +3 -2
  14. package/dist/authoring/builder.d.ts +51 -0
  15. package/dist/authoring/builder.mjs +29 -0
  16. package/dist/authoring/declare.d.ts +64 -0
  17. package/dist/authoring/declare.mjs +4 -0
  18. package/dist/authoring/elementCallbacks.d.ts +13 -0
  19. package/dist/authoring/elementCallbacks.mjs +71 -0
  20. package/dist/authoring/index.d.ts +21 -0
  21. package/dist/authoring/index.mjs +6 -0
  22. package/dist/authoring/paramSpec.d.ts +51 -0
  23. package/dist/authoring/paramSpec.mjs +40 -0
  24. package/dist/authoring/spaceCallbacks.d.ts +10 -0
  25. package/dist/authoring/spaceCallbacks.mjs +51 -0
  26. package/dist/builder/contexts/BuilderContext.d.ts +2 -4
  27. package/dist/dataSource/getBindingsDetails.mjs +1 -1
  28. package/dist/dataSource/helpers/getSourceName.d.ts +1 -3
  29. package/dist/dataSource/helpers/getSourceName.mjs +1 -1
  30. package/dist/dataSource/index.d.ts +2 -0
  31. package/dist/dataSource/index.mjs +6 -5
  32. package/dist/dataSource/resolveVariables.d.ts +22 -0
  33. package/dist/dataSource/resolveVariables.mjs +16 -0
  34. package/dist/dataSource/utility/index.mjs +15 -13
  35. package/dist/dataSource/utility/not.d.ts +11 -0
  36. package/dist/dataSource/utility/not.mjs +15 -0
  37. package/dist/devTools/debugCookie.d.ts +16 -0
  38. package/dist/devTools/debugCookie.mjs +7 -0
  39. package/dist/devTools/index.d.ts +6 -2
  40. package/dist/devTools/index.mjs +4 -2
  41. package/dist/devTools/interactionLog.d.ts +14 -0
  42. package/dist/devTools/interactionLog.mjs +4 -0
  43. package/dist/helpers/index.d.ts +2 -0
  44. package/dist/helpers/index.mjs +11 -9
  45. package/dist/helpers/reducerOrigin.d.ts +15 -0
  46. package/dist/helpers/reducerOrigin.mjs +4 -0
  47. package/dist/helpers/ruleEvaluator.d.ts +14 -0
  48. package/dist/helpers/ruleEvaluator.mjs +5 -0
  49. package/dist/helpers/twigWrapper/AST.d.ts +12 -1
  50. package/dist/helpers/twigWrapper/AST.mjs +0 -0
  51. package/dist/helpers/twigWrapper/Evaluator/Evaluator.mjs +7 -0
  52. package/dist/helpers/twigWrapper/Parser/Cursor.d.ts +7 -0
  53. package/dist/helpers/twigWrapper/Parser/Cursor.mjs +5 -0
  54. package/dist/helpers/twigWrapper/Parser/ExpressionParser.mjs +46 -8
  55. package/dist/helpers/twigWrapper/Parser/types.mjs +0 -0
  56. package/dist/helpers/twigWrapper/charClass.d.ts +7 -0
  57. package/dist/helpers/twigWrapper/charClass.mjs +16 -12
  58. package/dist/helpers/twigWrapper/tokens/tokenPatterns.mjs +2 -2
  59. package/dist/helpers/utils.d.ts +0 -2
  60. package/dist/helpers/utils.mjs +16 -19
  61. package/dist/hooks/index.d.ts +2 -1
  62. package/dist/hooks/index.mjs +4 -3
  63. package/dist/hooks/useFontHead.d.ts +3 -0
  64. package/dist/hooks/useFontHead.mjs +23 -0
  65. package/dist/hooks/usePlitziServiceContext.d.ts +3 -2
  66. package/dist/index.mjs +61 -45
  67. package/dist/navigation/index.d.ts +1 -1
  68. package/dist/navigation/index.mjs +2 -2
  69. package/dist/navigation/routes.d.ts +8 -0
  70. package/dist/navigation/routes.mjs +39 -39
  71. package/dist/network/graphql/builder/Mutations/Segment/SegmentAddMutation.mjs +0 -1
  72. package/dist/network/graphql/builder/Mutations/Segment/SegmentAddTemplateMutation.mjs +0 -1
  73. package/dist/network/graphql/builder/Mutations/Segment/SegmentUpdateMutation.mjs +0 -1
  74. package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentAddElementMutation.mjs +0 -1
  75. package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentCloneElementMutation.mjs +0 -1
  76. package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentMoveElementMutation.mjs +0 -1
  77. package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentRemoveElementMutation.mjs +0 -1
  78. package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentRenameElementMutation.d.ts +3 -0
  79. package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentRenameElementMutation.mjs +9 -0
  80. package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentUpdateElementMutation.mjs +0 -1
  81. package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentUpdateElementsMutation.mjs +0 -1
  82. package/dist/network/graphql/builder/Mutations/Space/SpaceAddElementMutation.mjs +0 -1
  83. package/dist/network/graphql/builder/Mutations/Space/SpaceAddTemplateMutation.mjs +0 -1
  84. package/dist/network/graphql/builder/Mutations/Space/SpaceCloneElementMutation.mjs +0 -1
  85. package/dist/network/graphql/builder/Mutations/Space/SpaceMoveElementMutation.mjs +0 -1
  86. package/dist/network/graphql/builder/Mutations/Space/SpaceRemoveElementMutation.mjs +0 -1
  87. package/dist/network/graphql/builder/Mutations/Space/SpaceRenameElementMutation.d.ts +5 -0
  88. package/dist/network/graphql/builder/Mutations/Space/SpaceRenameElementMutation.mjs +9 -0
  89. package/dist/network/graphql/builder/Mutations/Space/SpaceUpdateElementMutation.mjs +0 -1
  90. package/dist/network/graphql/builder/Mutations/Space/SpaceUpdateElementsMutation.mjs +0 -1
  91. package/dist/network/graphql/builder/Mutations/Space/SpaceUpdateMutation.mjs +0 -1
  92. package/dist/network/graphql/builder/Mutations/Space/SpaceUpdateSchemaMutation.mjs +0 -1
  93. package/dist/network/graphql/builder/Mutations/Space/actions/SpaceAddActionMutation.d.ts +8 -0
  94. package/dist/network/graphql/builder/Mutations/Space/actions/SpaceAddActionMutation.mjs +16 -0
  95. package/dist/network/graphql/builder/Mutations/Space/actions/SpaceRemoveActionMutation.d.ts +4 -0
  96. package/dist/network/graphql/builder/Mutations/Space/actions/SpaceRemoveActionMutation.mjs +16 -0
  97. package/dist/network/graphql/builder/Mutations/Space/actions/SpaceRunActionMutation.d.ts +4 -0
  98. package/dist/network/graphql/builder/Mutations/Space/actions/SpaceRunActionMutation.mjs +14 -0
  99. package/dist/network/graphql/builder/Mutations/Space/actions/SpaceUpdateActionMutation.d.ts +4 -0
  100. package/dist/network/graphql/builder/Mutations/Space/actions/SpaceUpdateActionMutation.mjs +16 -0
  101. package/dist/network/graphql/builder/Mutations/Space/pages/SpaceAddPageMutation.mjs +2 -3
  102. package/dist/network/graphql/builder/Mutations/Space/pages/SpaceUpdatePageMutation.mjs +0 -1
  103. package/dist/network/graphql/builder/Mutations/Style/fonts/StyleAddFontMutation.d.ts +2 -0
  104. package/dist/network/graphql/builder/Mutations/Style/fonts/StyleAddFontMutation.mjs +11 -0
  105. package/dist/network/graphql/builder/Mutations/Style/fonts/StyleRemoveFontMutation.d.ts +2 -0
  106. package/dist/network/graphql/builder/Mutations/Style/fonts/StyleRemoveFontMutation.mjs +11 -0
  107. package/dist/network/graphql/builder/Mutations/Style/fonts/StyleUpdateFontMutation.d.ts +2 -0
  108. package/dist/network/graphql/builder/Mutations/Style/fonts/StyleUpdateFontMutation.mjs +11 -0
  109. package/dist/network/graphql/builder/Mutations/index.d.ts +24 -0
  110. package/dist/network/graphql/builder/Mutations/index.mjs +150 -132
  111. package/dist/network/graphql/builder/Queries/InitQuery.mjs +1 -2
  112. package/dist/network/graphql/builder/Queries/Segment/SegmentQuery.mjs +0 -1
  113. package/dist/network/graphql/builder/Queries/Segment/SegmentsQuery.mjs +0 -1
  114. package/dist/network/graphql/builder/Queries/Space/SpaceActionEventsQuery.d.ts +9 -0
  115. package/dist/network/graphql/builder/Queries/Space/SpaceActionEventsQuery.mjs +30 -0
  116. package/dist/network/graphql/builder/Queries/Space/SpaceActionTasksQuery.d.ts +6 -0
  117. package/dist/network/graphql/builder/Queries/Space/SpaceActionTasksQuery.mjs +16 -0
  118. package/dist/network/graphql/builder/Queries/Space/SpaceActionsQuery.d.ts +9 -0
  119. package/dist/network/graphql/builder/Queries/Space/SpaceActionsQuery.mjs +25 -0
  120. package/dist/network/graphql/builder/Queries/Space/SpaceCheckActionQuery.d.ts +6 -0
  121. package/dist/network/graphql/builder/Queries/Space/SpaceCheckActionQuery.mjs +17 -0
  122. package/dist/network/graphql/builder/Queries/Space/SpaceQuotaQuery.d.ts +30 -0
  123. package/dist/network/graphql/builder/Queries/Space/SpaceQuotaQuery.mjs +40 -0
  124. package/dist/network/graphql/builder/Queries/index.d.ts +16 -0
  125. package/dist/network/graphql/builder/Queries/index.mjs +24 -14
  126. package/dist/network/graphql/sdk/Queries/InitQuery.d.ts +4 -0
  127. package/dist/network/graphql/sdk/Queries/InitQuery.mjs +5 -2
  128. package/dist/network/graphql/sdk/Queries/Segment/SegmentQuery.mjs +0 -1
  129. package/dist/network/graphql/sdk/Queries/Segment/SegmentsQuery.mjs +0 -1
  130. package/dist/network/spaceEvents.d.ts +20 -1
  131. package/dist/network/spaceEvents.mjs +89 -74
  132. package/dist/schema/index.d.ts +1 -0
  133. package/dist/schema/index.mjs +2 -1
  134. package/dist/schema/serverElements.d.ts +16 -0
  135. package/dist/schema/serverElements.mjs +18 -0
  136. package/dist/server/actions/useActionsSync.d.ts +10 -0
  137. package/dist/server/actions/useActionsSync.mjs +7 -0
  138. package/dist/server/index.d.ts +2 -1
  139. package/dist/server/index.mjs +5 -4
  140. package/dist/server/rsc/refreshRsc.d.ts +11 -1
  141. package/dist/server/rsc/refreshRsc.mjs +30 -12
  142. package/dist/server/rsc/useRscSync.mjs +20 -13
  143. package/dist/state/runtimeStatePersist.mjs +4 -3
  144. package/dist/store/actionRuns/actionRunsRecorder.d.ts +36 -0
  145. package/dist/store/actionRuns/actionRunsRecorder.mjs +39 -0
  146. package/dist/store/actionRuns/actionRunsStore.d.ts +16 -0
  147. package/dist/store/actionRuns/actionRunsStore.mjs +5 -0
  148. package/dist/store/actionRuns/index.d.ts +6 -0
  149. package/dist/store/actionRuns/index.mjs +4 -0
  150. package/dist/store/actionRuns/useActionRuns.d.ts +13 -0
  151. package/dist/store/actionRuns/useActionRuns.mjs +10 -0
  152. package/dist/store/index.d.ts +46 -45
  153. package/dist/store/index.mjs +6 -3
  154. package/dist/store/renderSettings.d.ts +3 -0
  155. package/dist/store/renderSettings.mjs +17 -5
  156. package/dist/store/tracing/tracingCollector.d.ts +1 -1
  157. package/dist/store/tracing/tracingCollector.mjs +37 -35
  158. package/dist/store/tracing/tracingStore.d.ts +13 -0
  159. package/dist/store/tracing/tracingStore.mjs +3 -3
  160. package/dist/style/fontAssets.d.ts +12 -0
  161. package/dist/style/fontAssets.mjs +18 -0
  162. package/dist/style/fontValidation.d.ts +8 -0
  163. package/dist/style/fontValidation.mjs +107 -0
  164. package/dist/style/fonts.d.ts +74 -0
  165. package/dist/style/fonts.mjs +198 -0
  166. package/dist/style/fontsFromCss.d.ts +27 -0
  167. package/dist/style/fontsFromCss.mjs +43 -0
  168. package/dist/style/index.d.ts +4 -0
  169. package/dist/style/index.mjs +5 -1
  170. package/dist/style/styleConstants.d.ts +2 -2
  171. package/dist/style/styleConstants.mjs +1 -0
  172. package/dist/theme/ThemeProvider.d.ts +36 -6
  173. package/dist/theme/ThemeProvider.mjs +49 -35
  174. package/dist/theme/ThemeScope.d.ts +16 -0
  175. package/dist/theme/ThemeScope.mjs +6 -0
  176. package/dist/theme/index.d.ts +7 -1
  177. package/dist/theme/index.mjs +6 -2
  178. package/dist/theme/themeCookie.d.ts +30 -0
  179. package/dist/theme/themeCookie.mjs +24 -0
  180. package/dist/theme/themeStore.d.ts +40 -0
  181. package/dist/theme/themeStore.mjs +17 -0
  182. package/dist/theme/useTheme.d.ts +29 -0
  183. package/dist/theme/useTheme.mjs +20 -0
  184. package/dist/types/ActionTypes.d.ts +396 -0
  185. package/dist/types/ActionTypes.mjs +0 -0
  186. package/dist/types/AuthTypes.d.ts +23 -2
  187. package/dist/types/BuilderTypes.d.ts +0 -12
  188. package/dist/types/CommonTypes.d.ts +13 -0
  189. package/dist/types/DevToolsTypes.d.ts +57 -14
  190. package/dist/types/EventBridgeTypes.d.ts +1 -1
  191. package/dist/types/InteractionTypes.d.ts +23 -3
  192. package/dist/types/PluginTypes.d.ts +0 -3
  193. package/dist/types/SchemaTypes.d.ts +29 -4
  194. package/dist/types/ServerTypes.d.ts +390 -46
  195. package/dist/types/SpaceTypes.d.ts +16 -0
  196. package/dist/types/StoreTypes.d.ts +181 -3
  197. package/dist/types/StyleTypes.d.ts +83 -4
  198. package/dist/types/TemplateTypes.d.ts +20 -0
  199. package/dist/types/TemplateTypes.mjs +0 -0
  200. package/dist/types/ThemeTypes.d.ts +28 -1
  201. package/dist/types/index.d.ts +2 -0
  202. package/eslint.config.mjs +2 -0
  203. package/package.json +244 -29
  204. package/vite.config.ts +27 -7
@@ -1,3 +1,5 @@
1
1
  import e from "./DevToolsContext.mjs";
2
- import t, { createStoreDevToolsLogger as n, pConsole as r } from "./utils/PlitziConsole.mjs";
3
- export { e as DevToolsContext, t as PlitziConsole, n as createStoreDevToolsLogger, r as pConsole };
2
+ import { debugCookieName as t } from "./debugCookie.mjs";
3
+ import n from "./interactionLog.mjs";
4
+ import r, { createStoreDevToolsLogger as i, pConsole as a } from "./utils/PlitziConsole.mjs";
5
+ export { e as DevToolsContext, r as PlitziConsole, i as createStoreDevToolsLogger, t as debugCookieName, n as isInteractionFlow, a as pConsole };
@@ -0,0 +1,14 @@
1
+ import { InteractionFlowParams, LogInteraction } from '../types/DevToolsTypes';
2
+ /**
3
+ * Is this entry a flow that finished, as opposed to a note about one of its steps?
4
+ *
5
+ * `nodes` is the discriminant because it is the thing the flow view is made of, and a note — written from inside
6
+ * the traversal, while the flow is still running — can never have one. It is read through `Partial` because a log
7
+ * written by an older build can carry `nodes: undefined` rather than omitting the key: the declared type says
8
+ * that cannot happen, and the crash this guard exists to prevent says it can.
9
+ *
10
+ * Lives here rather than beside the type because `types/` holds types and nothing else: a value exported from
11
+ * that barrel turns every consumer's type-only import into a runtime one.
12
+ */
13
+ export declare const isInteractionFlow: (params: LogInteraction["params"]) => params is InteractionFlowParams;
14
+ export default isInteractionFlow;
@@ -0,0 +1,4 @@
1
+ //#region src/devTools/interactionLog.ts
2
+ var e = (e) => e.nodes !== void 0;
3
+ //#endregion
4
+ export { e as default, e as isInteractionFlow };
@@ -4,6 +4,8 @@ import { default as syntaxHighlight } from './syntaxHighlight';
4
4
  export * from './fetchManifest';
5
5
  export * from './formatDate';
6
6
  export * from './generateFacade';
7
+ export * from './reducerOrigin';
8
+ export * from './ruleEvaluator';
7
9
  export * from './syntaxHighlight';
8
10
  export * from './twigWrapper';
9
11
  export * from './utils';
@@ -1,11 +1,13 @@
1
- import e from "./fetchManifest.mjs";
2
- import t from "./generateFacade.mjs";
3
- import n from "./syntaxHighlight.mjs";
4
- import { formatDate as r, formatDateUTC as i, formatFromNow as a, formatUTCToLocal as o, getDurationMs as s, isDate as c, isValidFormat as l, parseDate as u, toUnixSeconds as d } from "./formatDate.mjs";
5
- import { filters as f } from "./twigWrapper/filters/filters.mjs";
6
- import { processTwig as p } from "./twigWrapper/processTwig/processTwig.mjs";
7
- import { hasValidToken as m } from "./twigWrapper/tokens/hasValidToken.mjs";
8
- import { ParamsFromURL as h, delay as g, emptyObject as _, generateID as v, getDisplayName as y, getKeyDecoded as b, getPathsFromObeject as x, hexToRGB as S, isInViewport as C, isTestMode as w, makeId as T } from "./utils.mjs";
1
+ import { filters as e } from "./twigWrapper/filters/filters.mjs";
2
+ import { processTwig as t } from "./twigWrapper/processTwig/processTwig.mjs";
3
+ import { hasValidToken as n } from "./twigWrapper/tokens/hasValidToken.mjs";
4
+ import r from "./fetchManifest.mjs";
5
+ import i from "./generateFacade.mjs";
6
+ import a from "./syntaxHighlight.mjs";
7
+ import { formatDate as o, formatDateUTC as s, formatFromNow as c, formatUTCToLocal as l, getDurationMs as u, isDate as d, isValidFormat as f, parseDate as p, toUnixSeconds as m } from "./formatDate.mjs";
8
+ import { isUserEdit as h } from "./reducerOrigin.mjs";
9
+ import { evaluateRuleGroup as g } from "./ruleEvaluator.mjs";
10
+ import { ParamsFromURL as _, delay as v, emptyObject as y, getDisplayName as b, getKeyDecoded as x, getPathsFromObeject as S, hexToRGB as C, isInViewport as w, makeId as T } from "./utils.mjs";
9
11
  import { disableReactDevTools as E } from "./security.mjs";
10
12
  import { createStripTypenameLink as D, stripTypenameDeep as O } from "./stripTypename.mjs";
11
- export { h as ParamsFromURL, D as createStripTypenameLink, g as delay, E as disableReactDevTools, _ as emptyObject, e as fetchManifest, f as filters, r as formatDate, i as formatDateUTC, a as formatFromNow, o as formatUTCToLocal, t as generateFacade, v as generateID, y as getDisplayName, s as getDurationMs, b as getKeyDecoded, x as getPathsFromObeject, m as hasValidToken, S as hexToRGB, c as isDate, C as isInViewport, w as isTestMode, l as isValidFormat, T as makeId, u as parseDate, p as processTwig, O as stripTypenameDeep, n as syntaxHighlight, d as toUnixSeconds };
13
+ export { _ as ParamsFromURL, D as createStripTypenameLink, v as delay, E as disableReactDevTools, y as emptyObject, g as evaluateRuleGroup, r as fetchManifest, e as filters, o as formatDate, s as formatDateUTC, c as formatFromNow, l as formatUTCToLocal, i as generateFacade, b as getDisplayName, u as getDurationMs, x as getKeyDecoded, S as getPathsFromObeject, n as hasValidToken, C as hexToRGB, d as isDate, w as isInViewport, h as isUserEdit, f as isValidFormat, T as makeId, p as parseDate, t as processTwig, O as stripTypenameDeep, a as syntaxHighlight, m as toUnixSeconds };
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Whether a reducer action is this session's user editing — the only kind of change the undo history and the save
3
+ * queue are for.
4
+ *
5
+ * Two kinds of dispatch look like an edit and are not. `fromSubscriptions` is another session's edit arriving over
6
+ * the space stream: an agent writing through the MCP, or a collaborator. `queryFailed` is the save queue putting
7
+ * back the state a rejected mutation left behind. Recording either as undoable hands the user a button that reverts
8
+ * work this session never did — an agent's whole apply, in one click — and re-queueing either sends the server a
9
+ * change it just gave us, or just refused.
10
+ */
11
+ export type ReducerActionOrigin = {
12
+ fromSubscriptions?: boolean;
13
+ queryFailed?: boolean;
14
+ };
15
+ export declare const isUserEdit: (action: ReducerActionOrigin) => boolean;
@@ -0,0 +1,4 @@
1
+ //#region src/helpers/reducerOrigin.ts
2
+ var e = (e) => !e.fromSubscriptions && !e.queryFailed;
3
+ //#endregion
4
+ export { e as isUserEdit };
@@ -0,0 +1,14 @@
1
+ import { RuleGroup, RuleValue } from '@plitzi/plitzi-ui/QueryBuilder';
2
+ /**
3
+ * Evaluates a `when` rule group against a value bag.
4
+ *
5
+ * A rule group has to be evaluated on both sides — the browser for an interaction, the server for an action — and
6
+ * the only implementation lives in `plitzi-ui`. This wrapper exists for two reasons beyond naming:
7
+ *
8
+ * - the `@plitzi/plitzi-ui/QueryBuilder` BARREL pulls the React components with it, which is the boot weight the
9
+ * MCP already paid for once. `/QueryBuilder/helpers` carries the evaluator and nothing that renders;
10
+ * - it keeps `plitzi-ui` out of the server's dependency list. `sdk-shared` already depends on it, so the chain is
11
+ * declared in exactly one place.
12
+ */
13
+ export declare const evaluateRuleGroup: (group: RuleGroup, values: Record<string, RuleValue>) => boolean;
14
+ export type { Rule, RuleGroup, RuleValue } from '@plitzi/plitzi-ui/QueryBuilder';
@@ -0,0 +1,5 @@
1
+ import { QueryBuilderEvaluator as e } from "@plitzi/plitzi-ui/QueryBuilder/helpers";
2
+ //#region src/helpers/ruleEvaluator.ts
3
+ var t = (t, n) => !!e(t, n);
4
+ //#endregion
5
+ export { t as evaluateRuleGroup };
@@ -44,7 +44,7 @@ export type BreakNode = {
44
44
  export type ContinueNode = {
45
45
  readonly type: 'continue';
46
46
  };
47
- export type Expression = LiteralNode | ArrayLiteralNode | ObjectLiteralNode | RangeNode | PathNode | FunctionNode | FilterExpression | ConcatNode | UnaryNode | BinaryNode | DefaultNode | TernaryNode | ArrowFunctionNode;
47
+ export type Expression = LiteralNode | ArrayLiteralNode | ObjectLiteralNode | RangeNode | PathNode | IndexNode | FunctionNode | FilterExpression | ConcatNode | UnaryNode | BinaryNode | DefaultNode | TernaryNode | ArrowFunctionNode;
48
48
  export type LiteralNode = {
49
49
  readonly type: 'literal';
50
50
  readonly value: string | number | boolean;
@@ -69,6 +69,17 @@ export type PathNode = {
69
69
  readonly type: 'path';
70
70
  readonly segments: readonly string[];
71
71
  };
72
+ /**
73
+ * Member access whose key is not known until the template runs: `items[i]`, `rows[page - 1]`, `record[field]`.
74
+ *
75
+ * A bracket holding a literal never reaches here — the parser folds `items[0]` and `record['title']` straight into
76
+ * a {@link PathNode}'s segments, so the common case stays one flat walk with nothing to evaluate per access.
77
+ */
78
+ export type IndexNode = {
79
+ readonly type: 'index';
80
+ readonly object: Expression;
81
+ readonly index: Expression;
82
+ };
72
83
  export type FunctionNode = {
73
84
  readonly type: 'function';
74
85
  readonly name: string;
File without changes
@@ -121,6 +121,7 @@ var c = [], l = (e, t, n = !1) => {
121
121
  }
122
122
  case "range": return this.evalRange(t.start, t.end);
123
123
  case "path": return this.resolvePath(t.segments);
124
+ case "index": return this.resolveIndex(t.object, t.index);
124
125
  case "function": return this.evalFunction(t.name, t.args);
125
126
  case "filter": return this.applyFilters(this.evalExpression(t.subject), t.filters);
126
127
  case "concat": {
@@ -156,6 +157,12 @@ var c = [], l = (e, t, n = !1) => {
156
157
  }
157
158
  return n;
158
159
  }
160
+ resolveIndex(e, t) {
161
+ let n = this.evalExpression(e);
162
+ if (n == null) return;
163
+ let r = this.evalExpression(t);
164
+ if (r != null) return n[String(r)];
165
+ }
159
166
  evalRange(e, t) {
160
167
  let n = Number(this.evalExpression(e)), r = Number(this.evalExpression(t)), i = n <= r, a = (i ? r - n : n - r) + 1, o = Array(a);
161
168
  for (let e = 0; e < a; e++) o[e] = i ? n + e : n - e;
@@ -7,6 +7,13 @@ export declare class Cursor {
7
7
  protected at(offset: number): number;
8
8
  protected skipWs(): void;
9
9
  protected scanName(): string;
10
+ /**
11
+ * Scans a path segment that is a plain array index (`0`, `12`), returning '' when not on one.
12
+ *
13
+ * Digits only, deliberately: `scanNumber` would read `0.title` as the number `0.` and leave the cursor past the
14
+ * dot that separates it from the next segment. A key is a key here — `items.0.title` is three of them.
15
+ */
16
+ protected scanIndex(): string;
10
17
  protected scanStringLiteral(): string;
11
18
  protected scanNumber(): number;
12
19
  protected matchKeyword(kw: string): boolean;
@@ -24,6 +24,11 @@ var o = class {
24
24
  if (!this.eof() && r(this.src.charCodeAt(this.pos))) for (this.pos++; !this.eof() && i(this.src.charCodeAt(this.pos));) this.pos++;
25
25
  return this.src.slice(e, this.pos);
26
26
  }
27
+ scanIndex() {
28
+ let e = this.pos;
29
+ for (; !this.eof() && t(this.src.charCodeAt(this.pos));) this.pos++;
30
+ return this.src.slice(e, this.pos);
31
+ }
27
32
  scanStringLiteral() {
28
33
  let t = this.src.charCodeAt(this.pos);
29
34
  this.pos++;
@@ -207,22 +207,60 @@ var r = (e) => new a(e).parseTernary(), i = (e) => new a(e).parseApplyChain(), a
207
207
  if (this.peek() === e.LParen) {
208
208
  this.pos++;
209
209
  let n = this.parseArgList(e.RParen);
210
- return this.maybeTrailingFilters({
210
+ return this.maybeTrailingFilters(this.parseAccessChain({
211
211
  type: "function",
212
212
  name: t,
213
213
  args: n
214
- });
214
+ }, null));
215
215
  }
216
216
  let n = [t];
217
- for (; this.peek() === e.Dot;) {
217
+ return this.maybeTrailingFilters(this.parseAccessChain({
218
+ type: "path",
219
+ segments: n
220
+ }, n));
221
+ }
222
+ parseAccessChain(t, n) {
223
+ let r = t, i = n;
224
+ for (;;) {
225
+ let t = this.peek();
226
+ if (t === e.Dot) {
227
+ let e = this.pos;
228
+ this.pos++;
229
+ let t = this.scanName() || this.scanIndex();
230
+ if (!t) {
231
+ this.pos = e;
232
+ break;
233
+ }
234
+ i ? i.push(t) : r = {
235
+ type: "index",
236
+ object: r,
237
+ index: {
238
+ type: "literal",
239
+ value: t
240
+ }
241
+ };
242
+ continue;
243
+ }
244
+ if (t !== e.LBracket) break;
218
245
  this.pos++;
219
- let e = this.scanName();
220
- e && n.push(e);
246
+ let n = this.parseTernary();
247
+ if (this.skipWs(), this.peek() === e.RBracket && this.pos++, i && n.type === "literal" && typeof n.value != "boolean") {
248
+ i.push(String(n.value));
249
+ continue;
250
+ }
251
+ i &&= (r = {
252
+ type: "path",
253
+ segments: i
254
+ }, null), r = {
255
+ type: "index",
256
+ object: r,
257
+ index: n
258
+ };
221
259
  }
222
- return this.maybeTrailingFilters({
260
+ return i ? {
223
261
  type: "path",
224
- segments: n
225
- });
262
+ segments: i
263
+ } : r;
226
264
  }
227
265
  maybeTrailingFilters(t) {
228
266
  return this.skipWs(), this.peek() === e.Pipe ? {
File without changes
@@ -40,5 +40,12 @@ export declare const isPathPart: (c: number) => boolean;
40
40
  export declare const isDigit: (c: number) => boolean;
41
41
  export declare const isSpace: (c: number) => boolean;
42
42
  export declare const isSimpleIdentifier: (s: string) => boolean;
43
+ /**
44
+ * Whether the whole string is a dotted path this file's fast path can resolve: `user.name`, `a.b.c`, `items.0.title`.
45
+ *
46
+ * A segment after the first may be a plain number — an array index is read as a literal key like any other, which is
47
+ * exactly what `resolveDottedPath` does. The FIRST segment may not: `1.5` is a number, and treating it as a path
48
+ * would resolve `context[1][5]` for a template that says one and a half.
49
+ */
43
50
  export declare const isDottedPath: (s: string) => boolean;
44
51
  export declare const isVariableName: (s: string) => boolean;
@@ -40,20 +40,24 @@ var e = {
40
40
  for (let t = 1; t < r; t++) if (!n(e.charCodeAt(t))) return !1;
41
41
  return !0;
42
42
  }, s = (r) => {
43
- let i = r.length;
44
- if (i === 0) return !1;
45
- let a = !0;
46
- for (let o = 0; o < i; o++) {
47
- let i = r.charCodeAt(o);
48
- if (i === e.Dot) {
49
- if (a) return !1;
50
- a = !0;
51
- } else {
52
- if (a && !t(i) || !a && !n(i)) return !1;
53
- a = !1;
43
+ let a = r.length;
44
+ if (a === 0 || !t(r.charCodeAt(0))) return !1;
45
+ let o = !1, s = !1;
46
+ for (let c = 1; c < a; c++) {
47
+ let a = r.charCodeAt(c);
48
+ if (a === e.Dot) {
49
+ if (o) return !1;
50
+ o = !0, s = !1;
51
+ continue;
54
52
  }
53
+ if (o) {
54
+ if (s = i(a), !s && !t(a)) return !1;
55
+ o = !1;
56
+ continue;
57
+ }
58
+ if (s ? !i(a) : !n(a)) return !1;
55
59
  }
56
- return !a;
60
+ return !o;
57
61
  }, c = (e) => o(e);
58
62
  //#endregion
59
63
  export { e as Char, i as isDigit, s as isDottedPath, n as isIdentPart, t as isIdentStart, r as isPathPart, o as isSimpleIdentifier, a as isSpace, c as isVariableName };
@@ -1,4 +1,4 @@
1
1
  //#region src/helpers/twigWrapper/tokens/tokenPatterns.ts
2
- var e = "[a-zA-Z_][a-zA-Z0-9_]*(?:-[a-zA-Z0-9_]+)*", t = `${`${e}(?:\\??\\.${e})*`}(?:\\s*\\?\\?\\s*[^|{}]+?)?(?:\\s*\\|\\s*[a-zA-Z_]+(?:\\([^)]*\\))?)*`, n = `\\{\\{\\s*${t}\\s*\\}\\}`, r = `(?:${`\\{\\{\\{\\s*${t}\\s*\\}\\}\\}`}|${n})`, i = new RegExp(r, "g"), a = RegExp(`^${r}$`);
2
+ var e = "[a-zA-Z_][a-zA-Z0-9_]*(?:-[a-zA-Z0-9_]+)*", t = `(?:${e}|\\d+)`, n = `\\[\\s*(?:\\d+|'[^']*'|"[^"]*"|${e}(?:\\.${t})*)\\s*\\]`, r = `${`${e}(?:${n})*(?:\\??\\.${t}(?:${n})*)*`}(?:\\s*\\?\\?\\s*[^|{}]+?)?(?:\\s*\\|\\s*[a-zA-Z_]+(?:\\([^)]*\\))?)*`, i = `\\{\\{\\s*${r}\\s*\\}\\}`, a = `(?:${`\\{\\{\\{\\s*${r}\\s*\\}\\}\\}`}|${i})`, o = new RegExp(a, "g"), s = RegExp(`^${a}$`);
3
3
  //#endregion
4
- export { i as TOKEN_REGEX, a as TOKEN_STRICT_REGEX };
4
+ export { o as TOKEN_REGEX, s as TOKEN_STRICT_REGEX };
@@ -1,9 +1,7 @@
1
1
  import { FC } from 'react';
2
- export declare const isTestMode: () => boolean;
3
2
  export declare function getDisplayName<T = unknown>(WrappedComponent?: FC<T>): string;
4
3
  declare const emptyObject: {};
5
4
  export { emptyObject };
6
- export declare const generateID: (prevId?: string) => string;
7
5
  export declare const getPathsFromObeject: (object?: {
8
6
  [key: string]: unknown;
9
7
  }, basePath?: string, glue?: string, skipArray?: boolean) => string[];
@@ -1,29 +1,26 @@
1
1
  import { get as e } from "@plitzi/plitzi-ui/helpers";
2
2
  //#region src/helpers/utils.ts
3
- var t = () => typeof process < "u" && process.env.NODE_ENV === "test";
4
- function n(e) {
3
+ function t(e) {
5
4
  return e && (e.displayName || e.name) || "Component";
6
5
  }
7
- var r = {};
8
- Object.freeze(r);
9
- var i = () => ((/* @__PURE__ */ new Date()).getTime() / 1e3 | 0).toString(16) + "xxxxxxxxxxxxxxxx".replace(/[x]/g, function() {
10
- return (Math.random() * 16 | 0).toString(16);
11
- }).toLowerCase(), a = (e = "") => t() ? e ? `id_${e.substring(e.length - 6)}` : "id_000000" : i(), o = (e, t = "", n = ".", r = !1) => !e || typeof e != "object" ? [] : Object.keys(e).reduce((i, a) => {
12
- a = a.replaceAll(n, "").replaceAll(".", "");
13
- let s = `${t}${t ? n : ""}${a}`;
14
- return typeof e[a] != "object" || Array.isArray(e[a]) && r ? [...i, s] : [
15
- ...i,
6
+ var n = {};
7
+ Object.freeze(n);
8
+ var r = (e, t = "", n = ".", i = !1) => !e || typeof e != "object" ? [] : Object.keys(e).reduce((a, o) => {
9
+ o = o.replaceAll(n, "").replaceAll(".", "");
10
+ let s = `${t}${t ? n : ""}${o}`;
11
+ return typeof e[o] != "object" || Array.isArray(e[o]) && i ? [...a, s] : [
12
+ ...a,
16
13
  s,
17
- ...o(e[a], s, n, r)
14
+ ...r(e[o], s, n, i)
18
15
  ];
19
- }, []), s = (e, t = !0, n = !0) => {
16
+ }, []), i = (e, t = !0, n = !0) => {
20
17
  let r = "", i = "abcdefghijklmnopqrstuvwxyz";
21
18
  t && (i = `ABCDEFGHIJKLMNOPQRSTUVWXYZ${i}`), n && (i = `${i}0123456789`);
22
19
  let a = i.length;
23
20
  for (let t = 0; t < e; t++) r += i.charAt(Math.floor(Math.random() * a));
24
21
  return r;
25
22
  };
26
- function c(t, n) {
23
+ function a(t, n) {
27
24
  if (!t) return 0;
28
25
  let r = {};
29
26
  try {
@@ -34,7 +31,7 @@ function c(t, n) {
34
31
  }
35
32
  return n ? e(r, "data.spaceId", 0) : r;
36
33
  }
37
- function l(e) {
34
+ function o(e) {
38
35
  !e && typeof window < "u" && (e = window.location.search);
39
36
  let t = {};
40
37
  if (!e || e.length === 0) return t;
@@ -45,12 +42,12 @@ function l(e) {
45
42
  }
46
43
  return t;
47
44
  }
48
- var u = (e) => new Promise((t) => {
45
+ var s = (e) => new Promise((t) => {
49
46
  setTimeout(t, e);
50
- }), d = (e) => {
47
+ }), c = (e) => {
51
48
  let { top: t, left: n, bottom: r, right: i } = e.getBoundingClientRect(), { innerHeight: a, innerWidth: o } = window, { documentElement: { clientHeight: s, clientWidth: c } } = document;
52
49
  return t >= 0 && n >= 0 && r <= (a || s) && i <= (o || c);
53
- }, f = (e, t) => {
50
+ }, l = (e, t) => {
54
51
  if (!e) return !1;
55
52
  let n, r, i;
56
53
  if (e.length === 7) [n, r, i] = (e.match(/\w\w/g) ?? []).map((e) => parseInt(e, 16));
@@ -59,4 +56,4 @@ var u = (e) => new Promise((t) => {
59
56
  return t ? `rgba(${n},${r},${i},${t})` : `rgb(${n},${r},${i})`;
60
57
  };
61
58
  //#endregion
62
- export { l as ParamsFromURL, u as delay, r as emptyObject, a as generateID, n as getDisplayName, c as getKeyDecoded, o as getPathsFromObeject, f as hexToRGB, d as isInViewport, t as isTestMode, s as makeId };
59
+ export { o as ParamsFromURL, s as delay, n as emptyObject, t as getDisplayName, a as getKeyDecoded, r as getPathsFromObeject, l as hexToRGB, c as isInViewport, i as makeId };
@@ -1,5 +1,6 @@
1
+ import { default as useFontHead } from './useFontHead';
1
2
  import { default as useNetwork } from './useNetwork';
2
3
  import { default as usePlitziServiceContext } from './usePlitziServiceContext';
3
4
  export * from './useNetwork';
4
5
  export * from './usePlitziServiceContext';
5
- export { useNetwork, usePlitziServiceContext };
6
+ export { useFontHead, useNetwork, usePlitziServiceContext };
@@ -1,3 +1,4 @@
1
- import e from "./useNetwork.mjs";
2
- import t, { PlitziServiceContext as n, PlitziServiceProvider as r } from "./usePlitziServiceContext.mjs";
3
- export { n as PlitziServiceContext, r as PlitziServiceProvider, e as useNetwork, t as usePlitziServiceContext };
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
+ export { r as PlitziServiceContext, i as PlitziServiceProvider, e as useFontHead, t as useNetwork, n as usePlitziServiceContext };
@@ -0,0 +1,3 @@
1
+ import { FontHead } from '../types/StyleTypes';
2
+ declare const useFontHead: (head: FontHead) => void;
3
+ export default useFontHead;
@@ -0,0 +1,23 @@
1
+ import { useEffect as e } from "react";
2
+ //#region src/hooks/useFontHead.ts
3
+ var t = "data-plitzi-fonts", n = (n) => {
4
+ e(() => {
5
+ if (typeof document > "u") return;
6
+ let { head: e } = document, r = [];
7
+ if (n.preconnect.forEach((t) => {
8
+ if (e.querySelector(`link[rel="preconnect"][href="${CSS.escape(t.href)}"]`)) return;
9
+ let n = document.createElement("link");
10
+ n.rel = "preconnect", n.href = t.href, t.crossorigin && (n.crossOrigin = ""), e.appendChild(n), r.push(n);
11
+ }), n.links.forEach((t) => {
12
+ if (e.querySelector(`link[rel="${t.rel}"][href="${CSS.escape(t.href)}"]`)) return;
13
+ let n = document.createElement("link");
14
+ n.rel = t.rel, n.href = t.href, t.as && (n.as = t.as), t.type && (n.type = t.type), t.crossorigin && (n.crossOrigin = ""), e.appendChild(n), r.push(n);
15
+ }), n.faces && !e.querySelector(`style[${t}]`)) {
16
+ let i = document.createElement("style");
17
+ i.setAttribute(t, ""), i.textContent = n.faces, e.appendChild(i), r.push(i);
18
+ }
19
+ return () => r.forEach((e) => e.remove());
20
+ }, [n]);
21
+ };
22
+ //#endregion
23
+ export { n as default };
@@ -1,6 +1,6 @@
1
1
  import { BuilderContextValue } from '../builder';
2
2
  import { NetworkContextValue } from '../network';
3
- import { ComponentContextValue, EventBridgeContextValue, InteractionsContextValue, PluginsContextValue, SegmentsContextValue, Theme } from '../types';
3
+ import { ComponentContextValue, EventBridgeContextValue, InteractionsContextValue, PluginsContextValue, ColorScheme, SegmentsContextValue } from '../types';
4
4
  import { Context, ReactNode, RefObject } from 'react';
5
5
  export type PlitziServiceContextValue<TEventBridge = any, TInteractions = any> = {
6
6
  settings: {
@@ -8,7 +8,8 @@ export type PlitziServiceContextValue<TEventBridge = any, TInteractions = any> =
8
8
  previewMode?: boolean;
9
9
  environment?: string;
10
10
  [key: string]: unknown;
11
- theme: Theme;
11
+ /** Already resolved: an element paints in one of two schemes and has no use for the word `system`. */
12
+ theme: ColorScheme;
12
13
  };
13
14
  root: {
14
15
  baseElementId: string;
package/dist/index.mjs CHANGED
@@ -1,47 +1,63 @@
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 a from "./builder/contexts/BuilderContext.mjs";
4
- import { contexts_exports as o } from "./builder/contexts/index.mjs";
5
- import { BODYLESS_METHODS as s, CONNECTOR_HTTP_METHODS as c, DEFAULT_READ_ENDPOINT as l, EMPTY_RESPONSE_METHODS as u, READ_ENDPOINT_NAMES as d, WRITE_ENDPOINT_NAMES as f } from "./connectors/constants.mjs";
6
- import { connectorTokens as p, getConnectorTokens as m } from "./connectors/manifestTokens.mjs";
7
- import { connectorPresets as h, emptyManifest as g } from "./connectors/presets.mjs";
8
- import { validateConnectorManifest as _ } from "./connectors/validateManifest.mjs";
9
- import v from "./dataSource/helpers/getSourceName.mjs";
10
- import y from "./helpers/fetchManifest.mjs";
11
- import b from "./helpers/generateFacade.mjs";
12
- import x from "./helpers/syntaxHighlight.mjs";
13
- import { formatDate as S, formatDateUTC as C, formatFromNow as w, formatUTCToLocal as T, getDurationMs as E, isDate as D, isValidFormat as O, parseDate as k, toUnixSeconds as A } from "./helpers/formatDate.mjs";
14
- import { filters as j } from "./helpers/twigWrapper/filters/filters.mjs";
15
- import { processTwig as M } from "./helpers/twigWrapper/processTwig/processTwig.mjs";
16
- import { hasValidToken as N } from "./helpers/twigWrapper/tokens/hasValidToken.mjs";
17
- import { ParamsFromURL as P, delay as F, emptyObject as I, generateID as L, getDisplayName as R, getKeyDecoded as z, getPathsFromObeject as B, hexToRGB as V, isInViewport as H, isTestMode as U, makeId as W } from "./helpers/utils.mjs";
18
- import { disableReactDevTools as G } from "./helpers/security.mjs";
19
- import { createStripTypenameLink as K, stripTypenameDeep as q } from "./helpers/stripTypename.mjs";
20
- import J from "./dataSource/hooks/useRegisterSource.mjs";
21
- import Y, { utilityOptions as X } from "./dataSource/utility/index.mjs";
22
- import Z from "./dataSource/getBindingsDetails.mjs";
23
- import Q from "./devTools/DevToolsContext.mjs";
24
- import $, { createStoreDevToolsLogger as ee, pConsole as te } from "./devTools/utils/PlitziConsole.mjs";
25
- import ne from "./elements/ComponentContext.mjs";
26
- import re from "./hooks/useNetwork.mjs";
27
- import ie, { PlitziServiceContext as ae, PlitziServiceProvider as oe } from "./hooks/usePlitziServiceContext.mjs";
28
- import { StyleVariableCategory as se } from "./types/StyleTypes.mjs";
29
- import ce, { EMPTY_STYLE_SCHEMA as le, StyleBindingsAllowed as ue, baseDefaultValue as de, inheritableAttributesBase as fe } from "./style/styleConstants.mjs";
30
- import pe from "./schema/SchemaContext.mjs";
31
- import { EMPTY_SCHEMA as me, VARIABLE_REGEX as he } from "./schema/schemaConstants.mjs";
32
- import ge from "./network/NetworkContext.mjs";
33
- import _e from "./network/NetworkInternalContext.mjs";
34
- import { SpaceEvents as ve, spaceEventSchemas as ye, validateSpaceEvent as be } from "./network/spaceEvents.mjs";
35
- import xe from "./network/graphql/builder/Mutations/index.mjs";
36
- import Se from "./network/graphql/builder/Queries/index.mjs";
37
- import Ce from "./network/graphql/builder/Subscriptions/index.mjs";
38
- import we from "./network/graphql/sdk/Mutations/index.mjs";
39
- import Te from "./network/graphql/sdk/Queries/index.mjs";
40
- import Ee from "./segments/SegmentsContext.mjs";
41
- import De, { RTEvent as Oe, RTEventCloseCode as ke, getInstance as Ae, isRTEvent as je, setInstance as Me } from "./websockets/RTCodec.mjs";
42
- import Ne, { ThemeContext as Pe } from "./theme/ThemeProvider.mjs";
43
- import Fe, { rscDataPath as Ie } from "./server/rsc/refreshRsc.mjs";
44
- import Le from "./server/rsc/useRscRefresh.mjs";
45
- import Re from "./server/rsc/useRscSync.mjs";
46
- import { runtimeStatePersist as ze } from "./state/runtimeStatePersist.mjs";
47
- export { s as BODYLESS_METHODS, a as BuilderContext, xe as BuilderMutations, Se as BuilderQueries, c as CONNECTOR_HTTP_METHODS, ne as ComponentContext, l as DEFAULT_READ_ENDPOINT, Q as DevToolsContext, u as EMPTY_RESPONSE_METHODS, me as EMPTY_SCHEMA, le as EMPTY_STYLE_SCHEMA, ge as NetworkContext, _e as NetworkInternalContext, P as ParamsFromURL, $ as PlitziConsole, ae as PlitziServiceContext, oe as PlitziServiceProvider, d as READ_ENDPOINT_NAMES, De as RTCodec, Oe as RTEvent, ke as RTEventCloseCode, pe as SchemaContext, we as SdkMutations, Te as SdkQueries, Ee as SegmentsContext, Ce as SpaceEventSubscription, ve as SpaceEvents, ue as StyleBindingsAllowed, se as StyleVariableCategory, Pe as ThemeContext, Ne as ThemeProvider, he as VARIABLE_REGEX, f as WRITE_ENDPOINT_NAMES, e as authFailureFromResponse, de as baseDefaultValue, h as connectorPresets, p as connectorTokens, o as contexts, i as createAuthFailureLink, ee as createStoreDevToolsLogger, K as createStripTypenameLink, F as delay, G as disableReactDevTools, g as emptyManifest, I as emptyObject, y as fetchManifest, j as filters, S as formatDate, C as formatDateUTC, w as formatFromNow, T as formatUTCToLocal, b as generateFacade, L as generateID, Z as getBindingsDetails, m as getConnectorTokens, R as getDisplayName, E as getDurationMs, Ae as getInstance, z as getKeyDecoded, B as getPathsFromObeject, v as getSourceName, N as hasValidToken, V as hexToRGB, fe as inheritableAttributesBase, D as isDate, H as isInViewport, je as isRTEvent, U as isTestMode, O as isValidFormat, W as makeId, t as onAuthFailure, te as pConsole, k as parseDate, M as processTwig, Fe as refreshRsc, n as reportAuthFailure, Ie as rscDataPath, ze as runtimeStatePersist, r as sameRegistrableDomain, Me as setInstance, ye as spaceEventSchemas, q as stripTypenameDeep, ce as styleConstants, x as syntaxHighlight, A as toUnixSeconds, re as useNetwork, ie as usePlitziServiceContext, J as useRegisterSource, Le as useRscRefresh, Re as useRscSync, Y as utility, X as utilityOptions, _ as validateConnectorManifest, be as validateSpaceEvent };
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 c from "./builder/contexts/BuilderContext.mjs";
7
+ import { contexts_exports as l } from "./builder/contexts/index.mjs";
8
+ import { BODYLESS_METHODS as u, CONNECTOR_HTTP_METHODS as d, DEFAULT_READ_ENDPOINT as f, EMPTY_RESPONSE_METHODS as p, READ_ENDPOINT_NAMES as m, WRITE_ENDPOINT_NAMES as h } from "./connectors/constants.mjs";
9
+ import { connectorTokens as g, getConnectorTokens as _ } from "./connectors/manifestTokens.mjs";
10
+ import { connectorPresets as v, emptyManifest as y } from "./connectors/presets.mjs";
11
+ import { validateConnectorManifest as b } from "./connectors/validateManifest.mjs";
12
+ import x from "./helpers/fetchManifest.mjs";
13
+ import S from "./helpers/generateFacade.mjs";
14
+ import C from "./helpers/syntaxHighlight.mjs";
15
+ import { formatDate as w, formatDateUTC as T, formatFromNow as E, formatUTCToLocal as D, getDurationMs as O, isDate as k, isValidFormat as A, parseDate as j, toUnixSeconds as M } from "./helpers/formatDate.mjs";
16
+ import { isUserEdit as N } from "./helpers/reducerOrigin.mjs";
17
+ import { evaluateRuleGroup as P } from "./helpers/ruleEvaluator.mjs";
18
+ import { ParamsFromURL as F, delay as I, emptyObject as L, getDisplayName as R, getKeyDecoded as z, getPathsFromObeject as B, hexToRGB as V, isInViewport as H, makeId as U } from "./helpers/utils.mjs";
19
+ import { disableReactDevTools as W } from "./helpers/security.mjs";
20
+ import { createStripTypenameLink as G, stripTypenameDeep as K } from "./helpers/stripTypename.mjs";
21
+ import q, { utilityOptions as J } from "./dataSource/utility/index.mjs";
22
+ import Y from "./dataSource/getBindingsDetails.mjs";
23
+ import X from "./dataSource/helpers/getSourceName.mjs";
24
+ import Z from "./dataSource/hooks/useRegisterSource.mjs";
25
+ import Q from "./dataSource/resolveVariables.mjs";
26
+ import $ from "./devTools/DevToolsContext.mjs";
27
+ import { debugCookieName as ee } from "./devTools/debugCookie.mjs";
28
+ import te from "./devTools/interactionLog.mjs";
29
+ import ne, { createStoreDevToolsLogger as re, pConsole as ie } from "./devTools/utils/PlitziConsole.mjs";
30
+ import ae from "./elements/ComponentContext.mjs";
31
+ import oe from "./hooks/useFontHead.mjs";
32
+ import se from "./hooks/useNetwork.mjs";
33
+ import ce, { PlitziServiceContext as le, PlitziServiceProvider as ue } from "./hooks/usePlitziServiceContext.mjs";
34
+ import { StyleVariableCategory as de } from "./types/StyleTypes.mjs";
35
+ import fe, { EMPTY_STYLE_SCHEMA as pe, StyleBindingsAllowed as me, baseDefaultValue as he, inheritableAttributesBase as ge } from "./style/styleConstants.mjs";
36
+ import { fontLinkAssets as _e } from "./style/fontAssets.mjs";
37
+ import { SYSTEM_FONTS as ve, availableFonts as ye, familiesInCss as be, fontFamilyStack as xe, fontUrlResolver as Se, fontsToHead as Ce, googleCss2Url as we, googleTextSubsetUrl as Te, isSafeFontUrl as Ee, primaryFamily as De } from "./style/fonts.mjs";
38
+ import { FontValidationError as Oe, parseSpaceFont as ke } from "./style/fontValidation.mjs";
39
+ import { fallbackForFamily as Ae, fontsFromCss as je } from "./style/fontsFromCss.mjs";
40
+ import Me from "./schema/SchemaContext.mjs";
41
+ import { EMPTY_SCHEMA as Ne, VARIABLE_REGEX as Pe } from "./schema/schemaConstants.mjs";
42
+ import { collectServerElements as Fe, hasServerElements as Ie } from "./schema/serverElements.mjs";
43
+ import Le from "./network/NetworkContext.mjs";
44
+ import Re from "./network/NetworkInternalContext.mjs";
45
+ import { SpaceEvents as ze, spaceEventSchemas as Be, validateSpaceEvent as Ve } from "./network/spaceEvents.mjs";
46
+ import He from "./network/graphql/builder/Mutations/index.mjs";
47
+ import Ue from "./network/graphql/builder/Queries/index.mjs";
48
+ import We from "./network/graphql/builder/Subscriptions/index.mjs";
49
+ import Ge from "./network/graphql/sdk/Mutations/index.mjs";
50
+ import Ke from "./network/graphql/sdk/Queries/index.mjs";
51
+ import qe from "./segments/SegmentsContext.mjs";
52
+ import Je, { RTEvent as Ye, RTEventCloseCode as Xe, getInstance as Ze, isRTEvent as Qe, setInstance as $e } from "./websockets/RTCodec.mjs";
53
+ import { THEME_CLASSES as et, THEME_COOKIE_NAME as tt, applyThemeClass as nt, isTheme as rt, readThemeCookie as it, themeFromCookies as at, writeThemeCookie as ot } from "./theme/themeCookie.mjs";
54
+ import st, { createThemeState as ct, createThemeStore as lt, resolveScheme as ut, setAreaTheme as dt, setMachineScheme as ft, setThemeMode as pt, themeFor as mt } from "./theme/themeStore.mjs";
55
+ import { useThemeStore as ht } from "./theme/ThemeScope.mjs";
56
+ import gt from "./theme/ThemeProvider.mjs";
57
+ import _t, { SPACE_THEME_AREA as vt } from "./theme/useTheme.mjs";
58
+ import yt from "./server/actions/useActionsSync.mjs";
59
+ import bt, { currentRscLocation as xt, rscDataPath as St } from "./server/rsc/refreshRsc.mjs";
60
+ import Ct from "./server/rsc/useRscRefresh.mjs";
61
+ import wt from "./server/rsc/useRscSync.mjs";
62
+ import { runtimeStatePersist as Tt } from "./state/runtimeStatePersist.mjs";
63
+ export { u as BODYLESS_METHODS, c as BuilderContext, He as BuilderMutations, Ue as BuilderQueries, d as CONNECTOR_HTTP_METHODS, ae as ComponentContext, f as DEFAULT_READ_ENDPOINT, $ as DevToolsContext, p as EMPTY_RESPONSE_METHODS, Ne as EMPTY_SCHEMA, pe as EMPTY_STYLE_SCHEMA, Oe as FontValidationError, Le as NetworkContext, Re as NetworkInternalContext, F as ParamsFromURL, ne as PlitziConsole, le as PlitziServiceContext, ue as PlitziServiceProvider, m as READ_ENDPOINT_NAMES, Je as RTCodec, Ye as RTEvent, Xe as RTEventCloseCode, vt as SPACE_THEME_AREA, ve as SYSTEM_FONTS, Me as SchemaContext, Ge as SdkMutations, Ke as SdkQueries, qe as SegmentsContext, We as SpaceEventSubscription, ze as SpaceEvents, me as StyleBindingsAllowed, de as StyleVariableCategory, et as THEME_CLASSES, tt as THEME_COOKIE_NAME, gt as ThemeProvider, Pe as VARIABLE_REGEX, h as WRITE_ENDPOINT_NAMES, nt as applyThemeClass, e as authFailureFromResponse, ye as availableFonts, he as baseDefaultValue, Fe as collectServerElements, v as connectorPresets, g as connectorTokens, l as contexts, i as createAuthFailureLink, re as createStoreDevToolsLogger, G as createStripTypenameLink, ct as createThemeState, lt as createThemeStore, xt as currentRscLocation, ee as debugCookieName, I as delay, W as disableReactDevTools, y as emptyManifest, L as emptyObject, P as evaluateRuleGroup, Ae as fallbackForFamily, be as familiesInCss, x as fetchManifest, a as filters, xe as fontFamilyStack, _e as fontLinkAssets, Se as fontUrlResolver, je as fontsFromCss, Ce as fontsToHead, w as formatDate, T as formatDateUTC, E as formatFromNow, D as formatUTCToLocal, S as generateFacade, Y as getBindingsDetails, _ as getConnectorTokens, R as getDisplayName, O as getDurationMs, Ze as getInstance, z as getKeyDecoded, B as getPathsFromObeject, X as getSourceName, we as googleCss2Url, Te as googleTextSubsetUrl, Ie as hasServerElements, s as hasValidToken, V as hexToRGB, ge as inheritableAttributesBase, k as isDate, H as isInViewport, te as isInteractionFlow, Qe as isRTEvent, Ee as isSafeFontUrl, rt as isTheme, N as isUserEdit, A as isValidFormat, U as makeId, t as onAuthFailure, ie as pConsole, j as parseDate, ke as parseSpaceFont, De as primaryFamily, o as processTwig, it as readThemeCookie, bt as refreshRsc, n as reportAuthFailure, ut as resolveScheme, Q as resolveVariables, St as rscDataPath, Tt as runtimeStatePersist, r as sameRegistrableDomain, dt as setAreaTheme, $e as setInstance, ft as setMachineScheme, pt as setThemeMode, Be as spaceEventSchemas, K as stripTypenameDeep, fe as styleConstants, C as syntaxHighlight, mt as themeFor, at as themeFromCookies, st as themeStore, M as toUnixSeconds, yt as useActionsSync, oe as useFontHead, se as useNetwork, ce as usePlitziServiceContext, Z as useRegisterSource, Ct as useRscRefresh, wt as useRscSync, _t as useTheme, ht as useThemeStore, q as utility, J as utilityOptions, b as validateConnectorManifest, Ve as validateSpaceEvent, ot as writeThemeCookie };
@@ -1,4 +1,4 @@
1
1
  export { matchPath } from './matchPath';
2
- export { getPageFullPath, getPaths, matchRoutePath, isPageAuthored, getRouteParams } from './routes';
2
+ export { getPageFullPath, getPaths, isAbsoluteUrl, isPageAuthored, matchRoutePath, getRouteParams } from './routes';
3
3
  export type { PathMatch, PathPattern } from './matchPath';
4
4
  export type { NavigationAccessLevel, NavigationAction, Path } from './routes';