@uniformdev/canvas-next-rsc 20.6.2-alpha.11 → 20.7.1-alpha.4
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 +18 -17
- package/dist/index.js +22 -21
- package/dist/index.mjs +18 -17
- package/package.json +11 -11
package/dist/index.esm.js
CHANGED
|
@@ -529,10 +529,17 @@ var retrieveRoute = async ({ params, searchParams: providedSearchParams, skipPre
|
|
|
529
529
|
let result;
|
|
530
530
|
for (let i = 0; i < states.length; i++) {
|
|
531
531
|
const state = states[i];
|
|
532
|
-
const
|
|
532
|
+
const releaseIdFromSearchParams = determineReleaseId({
|
|
533
533
|
searchParams,
|
|
534
534
|
state
|
|
535
535
|
});
|
|
536
|
+
const releaseIdFromFetchOptions = fetchOptions == null ? void 0 : fetchOptions.releaseId;
|
|
537
|
+
if (releaseIdFromSearchParams && releaseIdFromFetchOptions && releaseIdFromSearchParams !== releaseIdFromFetchOptions) {
|
|
538
|
+
console.warn(
|
|
539
|
+
"retrieveRoute: releaseId provided in both searchParams and fetchOptions, using fetchOptions"
|
|
540
|
+
);
|
|
541
|
+
}
|
|
542
|
+
const releaseId = releaseIdFromFetchOptions != null ? releaseIdFromFetchOptions : releaseIdFromSearchParams;
|
|
536
543
|
try {
|
|
537
544
|
result = await retrieveRouteByPath({
|
|
538
545
|
path: value,
|
|
@@ -631,24 +638,19 @@ var ContextUpdateTrigger = ({ path }) => {
|
|
|
631
638
|
|
|
632
639
|
// src/components/PersonalizeClientWrapper.tsx
|
|
633
640
|
import { PersonalizeClient } from "@uniformdev/canvas-next-rsc-client";
|
|
641
|
+
import { runPersonalization } from "@uniformdev/canvas-next-rsc-shared";
|
|
634
642
|
import React3 from "react";
|
|
635
643
|
var PersonalizeClientWrapper = (props) => {
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
slots: props.slots,
|
|
642
|
-
trackingEventName: props.trackingEventName,
|
|
643
|
-
algorithm: props.algorithm,
|
|
644
|
-
indexes: []
|
|
645
|
-
}
|
|
646
|
-
);
|
|
644
|
+
const { indexes } = runPersonalization({
|
|
645
|
+
...props,
|
|
646
|
+
contextInstance: void 0
|
|
647
|
+
});
|
|
648
|
+
return /* @__PURE__ */ React3.createElement(PersonalizeClient, { ...props, indexes });
|
|
647
649
|
};
|
|
648
650
|
|
|
649
651
|
// src/components/PersonalizeServer.ts
|
|
650
652
|
import { CANVAS_PERSONALIZE_SLOT } from "@uniformdev/canvas";
|
|
651
|
-
import { runPersonalization } from "@uniformdev/canvas-next-rsc-shared";
|
|
653
|
+
import { runPersonalization as runPersonalization2 } from "@uniformdev/canvas-next-rsc-shared";
|
|
652
654
|
import { unstable_noStore as noStore } from "next/cache";
|
|
653
655
|
import { createElement, Fragment } from "react";
|
|
654
656
|
|
|
@@ -665,7 +667,7 @@ var PersonalizeServer = (props) => {
|
|
|
665
667
|
if ((_a = getServerConfig().ppr) == null ? void 0 : _a.personalizationSuspense) {
|
|
666
668
|
noStore();
|
|
667
669
|
}
|
|
668
|
-
const { indexes, event } =
|
|
670
|
+
const { indexes, event } = runPersonalization2(props);
|
|
669
671
|
const slot = (_b = props.slots) == null ? void 0 : _b[CANVAS_PERSONALIZE_SLOT];
|
|
670
672
|
const components = indexes.map((index) => {
|
|
671
673
|
const component = slot.items[index];
|
|
@@ -680,10 +682,10 @@ var PersonalizeServer = (props) => {
|
|
|
680
682
|
|
|
681
683
|
// src/components/PersonalizeServerHybrid.tsx
|
|
682
684
|
import { PersonalizeClient as PersonalizeClient2 } from "@uniformdev/canvas-next-rsc-client";
|
|
683
|
-
import { runPersonalization as
|
|
685
|
+
import { runPersonalization as runPersonalization3 } from "@uniformdev/canvas-next-rsc-shared";
|
|
684
686
|
import React5 from "react";
|
|
685
687
|
var PersonalizeServerHybrid = (props) => {
|
|
686
|
-
const { indexes } =
|
|
688
|
+
const { indexes } = runPersonalization3(props);
|
|
687
689
|
return /* @__PURE__ */ React5.createElement(
|
|
688
690
|
PersonalizeClient2,
|
|
689
691
|
{
|
|
@@ -691,7 +693,6 @@ var PersonalizeServerHybrid = (props) => {
|
|
|
691
693
|
count: props.count,
|
|
692
694
|
slots: props.slots,
|
|
693
695
|
trackingEventName: props.trackingEventName,
|
|
694
|
-
algorithm: props.algorithm,
|
|
695
696
|
indexes
|
|
696
697
|
}
|
|
697
698
|
);
|
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_shared7 = 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");
|
|
@@ -557,10 +557,17 @@ var retrieveRoute = async ({ params, searchParams: providedSearchParams, skipPre
|
|
|
557
557
|
let result;
|
|
558
558
|
for (let i = 0; i < states.length; i++) {
|
|
559
559
|
const state = states[i];
|
|
560
|
-
const
|
|
560
|
+
const releaseIdFromSearchParams = determineReleaseId({
|
|
561
561
|
searchParams,
|
|
562
562
|
state
|
|
563
563
|
});
|
|
564
|
+
const releaseIdFromFetchOptions = fetchOptions == null ? void 0 : fetchOptions.releaseId;
|
|
565
|
+
if (releaseIdFromSearchParams && releaseIdFromFetchOptions && releaseIdFromSearchParams !== releaseIdFromFetchOptions) {
|
|
566
|
+
console.warn(
|
|
567
|
+
"retrieveRoute: releaseId provided in both searchParams and fetchOptions, using fetchOptions"
|
|
568
|
+
);
|
|
569
|
+
}
|
|
570
|
+
const releaseId = releaseIdFromFetchOptions != null ? releaseIdFromFetchOptions : releaseIdFromSearchParams;
|
|
564
571
|
try {
|
|
565
572
|
result = await retrieveRouteByPath({
|
|
566
573
|
path: value,
|
|
@@ -659,24 +666,19 @@ var ContextUpdateTrigger = ({ path }) => {
|
|
|
659
666
|
|
|
660
667
|
// src/components/PersonalizeClientWrapper.tsx
|
|
661
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");
|
|
662
670
|
var import_react3 = __toESM(require("react"));
|
|
663
671
|
var PersonalizeClientWrapper = (props) => {
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
slots: props.slots,
|
|
670
|
-
trackingEventName: props.trackingEventName,
|
|
671
|
-
algorithm: props.algorithm,
|
|
672
|
-
indexes: []
|
|
673
|
-
}
|
|
674
|
-
);
|
|
672
|
+
const { indexes } = (0, import_canvas_next_rsc_shared3.runPersonalization)({
|
|
673
|
+
...props,
|
|
674
|
+
contextInstance: void 0
|
|
675
|
+
});
|
|
676
|
+
return /* @__PURE__ */ import_react3.default.createElement(import_canvas_next_rsc_client3.PersonalizeClient, { ...props, indexes });
|
|
675
677
|
};
|
|
676
678
|
|
|
677
679
|
// src/components/PersonalizeServer.ts
|
|
678
680
|
var import_canvas5 = require("@uniformdev/canvas");
|
|
679
|
-
var
|
|
681
|
+
var import_canvas_next_rsc_shared4 = require("@uniformdev/canvas-next-rsc-shared");
|
|
680
682
|
var import_cache = require("next/cache");
|
|
681
683
|
var import_react5 = require("react");
|
|
682
684
|
|
|
@@ -693,7 +695,7 @@ var PersonalizeServer = (props) => {
|
|
|
693
695
|
if ((_a = getServerConfig().ppr) == null ? void 0 : _a.personalizationSuspense) {
|
|
694
696
|
(0, import_cache.unstable_noStore)();
|
|
695
697
|
}
|
|
696
|
-
const { indexes, event } = (0,
|
|
698
|
+
const { indexes, event } = (0, import_canvas_next_rsc_shared4.runPersonalization)(props);
|
|
697
699
|
const slot = (_b = props.slots) == null ? void 0 : _b[import_canvas5.CANVAS_PERSONALIZE_SLOT];
|
|
698
700
|
const components = indexes.map((index) => {
|
|
699
701
|
const component = slot.items[index];
|
|
@@ -708,10 +710,10 @@ var PersonalizeServer = (props) => {
|
|
|
708
710
|
|
|
709
711
|
// src/components/PersonalizeServerHybrid.tsx
|
|
710
712
|
var import_canvas_next_rsc_client5 = require("@uniformdev/canvas-next-rsc-client");
|
|
711
|
-
var
|
|
713
|
+
var import_canvas_next_rsc_shared5 = require("@uniformdev/canvas-next-rsc-shared");
|
|
712
714
|
var import_react6 = __toESM(require("react"));
|
|
713
715
|
var PersonalizeServerHybrid = (props) => {
|
|
714
|
-
const { indexes } = (0,
|
|
716
|
+
const { indexes } = (0, import_canvas_next_rsc_shared5.runPersonalization)(props);
|
|
715
717
|
return /* @__PURE__ */ import_react6.default.createElement(
|
|
716
718
|
import_canvas_next_rsc_client5.PersonalizeClient,
|
|
717
719
|
{
|
|
@@ -719,7 +721,6 @@ var PersonalizeServerHybrid = (props) => {
|
|
|
719
721
|
count: props.count,
|
|
720
722
|
slots: props.slots,
|
|
721
723
|
trackingEventName: props.trackingEventName,
|
|
722
|
-
algorithm: props.algorithm,
|
|
723
724
|
indexes
|
|
724
725
|
}
|
|
725
726
|
);
|
|
@@ -727,7 +728,7 @@ var PersonalizeServerHybrid = (props) => {
|
|
|
727
728
|
|
|
728
729
|
// src/components/TestServer.ts
|
|
729
730
|
var import_canvas6 = require("@uniformdev/canvas");
|
|
730
|
-
var
|
|
731
|
+
var import_canvas_next_rsc_shared6 = require("@uniformdev/canvas-next-rsc-shared");
|
|
731
732
|
var import_cache2 = require("next/cache");
|
|
732
733
|
var import_react8 = require("react");
|
|
733
734
|
|
|
@@ -744,7 +745,7 @@ var TestServer = async (props) => {
|
|
|
744
745
|
if ((_a = getServerConfig().ppr) == null ? void 0 : _a.testSuspense) {
|
|
745
746
|
(0, import_cache2.unstable_noStore)();
|
|
746
747
|
}
|
|
747
|
-
const { index, event } = (0,
|
|
748
|
+
const { index, event } = (0, import_canvas_next_rsc_shared6.runTest)(props);
|
|
748
749
|
if (index === null || event === null) {
|
|
749
750
|
return null;
|
|
750
751
|
}
|
|
@@ -791,7 +792,7 @@ var UniformComposition = async ({
|
|
|
791
792
|
});
|
|
792
793
|
}
|
|
793
794
|
const awaitedParams = await props.params;
|
|
794
|
-
const { value: path } = (0,
|
|
795
|
+
const { value: path } = (0, import_canvas_next_rsc_shared7.resolvePath)({
|
|
795
796
|
params: awaitedParams
|
|
796
797
|
});
|
|
797
798
|
if (!route || route.type === "notFound") {
|
package/dist/index.mjs
CHANGED
|
@@ -529,10 +529,17 @@ var retrieveRoute = async ({ params, searchParams: providedSearchParams, skipPre
|
|
|
529
529
|
let result;
|
|
530
530
|
for (let i = 0; i < states.length; i++) {
|
|
531
531
|
const state = states[i];
|
|
532
|
-
const
|
|
532
|
+
const releaseIdFromSearchParams = determineReleaseId({
|
|
533
533
|
searchParams,
|
|
534
534
|
state
|
|
535
535
|
});
|
|
536
|
+
const releaseIdFromFetchOptions = fetchOptions == null ? void 0 : fetchOptions.releaseId;
|
|
537
|
+
if (releaseIdFromSearchParams && releaseIdFromFetchOptions && releaseIdFromSearchParams !== releaseIdFromFetchOptions) {
|
|
538
|
+
console.warn(
|
|
539
|
+
"retrieveRoute: releaseId provided in both searchParams and fetchOptions, using fetchOptions"
|
|
540
|
+
);
|
|
541
|
+
}
|
|
542
|
+
const releaseId = releaseIdFromFetchOptions != null ? releaseIdFromFetchOptions : releaseIdFromSearchParams;
|
|
536
543
|
try {
|
|
537
544
|
result = await retrieveRouteByPath({
|
|
538
545
|
path: value,
|
|
@@ -631,24 +638,19 @@ var ContextUpdateTrigger = ({ path }) => {
|
|
|
631
638
|
|
|
632
639
|
// src/components/PersonalizeClientWrapper.tsx
|
|
633
640
|
import { PersonalizeClient } from "@uniformdev/canvas-next-rsc-client";
|
|
641
|
+
import { runPersonalization } from "@uniformdev/canvas-next-rsc-shared";
|
|
634
642
|
import React3 from "react";
|
|
635
643
|
var PersonalizeClientWrapper = (props) => {
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
slots: props.slots,
|
|
642
|
-
trackingEventName: props.trackingEventName,
|
|
643
|
-
algorithm: props.algorithm,
|
|
644
|
-
indexes: []
|
|
645
|
-
}
|
|
646
|
-
);
|
|
644
|
+
const { indexes } = runPersonalization({
|
|
645
|
+
...props,
|
|
646
|
+
contextInstance: void 0
|
|
647
|
+
});
|
|
648
|
+
return /* @__PURE__ */ React3.createElement(PersonalizeClient, { ...props, indexes });
|
|
647
649
|
};
|
|
648
650
|
|
|
649
651
|
// src/components/PersonalizeServer.ts
|
|
650
652
|
import { CANVAS_PERSONALIZE_SLOT } from "@uniformdev/canvas";
|
|
651
|
-
import { runPersonalization } from "@uniformdev/canvas-next-rsc-shared";
|
|
653
|
+
import { runPersonalization as runPersonalization2 } from "@uniformdev/canvas-next-rsc-shared";
|
|
652
654
|
import { unstable_noStore as noStore } from "next/cache";
|
|
653
655
|
import { createElement, Fragment } from "react";
|
|
654
656
|
|
|
@@ -665,7 +667,7 @@ var PersonalizeServer = (props) => {
|
|
|
665
667
|
if ((_a = getServerConfig().ppr) == null ? void 0 : _a.personalizationSuspense) {
|
|
666
668
|
noStore();
|
|
667
669
|
}
|
|
668
|
-
const { indexes, event } =
|
|
670
|
+
const { indexes, event } = runPersonalization2(props);
|
|
669
671
|
const slot = (_b = props.slots) == null ? void 0 : _b[CANVAS_PERSONALIZE_SLOT];
|
|
670
672
|
const components = indexes.map((index) => {
|
|
671
673
|
const component = slot.items[index];
|
|
@@ -680,10 +682,10 @@ var PersonalizeServer = (props) => {
|
|
|
680
682
|
|
|
681
683
|
// src/components/PersonalizeServerHybrid.tsx
|
|
682
684
|
import { PersonalizeClient as PersonalizeClient2 } from "@uniformdev/canvas-next-rsc-client";
|
|
683
|
-
import { runPersonalization as
|
|
685
|
+
import { runPersonalization as runPersonalization3 } from "@uniformdev/canvas-next-rsc-shared";
|
|
684
686
|
import React5 from "react";
|
|
685
687
|
var PersonalizeServerHybrid = (props) => {
|
|
686
|
-
const { indexes } =
|
|
688
|
+
const { indexes } = runPersonalization3(props);
|
|
687
689
|
return /* @__PURE__ */ React5.createElement(
|
|
688
690
|
PersonalizeClient2,
|
|
689
691
|
{
|
|
@@ -691,7 +693,6 @@ var PersonalizeServerHybrid = (props) => {
|
|
|
691
693
|
count: props.count,
|
|
692
694
|
slots: props.slots,
|
|
693
695
|
trackingEventName: props.trackingEventName,
|
|
694
|
-
algorithm: props.algorithm,
|
|
695
696
|
indexes
|
|
696
697
|
}
|
|
697
698
|
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/canvas-next-rsc",
|
|
3
|
-
"version": "20.
|
|
3
|
+
"version": "20.7.1-alpha.4+20185a97ff",
|
|
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.
|
|
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.
|
|
64
|
+
"@uniformdev/canvas": "20.7.1-alpha.4+20185a97ff",
|
|
65
|
+
"@uniformdev/canvas-next-rsc-client": "^20.7.1-alpha.4+20185a97ff",
|
|
66
|
+
"@uniformdev/canvas-next-rsc-shared": "^20.7.1-alpha.4+20185a97ff",
|
|
67
|
+
"@uniformdev/canvas-react": "20.7.1-alpha.4+20185a97ff",
|
|
68
|
+
"@uniformdev/context": "20.7.1-alpha.4+20185a97ff",
|
|
69
|
+
"@uniformdev/project-map": "20.7.1-alpha.4+20185a97ff",
|
|
70
|
+
"@uniformdev/redirect": "20.7.1-alpha.4+20185a97ff",
|
|
71
|
+
"@uniformdev/richtext": "20.7.1-alpha.4+20185a97ff",
|
|
72
|
+
"@uniformdev/webhooks": "20.7.1-alpha.4+20185a97ff",
|
|
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": "20185a97ff6c2de2f871223af12d73583fe300af"
|
|
90
90
|
}
|