@posthog/browser-common 0.10.7 → 0.10.8

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/config.js CHANGED
@@ -27,7 +27,7 @@ var __webpack_require__ = {};
27
27
  })();
28
28
  var __webpack_exports__ = {};
29
29
  __webpack_require__.r(__webpack_exports__);
30
- const packageVersion = "0.10.7";
30
+ const packageVersion = "0.10.8";
31
31
  const Config = {
32
32
  DEBUG: false,
33
33
  LIB_VERSION: packageVersion,
package/dist/config.mjs CHANGED
@@ -1,4 +1,4 @@
1
- const packageVersion = "0.10.7";
1
+ const packageVersion = "0.10.8";
2
2
  const Config = {
3
3
  DEBUG: false,
4
4
  LIB_VERSION: packageVersion,
@@ -140,37 +140,223 @@ const IconPosthogLogo = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("svg
140
140
  children: [
141
141
  /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("g", {
142
142
  "clip-path": "url(#ph-survey-logo-clip)",
143
+ style: "opacity: calc(1 - var(--ph-logo-mono, 0))",
143
144
  children: [
144
145
  /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("path", {
145
146
  fill: "currentColor",
146
- d: "m50 23.34-.35-.05A4.5 4.5 0 0 1 47 21.97L35.56 10.1c-.3-.33-.86-.1-.86.35V27.5c0 .27.22.5.5.5h13.78c1.48 0 2.67-1.2 2.67-2.67v-.1a1.9 1.9 0 0 0-1.67-1.89zm-10.81.2a1.8 1.8 0 1 1 0-3.58 1.8 1.8 0 0 1 0 3.58"
147
+ d: "M51.66 25.22A1.9 1.9 0 0 0 50 23.33l-.34-.04c-1-.13-1.94-.6-2.65-1.33L33.28 7.75V28H49a2.66 2.66 0 0 0 2.67-2.67zM39.2 23.54h-.09a1.78 1.78 0 1 1 .1 0"
147
148
  }),
148
149
  /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("path", {
149
- fill: "#0054ff",
150
- d: "M.87 19.13a.5.5 0 0 0-.87.34v5.94a2.6 2.6 0 0 0 2.59 2.58H7.8a.5.5 0 0 0 .37-.84zM.86 8.4c-.3-.32-.86-.1-.86.36v6.73q0 .2.13.34l8.81 9.68 1.8 2.06v-8.82zM4.59.82A2.67 2.67 0 0 0 0 2.68v1.93q0 .4.27.69l10.47 10.95v-9.1z"
150
+ fill: "url(#ph-survey-logo-paint0)",
151
+ d: "M21.96 2.67v4.96l11.3 11.6h.02V7.75L26.63.85a2.8 2.8 0 0 0-2-.85 2.67 2.67 0 0 0-2.67 2.67"
151
152
  }),
152
153
  /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("path", {
153
- fill: "#ff5506",
154
- d: "M11.36 28h7.08a.5.5 0 0 0 .36-.85l-8.05-8.4v8.8l.23.28q.16.17.38.17m-.61-11.76 8.84 9.25 2.1 2.33q.1.11.27.14V18.7L10.75 7.15zm0-13.7v1.41a2 2 0 0 0 .55 1.28L21.96 16.2V7.65L15.32.8a2.67 2.67 0 0 0-4.57 1.71z"
154
+ fill: "url(#ph-survey-logo-paint1)",
155
+ d: "M21.96 7.63v11.05L31.03 28h2.25v-8.75z"
155
156
  }),
156
157
  /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("path", {
157
- fill: "#ffb70f",
158
- d: "M22.06 28h7.76a.5.5 0 0 0 .36-.86l-8.22-8.45v9.27l.09.02zM31 25.49l1.13 1.14c.32.31.85.09.85-.35v-7.3l-.49-.51L21.96 7.64v8.55zM22.52 5.73l9.62 9.89c.3.32.86.1.86-.35V7.46L26.56.82a2.67 2.67 0 0 0-4.59 1.84v1.7c0 .51.2 1 .57 1.37z"
158
+ fill: "url(#ph-survey-logo-paint2)",
159
+ d: "M21.96 28h9.07l-9.07-9.32z"
160
+ }),
161
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("path", {
162
+ fill: "url(#ph-survey-logo-paint3)",
163
+ d: "M10.74 2.66v4.5l11.22 11.52V7.63L15.3.8a2.66 2.66 0 0 0-4.56 1.86"
164
+ }),
165
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("path", {
166
+ fill: "url(#ph-survey-logo-paint4)",
167
+ d: "M10.74 28h8.96l-8.96-9.32z"
168
+ }),
169
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("path", {
170
+ fill: "url(#ph-survey-logo-paint5)",
171
+ d: "M10.74 7.16v11.52L19.7 28h2.26v-9.32z"
172
+ }),
173
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("path", {
174
+ fill: "url(#ph-survey-logo-paint6)",
175
+ d: "M10.74 7.16 4.54.8A2.66 2.66 0 0 0 0 2.66V7.5l10.74 11.18z"
176
+ }),
177
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("path", {
178
+ fill: "url(#ph-survey-logo-paint7)",
179
+ d: "M9.19 28h1.55v-9.32L0 7.5v10.73z"
180
+ }),
181
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("path", {
182
+ fill: "url(#ph-survey-logo-paint8)",
183
+ d: "M0 25.41A2.6 2.6 0 0 0 2.58 28H9.2L0 18.23z"
159
184
  })
160
185
  ]
161
186
  }),
187
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("path", {
188
+ "clip-path": "url(#ph-survey-logo-clip)",
189
+ fill: "currentColor",
190
+ style: "opacity: var(--ph-logo-mono, 0)",
191
+ d: "m50.02 23.34-.34-.04c-1-.13-1.95-.6-2.66-1.33L35.58 10.11a.5.5 0 0 0-.86.35V27.5c0 .28.22.5.5.5H49c1.48 0 2.67-1.2 2.67-2.67v-.1a1.9 1.9 0 0 0-1.66-1.9m-10.81.2a1.78 1.78 0 1 1 0-3.56 1.78 1.78 0 0 1 0 3.57M0 25.41A2.6 2.6 0 0 0 2.59 28h5.22a.5.5 0 0 0 .37-.84L.87 19.13a.5.5 0 0 0-.87.34zm18.81 1.74a.5.5 0 0 1-.36.85h-7.09a.5.5 0 0 1-.37-.17L8.94 25.5.13 15.82A.5.5 0 0 1 0 15.5V8.75a.5.5 0 0 1 .86-.34zM0 2.68C0 .28 2.92-.91 4.59.82l25.6 26.33a.5.5 0 0 1-.36.85h-7.76a.5.5 0 0 1-.37-.17l-2.1-2.33L.28 5.3A1 1 0 0 1 0 4.6zm10.74 0c0-2.4 2.92-3.59 4.59-1.87L32.5 18.48l.5.51v7.3a.5.5 0 0 1-.86.35l-1.12-1.14L11.3 5.23a2 2 0 0 1-.57-1.4zM33 7.46v7.8a.5.5 0 0 1-.85.36l-9.61-9.89a2 2 0 0 1-.57-1.4V2.69c0-2.4 2.92-3.59 4.59-1.86z"
192
+ }),
162
193
  /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("path", {
163
194
  fill: "currentColor",
164
195
  d: "M64.9 22.88c-.67 0-1.23-.56-1.23-1.24V5.24c0-.69.56-1.24 1.24-1.24h6.55c3.89 0 6.39 2.32 6.39 5.9 0 3.6-2.5 5.91-6.4 5.91h-3.53v5.83c0 .68-.56 1.24-1.24 1.24zm3.02-11.94c0 .68.55 1.23 1.23 1.23h1.88c1.6 0 2.58-.86 2.58-2.26s-.97-2.27-2.58-2.27h-1.88c-.68 0-1.23.55-1.23 1.23zM84.71 23.1c-4.18 0-7.14-2.97-7.14-7.02s2.96-7.01 7.14-7.01c4.14 0 7.14 2.97 7.14 7.01 0 4.05-3 7.01-7.14 7.01m-3.22-7.02c0 2.16 1.3 3.64 3.22 3.64 1.9 0 3.2-1.48 3.2-3.64s-1.3-3.64-3.2-3.64c-1.93 0-3.22 1.48-3.22 3.64m16.34 7.03a6.2 6.2 0 0 1-5.54-3.01c-.34-.57-.01-1.26.6-1.5l.77-.3c.7-.27 1.45.15 1.92.73a2.8 2.8 0 0 0 2.25 1.08c1.05 0 1.75-.51 1.75-1.27 0-2.13-7.17-.7-7.17-5.85 0-2.13 1.85-3.91 4.83-3.91 2.27 0 4.2.9 5.17 2.31.36.53.05 1.2-.54 1.44l-.85.35c-.68.29-1.45-.14-2-.63a2.5 2.5 0 0 0-1.64-.64c-.89 0-1.5.38-1.5.97 0 2.16 7.27.38 7.27 5.88 0 2.35-2.15 4.34-5.32 4.34m14.64-1.31c.04.57-.3 1.1-.86 1.2q-.6.1-1.27.11c-2.92 0-5.15-1.56-5.15-4.85v-5.66h-.91c-.69 0-1.24-.56-1.24-1.24v-.82c0-.68.55-1.23 1.24-1.23h.91v-2.7c0-.69.55-1.24 1.23-1.24h1.48c.68 0 1.24.55 1.24 1.23v2.7h2.04c.68 0 1.23.56 1.23 1.24v.82c0 .68-.55 1.24-1.23 1.24h-2.04v5.15c0 1.2.64 1.91 1.6 1.91.75 0 1.6.5 1.66 1.25zM125.5 5.23c0-.68.55-1.23 1.23-1.23h1.8c.68 0 1.23.55 1.23 1.23v16.41c0 .68-.55 1.24-1.23 1.24h-1.8c-.68 0-1.23-.56-1.23-1.24v-5.43c0-.68-.56-1.23-1.24-1.23h-5c-.67 0-1.23.55-1.23 1.23v5.43c0 .68-.55 1.24-1.23 1.24h-1.77c-.69 0-1.24-.56-1.24-1.24V5.24c0-.69.55-1.24 1.24-1.24h1.77c.68 0 1.23.55 1.23 1.23v4.87c0 .68.56 1.23 1.24 1.23h5c.67 0 1.23-.55 1.23-1.23zm12.87 17.87c-4.19 0-7.14-2.97-7.14-7.02s2.95-7.01 7.14-7.01c4.13 0 7.14 2.97 7.14 7.01 0 4.05-3 7.01-7.14 7.01m-3.22-7.02c0 2.16 1.29 3.64 3.22 3.64 1.9 0 3.2-1.48 3.2-3.64s-1.3-3.64-3.2-3.64c-1.93 0-3.22 1.48-3.22 3.64m17.17 6.37c-3.84 0-6.2-2.58-6.2-6.68s2.36-6.69 6.12-6.69c1.58 0 2.82.54 3.54 1.37 0-.64.52-1.15 1.16-1.15h1.5c.68 0 1.24.55 1.24 1.23V21.9c0 3.64-2.77 6.09-6.93 6.09-2.64 0-4.9-1.2-5.85-3.09-.31-.62.16-1.29.85-1.4l1.14-.17c.67-.11 1.29.4 1.78.85.5.46 1.26.7 2.08.7 1.85 0 3.06-1.04 3.06-2.55v-1.3c-.7.9-2.01 1.4-3.49 1.4m-2.36-6.68c0 2.02 1.18 3.31 3 3.31 1.86 0 3.04-1.29 3.04-3.31s-1.18-3.32-3.03-3.32c-1.83 0-3.01 1.3-3.01 3.32"
165
196
  }),
166
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("defs", {
167
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("clipPath", {
168
- id: "ph-survey-logo-clip",
169
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("path", {
170
- fill: "#fff",
171
- d: "M0 0h51.67v28H0z"
197
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("defs", {
198
+ children: [
199
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("linearGradient", {
200
+ id: "ph-survey-logo-paint0",
201
+ x1: "21.96",
202
+ x2: "33.28",
203
+ y1: "9.62",
204
+ y2: "9.62",
205
+ gradientUnits: "userSpaceOnUse",
206
+ children: [
207
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("stop", {
208
+ "stop-color": "#ffd849"
209
+ }),
210
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("stop", {
211
+ offset: ".96",
212
+ "stop-color": "#fbae01"
213
+ })
214
+ ]
215
+ }),
216
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("linearGradient", {
217
+ id: "ph-survey-logo-paint1",
218
+ x1: "21.96",
219
+ x2: "33.28",
220
+ y1: "17.81",
221
+ y2: "17.81",
222
+ gradientUnits: "userSpaceOnUse",
223
+ children: [
224
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("stop", {
225
+ "stop-color": "#ffb700"
226
+ }),
227
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("stop", {
228
+ offset: "1",
229
+ "stop-color": "#f9aa01"
230
+ })
231
+ ]
232
+ }),
233
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("linearGradient", {
234
+ id: "ph-survey-logo-paint2",
235
+ x1: "21.96",
236
+ x2: "31.03",
237
+ y1: "23.34",
238
+ y2: "23.34",
239
+ gradientUnits: "userSpaceOnUse",
240
+ children: [
241
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("stop", {
242
+ "stop-color": "#ff9500"
243
+ }),
244
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("stop", {
245
+ offset: "1",
246
+ "stop-color": "#f8aa00"
247
+ })
248
+ ]
249
+ }),
250
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("linearGradient", {
251
+ id: "ph-survey-logo-paint3",
252
+ x1: "10.74",
253
+ x2: "21.96",
254
+ y1: "9.34",
255
+ y2: "9.34",
256
+ gradientUnits: "userSpaceOnUse",
257
+ children: [
258
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("stop", {
259
+ "stop-color": "#ff651e"
260
+ }),
261
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("stop", {
262
+ offset: "1",
263
+ "stop-color": "#e4400a"
264
+ })
265
+ ]
266
+ }),
267
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("linearGradient", {
268
+ id: "ph-survey-logo-paint4",
269
+ x1: "10.74",
270
+ x2: "19.7",
271
+ y1: "23.34",
272
+ y2: "23.34",
273
+ gradientUnits: "userSpaceOnUse",
274
+ children: [
275
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("stop", {
276
+ "stop-color": "#c42c00"
277
+ }),
278
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("stop", {
279
+ offset: "1",
280
+ "stop-color": "#d63600"
281
+ })
282
+ ]
283
+ }),
284
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("linearGradient", {
285
+ id: "ph-survey-logo-paint5",
286
+ x1: "10.74",
287
+ x2: "21.96",
288
+ y1: "17.58",
289
+ y2: "17.58",
290
+ gradientUnits: "userSpaceOnUse",
291
+ children: [
292
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("stop", {
293
+ "stop-color": "#ef3c00"
294
+ }),
295
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("stop", {
296
+ offset: "1",
297
+ "stop-color": "#d63601"
298
+ })
299
+ ]
300
+ }),
301
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("linearGradient", {
302
+ id: "ph-survey-logo-paint6",
303
+ x1: "0",
304
+ x2: "10.74",
305
+ y1: "9.34",
306
+ y2: "9.34",
307
+ gradientUnits: "userSpaceOnUse",
308
+ children: [
309
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("stop", {
310
+ "stop-color": "#3f80ff"
311
+ }),
312
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("stop", {
313
+ offset: "1",
314
+ "stop-color": "#084fe0"
315
+ })
316
+ ]
317
+ }),
318
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("linearGradient", {
319
+ id: "ph-survey-logo-paint7",
320
+ x1: "0",
321
+ x2: "10.74",
322
+ y1: "17.75",
323
+ y2: "17.75",
324
+ gradientUnits: "userSpaceOnUse",
325
+ children: [
326
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("stop", {
327
+ "stop-color": "#0255ff"
328
+ }),
329
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("stop", {
330
+ offset: "1",
331
+ "stop-color": "#0145d2"
332
+ })
333
+ ]
334
+ }),
335
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("linearGradient", {
336
+ id: "ph-survey-logo-paint8",
337
+ x1: "0",
338
+ x2: "9.19",
339
+ y1: "23.11",
340
+ y2: "23.11",
341
+ gradientUnits: "userSpaceOnUse",
342
+ children: [
343
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("stop", {
344
+ "stop-color": "#0041c6"
345
+ }),
346
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("stop", {
347
+ offset: "1",
348
+ "stop-color": "#0045d0"
349
+ })
350
+ ]
351
+ }),
352
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("clipPath", {
353
+ id: "ph-survey-logo-clip",
354
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("path", {
355
+ fill: "#fff",
356
+ d: "M0 0h51.67v28H0z"
357
+ })
172
358
  })
173
- })
359
+ ]
174
360
  })
175
361
  ]
176
362
  });
@@ -99,37 +99,223 @@ const IconPosthogLogo = /*#__PURE__*/ jsxs("svg", {
99
99
  children: [
100
100
  /*#__PURE__*/ jsxs("g", {
101
101
  "clip-path": "url(#ph-survey-logo-clip)",
102
+ style: "opacity: calc(1 - var(--ph-logo-mono, 0))",
102
103
  children: [
103
104
  /*#__PURE__*/ jsx("path", {
104
105
  fill: "currentColor",
105
- d: "m50 23.34-.35-.05A4.5 4.5 0 0 1 47 21.97L35.56 10.1c-.3-.33-.86-.1-.86.35V27.5c0 .27.22.5.5.5h13.78c1.48 0 2.67-1.2 2.67-2.67v-.1a1.9 1.9 0 0 0-1.67-1.89zm-10.81.2a1.8 1.8 0 1 1 0-3.58 1.8 1.8 0 0 1 0 3.58"
106
+ d: "M51.66 25.22A1.9 1.9 0 0 0 50 23.33l-.34-.04c-1-.13-1.94-.6-2.65-1.33L33.28 7.75V28H49a2.66 2.66 0 0 0 2.67-2.67zM39.2 23.54h-.09a1.78 1.78 0 1 1 .1 0"
106
107
  }),
107
108
  /*#__PURE__*/ jsx("path", {
108
- fill: "#0054ff",
109
- d: "M.87 19.13a.5.5 0 0 0-.87.34v5.94a2.6 2.6 0 0 0 2.59 2.58H7.8a.5.5 0 0 0 .37-.84zM.86 8.4c-.3-.32-.86-.1-.86.36v6.73q0 .2.13.34l8.81 9.68 1.8 2.06v-8.82zM4.59.82A2.67 2.67 0 0 0 0 2.68v1.93q0 .4.27.69l10.47 10.95v-9.1z"
109
+ fill: "url(#ph-survey-logo-paint0)",
110
+ d: "M21.96 2.67v4.96l11.3 11.6h.02V7.75L26.63.85a2.8 2.8 0 0 0-2-.85 2.67 2.67 0 0 0-2.67 2.67"
110
111
  }),
111
112
  /*#__PURE__*/ jsx("path", {
112
- fill: "#ff5506",
113
- d: "M11.36 28h7.08a.5.5 0 0 0 .36-.85l-8.05-8.4v8.8l.23.28q.16.17.38.17m-.61-11.76 8.84 9.25 2.1 2.33q.1.11.27.14V18.7L10.75 7.15zm0-13.7v1.41a2 2 0 0 0 .55 1.28L21.96 16.2V7.65L15.32.8a2.67 2.67 0 0 0-4.57 1.71z"
113
+ fill: "url(#ph-survey-logo-paint1)",
114
+ d: "M21.96 7.63v11.05L31.03 28h2.25v-8.75z"
114
115
  }),
115
116
  /*#__PURE__*/ jsx("path", {
116
- fill: "#ffb70f",
117
- d: "M22.06 28h7.76a.5.5 0 0 0 .36-.86l-8.22-8.45v9.27l.09.02zM31 25.49l1.13 1.14c.32.31.85.09.85-.35v-7.3l-.49-.51L21.96 7.64v8.55zM22.52 5.73l9.62 9.89c.3.32.86.1.86-.35V7.46L26.56.82a2.67 2.67 0 0 0-4.59 1.84v1.7c0 .51.2 1 .57 1.37z"
117
+ fill: "url(#ph-survey-logo-paint2)",
118
+ d: "M21.96 28h9.07l-9.07-9.32z"
119
+ }),
120
+ /*#__PURE__*/ jsx("path", {
121
+ fill: "url(#ph-survey-logo-paint3)",
122
+ d: "M10.74 2.66v4.5l11.22 11.52V7.63L15.3.8a2.66 2.66 0 0 0-4.56 1.86"
123
+ }),
124
+ /*#__PURE__*/ jsx("path", {
125
+ fill: "url(#ph-survey-logo-paint4)",
126
+ d: "M10.74 28h8.96l-8.96-9.32z"
127
+ }),
128
+ /*#__PURE__*/ jsx("path", {
129
+ fill: "url(#ph-survey-logo-paint5)",
130
+ d: "M10.74 7.16v11.52L19.7 28h2.26v-9.32z"
131
+ }),
132
+ /*#__PURE__*/ jsx("path", {
133
+ fill: "url(#ph-survey-logo-paint6)",
134
+ d: "M10.74 7.16 4.54.8A2.66 2.66 0 0 0 0 2.66V7.5l10.74 11.18z"
135
+ }),
136
+ /*#__PURE__*/ jsx("path", {
137
+ fill: "url(#ph-survey-logo-paint7)",
138
+ d: "M9.19 28h1.55v-9.32L0 7.5v10.73z"
139
+ }),
140
+ /*#__PURE__*/ jsx("path", {
141
+ fill: "url(#ph-survey-logo-paint8)",
142
+ d: "M0 25.41A2.6 2.6 0 0 0 2.58 28H9.2L0 18.23z"
118
143
  })
119
144
  ]
120
145
  }),
146
+ /*#__PURE__*/ jsx("path", {
147
+ "clip-path": "url(#ph-survey-logo-clip)",
148
+ fill: "currentColor",
149
+ style: "opacity: var(--ph-logo-mono, 0)",
150
+ d: "m50.02 23.34-.34-.04c-1-.13-1.95-.6-2.66-1.33L35.58 10.11a.5.5 0 0 0-.86.35V27.5c0 .28.22.5.5.5H49c1.48 0 2.67-1.2 2.67-2.67v-.1a1.9 1.9 0 0 0-1.66-1.9m-10.81.2a1.78 1.78 0 1 1 0-3.56 1.78 1.78 0 0 1 0 3.57M0 25.41A2.6 2.6 0 0 0 2.59 28h5.22a.5.5 0 0 0 .37-.84L.87 19.13a.5.5 0 0 0-.87.34zm18.81 1.74a.5.5 0 0 1-.36.85h-7.09a.5.5 0 0 1-.37-.17L8.94 25.5.13 15.82A.5.5 0 0 1 0 15.5V8.75a.5.5 0 0 1 .86-.34zM0 2.68C0 .28 2.92-.91 4.59.82l25.6 26.33a.5.5 0 0 1-.36.85h-7.76a.5.5 0 0 1-.37-.17l-2.1-2.33L.28 5.3A1 1 0 0 1 0 4.6zm10.74 0c0-2.4 2.92-3.59 4.59-1.87L32.5 18.48l.5.51v7.3a.5.5 0 0 1-.86.35l-1.12-1.14L11.3 5.23a2 2 0 0 1-.57-1.4zM33 7.46v7.8a.5.5 0 0 1-.85.36l-9.61-9.89a2 2 0 0 1-.57-1.4V2.69c0-2.4 2.92-3.59 4.59-1.86z"
151
+ }),
121
152
  /*#__PURE__*/ jsx("path", {
122
153
  fill: "currentColor",
123
154
  d: "M64.9 22.88c-.67 0-1.23-.56-1.23-1.24V5.24c0-.69.56-1.24 1.24-1.24h6.55c3.89 0 6.39 2.32 6.39 5.9 0 3.6-2.5 5.91-6.4 5.91h-3.53v5.83c0 .68-.56 1.24-1.24 1.24zm3.02-11.94c0 .68.55 1.23 1.23 1.23h1.88c1.6 0 2.58-.86 2.58-2.26s-.97-2.27-2.58-2.27h-1.88c-.68 0-1.23.55-1.23 1.23zM84.71 23.1c-4.18 0-7.14-2.97-7.14-7.02s2.96-7.01 7.14-7.01c4.14 0 7.14 2.97 7.14 7.01 0 4.05-3 7.01-7.14 7.01m-3.22-7.02c0 2.16 1.3 3.64 3.22 3.64 1.9 0 3.2-1.48 3.2-3.64s-1.3-3.64-3.2-3.64c-1.93 0-3.22 1.48-3.22 3.64m16.34 7.03a6.2 6.2 0 0 1-5.54-3.01c-.34-.57-.01-1.26.6-1.5l.77-.3c.7-.27 1.45.15 1.92.73a2.8 2.8 0 0 0 2.25 1.08c1.05 0 1.75-.51 1.75-1.27 0-2.13-7.17-.7-7.17-5.85 0-2.13 1.85-3.91 4.83-3.91 2.27 0 4.2.9 5.17 2.31.36.53.05 1.2-.54 1.44l-.85.35c-.68.29-1.45-.14-2-.63a2.5 2.5 0 0 0-1.64-.64c-.89 0-1.5.38-1.5.97 0 2.16 7.27.38 7.27 5.88 0 2.35-2.15 4.34-5.32 4.34m14.64-1.31c.04.57-.3 1.1-.86 1.2q-.6.1-1.27.11c-2.92 0-5.15-1.56-5.15-4.85v-5.66h-.91c-.69 0-1.24-.56-1.24-1.24v-.82c0-.68.55-1.23 1.24-1.23h.91v-2.7c0-.69.55-1.24 1.23-1.24h1.48c.68 0 1.24.55 1.24 1.23v2.7h2.04c.68 0 1.23.56 1.23 1.24v.82c0 .68-.55 1.24-1.23 1.24h-2.04v5.15c0 1.2.64 1.91 1.6 1.91.75 0 1.6.5 1.66 1.25zM125.5 5.23c0-.68.55-1.23 1.23-1.23h1.8c.68 0 1.23.55 1.23 1.23v16.41c0 .68-.55 1.24-1.23 1.24h-1.8c-.68 0-1.23-.56-1.23-1.24v-5.43c0-.68-.56-1.23-1.24-1.23h-5c-.67 0-1.23.55-1.23 1.23v5.43c0 .68-.55 1.24-1.23 1.24h-1.77c-.69 0-1.24-.56-1.24-1.24V5.24c0-.69.55-1.24 1.24-1.24h1.77c.68 0 1.23.55 1.23 1.23v4.87c0 .68.56 1.23 1.24 1.23h5c.67 0 1.23-.55 1.23-1.23zm12.87 17.87c-4.19 0-7.14-2.97-7.14-7.02s2.95-7.01 7.14-7.01c4.13 0 7.14 2.97 7.14 7.01 0 4.05-3 7.01-7.14 7.01m-3.22-7.02c0 2.16 1.29 3.64 3.22 3.64 1.9 0 3.2-1.48 3.2-3.64s-1.3-3.64-3.2-3.64c-1.93 0-3.22 1.48-3.22 3.64m17.17 6.37c-3.84 0-6.2-2.58-6.2-6.68s2.36-6.69 6.12-6.69c1.58 0 2.82.54 3.54 1.37 0-.64.52-1.15 1.16-1.15h1.5c.68 0 1.24.55 1.24 1.23V21.9c0 3.64-2.77 6.09-6.93 6.09-2.64 0-4.9-1.2-5.85-3.09-.31-.62.16-1.29.85-1.4l1.14-.17c.67-.11 1.29.4 1.78.85.5.46 1.26.7 2.08.7 1.85 0 3.06-1.04 3.06-2.55v-1.3c-.7.9-2.01 1.4-3.49 1.4m-2.36-6.68c0 2.02 1.18 3.31 3 3.31 1.86 0 3.04-1.29 3.04-3.31s-1.18-3.32-3.03-3.32c-1.83 0-3.01 1.3-3.01 3.32"
124
155
  }),
125
- /*#__PURE__*/ jsx("defs", {
126
- children: /*#__PURE__*/ jsx("clipPath", {
127
- id: "ph-survey-logo-clip",
128
- children: /*#__PURE__*/ jsx("path", {
129
- fill: "#fff",
130
- d: "M0 0h51.67v28H0z"
156
+ /*#__PURE__*/ jsxs("defs", {
157
+ children: [
158
+ /*#__PURE__*/ jsxs("linearGradient", {
159
+ id: "ph-survey-logo-paint0",
160
+ x1: "21.96",
161
+ x2: "33.28",
162
+ y1: "9.62",
163
+ y2: "9.62",
164
+ gradientUnits: "userSpaceOnUse",
165
+ children: [
166
+ /*#__PURE__*/ jsx("stop", {
167
+ "stop-color": "#ffd849"
168
+ }),
169
+ /*#__PURE__*/ jsx("stop", {
170
+ offset: ".96",
171
+ "stop-color": "#fbae01"
172
+ })
173
+ ]
174
+ }),
175
+ /*#__PURE__*/ jsxs("linearGradient", {
176
+ id: "ph-survey-logo-paint1",
177
+ x1: "21.96",
178
+ x2: "33.28",
179
+ y1: "17.81",
180
+ y2: "17.81",
181
+ gradientUnits: "userSpaceOnUse",
182
+ children: [
183
+ /*#__PURE__*/ jsx("stop", {
184
+ "stop-color": "#ffb700"
185
+ }),
186
+ /*#__PURE__*/ jsx("stop", {
187
+ offset: "1",
188
+ "stop-color": "#f9aa01"
189
+ })
190
+ ]
191
+ }),
192
+ /*#__PURE__*/ jsxs("linearGradient", {
193
+ id: "ph-survey-logo-paint2",
194
+ x1: "21.96",
195
+ x2: "31.03",
196
+ y1: "23.34",
197
+ y2: "23.34",
198
+ gradientUnits: "userSpaceOnUse",
199
+ children: [
200
+ /*#__PURE__*/ jsx("stop", {
201
+ "stop-color": "#ff9500"
202
+ }),
203
+ /*#__PURE__*/ jsx("stop", {
204
+ offset: "1",
205
+ "stop-color": "#f8aa00"
206
+ })
207
+ ]
208
+ }),
209
+ /*#__PURE__*/ jsxs("linearGradient", {
210
+ id: "ph-survey-logo-paint3",
211
+ x1: "10.74",
212
+ x2: "21.96",
213
+ y1: "9.34",
214
+ y2: "9.34",
215
+ gradientUnits: "userSpaceOnUse",
216
+ children: [
217
+ /*#__PURE__*/ jsx("stop", {
218
+ "stop-color": "#ff651e"
219
+ }),
220
+ /*#__PURE__*/ jsx("stop", {
221
+ offset: "1",
222
+ "stop-color": "#e4400a"
223
+ })
224
+ ]
225
+ }),
226
+ /*#__PURE__*/ jsxs("linearGradient", {
227
+ id: "ph-survey-logo-paint4",
228
+ x1: "10.74",
229
+ x2: "19.7",
230
+ y1: "23.34",
231
+ y2: "23.34",
232
+ gradientUnits: "userSpaceOnUse",
233
+ children: [
234
+ /*#__PURE__*/ jsx("stop", {
235
+ "stop-color": "#c42c00"
236
+ }),
237
+ /*#__PURE__*/ jsx("stop", {
238
+ offset: "1",
239
+ "stop-color": "#d63600"
240
+ })
241
+ ]
242
+ }),
243
+ /*#__PURE__*/ jsxs("linearGradient", {
244
+ id: "ph-survey-logo-paint5",
245
+ x1: "10.74",
246
+ x2: "21.96",
247
+ y1: "17.58",
248
+ y2: "17.58",
249
+ gradientUnits: "userSpaceOnUse",
250
+ children: [
251
+ /*#__PURE__*/ jsx("stop", {
252
+ "stop-color": "#ef3c00"
253
+ }),
254
+ /*#__PURE__*/ jsx("stop", {
255
+ offset: "1",
256
+ "stop-color": "#d63601"
257
+ })
258
+ ]
259
+ }),
260
+ /*#__PURE__*/ jsxs("linearGradient", {
261
+ id: "ph-survey-logo-paint6",
262
+ x1: "0",
263
+ x2: "10.74",
264
+ y1: "9.34",
265
+ y2: "9.34",
266
+ gradientUnits: "userSpaceOnUse",
267
+ children: [
268
+ /*#__PURE__*/ jsx("stop", {
269
+ "stop-color": "#3f80ff"
270
+ }),
271
+ /*#__PURE__*/ jsx("stop", {
272
+ offset: "1",
273
+ "stop-color": "#084fe0"
274
+ })
275
+ ]
276
+ }),
277
+ /*#__PURE__*/ jsxs("linearGradient", {
278
+ id: "ph-survey-logo-paint7",
279
+ x1: "0",
280
+ x2: "10.74",
281
+ y1: "17.75",
282
+ y2: "17.75",
283
+ gradientUnits: "userSpaceOnUse",
284
+ children: [
285
+ /*#__PURE__*/ jsx("stop", {
286
+ "stop-color": "#0255ff"
287
+ }),
288
+ /*#__PURE__*/ jsx("stop", {
289
+ offset: "1",
290
+ "stop-color": "#0145d2"
291
+ })
292
+ ]
293
+ }),
294
+ /*#__PURE__*/ jsxs("linearGradient", {
295
+ id: "ph-survey-logo-paint8",
296
+ x1: "0",
297
+ x2: "9.19",
298
+ y1: "23.11",
299
+ y2: "23.11",
300
+ gradientUnits: "userSpaceOnUse",
301
+ children: [
302
+ /*#__PURE__*/ jsx("stop", {
303
+ "stop-color": "#0041c6"
304
+ }),
305
+ /*#__PURE__*/ jsx("stop", {
306
+ offset: "1",
307
+ "stop-color": "#0045d0"
308
+ })
309
+ ]
310
+ }),
311
+ /*#__PURE__*/ jsx("clipPath", {
312
+ id: "ph-survey-logo-clip",
313
+ children: /*#__PURE__*/ jsx("path", {
314
+ fill: "#fff",
315
+ d: "M0 0h51.67v28H0z"
316
+ })
131
317
  })
132
- })
318
+ ]
133
319
  })
134
320
  ]
135
321
  });
@@ -37,6 +37,11 @@ export declare const defaultSurveyAppearance: {
37
37
  readonly scrollbarTrackColor: 'var(--ph-survey-background-color)';
38
38
  };
39
39
  export declare const addSurveyCSSVariablesToElement: (element: HTMLElement, type: SurveyType, appearance?: SurveyAppearance | null) => void;
40
+ /**
41
+ * The gradient PostHog logo is made for light backgrounds. On dark backgrounds,
42
+ * @posthog/brand uses the one-color (mono) logo in the text color, so we do the same.
43
+ */
44
+ export declare function setLogoVariant(style: CSSStyleDeclaration, backgroundColor?: string): void;
40
45
  export declare function hex2rgb(c: string): string;
41
46
  export declare function hexToRgba(hex: string, opacity: number): string;
42
47
  export declare function getContrastingTextColor(color?: string): "#020617" | "white";
@@ -59,6 +59,7 @@ __webpack_require__.d(__webpack_exports__, {
59
59
  sendSurveyAbandonedEvent: ()=>sendSurveyAbandonedEvent,
60
60
  sendSurveyEvent: ()=>sendSurveyEvent,
61
61
  setInProgressSurveyState: ()=>setInProgressSurveyState,
62
+ setLogoVariant: ()=>setLogoVariant,
62
63
  shuffle: ()=>surveys_namespaceObject.shuffle,
63
64
  useSurveyContext: ()=>useSurveyContext
64
65
  });
@@ -145,6 +146,7 @@ const addSurveyCSSVariablesToElement = (element, type, appearance)=>{
145
146
  hostStyle.setProperty('--ph-survey-rating-active-text-color', getContrastingTextColor(effectiveAppearance.ratingButtonActiveColor));
146
147
  hostStyle.setProperty('--ph-survey-text-primary-color', appearance?.textColor || getContrastingTextColor(effectiveAppearance.backgroundColor));
147
148
  hostStyle.setProperty('--ph-survey-text-subtle-color', effectiveAppearance.textSubtleColor);
149
+ setLogoVariant(hostStyle, effectiveAppearance.backgroundColor);
148
150
  hostStyle.setProperty('--ph-widget-color', effectiveAppearance.widgetColor);
149
151
  hostStyle.setProperty('--ph-widget-text-color', getContrastingTextColor(effectiveAppearance.widgetColor));
150
152
  hostStyle.setProperty('--ph-widget-z-index', effectiveAppearance.zIndex);
@@ -159,6 +161,10 @@ const addSurveyCSSVariablesToElement = (element, type, appearance)=>{
159
161
  hostStyle.setProperty('--ph-survey-scrollbar-track-color', effectiveAppearance.scrollbarTrackColor);
160
162
  hostStyle.setProperty('--ph-survey-outline-color', effectiveAppearance.outlineColor);
161
163
  };
164
+ function setLogoVariant(style, backgroundColor) {
165
+ if ('white' === getContrastingTextColor(backgroundColor)) style.setProperty('--ph-logo-mono', '1');
166
+ else style.removeProperty('--ph-logo-mono');
167
+ }
162
168
  function nameToHex(name) {
163
169
  return ({
164
170
  aliceblue: '#f0f8ff',
@@ -708,6 +714,7 @@ exports.retrieveSurveyShadow = __webpack_exports__.retrieveSurveyShadow;
708
714
  exports.sendSurveyAbandonedEvent = __webpack_exports__.sendSurveyAbandonedEvent;
709
715
  exports.sendSurveyEvent = __webpack_exports__.sendSurveyEvent;
710
716
  exports.setInProgressSurveyState = __webpack_exports__.setInProgressSurveyState;
717
+ exports.setLogoVariant = __webpack_exports__.setLogoVariant;
711
718
  exports.shuffle = __webpack_exports__.shuffle;
712
719
  exports.useSurveyContext = __webpack_exports__.useSurveyContext;
713
720
  for(var __rspack_i in __webpack_exports__)if (-1 === [
@@ -742,6 +749,7 @@ for(var __rspack_i in __webpack_exports__)if (-1 === [
742
749
  "sendSurveyAbandonedEvent",
743
750
  "sendSurveyEvent",
744
751
  "setInProgressSurveyState",
752
+ "setLogoVariant",
745
753
  "shuffle",
746
754
  "useSurveyContext"
747
755
  ].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
@@ -81,6 +81,7 @@ const addSurveyCSSVariablesToElement = (element, type, appearance)=>{
81
81
  hostStyle.setProperty('--ph-survey-rating-active-text-color', getContrastingTextColor(effectiveAppearance.ratingButtonActiveColor));
82
82
  hostStyle.setProperty('--ph-survey-text-primary-color', appearance?.textColor || getContrastingTextColor(effectiveAppearance.backgroundColor));
83
83
  hostStyle.setProperty('--ph-survey-text-subtle-color', effectiveAppearance.textSubtleColor);
84
+ setLogoVariant(hostStyle, effectiveAppearance.backgroundColor);
84
85
  hostStyle.setProperty('--ph-widget-color', effectiveAppearance.widgetColor);
85
86
  hostStyle.setProperty('--ph-widget-text-color', getContrastingTextColor(effectiveAppearance.widgetColor));
86
87
  hostStyle.setProperty('--ph-widget-z-index', effectiveAppearance.zIndex);
@@ -95,6 +96,10 @@ const addSurveyCSSVariablesToElement = (element, type, appearance)=>{
95
96
  hostStyle.setProperty('--ph-survey-scrollbar-track-color', effectiveAppearance.scrollbarTrackColor);
96
97
  hostStyle.setProperty('--ph-survey-outline-color', effectiveAppearance.outlineColor);
97
98
  };
99
+ function setLogoVariant(style, backgroundColor) {
100
+ if ('white' === getContrastingTextColor(backgroundColor)) style.setProperty('--ph-logo-mono', '1');
101
+ else style.removeProperty('--ph-logo-mono');
102
+ }
98
103
  function nameToHex(name) {
99
104
  return ({
100
105
  aliceblue: '#f0f8ff',
@@ -613,4 +618,4 @@ function getTabWidgetPopupOverrides(position) {
613
618
  };
614
619
  return {};
615
620
  }
616
- export { SurveyContext, addSurveyCSSVariablesToElement, canActivateRepeatedly, clearAllInMemoryInProgressSurveyState, clearInProgressSurveyState, defaultSurveyAppearance, dismissedSurveyEvent, doesSurveyDeviceTypesMatch, doesSurveyMatchSelector, doesSurveyUrlMatch, getContrastingTextColor, getDisplayOrderChoices, getDisplayOrderQuestions, getFontFamily, getInProgressSurveyState, getPopoverPosition, getQuestionOrder, getSurveyContainerClass, getSurveyResponseKey, getSurveySeen, getSurveyStylesheet, getTabWidgetPopupOverrides, hasWaitPeriodPassed, hex2rgb, hexToRgba, isSurveyInProgress, renderChildrenAsTextOrHtml, retrieveSurveyShadow, sendSurveyAbandonedEvent, sendSurveyEvent, setInProgressSurveyState, shuffle, useSurveyContext };
621
+ export { SurveyContext, addSurveyCSSVariablesToElement, canActivateRepeatedly, clearAllInMemoryInProgressSurveyState, clearInProgressSurveyState, defaultSurveyAppearance, dismissedSurveyEvent, doesSurveyDeviceTypesMatch, doesSurveyMatchSelector, doesSurveyUrlMatch, getContrastingTextColor, getDisplayOrderChoices, getDisplayOrderQuestions, getFontFamily, getInProgressSurveyState, getPopoverPosition, getQuestionOrder, getSurveyContainerClass, getSurveyResponseKey, getSurveySeen, getSurveyStylesheet, getTabWidgetPopupOverrides, hasWaitPeriodPassed, hex2rgb, hexToRgba, isSurveyInProgress, renderChildrenAsTextOrHtml, retrieveSurveyShadow, sendSurveyAbandonedEvent, sendSurveyEvent, setInProgressSurveyState, setLogoVariant, shuffle, useSurveyContext };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@posthog/browser-common",
3
- "version": "0.10.7",
3
+ "version": "0.10.8",
4
4
  "description": "Internal shared browser utilities and extension primitives for PostHog Browser SDKs",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -241,8 +241,8 @@
241
241
  "dependencies": {
242
242
  "dompurify": "^3.4.13",
243
243
  "preact": "^10.29.3",
244
- "@posthog/core": "^1.63.2",
245
- "@posthog/types": "^1.420.0"
244
+ "@posthog/core": "^1.67.1",
245
+ "@posthog/types": "^1.423.0"
246
246
  },
247
247
  "devDependencies": {
248
248
  "@rsbuild/plugin-react": "^2.1.0",