@plitzi/sdk-shared 0.38.15 → 0.38.17

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 (91) hide show
  1. package/CHANGELOG.md +102 -0
  2. package/dist/actions/cron.mjs +5 -9
  3. package/dist/actions/validateDocument.mjs +24 -50
  4. package/dist/activity/describe.d.ts +6 -0
  5. package/dist/activity/describe.mjs +22 -0
  6. package/dist/activity/guard.d.ts +6 -0
  7. package/dist/activity/guard.mjs +13 -0
  8. package/dist/activity/index.d.ts +3 -0
  9. package/dist/activity/index.mjs +4 -0
  10. package/dist/activity/types.d.ts +94 -0
  11. package/dist/activity/types.mjs +4 -0
  12. package/dist/connectors/validateManifest.mjs +28 -73
  13. package/dist/dataSource/helpers/index.mjs +1 -2
  14. package/dist/dataSource/index.d.ts +1 -1
  15. package/dist/dataSource/index.mjs +6 -8
  16. package/dist/dataSource/utility/index.d.ts +1 -0
  17. package/dist/dataSource/utility/index.mjs +16 -15
  18. package/dist/devTools/utils/PlitziConsole.mjs +8 -12
  19. package/dist/elements/index.mjs +1 -2
  20. package/dist/flags/index.d.ts +2 -0
  21. package/dist/flags/index.mjs +2 -1
  22. package/dist/flags/useFlagResolution.mjs +6 -6
  23. package/dist/helpers/index.d.ts +8 -0
  24. package/dist/helpers/index.mjs +21 -13
  25. package/dist/helpers/keys.mjs +4 -8
  26. package/dist/helpers/twigWrapper/Evaluator/index.mjs +1 -2
  27. package/dist/helpers/twigWrapper/Parser/ExpressionParser.mjs +12 -26
  28. package/dist/helpers/twigWrapper/Parser/index.mjs +1 -2
  29. package/dist/helpers/twigWrapper/TemplateCache/index.mjs +1 -2
  30. package/dist/helpers/twigWrapper/charClass.mjs +2 -6
  31. package/dist/helpers/twigWrapper/filters/index.mjs +1 -2
  32. package/dist/helpers/twigWrapper/templateRoots.mjs +3 -8
  33. package/dist/hooks/useNetwork.mjs +1 -4
  34. package/dist/index.d.ts +5 -18
  35. package/dist/index.mjs +3 -96
  36. package/dist/network/graphql/builder/Mutations/index.d.ts +1 -0
  37. package/dist/network/graphql/builder/Mutations/index.mjs +148 -148
  38. package/dist/network/graphql/builder/Queries/index.mjs +4 -4
  39. package/dist/network/index.mjs +8 -8
  40. package/dist/plugins/{bundle.mjs → bundle/bundle.mjs} +1 -1
  41. package/dist/plugins/bundle/index.d.ts +2 -0
  42. package/dist/plugins/bundle/index.mjs +1 -0
  43. package/dist/plugins/index.d.ts +4 -0
  44. package/dist/plugins/index.mjs +3 -0
  45. package/dist/project/index.d.ts +8 -0
  46. package/dist/project/index.mjs +5 -0
  47. package/dist/project/layout.mjs +4 -4
  48. package/dist/queries/queryCache.mjs +1 -7
  49. package/dist/realtime/client.mjs +3 -12
  50. package/dist/schema/index.d.ts +5 -0
  51. package/dist/schema/index.mjs +12 -7
  52. package/dist/server/actions/useActionsSync.mjs +1 -1
  53. package/dist/server/actions/useImagesSync.mjs +1 -1
  54. package/dist/server/actions/useRealtimeSync.mjs +1 -1
  55. package/dist/server/index.d.ts +4 -0
  56. package/dist/server/index.mjs +8 -4
  57. package/dist/server/rsc/refreshRsc.mjs +11 -11
  58. package/dist/server/rsc/useRscSync.mjs +1 -1
  59. package/dist/server/usePluginRoute.mjs +1 -1
  60. package/dist/state/runtimeStatePersist.mjs +9 -15
  61. package/dist/store/index.d.ts +1 -193
  62. package/dist/store/index.mjs +6 -9
  63. package/dist/store/renderSettings.mjs +1 -1
  64. package/dist/store/storeHooks.d.ts +193 -0
  65. package/dist/store/storeHooks.mjs +5 -0
  66. package/dist/store/tracing/tracingCollector.mjs +1 -5
  67. package/dist/style/fonts.mjs +17 -25
  68. package/dist/style/index.d.ts +4 -0
  69. package/dist/style/index.mjs +19 -15
  70. package/dist/style/stylePseudos.mjs +2 -5
  71. package/dist/style/styleTarget.mjs +6 -6
  72. package/dist/theme/ThemeProvider.mjs +1 -1
  73. package/dist/theme/index.d.ts +1 -0
  74. package/dist/theme/index.mjs +4 -4
  75. package/dist/types/BuilderTypes.d.ts +8 -0
  76. package/dist/types/SchemaTypes.d.ts +2 -1
  77. package/dist/types/ServerTypes.d.ts +10 -1
  78. package/dist/websockets/index.mjs +1 -2
  79. package/package.json +21 -1587
  80. package/vite.config.ts +20 -4
  81. package/dist/auth/authFailureLink.d.ts +0 -9
  82. package/dist/auth/authFailureLink.mjs +0 -20
  83. package/dist/dataSource/hooks/index.d.ts +0 -4
  84. package/dist/dataSource/hooks/index.mjs +0 -3
  85. package/dist/dataSource/hooks/useRegisterSource.d.ts +0 -9
  86. package/dist/dataSource/hooks/useRegisterSource.mjs +0 -40
  87. package/dist/dataSource/hooks/useResolvedVariables.d.ts +0 -12
  88. package/dist/dataSource/hooks/useResolvedVariables.mjs +0 -28
  89. package/dist/helpers/stripTypename.d.ts +0 -15
  90. package/dist/helpers/stripTypename.mjs +0 -41
  91. /package/dist/plugins/{bundle.d.ts → bundle/bundle.d.ts} +0 -0
@@ -0,0 +1,5 @@
1
+ import { createStoreHook as e } from "@plitzi/nexus/react";
2
+ //#region src/store/storeHooks.ts
3
+ var { useStore: t, useStoreSync: n, useStoreGetter: r, useStoreSetter: i } = e(), { useStore: a, useStoreSync: o, useStoreGetter: s, useStoreSetter: c } = e(), { useStore: l, useStoreSync: u, useStoreGetter: d, useStoreSetter: f } = e();
4
+ //#endregion
5
+ export { l as useBuilderStore, d as useBuilderStoreGetter, f as useBuilderStoreSetter, u as useBuilderStoreSync, t as useCommonStore, r as useCommonStoreGetter, i as useCommonStoreSetter, n as useCommonStoreSync, a as useSdkStore, s as useSdkStoreGetter, c as useSdkStoreSetter, o as useSdkStoreSync };
@@ -83,11 +83,7 @@ var r = n({ max: 30 }), i = [], a = /* @__PURE__ */ new Map(), o = /* @__PURE__
83
83
  d.delete(e) && (l = !0);
84
84
  },
85
85
  markUnmounted: (e) => {
86
- if (!c.has(e)) {
87
- C(e);
88
- return;
89
- }
90
- d.set(e, g), l = !0, _ || (_ = !0, y(T));
86
+ c.has(e) ? (d.set(e, g), l = !0, _ || (_ = !0, y(T))) : C(e);
91
87
  },
92
88
  recordProps: (e, t) => {
93
89
  p.set(e, t);
@@ -145,33 +145,25 @@ var e = "https://fonts.googleapis.com", t = {
145
145
  });
146
146
  }
147
147
  return n.forEach((e) => {
148
- if (e.source === "remote" && e.stylesheet && i(e.stylesheet)) {
149
- d(a(e.stylesheet), !1), e.preload && s.push({
150
- href: e.stylesheet,
148
+ e.source === "remote" && e.stylesheet && i(e.stylesheet) ? (d(a(e.stylesheet), !1), e.preload && s.push({
149
+ href: e.stylesheet,
150
+ rel: "preload",
151
+ as: "style"
152
+ }), o.push({
153
+ href: e.stylesheet,
154
+ rel: "stylesheet"
155
+ })) : e.source === "remote" && e.files ? e.files.filter((e) => i(e.url)).forEach((n) => {
156
+ d(a(n.url), !0), c.push(x(e, {
157
+ ...n,
158
+ url: n.url
159
+ })), e.preload && s.push({
160
+ href: n.url,
151
161
  rel: "preload",
152
- as: "style"
153
- }), o.push({
154
- href: e.stylesheet,
155
- rel: "stylesheet"
156
- });
157
- return;
158
- }
159
- if (e.source === "remote" && e.files) {
160
- e.files.filter((e) => i(e.url)).forEach((n) => {
161
- d(a(n.url), !0), c.push(x(e, {
162
- ...n,
163
- url: n.url
164
- })), e.preload && s.push({
165
- href: n.url,
166
- rel: "preload",
167
- as: "font",
168
- type: t[n.format],
169
- crossorigin: !0
170
- });
162
+ as: "font",
163
+ type: t[n.format],
164
+ crossorigin: !0
171
165
  });
172
- return;
173
- }
174
- e.source === "hosted" && e.files.forEach((n) => {
166
+ }) : e.source === "hosted" && e.files.forEach((n) => {
175
167
  let i = r(n.path);
176
168
  d(a(i), !0), c.push(x(e, {
177
169
  ...n,
@@ -15,3 +15,7 @@ export * from './stylePseudos';
15
15
  export * from './styleStates';
16
16
  export * from './styleTarget';
17
17
  export { styleConstants };
18
+ export * from './notifications';
19
+ export { default as useDisplayMode } from './useDisplayMode';
20
+ export { default as useElementSize } from './useElementSize';
21
+ export * from './keyframes';
@@ -1,16 +1,20 @@
1
- import e, { EMPTY_STYLE_SCHEMA as t, StyleBindingsAllowed as n, baseDefaultValue as r, inheritableAttributesBase as i } from "./styleConstants.mjs";
2
- import { DISPLAY_MODE_MIN_WIDTH as a, displayModeAt as o, displayModeWidthRem as s } from "./breakpoints.mjs";
3
- import { PLUGIN_CSS_LAYER as c, RUNTIME_CSS_LAYER as l, inPluginLayer as u } from "./cssLayers.mjs";
4
- import { DISPLAY_MODES as d, isDisplayMode as f } from "./displayModes.mjs";
5
- import { fontLinkAssets as p } from "./fontAssets.mjs";
6
- import { SYSTEM_FONTS as m, availableFonts as h, familiesInCss as g, fontFamilyStack as _, fontUrlResolver as v, fontsToHead as y, googleCss2Url as b, googleTextSubsetUrl as x, isSafeFontUrl as S, primaryFamily as C } from "./fonts.mjs";
7
- import { FontValidationError as w, parseSpaceFont as T } from "./fontValidation.mjs";
8
- import { fallbackForFamily as E, fontsFromCss as D } from "./fontsFromCss.mjs";
9
- import { LAYOUT_GRIDS as O, layoutGridCss as k, layoutGridLook as A } from "./layoutGrid.mjs";
10
- import { RUNTIME_STYLE_ID as j, markStyleCache as M, styleCacheFromDocument as N, styleCacheTravelsInDocument as P } from "./runtimeStyle.mjs";
11
- import { mergeSnippetStyle as F, sameSelector as I, selectorsOf as L } from "./snippetStyle.mjs";
12
- import { MOTION_CONDITIONS as R, STYLE_CONDITION_LABELS as z, STYLE_MOTION_CONDITIONS as B, canonicalCondition as V, conditionAtRule as H, conditionLabel as U, conditionOfAtRule as W, isStyleCondition as G, parseContainerCondition as K } from "./styleConditions.mjs";
13
- import { CONTENT_PSEUDOS as q, GENERATED_PSEUDOS as J, PSEUDO_PROPERTIES as Y, STYLE_PSEUDOS as X, STYLE_PSEUDO_LABELS as Z, isContentValue as Q, isStylePseudo as $, pseudoHonours as ee, pseudoSuffix as te } from "./stylePseudos.mjs";
14
- import { CURRENT_SELECTOR as ne, EXPANDED_SELECTOR as re, HIDDEN_CLASS as ie, PARENT_ANCESTOR as ae, STYLE_STATES as oe, STYLE_STATE_LABELS as se, inCascadeOrder as ce, isKnownState as le, isParentAncestor as ue, isStartingState as de, stateSuffix as fe } from "./styleStates.mjs";
1
+ import { DISPLAY_MODES as e, isDisplayMode as t } from "./displayModes.mjs";
2
+ import { CONTENT_PSEUDOS as n, GENERATED_PSEUDOS as r, PSEUDO_PROPERTIES as i, STYLE_PSEUDOS as a, STYLE_PSEUDO_LABELS as o, isContentValue as s, isStylePseudo as c, pseudoHonours as l, pseudoSuffix as u } from "./stylePseudos.mjs";
3
+ import { CURRENT_SELECTOR as d, EXPANDED_SELECTOR as f, HIDDEN_CLASS as p, PARENT_ANCESTOR as m, STYLE_STATES as h, STYLE_STATE_LABELS as g, inCascadeOrder as _, isKnownState as v, isParentAncestor as y, isStartingState as b, stateSuffix as x } from "./styleStates.mjs";
4
+ import S, { EMPTY_STYLE_SCHEMA as C, StyleBindingsAllowed as w, baseDefaultValue as T, inheritableAttributesBase as E } from "./styleConstants.mjs";
5
+ import { DISPLAY_MODE_MIN_WIDTH as D, displayModeAt as O, displayModeWidthRem as k } from "./breakpoints.mjs";
6
+ import { PLUGIN_CSS_LAYER as A, RUNTIME_CSS_LAYER as j, inPluginLayer as M } from "./cssLayers.mjs";
7
+ import { fontLinkAssets as N } from "./fontAssets.mjs";
8
+ import { SYSTEM_FONTS as P, availableFonts as F, familiesInCss as I, fontFamilyStack as L, fontUrlResolver as R, fontsToHead as z, googleCss2Url as B, googleTextSubsetUrl as V, isSafeFontUrl as H, primaryFamily as U } from "./fonts.mjs";
9
+ import { FontValidationError as W, parseSpaceFont as G } from "./fontValidation.mjs";
10
+ import { fallbackForFamily as K, fontsFromCss as q } from "./fontsFromCss.mjs";
11
+ import { LAYOUT_GRIDS as J, layoutGridCss as Y, layoutGridLook as X } from "./layoutGrid.mjs";
12
+ import { RUNTIME_STYLE_ID as Z, markStyleCache as Q, styleCacheFromDocument as $, styleCacheTravelsInDocument as ee } from "./runtimeStyle.mjs";
13
+ import { mergeSnippetStyle as te, sameSelector as ne, selectorsOf as re } from "./snippetStyle.mjs";
14
+ import { MOTION_CONDITIONS as ie, STYLE_CONDITION_LABELS as ae, STYLE_MOTION_CONDITIONS as oe, canonicalCondition as se, conditionAtRule as ce, conditionLabel as le, conditionOfAtRule as ue, isStyleCondition as de, parseContainerCondition as fe } from "./styleConditions.mjs";
15
15
  import { isStyleRules as pe, setAtKeys as me, styleTargetKeys as he, styleTargetProblem as ge, styleTargetRules as _e, valueAtKeys as ve } from "./styleTarget.mjs";
16
- export { q as CONTENT_PSEUDOS, ne as CURRENT_SELECTOR, d as DISPLAY_MODES, a as DISPLAY_MODE_MIN_WIDTH, t as EMPTY_STYLE_SCHEMA, re as EXPANDED_SELECTOR, w as FontValidationError, J as GENERATED_PSEUDOS, ie as HIDDEN_CLASS, O as LAYOUT_GRIDS, R as MOTION_CONDITIONS, ae as PARENT_ANCESTOR, c as PLUGIN_CSS_LAYER, Y as PSEUDO_PROPERTIES, l as RUNTIME_CSS_LAYER, j as RUNTIME_STYLE_ID, z as STYLE_CONDITION_LABELS, B as STYLE_MOTION_CONDITIONS, X as STYLE_PSEUDOS, Z as STYLE_PSEUDO_LABELS, oe as STYLE_STATES, se as STYLE_STATE_LABELS, m as SYSTEM_FONTS, n as StyleBindingsAllowed, h as availableFonts, r as baseDefaultValue, V as canonicalCondition, H as conditionAtRule, U as conditionLabel, W as conditionOfAtRule, o as displayModeAt, s as displayModeWidthRem, E as fallbackForFamily, g as familiesInCss, _ as fontFamilyStack, p as fontLinkAssets, v as fontUrlResolver, D as fontsFromCss, y as fontsToHead, b as googleCss2Url, x as googleTextSubsetUrl, ce as inCascadeOrder, u as inPluginLayer, i as inheritableAttributesBase, Q as isContentValue, f as isDisplayMode, le as isKnownState, ue as isParentAncestor, S as isSafeFontUrl, de as isStartingState, G as isStyleCondition, $ as isStylePseudo, pe as isStyleRules, k as layoutGridCss, A as layoutGridLook, M as markStyleCache, F as mergeSnippetStyle, K as parseContainerCondition, T as parseSpaceFont, C as primaryFamily, ee as pseudoHonours, te as pseudoSuffix, I as sameSelector, L as selectorsOf, me as setAtKeys, fe as stateSuffix, N as styleCacheFromDocument, P as styleCacheTravelsInDocument, e as styleConstants, he as styleTargetKeys, ge as styleTargetProblem, _e as styleTargetRules, ve as valueAtKeys };
16
+ import { NOTIFICATIONS_FIELDS as ye, notificationsCss as be, notificationsProblem as xe, splitNotificationsCss as Se, withNotificationsCss as Ce } from "./notifications.mjs";
17
+ import we from "./useDisplayMode.mjs";
18
+ import Te from "./useElementSize.mjs";
19
+ import { SDK_KEYFRAMES_PREFIX as Ee, animationNamesIn as De, isFrameSelector as Oe, isKeyframesName as ke, keyframesCss as Ae, keyframesNamesIn as je, splitKeyframesCss as Me, withKeyframesCss as Ne } from "./keyframes.mjs";
20
+ export { n as CONTENT_PSEUDOS, d as CURRENT_SELECTOR, e as DISPLAY_MODES, D as DISPLAY_MODE_MIN_WIDTH, C as EMPTY_STYLE_SCHEMA, f as EXPANDED_SELECTOR, W as FontValidationError, r as GENERATED_PSEUDOS, p as HIDDEN_CLASS, J as LAYOUT_GRIDS, ie as MOTION_CONDITIONS, ye as NOTIFICATIONS_FIELDS, m as PARENT_ANCESTOR, A as PLUGIN_CSS_LAYER, i as PSEUDO_PROPERTIES, j as RUNTIME_CSS_LAYER, Z as RUNTIME_STYLE_ID, Ee as SDK_KEYFRAMES_PREFIX, ae as STYLE_CONDITION_LABELS, oe as STYLE_MOTION_CONDITIONS, a as STYLE_PSEUDOS, o as STYLE_PSEUDO_LABELS, h as STYLE_STATES, g as STYLE_STATE_LABELS, P as SYSTEM_FONTS, w as StyleBindingsAllowed, De as animationNamesIn, F as availableFonts, T as baseDefaultValue, se as canonicalCondition, ce as conditionAtRule, le as conditionLabel, ue as conditionOfAtRule, O as displayModeAt, k as displayModeWidthRem, K as fallbackForFamily, I as familiesInCss, L as fontFamilyStack, N as fontLinkAssets, R as fontUrlResolver, q as fontsFromCss, z as fontsToHead, B as googleCss2Url, V as googleTextSubsetUrl, _ as inCascadeOrder, M as inPluginLayer, E as inheritableAttributesBase, s as isContentValue, t as isDisplayMode, Oe as isFrameSelector, ke as isKeyframesName, v as isKnownState, y as isParentAncestor, H as isSafeFontUrl, b as isStartingState, de as isStyleCondition, c as isStylePseudo, pe as isStyleRules, Ae as keyframesCss, je as keyframesNamesIn, Y as layoutGridCss, X as layoutGridLook, Q as markStyleCache, te as mergeSnippetStyle, be as notificationsCss, xe as notificationsProblem, fe as parseContainerCondition, G as parseSpaceFont, U as primaryFamily, l as pseudoHonours, u as pseudoSuffix, ne as sameSelector, re as selectorsOf, me as setAtKeys, Me as splitKeyframesCss, Se as splitNotificationsCss, x as stateSuffix, $ as styleCacheFromDocument, ee as styleCacheTravelsInDocument, S as styleConstants, he as styleTargetKeys, ge as styleTargetProblem, _e as styleTargetRules, we as useDisplayMode, Te as useElementSize, ve as valueAtKeys, Ne as withKeyframesCss, Ce as withNotificationsCss };
@@ -86,11 +86,8 @@ var e = [
86
86
  "revert"
87
87
  ]), f = /^(?:counter|counters|attr|url|var|image-set|linear-gradient|radial-gradient|conic-gradient)\(/i, p = (e) => {
88
88
  let t = [], n = "", r = "", i = 0;
89
- for (let a of e) {
90
- if (r) {
91
- n += a, r = a === r && !n.endsWith(`\\${a}`) ? "" : r;
92
- continue;
93
- }
89
+ for (let a of e) if (r) n += a, r = a === r && !n.endsWith(`\\${a}`) ? "" : r;
90
+ else {
94
91
  if (a === "\"" || a === "'") r = a;
95
92
  else if (a === "(") i += 1;
96
93
  else if (a === ")") --i;
@@ -1,7 +1,7 @@
1
1
  import { isRecord as e } from "../helpers/isRecord.mjs";
2
- import { canonicalCondition as t } from "./styleConditions.mjs";
3
- import { isStylePseudo as n } from "./stylePseudos.mjs";
4
- import { isParentAncestor as r } from "./styleStates.mjs";
2
+ import { isStylePseudo as t } from "./stylePseudos.mjs";
3
+ import { isParentAncestor as n } from "./styleStates.mjs";
4
+ import { canonicalCondition as r } from "./styleConditions.mjs";
5
5
  //#region src/style/styleTarget.ts
6
6
  var i = (e) => {
7
7
  let t = [];
@@ -10,9 +10,9 @@ var i = (e) => {
10
10
  if (e.styleAncestor && e.styleCondition) return "an ancestor condition cannot also be under a condition";
11
11
  if (e.styleAncestor && e.stylePseudo) return "a pseudo-element has no ancestor conditions of its own";
12
12
  if (e.styleCondition && e.styleVariant) return "a condition holds the class’s own rules, not its variants’";
13
- if (e.styleCondition && t(e.styleCondition) !== e.styleCondition) return `"${e.styleCondition}" is not a condition`;
14
- if (e.stylePseudo && !n(e.stylePseudo)) return `"${String(e.stylePseudo)}" is not a pseudo-element`;
15
- if (e.styleAncestor && r(e.styleAncestor) && e.styleVariant) return "the element around it is named by its state, never by a variant";
13
+ if (e.styleCondition && r(e.styleCondition) !== e.styleCondition) return `"${e.styleCondition}" is not a condition`;
14
+ if (e.stylePseudo && !t(e.stylePseudo)) return `"${String(e.stylePseudo)}" is not a pseudo-element`;
15
+ if (e.styleAncestor && n(e.styleAncestor) && e.styleVariant) return "the element around it is named by its state, never by a variant";
16
16
  }, o = (t, n) => {
17
17
  let r = t;
18
18
  for (let t of n) {
@@ -1,4 +1,4 @@
1
- import { useCommonStoreSync as e } from "../store/index.mjs";
1
+ import { useCommonStoreSync as e } from "../store/storeHooks.mjs";
2
2
  import { THEME_COOKIE_NAME as t, applyThemeClass as n, readThemeCookie as r, writeThemeCookie as i } from "./themeCookie.mjs";
3
3
  import a, { createThemeStore as o, resolveScheme as s, setMachineScheme as c, setThemeMode as l } from "./themeStore.mjs";
4
4
  import u, { ThemeStartContext as d, useThemeState as f } from "./ThemeScope.mjs";
@@ -6,4 +6,5 @@ export * from './themeCookie';
6
6
  export * from './themeStore';
7
7
  export * from './useTheme';
8
8
  export { default as themeStore } from './themeStore';
9
+ export { default as ThemeScopeContext } from './ThemeScope';
9
10
  export { ThemeProvider, useTheme };
@@ -1,6 +1,6 @@
1
1
  import { THEME_CLASSES as e, THEME_COOKIE_NAME as t, applyThemeClass as n, isTheme as r, readThemeCookie as i, themeFromCookies as a, writeThemeCookie as o } from "./themeCookie.mjs";
2
2
  import s, { createThemeState as c, createThemeStore as l, resolveScheme as u, setAreaTheme as d, setMachineScheme as f, setThemeMode as p, startingThemeState as m, themeFor as h } from "./themeStore.mjs";
3
- import { ThemeStartContext as g, useThemeState as _, useThemeStore as v } from "./ThemeScope.mjs";
4
- import y from "./ThemeProvider.mjs";
5
- import b, { SPACE_THEME_AREA as x } from "./useTheme.mjs";
6
- export { x as SPACE_THEME_AREA, e as THEME_CLASSES, t as THEME_COOKIE_NAME, y as ThemeProvider, g as ThemeStartContext, n as applyThemeClass, c as createThemeState, l as createThemeStore, r as isTheme, i as readThemeCookie, u as resolveScheme, d as setAreaTheme, f as setMachineScheme, p as setThemeMode, m as startingThemeState, h as themeFor, a as themeFromCookies, s as themeStore, b as useTheme, _ as useThemeState, v as useThemeStore, o as writeThemeCookie };
3
+ import g, { ThemeStartContext as _, useThemeState as v, useThemeStore as y } from "./ThemeScope.mjs";
4
+ import b from "./ThemeProvider.mjs";
5
+ import x, { SPACE_THEME_AREA as S } from "./useTheme.mjs";
6
+ export { S as SPACE_THEME_AREA, e as THEME_CLASSES, t as THEME_COOKIE_NAME, b as ThemeProvider, g as ThemeScopeContext, _ as ThemeStartContext, n as applyThemeClass, c as createThemeState, l as createThemeStore, r as isTheme, i as readThemeCookie, u as resolveScheme, d as setAreaTheme, f as setMachineScheme, p as setThemeMode, m as startingThemeState, h as themeFor, a as themeFromCookies, s as themeStore, x as useTheme, v as useThemeState, y as useThemeStore, o as writeThemeCookie };
@@ -20,4 +20,12 @@ export type SubscriptionCollaborator = {
20
20
  };
21
21
  instanceId: string;
22
22
  elementState?: SubscriptionCollaboratorElementState;
23
+ /**
24
+ * Present when the collaborator is an agent writing over the MCP — `user.firstName` is then the application
25
+ * (`Claude`) and `for` the member it acts for. It has no cursor: what it changed last is what it has selected, and it
26
+ * leaves once it has written nothing for a while.
27
+ */
28
+ agent?: {
29
+ for: string;
30
+ };
23
31
  };
@@ -4,6 +4,8 @@ import { SnippetStyle } from './SnippetTypes';
4
4
  import { BuiltinParam } from '../authoring/paramSpec';
5
5
  import { ElementMotion } from '../schema/motion';
6
6
  import { RuleGroup } from '@plitzi/plitzi-ui/QueryBuilder';
7
+ /** The `when` guard a binding, a flag rule and a sub-value are written with: part of the document, so exported with it. */
8
+ export type { RuleGroup };
7
9
  export type ElementRuntime = 'server' | 'client' | 'shared';
8
10
  /**
9
11
  * When an element's CONTENTS are mounted, relative to its own `visibility`.
@@ -376,4 +378,3 @@ export type SchemaRaw = {
376
378
  pageFolders: PageFolder[];
377
379
  components: Schema['components'];
378
380
  };
379
- export {};
@@ -8,6 +8,7 @@ import { SSRRealtimeConfig } from './RealtimeTypes';
8
8
  import { Schema } from './SchemaTypes';
9
9
  import { AnalyticsConfig, OfflineDataRaw } from './SdkTypes';
10
10
  import { FontHead, Style } from './StyleTypes';
11
+ import { ActivityReader, SpaceActivityPage, SpaceActivityQuery } from '../activity/types';
11
12
  import { FlagOverrides } from '../flags/resolveFlags';
12
13
  import { SpaceChange } from '../history/types';
13
14
  import { IncomingHttpHeaders } from 'node:http';
@@ -223,6 +224,8 @@ export type SSRGrant = {
223
224
  spaceId: number;
224
225
  scope: SpaceScope;
225
226
  userId?: number;
227
+ /** For an `agent` grant, the application the member connected (`Claude`): what its writes are recorded and shown as. */
228
+ client?: string;
226
229
  canWrite: boolean;
227
230
  };
228
231
  /** A page of a space's change history, newest first; `nextBefore` reads further back, null at the end. */
@@ -237,10 +240,12 @@ export type SSRChangeQuery = {
237
240
  limit: number;
238
241
  };
239
242
  /** Who a write is made for and which request made it, for a consumer that records its changes. Every document one
240
- * request writes shares its `batch`: one `plitzi_apply`, read back as one change. */
243
+ * request writes shares its `batch`: one `plitzi_apply`, read back as one change. `client` is the application that
244
+ * wrote it for them (`SSRGrant.client`). */
241
245
  export type SSRWriteContext = {
242
246
  userId?: number;
243
247
  batch: string;
248
+ client?: string;
244
249
  };
245
250
  /**
246
251
  * A session, as the thing that issued it describes it. Deliberately free of transport: whoever mints one says what
@@ -432,6 +437,10 @@ export type SSRAdapters = {
432
437
  /** The space's change history, read-only: what every writer saved, and for whom. When omitted, the MCP offers no
433
438
  * history resource. */
434
439
  getChanges?: (spaceId: number, environment: Environment, query: SSRChangeQuery) => Promise<SSRChangePage>;
440
+ /** What happened on the space after a cursor — the draft changed, a version went out, an action failed — waiting up
441
+ * to `query.wait` seconds when nothing has yet. `reader` is who asks, so their own writes can be left out; `signal`
442
+ * ends the wait when the client goes. When omitted, the MCP offers no `plitzi_activity`. */
443
+ getActivity?: (spaceId: number, query: SpaceActivityQuery, reader: ActivityReader, signal?: AbortSignal) => Promise<SpaceActivityPage>;
435
444
  /** Who this request carries, if anyone. The adapter reads the credential and resolves it; the cookie it arrived
436
445
  * in was written by the server, from {@link SSRAuthCookie}. */
437
446
  getUser?: (req: SSRRequest) => Promise<SSRUser | undefined>;
@@ -1,2 +1 @@
1
- import e, { RTEvent as t, RTEventCloseCode as n, getInstance as r, isRTEvent as i, isRTEventCloseCode as a, setInstance as o } from "./RTCodec.mjs";
2
- export { e as RTCodec, t as RTEvent, n as RTEventCloseCode, r as getInstance, i as isRTEvent, a as isRTEventCloseCode, o as setInstance };
1
+ export { default as RTCodec, RTEvent, RTEventCloseCode, getInstance, isRTEvent, isRTEventCloseCode, setInstance } from "./RTCodec.mjs";