@uniformdev/canvas-next-rsc 20.7.1-alpha.4 → 20.8.2-alpha.15
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 +16 -10
- package/dist/index.js +20 -14
- package/dist/index.mjs +16 -10
- package/package.json +13 -12
package/dist/index.esm.js
CHANGED
|
@@ -638,19 +638,24 @@ var ContextUpdateTrigger = ({ path }) => {
|
|
|
638
638
|
|
|
639
639
|
// src/components/PersonalizeClientWrapper.tsx
|
|
640
640
|
import { PersonalizeClient } from "@uniformdev/canvas-next-rsc-client";
|
|
641
|
-
import { runPersonalization } from "@uniformdev/canvas-next-rsc-shared";
|
|
642
641
|
import React3 from "react";
|
|
643
642
|
var PersonalizeClientWrapper = (props) => {
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
643
|
+
return /* @__PURE__ */ React3.createElement(
|
|
644
|
+
PersonalizeClient,
|
|
645
|
+
{
|
|
646
|
+
component: props.component,
|
|
647
|
+
count: props.count,
|
|
648
|
+
slots: props.slots,
|
|
649
|
+
trackingEventName: props.trackingEventName,
|
|
650
|
+
algorithm: props.algorithm,
|
|
651
|
+
indexes: []
|
|
652
|
+
}
|
|
653
|
+
);
|
|
649
654
|
};
|
|
650
655
|
|
|
651
656
|
// src/components/PersonalizeServer.ts
|
|
652
657
|
import { CANVAS_PERSONALIZE_SLOT } from "@uniformdev/canvas";
|
|
653
|
-
import { runPersonalization
|
|
658
|
+
import { runPersonalization } from "@uniformdev/canvas-next-rsc-shared";
|
|
654
659
|
import { unstable_noStore as noStore } from "next/cache";
|
|
655
660
|
import { createElement, Fragment } from "react";
|
|
656
661
|
|
|
@@ -667,7 +672,7 @@ var PersonalizeServer = (props) => {
|
|
|
667
672
|
if ((_a = getServerConfig().ppr) == null ? void 0 : _a.personalizationSuspense) {
|
|
668
673
|
noStore();
|
|
669
674
|
}
|
|
670
|
-
const { indexes, event } =
|
|
675
|
+
const { indexes, event } = runPersonalization(props);
|
|
671
676
|
const slot = (_b = props.slots) == null ? void 0 : _b[CANVAS_PERSONALIZE_SLOT];
|
|
672
677
|
const components = indexes.map((index) => {
|
|
673
678
|
const component = slot.items[index];
|
|
@@ -682,10 +687,10 @@ var PersonalizeServer = (props) => {
|
|
|
682
687
|
|
|
683
688
|
// src/components/PersonalizeServerHybrid.tsx
|
|
684
689
|
import { PersonalizeClient as PersonalizeClient2 } from "@uniformdev/canvas-next-rsc-client";
|
|
685
|
-
import { runPersonalization as
|
|
690
|
+
import { runPersonalization as runPersonalization2 } from "@uniformdev/canvas-next-rsc-shared";
|
|
686
691
|
import React5 from "react";
|
|
687
692
|
var PersonalizeServerHybrid = (props) => {
|
|
688
|
-
const { indexes } =
|
|
693
|
+
const { indexes } = runPersonalization2(props);
|
|
689
694
|
return /* @__PURE__ */ React5.createElement(
|
|
690
695
|
PersonalizeClient2,
|
|
691
696
|
{
|
|
@@ -693,6 +698,7 @@ var PersonalizeServerHybrid = (props) => {
|
|
|
693
698
|
count: props.count,
|
|
694
699
|
slots: props.slots,
|
|
695
700
|
trackingEventName: props.trackingEventName,
|
|
701
|
+
algorithm: props.algorithm,
|
|
696
702
|
indexes
|
|
697
703
|
}
|
|
698
704
|
);
|
package/dist/index.js
CHANGED
|
@@ -457,7 +457,7 @@ async function generateStaticParams() {
|
|
|
457
457
|
// src/components/UniformComposition.ts
|
|
458
458
|
var import_canvas8 = require("@uniformdev/canvas");
|
|
459
459
|
var import_canvas_next_rsc_client8 = require("@uniformdev/canvas-next-rsc-client");
|
|
460
|
-
var
|
|
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");
|
|
@@ -666,19 +666,24 @@ var ContextUpdateTrigger = ({ path }) => {
|
|
|
666
666
|
|
|
667
667
|
// src/components/PersonalizeClientWrapper.tsx
|
|
668
668
|
var import_canvas_next_rsc_client3 = require("@uniformdev/canvas-next-rsc-client");
|
|
669
|
-
var import_canvas_next_rsc_shared3 = require("@uniformdev/canvas-next-rsc-shared");
|
|
670
669
|
var import_react3 = __toESM(require("react"));
|
|
671
670
|
var PersonalizeClientWrapper = (props) => {
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
671
|
+
return /* @__PURE__ */ import_react3.default.createElement(
|
|
672
|
+
import_canvas_next_rsc_client3.PersonalizeClient,
|
|
673
|
+
{
|
|
674
|
+
component: props.component,
|
|
675
|
+
count: props.count,
|
|
676
|
+
slots: props.slots,
|
|
677
|
+
trackingEventName: props.trackingEventName,
|
|
678
|
+
algorithm: props.algorithm,
|
|
679
|
+
indexes: []
|
|
680
|
+
}
|
|
681
|
+
);
|
|
677
682
|
};
|
|
678
683
|
|
|
679
684
|
// src/components/PersonalizeServer.ts
|
|
680
685
|
var import_canvas5 = require("@uniformdev/canvas");
|
|
681
|
-
var
|
|
686
|
+
var import_canvas_next_rsc_shared3 = require("@uniformdev/canvas-next-rsc-shared");
|
|
682
687
|
var import_cache = require("next/cache");
|
|
683
688
|
var import_react5 = require("react");
|
|
684
689
|
|
|
@@ -695,7 +700,7 @@ var PersonalizeServer = (props) => {
|
|
|
695
700
|
if ((_a = getServerConfig().ppr) == null ? void 0 : _a.personalizationSuspense) {
|
|
696
701
|
(0, import_cache.unstable_noStore)();
|
|
697
702
|
}
|
|
698
|
-
const { indexes, event } = (0,
|
|
703
|
+
const { indexes, event } = (0, import_canvas_next_rsc_shared3.runPersonalization)(props);
|
|
699
704
|
const slot = (_b = props.slots) == null ? void 0 : _b[import_canvas5.CANVAS_PERSONALIZE_SLOT];
|
|
700
705
|
const components = indexes.map((index) => {
|
|
701
706
|
const component = slot.items[index];
|
|
@@ -710,10 +715,10 @@ var PersonalizeServer = (props) => {
|
|
|
710
715
|
|
|
711
716
|
// src/components/PersonalizeServerHybrid.tsx
|
|
712
717
|
var import_canvas_next_rsc_client5 = require("@uniformdev/canvas-next-rsc-client");
|
|
713
|
-
var
|
|
718
|
+
var import_canvas_next_rsc_shared4 = require("@uniformdev/canvas-next-rsc-shared");
|
|
714
719
|
var import_react6 = __toESM(require("react"));
|
|
715
720
|
var PersonalizeServerHybrid = (props) => {
|
|
716
|
-
const { indexes } = (0,
|
|
721
|
+
const { indexes } = (0, import_canvas_next_rsc_shared4.runPersonalization)(props);
|
|
717
722
|
return /* @__PURE__ */ import_react6.default.createElement(
|
|
718
723
|
import_canvas_next_rsc_client5.PersonalizeClient,
|
|
719
724
|
{
|
|
@@ -721,6 +726,7 @@ var PersonalizeServerHybrid = (props) => {
|
|
|
721
726
|
count: props.count,
|
|
722
727
|
slots: props.slots,
|
|
723
728
|
trackingEventName: props.trackingEventName,
|
|
729
|
+
algorithm: props.algorithm,
|
|
724
730
|
indexes
|
|
725
731
|
}
|
|
726
732
|
);
|
|
@@ -728,7 +734,7 @@ var PersonalizeServerHybrid = (props) => {
|
|
|
728
734
|
|
|
729
735
|
// src/components/TestServer.ts
|
|
730
736
|
var import_canvas6 = require("@uniformdev/canvas");
|
|
731
|
-
var
|
|
737
|
+
var import_canvas_next_rsc_shared5 = require("@uniformdev/canvas-next-rsc-shared");
|
|
732
738
|
var import_cache2 = require("next/cache");
|
|
733
739
|
var import_react8 = require("react");
|
|
734
740
|
|
|
@@ -745,7 +751,7 @@ var TestServer = async (props) => {
|
|
|
745
751
|
if ((_a = getServerConfig().ppr) == null ? void 0 : _a.testSuspense) {
|
|
746
752
|
(0, import_cache2.unstable_noStore)();
|
|
747
753
|
}
|
|
748
|
-
const { index, event } = (0,
|
|
754
|
+
const { index, event } = (0, import_canvas_next_rsc_shared5.runTest)(props);
|
|
749
755
|
if (index === null || event === null) {
|
|
750
756
|
return null;
|
|
751
757
|
}
|
|
@@ -792,7 +798,7 @@ var UniformComposition = async ({
|
|
|
792
798
|
});
|
|
793
799
|
}
|
|
794
800
|
const awaitedParams = await props.params;
|
|
795
|
-
const { value: path } = (0,
|
|
801
|
+
const { value: path } = (0, import_canvas_next_rsc_shared6.resolvePath)({
|
|
796
802
|
params: awaitedParams
|
|
797
803
|
});
|
|
798
804
|
if (!route || route.type === "notFound") {
|
package/dist/index.mjs
CHANGED
|
@@ -638,19 +638,24 @@ var ContextUpdateTrigger = ({ path }) => {
|
|
|
638
638
|
|
|
639
639
|
// src/components/PersonalizeClientWrapper.tsx
|
|
640
640
|
import { PersonalizeClient } from "@uniformdev/canvas-next-rsc-client";
|
|
641
|
-
import { runPersonalization } from "@uniformdev/canvas-next-rsc-shared";
|
|
642
641
|
import React3 from "react";
|
|
643
642
|
var PersonalizeClientWrapper = (props) => {
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
643
|
+
return /* @__PURE__ */ React3.createElement(
|
|
644
|
+
PersonalizeClient,
|
|
645
|
+
{
|
|
646
|
+
component: props.component,
|
|
647
|
+
count: props.count,
|
|
648
|
+
slots: props.slots,
|
|
649
|
+
trackingEventName: props.trackingEventName,
|
|
650
|
+
algorithm: props.algorithm,
|
|
651
|
+
indexes: []
|
|
652
|
+
}
|
|
653
|
+
);
|
|
649
654
|
};
|
|
650
655
|
|
|
651
656
|
// src/components/PersonalizeServer.ts
|
|
652
657
|
import { CANVAS_PERSONALIZE_SLOT } from "@uniformdev/canvas";
|
|
653
|
-
import { runPersonalization
|
|
658
|
+
import { runPersonalization } from "@uniformdev/canvas-next-rsc-shared";
|
|
654
659
|
import { unstable_noStore as noStore } from "next/cache";
|
|
655
660
|
import { createElement, Fragment } from "react";
|
|
656
661
|
|
|
@@ -667,7 +672,7 @@ var PersonalizeServer = (props) => {
|
|
|
667
672
|
if ((_a = getServerConfig().ppr) == null ? void 0 : _a.personalizationSuspense) {
|
|
668
673
|
noStore();
|
|
669
674
|
}
|
|
670
|
-
const { indexes, event } =
|
|
675
|
+
const { indexes, event } = runPersonalization(props);
|
|
671
676
|
const slot = (_b = props.slots) == null ? void 0 : _b[CANVAS_PERSONALIZE_SLOT];
|
|
672
677
|
const components = indexes.map((index) => {
|
|
673
678
|
const component = slot.items[index];
|
|
@@ -682,10 +687,10 @@ var PersonalizeServer = (props) => {
|
|
|
682
687
|
|
|
683
688
|
// src/components/PersonalizeServerHybrid.tsx
|
|
684
689
|
import { PersonalizeClient as PersonalizeClient2 } from "@uniformdev/canvas-next-rsc-client";
|
|
685
|
-
import { runPersonalization as
|
|
690
|
+
import { runPersonalization as runPersonalization2 } from "@uniformdev/canvas-next-rsc-shared";
|
|
686
691
|
import React5 from "react";
|
|
687
692
|
var PersonalizeServerHybrid = (props) => {
|
|
688
|
-
const { indexes } =
|
|
693
|
+
const { indexes } = runPersonalization2(props);
|
|
689
694
|
return /* @__PURE__ */ React5.createElement(
|
|
690
695
|
PersonalizeClient2,
|
|
691
696
|
{
|
|
@@ -693,6 +698,7 @@ var PersonalizeServerHybrid = (props) => {
|
|
|
693
698
|
count: props.count,
|
|
694
699
|
slots: props.slots,
|
|
695
700
|
trackingEventName: props.trackingEventName,
|
|
701
|
+
algorithm: props.algorithm,
|
|
696
702
|
indexes
|
|
697
703
|
}
|
|
698
704
|
);
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/canvas-next-rsc",
|
|
3
|
-
"version": "20.
|
|
3
|
+
"version": "20.8.2-alpha.15+b4a01d41ab",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "tsup",
|
|
7
7
|
"dev": "tsup --watch",
|
|
8
8
|
"lint": "eslint \"src/**/*.{ts,tsx}\" --fix",
|
|
9
|
-
"test": "jest --maxWorkers=1 --passWithNoTests"
|
|
9
|
+
"test": "jest --maxWorkers=1 --passWithNoTests",
|
|
10
|
+
"document": "api-extractor run --local"
|
|
10
11
|
},
|
|
11
12
|
"sideEffects": false,
|
|
12
13
|
"main": "dist/index.js",
|
|
@@ -61,15 +62,15 @@
|
|
|
61
62
|
"react-dom": "18.3.1"
|
|
62
63
|
},
|
|
63
64
|
"dependencies": {
|
|
64
|
-
"@uniformdev/canvas": "20.
|
|
65
|
-
"@uniformdev/canvas-next-rsc-client": "^20.
|
|
66
|
-
"@uniformdev/canvas-next-rsc-shared": "^20.
|
|
67
|
-
"@uniformdev/canvas-react": "20.
|
|
68
|
-
"@uniformdev/context": "20.
|
|
69
|
-
"@uniformdev/project-map": "20.
|
|
70
|
-
"@uniformdev/redirect": "20.
|
|
71
|
-
"@uniformdev/richtext": "20.
|
|
72
|
-
"@uniformdev/webhooks": "20.
|
|
65
|
+
"@uniformdev/canvas": "20.8.2-alpha.15+b4a01d41ab",
|
|
66
|
+
"@uniformdev/canvas-next-rsc-client": "^20.8.2-alpha.15+b4a01d41ab",
|
|
67
|
+
"@uniformdev/canvas-next-rsc-shared": "^20.8.2-alpha.15+b4a01d41ab",
|
|
68
|
+
"@uniformdev/canvas-react": "20.8.2-alpha.15+b4a01d41ab",
|
|
69
|
+
"@uniformdev/context": "20.8.2-alpha.15+b4a01d41ab",
|
|
70
|
+
"@uniformdev/project-map": "20.8.2-alpha.15+b4a01d41ab",
|
|
71
|
+
"@uniformdev/redirect": "20.8.2-alpha.15+b4a01d41ab",
|
|
72
|
+
"@uniformdev/richtext": "20.8.2-alpha.15+b4a01d41ab",
|
|
73
|
+
"@uniformdev/webhooks": "20.8.2-alpha.15+b4a01d41ab",
|
|
73
74
|
"@vercel/edge-config": "^0.4.0",
|
|
74
75
|
"encoding": "^0.1.13",
|
|
75
76
|
"server-only": "^0.0.1",
|
|
@@ -86,5 +87,5 @@
|
|
|
86
87
|
"publishConfig": {
|
|
87
88
|
"access": "public"
|
|
88
89
|
},
|
|
89
|
-
"gitHead": "
|
|
90
|
+
"gitHead": "b4a01d41abbf17cd016abbc04e9d849c56856c13"
|
|
90
91
|
}
|