@plitzi/sdk-shared 0.38.3 → 0.38.5

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 (86) hide show
  1. package/CHANGELOG.md +522 -0
  2. package/dist/actions/functions.d.ts +10 -0
  3. package/dist/actions/functions.mjs +10 -10
  4. package/dist/actions/index.d.ts +1 -1
  5. package/dist/actions/index.mjs +6 -6
  6. package/dist/authoring/elementCallbacks.d.ts +2 -2
  7. package/dist/dataSource/getBindingsDetails.mjs +1 -1
  8. package/dist/devTools/chrome.d.ts +8 -0
  9. package/dist/devTools/chrome.mjs +4 -0
  10. package/dist/devTools/index.d.ts +1 -0
  11. package/dist/devTools/index.mjs +5 -4
  12. package/dist/helpers/images.d.ts +5 -0
  13. package/dist/helpers/images.mjs +2 -2
  14. package/dist/helpers/twigWrapper/inspectTemplate.mjs +14 -7
  15. package/dist/helpers/twigWrapper/processTwig/processTwig.d.ts +4 -3
  16. package/dist/helpers/twigWrapper/processTwig/processTwig.mjs +32 -22
  17. package/dist/history/types.d.ts +4 -4
  18. package/dist/index.mjs +56 -54
  19. package/dist/network/graphql/builder/Mutations/Space/data/SpaceSaveDataMutation.d.ts +10 -0
  20. package/dist/network/graphql/builder/Mutations/Space/data/SpaceSaveDataMutation.mjs +4 -0
  21. package/dist/network/graphql/builder/Mutations/index.d.ts +2 -0
  22. package/dist/network/graphql/builder/Mutations/index.mjs +124 -122
  23. package/dist/network/graphql/builder/Queries/InitQuery.d.ts +1 -3
  24. package/dist/network/graphql/builder/Queries/InitQuery.mjs +1 -1
  25. package/dist/network/graphql/builder/Queries/Space/SpaceDataQuery.d.ts +6 -0
  26. package/dist/network/graphql/builder/Queries/Space/SpaceDataQuery.mjs +4 -0
  27. package/dist/network/graphql/builder/Queries/index.d.ts +2 -0
  28. package/dist/network/graphql/builder/Queries/index.mjs +22 -20
  29. package/dist/network/spaceEvents.d.ts +2 -2
  30. package/dist/plugins/bundle.d.ts +26 -0
  31. package/dist/plugins/bundle.mjs +62 -0
  32. package/dist/plugins/declaration.d.ts +12 -0
  33. package/dist/plugins/declaration.mjs +9 -0
  34. package/dist/queries/queryCache.d.ts +7 -0
  35. package/dist/queries/queryCache.mjs +14 -7
  36. package/dist/queries/useQuery.d.ts +2 -0
  37. package/dist/queries/useQuery.mjs +5 -2
  38. package/dist/schema/anchor.d.ts +11 -0
  39. package/dist/schema/anchor.mjs +6 -2
  40. package/dist/schema/index.mjs +6 -6
  41. package/dist/schema/markdownHeadings.d.ts +13 -0
  42. package/dist/schema/markdownHeadings.mjs +24 -0
  43. package/dist/schema/motion.d.ts +47 -15
  44. package/dist/schema/motion.mjs +208 -32
  45. package/dist/schema/motionReveal.d.ts +10 -0
  46. package/dist/schema/motionReveal.mjs +23 -0
  47. package/dist/schema/pageElements.d.ts +12 -0
  48. package/dist/schema/pageElements.mjs +41 -0
  49. package/dist/schema/wire.mjs +4 -3
  50. package/dist/server/index.mjs +4 -4
  51. package/dist/server/rsc/projectData.d.ts +6 -0
  52. package/dist/server/rsc/projectData.mjs +4 -0
  53. package/dist/server/rsc/refreshRsc.d.ts +18 -5
  54. package/dist/server/rsc/refreshRsc.mjs +80 -20
  55. package/dist/server/rsc/useRscSync.mjs +26 -15
  56. package/dist/server/usePluginRoute.d.ts +18 -0
  57. package/dist/server/usePluginRoute.mjs +14 -0
  58. package/dist/source/export.d.ts +18 -0
  59. package/dist/source/import.d.ts +55 -0
  60. package/dist/source/import.mjs +4 -0
  61. package/dist/source/index.d.ts +2 -0
  62. package/dist/source/index.mjs +3 -2
  63. package/dist/store/index.d.ts +45 -45
  64. package/dist/style/cssLayers.d.ts +18 -0
  65. package/dist/style/cssLayers.mjs +14 -0
  66. package/dist/style/index.d.ts +1 -0
  67. package/dist/style/index.mjs +11 -10
  68. package/dist/style/styleConstants.d.ts +10 -2
  69. package/dist/style/styleConstants.mjs +16 -0
  70. package/dist/style/useDisplayMode.d.ts +11 -0
  71. package/dist/style/useDisplayMode.mjs +18 -0
  72. package/dist/types/ActionTypes.d.ts +3 -3
  73. package/dist/types/ComponentTypes.d.ts +13 -0
  74. package/dist/types/DataTypes.d.ts +36 -0
  75. package/dist/types/InteractionTypes.d.ts +16 -2
  76. package/dist/types/SchemaTypes.d.ts +10 -2
  77. package/dist/types/SchemaTypes.mjs +2 -1
  78. package/dist/types/ServerTypes.d.ts +60 -8
  79. package/dist/types/StoreTypes.d.ts +19 -6
  80. package/dist/types/index.d.ts +1 -2
  81. package/package.json +58 -28
  82. package/setupTests.ts +16 -13
  83. package/dist/types/AITypes.d.ts +0 -80
  84. package/dist/types/McpTypes/index.d.ts +0 -56
  85. package/dist/types/McpTypes/index.mjs +0 -0
  86. /package/dist/types/{AITypes.mjs → DataTypes.mjs} +0 -0
@@ -1,9 +1,9 @@
1
1
  import { accessRefusal as e } from "./access.mjs";
2
2
  import { cronFiresBetween as t, cronMatches as n, cronNextFire as r, isKnownTimeZone as i, parseCron as a, zonedClock as o } from "./cron.mjs";
3
3
  import { FAILURE_HANDLER_TASK as s } from "./failureHandler.mjs";
4
- import { DEFAULT_FUNCTION_TIME_LIMITS as c, FUNCTION_ROUTES_PREFIX as l, isFunctionRoutePath as u, isFunctionsSourcePath as d, readFunctionsSource as f } from "./functions.mjs";
5
- import { triggerAccess as p, triggerCacheMs as m, triggerHasStaleVerify as h, triggerInput as g, triggerVerify as _ } from "./triggerParams.mjs";
6
- import { actionName as v, actionTriggers as y, isActionEnabled as b } from "./triggers.mjs";
7
- import { isActionDocument as x, validateActionDocument as S } from "./validateDocument.mjs";
8
- import { SMTP_CREDENTIAL_KEYS as C, isSingleEmailAddress as w, readSmtpCredential as T } from "./smtp.mjs";
9
- export { c as DEFAULT_FUNCTION_TIME_LIMITS, s as FAILURE_HANDLER_TASK, l as FUNCTION_ROUTES_PREFIX, C as SMTP_CREDENTIAL_KEYS, e as accessRefusal, v as actionName, y as actionTriggers, t as cronFiresBetween, n as cronMatches, r as cronNextFire, x as isActionDocument, b as isActionEnabled, u as isFunctionRoutePath, d as isFunctionsSourcePath, i as isKnownTimeZone, w as isSingleEmailAddress, a as parseCron, f as readFunctionsSource, T as readSmtpCredential, p as triggerAccess, m as triggerCacheMs, h as triggerHasStaleVerify, g as triggerInput, _ as triggerVerify, S as validateActionDocument, o as zonedClock };
4
+ import { DEFAULT_FUNCTION_TIME_LIMITS as c, FUNCTION_ROUTES_PREFIX as l, PLUGIN_FUNCTIONS_SOURCE as u, PLUGIN_ROUTES_SEGMENT as d, isFunctionRoutePath as f, isFunctionsSourcePath as p, pluginRoutePath as m, readFunctionsSource as h } from "./functions.mjs";
5
+ import { triggerAccess as g, triggerCacheMs as _, triggerHasStaleVerify as v, triggerInput as y, triggerVerify as b } from "./triggerParams.mjs";
6
+ import { actionName as x, actionTriggers as S, isActionEnabled as C } from "./triggers.mjs";
7
+ import { isActionDocument as w, validateActionDocument as T } from "./validateDocument.mjs";
8
+ import { SMTP_CREDENTIAL_KEYS as E, isSingleEmailAddress as D, readSmtpCredential as O } from "./smtp.mjs";
9
+ export { c as DEFAULT_FUNCTION_TIME_LIMITS, s as FAILURE_HANDLER_TASK, l as FUNCTION_ROUTES_PREFIX, u as PLUGIN_FUNCTIONS_SOURCE, d as PLUGIN_ROUTES_SEGMENT, E as SMTP_CREDENTIAL_KEYS, e as accessRefusal, x as actionName, S as actionTriggers, t as cronFiresBetween, n as cronMatches, r as cronNextFire, w as isActionDocument, C as isActionEnabled, f as isFunctionRoutePath, p as isFunctionsSourcePath, i as isKnownTimeZone, D as isSingleEmailAddress, a as parseCron, m as pluginRoutePath, h as readFunctionsSource, O as readSmtpCredential, g as triggerAccess, _ as triggerCacheMs, v as triggerHasStaleVerify, y as triggerInput, b as triggerVerify, T as validateActionDocument, o as zonedClock };
@@ -53,13 +53,13 @@ export declare const SCROLL_CALLBACKS: {
53
53
  type: "select";
54
54
  description: string;
55
55
  default: string;
56
- options: ("end" | "start" | "center" | "nearest")[];
56
+ options: ("start" | "center" | "end" | "nearest")[];
57
57
  };
58
58
  inline: {
59
59
  type: "select";
60
60
  description: string;
61
61
  default: string;
62
- options: ("end" | "start" | "center" | "nearest")[];
62
+ options: ("start" | "center" | "end" | "nearest")[];
63
63
  };
64
64
  behavior: BuiltinParam;
65
65
  };
@@ -8,7 +8,7 @@ import { produce as s } from "immer";
8
8
  var c = (e, t, n, r, a) => {
9
9
  let o = r === "initialState" ? `definition.${r}.${a}` : `${r}.${a}`;
10
10
  return {
11
- fromValue: t ? i(e, t, i(n, o)) : void 0,
11
+ fromValue: t ? i(e, t) : void 0,
12
12
  toValue: i(n, o, t ? i(e, t) : void 0)
13
13
  };
14
14
  }, l = (l, u, d = {}) => {
@@ -0,0 +1,8 @@
1
+ /**
2
+ * The attribute every piece of the dev tools' own chrome carries — the badge, the panel — so whatever looks at the
3
+ * page rather than at the tools can leave it out: `plitzi shot` and `plitzi check` hide it, and a picture of a page is
4
+ * a picture of the page.
5
+ */
6
+ export declare const DEV_TOOLS_ATTRIBUTE = "data-plitzi-devtools";
7
+ /** The rule that hides the dev tools' chrome, for a capture of the page alone. */
8
+ export declare const HIDE_DEV_TOOLS_CSS = "[data-plitzi-devtools] { display: none !important; }";
@@ -0,0 +1,4 @@
1
+ //#region src/devTools/chrome.ts
2
+ var e = "data-plitzi-devtools", t = `[${e}] { display: none !important; }`;
3
+ //#endregion
4
+ export { e as DEV_TOOLS_ATTRIBUTE, t as HIDE_DEV_TOOLS_CSS };
@@ -2,6 +2,7 @@ import { default as debugCookieName } from './debugCookie';
2
2
  import { default as DevToolsContext } from './DevToolsContext';
3
3
  import { default as isInteractionFlow } from './interactionLog';
4
4
  import { default as PlitziConsole } from './utils/PlitziConsole';
5
+ export * from './chrome';
5
6
  export * from './debugCookie';
6
7
  export * from './DevToolsContext';
7
8
  export * from './interactionLog';
@@ -1,5 +1,6 @@
1
1
  import e from "./DevToolsContext.mjs";
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 };
2
+ import { DEV_TOOLS_ATTRIBUTE as t, HIDE_DEV_TOOLS_CSS as n } from "./chrome.mjs";
3
+ import { debugCookieName as r } from "./debugCookie.mjs";
4
+ import i from "./interactionLog.mjs";
5
+ import a, { createStoreDevToolsLogger as o, pConsole as s } from "./utils/PlitziConsole.mjs";
6
+ export { t as DEV_TOOLS_ATTRIBUTE, e as DevToolsContext, n as HIDE_DEV_TOOLS_CSS, a as PlitziConsole, o as createStoreDevToolsLogger, r as debugCookieName, i as isInteractionFlow, s as pConsole };
@@ -12,6 +12,11 @@ export type ImageWidth = (typeof IMAGE_WIDTHS)[number];
12
12
  export declare const isImageWidth: (width: number) => width is ImageWidth;
13
13
  /** A picture another site serves — the only kind there is anything to resize; a path of this site is served as it is. */
14
14
  export declare const isRemoteImage: (src: string) => boolean;
15
+ /**
16
+ * Whether the page server makes sizes of a picture: another site's, and not a vector — an SVG is the same at any width,
17
+ * and the endpoint sends one back to where it is.
18
+ */
19
+ export declare const isResizableImage: (src: string) => boolean;
15
20
  /** The address of `src` at `width` on the endpoint. */
16
21
  export declare const imageUrl: (endpoint: string, src: string, width: ImageWidth) => string;
17
22
  /** Every width as a `srcset`, for the browser to pick the one its layout needs. */
@@ -8,6 +8,6 @@ var e = "/_plitzi/img", t = [
8
8
  1280,
9
9
  1600,
10
10
  1920
11
- ], n = (e) => t.some((t) => t === e), r = (e) => /^https?:\/\//i.test(e), i = (e, t, n) => `${e}?url=${encodeURIComponent(t)}&w=${String(n)}`, a = (e, n) => t.map((t) => `${i(e, n, t)} ${String(t)}w`).join(", ");
11
+ ], n = (e) => t.some((t) => t === e), r = (e) => /^https?:\/\//i.test(e), i = (e) => r(e) && !/\.svgz?(?:[?#]|$)/i.test(e), a = (e, t, n) => `${e}?url=${encodeURIComponent(t)}&w=${String(n)}`, o = (e, n) => t.map((t) => `${a(e, n, t)} ${String(t)}w`).join(", ");
12
12
  //#endregion
13
- export { e as IMAGE_PATH, t as IMAGE_WIDTHS, a as imageSrcSet, i as imageUrl, n as isImageWidth, r as isRemoteImage };
13
+ export { e as IMAGE_PATH, t as IMAGE_WIDTHS, o as imageSrcSet, a as imageUrl, n as isImageWidth, r as isRemoteImage, i as isResizableImage };
@@ -7,7 +7,14 @@ var r = /* @__PURE__ */ new Set([
7
7
  "max",
8
8
  "min",
9
9
  "range"
10
- ]), i = "loop", a = class {
10
+ ]), i = (e) => `value|round(0, '${e}')`, a = {
11
+ floor: i("floor"),
12
+ ceil: i("ceil"),
13
+ clamp: "min(max(value, low), high)"
14
+ }, o = (t) => {
15
+ let n = Object.hasOwn(e, t) ? `value|${t}` : a[t];
16
+ return `Unknown function "${t}()"${n ? ` — write \`${n}\`` : ""}: the functions are ${[...r].join(", ")}`;
17
+ }, s = "loop", c = class {
11
18
  issues = [];
12
19
  freeNames = /* @__PURE__ */ new Set();
13
20
  nodes(e, t) {
@@ -29,7 +36,7 @@ var r = /* @__PURE__ */ new Set([
29
36
  let e = /* @__PURE__ */ new Set([
30
37
  ...n,
31
38
  t.valueVar,
32
- i,
39
+ s,
33
40
  ...t.keyVar ? [t.keyVar] : []
34
41
  ]);
35
42
  this.nodes(t.body, e), n = /* @__PURE__ */ new Set([...n, ...this.setsIn(t.body)]), t.elseBody && this.nodes(t.elseBody, n);
@@ -70,7 +77,7 @@ var r = /* @__PURE__ */ new Set([
70
77
  this.expression(e.object, t), this.expression(e.index, t);
71
78
  return;
72
79
  case "function":
73
- r.has(e.name) || this.issues.push(`Unknown function "${e.name}()": the functions are ${[...r].join(", ")}`), e.args.forEach((e) => this.expression(e, t));
80
+ r.has(e.name) || this.issues.push(o(e.name)), e.args.forEach((e) => this.expression(e, t));
74
81
  return;
75
82
  case "filter":
76
83
  this.expression(e.subject, t), this.filterNames(e.filters.map((e) => e.name));
@@ -94,17 +101,17 @@ var r = /* @__PURE__ */ new Set([
94
101
  case "arrow": this.expression(e.body, /* @__PURE__ */ new Set([...t, ...e.params]));
95
102
  }
96
103
  }
97
- }, o = (e) => {
104
+ }, l = (e) => {
98
105
  let r = t(e);
99
106
  if (r.error) return {
100
107
  issues: [r.error],
101
108
  freeNames: []
102
109
  };
103
- let i = new a(), { nodes: o, error: s } = n(r.tokens, !1, i.issues);
104
- return s && i.issues.push(s), i.nodes(o, /* @__PURE__ */ new Set()), {
110
+ let i = new c(), { nodes: a, error: o } = n(r.tokens, !1, i.issues);
111
+ return o && i.issues.push(o), i.nodes(a, /* @__PURE__ */ new Set()), {
105
112
  issues: [...new Set(i.issues)],
106
113
  freeNames: [...i.freeNames]
107
114
  };
108
115
  };
109
116
  //#endregion
110
- export { o as inspectTemplate };
117
+ export { l as inspectTemplate };
@@ -5,7 +5,8 @@ export declare const processTwig: (template: string, variables?: Record<string,
5
5
  * boolean, `{{ total }}` the number it holds.
6
6
  *
7
7
  * A template that is one `{{ expression }}` and nothing else (surrounding whitespace aside) answers that expression's
8
- * value untouched. Anything with text around it, or tags, is text by nature and renders as {@link processTwig}.
8
+ * value untouched — and so does one whose `{% set %}` name the parts of that expression first. Anything with text
9
+ * around it, or other tags, is text by nature and renders as {@link processTwig}.
9
10
  *
10
11
  * Unlike `processTwig`'s `asRaw`, nothing goes through JSON on the way: `0`, `false` and `null` come back as
11
12
  * themselves, and a string that looks like a number stays a string.
@@ -14,8 +15,8 @@ export declare const processTwigValue: (template: string, variables?: Record<str
14
15
  /**
15
16
  * A flow step's param — in the browser's flows and in a server action's — as the value the step is handed.
16
17
  *
17
- * A param that is one `{{ expression }}` is that expression's value, exactly: a string stays a string however it
18
- * looks. The type is the VALUE's, never guessed from its text — which is what the step params used to do, rendering
18
+ * A param that is one `{{ expression }}` (after any `{% set %}` naming its parts) is that expression's value, exactly:
19
+ * a string stays a string however it looks. The type is the VALUE's, never guessed from its text — which is what the step params used to do, rendering
19
20
  * the value to text and reading the text back as JSON: a password typed as `1234` reached the server as a number, and
20
21
  * a text field declared `text` on the far side then saw no password at all. What a param should be converted to is
21
22
  * the business of whoever declares its type — `setState`'s `type`, an action's input fields — not of the resolver.
@@ -32,21 +32,31 @@ var s = (i, s = {}, c = !1, l = !1) => {
32
32
  } catch {
33
33
  return;
34
34
  }
35
- }, u = (e, n = {}) => {
35
+ }, u = (e) => {
36
+ let t = e?.filter((e) => e.type !== "text" || e.value.trim() !== "") ?? [], n = t.at(-1), r = t.slice(0, -1);
37
+ if (n?.type === "variable" && r.every((e) => e.type === "set")) return {
38
+ statements: r,
39
+ expression: n.expression
40
+ };
41
+ }, d = ({ statements: e, expression: n }, a) => {
42
+ let o = "variables" in a ? t(a) : a;
43
+ if (e.length === 0) return i(n, o);
44
+ let { variables: s } = r(e, o);
45
+ return Object.assign(a, s), i(n, s);
46
+ }, f = (e, t = {}) => {
36
47
  if (typeof e != "string") return e;
37
- let r = o(e), a = (r ? r.nodes ?? r.nodesWithSource : null)?.filter((e) => e.type !== "text" || e.value.trim() !== "");
38
- if (a?.length !== 1 || a[0].type !== "variable") return s(e, n);
48
+ let n = o(e), r = u(n ? n.nodes ?? n.nodesWithSource : null);
49
+ if (!r) return s(e, t);
39
50
  try {
40
- let e = "variables" in n ? t(n) : n;
41
- return i(a[0].expression, e);
51
+ return d(r, t);
42
52
  } catch {
43
53
  return e;
44
54
  }
45
- }, d = /* @__PURE__ */ new Set([
55
+ }, p = /* @__PURE__ */ new Set([
46
56
  "json_encode",
47
57
  "to_json",
48
58
  "object_as_json"
49
- ]), f = (e) => e.type === "filter" && d.has(e.filters[e.filters.length - 1]?.name ?? ""), p = (e) => {
59
+ ]), m = (e) => e.type === "filter" && p.has(e.filters[e.filters.length - 1]?.name ?? ""), h = (e) => {
50
60
  let t = e.trim();
51
61
  if (!t.startsWith("{") && !t.startsWith("[")) return e;
52
62
  try {
@@ -54,28 +64,28 @@ var s = (i, s = {}, c = !1, l = !1) => {
54
64
  } catch {
55
65
  return e;
56
66
  }
57
- }, m = (e, n = {}) => {
67
+ }, g = (e, t = {}) => {
58
68
  if (typeof e != "string") return e;
59
- let r = o(e), a = (r ? r.nodes ?? r.nodesWithSource : null)?.filter((e) => e.type !== "text" || e.value.trim() !== "");
60
- if (a?.length !== 1 || a[0].type !== "variable") {
61
- let t = e.includes("\"") ? l(e, n) : void 0;
62
- if (t !== void 0) return t;
63
- let r = s(e, n);
64
- return typeof r == "string" ? p(r) : r;
69
+ let n = o(e), r = u(n ? n.nodes ?? n.nodesWithSource : null);
70
+ if (!r) {
71
+ let n = e.includes("\"") ? l(e, t) : void 0;
72
+ if (n !== void 0) return n;
73
+ let r = s(e, t);
74
+ return typeof r == "string" ? h(r) : r;
65
75
  }
66
- let { expression: c } = a[0];
76
+ let { expression: i } = r;
67
77
  try {
68
- let e = "variables" in n ? t(n) : n, r = i(c, e);
69
- if (r === void 0) return "";
70
- if (typeof r == "string" && f(c)) try {
71
- return JSON.parse(r);
78
+ let e = d(r, t);
79
+ if (e === void 0) return "";
80
+ if (typeof e == "string" && m(i)) try {
81
+ return JSON.parse(e);
72
82
  } catch {
73
- return r;
83
+ return e;
74
84
  }
75
- return r;
85
+ return e;
76
86
  } catch {
77
87
  return e;
78
88
  }
79
89
  };
80
90
  //#endregion
81
- export { s as processTwig, m as processTwigParam, u as processTwigValue };
91
+ export { s as processTwig, g as processTwigParam, f as processTwigValue };
@@ -1,10 +1,10 @@
1
1
  /** Which of a space's documents a change was made to: its schema, its style, or its functions' source. */
2
- export type ChangeDocument = 'schema' | 'style' | 'functions';
2
+ export type ChangeDocument = 'schema' | 'style' | 'functions' | 'data';
3
3
  /**
4
- * Where a change came from: a person in the builder, an agent over MCP, the builder's co-worker, the autofix, a GraphQL
5
- * client that is not a person, or a writer with nothing to say (a seed, a script).
4
+ * Where a change came from: a person in the builder, an agent over MCP, the autofix, a GraphQL client that is not a
5
+ * person, or a writer with nothing to say (a seed, a script).
6
6
  */
7
- export type ChangeOrigin = 'builder' | 'mcp' | 'coworker' | 'autofix' | 'api' | 'system';
7
+ export type ChangeOrigin = 'builder' | 'mcp' | 'autofix' | 'api' | 'system';
8
8
  /**
9
9
  * What one entry is about. Schema: an element (pages and layouts are elements too), a page folder, a schema variable,
10
10
  * a setting (`settings.<key>`, `definition.<key>`, the page order `pages`). Style: a class selector, a global style
package/dist/index.mjs CHANGED
@@ -34,57 +34,59 @@ import ye from "./dataSource/helpers/getSourceName.mjs";
34
34
  import be from "./dataSource/hooks/useRegisterSource.mjs";
35
35
  import xe from "./dataSource/resolveVariables.mjs";
36
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, isStyleVariableCategory as st } from "./types/StyleTypes.mjs";
52
- import ct, { EMPTY_STYLE_SCHEMA as lt, StyleBindingsAllowed as ut, baseDefaultValue as dt, inheritableAttributesBase as ft } from "./style/styleConstants.mjs";
53
- import { DISPLAY_MODE_MIN_WIDTH as pt, displayModeAt as mt, displayModeWidthRem as ht } from "./style/breakpoints.mjs";
54
- import { DISPLAY_MODES as gt, isDisplayMode as _t } from "./style/displayModes.mjs";
55
- import { fontLinkAssets as vt } from "./style/fontAssets.mjs";
56
- import { SYSTEM_FONTS as yt, availableFonts as bt, familiesInCss as xt, fontFamilyStack as St, fontUrlResolver as Ct, fontsToHead as wt, googleCss2Url as Tt, googleTextSubsetUrl as Et, isSafeFontUrl as Dt, primaryFamily as Ot } from "./style/fonts.mjs";
57
- import { FontValidationError as kt, parseSpaceFont as At } from "./style/fontValidation.mjs";
58
- import { fallbackForFamily as jt, fontsFromCss as Mt } from "./style/fontsFromCss.mjs";
59
- import { LAYOUT_GRIDS as Nt, layoutGridCss as Pt, layoutGridLook as Ft } from "./style/layoutGrid.mjs";
60
- import { RUNTIME_STYLE_ID as It, markStyleCache as Lt, styleCacheFromDocument as Rt, styleCacheTravelsInDocument as zt } from "./style/runtimeStyle.mjs";
61
- import { mergeSnippetStyle as Bt, sameSelector as Vt, selectorsOf as Ht } from "./style/snippetStyle.mjs";
62
- import { CURRENT_PAGE_SELECTOR as Ut, HIDDEN_CLASS as Wt, STYLE_STATES as Gt, STYLE_STATE_LABELS as Kt, inCascadeOrder as qt, isKnownState as Jt, isStartingState as Yt, stateSuffix as Xt } from "./style/styleStates.mjs";
63
- import Zt from "./schema/SchemaContext.mjs";
64
- import { ANCHOR_PATTERN as Qt, isAnchor as $t } from "./schema/anchor.mjs";
65
- import { COMPONENT_PROPS_SOURCE as en, EMPTY_SCHEMA as tn, VARIABLE_REGEX as nn } from "./schema/schemaConstants.mjs";
66
- import { findLayoutCycle as rn, resolveLayoutChain as an } from "./schema/layoutChain.mjs";
67
- import { collectServerElements as on, hasServerElements as sn } from "./schema/serverElements.mjs";
68
- import { isSnippet as cn } from "./schema/snippet.mjs";
69
- import ln from "./network/NetworkContext.mjs";
70
- import un from "./network/NetworkInternalContext.mjs";
71
- import { elementFromWire as dn, schemaFromWire as fn, schemaToWire as pn } from "./schema/wire.mjs";
72
- import { SpaceEvents as mn, spaceEventSchemas as hn, validateSpaceEvent as gn } from "./network/spaceEvents.mjs";
73
- import _n from "./network/graphql/builder/Mutations/index.mjs";
74
- import vn from "./network/graphql/builder/Queries/index.mjs";
75
- import yn from "./network/graphql/builder/Subscriptions/index.mjs";
76
- import bn from "./network/graphql/sdk/Mutations/index.mjs";
77
- import xn from "./network/graphql/sdk/Queries/index.mjs";
78
- import Sn, { RTEvent as Cn, RTEventCloseCode as wn, getInstance as Tn, isRTEvent as En, isRTEventCloseCode as Dn, setInstance as On } from "./websockets/RTCodec.mjs";
79
- import { THEME_CLASSES as kn, THEME_COOKIE_NAME as An, applyThemeClass as jn, isTheme as Mn, readThemeCookie as Nn, themeFromCookies as Pn, writeThemeCookie as Fn } from "./theme/themeCookie.mjs";
80
- import In, { createThemeState as Ln, createThemeStore as Rn, resolveScheme as zn, setAreaTheme as Bn, setMachineScheme as Vn, setThemeMode as Hn, themeFor as Un } from "./theme/themeStore.mjs";
81
- import { useThemeStore as Wn } from "./theme/ThemeScope.mjs";
82
- import Gn from "./theme/ThemeProvider.mjs";
83
- import Kn, { SPACE_THEME_AREA as qn } from "./theme/useTheme.mjs";
84
- import Jn from "./server/actions/useActionsSync.mjs";
85
- import Yn, { currentRscLocation as Xn, rscDataPath as Zn } from "./server/rsc/refreshRsc.mjs";
86
- import Qn from "./server/rsc/useRscRefresh.mjs";
87
- import $n from "./server/rsc/useRscSync.mjs";
88
- import { PAINTED_STATE_BUDGET as er, clearPaintedEntry as tr, paintedEntryFromCookies as nr, paintedKeys as rr, paintedStateCookieName as ir, paintedStateFor as ar, pickPainted as or, readPaintedEntry as sr, writePaintedEntry as cr } from "./state/paintedState.mjs";
89
- import { runtimeStatePersist as lr, stateOwner as ur } from "./state/runtimeStatePersist.mjs";
90
- export { Qt as ANCHOR_PATTERN, x as BODYLESS_METHODS, y as BuilderContext, _n as BuilderMutations, vn as BuilderQueries, en as COMPONENT_PROPS_SOURCE, N as COMPUTED_GLOBALS, S as CONNECTOR_HTTP_METHODS, Ut as CURRENT_PAGE_SELECTOR, Oe as ComponentContext, C as DEFAULT_READ_ENDPOINT, gt as DISPLAY_MODES, pt as DISPLAY_MODE_MIN_WIDTH, Se as DevToolsContext, w as EMPTY_RESPONSE_METHODS, tn as EMPTY_SCHEMA, lt as EMPTY_STYLE_SCHEMA, ke as FLAG_GATE_PATTERN, ze as FLAG_LAYERS, Ae as FLAG_NAME_PATTERN, kt as FontValidationError, P as GLOBAL_SOURCES, Wt as HIDDEN_CLASS, ee as INTERVAL_TRIGGER, Nt as LAYOUT_GRIDS, m as MAX_PARAM_PASSES, te as MIN_INTERVAL_MS, ln as NetworkContext, un as NetworkInternalContext, er as PAINTED_STATE_BUDGET, oe as ParamsFromURL, Te as PlitziConsole, rt as PlitziServiceContext, it as PlitziServiceProvider, T as READ_ENDPOINT_NAMES, Sn as RTCodec, Cn as RTEvent, wn as RTEventCloseCode, It as RUNTIME_STYLE_ID, qn as SPACE_THEME_AREA, Gt as STYLE_STATES, Kt as STYLE_STATE_LABELS, yt as SYSTEM_FONTS, Zt as SchemaContext, bn as SdkMutations, xn as SdkQueries, yn as SpaceEventSubscription, mn as SpaceEvents, ut as StyleBindingsAllowed, ot as StyleVariableCategory, kn as THEME_CLASSES, An as THEME_COOKIE_NAME, Gn as ThemeProvider, nn as VARIABLE_REGEX, a as VISITOR_NAME, at as WHILE_RUNNING_MODES, E as WRITE_ENDPOINT_NAMES, jn as applyThemeClass, t as authFailureFromResponse, bt as availableFonts, dt as baseDefaultValue, o as checkVisitorRoles, tr as clearPaintedEntry, on as collectServerElements, k as connectorPresets, D as connectorTokens, b as contexts, B as cookieFromHeader, Ee as createStoreDevToolsLogger, Ln as createThemeState, Rn as createThemeStore, Xn as currentRscLocation, Ce as debugCookieName, se as delay, qe as describeChange, Xe as diffSchema, Ze as diffStyle, he as disableReactDevTools, mt as displayModeAt, ht as displayModeWidthRem, V as documentCookies, dn as elementFromWire, H as elementOf, A as emptyManifest, ce as emptyObject, F as evaluateComputed, ae as evaluateRuleGroup, jt as fallbackForFamily, xt as familiesInCss, L as fetchManifest, Je as fieldChanges, c as filters, rn as findLayoutCycle, Be as flagUserFromSSR, Ve as flagValues, Ne as flagsCookieName, St as fontFamilyStack, vt as fontLinkAssets, Ct as fontUrlResolver, Mt as fontsFromCss, wt 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, Tn as getInstance, ue as getKeyDecoded, de as getPathsFromObeject, ye as getSourceName, Tt as googleCss2Url, Et as googleTextSubsetUrl, He as hasConditions, sn as hasServerElements, f as hasTemplateSyntax, p as hasValidToken, fe as hexToRGB, qt as inCascadeOrder, ft as inheritableAttributesBase, g as inspectTemplate, ne as intervalOf, $t as isAnchor, j as isConnectorManifestDraft, re as isDate, _t as isDisplayMode, U as isElementTarget, je as isFlagName, pe as isInViewport, we as isInteractionFlow, Jt as isKnownState, W as isNodeTarget, En as isRTEvent, Dn as isRTEventCloseCode, e as isRecord, Dt as isSafeFontUrl, Me as isSchemaFlag, cn as isSnippet, Yt as isStartingState, st as isStyleVariableCategory, Mn as isTheme, ie as isUserEdit, Z as isValidFormat, Qe as jsonCopy, Pt as layoutGridCss, Ft as layoutGridLook, I as liveSources, me as makeId, Lt as markStyleCache, Bt as mergeSnippetStyle, G as nodeOf, n as onAuthFailure, De as pConsole, nr as paintedEntryFromCookies, rr as paintedKeys, ir as paintedStateCookieName, ar as paintedStateFor, Q as parseDate, Fe as parseFlagList, At as parseSpaceFont, Ue as passesFlagGate, or as pickPainted, Ot as primaryFamily, l as processTwig, u as processTwigParam, d as processTwigValue, sr as readPaintedEntry, Nn as readThemeCookie, Yn as refreshRsc, r as reportAuthFailure, We as resolveFlags, an as resolveLayoutChain, zn as resolveScheme, h as resolveStepParam, xe as resolveVariables, Zn as rscDataPath, lr as runtimeStatePersist, i as sameRegistrableDomain, Vt as sameSelector, $e as sameValue, fn as schemaFromWire, pn as schemaToWire, Ht as selectorsOf, Ie as serializeFlagList, Bn as setAreaTheme, On as setInstance, Vn as setMachineScheme, Hn as setThemeMode, hn as spaceEventSchemas, ur as stateOwner, Xt as stateSuffix, Rt as styleCacheFromDocument, zt as styleCacheTravelsInDocument, ct as styleConstants, z as syntaxHighlight, _ as templatePaths, v as templateRootNames, Un as themeFor, Pn as themeFromCookies, In as themeStore, $ as toUnixSeconds, Ge as undeclaredFlagOverrides, Ye as uniqueLines, Jn as useActionsSync, et as useFontHead, tt as useNetwork, nt as usePlitziServiceContext, be as useRegisterSource, Qn as useRscRefresh, $n as useRscSync, Ke as useStableValue, Kn as useTheme, Wn as useThemeStore, ge as utility, _e as utilityOptions, M as validateConnectorManifest, gn as validateSpaceEvent, s as visitorAccess, Le as withForcedFlag, Re as writeForcedFlags, cr as writePaintedEntry, Fn as writeThemeCookie };
37
+ import { DEV_TOOLS_ATTRIBUTE as Ce, HIDE_DEV_TOOLS_CSS as we } from "./devTools/chrome.mjs";
38
+ import { debugCookieName as Te } from "./devTools/debugCookie.mjs";
39
+ import Ee from "./devTools/interactionLog.mjs";
40
+ import De, { createStoreDevToolsLogger as Oe, pConsole as ke } from "./devTools/utils/PlitziConsole.mjs";
41
+ import Ae from "./elements/ComponentContext.mjs";
42
+ import { FLAG_GATE_PATTERN as je, FLAG_NAME_PATTERN as Me, isFlagName as Ne, isSchemaFlag as Pe } from "./flags/schemaFlag.mjs";
43
+ import { flagsCookieName as Fe, forcedFlagsFromCookies as Ie, parseFlagList as Le, serializeFlagList as Re, withForcedFlag as ze, writeForcedFlags as Be } from "./flags/flagsCookie.mjs";
44
+ import { FLAG_LAYERS as Ve, flagUserFromSSR as He, flagValues as Ue, hasConditions as We, passesFlagGate as Ge, resolveFlags as Ke, undeclaredFlagOverrides as qe } from "./flags/resolveFlags.mjs";
45
+ import Je from "./hooks/useStableValue.mjs";
46
+ import { describeChange as Ye, fieldChanges as Xe, uniqueLines as Ze } from "./history/describe.mjs";
47
+ import { diffSchema as Qe, diffStyle as $e, jsonCopy as et, sameValue as tt } from "./history/diff.mjs";
48
+ import nt from "./hooks/useFontHead.mjs";
49
+ import rt from "./hooks/useNetwork.mjs";
50
+ import it, { PlitziServiceContext as at, PlitziServiceProvider as ot } from "./hooks/usePlitziServiceContext.mjs";
51
+ import { WHILE_RUNNING_MODES as st } from "./types/SchemaTypes.mjs";
52
+ import { StyleVariableCategory as ct, isStyleVariableCategory as lt } from "./types/StyleTypes.mjs";
53
+ import ut, { EMPTY_STYLE_SCHEMA as dt, StyleBindingsAllowed as ft, baseDefaultValue as pt, inheritableAttributesBase as mt } from "./style/styleConstants.mjs";
54
+ import { DISPLAY_MODE_MIN_WIDTH as ht, displayModeAt as gt, displayModeWidthRem as _t } from "./style/breakpoints.mjs";
55
+ import { PLUGIN_CSS_LAYER as vt, RUNTIME_CSS_LAYER as yt, inPluginLayer as bt } from "./style/cssLayers.mjs";
56
+ import { DISPLAY_MODES as xt, isDisplayMode as St } from "./style/displayModes.mjs";
57
+ import { fontLinkAssets as Ct } from "./style/fontAssets.mjs";
58
+ import { SYSTEM_FONTS as wt, availableFonts as Tt, familiesInCss as Et, fontFamilyStack as Dt, fontUrlResolver as Ot, fontsToHead as kt, googleCss2Url as At, googleTextSubsetUrl as jt, isSafeFontUrl as Mt, primaryFamily as Nt } from "./style/fonts.mjs";
59
+ import { FontValidationError as Pt, parseSpaceFont as Ft } from "./style/fontValidation.mjs";
60
+ import { fallbackForFamily as It, fontsFromCss as Lt } from "./style/fontsFromCss.mjs";
61
+ import { LAYOUT_GRIDS as Rt, layoutGridCss as zt, layoutGridLook as Bt } from "./style/layoutGrid.mjs";
62
+ import { RUNTIME_STYLE_ID as Vt, markStyleCache as Ht, styleCacheFromDocument as Ut, styleCacheTravelsInDocument as Wt } from "./style/runtimeStyle.mjs";
63
+ import { mergeSnippetStyle as Gt, sameSelector as Kt, selectorsOf as qt } from "./style/snippetStyle.mjs";
64
+ import { CURRENT_PAGE_SELECTOR as Jt, HIDDEN_CLASS as Yt, STYLE_STATES as Xt, STYLE_STATE_LABELS as Zt, inCascadeOrder as Qt, isKnownState as $t, isStartingState as en, stateSuffix as tn } from "./style/styleStates.mjs";
65
+ import nn from "./schema/SchemaContext.mjs";
66
+ import { ANCHOR_PATTERN as rn, anchorOf as an, isAnchor as on, uniqueAnchor as sn } from "./schema/anchor.mjs";
67
+ import { COMPONENT_PROPS_SOURCE as cn, EMPTY_SCHEMA as ln, VARIABLE_REGEX as un } from "./schema/schemaConstants.mjs";
68
+ import { findLayoutCycle as dn, resolveLayoutChain as fn } from "./schema/layoutChain.mjs";
69
+ import { collectServerElements as pn, hasServerElements as mn } from "./schema/serverElements.mjs";
70
+ import { isSnippet as hn } from "./schema/snippet.mjs";
71
+ import gn from "./network/NetworkContext.mjs";
72
+ import _n from "./network/NetworkInternalContext.mjs";
73
+ import { elementFromWire as vn, schemaFromWire as yn, schemaToWire as bn } from "./schema/wire.mjs";
74
+ import { SpaceEvents as xn, spaceEventSchemas as Sn, validateSpaceEvent as Cn } from "./network/spaceEvents.mjs";
75
+ import wn from "./network/graphql/builder/Mutations/index.mjs";
76
+ import Tn from "./network/graphql/builder/Queries/index.mjs";
77
+ import En from "./network/graphql/builder/Subscriptions/index.mjs";
78
+ import Dn from "./network/graphql/sdk/Mutations/index.mjs";
79
+ import On from "./network/graphql/sdk/Queries/index.mjs";
80
+ import kn, { RTEvent as An, RTEventCloseCode as jn, getInstance as Mn, isRTEvent as Nn, isRTEventCloseCode as Pn, setInstance as Fn } from "./websockets/RTCodec.mjs";
81
+ import { THEME_CLASSES as In, THEME_COOKIE_NAME as Ln, applyThemeClass as Rn, isTheme as zn, readThemeCookie as Bn, themeFromCookies as Vn, writeThemeCookie as Hn } from "./theme/themeCookie.mjs";
82
+ import Un, { createThemeState as Wn, createThemeStore as Gn, resolveScheme as Kn, setAreaTheme as qn, setMachineScheme as Jn, setThemeMode as Yn, themeFor as Xn } from "./theme/themeStore.mjs";
83
+ import { useThemeStore as Zn } from "./theme/ThemeScope.mjs";
84
+ import Qn from "./theme/ThemeProvider.mjs";
85
+ import $n, { SPACE_THEME_AREA as er } from "./theme/useTheme.mjs";
86
+ import tr from "./server/actions/useActionsSync.mjs";
87
+ import nr, { cancelRsc as rr, currentRscLocation as ir, releaseRscRequests as ar, rscDataPath as or } from "./server/rsc/refreshRsc.mjs";
88
+ import sr from "./server/rsc/useRscRefresh.mjs";
89
+ import cr from "./server/rsc/useRscSync.mjs";
90
+ import { PAINTED_STATE_BUDGET as lr, clearPaintedEntry as ur, paintedEntryFromCookies as dr, paintedKeys as fr, paintedStateCookieName as pr, paintedStateFor as mr, pickPainted as hr, readPaintedEntry as gr, writePaintedEntry as _r } from "./state/paintedState.mjs";
91
+ import { runtimeStatePersist as vr, stateOwner as yr } from "./state/runtimeStatePersist.mjs";
92
+ export { rn as ANCHOR_PATTERN, x as BODYLESS_METHODS, y as BuilderContext, wn as BuilderMutations, Tn as BuilderQueries, cn as COMPONENT_PROPS_SOURCE, N as COMPUTED_GLOBALS, S as CONNECTOR_HTTP_METHODS, Jt as CURRENT_PAGE_SELECTOR, Ae as ComponentContext, C as DEFAULT_READ_ENDPOINT, Ce as DEV_TOOLS_ATTRIBUTE, xt as DISPLAY_MODES, ht as DISPLAY_MODE_MIN_WIDTH, Se as DevToolsContext, w as EMPTY_RESPONSE_METHODS, ln as EMPTY_SCHEMA, dt as EMPTY_STYLE_SCHEMA, je as FLAG_GATE_PATTERN, Ve as FLAG_LAYERS, Me as FLAG_NAME_PATTERN, Pt as FontValidationError, P as GLOBAL_SOURCES, Yt as HIDDEN_CLASS, we as HIDE_DEV_TOOLS_CSS, ee as INTERVAL_TRIGGER, Rt as LAYOUT_GRIDS, m as MAX_PARAM_PASSES, te as MIN_INTERVAL_MS, gn as NetworkContext, _n as NetworkInternalContext, lr as PAINTED_STATE_BUDGET, vt as PLUGIN_CSS_LAYER, oe as ParamsFromURL, De as PlitziConsole, at as PlitziServiceContext, ot as PlitziServiceProvider, T as READ_ENDPOINT_NAMES, kn as RTCodec, An as RTEvent, jn as RTEventCloseCode, yt as RUNTIME_CSS_LAYER, Vt as RUNTIME_STYLE_ID, er as SPACE_THEME_AREA, Xt as STYLE_STATES, Zt as STYLE_STATE_LABELS, wt as SYSTEM_FONTS, nn as SchemaContext, Dn as SdkMutations, On as SdkQueries, En as SpaceEventSubscription, xn as SpaceEvents, ft as StyleBindingsAllowed, ct as StyleVariableCategory, In as THEME_CLASSES, Ln as THEME_COOKIE_NAME, Qn as ThemeProvider, un as VARIABLE_REGEX, a as VISITOR_NAME, st as WHILE_RUNNING_MODES, E as WRITE_ENDPOINT_NAMES, an as anchorOf, Rn as applyThemeClass, t as authFailureFromResponse, Tt as availableFonts, pt as baseDefaultValue, rr as cancelRsc, o as checkVisitorRoles, ur as clearPaintedEntry, pn as collectServerElements, k as connectorPresets, D as connectorTokens, b as contexts, B as cookieFromHeader, Oe as createStoreDevToolsLogger, Wn as createThemeState, Gn as createThemeStore, ir as currentRscLocation, Te as debugCookieName, se as delay, Ye as describeChange, Qe as diffSchema, $e as diffStyle, he as disableReactDevTools, gt as displayModeAt, _t as displayModeWidthRem, V as documentCookies, vn as elementFromWire, H as elementOf, A as emptyManifest, ce as emptyObject, F as evaluateComputed, ae as evaluateRuleGroup, It as fallbackForFamily, Et as familiesInCss, L as fetchManifest, Xe as fieldChanges, c as filters, dn as findLayoutCycle, He as flagUserFromSSR, Ue as flagValues, Fe as flagsCookieName, Dt as fontFamilyStack, Ct as fontLinkAssets, Ot as fontUrlResolver, Lt as fontsFromCss, kt as fontsToHead, Ie 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, Mn as getInstance, ue as getKeyDecoded, de as getPathsFromObeject, ye as getSourceName, At as googleCss2Url, jt as googleTextSubsetUrl, We as hasConditions, mn as hasServerElements, f as hasTemplateSyntax, p as hasValidToken, fe as hexToRGB, Qt as inCascadeOrder, bt as inPluginLayer, mt as inheritableAttributesBase, g as inspectTemplate, ne as intervalOf, on as isAnchor, j as isConnectorManifestDraft, re as isDate, St as isDisplayMode, U as isElementTarget, Ne as isFlagName, pe as isInViewport, Ee as isInteractionFlow, $t as isKnownState, W as isNodeTarget, Nn as isRTEvent, Pn as isRTEventCloseCode, e as isRecord, Mt as isSafeFontUrl, Pe as isSchemaFlag, hn as isSnippet, en as isStartingState, lt as isStyleVariableCategory, zn as isTheme, ie as isUserEdit, Z as isValidFormat, et as jsonCopy, zt as layoutGridCss, Bt as layoutGridLook, I as liveSources, me as makeId, Ht as markStyleCache, Gt as mergeSnippetStyle, G as nodeOf, n as onAuthFailure, ke as pConsole, dr as paintedEntryFromCookies, fr as paintedKeys, pr as paintedStateCookieName, mr as paintedStateFor, Q as parseDate, Le as parseFlagList, Ft as parseSpaceFont, Ge as passesFlagGate, hr as pickPainted, Nt as primaryFamily, l as processTwig, u as processTwigParam, d as processTwigValue, gr as readPaintedEntry, Bn as readThemeCookie, nr as refreshRsc, ar as releaseRscRequests, r as reportAuthFailure, Ke as resolveFlags, fn as resolveLayoutChain, Kn as resolveScheme, h as resolveStepParam, xe as resolveVariables, or as rscDataPath, vr as runtimeStatePersist, i as sameRegistrableDomain, Kt as sameSelector, tt as sameValue, yn as schemaFromWire, bn as schemaToWire, qt as selectorsOf, Re as serializeFlagList, qn as setAreaTheme, Fn as setInstance, Jn as setMachineScheme, Yn as setThemeMode, Sn as spaceEventSchemas, yr as stateOwner, tn as stateSuffix, Ut as styleCacheFromDocument, Wt as styleCacheTravelsInDocument, ut as styleConstants, z as syntaxHighlight, _ as templatePaths, v as templateRootNames, Xn as themeFor, Vn as themeFromCookies, Un as themeStore, $ as toUnixSeconds, qe as undeclaredFlagOverrides, sn as uniqueAnchor, Ze as uniqueLines, tr as useActionsSync, nt as useFontHead, rt as useNetwork, it as usePlitziServiceContext, be as useRegisterSource, sr as useRscRefresh, cr as useRscSync, Je as useStableValue, $n as useTheme, Zn as useThemeStore, ge as utility, _e as utilityOptions, M as validateConnectorManifest, Cn as validateSpaceEvent, s as visitorAccess, ze as withForcedFlag, Be as writeForcedFlags, _r as writePaintedEntry, Hn as writeThemeCookie };
@@ -0,0 +1,10 @@
1
+ import { DataProblem, DataRefusal } from '../../../../../../types';
2
+ /** As GraphQL carries it: one shape with every field, `ok` saying which of them mean something. */
3
+ export type TSpaceSaveDataMutation = {
4
+ ok: boolean;
5
+ version: string | null;
6
+ problems: DataProblem[];
7
+ refusal: DataRefusal | null;
8
+ };
9
+ declare const SpaceSaveDataMutation = "\n mutation SpaceSaveDataMutation($files: Json!, $base: String) {\n SpaceSaveData(files: $files, base: $base) {\n ok\n version\n problems {\n file\n message\n }\n refusal {\n status\n error\n limit\n }\n }\n }\n";
10
+ export default SpaceSaveDataMutation;
@@ -0,0 +1,4 @@
1
+ //#region src/network/graphql/builder/Mutations/Space/data/SpaceSaveDataMutation.ts
2
+ var e = "\n mutation SpaceSaveDataMutation($files: Json!, $base: String) {\n SpaceSaveData(files: $files, base: $base) {\n ok\n version\n problems {\n file\n message\n }\n refusal {\n status\n error\n limit\n }\n }\n }\n";
3
+ //#endregion
4
+ export { e as default };
@@ -16,6 +16,7 @@ import { TSpaceUpdateComponentMutation } from './Space/components/SpaceUpdateCom
16
16
  import { TSpaceAddConnectorMutation } from './Space/connectors/SpaceAddConnectorMutation';
17
17
  import { TSpaceRemoveConnectorMutation } from './Space/connectors/SpaceRemoveConnectorMutation';
18
18
  import { TSpaceUpdateConnectorMutation } from './Space/connectors/SpaceUpdateConnectorMutation';
19
+ import { TSpaceSaveDataMutation } from './Space/data/SpaceSaveDataMutation';
19
20
  import { TSpacePublishFlagsMutation } from './Space/flags/SpacePublishFlagsMutation';
20
21
  import { TSpaceAddPageFolderMutation } from './Space/folders/SpaceAddPageFolderMutation';
21
22
  import { TSpaceRemovePageFolderMutation } from './Space/folders/SpaceRemovePageFolderMutation';
@@ -81,6 +82,7 @@ export type BuilderMutationsMap = {
81
82
  SpaceUpdateAction: TSpaceUpdateActionMutation;
82
83
  SpaceRemoveAction: TSpaceRemoveActionMutation;
83
84
  SpaceRunAction: TSpaceRunActionMutation;
85
+ SpaceSaveData: TSpaceSaveDataMutation;
84
86
  SpaceSaveFunctions: TSpaceSaveFunctionsMutation;
85
87
  SpaceRemoveFunctions: TSpaceRemoveFunctionsMutation;
86
88
  SpaceInstallTemplateFunctions: TSpaceInstallTemplateFunctionsMutation;