@uniformdev/canvas-next-rsc 20.6.2-alpha.10 → 20.6.2-alpha.11
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 +11 -11
package/dist/index.esm.js
CHANGED
|
@@ -631,19 +631,24 @@ var ContextUpdateTrigger = ({ path }) => {
|
|
|
631
631
|
|
|
632
632
|
// src/components/PersonalizeClientWrapper.tsx
|
|
633
633
|
import { PersonalizeClient } from "@uniformdev/canvas-next-rsc-client";
|
|
634
|
-
import { runPersonalization } from "@uniformdev/canvas-next-rsc-shared";
|
|
635
634
|
import React3 from "react";
|
|
636
635
|
var PersonalizeClientWrapper = (props) => {
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
636
|
+
return /* @__PURE__ */ React3.createElement(
|
|
637
|
+
PersonalizeClient,
|
|
638
|
+
{
|
|
639
|
+
component: props.component,
|
|
640
|
+
count: props.count,
|
|
641
|
+
slots: props.slots,
|
|
642
|
+
trackingEventName: props.trackingEventName,
|
|
643
|
+
algorithm: props.algorithm,
|
|
644
|
+
indexes: []
|
|
645
|
+
}
|
|
646
|
+
);
|
|
642
647
|
};
|
|
643
648
|
|
|
644
649
|
// src/components/PersonalizeServer.ts
|
|
645
650
|
import { CANVAS_PERSONALIZE_SLOT } from "@uniformdev/canvas";
|
|
646
|
-
import { runPersonalization
|
|
651
|
+
import { runPersonalization } from "@uniformdev/canvas-next-rsc-shared";
|
|
647
652
|
import { unstable_noStore as noStore } from "next/cache";
|
|
648
653
|
import { createElement, Fragment } from "react";
|
|
649
654
|
|
|
@@ -660,7 +665,7 @@ var PersonalizeServer = (props) => {
|
|
|
660
665
|
if ((_a = getServerConfig().ppr) == null ? void 0 : _a.personalizationSuspense) {
|
|
661
666
|
noStore();
|
|
662
667
|
}
|
|
663
|
-
const { indexes, event } =
|
|
668
|
+
const { indexes, event } = runPersonalization(props);
|
|
664
669
|
const slot = (_b = props.slots) == null ? void 0 : _b[CANVAS_PERSONALIZE_SLOT];
|
|
665
670
|
const components = indexes.map((index) => {
|
|
666
671
|
const component = slot.items[index];
|
|
@@ -675,10 +680,10 @@ var PersonalizeServer = (props) => {
|
|
|
675
680
|
|
|
676
681
|
// src/components/PersonalizeServerHybrid.tsx
|
|
677
682
|
import { PersonalizeClient as PersonalizeClient2 } from "@uniformdev/canvas-next-rsc-client";
|
|
678
|
-
import { runPersonalization as
|
|
683
|
+
import { runPersonalization as runPersonalization2 } from "@uniformdev/canvas-next-rsc-shared";
|
|
679
684
|
import React5 from "react";
|
|
680
685
|
var PersonalizeServerHybrid = (props) => {
|
|
681
|
-
const { indexes } =
|
|
686
|
+
const { indexes } = runPersonalization2(props);
|
|
682
687
|
return /* @__PURE__ */ React5.createElement(
|
|
683
688
|
PersonalizeClient2,
|
|
684
689
|
{
|
|
@@ -686,6 +691,7 @@ var PersonalizeServerHybrid = (props) => {
|
|
|
686
691
|
count: props.count,
|
|
687
692
|
slots: props.slots,
|
|
688
693
|
trackingEventName: props.trackingEventName,
|
|
694
|
+
algorithm: props.algorithm,
|
|
689
695
|
indexes
|
|
690
696
|
}
|
|
691
697
|
);
|
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");
|
|
@@ -659,19 +659,24 @@ var ContextUpdateTrigger = ({ path }) => {
|
|
|
659
659
|
|
|
660
660
|
// src/components/PersonalizeClientWrapper.tsx
|
|
661
661
|
var import_canvas_next_rsc_client3 = require("@uniformdev/canvas-next-rsc-client");
|
|
662
|
-
var import_canvas_next_rsc_shared3 = require("@uniformdev/canvas-next-rsc-shared");
|
|
663
662
|
var import_react3 = __toESM(require("react"));
|
|
664
663
|
var PersonalizeClientWrapper = (props) => {
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
664
|
+
return /* @__PURE__ */ import_react3.default.createElement(
|
|
665
|
+
import_canvas_next_rsc_client3.PersonalizeClient,
|
|
666
|
+
{
|
|
667
|
+
component: props.component,
|
|
668
|
+
count: props.count,
|
|
669
|
+
slots: props.slots,
|
|
670
|
+
trackingEventName: props.trackingEventName,
|
|
671
|
+
algorithm: props.algorithm,
|
|
672
|
+
indexes: []
|
|
673
|
+
}
|
|
674
|
+
);
|
|
670
675
|
};
|
|
671
676
|
|
|
672
677
|
// src/components/PersonalizeServer.ts
|
|
673
678
|
var import_canvas5 = require("@uniformdev/canvas");
|
|
674
|
-
var
|
|
679
|
+
var import_canvas_next_rsc_shared3 = require("@uniformdev/canvas-next-rsc-shared");
|
|
675
680
|
var import_cache = require("next/cache");
|
|
676
681
|
var import_react5 = require("react");
|
|
677
682
|
|
|
@@ -688,7 +693,7 @@ var PersonalizeServer = (props) => {
|
|
|
688
693
|
if ((_a = getServerConfig().ppr) == null ? void 0 : _a.personalizationSuspense) {
|
|
689
694
|
(0, import_cache.unstable_noStore)();
|
|
690
695
|
}
|
|
691
|
-
const { indexes, event } = (0,
|
|
696
|
+
const { indexes, event } = (0, import_canvas_next_rsc_shared3.runPersonalization)(props);
|
|
692
697
|
const slot = (_b = props.slots) == null ? void 0 : _b[import_canvas5.CANVAS_PERSONALIZE_SLOT];
|
|
693
698
|
const components = indexes.map((index) => {
|
|
694
699
|
const component = slot.items[index];
|
|
@@ -703,10 +708,10 @@ var PersonalizeServer = (props) => {
|
|
|
703
708
|
|
|
704
709
|
// src/components/PersonalizeServerHybrid.tsx
|
|
705
710
|
var import_canvas_next_rsc_client5 = require("@uniformdev/canvas-next-rsc-client");
|
|
706
|
-
var
|
|
711
|
+
var import_canvas_next_rsc_shared4 = require("@uniformdev/canvas-next-rsc-shared");
|
|
707
712
|
var import_react6 = __toESM(require("react"));
|
|
708
713
|
var PersonalizeServerHybrid = (props) => {
|
|
709
|
-
const { indexes } = (0,
|
|
714
|
+
const { indexes } = (0, import_canvas_next_rsc_shared4.runPersonalization)(props);
|
|
710
715
|
return /* @__PURE__ */ import_react6.default.createElement(
|
|
711
716
|
import_canvas_next_rsc_client5.PersonalizeClient,
|
|
712
717
|
{
|
|
@@ -714,6 +719,7 @@ var PersonalizeServerHybrid = (props) => {
|
|
|
714
719
|
count: props.count,
|
|
715
720
|
slots: props.slots,
|
|
716
721
|
trackingEventName: props.trackingEventName,
|
|
722
|
+
algorithm: props.algorithm,
|
|
717
723
|
indexes
|
|
718
724
|
}
|
|
719
725
|
);
|
|
@@ -721,7 +727,7 @@ var PersonalizeServerHybrid = (props) => {
|
|
|
721
727
|
|
|
722
728
|
// src/components/TestServer.ts
|
|
723
729
|
var import_canvas6 = require("@uniformdev/canvas");
|
|
724
|
-
var
|
|
730
|
+
var import_canvas_next_rsc_shared5 = require("@uniformdev/canvas-next-rsc-shared");
|
|
725
731
|
var import_cache2 = require("next/cache");
|
|
726
732
|
var import_react8 = require("react");
|
|
727
733
|
|
|
@@ -738,7 +744,7 @@ var TestServer = async (props) => {
|
|
|
738
744
|
if ((_a = getServerConfig().ppr) == null ? void 0 : _a.testSuspense) {
|
|
739
745
|
(0, import_cache2.unstable_noStore)();
|
|
740
746
|
}
|
|
741
|
-
const { index, event } = (0,
|
|
747
|
+
const { index, event } = (0, import_canvas_next_rsc_shared5.runTest)(props);
|
|
742
748
|
if (index === null || event === null) {
|
|
743
749
|
return null;
|
|
744
750
|
}
|
|
@@ -785,7 +791,7 @@ var UniformComposition = async ({
|
|
|
785
791
|
});
|
|
786
792
|
}
|
|
787
793
|
const awaitedParams = await props.params;
|
|
788
|
-
const { value: path } = (0,
|
|
794
|
+
const { value: path } = (0, import_canvas_next_rsc_shared6.resolvePath)({
|
|
789
795
|
params: awaitedParams
|
|
790
796
|
});
|
|
791
797
|
if (!route || route.type === "notFound") {
|
package/dist/index.mjs
CHANGED
|
@@ -631,19 +631,24 @@ var ContextUpdateTrigger = ({ path }) => {
|
|
|
631
631
|
|
|
632
632
|
// src/components/PersonalizeClientWrapper.tsx
|
|
633
633
|
import { PersonalizeClient } from "@uniformdev/canvas-next-rsc-client";
|
|
634
|
-
import { runPersonalization } from "@uniformdev/canvas-next-rsc-shared";
|
|
635
634
|
import React3 from "react";
|
|
636
635
|
var PersonalizeClientWrapper = (props) => {
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
636
|
+
return /* @__PURE__ */ React3.createElement(
|
|
637
|
+
PersonalizeClient,
|
|
638
|
+
{
|
|
639
|
+
component: props.component,
|
|
640
|
+
count: props.count,
|
|
641
|
+
slots: props.slots,
|
|
642
|
+
trackingEventName: props.trackingEventName,
|
|
643
|
+
algorithm: props.algorithm,
|
|
644
|
+
indexes: []
|
|
645
|
+
}
|
|
646
|
+
);
|
|
642
647
|
};
|
|
643
648
|
|
|
644
649
|
// src/components/PersonalizeServer.ts
|
|
645
650
|
import { CANVAS_PERSONALIZE_SLOT } from "@uniformdev/canvas";
|
|
646
|
-
import { runPersonalization
|
|
651
|
+
import { runPersonalization } from "@uniformdev/canvas-next-rsc-shared";
|
|
647
652
|
import { unstable_noStore as noStore } from "next/cache";
|
|
648
653
|
import { createElement, Fragment } from "react";
|
|
649
654
|
|
|
@@ -660,7 +665,7 @@ var PersonalizeServer = (props) => {
|
|
|
660
665
|
if ((_a = getServerConfig().ppr) == null ? void 0 : _a.personalizationSuspense) {
|
|
661
666
|
noStore();
|
|
662
667
|
}
|
|
663
|
-
const { indexes, event } =
|
|
668
|
+
const { indexes, event } = runPersonalization(props);
|
|
664
669
|
const slot = (_b = props.slots) == null ? void 0 : _b[CANVAS_PERSONALIZE_SLOT];
|
|
665
670
|
const components = indexes.map((index) => {
|
|
666
671
|
const component = slot.items[index];
|
|
@@ -675,10 +680,10 @@ var PersonalizeServer = (props) => {
|
|
|
675
680
|
|
|
676
681
|
// src/components/PersonalizeServerHybrid.tsx
|
|
677
682
|
import { PersonalizeClient as PersonalizeClient2 } from "@uniformdev/canvas-next-rsc-client";
|
|
678
|
-
import { runPersonalization as
|
|
683
|
+
import { runPersonalization as runPersonalization2 } from "@uniformdev/canvas-next-rsc-shared";
|
|
679
684
|
import React5 from "react";
|
|
680
685
|
var PersonalizeServerHybrid = (props) => {
|
|
681
|
-
const { indexes } =
|
|
686
|
+
const { indexes } = runPersonalization2(props);
|
|
682
687
|
return /* @__PURE__ */ React5.createElement(
|
|
683
688
|
PersonalizeClient2,
|
|
684
689
|
{
|
|
@@ -686,6 +691,7 @@ var PersonalizeServerHybrid = (props) => {
|
|
|
686
691
|
count: props.count,
|
|
687
692
|
slots: props.slots,
|
|
688
693
|
trackingEventName: props.trackingEventName,
|
|
694
|
+
algorithm: props.algorithm,
|
|
689
695
|
indexes
|
|
690
696
|
}
|
|
691
697
|
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/canvas-next-rsc",
|
|
3
|
-
"version": "20.6.2-alpha.
|
|
3
|
+
"version": "20.6.2-alpha.11+af78064791",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "tsup",
|
|
@@ -61,15 +61,15 @@
|
|
|
61
61
|
"react-dom": "18.3.1"
|
|
62
62
|
},
|
|
63
63
|
"dependencies": {
|
|
64
|
-
"@uniformdev/canvas": "20.6.2-alpha.
|
|
65
|
-
"@uniformdev/canvas-next-rsc-client": "^20.6.2-alpha.
|
|
66
|
-
"@uniformdev/canvas-next-rsc-shared": "^20.6.2-alpha.
|
|
67
|
-
"@uniformdev/canvas-react": "20.6.2-alpha.
|
|
68
|
-
"@uniformdev/context": "20.6.2-alpha.
|
|
69
|
-
"@uniformdev/project-map": "20.6.2-alpha.
|
|
70
|
-
"@uniformdev/redirect": "20.6.2-alpha.
|
|
71
|
-
"@uniformdev/richtext": "20.6.2-alpha.
|
|
72
|
-
"@uniformdev/webhooks": "20.6.2-alpha.
|
|
64
|
+
"@uniformdev/canvas": "20.6.2-alpha.11+af78064791",
|
|
65
|
+
"@uniformdev/canvas-next-rsc-client": "^20.6.2-alpha.11+af78064791",
|
|
66
|
+
"@uniformdev/canvas-next-rsc-shared": "^20.6.2-alpha.11+af78064791",
|
|
67
|
+
"@uniformdev/canvas-react": "20.6.2-alpha.11+af78064791",
|
|
68
|
+
"@uniformdev/context": "20.6.2-alpha.11+af78064791",
|
|
69
|
+
"@uniformdev/project-map": "20.6.2-alpha.11+af78064791",
|
|
70
|
+
"@uniformdev/redirect": "20.6.2-alpha.11+af78064791",
|
|
71
|
+
"@uniformdev/richtext": "20.6.2-alpha.11+af78064791",
|
|
72
|
+
"@uniformdev/webhooks": "20.6.2-alpha.11+af78064791",
|
|
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": "af78064791c47044f8ba447bbe1221f672f6de3e"
|
|
90
90
|
}
|