@uniformdev/canvas-next-rsc-client 19.79.1-alpha.13 → 19.79.1-alpha.25

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/LICENSE.txt CHANGED
@@ -1,2 +1,2 @@
1
- © 2023 Uniform Systems, Inc. All Rights Reserved.
1
+ © 2024 Uniform Systems, Inc. All Rights Reserved.
2
2
  See details of Uniform Systems, Inc. Master Subscription Agreement here: https://uniform.dev/eula
package/dist/index.d.mts CHANGED
@@ -16,6 +16,10 @@ type ClientContextComponentProps = {
16
16
  * Whether or not to disable the Uniform Context dev tools
17
17
  */
18
18
  disableDevTools: boolean;
19
+ /**
20
+ * The default consent value
21
+ */
22
+ defaultConsent: boolean;
19
23
  };
20
24
  type ClientContextComponent = (props: ClientContextComponentProps) => JSX.Element | null;
21
25
 
@@ -31,7 +35,9 @@ declare const ClientContextTestTransfer: ({ event, ts }: {
31
35
 
32
36
  declare const ClientContextualEditingComponentWrapper: (props: PropsWithChildren<PureContextualEditingComponentWrapperProps>) => react_jsx_runtime.JSX.Element;
33
37
 
34
- declare const ClientContextUpdate: () => react_jsx_runtime.JSX.Element;
38
+ declare const ClientContextUpdate: ({ path }: {
39
+ path: string;
40
+ }) => react_jsx_runtime.JSX.Element;
35
41
 
36
42
  declare const ContextUpdateTransferClient: ({ update, ts, }: {
37
43
  update: Partial<AppDirectoryContextState>;
package/dist/index.d.ts CHANGED
@@ -16,6 +16,10 @@ type ClientContextComponentProps = {
16
16
  * Whether or not to disable the Uniform Context dev tools
17
17
  */
18
18
  disableDevTools: boolean;
19
+ /**
20
+ * The default consent value
21
+ */
22
+ defaultConsent: boolean;
19
23
  };
20
24
  type ClientContextComponent = (props: ClientContextComponentProps) => JSX.Element | null;
21
25
 
@@ -31,7 +35,9 @@ declare const ClientContextTestTransfer: ({ event, ts }: {
31
35
 
32
36
  declare const ClientContextualEditingComponentWrapper: (props: PropsWithChildren<PureContextualEditingComponentWrapperProps>) => react_jsx_runtime.JSX.Element;
33
37
 
34
- declare const ClientContextUpdate: () => react_jsx_runtime.JSX.Element;
38
+ declare const ClientContextUpdate: ({ path }: {
39
+ path: string;
40
+ }) => react_jsx_runtime.JSX.Element;
35
41
 
36
42
  declare const ContextUpdateTransferClient: ({ update, ts, }: {
37
43
  update: Partial<AppDirectoryContextState>;
package/dist/index.esm.js CHANGED
@@ -25,9 +25,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
25
25
  mod
26
26
  ));
27
27
 
28
- // ../../node_modules/.pnpm/rfdc@1.3.0/node_modules/rfdc/index.js
28
+ // ../../node_modules/.pnpm/rfdc@1.3.1/node_modules/rfdc/index.js
29
29
  var require_rfdc = __commonJS({
30
- "../../node_modules/.pnpm/rfdc@1.3.0/node_modules/rfdc/index.js"(exports, module) {
30
+ "../../node_modules/.pnpm/rfdc@1.3.1/node_modules/rfdc/index.js"(exports, module) {
31
31
  "use strict";
32
32
  module.exports = rfdc4;
33
33
  function copyBuffer(cur) {
@@ -314,14 +314,13 @@ var ClientContextualEditingComponentWrapperInner = ({
314
314
  };
315
315
 
316
316
  // src/components/ClientContextUpdate.tsx
317
- import { useParams, useSearchParams as useSearchParams2 } from "next/navigation";
317
+ import { useSearchParams as useSearchParams2 } from "next/navigation";
318
318
  import { Suspense as Suspense2, useEffect as useEffect4 } from "react";
319
319
  import { Fragment as Fragment2, jsx as jsx2 } from "react/jsx-runtime";
320
- var ClientContextUpdate = () => {
321
- return /* @__PURE__ */ jsx2(Suspense2, { children: /* @__PURE__ */ jsx2(ClientContextUpdateInner, {}) });
320
+ var ClientContextUpdate = ({ path }) => {
321
+ return /* @__PURE__ */ jsx2(Suspense2, { children: /* @__PURE__ */ jsx2(ClientContextUpdateInner, { path }) });
322
322
  };
323
- var ClientContextUpdateInner = () => {
324
- const params = useParams();
323
+ var ClientContextUpdateInner = ({ path }) => {
325
324
  const searchParams = useSearchParams2();
326
325
  const { context } = useUniformContext();
327
326
  useEffect4(() => {
@@ -330,10 +329,12 @@ var ClientContextUpdateInner = () => {
330
329
  }
331
330
  const convertedSearchParams = Object.fromEntries(searchParams.entries());
332
331
  context.update({
333
- params,
332
+ params: {
333
+ path: path.split("/").filter(Boolean)
334
+ },
334
335
  searchParams: convertedSearchParams
335
336
  });
336
- }, [params, searchParams, context]);
337
+ }, [path, searchParams, context]);
337
338
  return /* @__PURE__ */ jsx2(Fragment2, {});
338
339
  };
339
340
 
@@ -637,7 +638,8 @@ var emptyVisitorData = () => ({
637
638
  tests: {},
638
639
  goals: {},
639
640
  consent: false,
640
- controlGroup: false
641
+ controlGroup: false,
642
+ personalizeVariants: {}
641
643
  });
642
644
  var clone = (0, import_rfdc.default)();
643
645
  var STORAGE_KEY = "ufvisitor";
@@ -962,7 +964,11 @@ var useInitUniformContext = (callback) => {
962
964
  };
963
965
 
964
966
  // src/components/DefaultUniformClientContext.tsx
965
- var DefaultUniformClientContext = ({ manifest, disableDevTools }) => {
967
+ var DefaultUniformClientContext = ({
968
+ manifest,
969
+ disableDevTools,
970
+ defaultConsent
971
+ }) => {
966
972
  const router = useRouter();
967
973
  useInitUniformContext(() => {
968
974
  const plugins = [];
@@ -977,7 +983,8 @@ var DefaultUniformClientContext = ({ manifest, disableDevTools }) => {
977
983
  }
978
984
  return createClientUniformContext({
979
985
  manifest,
980
- plugins
986
+ plugins,
987
+ defaultConsent
981
988
  });
982
989
  });
983
990
  return null;
package/dist/index.js CHANGED
@@ -31,9 +31,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
31
31
  ));
32
32
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
33
33
 
34
- // ../../node_modules/.pnpm/rfdc@1.3.0/node_modules/rfdc/index.js
34
+ // ../../node_modules/.pnpm/rfdc@1.3.1/node_modules/rfdc/index.js
35
35
  var require_rfdc = __commonJS({
36
- "../../node_modules/.pnpm/rfdc@1.3.0/node_modules/rfdc/index.js"(exports2, module2) {
36
+ "../../node_modules/.pnpm/rfdc@1.3.1/node_modules/rfdc/index.js"(exports2, module2) {
37
37
  "use strict";
38
38
  module2.exports = rfdc4;
39
39
  function copyBuffer(cur) {
@@ -339,11 +339,10 @@ var ClientContextualEditingComponentWrapperInner = ({
339
339
  var import_navigation2 = require("next/navigation");
340
340
  var import_react5 = require("react");
341
341
  var import_jsx_runtime2 = require("react/jsx-runtime");
342
- var ClientContextUpdate = () => {
343
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react5.Suspense, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(ClientContextUpdateInner, {}) });
342
+ var ClientContextUpdate = ({ path }) => {
343
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react5.Suspense, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(ClientContextUpdateInner, { path }) });
344
344
  };
345
- var ClientContextUpdateInner = () => {
346
- const params = (0, import_navigation2.useParams)();
345
+ var ClientContextUpdateInner = ({ path }) => {
347
346
  const searchParams = (0, import_navigation2.useSearchParams)();
348
347
  const { context } = useUniformContext();
349
348
  (0, import_react5.useEffect)(() => {
@@ -352,10 +351,12 @@ var ClientContextUpdateInner = () => {
352
351
  }
353
352
  const convertedSearchParams = Object.fromEntries(searchParams.entries());
354
353
  context.update({
355
- params,
354
+ params: {
355
+ path: path.split("/").filter(Boolean)
356
+ },
356
357
  searchParams: convertedSearchParams
357
358
  });
358
- }, [params, searchParams, context]);
359
+ }, [path, searchParams, context]);
359
360
  return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_jsx_runtime2.Fragment, {});
360
361
  };
361
362
 
@@ -659,7 +660,8 @@ var emptyVisitorData = () => ({
659
660
  tests: {},
660
661
  goals: {},
661
662
  consent: false,
662
- controlGroup: false
663
+ controlGroup: false,
664
+ personalizeVariants: {}
663
665
  });
664
666
  var clone = (0, import_rfdc.default)();
665
667
  var STORAGE_KEY = "ufvisitor";
@@ -984,7 +986,11 @@ var useInitUniformContext = (callback) => {
984
986
  };
985
987
 
986
988
  // src/components/DefaultUniformClientContext.tsx
987
- var DefaultUniformClientContext = ({ manifest, disableDevTools }) => {
989
+ var DefaultUniformClientContext = ({
990
+ manifest,
991
+ disableDevTools,
992
+ defaultConsent
993
+ }) => {
988
994
  const router = (0, import_navigation3.useRouter)();
989
995
  useInitUniformContext(() => {
990
996
  const plugins = [];
@@ -999,7 +1005,8 @@ var DefaultUniformClientContext = ({ manifest, disableDevTools }) => {
999
1005
  }
1000
1006
  return createClientUniformContext({
1001
1007
  manifest,
1002
- plugins
1008
+ plugins,
1009
+ defaultConsent
1003
1010
  });
1004
1011
  });
1005
1012
  return null;
package/dist/index.mjs CHANGED
@@ -25,9 +25,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
25
25
  mod
26
26
  ));
27
27
 
28
- // ../../node_modules/.pnpm/rfdc@1.3.0/node_modules/rfdc/index.js
28
+ // ../../node_modules/.pnpm/rfdc@1.3.1/node_modules/rfdc/index.js
29
29
  var require_rfdc = __commonJS({
30
- "../../node_modules/.pnpm/rfdc@1.3.0/node_modules/rfdc/index.js"(exports, module) {
30
+ "../../node_modules/.pnpm/rfdc@1.3.1/node_modules/rfdc/index.js"(exports, module) {
31
31
  "use strict";
32
32
  module.exports = rfdc4;
33
33
  function copyBuffer(cur) {
@@ -314,14 +314,13 @@ var ClientContextualEditingComponentWrapperInner = ({
314
314
  };
315
315
 
316
316
  // src/components/ClientContextUpdate.tsx
317
- import { useParams, useSearchParams as useSearchParams2 } from "next/navigation";
317
+ import { useSearchParams as useSearchParams2 } from "next/navigation";
318
318
  import { Suspense as Suspense2, useEffect as useEffect4 } from "react";
319
319
  import { Fragment as Fragment2, jsx as jsx2 } from "react/jsx-runtime";
320
- var ClientContextUpdate = () => {
321
- return /* @__PURE__ */ jsx2(Suspense2, { children: /* @__PURE__ */ jsx2(ClientContextUpdateInner, {}) });
320
+ var ClientContextUpdate = ({ path }) => {
321
+ return /* @__PURE__ */ jsx2(Suspense2, { children: /* @__PURE__ */ jsx2(ClientContextUpdateInner, { path }) });
322
322
  };
323
- var ClientContextUpdateInner = () => {
324
- const params = useParams();
323
+ var ClientContextUpdateInner = ({ path }) => {
325
324
  const searchParams = useSearchParams2();
326
325
  const { context } = useUniformContext();
327
326
  useEffect4(() => {
@@ -330,10 +329,12 @@ var ClientContextUpdateInner = () => {
330
329
  }
331
330
  const convertedSearchParams = Object.fromEntries(searchParams.entries());
332
331
  context.update({
333
- params,
332
+ params: {
333
+ path: path.split("/").filter(Boolean)
334
+ },
334
335
  searchParams: convertedSearchParams
335
336
  });
336
- }, [params, searchParams, context]);
337
+ }, [path, searchParams, context]);
337
338
  return /* @__PURE__ */ jsx2(Fragment2, {});
338
339
  };
339
340
 
@@ -637,7 +638,8 @@ var emptyVisitorData = () => ({
637
638
  tests: {},
638
639
  goals: {},
639
640
  consent: false,
640
- controlGroup: false
641
+ controlGroup: false,
642
+ personalizeVariants: {}
641
643
  });
642
644
  var clone = (0, import_rfdc.default)();
643
645
  var STORAGE_KEY = "ufvisitor";
@@ -962,7 +964,11 @@ var useInitUniformContext = (callback) => {
962
964
  };
963
965
 
964
966
  // src/components/DefaultUniformClientContext.tsx
965
- var DefaultUniformClientContext = ({ manifest, disableDevTools }) => {
967
+ var DefaultUniformClientContext = ({
968
+ manifest,
969
+ disableDevTools,
970
+ defaultConsent
971
+ }) => {
966
972
  const router = useRouter();
967
973
  useInitUniformContext(() => {
968
974
  const plugins = [];
@@ -977,7 +983,8 @@ var DefaultUniformClientContext = ({ manifest, disableDevTools }) => {
977
983
  }
978
984
  return createClientUniformContext({
979
985
  manifest,
980
- plugins
986
+ plugins,
987
+ defaultConsent
981
988
  });
982
989
  });
983
990
  return null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/canvas-next-rsc-client",
3
- "version": "19.79.1-alpha.13+608a273da",
3
+ "version": "19.79.1-alpha.25+87cea1cd47",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "scripts": {
6
6
  "build": "tsup",
@@ -26,15 +26,15 @@
26
26
  "devDependencies": {
27
27
  "@types/node": "^20.0.0",
28
28
  "@types/react": "18.2.40",
29
- "eslint": "8.54.0",
29
+ "eslint": "8.57.0",
30
30
  "next": "^14.0.0",
31
31
  "react": "18.2.0",
32
32
  "react-dom": "18.2.0"
33
33
  },
34
34
  "dependencies": {
35
- "@uniformdev/canvas": "19.79.1-alpha.13+608a273da",
36
- "@uniformdev/canvas-next-rsc-shared": "^19.79.1-alpha.13+608a273da",
37
- "@uniformdev/canvas-react": "^19.79.1-alpha.13+608a273da"
35
+ "@uniformdev/canvas": "19.79.1-alpha.25+87cea1cd47",
36
+ "@uniformdev/canvas-next-rsc-shared": "^19.79.1-alpha.25+87cea1cd47",
37
+ "@uniformdev/canvas-react": "^19.79.1-alpha.25+87cea1cd47"
38
38
  },
39
39
  "engines": {
40
40
  "node": ">=16.14.0"
@@ -47,5 +47,5 @@
47
47
  "publishConfig": {
48
48
  "access": "public"
49
49
  },
50
- "gitHead": "608a273da87aa432f17b2c8ce15d747dadab0cd1"
50
+ "gitHead": "87cea1cd47c691f7d32b876660d5f7c984bb1d87"
51
51
  }