@uniformdev/context-vue 20.6.1-alpha.0 → 20.6.2-alpha.10

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
@@ -21,6 +21,8 @@ type PersonalizeComponentProps = {
21
21
  component: PersonalizedVariationComponent;
22
22
  /** The number of variations to select. Use for personalized lists where the `count` most relevant should be shown. */
23
23
  count?: number;
24
+ /** The algorithm to use for personalization, if not the default. */
25
+ algorithm?: string;
24
26
  };
25
27
  declare const Personalize: vue.DefineComponent<vue.ExtractPropTypes<{
26
28
  name: {
@@ -39,6 +41,10 @@ declare const Personalize: vue.DefineComponent<vue.ExtractPropTypes<{
39
41
  type: PropType<PersonalizeComponentProps["count"]>;
40
42
  default: number;
41
43
  };
44
+ algorithm: {
45
+ type: PropType<PersonalizeComponentProps["algorithm"]>;
46
+ default: string;
47
+ };
42
48
  }>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
43
49
  [key: string]: any;
44
50
  }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
@@ -58,11 +64,16 @@ declare const Personalize: vue.DefineComponent<vue.ExtractPropTypes<{
58
64
  type: PropType<PersonalizeComponentProps["count"]>;
59
65
  default: number;
60
66
  };
67
+ algorithm: {
68
+ type: PropType<PersonalizeComponentProps["algorithm"]>;
69
+ default: string;
70
+ };
61
71
  }>> & Readonly<{}>, {
62
72
  count: number | undefined;
73
+ algorithm: string | undefined;
63
74
  }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
64
75
 
65
- declare const PersonalizeStandard: vue.DefineComponent<vue.ExtractPropTypes<{
76
+ declare const PersonalizeEdge: vue.DefineComponent<vue.ExtractPropTypes<{
66
77
  name: {
67
78
  type: PropType<PersonalizeComponentProps["name"]>;
68
79
  required: true;
@@ -79,6 +90,10 @@ declare const PersonalizeStandard: vue.DefineComponent<vue.ExtractPropTypes<{
79
90
  type: PropType<PersonalizeComponentProps["count"]>;
80
91
  default: number;
81
92
  };
93
+ algorithm: {
94
+ type: PropType<PersonalizeComponentProps["algorithm"]>;
95
+ default: string;
96
+ };
82
97
  }>, () => (vue.VNode<vue.RendererNode, vue.RendererElement, {
83
98
  [key: string]: any;
84
99
  }> | vue.VNode<vue.RendererNode, vue.RendererElement, {
@@ -100,8 +115,13 @@ declare const PersonalizeStandard: vue.DefineComponent<vue.ExtractPropTypes<{
100
115
  type: PropType<PersonalizeComponentProps["count"]>;
101
116
  default: number;
102
117
  };
118
+ algorithm: {
119
+ type: PropType<PersonalizeComponentProps["algorithm"]>;
120
+ default: string;
121
+ };
103
122
  }>> & Readonly<{}>, {
104
123
  count: number | undefined;
124
+ algorithm: string | undefined;
105
125
  }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
106
126
 
107
127
  interface TestComponentProps {
@@ -311,4 +331,4 @@ declare const useQuirks: () => vue.Ref<Quirks, Quirks>;
311
331
  */
312
332
  declare const useScores: () => vue.Ref<ScoreVector, ScoreVector>;
313
333
 
314
- export { Personalize, type PersonalizeComponentProps, PersonalizeStandard as PersonalizeEdge, type PersonalizedVariationComponent, type PersonalizedVariationComponentProps, Test, type TestComponentProps, Track, TrackSlot, type UniformContextProps, UniformContextProvider, type VariantOutputType, isUsingUniformContext, onRouteChange, provideIsPersonalized, provideUniformContext, uniformContextInjectionKey, useIsPersonalized, useQuirks, useScores, useUniformContext };
334
+ export { Personalize, type PersonalizeComponentProps, PersonalizeEdge, type PersonalizedVariationComponent, type PersonalizedVariationComponentProps, Test, type TestComponentProps, Track, TrackSlot, type UniformContextProps, UniformContextProvider, type VariantOutputType, isUsingUniformContext, onRouteChange, provideIsPersonalized, provideUniformContext, uniformContextInjectionKey, useIsPersonalized, useQuirks, useScores, useUniformContext };
package/dist/index.d.ts CHANGED
@@ -21,6 +21,8 @@ type PersonalizeComponentProps = {
21
21
  component: PersonalizedVariationComponent;
22
22
  /** The number of variations to select. Use for personalized lists where the `count` most relevant should be shown. */
23
23
  count?: number;
24
+ /** The algorithm to use for personalization, if not the default. */
25
+ algorithm?: string;
24
26
  };
25
27
  declare const Personalize: vue.DefineComponent<vue.ExtractPropTypes<{
26
28
  name: {
@@ -39,6 +41,10 @@ declare const Personalize: vue.DefineComponent<vue.ExtractPropTypes<{
39
41
  type: PropType<PersonalizeComponentProps["count"]>;
40
42
  default: number;
41
43
  };
44
+ algorithm: {
45
+ type: PropType<PersonalizeComponentProps["algorithm"]>;
46
+ default: string;
47
+ };
42
48
  }>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
43
49
  [key: string]: any;
44
50
  }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
@@ -58,11 +64,16 @@ declare const Personalize: vue.DefineComponent<vue.ExtractPropTypes<{
58
64
  type: PropType<PersonalizeComponentProps["count"]>;
59
65
  default: number;
60
66
  };
67
+ algorithm: {
68
+ type: PropType<PersonalizeComponentProps["algorithm"]>;
69
+ default: string;
70
+ };
61
71
  }>> & Readonly<{}>, {
62
72
  count: number | undefined;
73
+ algorithm: string | undefined;
63
74
  }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
64
75
 
65
- declare const PersonalizeStandard: vue.DefineComponent<vue.ExtractPropTypes<{
76
+ declare const PersonalizeEdge: vue.DefineComponent<vue.ExtractPropTypes<{
66
77
  name: {
67
78
  type: PropType<PersonalizeComponentProps["name"]>;
68
79
  required: true;
@@ -79,6 +90,10 @@ declare const PersonalizeStandard: vue.DefineComponent<vue.ExtractPropTypes<{
79
90
  type: PropType<PersonalizeComponentProps["count"]>;
80
91
  default: number;
81
92
  };
93
+ algorithm: {
94
+ type: PropType<PersonalizeComponentProps["algorithm"]>;
95
+ default: string;
96
+ };
82
97
  }>, () => (vue.VNode<vue.RendererNode, vue.RendererElement, {
83
98
  [key: string]: any;
84
99
  }> | vue.VNode<vue.RendererNode, vue.RendererElement, {
@@ -100,8 +115,13 @@ declare const PersonalizeStandard: vue.DefineComponent<vue.ExtractPropTypes<{
100
115
  type: PropType<PersonalizeComponentProps["count"]>;
101
116
  default: number;
102
117
  };
118
+ algorithm: {
119
+ type: PropType<PersonalizeComponentProps["algorithm"]>;
120
+ default: string;
121
+ };
103
122
  }>> & Readonly<{}>, {
104
123
  count: number | undefined;
124
+ algorithm: string | undefined;
105
125
  }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
106
126
 
107
127
  interface TestComponentProps {
@@ -311,4 +331,4 @@ declare const useQuirks: () => vue.Ref<Quirks, Quirks>;
311
331
  */
312
332
  declare const useScores: () => vue.Ref<ScoreVector, ScoreVector>;
313
333
 
314
- export { Personalize, type PersonalizeComponentProps, PersonalizeStandard as PersonalizeEdge, type PersonalizedVariationComponent, type PersonalizedVariationComponentProps, Test, type TestComponentProps, Track, TrackSlot, type UniformContextProps, UniformContextProvider, type VariantOutputType, isUsingUniformContext, onRouteChange, provideIsPersonalized, provideUniformContext, uniformContextInjectionKey, useIsPersonalized, useQuirks, useScores, useUniformContext };
334
+ export { Personalize, type PersonalizeComponentProps, PersonalizeEdge, type PersonalizedVariationComponent, type PersonalizedVariationComponentProps, Test, type TestComponentProps, Track, TrackSlot, type UniformContextProps, UniformContextProvider, type VariantOutputType, isUsingUniformContext, onRouteChange, provideIsPersonalized, provideUniformContext, uniformContextInjectionKey, useIsPersonalized, useQuirks, useScores, useUniformContext };
package/dist/index.esm.js CHANGED
@@ -58,8 +58,8 @@ function isUsingUniformContext() {
58
58
  // src/components/personalize/PersonalizeEdge.ts
59
59
  import { EdgeNodeTagName, ScriptType } from "@uniformdev/context";
60
60
  import { defineComponent, h } from "vue";
61
- var PersonalizeStandard = defineComponent({
62
- name: "PersonalizeStandard",
61
+ var PersonalizeEdge = defineComponent({
62
+ name: "PersonalizeEdge",
63
63
  inheritAttrs: false,
64
64
  props: {
65
65
  name: {
@@ -77,13 +77,18 @@ var PersonalizeStandard = defineComponent({
77
77
  count: {
78
78
  type: Number,
79
79
  default: 1
80
+ },
81
+ algorithm: {
82
+ type: String,
83
+ default: "default"
80
84
  }
81
85
  },
82
86
  setup(props) {
83
87
  var _a;
84
88
  const options = {
85
89
  name: props.name,
86
- count: (_a = props.count) != null ? _a : 1
90
+ count: (_a = props.count) != null ? _a : 1,
91
+ algorithm: props.algorithm
87
92
  };
88
93
  return () => [
89
94
  h(EdgeNodeTagName, { "data-type": ScriptType.ListStart, innerHTML: JSON.stringify(options) }),
@@ -108,7 +113,7 @@ var PersonalizeStandard = defineComponent({
108
113
  ];
109
114
  }
110
115
  });
111
- var PersonalizeEdge_default = PersonalizeStandard;
116
+ var PersonalizeEdge_default = PersonalizeEdge;
112
117
 
113
118
  // src/components/personalize/PersonalizeStandard.ts
114
119
  import { defineComponent as defineComponent3, h as h3, ref as ref2, toRaw, watch } from "vue";
@@ -163,7 +168,7 @@ var PersonalizeProvider = defineComponent2({
163
168
  var PersonalizeProvider_default = PersonalizeProvider;
164
169
 
165
170
  // src/components/personalize/PersonalizeStandard.ts
166
- var PersonalizeStandard2 = defineComponent3({
171
+ var PersonalizeStandard = defineComponent3({
167
172
  name: "PersonalizeStandard",
168
173
  inheritAttrs: false,
169
174
  props: {
@@ -182,6 +187,10 @@ var PersonalizeStandard2 = defineComponent3({
182
187
  count: {
183
188
  type: Number,
184
189
  default: 1
190
+ },
191
+ algorithm: {
192
+ type: String,
193
+ default: "default"
185
194
  }
186
195
  },
187
196
  setup(props) {
@@ -192,7 +201,8 @@ var PersonalizeStandard2 = defineComponent3({
192
201
  return uniformContext.personalize({
193
202
  name: toRaw(props.name),
194
203
  variations: toRaw(props.variations),
195
- take: (_a = toRaw(props.count)) != null ? _a : 1
204
+ take: (_a = toRaw(props.count)) != null ? _a : 1,
205
+ algorithm: toRaw(props.algorithm)
196
206
  });
197
207
  };
198
208
  const personalizedResult = ref2(personalize());
@@ -219,7 +229,6 @@ var PersonalizeStandard2 = defineComponent3({
219
229
  );
220
230
  }
221
231
  });
222
- var PersonalizeStandard_default = PersonalizeStandard2;
223
232
 
224
233
  // src/components/personalize/Personalize.ts
225
234
  var Personalize = defineComponent4({
@@ -241,11 +250,15 @@ var Personalize = defineComponent4({
241
250
  count: {
242
251
  type: Number,
243
252
  default: 1
253
+ },
254
+ algorithm: {
255
+ type: String,
256
+ default: "default"
244
257
  }
245
258
  },
246
259
  setup(props) {
247
260
  const { outputType } = useUniformContext();
248
- return () => h4(!isServer || outputType === "standard" ? PersonalizeStandard_default : PersonalizeEdge_default, { ...props });
261
+ return () => h4(!isServer || outputType === "standard" ? PersonalizeStandard : PersonalizeEdge, { ...props });
249
262
  }
250
263
  });
251
264
  var Personalize_default = Personalize;
package/dist/index.js CHANGED
@@ -98,8 +98,8 @@ function isUsingUniformContext() {
98
98
  // src/components/personalize/PersonalizeEdge.ts
99
99
  var import_context = require("@uniformdev/context");
100
100
  var import_vue2 = require("vue");
101
- var PersonalizeStandard = (0, import_vue2.defineComponent)({
102
- name: "PersonalizeStandard",
101
+ var PersonalizeEdge = (0, import_vue2.defineComponent)({
102
+ name: "PersonalizeEdge",
103
103
  inheritAttrs: false,
104
104
  props: {
105
105
  name: {
@@ -117,13 +117,18 @@ var PersonalizeStandard = (0, import_vue2.defineComponent)({
117
117
  count: {
118
118
  type: Number,
119
119
  default: 1
120
+ },
121
+ algorithm: {
122
+ type: String,
123
+ default: "default"
120
124
  }
121
125
  },
122
126
  setup(props) {
123
127
  var _a;
124
128
  const options = {
125
129
  name: props.name,
126
- count: (_a = props.count) != null ? _a : 1
130
+ count: (_a = props.count) != null ? _a : 1,
131
+ algorithm: props.algorithm
127
132
  };
128
133
  return () => [
129
134
  (0, import_vue2.h)(import_context.EdgeNodeTagName, { "data-type": import_context.ScriptType.ListStart, innerHTML: JSON.stringify(options) }),
@@ -148,7 +153,7 @@ var PersonalizeStandard = (0, import_vue2.defineComponent)({
148
153
  ];
149
154
  }
150
155
  });
151
- var PersonalizeEdge_default = PersonalizeStandard;
156
+ var PersonalizeEdge_default = PersonalizeEdge;
152
157
 
153
158
  // src/components/personalize/PersonalizeStandard.ts
154
159
  var import_vue6 = require("vue");
@@ -203,7 +208,7 @@ var PersonalizeProvider = (0, import_vue5.defineComponent)({
203
208
  var PersonalizeProvider_default = PersonalizeProvider;
204
209
 
205
210
  // src/components/personalize/PersonalizeStandard.ts
206
- var PersonalizeStandard2 = (0, import_vue6.defineComponent)({
211
+ var PersonalizeStandard = (0, import_vue6.defineComponent)({
207
212
  name: "PersonalizeStandard",
208
213
  inheritAttrs: false,
209
214
  props: {
@@ -222,6 +227,10 @@ var PersonalizeStandard2 = (0, import_vue6.defineComponent)({
222
227
  count: {
223
228
  type: Number,
224
229
  default: 1
230
+ },
231
+ algorithm: {
232
+ type: String,
233
+ default: "default"
225
234
  }
226
235
  },
227
236
  setup(props) {
@@ -232,7 +241,8 @@ var PersonalizeStandard2 = (0, import_vue6.defineComponent)({
232
241
  return uniformContext.personalize({
233
242
  name: (0, import_vue6.toRaw)(props.name),
234
243
  variations: (0, import_vue6.toRaw)(props.variations),
235
- take: (_a = (0, import_vue6.toRaw)(props.count)) != null ? _a : 1
244
+ take: (_a = (0, import_vue6.toRaw)(props.count)) != null ? _a : 1,
245
+ algorithm: (0, import_vue6.toRaw)(props.algorithm)
236
246
  });
237
247
  };
238
248
  const personalizedResult = (0, import_vue6.ref)(personalize());
@@ -259,7 +269,6 @@ var PersonalizeStandard2 = (0, import_vue6.defineComponent)({
259
269
  );
260
270
  }
261
271
  });
262
- var PersonalizeStandard_default = PersonalizeStandard2;
263
272
 
264
273
  // src/components/personalize/Personalize.ts
265
274
  var Personalize = (0, import_vue7.defineComponent)({
@@ -281,11 +290,15 @@ var Personalize = (0, import_vue7.defineComponent)({
281
290
  count: {
282
291
  type: Number,
283
292
  default: 1
293
+ },
294
+ algorithm: {
295
+ type: String,
296
+ default: "default"
284
297
  }
285
298
  },
286
299
  setup(props) {
287
300
  const { outputType } = useUniformContext();
288
- return () => (0, import_vue7.h)(!isServer || outputType === "standard" ? PersonalizeStandard_default : PersonalizeEdge_default, { ...props });
301
+ return () => (0, import_vue7.h)(!isServer || outputType === "standard" ? PersonalizeStandard : PersonalizeEdge, { ...props });
289
302
  }
290
303
  });
291
304
  var Personalize_default = Personalize;
package/dist/index.mjs CHANGED
@@ -58,8 +58,8 @@ function isUsingUniformContext() {
58
58
  // src/components/personalize/PersonalizeEdge.ts
59
59
  import { EdgeNodeTagName, ScriptType } from "@uniformdev/context";
60
60
  import { defineComponent, h } from "vue";
61
- var PersonalizeStandard = defineComponent({
62
- name: "PersonalizeStandard",
61
+ var PersonalizeEdge = defineComponent({
62
+ name: "PersonalizeEdge",
63
63
  inheritAttrs: false,
64
64
  props: {
65
65
  name: {
@@ -77,13 +77,18 @@ var PersonalizeStandard = defineComponent({
77
77
  count: {
78
78
  type: Number,
79
79
  default: 1
80
+ },
81
+ algorithm: {
82
+ type: String,
83
+ default: "default"
80
84
  }
81
85
  },
82
86
  setup(props) {
83
87
  var _a;
84
88
  const options = {
85
89
  name: props.name,
86
- count: (_a = props.count) != null ? _a : 1
90
+ count: (_a = props.count) != null ? _a : 1,
91
+ algorithm: props.algorithm
87
92
  };
88
93
  return () => [
89
94
  h(EdgeNodeTagName, { "data-type": ScriptType.ListStart, innerHTML: JSON.stringify(options) }),
@@ -108,7 +113,7 @@ var PersonalizeStandard = defineComponent({
108
113
  ];
109
114
  }
110
115
  });
111
- var PersonalizeEdge_default = PersonalizeStandard;
116
+ var PersonalizeEdge_default = PersonalizeEdge;
112
117
 
113
118
  // src/components/personalize/PersonalizeStandard.ts
114
119
  import { defineComponent as defineComponent3, h as h3, ref as ref2, toRaw, watch } from "vue";
@@ -163,7 +168,7 @@ var PersonalizeProvider = defineComponent2({
163
168
  var PersonalizeProvider_default = PersonalizeProvider;
164
169
 
165
170
  // src/components/personalize/PersonalizeStandard.ts
166
- var PersonalizeStandard2 = defineComponent3({
171
+ var PersonalizeStandard = defineComponent3({
167
172
  name: "PersonalizeStandard",
168
173
  inheritAttrs: false,
169
174
  props: {
@@ -182,6 +187,10 @@ var PersonalizeStandard2 = defineComponent3({
182
187
  count: {
183
188
  type: Number,
184
189
  default: 1
190
+ },
191
+ algorithm: {
192
+ type: String,
193
+ default: "default"
185
194
  }
186
195
  },
187
196
  setup(props) {
@@ -192,7 +201,8 @@ var PersonalizeStandard2 = defineComponent3({
192
201
  return uniformContext.personalize({
193
202
  name: toRaw(props.name),
194
203
  variations: toRaw(props.variations),
195
- take: (_a = toRaw(props.count)) != null ? _a : 1
204
+ take: (_a = toRaw(props.count)) != null ? _a : 1,
205
+ algorithm: toRaw(props.algorithm)
196
206
  });
197
207
  };
198
208
  const personalizedResult = ref2(personalize());
@@ -219,7 +229,6 @@ var PersonalizeStandard2 = defineComponent3({
219
229
  );
220
230
  }
221
231
  });
222
- var PersonalizeStandard_default = PersonalizeStandard2;
223
232
 
224
233
  // src/components/personalize/Personalize.ts
225
234
  var Personalize = defineComponent4({
@@ -241,11 +250,15 @@ var Personalize = defineComponent4({
241
250
  count: {
242
251
  type: Number,
243
252
  default: 1
253
+ },
254
+ algorithm: {
255
+ type: String,
256
+ default: "default"
244
257
  }
245
258
  },
246
259
  setup(props) {
247
260
  const { outputType } = useUniformContext();
248
- return () => h4(!isServer || outputType === "standard" ? PersonalizeStandard_default : PersonalizeEdge_default, { ...props });
261
+ return () => h4(!isServer || outputType === "standard" ? PersonalizeStandard : PersonalizeEdge, { ...props });
249
262
  }
250
263
  });
251
264
  var Personalize_default = Personalize;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/context-vue",
3
- "version": "20.6.1-alpha.0+7c7f42aabc",
3
+ "version": "20.6.2-alpha.10+ff8a28da1a",
4
4
  "description": "Vue SDK for Uniform Context",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "./dist/index.js",
@@ -30,7 +30,7 @@
30
30
  "document": "api-extractor run --local"
31
31
  },
32
32
  "dependencies": {
33
- "@uniformdev/context": "20.6.1-alpha.0+7c7f42aabc",
33
+ "@uniformdev/context": "20.6.2-alpha.10+ff8a28da1a",
34
34
  "cookie-es": "^1.0.0",
35
35
  "dequal": "^2.0.2",
36
36
  "uuid": "9.0.1"
@@ -59,5 +59,5 @@
59
59
  "publishConfig": {
60
60
  "access": "public"
61
61
  },
62
- "gitHead": "7c7f42aabc94d1692a2dbfbccc73f2bbbee200fe"
62
+ "gitHead": "ff8a28da1a7c11416e5585bc4cb66032bcb6ab53"
63
63
  }