@plitzi/sdk-shared 0.37.10 → 0.38.1

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @plitzi/sdk-shared
2
2
 
3
+ ## 0.38.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 266e691: ## A shutdown that does not wait on idle connections
8
+
9
+ A server shutting down while it answered a request waited, once the answer was sent, for the client to let go of the
10
+ keep-alive connection it came on — three seconds for Node's own `fetch`, longer for others — before it could stop. The
11
+ connection is now closed as soon as its answer is finished.
12
+
13
+ ## 0.38.0
14
+
15
+ ### Minor Changes
16
+
17
+ - v0.38.0
18
+
3
19
  ## 0.37.10
4
20
 
5
21
  ### Patch Changes
package/dist/index.mjs CHANGED
@@ -48,43 +48,43 @@ import et from "./hooks/useFontHead.mjs";
48
48
  import tt from "./hooks/useNetwork.mjs";
49
49
  import nt, { PlitziServiceContext as rt, PlitziServiceProvider as it } from "./hooks/usePlitziServiceContext.mjs";
50
50
  import { WHILE_RUNNING_MODES as at } from "./types/SchemaTypes.mjs";
51
- import { StyleVariableCategory as ot } from "./types/StyleTypes.mjs";
52
- import st, { EMPTY_STYLE_SCHEMA as ct, StyleBindingsAllowed as lt, baseDefaultValue as ut, inheritableAttributesBase as dt } from "./style/styleConstants.mjs";
53
- import { DISPLAY_MODE_MIN_WIDTH as ft, displayModeAt as pt, displayModeWidthRem as mt } from "./style/breakpoints.mjs";
54
- import { DISPLAY_MODES as ht, isDisplayMode as gt } from "./style/displayModes.mjs";
55
- import { fontLinkAssets as _t } from "./style/fontAssets.mjs";
56
- import { SYSTEM_FONTS as vt, availableFonts as yt, familiesInCss as bt, fontFamilyStack as xt, fontUrlResolver as St, fontsToHead as Ct, googleCss2Url as wt, googleTextSubsetUrl as Tt, isSafeFontUrl as Et, primaryFamily as Dt } from "./style/fonts.mjs";
57
- import { FontValidationError as Ot, parseSpaceFont as kt } from "./style/fontValidation.mjs";
58
- import { fallbackForFamily as At, fontsFromCss as jt } from "./style/fontsFromCss.mjs";
59
- import { LAYOUT_GRIDS as Mt, layoutGridCss as Nt, layoutGridLook as Pt } from "./style/layoutGrid.mjs";
60
- import { RUNTIME_STYLE_ID as Ft, markStyleCache as It, styleCacheFromDocument as Lt, styleCacheTravelsInDocument as Rt } from "./style/runtimeStyle.mjs";
61
- import { mergeSnippetStyle as zt, sameSelector as Bt, selectorsOf as Vt } from "./style/snippetStyle.mjs";
62
- import { CURRENT_PAGE_SELECTOR as Ht, HIDDEN_CLASS as Ut, STYLE_STATES as Wt, STYLE_STATE_LABELS as Gt, inCascadeOrder as Kt, isKnownState as qt, isStartingState as Jt, stateSuffix as Yt } from "./style/styleStates.mjs";
63
- import Xt from "./schema/SchemaContext.mjs";
64
- import { ANCHOR_PATTERN as Zt, isAnchor as Qt } from "./schema/anchor.mjs";
65
- import { COMPONENT_PROPS_SOURCE as $t, EMPTY_SCHEMA as en, VARIABLE_REGEX as tn } from "./schema/schemaConstants.mjs";
66
- import { findLayoutCycle as nn, resolveLayoutChain as rn } from "./schema/layoutChain.mjs";
67
- import { collectServerElements as an, hasServerElements as on } from "./schema/serverElements.mjs";
68
- import { isSnippet as sn } from "./schema/snippet.mjs";
69
- import cn from "./network/NetworkContext.mjs";
70
- import ln from "./network/NetworkInternalContext.mjs";
71
- import { elementFromWire as un, schemaFromWire as dn, schemaToWire as fn } from "./schema/wire.mjs";
72
- import { SpaceEvents as pn, spaceEventSchemas as mn, validateSpaceEvent as hn } from "./network/spaceEvents.mjs";
73
- import gn from "./network/graphql/builder/Mutations/index.mjs";
74
- import _n from "./network/graphql/builder/Queries/index.mjs";
75
- import vn from "./network/graphql/builder/Subscriptions/index.mjs";
76
- import yn from "./network/graphql/sdk/Mutations/index.mjs";
77
- import bn from "./network/graphql/sdk/Queries/index.mjs";
78
- import xn, { RTEvent as Sn, RTEventCloseCode as Cn, getInstance as wn, isRTEvent as Tn, setInstance as En } from "./websockets/RTCodec.mjs";
79
- import { THEME_CLASSES as Dn, THEME_COOKIE_NAME as On, applyThemeClass as kn, isTheme as An, readThemeCookie as jn, themeFromCookies as Mn, writeThemeCookie as Nn } from "./theme/themeCookie.mjs";
80
- import Pn, { createThemeState as Fn, createThemeStore as In, resolveScheme as Ln, setAreaTheme as Rn, setMachineScheme as zn, setThemeMode as Bn, themeFor as Vn } from "./theme/themeStore.mjs";
81
- import { useThemeStore as Hn } from "./theme/ThemeScope.mjs";
82
- import Un from "./theme/ThemeProvider.mjs";
83
- import Wn, { SPACE_THEME_AREA as Gn } from "./theme/useTheme.mjs";
84
- import Kn from "./server/actions/useActionsSync.mjs";
85
- import qn, { currentRscLocation as Jn, rscDataPath as Yn } from "./server/rsc/refreshRsc.mjs";
86
- import Xn from "./server/rsc/useRscRefresh.mjs";
87
- import Zn from "./server/rsc/useRscSync.mjs";
88
- import { PAINTED_STATE_BUDGET as Qn, clearPaintedEntry as $n, paintedEntryFromCookies as er, paintedKeys as tr, paintedStateCookieName as nr, paintedStateFor as rr, pickPainted as ir, readPaintedEntry as ar, writePaintedEntry as or } from "./state/paintedState.mjs";
89
- import { runtimeStatePersist as sr, stateOwner as cr } from "./state/runtimeStatePersist.mjs";
90
- export { Zt as ANCHOR_PATTERN, x as BODYLESS_METHODS, y as BuilderContext, gn as BuilderMutations, _n as BuilderQueries, $t as COMPONENT_PROPS_SOURCE, N as COMPUTED_GLOBALS, S as CONNECTOR_HTTP_METHODS, Ht as CURRENT_PAGE_SELECTOR, Oe as ComponentContext, C as DEFAULT_READ_ENDPOINT, ht as DISPLAY_MODES, ft as DISPLAY_MODE_MIN_WIDTH, Se as DevToolsContext, w as EMPTY_RESPONSE_METHODS, en as EMPTY_SCHEMA, ct as EMPTY_STYLE_SCHEMA, ke as FLAG_GATE_PATTERN, ze as FLAG_LAYERS, Ae as FLAG_NAME_PATTERN, Ot as FontValidationError, P as GLOBAL_SOURCES, Ut as HIDDEN_CLASS, ee as INTERVAL_TRIGGER, Mt as LAYOUT_GRIDS, m as MAX_PARAM_PASSES, te as MIN_INTERVAL_MS, cn as NetworkContext, ln as NetworkInternalContext, Qn as PAINTED_STATE_BUDGET, oe as ParamsFromURL, Te as PlitziConsole, rt as PlitziServiceContext, it as PlitziServiceProvider, T as READ_ENDPOINT_NAMES, xn as RTCodec, Sn as RTEvent, Cn as RTEventCloseCode, Ft as RUNTIME_STYLE_ID, Gn as SPACE_THEME_AREA, Wt as STYLE_STATES, Gt as STYLE_STATE_LABELS, vt as SYSTEM_FONTS, Xt as SchemaContext, yn as SdkMutations, bn as SdkQueries, vn as SpaceEventSubscription, pn as SpaceEvents, lt as StyleBindingsAllowed, ot as StyleVariableCategory, Dn as THEME_CLASSES, On as THEME_COOKIE_NAME, Un as ThemeProvider, tn as VARIABLE_REGEX, a as VISITOR_NAME, at as WHILE_RUNNING_MODES, E as WRITE_ENDPOINT_NAMES, kn as applyThemeClass, t as authFailureFromResponse, yt as availableFonts, ut as baseDefaultValue, o as checkVisitorRoles, $n as clearPaintedEntry, an as collectServerElements, k as connectorPresets, D as connectorTokens, b as contexts, B as cookieFromHeader, Ee as createStoreDevToolsLogger, Fn as createThemeState, In as createThemeStore, Jn as currentRscLocation, Ce as debugCookieName, se as delay, qe as describeChange, Xe as diffSchema, Ze as diffStyle, he as disableReactDevTools, pt as displayModeAt, mt as displayModeWidthRem, V as documentCookies, un as elementFromWire, H as elementOf, A as emptyManifest, ce as emptyObject, F as evaluateComputed, ae as evaluateRuleGroup, At as fallbackForFamily, bt as familiesInCss, L as fetchManifest, Je as fieldChanges, c as filters, nn as findLayoutCycle, Be as flagUserFromSSR, Ve as flagValues, Ne as flagsCookieName, xt as fontFamilyStack, _t as fontLinkAssets, St as fontUrlResolver, jt as fontsFromCss, Ct 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, wn as getInstance, ue as getKeyDecoded, de as getPathsFromObeject, ye as getSourceName, wt as googleCss2Url, Tt as googleTextSubsetUrl, He as hasConditions, on as hasServerElements, f as hasTemplateSyntax, p as hasValidToken, fe as hexToRGB, Kt as inCascadeOrder, dt as inheritableAttributesBase, g as inspectTemplate, ne as intervalOf, Qt as isAnchor, j as isConnectorManifestDraft, re as isDate, gt as isDisplayMode, U as isElementTarget, je as isFlagName, pe as isInViewport, we as isInteractionFlow, qt as isKnownState, W as isNodeTarget, Tn as isRTEvent, e as isRecord, Et as isSafeFontUrl, Me as isSchemaFlag, sn as isSnippet, Jt as isStartingState, An as isTheme, ie as isUserEdit, Z as isValidFormat, Qe as jsonCopy, Nt as layoutGridCss, Pt as layoutGridLook, I as liveSources, me as makeId, It as markStyleCache, zt as mergeSnippetStyle, G as nodeOf, n as onAuthFailure, De as pConsole, er as paintedEntryFromCookies, tr as paintedKeys, nr as paintedStateCookieName, rr as paintedStateFor, Q as parseDate, Fe as parseFlagList, kt as parseSpaceFont, Ue as passesFlagGate, ir as pickPainted, Dt as primaryFamily, l as processTwig, u as processTwigParam, d as processTwigValue, ar as readPaintedEntry, jn as readThemeCookie, qn as refreshRsc, r as reportAuthFailure, We as resolveFlags, rn as resolveLayoutChain, Ln as resolveScheme, h as resolveStepParam, xe as resolveVariables, Yn as rscDataPath, sr as runtimeStatePersist, i as sameRegistrableDomain, Bt as sameSelector, $e as sameValue, dn as schemaFromWire, fn as schemaToWire, Vt as selectorsOf, Ie as serializeFlagList, Rn as setAreaTheme, En as setInstance, zn as setMachineScheme, Bn as setThemeMode, mn as spaceEventSchemas, cr as stateOwner, Yt as stateSuffix, Lt as styleCacheFromDocument, Rt as styleCacheTravelsInDocument, st as styleConstants, z as syntaxHighlight, _ as templatePaths, v as templateRootNames, Vn as themeFor, Mn as themeFromCookies, Pn as themeStore, $ as toUnixSeconds, Ge as undeclaredFlagOverrides, Ye as uniqueLines, Kn as useActionsSync, et as useFontHead, tt as useNetwork, nt as usePlitziServiceContext, be as useRegisterSource, Xn as useRscRefresh, Zn as useRscSync, Ke as useStableValue, Wn as useTheme, Hn as useThemeStore, ge as utility, _e as utilityOptions, M as validateConnectorManifest, hn as validateSpaceEvent, s as visitorAccess, Le as withForcedFlag, Re as writeForcedFlags, or as writePaintedEntry, Nn as writeThemeCookie };
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 };
@@ -13,6 +13,7 @@ export declare enum StyleVariableCategory {
13
13
  SHADOW = "shadow",
14
14
  CUSTOM = "custom"
15
15
  }
16
+ export declare const isStyleVariableCategory: (value: unknown) => value is StyleVariableCategory;
16
17
  export type StyleThemeValue = Partial<Record<ColorScheme | 'default', string>>;
17
18
  export type StyleVariableValue = string | number | StyleThemeValue;
18
19
  export type StyleVariableGroup = Record<string, StyleVariableValue>;
@@ -1,6 +1,6 @@
1
1
  //#region src/types/StyleTypes.ts
2
2
  var e = /* @__PURE__ */ function(e) {
3
3
  return e.COLOR = "color", e.SPACING = "spacing", e.SHADOW = "shadow", e.CUSTOM = "custom", e;
4
- }({});
4
+ }({}), t = Object.values(e), n = (e) => typeof e == "string" && t.includes(e);
5
5
  //#endregion
6
- export { e as StyleVariableCategory };
6
+ export { e as StyleVariableCategory, n as isStyleVariableCategory };
@@ -1,3 +1,3 @@
1
1
  import { WHILE_RUNNING_MODES as e } from "./SchemaTypes.mjs";
2
- import { StyleVariableCategory as t } from "./StyleTypes.mjs";
3
- export { t as StyleVariableCategory, e as WHILE_RUNNING_MODES };
2
+ import { StyleVariableCategory as t, isStyleVariableCategory as n } from "./StyleTypes.mjs";
3
+ export { t as StyleVariableCategory, e as WHILE_RUNNING_MODES, n as isStyleVariableCategory };
@@ -18,6 +18,7 @@ export declare enum RTEvent {
18
18
  COLLABORATOR_DISCONNECTED = 13
19
19
  }
20
20
  export declare const isRTEvent: (value: unknown) => value is RTEvent;
21
+ export declare const isRTEventCloseCode: (value: unknown) => value is RTEventCloseCode;
21
22
  export type RTMessageManagedClient = {
22
23
  type: RTEvent.INIT;
23
24
  payload: undefined;
@@ -3,7 +3,7 @@ var e = /* @__PURE__ */ function(e) {
3
3
  return e[e.NORMAL = 1e3] = "NORMAL", e[e.AWAY = 1001] = "AWAY", e[e.ABNORMAL = 1002] = "ABNORMAL", e[e.UNSUPPORTED = 1003] = "UNSUPPORTED", e[e.UNKNOWN = 4e3] = "UNKNOWN", e[e.NOT_AUTHORISED = 4001] = "NOT_AUTHORISED", e[e.INSTANCE_ID_NOT_FOUND = 4002] = "INSTANCE_ID_NOT_FOUND", e[e.USER_TOKEN_NOT_FOUND = 4003] = "USER_TOKEN_NOT_FOUND", e;
4
4
  }({}), t = /* @__PURE__ */ function(e) {
5
5
  return e[e.INIT = 0] = "INIT", e[e.KA = 1] = "KA", e[e.MOUSE = 10] = "MOUSE", e[e.ELEMENT = 11] = "ELEMENT", e[e.COLLABORATOR_CONNECTED = 12] = "COLLABORATOR_CONNECTED", e[e.COLLABORATOR_DISCONNECTED = 13] = "COLLABORATOR_DISCONNECTED", e;
6
- }({}), n = (e) => typeof e == "number" && e in t, r = class {
6
+ }({}), n = (e) => typeof e == "number" && e in t, r = (t) => typeof t == "number" && t in e, i = class {
7
7
  encoder;
8
8
  decoder;
9
9
  constructor() {
@@ -14,22 +14,24 @@ var e = /* @__PURE__ */ function(e) {
14
14
  return o.setUint8(0, e), o.setUint32(1, i.length), i.length > 0 && new Uint8Array(a, 5).set(i), a;
15
15
  }
16
16
  decode(e) {
17
- let t = new DataView(e), n = t.getUint8(0), r = t.getUint32(1);
18
- if (r === 0) return {
19
- type: n,
17
+ let t = new DataView(e), r = t.getUint8(0);
18
+ if (!n(r)) throw Error(`RTCodec: unknown event ${String(r)}`);
19
+ let i = t.getUint32(1);
20
+ if (i === 0) return {
21
+ type: r,
20
22
  payload: void 0
21
23
  };
22
- let i = new Uint8Array(e, 5, r);
24
+ let a = new Uint8Array(e, 5, i);
23
25
  return {
24
- type: n,
25
- payload: JSON.parse(this.decoder.decode(i))
26
+ type: r,
27
+ payload: JSON.parse(this.decoder.decode(a))
26
28
  };
27
29
  }
28
- }, i = void 0, a = (e) => {
29
- i = e;
30
+ }, a = void 0, o = (e) => {
31
+ a = e;
30
32
  };
31
- function o(e = !0) {
32
- return e && !i && (i = new r()), i;
33
+ function s(e = !0) {
34
+ return e && !a && (a = new i()), a;
33
35
  }
34
36
  //#endregion
35
- export { t as RTEvent, e as RTEventCloseCode, r as default, o as getInstance, n as isRTEvent, a as setInstance };
37
+ export { t as RTEvent, e as RTEventCloseCode, i as default, s as getInstance, n as isRTEvent, r as isRTEventCloseCode, o as setInstance };
@@ -1,2 +1,2 @@
1
- import e, { RTEvent as t, RTEventCloseCode as n, getInstance as r, isRTEvent as i, setInstance as a } from "./RTCodec.mjs";
2
- export { e as RTCodec, t as RTEvent, n as RTEventCloseCode, r as getInstance, i as isRTEvent, a as setInstance };
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 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plitzi/sdk-shared",
3
- "version": "0.37.10",
3
+ "version": "0.38.1",
4
4
  "license": "AGPL-3.0",
5
5
  "files": [
6
6
  "dist",
@@ -1478,11 +1478,11 @@
1478
1478
  "build:prod": "vite build && node ./scripts/generate-exports.mjs"
1479
1479
  },
1480
1480
  "dependencies": {
1481
- "@modelcontextprotocol/sdk": "^1.30.1",
1481
+ "@modelcontextprotocol/sdk": "^1.32.0",
1482
1482
  "@plitzi/nexus": "^1.4.0",
1483
1483
  "@plitzi/plitzi-ui": "^1.6.29",
1484
1484
  "date-fns": "^4.4.0",
1485
- "immer": "^11.1.18",
1485
+ "immer": "^11.1.21",
1486
1486
  "zod": "^4.6.5"
1487
1487
  },
1488
1488
  "peerDependencies": {
@@ -1507,24 +1507,24 @@
1507
1507
  "@types/react": "^19.3.0",
1508
1508
  "@types/react-dom": "^19.3.0",
1509
1509
  "@vitejs/plugin-react": "^6.1.1",
1510
- "@vitest/coverage-v8": "^5.0.1",
1510
+ "@vitest/coverage-v8": "^5.0.3",
1511
1511
  "babel-minify": "^0.5.2",
1512
1512
  "eslint": "^9.39.5",
1513
1513
  "eslint-config-airbnb": "^19.0.4",
1514
1514
  "eslint-config-prettier": "^10.1.8",
1515
- "eslint-config-turbo": "^2.11.3",
1515
+ "eslint-config-turbo": "^2.11.7",
1516
1516
  "eslint-import-resolver-alias": "^1.1.2",
1517
1517
  "eslint-plugin-cypress": "^7.0.2",
1518
1518
  "eslint-plugin-flowtype": "8.0.3",
1519
1519
  "eslint-plugin-import": "^2.32.0",
1520
- "eslint-plugin-jsdoc": "^64.5.4",
1520
+ "eslint-plugin-jsdoc": "^65.0.2",
1521
1521
  "eslint-plugin-jsx-a11y": "^6.10.2",
1522
1522
  "eslint-plugin-prettier": "^5.5.6",
1523
1523
  "eslint-plugin-react": "^7.37.5",
1524
1524
  "eslint-plugin-react-hooks": "^7.1.1",
1525
1525
  "eslint-plugin-react-refresh": "^0.5.7",
1526
- "eslint-plugin-storybook": "^10.6.0",
1527
- "globals": "^17.12.0",
1526
+ "eslint-plugin-storybook": "^10.6.1",
1527
+ "globals": "^17.13.0",
1528
1528
  "jsdom": "^30.1.1",
1529
1529
  "postcss": "^8.5.28",
1530
1530
  "prettier": "^3.9.9",
@@ -1533,11 +1533,11 @@
1533
1533
  "tailwindcss": "^4.3.3",
1534
1534
  "terser": "^5.51.2",
1535
1535
  "typescript": "^6.0.3",
1536
- "typescript-eslint": "^8.70.1",
1537
- "vite": "^8.3.1",
1538
- "vite-plugin-dts": "^5.1.1",
1536
+ "typescript-eslint": "^8.71.0",
1537
+ "vite": "^8.3.2",
1538
+ "vite-plugin-dts": "^5.1.2",
1539
1539
  "vite-plugin-react": "^4.0.1",
1540
- "vitest": "^5.0.1",
1540
+ "vitest": "^5.0.3",
1541
1541
  "vitest-fetch-mock": "^0.4.5"
1542
1542
  },
1543
1543
  "peerDependenciesMeta": {