@plitzi/sdk-shared 0.37.8 → 0.37.9

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 (147) hide show
  1. package/CHANGELOG.md +232 -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 +1 -1
  5. package/dist/actions/index.mjs +6 -6
  6. package/dist/auth/failureChannel.d.ts +8 -2
  7. package/dist/auth/failureChannel.mjs +1 -3
  8. package/dist/builder/contexts/BuilderContext.d.ts +1 -1
  9. package/dist/builder/contexts/BuilderContext.mjs +2 -3
  10. package/dist/devTools/DevToolsContext.mjs +2 -3
  11. package/dist/elements/ComponentContext.mjs +2 -3
  12. package/dist/helpers/sharedContext.d.ts +14 -0
  13. package/dist/helpers/sharedContext.mjs +9 -0
  14. package/dist/helpers/twigWrapper/Evaluator/Evaluator.d.ts +9 -1
  15. package/dist/helpers/twigWrapper/Evaluator/Evaluator.mjs +13 -8
  16. package/dist/helpers/twigWrapper/Evaluator/index.d.ts +1 -1
  17. package/dist/helpers/twigWrapper/index.d.ts +1 -0
  18. package/dist/helpers/twigWrapper/processTwig/processTwig.d.ts +2 -1
  19. package/dist/helpers/twigWrapper/processTwig/processTwig.mjs +3 -3
  20. package/dist/helpers/utils.mjs +4 -2
  21. package/dist/history/describe.mjs +1 -0
  22. package/dist/history/diff.d.ts +1 -1
  23. package/dist/history/diff.mjs +10 -9
  24. package/dist/history/types.d.ts +1 -1
  25. package/dist/hooks/usePlitziServiceContext.d.ts +1 -2
  26. package/dist/hooks/usePlitziServiceContext.mjs +3 -4
  27. package/dist/index.d.ts +0 -1
  28. package/dist/index.mjs +12 -13
  29. package/dist/network/NetworkContext.mjs +2 -3
  30. package/dist/network/NetworkInternalContext.d.ts +2 -4
  31. package/dist/network/NetworkInternalContext.mjs +2 -3
  32. package/dist/network/graphql/builder/Mutations/Space/components/SpaceAddComponentMutation.d.ts +4 -0
  33. package/dist/network/graphql/builder/Mutations/Space/components/SpaceAddComponentMutation.mjs +4 -0
  34. package/dist/network/graphql/builder/Mutations/Space/components/SpaceDetachInstanceMutation.d.ts +4 -0
  35. package/dist/network/graphql/builder/Mutations/Space/components/SpaceDetachInstanceMutation.mjs +4 -0
  36. package/dist/network/graphql/builder/Mutations/Space/components/SpaceRemoveComponentMutation.d.ts +4 -0
  37. package/dist/network/graphql/builder/Mutations/Space/components/SpaceRemoveComponentMutation.mjs +4 -0
  38. package/dist/network/graphql/builder/Mutations/Space/components/SpaceUpdateComponentMutation.d.ts +4 -0
  39. package/dist/network/graphql/builder/Mutations/Space/components/SpaceUpdateComponentMutation.mjs +4 -0
  40. package/dist/network/graphql/builder/Mutations/index.d.ts +8 -29
  41. package/dist/network/graphql/builder/Mutations/index.mjs +158 -200
  42. package/dist/network/graphql/builder/Queries/InitQuery.d.ts +2 -3
  43. package/dist/network/graphql/builder/Queries/InitQuery.mjs +1 -1
  44. package/dist/network/graphql/builder/Queries/Space/SpaceActionTasksQuery.d.ts +1 -1
  45. package/dist/network/graphql/builder/Queries/Space/SpaceActionTasksQuery.mjs +1 -1
  46. package/dist/network/graphql/builder/Queries/Space/SpaceVersionContentsQuery.d.ts +7 -0
  47. package/dist/network/graphql/builder/Queries/Space/SpaceVersionContentsQuery.mjs +4 -0
  48. package/dist/network/graphql/builder/Queries/index.d.ts +2 -4
  49. package/dist/network/graphql/builder/Queries/index.mjs +36 -38
  50. package/dist/network/graphql/builder/Subscriptions/SpaceEventSubscription.d.ts +1 -1
  51. package/dist/network/graphql/sdk/Queries/InitQuery.d.ts +2 -3
  52. package/dist/network/graphql/sdk/Queries/InitQuery.mjs +1 -1
  53. package/dist/network/graphql/sdk/Queries/index.d.ts +0 -4
  54. package/dist/network/graphql/sdk/Queries/index.mjs +2 -8
  55. package/dist/network/spaceEvents.d.ts +14 -190
  56. package/dist/network/spaceEvents.mjs +48 -132
  57. package/dist/schema/SchemaContext.mjs +2 -3
  58. package/dist/schema/index.mjs +4 -4
  59. package/dist/schema/schemaConstants.d.ts +2 -0
  60. package/dist/schema/schemaConstants.mjs +4 -3
  61. package/dist/server/rsc/refreshRsc.d.ts +3 -1
  62. package/dist/server/rsc/refreshRsc.mjs +15 -14
  63. package/dist/source/export.d.ts +107 -0
  64. package/dist/source/export.mjs +4 -0
  65. package/dist/source/index.d.ts +4 -0
  66. package/dist/source/index.mjs +3 -0
  67. package/dist/source/snapshot.d.ts +51 -0
  68. package/dist/source/snapshot.mjs +80 -0
  69. package/dist/store/index.d.ts +45 -45
  70. package/dist/store/renderSettings.d.ts +1 -0
  71. package/dist/store/renderSettings.mjs +9 -5
  72. package/dist/theme/ThemeScope.mjs +4 -3
  73. package/dist/types/ActionTypes.d.ts +5 -0
  74. package/dist/types/ElementTypes.d.ts +6 -5
  75. package/dist/types/EventBridgeTypes.d.ts +2 -2
  76. package/dist/types/FunctionTypes.d.ts +13 -0
  77. package/dist/types/InteractionTypes.d.ts +5 -0
  78. package/dist/types/SchemaTypes.d.ts +38 -0
  79. package/dist/types/SdkTypes.d.ts +0 -2
  80. package/dist/types/SpaceTypes.d.ts +36 -0
  81. package/dist/types/StoreTypes.d.ts +14 -3
  82. package/dist/types/index.d.ts +0 -1
  83. package/package.json +43 -134
  84. package/dist/network/graphql/builder/Mutations/Segment/SegmentAddMutation.d.ts +0 -4
  85. package/dist/network/graphql/builder/Mutations/Segment/SegmentAddMutation.mjs +0 -4
  86. package/dist/network/graphql/builder/Mutations/Segment/SegmentAddTemplateMutation.d.ts +0 -2
  87. package/dist/network/graphql/builder/Mutations/Segment/SegmentAddTemplateMutation.mjs +0 -4
  88. package/dist/network/graphql/builder/Mutations/Segment/SegmentPublishMutation.d.ts +0 -8
  89. package/dist/network/graphql/builder/Mutations/Segment/SegmentPublishMutation.mjs +0 -4
  90. package/dist/network/graphql/builder/Mutations/Segment/SegmentRemoveMutation.d.ts +0 -2
  91. package/dist/network/graphql/builder/Mutations/Segment/SegmentRemoveMutation.mjs +0 -4
  92. package/dist/network/graphql/builder/Mutations/Segment/SegmentUpdateMutation.d.ts +0 -4
  93. package/dist/network/graphql/builder/Mutations/Segment/SegmentUpdateMutation.mjs +0 -4
  94. package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentAddElementMutation.d.ts +0 -2
  95. package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentAddElementMutation.mjs +0 -4
  96. package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentCloneElementMutation.d.ts +0 -2
  97. package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentCloneElementMutation.mjs +0 -4
  98. package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentMoveElementMutation.d.ts +0 -2
  99. package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentMoveElementMutation.mjs +0 -4
  100. package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentRemoveElementMutation.d.ts +0 -2
  101. package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentRemoveElementMutation.mjs +0 -4
  102. package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentRenameElementMutation.d.ts +0 -3
  103. package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentRenameElementMutation.mjs +0 -4
  104. package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentUpdateElementMutation.d.ts +0 -2
  105. package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentUpdateElementMutation.mjs +0 -4
  106. package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentUpdateElementsMutation.d.ts +0 -2
  107. package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentUpdateElementsMutation.mjs +0 -4
  108. package/dist/network/graphql/builder/Mutations/Segment/space/variables/SegmentSpaceAddVariableMutation.d.ts +0 -2
  109. package/dist/network/graphql/builder/Mutations/Segment/space/variables/SegmentSpaceAddVariableMutation.mjs +0 -4
  110. package/dist/network/graphql/builder/Mutations/Segment/space/variables/SegmentSpaceRemoveVariableMutation.d.ts +0 -2
  111. package/dist/network/graphql/builder/Mutations/Segment/space/variables/SegmentSpaceRemoveVariableMutation.mjs +0 -4
  112. package/dist/network/graphql/builder/Mutations/Segment/space/variables/SegmentSpaceUpdateVariableMutation.d.ts +0 -2
  113. package/dist/network/graphql/builder/Mutations/Segment/space/variables/SegmentSpaceUpdateVariableMutation.mjs +0 -4
  114. package/dist/network/graphql/builder/Mutations/Segment/style/selectorVariables/SegmentStyleAddSelectorVariableMutation.d.ts +0 -2
  115. package/dist/network/graphql/builder/Mutations/Segment/style/selectorVariables/SegmentStyleAddSelectorVariableMutation.mjs +0 -4
  116. package/dist/network/graphql/builder/Mutations/Segment/style/selectorVariables/SegmentStyleRemoveSelectorVariableMutation.d.ts +0 -2
  117. package/dist/network/graphql/builder/Mutations/Segment/style/selectorVariables/SegmentStyleRemoveSelectorVariableMutation.mjs +0 -4
  118. package/dist/network/graphql/builder/Mutations/Segment/style/selectorVariables/SegmentStyleUpdateSelectorVariableMutation.d.ts +0 -2
  119. package/dist/network/graphql/builder/Mutations/Segment/style/selectorVariables/SegmentStyleUpdateSelectorVariableMutation.mjs +0 -4
  120. package/dist/network/graphql/builder/Mutations/Segment/style/selectors/SegmentStyleAddSelectorMutation.d.ts +0 -2
  121. package/dist/network/graphql/builder/Mutations/Segment/style/selectors/SegmentStyleAddSelectorMutation.mjs +0 -4
  122. package/dist/network/graphql/builder/Mutations/Segment/style/selectors/SegmentStyleRemoveSelectorMutation.d.ts +0 -2
  123. package/dist/network/graphql/builder/Mutations/Segment/style/selectors/SegmentStyleRemoveSelectorMutation.mjs +0 -4
  124. package/dist/network/graphql/builder/Mutations/Segment/style/selectors/SegmentStyleRemoveSelectorsMutation.d.ts +0 -2
  125. package/dist/network/graphql/builder/Mutations/Segment/style/selectors/SegmentStyleRemoveSelectorsMutation.mjs +0 -4
  126. package/dist/network/graphql/builder/Mutations/Segment/style/selectors/SegmentStyleUpdateSelectorMutation.d.ts +0 -2
  127. package/dist/network/graphql/builder/Mutations/Segment/style/selectors/SegmentStyleUpdateSelectorMutation.mjs +0 -4
  128. package/dist/network/graphql/builder/Mutations/Segment/style/variables/SegmentStyleAddVariableMutation.d.ts +0 -2
  129. package/dist/network/graphql/builder/Mutations/Segment/style/variables/SegmentStyleAddVariableMutation.mjs +0 -4
  130. package/dist/network/graphql/builder/Mutations/Segment/style/variables/SegmentStyleRemoveVariableMutation.d.ts +0 -2
  131. package/dist/network/graphql/builder/Mutations/Segment/style/variables/SegmentStyleRemoveVariableMutation.mjs +0 -4
  132. package/dist/network/graphql/builder/Mutations/Segment/style/variables/SegmentStyleUpdateVariableMutation.d.ts +0 -2
  133. package/dist/network/graphql/builder/Mutations/Segment/style/variables/SegmentStyleUpdateVariableMutation.mjs +0 -4
  134. package/dist/network/graphql/builder/Queries/Segment/SegmentQuery.d.ts +0 -6
  135. package/dist/network/graphql/builder/Queries/Segment/SegmentQuery.mjs +0 -4
  136. package/dist/network/graphql/builder/Queries/Segment/SegmentsQuery.d.ts +0 -9
  137. package/dist/network/graphql/builder/Queries/Segment/SegmentsQuery.mjs +0 -4
  138. package/dist/network/graphql/sdk/Queries/Segment/SegmentQuery.d.ts +0 -6
  139. package/dist/network/graphql/sdk/Queries/Segment/SegmentQuery.mjs +0 -4
  140. package/dist/network/graphql/sdk/Queries/Segment/SegmentsQuery.d.ts +0 -9
  141. package/dist/network/graphql/sdk/Queries/Segment/SegmentsQuery.mjs +0 -4
  142. package/dist/segments/SegmentsContext.d.ts +0 -2
  143. package/dist/segments/SegmentsContext.mjs +0 -6
  144. package/dist/segments/index.d.ts +0 -3
  145. package/dist/segments/index.mjs +0 -2
  146. package/dist/types/SegmentTypes.d.ts +0 -41
  147. package/dist/types/SegmentTypes.mjs +0 -0
@@ -26,8 +26,9 @@ 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)),
33
34
  ...n("setting", {
@@ -39,26 +40,26 @@ var e = (t, n) => {
39
40
  ...i("definition", t.definition),
40
41
  pages: t.pages
41
42
  })
42
- ], o = {
43
+ ], c = {
43
44
  class: "selector",
44
45
  element: "globalStyle",
45
46
  id: "idStyle"
46
- }, s = (e) => {
47
+ }, l = (e) => {
47
48
  let t = {};
48
49
  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] ??= {};
50
+ let r = c[i.type], a = t[r] ??= {};
50
51
  (a[e] ??= {})[n] = i;
51
52
  }
52
53
  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);
54
+ }, u = (e) => Object.fromEntries(Object.entries(e ?? {}).flatMap(([e, t]) => Object.entries(t).map(([t, n]) => [`${e}/${t}`, n]))), d = (e, t) => {
55
+ let i = l(e.platform), a = l(t.platform);
55
56
  return [
56
57
  ...[
57
58
  "selector",
58
59
  "globalStyle",
59
60
  "idStyle"
60
61
  ].flatMap((e) => n(e, i[e] ?? {}, a[e] ?? {})),
61
- ...n("token", c(e.variables), c(t.variables)),
62
+ ...n("token", u(e.variables), u(t.variables)),
62
63
  ...n("font", r(e.fonts, (e) => e.family), r(t.fonts, (e) => e.family)),
63
64
  ...n("setting", {
64
65
  theme: e.theme,
@@ -70,4 +71,4 @@ var e = (t, n) => {
70
71
  ];
71
72
  };
72
73
  //#endregion
73
- export { a as diffSchema, l as diffStyle, t as jsonCopy, e as sameValue };
74
+ 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' | '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,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,7 +10,6 @@ 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';
package/dist/index.mjs CHANGED
@@ -50,18 +50,17 @@ import { fallbackForFamily as Ze, fontsFromCss as Qe } from "./style/fontsFromCs
50
50
  import { RUNTIME_STYLE_ID as $e, markStyleCache as et, styleCacheFromDocument as tt, styleCacheTravelsInDocument as nt } from "./style/runtimeStyle.mjs";
51
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
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";
53
+ import { COMPONENT_PROPS_SOURCE as dt, EMPTY_SCHEMA as ft, VARIABLE_REGEX as pt } from "./schema/schemaConstants.mjs";
54
+ import { findLayoutCycle as mt, resolveLayoutChain as ht } from "./schema/layoutChain.mjs";
55
+ import { collectServerElements as gt, hasServerElements as _t } from "./schema/serverElements.mjs";
56
+ import vt from "./network/NetworkContext.mjs";
57
+ import yt from "./network/NetworkInternalContext.mjs";
58
+ import { SpaceEvents as bt, schemaFromWire as xt, schemaToWire as St, spaceEventSchemas as Ct, validateSpaceEvent as wt } from "./network/spaceEvents.mjs";
59
+ import Tt from "./network/graphql/builder/Mutations/index.mjs";
60
+ import Et from "./network/graphql/builder/Queries/index.mjs";
61
+ import Dt from "./network/graphql/builder/Subscriptions/index.mjs";
62
+ import Ot from "./network/graphql/sdk/Mutations/index.mjs";
63
+ import kt from "./network/graphql/sdk/Queries/index.mjs";
65
64
  import At, { RTEvent as jt, RTEventCloseCode as Mt, getInstance as Nt, isRTEvent as Pt, setInstance as Ft } from "./websockets/RTCodec.mjs";
66
65
  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
66
  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";
@@ -74,4 +73,4 @@ import on from "./server/rsc/useRscRefresh.mjs";
74
73
  import sn from "./server/rsc/useRscSync.mjs";
75
74
  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
75
  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 };
76
+ export { b as BODYLESS_METHODS, v as BuilderContext, Tt as BuilderMutations, Et as BuilderQueries, dt as COMPONENT_PROPS_SOURCE, x as CONNECTOR_HTTP_METHODS, _e as ComponentContext, S as DEFAULT_READ_ENDPOINT, de as DevToolsContext, C as EMPTY_RESPONSE_METHODS, ft as EMPTY_SCHEMA, Pe as EMPTY_STYLE_SCHEMA, Ye as FontValidationError, rt as HIDDEN_CLASS, p as MAX_PARAM_PASSES, vt as NetworkContext, yt 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, Ot as SdkMutations, kt as SdkQueries, Dt as SpaceEventSubscription, bt as SpaceEvents, Fe as StyleBindingsAllowed, Me as StyleVariableCategory, It as THEME_CLASSES, Lt as THEME_COOKIE_NAME, Qt as ThemeProvider, pt 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, gt 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, mt 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, _t 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, ht as resolveLayoutChain, Kt as resolveScheme, m as resolveStepParam, ue as resolveVariables, an as rscDataPath, _n as runtimeStatePersist, r as sameRegistrableDomain, we as sameValue, xt as schemaFromWire, St as schemaToWire, qt as setAreaTheme, Ft as setInstance, Jt as setMachineScheme, Yt as setThemeMode, Ct 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, wt as validateSpaceEvent, o as visitorAccess, gn as writePaintedEntry, Ht as writeThemeCookie };
@@ -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 };
@@ -0,0 +1,4 @@
1
+ /** Whether the component was declared. */
2
+ export type TSpaceAddComponentMutation = boolean;
3
+ declare const SpaceAddComponentMutation = "\n mutation SpaceAddComponentMutation($environment: String!, $component: Json!, $from: Json) {\n SpaceAddComponent(environment: $environment, component: $component, from: $from)\n }\n";
4
+ export default SpaceAddComponentMutation;
@@ -0,0 +1,4 @@
1
+ //#region src/network/graphql/builder/Mutations/Space/components/SpaceAddComponentMutation.ts
2
+ var e = "\n mutation SpaceAddComponentMutation($environment: String!, $component: Json!, $from: Json) {\n SpaceAddComponent(environment: $environment, component: $component, from: $from)\n }\n";
3
+ //#endregion
4
+ export { e as default };
@@ -0,0 +1,4 @@
1
+ /** The id of the copy that replaced the instance. */
2
+ export type TSpaceDetachInstanceMutation = string;
3
+ declare const SpaceDetachInstanceMutation = "\n mutation SpaceDetachInstanceMutation($environment: String!, $instanceId: String!) {\n SpaceDetachInstance(environment: $environment, instanceId: $instanceId)\n }\n";
4
+ export default SpaceDetachInstanceMutation;
@@ -0,0 +1,4 @@
1
+ //#region src/network/graphql/builder/Mutations/Space/components/SpaceDetachInstanceMutation.ts
2
+ var e = "\n mutation SpaceDetachInstanceMutation($environment: String!, $instanceId: String!) {\n SpaceDetachInstance(environment: $environment, instanceId: $instanceId)\n }\n";
3
+ //#endregion
4
+ export { e as default };
@@ -0,0 +1,4 @@
1
+ /** Whether the component was removed. */
2
+ export type TSpaceRemoveComponentMutation = boolean;
3
+ declare const SpaceRemoveComponentMutation = "\n mutation SpaceRemoveComponentMutation($environment: String!, $componentId: String!) {\n SpaceRemoveComponent(environment: $environment, componentId: $componentId)\n }\n";
4
+ export default SpaceRemoveComponentMutation;
@@ -0,0 +1,4 @@
1
+ //#region src/network/graphql/builder/Mutations/Space/components/SpaceRemoveComponentMutation.ts
2
+ var e = "\n mutation SpaceRemoveComponentMutation($environment: String!, $componentId: String!) {\n SpaceRemoveComponent(environment: $environment, componentId: $componentId)\n }\n";
3
+ //#endregion
4
+ export { e as default };
@@ -0,0 +1,4 @@
1
+ /** Whether the declaration was changed. */
2
+ export type TSpaceUpdateComponentMutation = boolean;
3
+ declare const SpaceUpdateComponentMutation = "\n mutation SpaceUpdateComponentMutation($environment: String!, $componentId: String!, $declaration: Json!) {\n SpaceUpdateComponent(environment: $environment, componentId: $componentId, declaration: $declaration)\n }\n";
4
+ export default SpaceUpdateComponentMutation;
@@ -0,0 +1,4 @@
1
+ //#region src/network/graphql/builder/Mutations/Space/components/SpaceUpdateComponentMutation.ts
2
+ var e = "\n mutation SpaceUpdateComponentMutation($environment: String!, $componentId: String!, $declaration: Json!) {\n SpaceUpdateComponent(environment: $environment, componentId: $componentId, declaration: $declaration)\n }\n";
3
+ //#endregion
4
+ export { e as default };
@@ -1,7 +1,3 @@
1
- import { TSegmentAddMutation } from './Segment/SegmentAddMutation';
2
- import { TSegmentPublishMutation } from './Segment/SegmentPublishMutation';
3
- import { TSegmentUpdateMutation } from './Segment/SegmentUpdateMutation';
4
- import { TSegmentRenameElementMutation } from './Segment/space/elements/SegmentRenameElementMutation';
5
1
  import { TSpaceAddActionMutation } from './Space/actions/SpaceAddActionMutation';
6
2
  import { TSpaceRemoveActionMutation } from './Space/actions/SpaceRemoveActionMutation';
7
3
  import { TSpaceRunActionMutation } from './Space/actions/SpaceRunActionMutation';
@@ -13,6 +9,10 @@ import { TSpaceRemoveCdnMutation } from './Space/cdns/SpaceRemoveCdnMutation';
13
9
  import { TSpaceSetCdnCredentialMutation } from './Space/cdns/SpaceSetCdnCredentialMutation';
14
10
  import { TSpaceUpdateCdnBucketMutation } from './Space/cdns/SpaceUpdateCdnBucketMutation';
15
11
  import { TSpaceUpdateCdnMutation } from './Space/cdns/SpaceUpdateCdnMutation';
12
+ import { TSpaceAddComponentMutation } from './Space/components/SpaceAddComponentMutation';
13
+ import { TSpaceDetachInstanceMutation } from './Space/components/SpaceDetachInstanceMutation';
14
+ import { TSpaceRemoveComponentMutation } from './Space/components/SpaceRemoveComponentMutation';
15
+ import { TSpaceUpdateComponentMutation } from './Space/components/SpaceUpdateComponentMutation';
16
16
  import { TSpaceAddConnectorMutation } from './Space/connectors/SpaceAddConnectorMutation';
17
17
  import { TSpaceRemoveConnectorMutation } from './Space/connectors/SpaceRemoveConnectorMutation';
18
18
  import { TSpaceUpdateConnectorMutation } from './Space/connectors/SpaceUpdateConnectorMutation';
@@ -56,6 +56,10 @@ export type BuilderMutationsMap = {
56
56
  SpaceRemoveElement: unknown;
57
57
  SpaceMoveElement: unknown;
58
58
  SpaceCloneElement: unknown;
59
+ SpaceAddComponent: TSpaceAddComponentMutation;
60
+ SpaceUpdateComponent: TSpaceUpdateComponentMutation;
61
+ SpaceRemoveComponent: TSpaceRemoveComponentMutation;
62
+ SpaceDetachInstance: TSpaceDetachInstanceMutation;
59
63
  SpaceAddTemplate: unknown;
60
64
  SpaceAddPlugin: TSpaceAddPluginMutation;
61
65
  SpaceUpdatePlugin: TSpaceUpdatePluginMutation;
@@ -111,31 +115,6 @@ export type BuilderMutationsMap = {
111
115
  StyleRemoveVariable: unknown;
112
116
  StyleUpdate: unknown;
113
117
  StyleUpdateSettings: unknown;
114
- SegmentAdd: TSegmentAddMutation;
115
- SegmentUpdate: TSegmentUpdateMutation;
116
- SegmentRemove: unknown;
117
- SegmentAddElement: unknown;
118
- SegmentUpdateElement: unknown;
119
- SegmentRenameElement: TSegmentRenameElementMutation;
120
- SegmentUpdateElements: unknown;
121
- SegmentRemoveElement: unknown;
122
- SegmentMoveElement: unknown;
123
- SegmentCloneElement: unknown;
124
- SegmentAddTemplate: unknown;
125
- SegmentSpaceAddVariable: unknown;
126
- SegmentSpaceUpdateVariable: unknown;
127
- SegmentSpaceRemoveVariable: unknown;
128
- SegmentStyleAddSelector: unknown;
129
- SegmentStyleUpdateSelector: unknown;
130
- SegmentStyleRemoveSelector: unknown;
131
- SegmentStyleRemoveSelectors: unknown;
132
- SegmentStyleAddSelectorVariable: unknown;
133
- SegmentStyleRemoveSelectorVariable: unknown;
134
- SegmentStyleUpdateSelectorVariable: unknown;
135
- SegmentStyleAddVariable: unknown;
136
- SegmentStyleUpdateVariable: unknown;
137
- SegmentStyleRemoveVariable: unknown;
138
- SegmentPublish: TSegmentPublishMutation;
139
118
  };
140
119
  declare const BuilderMutations: Record<keyof BuilderMutationsMap, string>;
141
120
  export default BuilderMutations;