@uniformdev/context 19.211.1-alpha.2 → 19.211.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/api/api.d.mts +1 -1
- package/dist/api/api.d.ts +1 -1
- package/dist/index.d.mts +5 -3
- package/dist/index.d.ts +5 -3
- package/dist/index.esm.js +9 -2
- package/dist/index.js +10 -2
- package/dist/index.mjs +9 -2
- package/dist/{types-CqKOO0nP.d.mts → types-EJl31yuP.d.mts} +7 -1
- package/dist/{types-CqKOO0nP.d.ts → types-EJl31yuP.d.ts} +7 -1
- package/package.json +2 -2
package/dist/api/api.d.mts
CHANGED
package/dist/api/api.d.ts
CHANGED
package/dist/index.d.mts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
import { O as OutputSeverity, L as LogDrain, C as ContextPlugin, S as ScoreVector, A as AggregateDimension, T as TransitionDataStore, a as StorageCommands, V as VisitorData, Q as Quirks, b as TransitionDataStoreOptions, D as DecayFunction, c as CriteriaEvaluator, d as StringMatch, e as VariantMatchCriteria, f as LogMessage, g as DevToolsEvents } from './types-
|
2
|
-
export { $ as AggregateDimensionInput, a5 as BehaviorTag, h as CONTEXTUAL_EDITING_TEST_NAME, i as CONTEXTUAL_EDITING_TEST_SELECTED_VARIANT_ID, n as Context, l as ContextEvents, m as ContextInstance, j as ContextOptions, az as ContextState, aA as ContextStateUpdate, J as CriteriaEvaluatorParameters, I as CriteriaEvaluatorResult, ao as DecayOptions, q as DevToolsActions, t as DevToolsDataEvent, r as DevToolsEvent, x as DevToolsForgetEvent, u as DevToolsHelloEvent, s as DevToolsLogEvent, w as DevToolsRawCommandsEvent, p as DevToolsState, o as DevToolsUiVersion, v as DevToolsUpdateEvent, a2 as DimensionMatch, Y as EnrichmentCategory, au as EnrichmentData, ax as EventData, aB as GoalStateUpdate, at as Goals, H as GroupCriteriaEvaluator, ah as IdentifyCommand, F as LogMessageGroup, E as LogMessageSingle, y as LogMessages, G as ManifestInstance, N as ManifestV2, M as MessageCategory, B as MessageFunc, ac as ModifyScoreCommand, ad as ModifySessionScoreCommand, Z as NumberMatch, P as PersonalizationEvent, R as PersonalizationManifest, av as PersonalizeControlVariant, a3 as PersonalizeOptions, aw as PersonalizeVariants, a7 as PersonalizedResult, a6 as PersonalizedVariant, am as SERVER_STATE_ID, al as ServerToClientTransitionState, ae as SetConsentCommand, ai as SetControlGroupCommand, ab as SetGoalCommand, aj as SetPersonalizeVariantControlCommand, af as SetQuirkCommand, ag as SetTestCommand, z as Severity, U as Signal, X as SignalCriteria, W as SignalCriteriaGroup, K as SignalData, aa as StorageCommand, _ as TestDefinition, k as TestEvent, a0 as TestOptions, a9 as TestResult, a8 as TestVariant, as as Tests, an as TransitionDataStoreEvents, ar as VisitorDataStore, aq as VisitorDataStoreEvents, ap as VisitorDataStoreOptions, ak as areCommandsEqual, ay as emptyVisitorData, a4 as personalizeVariations, a1 as testVariations } from './types-
|
1
|
+
import { O as OutputSeverity, L as LogDrain, C as ContextPlugin, S as ScoreVector, A as AggregateDimension, T as TransitionDataStore, a as StorageCommands, V as VisitorData, Q as Quirks, b as TransitionDataStoreOptions, D as DecayFunction, c as CriteriaEvaluator, d as StringMatch, e as VariantMatchCriteria, f as LogMessage, g as DevToolsEvents } from './types-EJl31yuP.mjs';
|
2
|
+
export { $ as AggregateDimensionInput, a5 as BehaviorTag, h as CONTEXTUAL_EDITING_TEST_NAME, i as CONTEXTUAL_EDITING_TEST_SELECTED_VARIANT_ID, n as Context, l as ContextEvents, m as ContextInstance, j as ContextOptions, az as ContextState, aA as ContextStateUpdate, J as CriteriaEvaluatorParameters, I as CriteriaEvaluatorResult, ao as DecayOptions, q as DevToolsActions, t as DevToolsDataEvent, r as DevToolsEvent, x as DevToolsForgetEvent, u as DevToolsHelloEvent, s as DevToolsLogEvent, w as DevToolsRawCommandsEvent, p as DevToolsState, o as DevToolsUiVersion, v as DevToolsUpdateEvent, a2 as DimensionMatch, Y as EnrichmentCategory, au as EnrichmentData, ax as EventData, aB as GoalStateUpdate, at as Goals, H as GroupCriteriaEvaluator, ah as IdentifyCommand, F as LogMessageGroup, E as LogMessageSingle, y as LogMessages, G as ManifestInstance, N as ManifestV2, M as MessageCategory, B as MessageFunc, ac as ModifyScoreCommand, ad as ModifySessionScoreCommand, Z as NumberMatch, P as PersonalizationEvent, R as PersonalizationManifest, av as PersonalizeControlVariant, a3 as PersonalizeOptions, aw as PersonalizeVariants, a7 as PersonalizedResult, a6 as PersonalizedVariant, am as SERVER_STATE_ID, al as ServerToClientTransitionState, ae as SetConsentCommand, ai as SetControlGroupCommand, ab as SetGoalCommand, aj as SetPersonalizeVariantControlCommand, af as SetQuirkCommand, ag as SetTestCommand, z as Severity, U as Signal, X as SignalCriteria, W as SignalCriteriaGroup, K as SignalData, aa as StorageCommand, _ as TestDefinition, k as TestEvent, a0 as TestOptions, a9 as TestResult, a8 as TestVariant, as as Tests, an as TransitionDataStoreEvents, ar as VisitorDataStore, aq as VisitorDataStoreEvents, ap as VisitorDataStoreOptions, ak as areCommandsEqual, ay as emptyVisitorData, a4 as personalizeVariations, a1 as testVariations } from './types-EJl31yuP.mjs';
|
3
3
|
import Cookies from 'js-cookie';
|
4
4
|
import 'mitt';
|
5
5
|
|
@@ -20,6 +20,8 @@ declare function enableConsoleLogDrain(level: OutputSeverity): ContextPlugin;
|
|
20
20
|
/** Computes aggregated scores based on other dimensions */
|
21
21
|
declare function computeAggregateDimensions(primitiveScores: ScoreVector, aggregates: Record<string, AggregateDimension>): ScoreVector;
|
22
22
|
|
23
|
+
declare const ENR_SEPARATOR = "_";
|
24
|
+
|
23
25
|
type CookieTransitionDataStoreOptions = {
|
24
26
|
/**
|
25
27
|
* The value of the score cookie during server-side rendering.
|
@@ -209,4 +211,4 @@ type QuickConnectConfig = {
|
|
209
211
|
declare function serializeQuickConnect(config: QuickConnectConfig): string;
|
210
212
|
declare function parseQuickConnect(serialized: string): Required<QuickConnectConfig>;
|
211
213
|
|
212
|
-
export { AggregateDimension, type ConsoleDebugLogDrainOptions, type ContextDevToolOptions, ContextPlugin, CookieTransitionDataStore, type CookieTransitionDataStoreOptions, CriteriaEvaluator, DecayFunction, DevToolsEvents, EdgeNodeTagName, type EdgePersonalizeComponentOptions, type EdgeTestComponentOptions, EdgeTransitionDataStore, type EdgeTransitionDataStoreOptions, type EnableUniformInsightsOptions, KV_SEP, type LinearDecayOptions, LogDrain, LogMessage, OutputSeverity, PAIR_SEP, QUIRK_SEP, type QuickConnectConfig, Quirks, ScoreVector, ScriptType, StorageCommands, StringMatch, TYPE_SEP, TransitionDataStore, TransitionDataStoreOptions, UNIFORM_DEFAULT_COOKIE_NAME, UNIFORM_DEFAULT_QUIRK_COOKIE_NAME, VariantMatchCriteria, VisitorData, computeAggregateDimensions, cookieEvaluator, createConsoleLogDrain, createDebugConsoleLogDrain, createLinearDecay, currentPageEvaluator, decodeCookieType, decodePersonalizeVariants, enableConsoleLogDrain, enableContextDevTools, enableDebugConsoleLogDrain, enableUniformInsights, encodeCookieType, evaluateVariantMatch, eventEvaluator, explainStringMatch, explainStringMatchCriteria, getEnrichmentVectorKey, isStringMatch, pageViewCountDimension, pageViewCountEvaluator, parseCookieScores, parseCookieType, parseQuickConnect, parseQuirkCookie, parseScoreCookie, queryStringEvaluator, quirkEvaluator, serializeCookie, serializeCookieType, serializePersonalizeVariants, serializeQuickConnect, serializeQuirks };
|
214
|
+
export { AggregateDimension, type ConsoleDebugLogDrainOptions, type ContextDevToolOptions, ContextPlugin, CookieTransitionDataStore, type CookieTransitionDataStoreOptions, CriteriaEvaluator, DecayFunction, DevToolsEvents, ENR_SEPARATOR, EdgeNodeTagName, type EdgePersonalizeComponentOptions, type EdgeTestComponentOptions, EdgeTransitionDataStore, type EdgeTransitionDataStoreOptions, type EnableUniformInsightsOptions, KV_SEP, type LinearDecayOptions, LogDrain, LogMessage, OutputSeverity, PAIR_SEP, QUIRK_SEP, type QuickConnectConfig, Quirks, ScoreVector, ScriptType, StorageCommands, StringMatch, TYPE_SEP, TransitionDataStore, TransitionDataStoreOptions, UNIFORM_DEFAULT_COOKIE_NAME, UNIFORM_DEFAULT_QUIRK_COOKIE_NAME, VariantMatchCriteria, VisitorData, computeAggregateDimensions, cookieEvaluator, createConsoleLogDrain, createDebugConsoleLogDrain, createLinearDecay, currentPageEvaluator, decodeCookieType, decodePersonalizeVariants, enableConsoleLogDrain, enableContextDevTools, enableDebugConsoleLogDrain, enableUniformInsights, encodeCookieType, evaluateVariantMatch, eventEvaluator, explainStringMatch, explainStringMatchCriteria, getEnrichmentVectorKey, isStringMatch, pageViewCountDimension, pageViewCountEvaluator, parseCookieScores, parseCookieType, parseQuickConnect, parseQuirkCookie, parseScoreCookie, queryStringEvaluator, quirkEvaluator, serializeCookie, serializeCookieType, serializePersonalizeVariants, serializeQuickConnect, serializeQuirks };
|
package/dist/index.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
import { O as OutputSeverity, L as LogDrain, C as ContextPlugin, S as ScoreVector, A as AggregateDimension, T as TransitionDataStore, a as StorageCommands, V as VisitorData, Q as Quirks, b as TransitionDataStoreOptions, D as DecayFunction, c as CriteriaEvaluator, d as StringMatch, e as VariantMatchCriteria, f as LogMessage, g as DevToolsEvents } from './types-
|
2
|
-
export { $ as AggregateDimensionInput, a5 as BehaviorTag, h as CONTEXTUAL_EDITING_TEST_NAME, i as CONTEXTUAL_EDITING_TEST_SELECTED_VARIANT_ID, n as Context, l as ContextEvents, m as ContextInstance, j as ContextOptions, az as ContextState, aA as ContextStateUpdate, J as CriteriaEvaluatorParameters, I as CriteriaEvaluatorResult, ao as DecayOptions, q as DevToolsActions, t as DevToolsDataEvent, r as DevToolsEvent, x as DevToolsForgetEvent, u as DevToolsHelloEvent, s as DevToolsLogEvent, w as DevToolsRawCommandsEvent, p as DevToolsState, o as DevToolsUiVersion, v as DevToolsUpdateEvent, a2 as DimensionMatch, Y as EnrichmentCategory, au as EnrichmentData, ax as EventData, aB as GoalStateUpdate, at as Goals, H as GroupCriteriaEvaluator, ah as IdentifyCommand, F as LogMessageGroup, E as LogMessageSingle, y as LogMessages, G as ManifestInstance, N as ManifestV2, M as MessageCategory, B as MessageFunc, ac as ModifyScoreCommand, ad as ModifySessionScoreCommand, Z as NumberMatch, P as PersonalizationEvent, R as PersonalizationManifest, av as PersonalizeControlVariant, a3 as PersonalizeOptions, aw as PersonalizeVariants, a7 as PersonalizedResult, a6 as PersonalizedVariant, am as SERVER_STATE_ID, al as ServerToClientTransitionState, ae as SetConsentCommand, ai as SetControlGroupCommand, ab as SetGoalCommand, aj as SetPersonalizeVariantControlCommand, af as SetQuirkCommand, ag as SetTestCommand, z as Severity, U as Signal, X as SignalCriteria, W as SignalCriteriaGroup, K as SignalData, aa as StorageCommand, _ as TestDefinition, k as TestEvent, a0 as TestOptions, a9 as TestResult, a8 as TestVariant, as as Tests, an as TransitionDataStoreEvents, ar as VisitorDataStore, aq as VisitorDataStoreEvents, ap as VisitorDataStoreOptions, ak as areCommandsEqual, ay as emptyVisitorData, a4 as personalizeVariations, a1 as testVariations } from './types-
|
1
|
+
import { O as OutputSeverity, L as LogDrain, C as ContextPlugin, S as ScoreVector, A as AggregateDimension, T as TransitionDataStore, a as StorageCommands, V as VisitorData, Q as Quirks, b as TransitionDataStoreOptions, D as DecayFunction, c as CriteriaEvaluator, d as StringMatch, e as VariantMatchCriteria, f as LogMessage, g as DevToolsEvents } from './types-EJl31yuP.js';
|
2
|
+
export { $ as AggregateDimensionInput, a5 as BehaviorTag, h as CONTEXTUAL_EDITING_TEST_NAME, i as CONTEXTUAL_EDITING_TEST_SELECTED_VARIANT_ID, n as Context, l as ContextEvents, m as ContextInstance, j as ContextOptions, az as ContextState, aA as ContextStateUpdate, J as CriteriaEvaluatorParameters, I as CriteriaEvaluatorResult, ao as DecayOptions, q as DevToolsActions, t as DevToolsDataEvent, r as DevToolsEvent, x as DevToolsForgetEvent, u as DevToolsHelloEvent, s as DevToolsLogEvent, w as DevToolsRawCommandsEvent, p as DevToolsState, o as DevToolsUiVersion, v as DevToolsUpdateEvent, a2 as DimensionMatch, Y as EnrichmentCategory, au as EnrichmentData, ax as EventData, aB as GoalStateUpdate, at as Goals, H as GroupCriteriaEvaluator, ah as IdentifyCommand, F as LogMessageGroup, E as LogMessageSingle, y as LogMessages, G as ManifestInstance, N as ManifestV2, M as MessageCategory, B as MessageFunc, ac as ModifyScoreCommand, ad as ModifySessionScoreCommand, Z as NumberMatch, P as PersonalizationEvent, R as PersonalizationManifest, av as PersonalizeControlVariant, a3 as PersonalizeOptions, aw as PersonalizeVariants, a7 as PersonalizedResult, a6 as PersonalizedVariant, am as SERVER_STATE_ID, al as ServerToClientTransitionState, ae as SetConsentCommand, ai as SetControlGroupCommand, ab as SetGoalCommand, aj as SetPersonalizeVariantControlCommand, af as SetQuirkCommand, ag as SetTestCommand, z as Severity, U as Signal, X as SignalCriteria, W as SignalCriteriaGroup, K as SignalData, aa as StorageCommand, _ as TestDefinition, k as TestEvent, a0 as TestOptions, a9 as TestResult, a8 as TestVariant, as as Tests, an as TransitionDataStoreEvents, ar as VisitorDataStore, aq as VisitorDataStoreEvents, ap as VisitorDataStoreOptions, ak as areCommandsEqual, ay as emptyVisitorData, a4 as personalizeVariations, a1 as testVariations } from './types-EJl31yuP.js';
|
3
3
|
import Cookies from 'js-cookie';
|
4
4
|
import 'mitt';
|
5
5
|
|
@@ -20,6 +20,8 @@ declare function enableConsoleLogDrain(level: OutputSeverity): ContextPlugin;
|
|
20
20
|
/** Computes aggregated scores based on other dimensions */
|
21
21
|
declare function computeAggregateDimensions(primitiveScores: ScoreVector, aggregates: Record<string, AggregateDimension>): ScoreVector;
|
22
22
|
|
23
|
+
declare const ENR_SEPARATOR = "_";
|
24
|
+
|
23
25
|
type CookieTransitionDataStoreOptions = {
|
24
26
|
/**
|
25
27
|
* The value of the score cookie during server-side rendering.
|
@@ -209,4 +211,4 @@ type QuickConnectConfig = {
|
|
209
211
|
declare function serializeQuickConnect(config: QuickConnectConfig): string;
|
210
212
|
declare function parseQuickConnect(serialized: string): Required<QuickConnectConfig>;
|
211
213
|
|
212
|
-
export { AggregateDimension, type ConsoleDebugLogDrainOptions, type ContextDevToolOptions, ContextPlugin, CookieTransitionDataStore, type CookieTransitionDataStoreOptions, CriteriaEvaluator, DecayFunction, DevToolsEvents, EdgeNodeTagName, type EdgePersonalizeComponentOptions, type EdgeTestComponentOptions, EdgeTransitionDataStore, type EdgeTransitionDataStoreOptions, type EnableUniformInsightsOptions, KV_SEP, type LinearDecayOptions, LogDrain, LogMessage, OutputSeverity, PAIR_SEP, QUIRK_SEP, type QuickConnectConfig, Quirks, ScoreVector, ScriptType, StorageCommands, StringMatch, TYPE_SEP, TransitionDataStore, TransitionDataStoreOptions, UNIFORM_DEFAULT_COOKIE_NAME, UNIFORM_DEFAULT_QUIRK_COOKIE_NAME, VariantMatchCriteria, VisitorData, computeAggregateDimensions, cookieEvaluator, createConsoleLogDrain, createDebugConsoleLogDrain, createLinearDecay, currentPageEvaluator, decodeCookieType, decodePersonalizeVariants, enableConsoleLogDrain, enableContextDevTools, enableDebugConsoleLogDrain, enableUniformInsights, encodeCookieType, evaluateVariantMatch, eventEvaluator, explainStringMatch, explainStringMatchCriteria, getEnrichmentVectorKey, isStringMatch, pageViewCountDimension, pageViewCountEvaluator, parseCookieScores, parseCookieType, parseQuickConnect, parseQuirkCookie, parseScoreCookie, queryStringEvaluator, quirkEvaluator, serializeCookie, serializeCookieType, serializePersonalizeVariants, serializeQuickConnect, serializeQuirks };
|
214
|
+
export { AggregateDimension, type ConsoleDebugLogDrainOptions, type ContextDevToolOptions, ContextPlugin, CookieTransitionDataStore, type CookieTransitionDataStoreOptions, CriteriaEvaluator, DecayFunction, DevToolsEvents, ENR_SEPARATOR, EdgeNodeTagName, type EdgePersonalizeComponentOptions, type EdgeTestComponentOptions, EdgeTransitionDataStore, type EdgeTransitionDataStoreOptions, type EnableUniformInsightsOptions, KV_SEP, type LinearDecayOptions, LogDrain, LogMessage, OutputSeverity, PAIR_SEP, QUIRK_SEP, type QuickConnectConfig, Quirks, ScoreVector, ScriptType, StorageCommands, StringMatch, TYPE_SEP, TransitionDataStore, TransitionDataStoreOptions, UNIFORM_DEFAULT_COOKIE_NAME, UNIFORM_DEFAULT_QUIRK_COOKIE_NAME, VariantMatchCriteria, VisitorData, computeAggregateDimensions, cookieEvaluator, createConsoleLogDrain, createDebugConsoleLogDrain, createLinearDecay, currentPageEvaluator, decodeCookieType, decodePersonalizeVariants, enableConsoleLogDrain, enableContextDevTools, enableDebugConsoleLogDrain, enableUniformInsights, encodeCookieType, evaluateVariantMatch, eventEvaluator, explainStringMatch, explainStringMatchCriteria, getEnrichmentVectorKey, isStringMatch, pageViewCountDimension, pageViewCountEvaluator, parseCookieScores, parseCookieType, parseQuickConnect, parseQuirkCookie, parseScoreCookie, queryStringEvaluator, quirkEvaluator, serializeCookie, serializeCookieType, serializePersonalizeVariants, serializeQuickConnect, serializeQuirks };
|
package/dist/index.esm.js
CHANGED
@@ -1622,7 +1622,9 @@ var Context = class {
|
|
1622
1622
|
* Updates the Context with new data of any sort, such as
|
1623
1623
|
* new URLs, cookies, quirks, and enrichments.
|
1624
1624
|
*
|
1625
|
-
* Only properties that are set in the data parameter will be updated
|
1625
|
+
* Only properties that are set in the data parameter will be updated,
|
1626
|
+
* for example if passing `url` but not `cookies`, the last known state of cookies will be preserved.
|
1627
|
+
*
|
1626
1628
|
* Properties that do not result in a changed state,
|
1627
1629
|
* i.e. pushing the same URL or cookies as before,
|
1628
1630
|
* will NOT result in a recomputation of signal state.
|
@@ -1706,9 +1708,13 @@ var Context = class {
|
|
1706
1708
|
}
|
1707
1709
|
});
|
1708
1710
|
}
|
1711
|
+
const effectiveNewStateForSignalComputation = {
|
1712
|
+
...__privateGet(this, _state),
|
1713
|
+
...newData
|
1714
|
+
};
|
1709
1715
|
commands.push(
|
1710
1716
|
...this.manifest.computeSignals({
|
1711
|
-
state:
|
1717
|
+
state: effectiveNewStateForSignalComputation,
|
1712
1718
|
previousState: __privateGet(this, _state),
|
1713
1719
|
visitor: this.storage.data,
|
1714
1720
|
// re-compute using scores from storage instead of the current scores since
|
@@ -2594,6 +2600,7 @@ export {
|
|
2594
2600
|
CONTEXTUAL_EDITING_TEST_SELECTED_VARIANT_ID,
|
2595
2601
|
Context,
|
2596
2602
|
CookieTransitionDataStore,
|
2603
|
+
ENR_SEPARATOR,
|
2597
2604
|
EdgeNodeTagName,
|
2598
2605
|
EdgeTransitionDataStore,
|
2599
2606
|
GroupCriteriaEvaluator,
|
package/dist/index.js
CHANGED
@@ -44,6 +44,7 @@ __export(src_exports, {
|
|
44
44
|
CONTEXTUAL_EDITING_TEST_SELECTED_VARIANT_ID: () => CONTEXTUAL_EDITING_TEST_SELECTED_VARIANT_ID,
|
45
45
|
Context: () => Context,
|
46
46
|
CookieTransitionDataStore: () => CookieTransitionDataStore,
|
47
|
+
ENR_SEPARATOR: () => ENR_SEPARATOR,
|
47
48
|
EdgeNodeTagName: () => EdgeNodeTagName,
|
48
49
|
EdgeTransitionDataStore: () => EdgeTransitionDataStore,
|
49
50
|
GroupCriteriaEvaluator: () => GroupCriteriaEvaluator,
|
@@ -1710,7 +1711,9 @@ var Context = class {
|
|
1710
1711
|
* Updates the Context with new data of any sort, such as
|
1711
1712
|
* new URLs, cookies, quirks, and enrichments.
|
1712
1713
|
*
|
1713
|
-
* Only properties that are set in the data parameter will be updated
|
1714
|
+
* Only properties that are set in the data parameter will be updated,
|
1715
|
+
* for example if passing `url` but not `cookies`, the last known state of cookies will be preserved.
|
1716
|
+
*
|
1714
1717
|
* Properties that do not result in a changed state,
|
1715
1718
|
* i.e. pushing the same URL or cookies as before,
|
1716
1719
|
* will NOT result in a recomputation of signal state.
|
@@ -1794,9 +1797,13 @@ var Context = class {
|
|
1794
1797
|
}
|
1795
1798
|
});
|
1796
1799
|
}
|
1800
|
+
const effectiveNewStateForSignalComputation = {
|
1801
|
+
...__privateGet(this, _state),
|
1802
|
+
...newData
|
1803
|
+
};
|
1797
1804
|
commands.push(
|
1798
1805
|
...this.manifest.computeSignals({
|
1799
|
-
state:
|
1806
|
+
state: effectiveNewStateForSignalComputation,
|
1800
1807
|
previousState: __privateGet(this, _state),
|
1801
1808
|
visitor: this.storage.data,
|
1802
1809
|
// re-compute using scores from storage instead of the current scores since
|
@@ -2683,6 +2690,7 @@ function parseQuickConnect(serialized) {
|
|
2683
2690
|
CONTEXTUAL_EDITING_TEST_SELECTED_VARIANT_ID,
|
2684
2691
|
Context,
|
2685
2692
|
CookieTransitionDataStore,
|
2693
|
+
ENR_SEPARATOR,
|
2686
2694
|
EdgeNodeTagName,
|
2687
2695
|
EdgeTransitionDataStore,
|
2688
2696
|
GroupCriteriaEvaluator,
|
package/dist/index.mjs
CHANGED
@@ -1622,7 +1622,9 @@ var Context = class {
|
|
1622
1622
|
* Updates the Context with new data of any sort, such as
|
1623
1623
|
* new URLs, cookies, quirks, and enrichments.
|
1624
1624
|
*
|
1625
|
-
* Only properties that are set in the data parameter will be updated
|
1625
|
+
* Only properties that are set in the data parameter will be updated,
|
1626
|
+
* for example if passing `url` but not `cookies`, the last known state of cookies will be preserved.
|
1627
|
+
*
|
1626
1628
|
* Properties that do not result in a changed state,
|
1627
1629
|
* i.e. pushing the same URL or cookies as before,
|
1628
1630
|
* will NOT result in a recomputation of signal state.
|
@@ -1706,9 +1708,13 @@ var Context = class {
|
|
1706
1708
|
}
|
1707
1709
|
});
|
1708
1710
|
}
|
1711
|
+
const effectiveNewStateForSignalComputation = {
|
1712
|
+
...__privateGet(this, _state),
|
1713
|
+
...newData
|
1714
|
+
};
|
1709
1715
|
commands.push(
|
1710
1716
|
...this.manifest.computeSignals({
|
1711
|
-
state:
|
1717
|
+
state: effectiveNewStateForSignalComputation,
|
1712
1718
|
previousState: __privateGet(this, _state),
|
1713
1719
|
visitor: this.storage.data,
|
1714
1720
|
// re-compute using scores from storage instead of the current scores since
|
@@ -2594,6 +2600,7 @@ export {
|
|
2594
2600
|
CONTEXTUAL_EDITING_TEST_SELECTED_VARIANT_ID,
|
2595
2601
|
Context,
|
2596
2602
|
CookieTransitionDataStore,
|
2603
|
+
ENR_SEPARATOR,
|
2597
2604
|
EdgeNodeTagName,
|
2598
2605
|
EdgeTransitionDataStore,
|
2599
2606
|
GroupCriteriaEvaluator,
|
@@ -87,9 +87,13 @@ type ContextState = {
|
|
87
87
|
events: EventData[];
|
88
88
|
};
|
89
89
|
type ContextStateUpdate = {
|
90
|
+
/** The new effective state of the visitor after this state update is applied */
|
90
91
|
state: Partial<ContextState>;
|
92
|
+
/** The last state of the visitor before this state update */
|
91
93
|
previousState: Partial<ContextState>;
|
94
|
+
/** The visitor we are updating */
|
92
95
|
visitor: VisitorData;
|
96
|
+
/** The visitor's scores before this state update */
|
93
97
|
scores: ScoreVector;
|
94
98
|
};
|
95
99
|
type GoalStateUpdate = {
|
@@ -1149,7 +1153,9 @@ declare class Context implements ContextInstance {
|
|
1149
1153
|
* Updates the Context with new data of any sort, such as
|
1150
1154
|
* new URLs, cookies, quirks, and enrichments.
|
1151
1155
|
*
|
1152
|
-
* Only properties that are set in the data parameter will be updated
|
1156
|
+
* Only properties that are set in the data parameter will be updated,
|
1157
|
+
* for example if passing `url` but not `cookies`, the last known state of cookies will be preserved.
|
1158
|
+
*
|
1153
1159
|
* Properties that do not result in a changed state,
|
1154
1160
|
* i.e. pushing the same URL or cookies as before,
|
1155
1161
|
* will NOT result in a recomputation of signal state.
|
@@ -87,9 +87,13 @@ type ContextState = {
|
|
87
87
|
events: EventData[];
|
88
88
|
};
|
89
89
|
type ContextStateUpdate = {
|
90
|
+
/** The new effective state of the visitor after this state update is applied */
|
90
91
|
state: Partial<ContextState>;
|
92
|
+
/** The last state of the visitor before this state update */
|
91
93
|
previousState: Partial<ContextState>;
|
94
|
+
/** The visitor we are updating */
|
92
95
|
visitor: VisitorData;
|
96
|
+
/** The visitor's scores before this state update */
|
93
97
|
scores: ScoreVector;
|
94
98
|
};
|
95
99
|
type GoalStateUpdate = {
|
@@ -1149,7 +1153,9 @@ declare class Context implements ContextInstance {
|
|
1149
1153
|
* Updates the Context with new data of any sort, such as
|
1150
1154
|
* new URLs, cookies, quirks, and enrichments.
|
1151
1155
|
*
|
1152
|
-
* Only properties that are set in the data parameter will be updated
|
1156
|
+
* Only properties that are set in the data parameter will be updated,
|
1157
|
+
* for example if passing `url` but not `cookies`, the last known state of cookies will be preserved.
|
1158
|
+
*
|
1153
1159
|
* Properties that do not result in a changed state,
|
1154
1160
|
* i.e. pushing the same URL or cookies as before,
|
1155
1161
|
* will NOT result in a recomputation of signal state.
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@uniformdev/context",
|
3
|
-
"version": "19.211.1-alpha.
|
3
|
+
"version": "19.211.1-alpha.4+213f2551e6",
|
4
4
|
"description": "Uniform Context core package",
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
6
6
|
"main": "./dist/index.js",
|
@@ -68,5 +68,5 @@
|
|
68
68
|
"publishConfig": {
|
69
69
|
"access": "public"
|
70
70
|
},
|
71
|
-
"gitHead": "
|
71
|
+
"gitHead": "213f2551e6e6581792e683cbdb80e3c467a0386d"
|
72
72
|
}
|