@uniformdev/canvas-next-rsc-client 19.146.1-alpha.1 → 19.146.2

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.d.mts CHANGED
@@ -1,5 +1,4 @@
1
- import { ManifestV2, TestEvent, ContextOptions } from '@uniformdev/context';
2
- import { PersonalizationEvent } from '@uniformdev/context/*';
1
+ import { ManifestV2, PersonalizationEvent, TestEvent, ContextOptions } from '@uniformdev/context';
3
2
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
3
  import { PureContextualEditingComponentWrapperProps } from '@uniformdev/canvas-react/core';
5
4
  import * as react from 'react';
package/dist/index.d.ts CHANGED
@@ -1,5 +1,4 @@
1
- import { ManifestV2, TestEvent, ContextOptions } from '@uniformdev/context';
2
- import { PersonalizationEvent } from '@uniformdev/context/*';
1
+ import { ManifestV2, PersonalizationEvent, TestEvent, ContextOptions } from '@uniformdev/context';
3
2
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
3
  import { PureContextualEditingComponentWrapperProps } from '@uniformdev/canvas-react/core';
5
4
  import * as react from 'react';
package/dist/index.esm.js CHANGED
@@ -509,21 +509,15 @@ var __privateMethod = (obj, member, method) => {
509
509
  return method;
510
510
  };
511
511
  var ENR_SEPARATOR = "_";
512
- var _signal;
513
- var _id;
514
- _signal = /* @__PURE__ */ new WeakMap();
515
- _id = /* @__PURE__ */ new WeakMap();
516
512
  var _evaluator;
517
513
  var _onLogMessage;
518
514
  _evaluator = /* @__PURE__ */ new WeakMap();
519
515
  _onLogMessage = /* @__PURE__ */ new WeakMap();
520
516
  var _mf;
521
517
  var _signalInstances;
522
- var _goalEvaluators;
523
518
  var _onLogMessage2;
524
519
  _mf = /* @__PURE__ */ new WeakMap();
525
520
  _signalInstances = /* @__PURE__ */ new WeakMap();
526
- _goalEvaluators = /* @__PURE__ */ new WeakMap();
527
521
  _onLogMessage2 = /* @__PURE__ */ new WeakMap();
528
522
  function getEnrichmentVectorKey(category, value) {
529
523
  return `${category}${ENR_SEPARATOR}${value}`;
@@ -628,7 +622,6 @@ var emptyVisitorData = () => ({
628
622
  scores: {},
629
623
  sessionScores: {},
630
624
  tests: {},
631
- goals: {},
632
625
  consent: false,
633
626
  controlGroup: false,
634
627
  personalizeVariants: {}
@@ -661,7 +654,7 @@ currentData_get = function() {
661
654
  };
662
655
  _replaceData = /* @__PURE__ */ new WeakSet();
663
656
  replaceData_fn = function(data, quiet = false) {
664
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
657
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i;
665
658
  const oldData = __privateGet(this, _currentData, currentData_get);
666
659
  const now = Date.now();
667
660
  if (data.controlGroup) {
@@ -682,7 +675,6 @@ replaceData_fn = function(data, quiet = false) {
682
675
  const haveSessionScoresChanged = !dequal(oldData == null ? void 0 : oldData.visitorData.sessionScores, data.sessionScores);
683
676
  const haveQuirksChanged = !dequal(oldData == null ? void 0 : oldData.visitorData.quirks, data.quirks);
684
677
  const haveTestsChanged = !dequal(oldData == null ? void 0 : oldData.visitorData.tests, data.tests);
685
- const haveGoalsChanged = !dequal(oldData == null ? void 0 : oldData.visitorData.goals, data.goals);
686
678
  const updatedData = {
687
679
  updated: now,
688
680
  visitorData: data
@@ -707,15 +699,6 @@ replaceData_fn = function(data, quiet = false) {
707
699
  __privateGet(this, _mitt2).emit("controlGroupUpdated", data);
708
700
  (_i = (_h = __privateGet(this, _options)).onLogMessage) == null ? void 0 : _i.call(_h, ["debug", 104, (_g = data.controlGroup) != null ? _g : false]);
709
701
  }
710
- if (haveGoalsChanged) {
711
- const newGoalKeys = Object.keys((_j = data.goals) != null ? _j : {});
712
- for (let i = 0; i < newGoalKeys.length; i++) {
713
- const key = newGoalKeys[i];
714
- if (!((_k = oldData == null ? void 0 : oldData.visitorData.goals) == null ? void 0 : _k[key])) {
715
- __privateGet(this, _mitt2).emit("goalConverted", { goalId: key });
716
- }
717
- }
718
- }
719
702
  }
720
703
  };
721
704
  _setVisitTimeout = /* @__PURE__ */ new WeakSet();
@@ -766,12 +749,9 @@ var _serverTransitionState;
766
749
  var _scores;
767
750
  var _state;
768
751
  var _pzCache;
769
- var _plugins;
770
752
  var _mitt3;
771
753
  var _emitTest;
772
754
  var emitTest_fn;
773
- var _updateGoals;
774
- var updateGoals_fn;
775
755
  var _updateComputedScores;
776
756
  var updateComputedScores_fn;
777
757
  var _calculateScores;
@@ -780,29 +760,17 @@ _serverTransitionState = /* @__PURE__ */ new WeakMap();
780
760
  _scores = /* @__PURE__ */ new WeakMap();
781
761
  _state = /* @__PURE__ */ new WeakMap();
782
762
  _pzCache = /* @__PURE__ */ new WeakMap();
783
- _plugins = /* @__PURE__ */ new WeakMap();
784
763
  _mitt3 = /* @__PURE__ */ new WeakMap();
785
764
  _emitTest = /* @__PURE__ */ new WeakSet();
786
765
  emitTest_fn = function(event) {
787
766
  __privateGet(this, _mitt3).emit("testResult", event);
788
767
  };
789
- _updateGoals = /* @__PURE__ */ new WeakSet();
790
- updateGoals_fn = async function(data) {
791
- const goalCommands = this.manifest.computeGoals(data);
792
- if (goalCommands.length !== 0) {
793
- await this.storage.updateData(goalCommands);
794
- }
795
- };
796
768
  _updateComputedScores = /* @__PURE__ */ new WeakSet();
797
769
  updateComputedScores_fn = function(newData) {
798
770
  const newScores = __privateMethod(this, _calculateScores, calculateScores_fn).call(this, newData);
799
771
  const newScoresHaveChanged = !dequal(newScores, __privateGet(this, _scores));
800
772
  if (newScoresHaveChanged) {
801
773
  __privateSet(this, _scores, newScores);
802
- __privateMethod(this, _updateGoals, updateGoals_fn).call(this, {
803
- scores: __privateGet(this, _scores),
804
- quirks: void 0
805
- });
806
774
  __privateGet(this, _mitt3).emit("scoresUpdated", newScores);
807
775
  __privateGet(this, _mitt3).emit("log", ["info", 3, newScores]);
808
776
  }
package/dist/index.js CHANGED
@@ -531,21 +531,15 @@ var __privateMethod = (obj, member, method) => {
531
531
  return method;
532
532
  };
533
533
  var ENR_SEPARATOR = "_";
534
- var _signal;
535
- var _id;
536
- _signal = /* @__PURE__ */ new WeakMap();
537
- _id = /* @__PURE__ */ new WeakMap();
538
534
  var _evaluator;
539
535
  var _onLogMessage;
540
536
  _evaluator = /* @__PURE__ */ new WeakMap();
541
537
  _onLogMessage = /* @__PURE__ */ new WeakMap();
542
538
  var _mf;
543
539
  var _signalInstances;
544
- var _goalEvaluators;
545
540
  var _onLogMessage2;
546
541
  _mf = /* @__PURE__ */ new WeakMap();
547
542
  _signalInstances = /* @__PURE__ */ new WeakMap();
548
- _goalEvaluators = /* @__PURE__ */ new WeakMap();
549
543
  _onLogMessage2 = /* @__PURE__ */ new WeakMap();
550
544
  function getEnrichmentVectorKey(category, value) {
551
545
  return `${category}${ENR_SEPARATOR}${value}`;
@@ -650,7 +644,6 @@ var emptyVisitorData = () => ({
650
644
  scores: {},
651
645
  sessionScores: {},
652
646
  tests: {},
653
- goals: {},
654
647
  consent: false,
655
648
  controlGroup: false,
656
649
  personalizeVariants: {}
@@ -683,7 +676,7 @@ currentData_get = function() {
683
676
  };
684
677
  _replaceData = /* @__PURE__ */ new WeakSet();
685
678
  replaceData_fn = function(data, quiet = false) {
686
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
679
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i;
687
680
  const oldData = __privateGet(this, _currentData, currentData_get);
688
681
  const now = Date.now();
689
682
  if (data.controlGroup) {
@@ -704,7 +697,6 @@ replaceData_fn = function(data, quiet = false) {
704
697
  const haveSessionScoresChanged = !dequal(oldData == null ? void 0 : oldData.visitorData.sessionScores, data.sessionScores);
705
698
  const haveQuirksChanged = !dequal(oldData == null ? void 0 : oldData.visitorData.quirks, data.quirks);
706
699
  const haveTestsChanged = !dequal(oldData == null ? void 0 : oldData.visitorData.tests, data.tests);
707
- const haveGoalsChanged = !dequal(oldData == null ? void 0 : oldData.visitorData.goals, data.goals);
708
700
  const updatedData = {
709
701
  updated: now,
710
702
  visitorData: data
@@ -729,15 +721,6 @@ replaceData_fn = function(data, quiet = false) {
729
721
  __privateGet(this, _mitt2).emit("controlGroupUpdated", data);
730
722
  (_i = (_h = __privateGet(this, _options)).onLogMessage) == null ? void 0 : _i.call(_h, ["debug", 104, (_g = data.controlGroup) != null ? _g : false]);
731
723
  }
732
- if (haveGoalsChanged) {
733
- const newGoalKeys = Object.keys((_j = data.goals) != null ? _j : {});
734
- for (let i = 0; i < newGoalKeys.length; i++) {
735
- const key = newGoalKeys[i];
736
- if (!((_k = oldData == null ? void 0 : oldData.visitorData.goals) == null ? void 0 : _k[key])) {
737
- __privateGet(this, _mitt2).emit("goalConverted", { goalId: key });
738
- }
739
- }
740
- }
741
724
  }
742
725
  };
743
726
  _setVisitTimeout = /* @__PURE__ */ new WeakSet();
@@ -788,12 +771,9 @@ var _serverTransitionState;
788
771
  var _scores;
789
772
  var _state;
790
773
  var _pzCache;
791
- var _plugins;
792
774
  var _mitt3;
793
775
  var _emitTest;
794
776
  var emitTest_fn;
795
- var _updateGoals;
796
- var updateGoals_fn;
797
777
  var _updateComputedScores;
798
778
  var updateComputedScores_fn;
799
779
  var _calculateScores;
@@ -802,29 +782,17 @@ _serverTransitionState = /* @__PURE__ */ new WeakMap();
802
782
  _scores = /* @__PURE__ */ new WeakMap();
803
783
  _state = /* @__PURE__ */ new WeakMap();
804
784
  _pzCache = /* @__PURE__ */ new WeakMap();
805
- _plugins = /* @__PURE__ */ new WeakMap();
806
785
  _mitt3 = /* @__PURE__ */ new WeakMap();
807
786
  _emitTest = /* @__PURE__ */ new WeakSet();
808
787
  emitTest_fn = function(event) {
809
788
  __privateGet(this, _mitt3).emit("testResult", event);
810
789
  };
811
- _updateGoals = /* @__PURE__ */ new WeakSet();
812
- updateGoals_fn = async function(data) {
813
- const goalCommands = this.manifest.computeGoals(data);
814
- if (goalCommands.length !== 0) {
815
- await this.storage.updateData(goalCommands);
816
- }
817
- };
818
790
  _updateComputedScores = /* @__PURE__ */ new WeakSet();
819
791
  updateComputedScores_fn = function(newData) {
820
792
  const newScores = __privateMethod(this, _calculateScores, calculateScores_fn).call(this, newData);
821
793
  const newScoresHaveChanged = !dequal(newScores, __privateGet(this, _scores));
822
794
  if (newScoresHaveChanged) {
823
795
  __privateSet(this, _scores, newScores);
824
- __privateMethod(this, _updateGoals, updateGoals_fn).call(this, {
825
- scores: __privateGet(this, _scores),
826
- quirks: void 0
827
- });
828
796
  __privateGet(this, _mitt3).emit("scoresUpdated", newScores);
829
797
  __privateGet(this, _mitt3).emit("log", ["info", 3, newScores]);
830
798
  }
package/dist/index.mjs CHANGED
@@ -509,21 +509,15 @@ var __privateMethod = (obj, member, method) => {
509
509
  return method;
510
510
  };
511
511
  var ENR_SEPARATOR = "_";
512
- var _signal;
513
- var _id;
514
- _signal = /* @__PURE__ */ new WeakMap();
515
- _id = /* @__PURE__ */ new WeakMap();
516
512
  var _evaluator;
517
513
  var _onLogMessage;
518
514
  _evaluator = /* @__PURE__ */ new WeakMap();
519
515
  _onLogMessage = /* @__PURE__ */ new WeakMap();
520
516
  var _mf;
521
517
  var _signalInstances;
522
- var _goalEvaluators;
523
518
  var _onLogMessage2;
524
519
  _mf = /* @__PURE__ */ new WeakMap();
525
520
  _signalInstances = /* @__PURE__ */ new WeakMap();
526
- _goalEvaluators = /* @__PURE__ */ new WeakMap();
527
521
  _onLogMessage2 = /* @__PURE__ */ new WeakMap();
528
522
  function getEnrichmentVectorKey(category, value) {
529
523
  return `${category}${ENR_SEPARATOR}${value}`;
@@ -628,7 +622,6 @@ var emptyVisitorData = () => ({
628
622
  scores: {},
629
623
  sessionScores: {},
630
624
  tests: {},
631
- goals: {},
632
625
  consent: false,
633
626
  controlGroup: false,
634
627
  personalizeVariants: {}
@@ -661,7 +654,7 @@ currentData_get = function() {
661
654
  };
662
655
  _replaceData = /* @__PURE__ */ new WeakSet();
663
656
  replaceData_fn = function(data, quiet = false) {
664
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
657
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i;
665
658
  const oldData = __privateGet(this, _currentData, currentData_get);
666
659
  const now = Date.now();
667
660
  if (data.controlGroup) {
@@ -682,7 +675,6 @@ replaceData_fn = function(data, quiet = false) {
682
675
  const haveSessionScoresChanged = !dequal(oldData == null ? void 0 : oldData.visitorData.sessionScores, data.sessionScores);
683
676
  const haveQuirksChanged = !dequal(oldData == null ? void 0 : oldData.visitorData.quirks, data.quirks);
684
677
  const haveTestsChanged = !dequal(oldData == null ? void 0 : oldData.visitorData.tests, data.tests);
685
- const haveGoalsChanged = !dequal(oldData == null ? void 0 : oldData.visitorData.goals, data.goals);
686
678
  const updatedData = {
687
679
  updated: now,
688
680
  visitorData: data
@@ -707,15 +699,6 @@ replaceData_fn = function(data, quiet = false) {
707
699
  __privateGet(this, _mitt2).emit("controlGroupUpdated", data);
708
700
  (_i = (_h = __privateGet(this, _options)).onLogMessage) == null ? void 0 : _i.call(_h, ["debug", 104, (_g = data.controlGroup) != null ? _g : false]);
709
701
  }
710
- if (haveGoalsChanged) {
711
- const newGoalKeys = Object.keys((_j = data.goals) != null ? _j : {});
712
- for (let i = 0; i < newGoalKeys.length; i++) {
713
- const key = newGoalKeys[i];
714
- if (!((_k = oldData == null ? void 0 : oldData.visitorData.goals) == null ? void 0 : _k[key])) {
715
- __privateGet(this, _mitt2).emit("goalConverted", { goalId: key });
716
- }
717
- }
718
- }
719
702
  }
720
703
  };
721
704
  _setVisitTimeout = /* @__PURE__ */ new WeakSet();
@@ -766,12 +749,9 @@ var _serverTransitionState;
766
749
  var _scores;
767
750
  var _state;
768
751
  var _pzCache;
769
- var _plugins;
770
752
  var _mitt3;
771
753
  var _emitTest;
772
754
  var emitTest_fn;
773
- var _updateGoals;
774
- var updateGoals_fn;
775
755
  var _updateComputedScores;
776
756
  var updateComputedScores_fn;
777
757
  var _calculateScores;
@@ -780,29 +760,17 @@ _serverTransitionState = /* @__PURE__ */ new WeakMap();
780
760
  _scores = /* @__PURE__ */ new WeakMap();
781
761
  _state = /* @__PURE__ */ new WeakMap();
782
762
  _pzCache = /* @__PURE__ */ new WeakMap();
783
- _plugins = /* @__PURE__ */ new WeakMap();
784
763
  _mitt3 = /* @__PURE__ */ new WeakMap();
785
764
  _emitTest = /* @__PURE__ */ new WeakSet();
786
765
  emitTest_fn = function(event) {
787
766
  __privateGet(this, _mitt3).emit("testResult", event);
788
767
  };
789
- _updateGoals = /* @__PURE__ */ new WeakSet();
790
- updateGoals_fn = async function(data) {
791
- const goalCommands = this.manifest.computeGoals(data);
792
- if (goalCommands.length !== 0) {
793
- await this.storage.updateData(goalCommands);
794
- }
795
- };
796
768
  _updateComputedScores = /* @__PURE__ */ new WeakSet();
797
769
  updateComputedScores_fn = function(newData) {
798
770
  const newScores = __privateMethod(this, _calculateScores, calculateScores_fn).call(this, newData);
799
771
  const newScoresHaveChanged = !dequal(newScores, __privateGet(this, _scores));
800
772
  if (newScoresHaveChanged) {
801
773
  __privateSet(this, _scores, newScores);
802
- __privateMethod(this, _updateGoals, updateGoals_fn).call(this, {
803
- scores: __privateGet(this, _scores),
804
- quirks: void 0
805
- });
806
774
  __privateGet(this, _mitt3).emit("scoresUpdated", newScores);
807
775
  __privateGet(this, _mitt3).emit("log", ["info", 3, newScores]);
808
776
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/canvas-next-rsc-client",
3
- "version": "19.146.1-alpha.1+09e4a2e410",
3
+ "version": "19.146.2",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "scripts": {
6
6
  "build": "tsup",
@@ -32,9 +32,9 @@
32
32
  "react-dom": "18.2.0"
33
33
  },
34
34
  "dependencies": {
35
- "@uniformdev/canvas": "19.146.1-alpha.1+09e4a2e410",
36
- "@uniformdev/canvas-next-rsc-shared": "^19.146.1-alpha.1+09e4a2e410",
37
- "@uniformdev/canvas-react": "^19.146.1-alpha.1+09e4a2e410"
35
+ "@uniformdev/canvas": "19.146.2",
36
+ "@uniformdev/canvas-next-rsc-shared": "^19.146.2",
37
+ "@uniformdev/canvas-react": "^19.146.2"
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": "09e4a2e410c296598810ae2d1bf3b5988390e4d6"
50
+ "gitHead": "b50ddfe5e2c16293966e69c78dd1daa70222c52e"
51
51
  }