@plitzi/sdk-shared 0.38.16 → 0.38.18
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 +107 -0
- package/dist/actions/cron.mjs +5 -9
- package/dist/actions/validateDocument.mjs +24 -50
- package/dist/connectors/validateManifest.mjs +28 -73
- package/dist/dataSource/helpers/index.mjs +1 -2
- package/dist/dataSource/index.d.ts +1 -1
- package/dist/dataSource/index.mjs +6 -8
- package/dist/dataSource/utility/dateConverter.mjs +1 -1
- package/dist/dataSource/utility/index.d.ts +1 -0
- package/dist/dataSource/utility/index.mjs +16 -15
- package/dist/{helpers → dates}/formatDate.mjs +1 -1
- package/dist/dates/index.d.ts +6 -0
- package/dist/dates/index.mjs +3 -0
- package/dist/{helpers → dates}/isDate.mjs +1 -1
- package/dist/devTools/index.d.ts +1 -3
- package/dist/devTools/index.mjs +5 -6
- package/dist/devTools/{DevToolsContext.d.ts → react/DevToolsContext.d.ts} +1 -1
- package/dist/devTools/{DevToolsContext.mjs → react/DevToolsContext.mjs} +1 -1
- package/dist/devTools/react/index.d.ts +3 -0
- package/dist/devTools/react/index.mjs +1 -0
- package/dist/devTools/utils/PlitziConsole.mjs +8 -12
- package/dist/elements/index.mjs +1 -2
- package/dist/flags/flagsCookie.mjs +4 -4
- package/dist/flags/index.mjs +2 -2
- package/dist/flags/react/index.d.ts +3 -0
- package/dist/flags/react/index.mjs +1 -0
- package/dist/flags/{useFlagResolution.d.ts → react/useFlagResolution.d.ts} +2 -4
- package/dist/flags/react/useFlagResolution.mjs +35 -0
- package/dist/flags/resolveFlags.d.ts +3 -1
- package/dist/flags/resolveFlags.mjs +16 -8
- package/dist/helpers/index.d.ts +8 -2
- package/dist/helpers/index.mjs +19 -13
- package/dist/helpers/keys.mjs +4 -8
- package/dist/helpers/twigWrapper/Evaluator/index.mjs +1 -2
- package/dist/helpers/twigWrapper/Parser/ExpressionParser.mjs +12 -26
- package/dist/helpers/twigWrapper/Parser/index.mjs +1 -2
- package/dist/helpers/twigWrapper/TemplateCache/index.mjs +1 -2
- package/dist/helpers/twigWrapper/charClass.mjs +2 -6
- package/dist/helpers/twigWrapper/filters/index.mjs +1 -2
- package/dist/helpers/twigWrapper/templateRoots.mjs +3 -8
- package/dist/hooks/useNetwork.mjs +1 -4
- package/dist/index.d.ts +5 -19
- package/dist/index.mjs +3 -99
- package/dist/network/graphql/builder/Mutations/index.d.ts +1 -0
- package/dist/network/graphql/builder/Mutations/index.mjs +148 -148
- package/dist/network/graphql/builder/Queries/index.mjs +4 -4
- package/dist/network/index.mjs +8 -8
- package/dist/plugins/{bundle.mjs → bundle/bundle.mjs} +1 -1
- package/dist/plugins/bundle/index.d.ts +2 -0
- package/dist/plugins/bundle/index.mjs +1 -0
- package/dist/plugins/index.d.ts +1 -0
- package/dist/plugins/index.mjs +1 -0
- package/dist/plugins/{PluginsContext.d.ts → react/PluginsContext.d.ts} +1 -1
- package/dist/plugins/{PluginsContext.mjs → react/PluginsContext.mjs} +1 -1
- package/dist/plugins/react/index.d.ts +3 -0
- package/dist/plugins/react/index.mjs +1 -0
- package/dist/project/index.d.ts +8 -0
- package/dist/project/index.mjs +5 -0
- package/dist/project/layout.mjs +5 -5
- package/dist/project/{paths.d.ts → paths/index.d.ts} +8 -1
- package/dist/project/paths/index.mjs +4 -0
- package/dist/project/root.mjs +1 -1
- package/dist/queries/queryCache.mjs +1 -7
- package/dist/realtime/client.mjs +3 -12
- package/dist/schema/index.d.ts +5 -3
- package/dist/schema/index.mjs +11 -7
- package/dist/schema/{SchemaContext.d.ts → react/SchemaContext.d.ts} +1 -1
- package/dist/schema/{SchemaContext.mjs → react/SchemaContext.mjs} +1 -1
- package/dist/schema/react/index.d.ts +3 -0
- package/dist/schema/react/index.mjs +1 -0
- package/dist/server/actions/useActionsSync.mjs +1 -1
- package/dist/server/actions/useImagesSync.mjs +1 -1
- package/dist/server/actions/useRealtimeSync.mjs +1 -1
- package/dist/server/index.d.ts +3 -0
- package/dist/server/index.mjs +7 -4
- package/dist/server/rsc/refreshRsc.mjs +11 -11
- package/dist/server/rsc/useRscSync.mjs +1 -1
- package/dist/server/usePluginRoute.mjs +1 -1
- package/dist/state/runtimeStatePersist.mjs +9 -15
- package/dist/store/index.d.ts +1 -193
- package/dist/store/index.mjs +6 -9
- package/dist/store/renderSettings.mjs +1 -1
- package/dist/store/storeHooks.d.ts +193 -0
- package/dist/store/storeHooks.mjs +5 -0
- package/dist/store/tracing/tracingCollector.mjs +1 -5
- package/dist/style/fonts.mjs +17 -25
- package/dist/style/index.d.ts +2 -0
- package/dist/style/index.mjs +17 -15
- package/dist/style/react/index.d.ts +5 -0
- package/dist/style/react/index.mjs +3 -0
- package/dist/style/{useDisplayMode.d.ts → react/useDisplayMode.d.ts} +1 -1
- package/dist/style/{useDisplayMode.mjs → react/useDisplayMode.mjs} +2 -2
- package/dist/style/{useElementSize.mjs → react/useElementSize.mjs} +1 -1
- package/dist/style/stylePseudos.mjs +2 -5
- package/dist/style/styleTarget.mjs +6 -6
- package/dist/theme/ThemeProvider.mjs +2 -2
- package/dist/theme/cookie/index.d.ts +1 -0
- package/dist/theme/cookie/index.mjs +1 -0
- package/dist/theme/{themeCookie.d.ts → cookie/themeCookie.d.ts} +1 -1
- package/dist/theme/{themeCookie.mjs → cookie/themeCookie.mjs} +2 -2
- package/dist/theme/index.d.ts +2 -1
- package/dist/theme/index.mjs +5 -5
- package/dist/types/SchemaTypes.d.ts +2 -1
- package/dist/types/ServerTypes.d.ts +27 -11
- package/dist/websockets/index.mjs +1 -2
- package/package.json +21 -1607
- package/vite.config.ts +20 -4
- package/dist/auth/authFailureLink.d.ts +0 -9
- package/dist/auth/authFailureLink.mjs +0 -20
- package/dist/dataSource/hooks/index.d.ts +0 -4
- package/dist/dataSource/hooks/index.mjs +0 -3
- package/dist/dataSource/hooks/useRegisterSource.d.ts +0 -9
- package/dist/dataSource/hooks/useRegisterSource.mjs +0 -40
- package/dist/dataSource/hooks/useResolvedVariables.d.ts +0 -12
- package/dist/dataSource/hooks/useResolvedVariables.mjs +0 -28
- package/dist/flags/useFlagResolution.mjs +0 -43
- package/dist/helpers/stripTypename.d.ts +0 -15
- package/dist/helpers/stripTypename.mjs +0 -41
- package/dist/project/paths.mjs +0 -4
- package/dist/server/rsc/projectData.d.ts +0 -6
- package/dist/server/rsc/projectData.mjs +0 -4
- /package/dist/{helpers → dates}/formatDate.d.ts +0 -0
- /package/dist/{helpers → dates}/isDate.d.ts +0 -0
- /package/dist/plugins/{bundle.d.ts → bundle/bundle.d.ts} +0 -0
- /package/dist/style/{useElementSize.d.ts → react/useElementSize.d.ts} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useCommonStoreSync as e } from "../../store/
|
|
1
|
+
import { useCommonStoreSync as e } from "../../store/storeHooks.mjs";
|
|
2
2
|
//#region src/server/actions/useRealtimeSync.ts
|
|
3
3
|
var t = (t) => {
|
|
4
4
|
e(["realtime.endpoint", "realtime.transport"], [t?.realtimePath, t?.realtimeTransport]);
|
package/dist/server/index.d.ts
CHANGED
|
@@ -4,3 +4,6 @@ import { default as useRscRefresh } from './rsc/useRscRefresh';
|
|
|
4
4
|
import { default as useRscSync } from './rsc/useRscSync';
|
|
5
5
|
export * from './rsc/refreshRsc';
|
|
6
6
|
export { refreshRsc, useActionsSync, useRscRefresh, useRscSync };
|
|
7
|
+
export { default as usePluginRoute } from './usePluginRoute';
|
|
8
|
+
export { default as useImagesSync } from './actions/useImagesSync';
|
|
9
|
+
export { default as useRealtimeSync } from './actions/useRealtimeSync';
|
package/dist/server/index.mjs
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import e from "./actions/useActionsSync.mjs";
|
|
2
|
-
import t
|
|
3
|
-
import
|
|
4
|
-
import s from "./rsc/
|
|
5
|
-
|
|
2
|
+
import t from "./actions/useImagesSync.mjs";
|
|
3
|
+
import n from "./actions/useRealtimeSync.mjs";
|
|
4
|
+
import r, { cancelRsc as i, currentRscLocation as a, releaseRscRequests as o, rscDataPath as s } from "./rsc/refreshRsc.mjs";
|
|
5
|
+
import c from "./rsc/useRscRefresh.mjs";
|
|
6
|
+
import l from "./rsc/useRscSync.mjs";
|
|
7
|
+
import u from "./usePluginRoute.mjs";
|
|
8
|
+
export { i as cancelRsc, a as currentRscLocation, r as refreshRsc, o as releaseRscRequests, s as rscDataPath, e as useActionsSync, t as useImagesSync, u as usePluginRoute, n as useRealtimeSync, c as useRscRefresh, l as useRscSync };
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { authFailureFromResponse as e, reportAuthFailure as t } from "../../auth/failureChannel.mjs";
|
|
2
2
|
import { recordRenderActionRuns as n } from "../../store/actionRuns/actionRunsRecorder.mjs";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { getPaths as r, matchRoutePath as i } from "../../navigation/routes.mjs";
|
|
4
|
+
import { collectServerElements as a, hasServerElements as o } from "../../schema/serverElements.mjs";
|
|
5
5
|
//#region src/server/rsc/refreshRsc.ts
|
|
6
6
|
var s = (e, t, n) => {
|
|
7
7
|
if (!e) return;
|
|
8
|
-
let
|
|
9
|
-
return
|
|
10
|
-
}, c = (e, t, n,
|
|
11
|
-
let
|
|
12
|
-
return n.filter((e) =>
|
|
8
|
+
let a = e.pages.reduce((t, n) => (n in e.flat && (t[n] = e.flat[n]), t), {});
|
|
9
|
+
return i(r(a, e.pageFolders, n), t.split("?")[0], n).pageId;
|
|
10
|
+
}, c = (e, t, n, r) => {
|
|
11
|
+
let i = new Set(a(e, t, [...n], r).map(({ id: e }) => e));
|
|
12
|
+
return n.filter((e) => i.has(e));
|
|
13
13
|
}, l = (e) => `rsc.data.${e}`, u = () => typeof window > "u" ? "" : `${window.location.pathname}${window.location.search}`, d = "*", f = /* @__PURE__ */ new Map(), p = /* @__PURE__ */ new WeakMap(), m = () => ({
|
|
14
14
|
seq: 0,
|
|
15
15
|
inFlight: /* @__PURE__ */ new Set(),
|
|
@@ -51,15 +51,15 @@ var s = (e, t, n) => {
|
|
|
51
51
|
}
|
|
52
52
|
e.set("rsc.loaded", !0), e.set("rsc.stale", !1), e.set("rsc.location", i);
|
|
53
53
|
});
|
|
54
|
-
}, x = async (r,
|
|
54
|
+
}, x = async (r, i, a, { location: l, fresh: f = !1 } = {}) => {
|
|
55
55
|
let { enabled: p, endpoint: m } = r.get("rsc") ?? {};
|
|
56
56
|
if (!p || !m || typeof window > "u") return;
|
|
57
57
|
let v = l ?? u(), y = r.get("schema"), x = r.get("runtime.sources.auth"), S = l ? s(y, l, !!x?.details) : r.get("navigation.currentPageId"), C = l ? void 0 : r.get("runtime.sources.flags");
|
|
58
58
|
if (!y) return;
|
|
59
|
-
let w =
|
|
60
|
-
if (w ? !w.length : !
|
|
59
|
+
let w = i?.length ? c(y, S, i, C) : void 0;
|
|
60
|
+
if (w ? !w.length : !o(y, S, C)) return;
|
|
61
61
|
let T = new URLSearchParams({ location: v });
|
|
62
|
-
w?.length && T.set("ids", w.join(",")), Object.entries(
|
|
62
|
+
w?.length && T.set("ids", w.join(",")), Object.entries(a ?? {}).forEach(([e, t]) => T.set(e, t));
|
|
63
63
|
let E = `${m}?${T.toString()}`, D = h(r), O = [...D.inFlight].find((e) => e.url === E && (e.fresh || !f));
|
|
64
64
|
if (O) return O.promise;
|
|
65
65
|
D.inFlight.forEach((e) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useCommonStore as e, useCommonStoreSync as t } from "../../store/
|
|
1
|
+
import { useCommonStore as e, useCommonStoreSync as t } from "../../store/storeHooks.mjs";
|
|
2
2
|
import n, { currentRscLocation as r, releaseRscRequests as i } from "./refreshRsc.mjs";
|
|
3
3
|
import { useEffect as a, useId as o } from "react";
|
|
4
4
|
import { useStoreById as s } from "@plitzi/nexus/react";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { pluginRoutePath as e } from "../actions/functions.mjs";
|
|
2
|
-
import { useCommonStore as t } from "../store/
|
|
2
|
+
import { useCommonStore as t } from "../store/storeHooks.mjs";
|
|
3
3
|
import { useCallback as n } from "react";
|
|
4
4
|
//#region src/server/usePluginRoute.ts
|
|
5
5
|
var r = (r) => {
|
|
@@ -61,21 +61,15 @@ var l = /* @__PURE__ */ new Set([
|
|
|
61
61
|
h = t?.owner === y ? JSON.stringify(a(t.values, _)) : void 0;
|
|
62
62
|
}
|
|
63
63
|
let x = a(b, _), S = JSON.stringify(x);
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
storeName: "runtime",
|
|
74
|
-
path: "runtime.state",
|
|
75
|
-
prev: void 0,
|
|
76
|
-
next: x
|
|
77
|
-
});
|
|
78
|
-
}
|
|
64
|
+
S !== h && (h = S, Object.keys(x).length === 0 ? n(f) : s(f, {
|
|
65
|
+
owner: y,
|
|
66
|
+
values: x
|
|
67
|
+
}) === "too-large" && t.warning("store", `settings.paintedState holds more than a cookie can carry — the first paint uses the space's defaults for ${[..._].join(", ")}. Declare only what the first paint shows.`, {
|
|
68
|
+
storeName: "runtime",
|
|
69
|
+
path: "runtime.state",
|
|
70
|
+
prev: void 0,
|
|
71
|
+
next: x
|
|
72
|
+
}));
|
|
79
73
|
};
|
|
80
74
|
}, b = (t) => {
|
|
81
75
|
let n = c({
|