@plitzi/sdk-shared 0.38.6 → 0.38.8

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 (63) hide show
  1. package/CHANGELOG.md +381 -0
  2. package/dist/authoring/declare.d.ts +1 -1
  3. package/dist/authoring/index.mjs +4 -4
  4. package/dist/authoring/paramSpec.d.ts +2 -1
  5. package/dist/authoring/paramSpec.mjs +20 -11
  6. package/dist/dataSource/globalSources.d.ts +34 -1
  7. package/dist/dataSource/globalSources.mjs +22 -2
  8. package/dist/dataSource/hooks/index.d.ts +2 -1
  9. package/dist/dataSource/hooks/index.mjs +2 -1
  10. package/dist/dataSource/hooks/useResolvedVariables.d.ts +12 -0
  11. package/dist/dataSource/hooks/useResolvedVariables.mjs +28 -0
  12. package/dist/dataSource/index.mjs +2 -1
  13. package/dist/dataSource/resolveVariables.d.ts +2 -2
  14. package/dist/devTools/chrome.d.ts +1 -1
  15. package/dist/flags/useFlagResolution.mjs +6 -6
  16. package/dist/helpers/canonicalJson.d.ts +6 -0
  17. package/dist/helpers/canonicalJson.mjs +5 -0
  18. package/dist/index.mjs +62 -58
  19. package/dist/network/spaceEvents.d.ts +31 -1
  20. package/dist/network/spaceEvents.mjs +150 -147
  21. package/dist/project/layout.d.ts +197 -0
  22. package/dist/project/layout.mjs +394 -0
  23. package/dist/project/paths.d.ts +84 -0
  24. package/dist/project/paths.mjs +4 -0
  25. package/dist/project/root.d.ts +24 -0
  26. package/dist/project/root.mjs +26 -0
  27. package/dist/queries/index.d.ts +12 -2
  28. package/dist/queries/index.mjs +27 -17
  29. package/dist/queries/serverQueries.d.ts +22 -0
  30. package/dist/queries/serverQueries.mjs +9 -0
  31. package/dist/queries/useServerQuery.d.ts +19 -0
  32. package/dist/queries/useServerQuery.mjs +21 -0
  33. package/dist/server/rsc/refreshRsc.d.ts +22 -10
  34. package/dist/server/rsc/refreshRsc.mjs +65 -53
  35. package/dist/server/rsc/useRscRefresh.d.ts +2 -1
  36. package/dist/server/rsc/useRscRefresh.mjs +1 -1
  37. package/dist/source/export.d.ts +2 -2
  38. package/dist/source/import.d.ts +1 -1
  39. package/dist/store/index.d.ts +45 -45
  40. package/dist/style/cssLayers.d.ts +1 -1
  41. package/dist/style/index.d.ts +3 -0
  42. package/dist/style/index.mjs +5 -2
  43. package/dist/style/keyframes.d.ts +39 -0
  44. package/dist/style/keyframes.mjs +41 -0
  45. package/dist/style/notifications.d.ts +34 -12
  46. package/dist/style/notifications.mjs +69 -32
  47. package/dist/style/styleConditions.d.ts +43 -0
  48. package/dist/style/styleConditions.mjs +29 -0
  49. package/dist/style/styleConstants.d.ts +3 -2
  50. package/dist/style/styleConstants.mjs +2 -0
  51. package/dist/style/stylePseudos.d.ts +40 -0
  52. package/dist/style/stylePseudos.mjs +109 -0
  53. package/dist/style/styleStates.d.ts +35 -8
  54. package/dist/style/styleStates.mjs +38 -15
  55. package/dist/style/styleTarget.d.ts +23 -0
  56. package/dist/style/styleTarget.mjs +35 -0
  57. package/dist/types/AuthTypes.d.ts +5 -0
  58. package/dist/types/CommonTypes.d.ts +12 -0
  59. package/dist/types/SchemaTypes.d.ts +2 -0
  60. package/dist/types/ServerTypes.d.ts +11 -4
  61. package/dist/types/StoreTypes.d.ts +5 -1
  62. package/dist/types/StyleTypes.d.ts +20 -2
  63. package/package.json +46 -2
@@ -1,4 +1,4 @@
1
- import { SchemaVariable } from '../types';
1
+ import { SchemaVariable, SchemaVariableValue } from '../types';
2
2
  /** What a variable's `subValues` are matched against — everything a `when` rule may name. */
3
3
  export type VariableScope = {
4
4
  routeParams?: Record<string, unknown>;
@@ -18,5 +18,5 @@ export type VariableScope = {
18
18
  * a page that sends an unauthenticated visitor to `{{authUrl}}/` is deciding not to render at all, so the
19
19
  * provider that would have resolved the token never runs.
20
20
  */
21
- export declare const resolveVariables: (variables: SchemaVariable[] | undefined, scope?: VariableScope) => Record<string, unknown>;
21
+ export declare const resolveVariables: (variables: SchemaVariable[] | undefined, scope?: VariableScope) => Record<string, SchemaVariableValue>;
22
22
  export default resolveVariables;
@@ -1,6 +1,6 @@
1
1
  /**
2
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
3
+ * page rather than at the tools can leave it out: `plitzi page shot` and `plitzi page check` hide it, and a picture of a page is
4
4
  * a picture of the page.
5
5
  */
6
6
  export declare const DEV_TOOLS_ATTRIBUTE = "data-plitzi-devtools";
@@ -1,7 +1,7 @@
1
- import { resolveFlags as e } from "./resolveFlags.mjs";
2
- import t from "../hooks/useStableValue.mjs";
3
- import n from "../store/renderSettings.mjs";
4
- import { useCommonStore as r } from "../store/index.mjs";
1
+ import e from "../hooks/useStableValue.mjs";
2
+ import t from "../store/renderSettings.mjs";
3
+ import { useCommonStore as n } from "../store/index.mjs";
4
+ import { resolveFlags as r } from "./resolveFlags.mjs";
5
5
  import { useMemo as i } from "react";
6
6
  //#region src/flags/useFlagResolution.ts
7
7
  var a = ({ authenticated: e, user: t }) => {
@@ -13,7 +13,7 @@ var a = ({ authenticated: e, user: t }) => {
13
13
  roles: n.roles
14
14
  } : r;
15
15
  }, o = (o) => {
16
- let { environment: s } = n(), [[c, l, u, d, f]] = r([
16
+ let { environment: s } = t(), [[c, l, u, d, f]] = n([
17
17
  "schema.flags",
18
18
  "navigation.routeParams",
19
19
  "navigation.queryParams",
@@ -23,7 +23,7 @@ var a = ({ authenticated: e, user: t }) => {
23
23
  authenticated: p,
24
24
  user: m
25
25
  }), [p, m]);
26
- return t(i(() => e(c, {
26
+ return e(i(() => r(c, {
27
27
  environment: s,
28
28
  hostname: d,
29
29
  routeParams: l,
@@ -0,0 +1,6 @@
1
+ /**
2
+ * A value as JSON with every object's keys in order, so two values that say the same thing in another order read the
3
+ * same: what a before-and-after comparison is made with, where a key moved is not a change. `undefined` reads
4
+ * `undefined`.
5
+ */
6
+ export declare const canonicalJson: (value: unknown) => string;
@@ -0,0 +1,5 @@
1
+ import { isRecord as e } from "./isRecord.mjs";
2
+ //#region src/helpers/canonicalJson.ts
3
+ var t = (t) => t === void 0 ? "undefined" : JSON.stringify(t, (t, n) => e(n) ? Object.fromEntries(Object.keys(n).toSorted().map((e) => [e, n[e]])) : n);
4
+ //#endregion
5
+ export { t as canonicalJson };
package/dist/index.mjs CHANGED
@@ -32,61 +32,65 @@ import ge, { utilityOptions as _e } from "./dataSource/utility/index.mjs";
32
32
  import ve from "./dataSource/getBindingsDetails.mjs";
33
33
  import ye from "./dataSource/helpers/getSourceName.mjs";
34
34
  import be from "./dataSource/hooks/useRegisterSource.mjs";
35
- import xe from "./dataSource/resolveVariables.mjs";
36
- import Se from "./devTools/DevToolsContext.mjs";
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 };
35
+ import xe from "./hooks/useStableValue.mjs";
36
+ import Se from "./dataSource/resolveVariables.mjs";
37
+ import Ce from "./dataSource/hooks/useResolvedVariables.mjs";
38
+ import we from "./devTools/DevToolsContext.mjs";
39
+ import { DEV_TOOLS_ATTRIBUTE as Te, HIDE_DEV_TOOLS_CSS as Ee } from "./devTools/chrome.mjs";
40
+ import { debugCookieName as De } from "./devTools/debugCookie.mjs";
41
+ import Oe from "./devTools/interactionLog.mjs";
42
+ import ke, { createStoreDevToolsLogger as Ae, pConsole as je } from "./devTools/utils/PlitziConsole.mjs";
43
+ import Me from "./elements/ComponentContext.mjs";
44
+ import { FLAG_GATE_PATTERN as Ne, FLAG_NAME_PATTERN as Pe, isFlagName as Fe, isSchemaFlag as Ie } from "./flags/schemaFlag.mjs";
45
+ import { flagsCookieName as Le, forcedFlagsFromCookies as Re, parseFlagList as ze, serializeFlagList as Be, withForcedFlag as Ve, writeForcedFlags as He } from "./flags/flagsCookie.mjs";
46
+ import { FLAG_LAYERS as Ue, flagUserFromSSR as We, flagValues as Ge, hasConditions as Ke, passesFlagGate as qe, resolveFlags as Je, undeclaredFlagOverrides as Ye } from "./flags/resolveFlags.mjs";
47
+ import { describeChange as Xe, fieldChanges as Ze, uniqueLines as Qe } from "./history/describe.mjs";
48
+ import { diffSchema as $e, diffStyle as et, jsonCopy as tt, sameValue as nt } from "./history/diff.mjs";
49
+ import rt from "./hooks/useFontHead.mjs";
50
+ import it from "./hooks/useNetwork.mjs";
51
+ import at, { PlitziServiceContext as ot, PlitziServiceProvider as st } from "./hooks/usePlitziServiceContext.mjs";
52
+ import { WHILE_RUNNING_MODES as ct } from "./types/SchemaTypes.mjs";
53
+ import { StyleVariableCategory as lt, isStyleVariableCategory as ut } from "./types/StyleTypes.mjs";
54
+ import dt, { EMPTY_STYLE_SCHEMA as ft, StyleBindingsAllowed as pt, baseDefaultValue as mt, inheritableAttributesBase as ht } from "./style/styleConstants.mjs";
55
+ import { DISPLAY_MODE_MIN_WIDTH as gt, displayModeAt as _t, displayModeWidthRem as vt } from "./style/breakpoints.mjs";
56
+ import { PLUGIN_CSS_LAYER as yt, RUNTIME_CSS_LAYER as bt, inPluginLayer as xt } from "./style/cssLayers.mjs";
57
+ import { DISPLAY_MODES as St, isDisplayMode as Ct } from "./style/displayModes.mjs";
58
+ import { fontLinkAssets as wt } from "./style/fontAssets.mjs";
59
+ import { SYSTEM_FONTS as Tt, availableFonts as Et, familiesInCss as Dt, fontFamilyStack as Ot, fontUrlResolver as kt, fontsToHead as At, googleCss2Url as jt, googleTextSubsetUrl as Mt, isSafeFontUrl as Nt, primaryFamily as Pt } from "./style/fonts.mjs";
60
+ import { FontValidationError as Ft, parseSpaceFont as It } from "./style/fontValidation.mjs";
61
+ import { fallbackForFamily as Lt, fontsFromCss as Rt } from "./style/fontsFromCss.mjs";
62
+ import { LAYOUT_GRIDS as zt, layoutGridCss as Bt, layoutGridLook as Vt } from "./style/layoutGrid.mjs";
63
+ import { RUNTIME_STYLE_ID as Ht, markStyleCache as Ut, styleCacheFromDocument as Wt, styleCacheTravelsInDocument as Gt } from "./style/runtimeStyle.mjs";
64
+ import { mergeSnippetStyle as Kt, sameSelector as qt, selectorsOf as Jt } from "./style/snippetStyle.mjs";
65
+ import { MOTION_CONDITIONS as Yt, STYLE_CONDITION_LABELS as Xt, STYLE_MOTION_CONDITIONS as Zt, canonicalCondition as Qt, conditionAtRule as $t, conditionLabel as en, conditionOfAtRule as tn, isStyleCondition as nn, parseContainerCondition as rn } from "./style/styleConditions.mjs";
66
+ import { CONTENT_PSEUDOS as an, GENERATED_PSEUDOS as on, PSEUDO_PROPERTIES as sn, STYLE_PSEUDOS as cn, STYLE_PSEUDO_LABELS as ln, isContentValue as un, isStylePseudo as dn, pseudoHonours as fn, pseudoSuffix as pn } from "./style/stylePseudos.mjs";
67
+ import { CURRENT_SELECTOR as mn, EXPANDED_SELECTOR as hn, HIDDEN_CLASS as gn, PARENT_ANCESTOR as _n, STYLE_STATES as vn, STYLE_STATE_LABELS as yn, inCascadeOrder as bn, isKnownState as xn, isParentAncestor as Sn, isStartingState as Cn, stateSuffix as wn } from "./style/styleStates.mjs";
68
+ import { isStyleRules as Tn, setAtKeys as En, styleTargetKeys as Dn, styleTargetProblem as On, styleTargetRules as kn, valueAtKeys as An } from "./style/styleTarget.mjs";
69
+ import jn from "./schema/SchemaContext.mjs";
70
+ import { ANCHOR_PATTERN as Mn, anchorOf as Nn, isAnchor as Pn, uniqueAnchor as Fn } from "./schema/anchor.mjs";
71
+ import { COMPONENT_PROPS_SOURCE as In, EMPTY_SCHEMA as Ln, VARIABLE_REGEX as Rn } from "./schema/schemaConstants.mjs";
72
+ import { findLayoutCycle as zn, resolveLayoutChain as Bn } from "./schema/layoutChain.mjs";
73
+ import { collectServerElements as Vn, hasServerElements as Hn } from "./schema/serverElements.mjs";
74
+ import { isSnippet as Un } from "./schema/snippet.mjs";
75
+ import Wn from "./network/NetworkContext.mjs";
76
+ import Gn from "./network/NetworkInternalContext.mjs";
77
+ import { elementFromWire as Kn, schemaFromWire as qn, schemaToWire as Jn } from "./schema/wire.mjs";
78
+ import { SpaceEvents as Yn, spaceEventSchemas as Xn, validateSpaceEvent as Zn } from "./network/spaceEvents.mjs";
79
+ import Qn from "./network/graphql/builder/Mutations/index.mjs";
80
+ import $n from "./network/graphql/builder/Queries/index.mjs";
81
+ import er from "./network/graphql/builder/Subscriptions/index.mjs";
82
+ import tr from "./network/graphql/sdk/Mutations/index.mjs";
83
+ import nr from "./network/graphql/sdk/Queries/index.mjs";
84
+ import rr, { RTEvent as ir, RTEventCloseCode as ar, getInstance as or, isRTEvent as sr, isRTEventCloseCode as cr, setInstance as lr } from "./websockets/RTCodec.mjs";
85
+ import { THEME_CLASSES as ur, THEME_COOKIE_NAME as dr, applyThemeClass as fr, isTheme as pr, readThemeCookie as mr, themeFromCookies as hr, writeThemeCookie as gr } from "./theme/themeCookie.mjs";
86
+ import _r, { createThemeState as vr, createThemeStore as yr, resolveScheme as br, setAreaTheme as xr, setMachineScheme as Sr, setThemeMode as Cr, themeFor as wr } from "./theme/themeStore.mjs";
87
+ import { useThemeStore as Tr } from "./theme/ThemeScope.mjs";
88
+ import Er from "./theme/ThemeProvider.mjs";
89
+ import Dr, { SPACE_THEME_AREA as Or } from "./theme/useTheme.mjs";
90
+ import kr from "./server/actions/useActionsSync.mjs";
91
+ import Ar, { cancelRsc as jr, currentRscLocation as Mr, releaseRscRequests as Nr, rscDataPath as Pr } from "./server/rsc/refreshRsc.mjs";
92
+ import Fr from "./server/rsc/useRscRefresh.mjs";
93
+ import Ir from "./server/rsc/useRscSync.mjs";
94
+ import { PAINTED_STATE_BUDGET as Lr, clearPaintedEntry as Rr, paintedEntryFromCookies as zr, paintedKeys as Br, paintedStateCookieName as Vr, paintedStateFor as Hr, pickPainted as Ur, readPaintedEntry as Wr, writePaintedEntry as Gr } from "./state/paintedState.mjs";
95
+ import { runtimeStatePersist as Kr, stateOwner as qr } from "./state/runtimeStatePersist.mjs";
96
+ export { Mn as ANCHOR_PATTERN, x as BODYLESS_METHODS, y as BuilderContext, Qn as BuilderMutations, $n as BuilderQueries, In as COMPONENT_PROPS_SOURCE, N as COMPUTED_GLOBALS, S as CONNECTOR_HTTP_METHODS, an as CONTENT_PSEUDOS, mn as CURRENT_SELECTOR, Me as ComponentContext, C as DEFAULT_READ_ENDPOINT, Te as DEV_TOOLS_ATTRIBUTE, St as DISPLAY_MODES, gt as DISPLAY_MODE_MIN_WIDTH, we as DevToolsContext, w as EMPTY_RESPONSE_METHODS, Ln as EMPTY_SCHEMA, ft as EMPTY_STYLE_SCHEMA, hn as EXPANDED_SELECTOR, Ne as FLAG_GATE_PATTERN, Ue as FLAG_LAYERS, Pe as FLAG_NAME_PATTERN, Ft as FontValidationError, on as GENERATED_PSEUDOS, P as GLOBAL_SOURCES, gn as HIDDEN_CLASS, Ee as HIDE_DEV_TOOLS_CSS, ee as INTERVAL_TRIGGER, zt as LAYOUT_GRIDS, m as MAX_PARAM_PASSES, te as MIN_INTERVAL_MS, Yt as MOTION_CONDITIONS, Wn as NetworkContext, Gn as NetworkInternalContext, Lr as PAINTED_STATE_BUDGET, _n as PARENT_ANCESTOR, yt as PLUGIN_CSS_LAYER, sn as PSEUDO_PROPERTIES, oe as ParamsFromURL, ke as PlitziConsole, ot as PlitziServiceContext, st as PlitziServiceProvider, T as READ_ENDPOINT_NAMES, rr as RTCodec, ir as RTEvent, ar as RTEventCloseCode, bt as RUNTIME_CSS_LAYER, Ht as RUNTIME_STYLE_ID, Or as SPACE_THEME_AREA, Xt as STYLE_CONDITION_LABELS, Zt as STYLE_MOTION_CONDITIONS, cn as STYLE_PSEUDOS, ln as STYLE_PSEUDO_LABELS, vn as STYLE_STATES, yn as STYLE_STATE_LABELS, Tt as SYSTEM_FONTS, jn as SchemaContext, tr as SdkMutations, nr as SdkQueries, er as SpaceEventSubscription, Yn as SpaceEvents, pt as StyleBindingsAllowed, lt as StyleVariableCategory, ur as THEME_CLASSES, dr as THEME_COOKIE_NAME, Er as ThemeProvider, Rn as VARIABLE_REGEX, a as VISITOR_NAME, ct as WHILE_RUNNING_MODES, E as WRITE_ENDPOINT_NAMES, Nn as anchorOf, fr as applyThemeClass, t as authFailureFromResponse, Et as availableFonts, mt as baseDefaultValue, jr as cancelRsc, Qt as canonicalCondition, o as checkVisitorRoles, Rr as clearPaintedEntry, Vn as collectServerElements, $t as conditionAtRule, en as conditionLabel, tn as conditionOfAtRule, k as connectorPresets, D as connectorTokens, b as contexts, B as cookieFromHeader, Ae as createStoreDevToolsLogger, vr as createThemeState, yr as createThemeStore, Mr as currentRscLocation, De as debugCookieName, se as delay, Xe as describeChange, $e as diffSchema, et as diffStyle, he as disableReactDevTools, _t as displayModeAt, vt as displayModeWidthRem, V as documentCookies, Kn as elementFromWire, H as elementOf, A as emptyManifest, ce as emptyObject, F as evaluateComputed, ae as evaluateRuleGroup, Lt as fallbackForFamily, Dt as familiesInCss, L as fetchManifest, Ze as fieldChanges, c as filters, zn as findLayoutCycle, We as flagUserFromSSR, Ge as flagValues, Le as flagsCookieName, Ot as fontFamilyStack, wt as fontLinkAssets, kt as fontUrlResolver, Rt as fontsFromCss, At as fontsToHead, Re 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, or as getInstance, ue as getKeyDecoded, de as getPathsFromObeject, ye as getSourceName, jt as googleCss2Url, Mt as googleTextSubsetUrl, Ke as hasConditions, Hn as hasServerElements, f as hasTemplateSyntax, p as hasValidToken, fe as hexToRGB, bn as inCascadeOrder, xt as inPluginLayer, ht as inheritableAttributesBase, g as inspectTemplate, ne as intervalOf, Pn as isAnchor, j as isConnectorManifestDraft, un as isContentValue, re as isDate, Ct as isDisplayMode, U as isElementTarget, Fe as isFlagName, pe as isInViewport, Oe as isInteractionFlow, xn as isKnownState, W as isNodeTarget, Sn as isParentAncestor, sr as isRTEvent, cr as isRTEventCloseCode, e as isRecord, Nt as isSafeFontUrl, Ie as isSchemaFlag, Un as isSnippet, Cn as isStartingState, nn as isStyleCondition, dn as isStylePseudo, Tn as isStyleRules, ut as isStyleVariableCategory, pr as isTheme, ie as isUserEdit, Z as isValidFormat, tt as jsonCopy, Bt as layoutGridCss, Vt as layoutGridLook, I as liveSources, me as makeId, Ut as markStyleCache, Kt as mergeSnippetStyle, G as nodeOf, n as onAuthFailure, je as pConsole, zr as paintedEntryFromCookies, Br as paintedKeys, Vr as paintedStateCookieName, Hr as paintedStateFor, rn as parseContainerCondition, Q as parseDate, ze as parseFlagList, It as parseSpaceFont, qe as passesFlagGate, Ur as pickPainted, Pt as primaryFamily, l as processTwig, u as processTwigParam, d as processTwigValue, fn as pseudoHonours, pn as pseudoSuffix, Wr as readPaintedEntry, mr as readThemeCookie, Ar as refreshRsc, Nr as releaseRscRequests, r as reportAuthFailure, Je as resolveFlags, Bn as resolveLayoutChain, br as resolveScheme, h as resolveStepParam, Se as resolveVariables, Pr as rscDataPath, Kr as runtimeStatePersist, i as sameRegistrableDomain, qt as sameSelector, nt as sameValue, qn as schemaFromWire, Jn as schemaToWire, Jt as selectorsOf, Be as serializeFlagList, xr as setAreaTheme, En as setAtKeys, lr as setInstance, Sr as setMachineScheme, Cr as setThemeMode, Xn as spaceEventSchemas, qr as stateOwner, wn as stateSuffix, Wt as styleCacheFromDocument, Gt as styleCacheTravelsInDocument, dt as styleConstants, Dn as styleTargetKeys, On as styleTargetProblem, kn as styleTargetRules, z as syntaxHighlight, _ as templatePaths, v as templateRootNames, wr as themeFor, hr as themeFromCookies, _r as themeStore, $ as toUnixSeconds, Ye as undeclaredFlagOverrides, Fn as uniqueAnchor, Qe as uniqueLines, kr as useActionsSync, rt as useFontHead, it as useNetwork, at as usePlitziServiceContext, be as useRegisterSource, Ce as useResolvedVariables, Fr as useRscRefresh, Ir as useRscSync, xe as useStableValue, Dr as useTheme, Tr as useThemeStore, ge as utility, _e as utilityOptions, M as validateConnectorManifest, Zn as validateSpaceEvent, An as valueAtKeys, s as visitorAccess, Ve as withForcedFlag, He as writeForcedFlags, Gr as writePaintedEntry, gr as writeThemeCookie };
@@ -90,7 +90,7 @@ export declare const spaceEventSchemas: {
90
90
  }, z.core.$strip>;
91
91
  /**
92
92
  * A plugin installed — or installed again at a new address, which is how a new version arrives: from the builder,
93
- * or from `plitzi upload plugin` with no builder open. An open builder loads it without a reload.
93
+ * or from `plitzi plugin upload` with no builder open. An open builder loads it without a reload.
94
94
  */
95
95
  readonly SPACE_ADD_PLUGIN: z.ZodObject<{
96
96
  plugin: z.ZodObject<{
@@ -141,10 +141,25 @@ export declare const spaceEventSchemas: {
141
141
  checked: "checked";
142
142
  visited: "visited";
143
143
  current: "current";
144
+ expanded: "expanded";
144
145
  hidden: "hidden";
146
+ first: "first";
147
+ last: "last";
148
+ odd: "odd";
149
+ even: "even";
145
150
  }>>;
146
151
  styleVariant: z.ZodOptional<z.ZodString>;
147
152
  styleAncestor: z.ZodOptional<z.ZodString>;
153
+ stylePseudo: z.ZodOptional<z.ZodEnum<{
154
+ before: "before";
155
+ after: "after";
156
+ marker: "marker";
157
+ placeholder: "placeholder";
158
+ "first-letter": "first-letter";
159
+ "first-line": "first-line";
160
+ selection: "selection";
161
+ }>>;
162
+ styleCondition: z.ZodOptional<z.ZodString>;
148
163
  }, z.core.$strip>;
149
164
  }, z.core.$strip>;
150
165
  readonly STYLE_UPDATE_SELECTOR: z.ZodObject<{
@@ -168,10 +183,25 @@ export declare const spaceEventSchemas: {
168
183
  checked: "checked";
169
184
  visited: "visited";
170
185
  current: "current";
186
+ expanded: "expanded";
171
187
  hidden: "hidden";
188
+ first: "first";
189
+ last: "last";
190
+ odd: "odd";
191
+ even: "even";
172
192
  }>>;
173
193
  styleVariant: z.ZodOptional<z.ZodString>;
174
194
  styleAncestor: z.ZodOptional<z.ZodString>;
195
+ stylePseudo: z.ZodOptional<z.ZodEnum<{
196
+ before: "before";
197
+ after: "after";
198
+ marker: "marker";
199
+ placeholder: "placeholder";
200
+ "first-letter": "first-letter";
201
+ "first-line": "first-line";
202
+ selection: "selection";
203
+ }>>;
204
+ styleCondition: z.ZodOptional<z.ZodString>;
175
205
  styleSelector: z.ZodString;
176
206
  }, z.core.$strip>;
177
207
  }, z.core.$strip>;
@@ -2,163 +2,166 @@ import { isRecord as e } from "../helpers/isRecord.mjs";
2
2
  import { isSchemaFlag as t } from "../flags/schemaFlag.mjs";
3
3
  import { StyleVariableCategory as n } from "../types/StyleTypes.mjs";
4
4
  import { DISPLAY_MODES as r } from "../style/displayModes.mjs";
5
- import { STYLE_STATES as i } from "../style/styleStates.mjs";
6
- import { elementFromWire as a, schemaFromWire as o, schemaToWire as s } from "../schema/wire.mjs";
7
- import { z as c } from "zod";
5
+ import { STYLE_PSEUDOS as i } from "../style/stylePseudos.mjs";
6
+ import { STYLE_STATES as a } from "../style/styleStates.mjs";
7
+ import { elementFromWire as o, schemaFromWire as s, schemaToWire as c } from "../schema/wire.mjs";
8
+ import { z as l } from "zod";
8
9
  //#region src/network/spaceEvents.ts
9
- var l = c.custom((t) => e(t) && typeof t.id == "string", { message: "expected an element with an id" }), u = c.array(l), d = c.custom((t) => e(t) && typeof t.id == "string" && e(t.flat), { message: "expected a component with an id and a flat" }), f = c.custom((t) => e(t) && Array.isArray(t.flat), { message: "expected a schema whose `flat` is a list of elements" }), p = c.custom((t) => e(t) && typeof t.id == "string", { message: "expected a page folder with an id" }), m = c.custom((t) => e(t) && typeof t.name == "string", { message: "expected a variable with a name" }), h = c.custom(t, { message: "expected a flag with a value and its rules" }), g = c.custom(e, { message: "expected a style attributes object" }), _ = c.custom((t) => e(t) && typeof t.family == "string" && typeof t.source == "string", { message: "expected a font with a family and a source" }), v = c.custom((t) => typeof t == "string" || typeof t == "number" || e(t), { message: "expected a style variable value" }), y = c.enum(r), b = c.custom((e) => typeof e == "string", { message: "expected a drop position" }), x = c.custom((e) => typeof e == "string", { message: "expected a style category" }), S = c.enum([
10
+ var u = l.custom((t) => e(t) && typeof t.id == "string", { message: "expected an element with an id" }), d = l.array(u), f = l.custom((t) => e(t) && typeof t.id == "string" && e(t.flat), { message: "expected a component with an id and a flat" }), p = l.custom((t) => e(t) && Array.isArray(t.flat), { message: "expected a schema whose `flat` is a list of elements" }), m = l.custom((t) => e(t) && typeof t.id == "string", { message: "expected a page folder with an id" }), h = l.custom((t) => e(t) && typeof t.name == "string", { message: "expected a variable with a name" }), g = l.custom(t, { message: "expected a flag with a value and its rules" }), _ = l.custom(e, { message: "expected a style attributes object" }), v = l.custom((t) => e(t) && typeof t.family == "string" && typeof t.source == "string", { message: "expected a font with a family and a source" }), y = l.custom((t) => typeof t == "string" || typeof t == "number" || e(t), { message: "expected a style variable value" }), b = l.enum(r), x = l.custom((e) => typeof e == "string", { message: "expected a drop position" }), S = l.custom((e) => typeof e == "string", { message: "expected a style category" }), C = l.enum([
10
11
  "class",
11
12
  "element",
12
13
  "id"
13
- ]), C = c.enum(i), w = c.enum(n), T = c.object({
14
- componentType: c.string().optional(),
15
- styleSelector: c.string().optional(),
16
- styleState: C.optional(),
17
- styleVariant: c.string().optional(),
18
- styleAncestor: c.string().optional()
19
- }), E = T.extend({ styleSelector: c.string() }), D = c.object({ variable: m }), O = c.object({
20
- displayMode: y,
21
- selector: c.string(),
22
- category: w,
23
- name: c.string(),
24
- value: v
25
- }), k = c.object({
26
- displayMode: y,
27
- selector: c.string(),
28
- category: w,
29
- name: c.string()
30
- }), A = c.object({
31
- category: w,
32
- name: c.string(),
33
- value: v
34
- }), j = c.object({
35
- type: c.string(),
36
- resource: c.string(),
37
- settings: c.custom(e, { message: "expected a plugin settings object" })
38
- }), M = {
39
- SPACE_UPDATED: c.object({ schema: f }),
40
- STYLE_UPDATED: c.object({
41
- platform: c.custom(e),
42
- variables: c.custom(e),
43
- cache: c.string()
44
- }),
45
- SPACE_ADD_PAGE: c.object({ page: l }),
46
- SPACE_UPDATE_PAGE: c.object({ page: l }),
47
- SPACE_SET_HOME_PAGE: c.object({ page: l }),
48
- SPACE_REMOVE_PAGE: c.object({ pageId: c.string() }),
49
- SPACE_ADD_PAGE_FOLDER: c.object({ pageFolder: p }),
50
- SPACE_UPDATE_PAGE_FOLDER: c.object({ pageFolder: p }),
51
- SPACE_REMOVE_PAGE_FOLDER: c.object({ pageFolderId: c.string() }),
52
- SPACE_ADD_VARIABLE: D,
53
- SPACE_UPDATE_VARIABLE: D,
54
- SPACE_REMOVE_VARIABLE: c.object({ name: c.string() }),
55
- SPACE_SET_FLAG: c.object({
56
- name: c.string(),
57
- flag: h
58
- }),
59
- SPACE_REMOVE_FLAG: c.object({ name: c.string() }),
60
- SPACE_ADD_ELEMENT: c.object({
61
- element: l,
62
- dropPosition: b,
63
- to: c.string(),
64
- initialItems: u.optional(),
65
- variables: c.array(m).optional()
66
- }),
67
- SPACE_UPDATE_ELEMENT: c.object({ element: l }),
68
- SPACE_RENAME_ELEMENT: c.object({
69
- elementId: c.string(),
70
- id: c.string()
71
- }),
72
- SPACE_UPDATE_ELEMENTS: c.object({ elements: u }),
73
- SPACE_REMOVE_ELEMENT: c.object({ elementId: c.string() }),
74
- SPACE_MOVE_ELEMENT: c.object({
75
- from: c.string(),
76
- to: c.string(),
77
- elementId: c.string(),
78
- dropPosition: b
79
- }),
80
- SPACE_CLONE_ELEMENT: c.object({
81
- to: c.string(),
82
- element: l,
83
- dropPosition: b,
84
- initialItems: u
85
- }),
86
- SPACE_ADD_SNIPPET: c.object({
87
- element: l,
88
- style: c.custom(e),
89
- to: c.string(),
90
- dropPosition: b,
91
- initialItems: u.optional(),
92
- variables: c.array(m).optional()
93
- }),
94
- SPACE_ADD_PLUGIN: c.object({ plugin: j }),
95
- SPACE_UPDATE_PLUGIN: c.object({ plugin: j }),
96
- SPACE_REMOVE_PLUGIN: c.object({ pluginType: c.string() }),
97
- SPACE_UPDATE_SETTINGS: c.object({
98
- path: c.string(),
99
- value: c.union([
100
- c.string(),
101
- c.number(),
102
- c.boolean()
14
+ ]), w = l.enum(a), T = l.enum(n), E = l.object({
15
+ componentType: l.string().optional(),
16
+ styleSelector: l.string().optional(),
17
+ styleState: w.optional(),
18
+ styleVariant: l.string().optional(),
19
+ styleAncestor: l.string().optional(),
20
+ stylePseudo: l.enum(i).optional(),
21
+ styleCondition: l.string().optional()
22
+ }), D = E.extend({ styleSelector: l.string() }), O = l.object({ variable: h }), k = l.object({
23
+ displayMode: b,
24
+ selector: l.string(),
25
+ category: T,
26
+ name: l.string(),
27
+ value: y
28
+ }), A = l.object({
29
+ displayMode: b,
30
+ selector: l.string(),
31
+ category: T,
32
+ name: l.string()
33
+ }), j = l.object({
34
+ category: T,
35
+ name: l.string(),
36
+ value: y
37
+ }), M = l.object({
38
+ type: l.string(),
39
+ resource: l.string(),
40
+ settings: l.custom(e, { message: "expected a plugin settings object" })
41
+ }), N = {
42
+ SPACE_UPDATED: l.object({ schema: p }),
43
+ STYLE_UPDATED: l.object({
44
+ platform: l.custom(e),
45
+ variables: l.custom(e),
46
+ cache: l.string()
47
+ }),
48
+ SPACE_ADD_PAGE: l.object({ page: u }),
49
+ SPACE_UPDATE_PAGE: l.object({ page: u }),
50
+ SPACE_SET_HOME_PAGE: l.object({ page: u }),
51
+ SPACE_REMOVE_PAGE: l.object({ pageId: l.string() }),
52
+ SPACE_ADD_PAGE_FOLDER: l.object({ pageFolder: m }),
53
+ SPACE_UPDATE_PAGE_FOLDER: l.object({ pageFolder: m }),
54
+ SPACE_REMOVE_PAGE_FOLDER: l.object({ pageFolderId: l.string() }),
55
+ SPACE_ADD_VARIABLE: O,
56
+ SPACE_UPDATE_VARIABLE: O,
57
+ SPACE_REMOVE_VARIABLE: l.object({ name: l.string() }),
58
+ SPACE_SET_FLAG: l.object({
59
+ name: l.string(),
60
+ flag: g
61
+ }),
62
+ SPACE_REMOVE_FLAG: l.object({ name: l.string() }),
63
+ SPACE_ADD_ELEMENT: l.object({
64
+ element: u,
65
+ dropPosition: x,
66
+ to: l.string(),
67
+ initialItems: d.optional(),
68
+ variables: l.array(h).optional()
69
+ }),
70
+ SPACE_UPDATE_ELEMENT: l.object({ element: u }),
71
+ SPACE_RENAME_ELEMENT: l.object({
72
+ elementId: l.string(),
73
+ id: l.string()
74
+ }),
75
+ SPACE_UPDATE_ELEMENTS: l.object({ elements: d }),
76
+ SPACE_REMOVE_ELEMENT: l.object({ elementId: l.string() }),
77
+ SPACE_MOVE_ELEMENT: l.object({
78
+ from: l.string(),
79
+ to: l.string(),
80
+ elementId: l.string(),
81
+ dropPosition: x
82
+ }),
83
+ SPACE_CLONE_ELEMENT: l.object({
84
+ to: l.string(),
85
+ element: u,
86
+ dropPosition: x,
87
+ initialItems: d
88
+ }),
89
+ SPACE_ADD_SNIPPET: l.object({
90
+ element: u,
91
+ style: l.custom(e),
92
+ to: l.string(),
93
+ dropPosition: x,
94
+ initialItems: d.optional(),
95
+ variables: l.array(h).optional()
96
+ }),
97
+ SPACE_ADD_PLUGIN: l.object({ plugin: M }),
98
+ SPACE_UPDATE_PLUGIN: l.object({ plugin: M }),
99
+ SPACE_REMOVE_PLUGIN: l.object({ pluginType: l.string() }),
100
+ SPACE_UPDATE_SETTINGS: l.object({
101
+ path: l.string(),
102
+ value: l.union([
103
+ l.string(),
104
+ l.number(),
105
+ l.boolean()
103
106
  ])
104
107
  }),
105
- STYLE_ADD_SELECTOR: c.object({
106
- displayMode: y,
107
- selector: c.string(),
108
- path: x.optional(),
109
- type: S,
110
- style: g.optional(),
111
- params: T
112
- }),
113
- STYLE_UPDATE_SELECTOR: c.object({
114
- displayMode: y,
115
- selector: c.string(),
116
- path: x.optional(),
117
- style: g.optional(),
108
+ STYLE_ADD_SELECTOR: l.object({
109
+ displayMode: b,
110
+ selector: l.string(),
111
+ path: S.optional(),
112
+ type: C,
113
+ style: _.optional(),
118
114
  params: E
119
115
  }),
120
- STYLE_REMOVE_SELECTOR: c.object({
121
- displayMode: y,
122
- selector: c.string()
123
- }),
124
- STYLE_REMOVE_SELECTORS: c.object({
125
- displayMode: y,
126
- selectors: c.array(c.string())
127
- }),
128
- STYLE_ADD_SELECTOR_VARIABLE: O,
129
- STYLE_UPDATE_SELECTOR_VARIABLE: O,
130
- STYLE_REMOVE_SELECTOR_VARIABLE: k,
131
- STYLE_ADD_VARIABLE: A,
132
- STYLE_UPDATE_VARIABLE: A,
133
- STYLE_REMOVE_VARIABLE: c.object({
134
- category: w,
135
- name: c.string()
136
- }),
137
- STYLE_UPDATE_SETTINGS: c.object({
138
- path: c.string(),
139
- value: c.string()
140
- }),
141
- STYLE_ADD_FONT: c.object({ font: _ }),
142
- STYLE_UPDATE_FONT: c.object({
143
- family: c.string(),
144
- font: _
145
- }),
146
- STYLE_REMOVE_FONT: c.object({ family: c.string() }),
147
- SPACE_ADD_COMPONENT: c.object({
148
- component: d,
149
- from: c.object({
150
- elementId: c.string(),
151
- instanceId: c.string()
116
+ STYLE_UPDATE_SELECTOR: l.object({
117
+ displayMode: b,
118
+ selector: l.string(),
119
+ path: S.optional(),
120
+ style: _.optional(),
121
+ params: D
122
+ }),
123
+ STYLE_REMOVE_SELECTOR: l.object({
124
+ displayMode: b,
125
+ selector: l.string()
126
+ }),
127
+ STYLE_REMOVE_SELECTORS: l.object({
128
+ displayMode: b,
129
+ selectors: l.array(l.string())
130
+ }),
131
+ STYLE_ADD_SELECTOR_VARIABLE: k,
132
+ STYLE_UPDATE_SELECTOR_VARIABLE: k,
133
+ STYLE_REMOVE_SELECTOR_VARIABLE: A,
134
+ STYLE_ADD_VARIABLE: j,
135
+ STYLE_UPDATE_VARIABLE: j,
136
+ STYLE_REMOVE_VARIABLE: l.object({
137
+ category: T,
138
+ name: l.string()
139
+ }),
140
+ STYLE_UPDATE_SETTINGS: l.object({
141
+ path: l.string(),
142
+ value: l.string()
143
+ }),
144
+ STYLE_ADD_FONT: l.object({ font: v }),
145
+ STYLE_UPDATE_FONT: l.object({
146
+ family: l.string(),
147
+ font: v
148
+ }),
149
+ STYLE_REMOVE_FONT: l.object({ family: l.string() }),
150
+ SPACE_ADD_COMPONENT: l.object({
151
+ component: f,
152
+ from: l.object({
153
+ elementId: l.string(),
154
+ instanceId: l.string()
152
155
  }).optional()
153
156
  }),
154
- SPACE_UPDATE_COMPONENT: c.object({
155
- componentId: c.string(),
156
- declaration: c.custom(e)
157
+ SPACE_UPDATE_COMPONENT: l.object({
158
+ componentId: l.string(),
159
+ declaration: l.custom(e)
157
160
  }),
158
- SPACE_REMOVE_COMPONENT: c.object({ componentId: c.string() }),
159
- SPACE_DETACH_INSTANCE: c.object({ instanceId: c.string() })
160
- }, N = Object.fromEntries(Object.keys(M).map((e) => [e, e])), P = (e, t) => {
161
- let n = M[e];
161
+ SPACE_REMOVE_COMPONENT: l.object({ componentId: l.string() }),
162
+ SPACE_DETACH_INSTANCE: l.object({ instanceId: l.string() })
163
+ }, P = Object.fromEntries(Object.keys(N).map((e) => [e, e])), F = (e, t) => {
164
+ let n = N[e];
162
165
  if (!n) return {
163
166
  ok: !1,
164
167
  issues: [{
@@ -179,4 +182,4 @@ var l = c.custom((t) => e(t) && typeof t.id == "string", { message: "expected an
179
182
  };
180
183
  };
181
184
  //#endregion
182
- export { N as SpaceEvents, N as default, a as elementFromWire, o as schemaFromWire, s as schemaToWire, M as spaceEventSchemas, P as validateSpaceEvent };
185
+ export { P as SpaceEvents, P as default, o as elementFromWire, s as schemaFromWire, c as schemaToWire, N as spaceEventSchemas, F as validateSpaceEvent };