@uniformdev/canvas-next-rsc 19.170.1-alpha.0 → 19.170.1-alpha.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/dist/index.esm.js +26 -7
- package/dist/index.js +45 -27
- package/dist/index.mjs +26 -7
- package/package.json +11 -11
package/dist/index.esm.js
CHANGED
|
@@ -412,6 +412,7 @@ import {
|
|
|
412
412
|
CANVAS_ENRICHMENT_TAG_PARAM,
|
|
413
413
|
CANVAS_PERSONALIZE_TYPE,
|
|
414
414
|
CANVAS_TEST_TYPE,
|
|
415
|
+
CANVAS_VIZ_CONTROL_PARAM,
|
|
415
416
|
isComponentPlaceholderId,
|
|
416
417
|
walkNodeTree
|
|
417
418
|
} from "@uniformdev/canvas";
|
|
@@ -684,6 +685,13 @@ var TestServer = async (props) => {
|
|
|
684
685
|
return createElement2(Fragment2, void 0, [component, eventElement]);
|
|
685
686
|
};
|
|
686
687
|
|
|
688
|
+
// src/components/VisibilityRulesWrapper.tsx
|
|
689
|
+
import { VisibilityRulesWrapperClient } from "@uniformdev/canvas-next-rsc-client";
|
|
690
|
+
import React6 from "react";
|
|
691
|
+
var VisibilityRulesWrapper = (props) => {
|
|
692
|
+
return /* @__PURE__ */ React6.createElement(VisibilityRulesWrapperClient, { ...props });
|
|
693
|
+
};
|
|
694
|
+
|
|
687
695
|
// src/components/UniformComposition.ts
|
|
688
696
|
var UniformComposition = async ({
|
|
689
697
|
resolveComponent,
|
|
@@ -872,7 +880,7 @@ var resolveComponents = ({
|
|
|
872
880
|
parent = target.parent;
|
|
873
881
|
}
|
|
874
882
|
const resolved = components.map((component, componentIndex) => {
|
|
875
|
-
var _a, _b;
|
|
883
|
+
var _a, _b, _c;
|
|
876
884
|
const isServer = isServerComponent({
|
|
877
885
|
component,
|
|
878
886
|
serverContext
|
|
@@ -903,6 +911,7 @@ var resolveComponents = ({
|
|
|
903
911
|
const wrapInSuspense = systemSuspense || componentSuspense;
|
|
904
912
|
const parameters = (_a = component.parameters) != null ? _a : {};
|
|
905
913
|
const enrichmentTags = (_b = parameters[CANVAS_ENRICHMENT_TAG_PARAM]) == null ? void 0 : _b.value;
|
|
914
|
+
const visibilityRules = (_c = parameters[CANVAS_VIZ_CONTROL_PARAM]) == null ? void 0 : _c.value;
|
|
906
915
|
const key = `${slotName}-${componentIndex}-component`;
|
|
907
916
|
const componentProps = {
|
|
908
917
|
...Object.keys(parameters).reduce((acc, cur) => {
|
|
@@ -986,6 +995,16 @@ var resolveComponents = ({
|
|
|
986
995
|
}
|
|
987
996
|
childNode = elements;
|
|
988
997
|
}
|
|
998
|
+
if (visibilityRules) {
|
|
999
|
+
childNode = createElement3(
|
|
1000
|
+
VisibilityRulesWrapper,
|
|
1001
|
+
{
|
|
1002
|
+
key: `${slotName}-${componentIndex}-visibility`,
|
|
1003
|
+
parameter: visibilityRules
|
|
1004
|
+
},
|
|
1005
|
+
childNode
|
|
1006
|
+
);
|
|
1007
|
+
}
|
|
989
1008
|
return createElement3(
|
|
990
1009
|
Fragment3,
|
|
991
1010
|
{
|
|
@@ -1003,7 +1022,7 @@ import {
|
|
|
1003
1022
|
UniformScript
|
|
1004
1023
|
} from "@uniformdev/canvas-next-rsc-client";
|
|
1005
1024
|
import { Suspense as Suspense2 } from "react";
|
|
1006
|
-
import
|
|
1025
|
+
import React7 from "react";
|
|
1007
1026
|
var UniformContext = async ({
|
|
1008
1027
|
clientContextComponent,
|
|
1009
1028
|
children
|
|
@@ -1016,23 +1035,23 @@ var UniformContext = async ({
|
|
|
1016
1035
|
const serverConfig = getServerConfig();
|
|
1017
1036
|
const disableDevTools = ((_a = serverConfig.context) == null ? void 0 : _a.disableDevTools) || false;
|
|
1018
1037
|
const defaultConsent = serverConfig.defaultConsent || false;
|
|
1019
|
-
return /* @__PURE__ */
|
|
1038
|
+
return /* @__PURE__ */ React7.createElement(React7.Fragment, null, children, /* @__PURE__ */ React7.createElement(
|
|
1020
1039
|
ContextComponent,
|
|
1021
1040
|
{
|
|
1022
1041
|
manifest,
|
|
1023
1042
|
disableDevTools,
|
|
1024
1043
|
defaultConsent
|
|
1025
1044
|
}
|
|
1026
|
-
), /* @__PURE__ */
|
|
1045
|
+
), /* @__PURE__ */ React7.createElement(Suspense2, { fallback: /* @__PURE__ */ React7.createElement(React7.Fragment, null) }, /* @__PURE__ */ React7.createElement(UniformScript, null)));
|
|
1027
1046
|
};
|
|
1028
1047
|
|
|
1029
1048
|
// src/components/UniformPlayground.tsx
|
|
1030
1049
|
import { CANVAS_DRAFT_STATE as CANVAS_DRAFT_STATE3, CANVAS_EDITOR_STATE as CANVAS_EDITOR_STATE3 } from "@uniformdev/canvas";
|
|
1031
1050
|
import { notFound as notFound2 } from "next/navigation";
|
|
1032
|
-
import
|
|
1051
|
+
import React8 from "react";
|
|
1033
1052
|
var UniformPlayground = async ({ searchParams, ...rest }) => {
|
|
1034
1053
|
if (!isDraftModeEnabled({ searchParams })) {
|
|
1035
|
-
return /* @__PURE__ */
|
|
1054
|
+
return /* @__PURE__ */ React8.createElement("div", null, /* @__PURE__ */ React8.createElement("h1", null, "Playground is only available in draft mode"));
|
|
1036
1055
|
}
|
|
1037
1056
|
const id = searchParams["id"];
|
|
1038
1057
|
if (!id) {
|
|
@@ -1063,7 +1082,7 @@ var UniformPlayground = async ({ searchParams, ...rest }) => {
|
|
|
1063
1082
|
if (!composition) {
|
|
1064
1083
|
notFound2();
|
|
1065
1084
|
}
|
|
1066
|
-
return /* @__PURE__ */
|
|
1085
|
+
return /* @__PURE__ */ React8.createElement(
|
|
1067
1086
|
UniformComposition,
|
|
1068
1087
|
{
|
|
1069
1088
|
mode: "server",
|
package/dist/index.js
CHANGED
|
@@ -456,12 +456,12 @@ async function generateStaticParams() {
|
|
|
456
456
|
|
|
457
457
|
// src/components/UniformComposition.ts
|
|
458
458
|
var import_canvas7 = require("@uniformdev/canvas");
|
|
459
|
-
var
|
|
459
|
+
var import_canvas_next_rsc_client7 = require("@uniformdev/canvas-next-rsc-client");
|
|
460
460
|
var import_canvas_next_rsc_shared6 = require("@uniformdev/canvas-next-rsc-shared");
|
|
461
461
|
var import_core = require("@uniformdev/canvas-react/core");
|
|
462
462
|
var import_headers3 = require("next/headers");
|
|
463
463
|
var import_navigation = require("next/navigation");
|
|
464
|
-
var
|
|
464
|
+
var import_react9 = require("react");
|
|
465
465
|
|
|
466
466
|
// src/context/createServerUniformContext.ts
|
|
467
467
|
var import_canvas_next_rsc_shared = require("@uniformdev/canvas-next-rsc-shared");
|
|
@@ -715,6 +715,13 @@ var TestServer = async (props) => {
|
|
|
715
715
|
return (0, import_react7.createElement)(import_react7.Fragment, void 0, [component, eventElement]);
|
|
716
716
|
};
|
|
717
717
|
|
|
718
|
+
// src/components/VisibilityRulesWrapper.tsx
|
|
719
|
+
var import_canvas_next_rsc_client6 = require("@uniformdev/canvas-next-rsc-client");
|
|
720
|
+
var import_react8 = __toESM(require("react"));
|
|
721
|
+
var VisibilityRulesWrapper = (props) => {
|
|
722
|
+
return /* @__PURE__ */ import_react8.default.createElement(import_canvas_next_rsc_client6.VisibilityRulesWrapperClient, { ...props });
|
|
723
|
+
};
|
|
724
|
+
|
|
718
725
|
// src/components/UniformComposition.ts
|
|
719
726
|
var UniformComposition = async ({
|
|
720
727
|
resolveComponent,
|
|
@@ -777,7 +784,7 @@ var UniformComposition = async ({
|
|
|
777
784
|
if (props.mode === "server") {
|
|
778
785
|
const headersValue = (0, import_headers3.headers)();
|
|
779
786
|
const missingQuirkValue = "unknown";
|
|
780
|
-
transfer = (0,
|
|
787
|
+
transfer = (0, import_react9.createElement)(ContextUpdateTransfer, {
|
|
781
788
|
serverContext,
|
|
782
789
|
update: {
|
|
783
790
|
params: props.params,
|
|
@@ -794,11 +801,11 @@ var UniformComposition = async ({
|
|
|
794
801
|
}
|
|
795
802
|
});
|
|
796
803
|
} else if (props.mode === "static") {
|
|
797
|
-
transfer = (0,
|
|
804
|
+
transfer = (0, import_react9.createElement)(ContextUpdateTrigger, {
|
|
798
805
|
path
|
|
799
806
|
});
|
|
800
807
|
}
|
|
801
|
-
return (0,
|
|
808
|
+
return (0, import_react9.createElement)(import_react9.Fragment, void 0, transfer, resolved);
|
|
802
809
|
};
|
|
803
810
|
var isServerComponent = ({
|
|
804
811
|
component,
|
|
@@ -825,7 +832,7 @@ var resolveSystemComponent = ({
|
|
|
825
832
|
suspense = server && ((_a = config.ppr) == null ? void 0 : _a.personalizationSuspense);
|
|
826
833
|
}
|
|
827
834
|
if (component.type === import_canvas7.CANVAS_TEST_TYPE) {
|
|
828
|
-
resolved = server ? TestServer :
|
|
835
|
+
resolved = server ? TestServer : import_canvas_next_rsc_client7.TestClient;
|
|
829
836
|
suspense = server && ((_b = config.ppr) == null ? void 0 : _b.testSuspense);
|
|
830
837
|
}
|
|
831
838
|
return {
|
|
@@ -903,7 +910,7 @@ var resolveComponents = ({
|
|
|
903
910
|
parent = target.parent;
|
|
904
911
|
}
|
|
905
912
|
const resolved = components.map((component, componentIndex) => {
|
|
906
|
-
var _a, _b;
|
|
913
|
+
var _a, _b, _c;
|
|
907
914
|
const isServer = isServerComponent({
|
|
908
915
|
component,
|
|
909
916
|
serverContext
|
|
@@ -934,6 +941,7 @@ var resolveComponents = ({
|
|
|
934
941
|
const wrapInSuspense = systemSuspense || componentSuspense;
|
|
935
942
|
const parameters = (_a = component.parameters) != null ? _a : {};
|
|
936
943
|
const enrichmentTags = (_b = parameters[import_canvas7.CANVAS_ENRICHMENT_TAG_PARAM]) == null ? void 0 : _b.value;
|
|
944
|
+
const visibilityRules = (_c = parameters[import_canvas7.CANVAS_VIZ_CONTROL_PARAM]) == null ? void 0 : _c.value;
|
|
937
945
|
const key = `${slotName}-${componentIndex}-component`;
|
|
938
946
|
const componentProps = {
|
|
939
947
|
...Object.keys(parameters).reduce((acc, cur) => {
|
|
@@ -949,20 +957,20 @@ var resolveComponents = ({
|
|
|
949
957
|
};
|
|
950
958
|
let element = null;
|
|
951
959
|
if (wrapInSuspense) {
|
|
952
|
-
element = (0,
|
|
953
|
-
|
|
960
|
+
element = (0, import_react9.createElement)(
|
|
961
|
+
import_react9.Suspense,
|
|
954
962
|
{
|
|
955
963
|
key,
|
|
956
|
-
fallback: typeof wrapInSuspense === "boolean" || typeof (wrapInSuspense == null ? void 0 : wrapInSuspense.fallback) === "undefined" ? void 0 : (0,
|
|
964
|
+
fallback: typeof wrapInSuspense === "boolean" || typeof (wrapInSuspense == null ? void 0 : wrapInSuspense.fallback) === "undefined" ? void 0 : (0, import_react9.createElement)(wrapInSuspense.fallback)
|
|
957
965
|
},
|
|
958
|
-
(0,
|
|
966
|
+
(0, import_react9.createElement)(resolvedComponent, componentProps)
|
|
959
967
|
);
|
|
960
968
|
} else {
|
|
961
|
-
element = (0,
|
|
969
|
+
element = (0, import_react9.createElement)(resolvedComponent, { ...componentProps, key });
|
|
962
970
|
}
|
|
963
971
|
let tagElement = null;
|
|
964
972
|
if (enrichmentTags == null ? void 0 : enrichmentTags.length) {
|
|
965
|
-
tagElement = (0,
|
|
973
|
+
tagElement = (0, import_react9.createElement)(ContextUpdateTransfer, {
|
|
966
974
|
key: `${slotName}-${componentIndex}-tags`,
|
|
967
975
|
update: {
|
|
968
976
|
enrichments: enrichmentTags
|
|
@@ -977,7 +985,7 @@ var resolveComponents = ({
|
|
|
977
985
|
elements.push(tagElement);
|
|
978
986
|
}
|
|
979
987
|
const isPlaceholder = (0, import_canvas7.isComponentPlaceholderId)(component == null ? void 0 : component._id);
|
|
980
|
-
childNode = (0,
|
|
988
|
+
childNode = (0, import_react9.createElement)(
|
|
981
989
|
import_core.PureContextualEditingComponentWrapper,
|
|
982
990
|
{
|
|
983
991
|
key: `${slotName}-${componentIndex}-wrapper`,
|
|
@@ -996,8 +1004,8 @@ var resolveComponents = ({
|
|
|
996
1004
|
if (tagElement) {
|
|
997
1005
|
elements.push(tagElement);
|
|
998
1006
|
}
|
|
999
|
-
childNode = (0,
|
|
1000
|
-
|
|
1007
|
+
childNode = (0, import_react9.createElement)(
|
|
1008
|
+
import_canvas_next_rsc_client7.ClientContextualEditingComponentWrapper,
|
|
1001
1009
|
{
|
|
1002
1010
|
key: `${slotName}-${componentIndex}-wrapper`,
|
|
1003
1011
|
isPlaceholder: false,
|
|
@@ -1017,8 +1025,18 @@ var resolveComponents = ({
|
|
|
1017
1025
|
}
|
|
1018
1026
|
childNode = elements;
|
|
1019
1027
|
}
|
|
1020
|
-
|
|
1021
|
-
|
|
1028
|
+
if (visibilityRules) {
|
|
1029
|
+
childNode = (0, import_react9.createElement)(
|
|
1030
|
+
VisibilityRulesWrapper,
|
|
1031
|
+
{
|
|
1032
|
+
key: `${slotName}-${componentIndex}-visibility`,
|
|
1033
|
+
parameter: visibilityRules
|
|
1034
|
+
},
|
|
1035
|
+
childNode
|
|
1036
|
+
);
|
|
1037
|
+
}
|
|
1038
|
+
return (0, import_react9.createElement)(
|
|
1039
|
+
import_react9.Fragment,
|
|
1022
1040
|
{
|
|
1023
1041
|
key: !isRoot ? `${slotName}-${componentIndex}` : void 0
|
|
1024
1042
|
},
|
|
@@ -1029,9 +1047,9 @@ var resolveComponents = ({
|
|
|
1029
1047
|
};
|
|
1030
1048
|
|
|
1031
1049
|
// src/components/UniformContext.tsx
|
|
1032
|
-
var
|
|
1033
|
-
var
|
|
1034
|
-
var
|
|
1050
|
+
var import_canvas_next_rsc_client8 = require("@uniformdev/canvas-next-rsc-client");
|
|
1051
|
+
var import_react10 = require("react");
|
|
1052
|
+
var import_react11 = __toESM(require("react"));
|
|
1035
1053
|
var UniformContext = async ({
|
|
1036
1054
|
clientContextComponent,
|
|
1037
1055
|
children
|
|
@@ -1040,27 +1058,27 @@ var UniformContext = async ({
|
|
|
1040
1058
|
const manifest = await getManifest({
|
|
1041
1059
|
searchParams: {}
|
|
1042
1060
|
});
|
|
1043
|
-
const ContextComponent = clientContextComponent ||
|
|
1061
|
+
const ContextComponent = clientContextComponent || import_canvas_next_rsc_client8.DefaultUniformClientContext;
|
|
1044
1062
|
const serverConfig = getServerConfig();
|
|
1045
1063
|
const disableDevTools = ((_a = serverConfig.context) == null ? void 0 : _a.disableDevTools) || false;
|
|
1046
1064
|
const defaultConsent = serverConfig.defaultConsent || false;
|
|
1047
|
-
return /* @__PURE__ */
|
|
1065
|
+
return /* @__PURE__ */ import_react11.default.createElement(import_react11.default.Fragment, null, children, /* @__PURE__ */ import_react11.default.createElement(
|
|
1048
1066
|
ContextComponent,
|
|
1049
1067
|
{
|
|
1050
1068
|
manifest,
|
|
1051
1069
|
disableDevTools,
|
|
1052
1070
|
defaultConsent
|
|
1053
1071
|
}
|
|
1054
|
-
), /* @__PURE__ */
|
|
1072
|
+
), /* @__PURE__ */ import_react11.default.createElement(import_react10.Suspense, { fallback: /* @__PURE__ */ import_react11.default.createElement(import_react11.default.Fragment, null) }, /* @__PURE__ */ import_react11.default.createElement(import_canvas_next_rsc_client8.UniformScript, null)));
|
|
1055
1073
|
};
|
|
1056
1074
|
|
|
1057
1075
|
// src/components/UniformPlayground.tsx
|
|
1058
1076
|
var import_canvas8 = require("@uniformdev/canvas");
|
|
1059
1077
|
var import_navigation2 = require("next/navigation");
|
|
1060
|
-
var
|
|
1078
|
+
var import_react12 = __toESM(require("react"));
|
|
1061
1079
|
var UniformPlayground = async ({ searchParams, ...rest }) => {
|
|
1062
1080
|
if (!isDraftModeEnabled({ searchParams })) {
|
|
1063
|
-
return /* @__PURE__ */
|
|
1081
|
+
return /* @__PURE__ */ import_react12.default.createElement("div", null, /* @__PURE__ */ import_react12.default.createElement("h1", null, "Playground is only available in draft mode"));
|
|
1064
1082
|
}
|
|
1065
1083
|
const id = searchParams["id"];
|
|
1066
1084
|
if (!id) {
|
|
@@ -1091,7 +1109,7 @@ var UniformPlayground = async ({ searchParams, ...rest }) => {
|
|
|
1091
1109
|
if (!composition) {
|
|
1092
1110
|
(0, import_navigation2.notFound)();
|
|
1093
1111
|
}
|
|
1094
|
-
return /* @__PURE__ */
|
|
1112
|
+
return /* @__PURE__ */ import_react12.default.createElement(
|
|
1095
1113
|
UniformComposition,
|
|
1096
1114
|
{
|
|
1097
1115
|
mode: "server",
|
package/dist/index.mjs
CHANGED
|
@@ -412,6 +412,7 @@ import {
|
|
|
412
412
|
CANVAS_ENRICHMENT_TAG_PARAM,
|
|
413
413
|
CANVAS_PERSONALIZE_TYPE,
|
|
414
414
|
CANVAS_TEST_TYPE,
|
|
415
|
+
CANVAS_VIZ_CONTROL_PARAM,
|
|
415
416
|
isComponentPlaceholderId,
|
|
416
417
|
walkNodeTree
|
|
417
418
|
} from "@uniformdev/canvas";
|
|
@@ -684,6 +685,13 @@ var TestServer = async (props) => {
|
|
|
684
685
|
return createElement2(Fragment2, void 0, [component, eventElement]);
|
|
685
686
|
};
|
|
686
687
|
|
|
688
|
+
// src/components/VisibilityRulesWrapper.tsx
|
|
689
|
+
import { VisibilityRulesWrapperClient } from "@uniformdev/canvas-next-rsc-client";
|
|
690
|
+
import React6 from "react";
|
|
691
|
+
var VisibilityRulesWrapper = (props) => {
|
|
692
|
+
return /* @__PURE__ */ React6.createElement(VisibilityRulesWrapperClient, { ...props });
|
|
693
|
+
};
|
|
694
|
+
|
|
687
695
|
// src/components/UniformComposition.ts
|
|
688
696
|
var UniformComposition = async ({
|
|
689
697
|
resolveComponent,
|
|
@@ -872,7 +880,7 @@ var resolveComponents = ({
|
|
|
872
880
|
parent = target.parent;
|
|
873
881
|
}
|
|
874
882
|
const resolved = components.map((component, componentIndex) => {
|
|
875
|
-
var _a, _b;
|
|
883
|
+
var _a, _b, _c;
|
|
876
884
|
const isServer = isServerComponent({
|
|
877
885
|
component,
|
|
878
886
|
serverContext
|
|
@@ -903,6 +911,7 @@ var resolveComponents = ({
|
|
|
903
911
|
const wrapInSuspense = systemSuspense || componentSuspense;
|
|
904
912
|
const parameters = (_a = component.parameters) != null ? _a : {};
|
|
905
913
|
const enrichmentTags = (_b = parameters[CANVAS_ENRICHMENT_TAG_PARAM]) == null ? void 0 : _b.value;
|
|
914
|
+
const visibilityRules = (_c = parameters[CANVAS_VIZ_CONTROL_PARAM]) == null ? void 0 : _c.value;
|
|
906
915
|
const key = `${slotName}-${componentIndex}-component`;
|
|
907
916
|
const componentProps = {
|
|
908
917
|
...Object.keys(parameters).reduce((acc, cur) => {
|
|
@@ -986,6 +995,16 @@ var resolveComponents = ({
|
|
|
986
995
|
}
|
|
987
996
|
childNode = elements;
|
|
988
997
|
}
|
|
998
|
+
if (visibilityRules) {
|
|
999
|
+
childNode = createElement3(
|
|
1000
|
+
VisibilityRulesWrapper,
|
|
1001
|
+
{
|
|
1002
|
+
key: `${slotName}-${componentIndex}-visibility`,
|
|
1003
|
+
parameter: visibilityRules
|
|
1004
|
+
},
|
|
1005
|
+
childNode
|
|
1006
|
+
);
|
|
1007
|
+
}
|
|
989
1008
|
return createElement3(
|
|
990
1009
|
Fragment3,
|
|
991
1010
|
{
|
|
@@ -1003,7 +1022,7 @@ import {
|
|
|
1003
1022
|
UniformScript
|
|
1004
1023
|
} from "@uniformdev/canvas-next-rsc-client";
|
|
1005
1024
|
import { Suspense as Suspense2 } from "react";
|
|
1006
|
-
import
|
|
1025
|
+
import React7 from "react";
|
|
1007
1026
|
var UniformContext = async ({
|
|
1008
1027
|
clientContextComponent,
|
|
1009
1028
|
children
|
|
@@ -1016,23 +1035,23 @@ var UniformContext = async ({
|
|
|
1016
1035
|
const serverConfig = getServerConfig();
|
|
1017
1036
|
const disableDevTools = ((_a = serverConfig.context) == null ? void 0 : _a.disableDevTools) || false;
|
|
1018
1037
|
const defaultConsent = serverConfig.defaultConsent || false;
|
|
1019
|
-
return /* @__PURE__ */
|
|
1038
|
+
return /* @__PURE__ */ React7.createElement(React7.Fragment, null, children, /* @__PURE__ */ React7.createElement(
|
|
1020
1039
|
ContextComponent,
|
|
1021
1040
|
{
|
|
1022
1041
|
manifest,
|
|
1023
1042
|
disableDevTools,
|
|
1024
1043
|
defaultConsent
|
|
1025
1044
|
}
|
|
1026
|
-
), /* @__PURE__ */
|
|
1045
|
+
), /* @__PURE__ */ React7.createElement(Suspense2, { fallback: /* @__PURE__ */ React7.createElement(React7.Fragment, null) }, /* @__PURE__ */ React7.createElement(UniformScript, null)));
|
|
1027
1046
|
};
|
|
1028
1047
|
|
|
1029
1048
|
// src/components/UniformPlayground.tsx
|
|
1030
1049
|
import { CANVAS_DRAFT_STATE as CANVAS_DRAFT_STATE3, CANVAS_EDITOR_STATE as CANVAS_EDITOR_STATE3 } from "@uniformdev/canvas";
|
|
1031
1050
|
import { notFound as notFound2 } from "next/navigation";
|
|
1032
|
-
import
|
|
1051
|
+
import React8 from "react";
|
|
1033
1052
|
var UniformPlayground = async ({ searchParams, ...rest }) => {
|
|
1034
1053
|
if (!isDraftModeEnabled({ searchParams })) {
|
|
1035
|
-
return /* @__PURE__ */
|
|
1054
|
+
return /* @__PURE__ */ React8.createElement("div", null, /* @__PURE__ */ React8.createElement("h1", null, "Playground is only available in draft mode"));
|
|
1036
1055
|
}
|
|
1037
1056
|
const id = searchParams["id"];
|
|
1038
1057
|
if (!id) {
|
|
@@ -1063,7 +1082,7 @@ var UniformPlayground = async ({ searchParams, ...rest }) => {
|
|
|
1063
1082
|
if (!composition) {
|
|
1064
1083
|
notFound2();
|
|
1065
1084
|
}
|
|
1066
|
-
return /* @__PURE__ */
|
|
1085
|
+
return /* @__PURE__ */ React8.createElement(
|
|
1067
1086
|
UniformComposition,
|
|
1068
1087
|
{
|
|
1069
1088
|
mode: "server",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/canvas-next-rsc",
|
|
3
|
-
"version": "19.170.1-alpha.
|
|
3
|
+
"version": "19.170.1-alpha.1+51ca6d7af1",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "tsup",
|
|
@@ -61,15 +61,15 @@
|
|
|
61
61
|
"react-dom": "18.2.0"
|
|
62
62
|
},
|
|
63
63
|
"dependencies": {
|
|
64
|
-
"@uniformdev/canvas": "19.170.1-alpha.
|
|
65
|
-
"@uniformdev/canvas-next-rsc-client": "^19.170.1-alpha.
|
|
66
|
-
"@uniformdev/canvas-next-rsc-shared": "^19.170.1-alpha.
|
|
67
|
-
"@uniformdev/canvas-react": "19.170.1-alpha.
|
|
68
|
-
"@uniformdev/context": "19.170.1-alpha.
|
|
69
|
-
"@uniformdev/project-map": "19.170.1-alpha.
|
|
70
|
-
"@uniformdev/redirect": "19.170.1-alpha.
|
|
71
|
-
"@uniformdev/richtext": "19.170.1-alpha.
|
|
72
|
-
"@uniformdev/webhooks": "19.170.1-alpha.
|
|
64
|
+
"@uniformdev/canvas": "19.170.1-alpha.1+51ca6d7af1",
|
|
65
|
+
"@uniformdev/canvas-next-rsc-client": "^19.170.1-alpha.1+51ca6d7af1",
|
|
66
|
+
"@uniformdev/canvas-next-rsc-shared": "^19.170.1-alpha.1+51ca6d7af1",
|
|
67
|
+
"@uniformdev/canvas-react": "19.170.1-alpha.1+51ca6d7af1",
|
|
68
|
+
"@uniformdev/context": "19.170.1-alpha.1+51ca6d7af1",
|
|
69
|
+
"@uniformdev/project-map": "19.170.1-alpha.1+51ca6d7af1",
|
|
70
|
+
"@uniformdev/redirect": "19.170.1-alpha.1+51ca6d7af1",
|
|
71
|
+
"@uniformdev/richtext": "19.170.1-alpha.1+51ca6d7af1",
|
|
72
|
+
"@uniformdev/webhooks": "19.170.1-alpha.1+51ca6d7af1",
|
|
73
73
|
"@vercel/edge-config": "^0.4.0",
|
|
74
74
|
"encoding": "^0.1.13",
|
|
75
75
|
"server-only": "^0.0.1",
|
|
@@ -86,5 +86,5 @@
|
|
|
86
86
|
"publishConfig": {
|
|
87
87
|
"access": "public"
|
|
88
88
|
},
|
|
89
|
-
"gitHead": "
|
|
89
|
+
"gitHead": "51ca6d7af193fed44b1e2b0412c99e0c6cc85c2c"
|
|
90
90
|
}
|