@uniformdev/canvas-next-rsc 20.37.1-alpha.1 → 20.37.1-alpha.7

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/handler.js CHANGED
@@ -204,18 +204,9 @@ var env = {
204
204
  };
205
205
 
206
206
  // src/utils/tag.ts
207
- var encodePathForTag = (path) => {
208
- return path.split("/").map((segment) => {
209
- if (/[^\x00-\x7F]/.test(segment)) {
210
- return encodeURIComponent(segment);
211
- }
212
- return segment;
213
- }).join("/");
214
- };
215
207
  var buildPathTag = (path) => {
216
208
  const actualPath = path.startsWith("/") ? path : `/${path}`;
217
- const encodedPath = encodePathForTag(actualPath);
218
- return `path:${encodedPath}`.toLowerCase();
209
+ return `path:${actualPath}`.toLowerCase();
219
210
  };
220
211
  var buildCompositionTag = (compositionId) => {
221
212
  return `composition:${compositionId}`.toLowerCase();
package/dist/handler.mjs CHANGED
@@ -171,18 +171,9 @@ var env = {
171
171
  };
172
172
 
173
173
  // src/utils/tag.ts
174
- var encodePathForTag = (path) => {
175
- return path.split("/").map((segment) => {
176
- if (/[^\x00-\x7F]/.test(segment)) {
177
- return encodeURIComponent(segment);
178
- }
179
- return segment;
180
- }).join("/");
181
- };
182
174
  var buildPathTag = (path) => {
183
175
  const actualPath = path.startsWith("/") ? path : `/${path}`;
184
- const encodedPath = encodePathForTag(actualPath);
185
- return `path:${encodedPath}`.toLowerCase();
176
+ return `path:${actualPath}`.toLowerCase();
186
177
  };
187
178
  var buildCompositionTag = (compositionId) => {
188
179
  return `composition:${compositionId}`.toLowerCase();
package/dist/index.esm.js CHANGED
@@ -150,18 +150,9 @@ var env = {
150
150
  };
151
151
 
152
152
  // src/utils/tag.ts
153
- var encodePathForTag = (path) => {
154
- return path.split("/").map((segment) => {
155
- if (/[^\x00-\x7F]/.test(segment)) {
156
- return encodeURIComponent(segment);
157
- }
158
- return segment;
159
- }).join("/");
160
- };
161
153
  var buildPathTag = (path) => {
162
154
  const actualPath = path.startsWith("/") ? path : `/${path}`;
163
- const encodedPath = encodePathForTag(actualPath);
164
- return `path:${encodedPath}`.toLowerCase();
155
+ return `path:${actualPath}`.toLowerCase();
165
156
  };
166
157
  var buildCompositionTag = (compositionId) => {
167
158
  return `composition:${compositionId}`.toLowerCase();
@@ -637,18 +628,11 @@ var ContextUpdateTrigger = ({ path }) => {
637
628
  // src/components/PersonalizeClientWrapper.tsx
638
629
  import { PersonalizeClient } from "@uniformdev/canvas-next-rsc-client";
639
630
  import React3 from "react";
640
- var PersonalizeClientWrapper = (props) => {
641
- return /* @__PURE__ */ React3.createElement(
642
- PersonalizeClient,
643
- {
644
- component: props.component,
645
- count: props.count,
646
- slots: props.slots,
647
- trackingEventName: props.trackingEventName,
648
- algorithm: props.algorithm,
649
- indexes: []
650
- }
651
- );
631
+ var PersonalizeClientWrapper = ({
632
+ contextInstance,
633
+ ...props
634
+ }) => {
635
+ return /* @__PURE__ */ React3.createElement(PersonalizeClient, { ...props, indexes: [] });
652
636
  };
653
637
 
654
638
  // src/components/PersonalizeServer.ts
@@ -687,19 +671,12 @@ var PersonalizeServer = (props) => {
687
671
  import { PersonalizeClient as PersonalizeClient2 } from "@uniformdev/canvas-next-rsc-client";
688
672
  import { runPersonalization as runPersonalization2 } from "@uniformdev/canvas-next-rsc-shared";
689
673
  import React5 from "react";
690
- var PersonalizeServerHybrid = (props) => {
691
- const { indexes } = runPersonalization2(props);
692
- return /* @__PURE__ */ React5.createElement(
693
- PersonalizeClient2,
694
- {
695
- component: props.component,
696
- count: props.count,
697
- slots: props.slots,
698
- trackingEventName: props.trackingEventName,
699
- algorithm: props.algorithm,
700
- indexes
701
- }
702
- );
674
+ var PersonalizeServerHybrid = ({
675
+ contextInstance,
676
+ ...props
677
+ }) => {
678
+ const { indexes } = runPersonalization2({ ...props, contextInstance });
679
+ return /* @__PURE__ */ React5.createElement(PersonalizeClient2, { ...props, indexes });
703
680
  };
704
681
 
705
682
  // src/components/TestServer.ts
@@ -838,6 +815,11 @@ var UniformComposition = async ({
838
815
  },
839
816
  {}
840
817
  ),
818
+ compositionMetadata: {
819
+ compositionId: route.compositionApiResponse.composition._id,
820
+ matchedRoute: route.matchedRoute,
821
+ dynamicInputs: route.dynamicInputs
822
+ },
841
823
  quirks: {
842
824
  "vc-country": headersValue.get("x-vercel-ip-country") || missingQuirkValue,
843
825
  "vc-region": headersValue.get("x-vercel-ip-country-region") || missingQuirkValue,
package/dist/index.js CHANGED
@@ -203,18 +203,9 @@ var env = {
203
203
  };
204
204
 
205
205
  // src/utils/tag.ts
206
- var encodePathForTag = (path) => {
207
- return path.split("/").map((segment) => {
208
- if (/[^\x00-\x7F]/.test(segment)) {
209
- return encodeURIComponent(segment);
210
- }
211
- return segment;
212
- }).join("/");
213
- };
214
206
  var buildPathTag = (path) => {
215
207
  const actualPath = path.startsWith("/") ? path : `/${path}`;
216
- const encodedPath = encodePathForTag(actualPath);
217
- return `path:${encodedPath}`.toLowerCase();
208
+ return `path:${actualPath}`.toLowerCase();
218
209
  };
219
210
  var buildCompositionTag = (compositionId) => {
220
211
  return `composition:${compositionId}`.toLowerCase();
@@ -665,18 +656,11 @@ var ContextUpdateTrigger = ({ path }) => {
665
656
  // src/components/PersonalizeClientWrapper.tsx
666
657
  var import_canvas_next_rsc_client3 = require("@uniformdev/canvas-next-rsc-client");
667
658
  var import_react3 = __toESM(require("react"));
668
- var PersonalizeClientWrapper = (props) => {
669
- return /* @__PURE__ */ import_react3.default.createElement(
670
- import_canvas_next_rsc_client3.PersonalizeClient,
671
- {
672
- component: props.component,
673
- count: props.count,
674
- slots: props.slots,
675
- trackingEventName: props.trackingEventName,
676
- algorithm: props.algorithm,
677
- indexes: []
678
- }
679
- );
659
+ var PersonalizeClientWrapper = ({
660
+ contextInstance,
661
+ ...props
662
+ }) => {
663
+ return /* @__PURE__ */ import_react3.default.createElement(import_canvas_next_rsc_client3.PersonalizeClient, { ...props, indexes: [] });
680
664
  };
681
665
 
682
666
  // src/components/PersonalizeServer.ts
@@ -715,19 +699,12 @@ var PersonalizeServer = (props) => {
715
699
  var import_canvas_next_rsc_client5 = require("@uniformdev/canvas-next-rsc-client");
716
700
  var import_canvas_next_rsc_shared4 = require("@uniformdev/canvas-next-rsc-shared");
717
701
  var import_react6 = __toESM(require("react"));
718
- var PersonalizeServerHybrid = (props) => {
719
- const { indexes } = (0, import_canvas_next_rsc_shared4.runPersonalization)(props);
720
- return /* @__PURE__ */ import_react6.default.createElement(
721
- import_canvas_next_rsc_client5.PersonalizeClient,
722
- {
723
- component: props.component,
724
- count: props.count,
725
- slots: props.slots,
726
- trackingEventName: props.trackingEventName,
727
- algorithm: props.algorithm,
728
- indexes
729
- }
730
- );
702
+ var PersonalizeServerHybrid = ({
703
+ contextInstance,
704
+ ...props
705
+ }) => {
706
+ const { indexes } = (0, import_canvas_next_rsc_shared4.runPersonalization)({ ...props, contextInstance });
707
+ return /* @__PURE__ */ import_react6.default.createElement(import_canvas_next_rsc_client5.PersonalizeClient, { ...props, indexes });
731
708
  };
732
709
 
733
710
  // src/components/TestServer.ts
@@ -861,6 +838,11 @@ var UniformComposition = async ({
861
838
  },
862
839
  {}
863
840
  ),
841
+ compositionMetadata: {
842
+ compositionId: route.compositionApiResponse.composition._id,
843
+ matchedRoute: route.matchedRoute,
844
+ dynamicInputs: route.dynamicInputs
845
+ },
864
846
  quirks: {
865
847
  "vc-country": headersValue.get("x-vercel-ip-country") || missingQuirkValue,
866
848
  "vc-region": headersValue.get("x-vercel-ip-country-region") || missingQuirkValue,
package/dist/index.mjs CHANGED
@@ -150,18 +150,9 @@ var env = {
150
150
  };
151
151
 
152
152
  // src/utils/tag.ts
153
- var encodePathForTag = (path) => {
154
- return path.split("/").map((segment) => {
155
- if (/[^\x00-\x7F]/.test(segment)) {
156
- return encodeURIComponent(segment);
157
- }
158
- return segment;
159
- }).join("/");
160
- };
161
153
  var buildPathTag = (path) => {
162
154
  const actualPath = path.startsWith("/") ? path : `/${path}`;
163
- const encodedPath = encodePathForTag(actualPath);
164
- return `path:${encodedPath}`.toLowerCase();
155
+ return `path:${actualPath}`.toLowerCase();
165
156
  };
166
157
  var buildCompositionTag = (compositionId) => {
167
158
  return `composition:${compositionId}`.toLowerCase();
@@ -637,18 +628,11 @@ var ContextUpdateTrigger = ({ path }) => {
637
628
  // src/components/PersonalizeClientWrapper.tsx
638
629
  import { PersonalizeClient } from "@uniformdev/canvas-next-rsc-client";
639
630
  import React3 from "react";
640
- var PersonalizeClientWrapper = (props) => {
641
- return /* @__PURE__ */ React3.createElement(
642
- PersonalizeClient,
643
- {
644
- component: props.component,
645
- count: props.count,
646
- slots: props.slots,
647
- trackingEventName: props.trackingEventName,
648
- algorithm: props.algorithm,
649
- indexes: []
650
- }
651
- );
631
+ var PersonalizeClientWrapper = ({
632
+ contextInstance,
633
+ ...props
634
+ }) => {
635
+ return /* @__PURE__ */ React3.createElement(PersonalizeClient, { ...props, indexes: [] });
652
636
  };
653
637
 
654
638
  // src/components/PersonalizeServer.ts
@@ -687,19 +671,12 @@ var PersonalizeServer = (props) => {
687
671
  import { PersonalizeClient as PersonalizeClient2 } from "@uniformdev/canvas-next-rsc-client";
688
672
  import { runPersonalization as runPersonalization2 } from "@uniformdev/canvas-next-rsc-shared";
689
673
  import React5 from "react";
690
- var PersonalizeServerHybrid = (props) => {
691
- const { indexes } = runPersonalization2(props);
692
- return /* @__PURE__ */ React5.createElement(
693
- PersonalizeClient2,
694
- {
695
- component: props.component,
696
- count: props.count,
697
- slots: props.slots,
698
- trackingEventName: props.trackingEventName,
699
- algorithm: props.algorithm,
700
- indexes
701
- }
702
- );
674
+ var PersonalizeServerHybrid = ({
675
+ contextInstance,
676
+ ...props
677
+ }) => {
678
+ const { indexes } = runPersonalization2({ ...props, contextInstance });
679
+ return /* @__PURE__ */ React5.createElement(PersonalizeClient2, { ...props, indexes });
703
680
  };
704
681
 
705
682
  // src/components/TestServer.ts
@@ -838,6 +815,11 @@ var UniformComposition = async ({
838
815
  },
839
816
  {}
840
817
  ),
818
+ compositionMetadata: {
819
+ compositionId: route.compositionApiResponse.composition._id,
820
+ matchedRoute: route.matchedRoute,
821
+ dynamicInputs: route.dynamicInputs
822
+ },
841
823
  quirks: {
842
824
  "vc-country": headersValue.get("x-vercel-ip-country") || missingQuirkValue,
843
825
  "vc-region": headersValue.get("x-vercel-ip-country-region") || missingQuirkValue,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/canvas-next-rsc",
3
- "version": "20.37.1-alpha.1+5ac67f77a7",
3
+ "version": "20.37.1-alpha.7+a17ec25ff2",
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.37.1-alpha.1+5ac67f77a7",
65
- "@uniformdev/canvas-next-rsc-client": "^20.37.1-alpha.1+5ac67f77a7",
66
- "@uniformdev/canvas-next-rsc-shared": "^20.37.1-alpha.1+5ac67f77a7",
67
- "@uniformdev/canvas-react": "20.37.1-alpha.1+5ac67f77a7",
68
- "@uniformdev/context": "20.37.1-alpha.1+5ac67f77a7",
69
- "@uniformdev/project-map": "20.37.1-alpha.1+5ac67f77a7",
70
- "@uniformdev/redirect": "20.37.1-alpha.1+5ac67f77a7",
71
- "@uniformdev/richtext": "20.37.1-alpha.1+5ac67f77a7",
72
- "@uniformdev/webhooks": "20.37.1-alpha.1+5ac67f77a7",
64
+ "@uniformdev/canvas": "20.37.1-alpha.7+a17ec25ff2",
65
+ "@uniformdev/canvas-next-rsc-client": "^20.37.1-alpha.7+a17ec25ff2",
66
+ "@uniformdev/canvas-next-rsc-shared": "^20.37.1-alpha.7+a17ec25ff2",
67
+ "@uniformdev/canvas-react": "20.37.1-alpha.7+a17ec25ff2",
68
+ "@uniformdev/context": "20.37.1-alpha.7+a17ec25ff2",
69
+ "@uniformdev/project-map": "20.37.1-alpha.7+a17ec25ff2",
70
+ "@uniformdev/redirect": "20.37.1-alpha.7+a17ec25ff2",
71
+ "@uniformdev/richtext": "20.37.1-alpha.7+a17ec25ff2",
72
+ "@uniformdev/webhooks": "20.37.1-alpha.7+a17ec25ff2",
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": "5ac67f77a77da73d93c76b9ec23d86acbd0a2123"
89
+ "gitHead": "a17ec25ff2021e850ee810f166345b086daa4224"
90
90
  }