@bluepic/embed 0.4.0-next.177 → 0.4.0-next.178
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/bluepic-embed.iife.js +64 -64
- package/dist/bluepic-embed.umd.js +65 -65
- package/dist/main.cjs +2 -2
- package/dist/main.mjs +24 -7
- package/dist/util/contextCapture.d.ts +19 -0
- package/package.json +1 -1
package/dist/main.mjs
CHANGED
|
@@ -26331,13 +26331,16 @@ const jq = {
|
|
|
26331
26331
|
}
|
|
26332
26332
|
}), Yq = /* @__PURE__ */ ht(Xq, [["__scopeId", "data-v-37d75e2a"]]);
|
|
26333
26333
|
function pc() {
|
|
26334
|
+
var a;
|
|
26334
26335
|
const e = op(), t = {};
|
|
26335
26336
|
if (!e) return t;
|
|
26336
|
-
|
|
26337
|
-
|
|
26338
|
-
|
|
26339
|
-
|
|
26340
|
-
|
|
26337
|
+
Object.assign(t, ((a = e.appContext) == null ? void 0 : a.provides) ?? {});
|
|
26338
|
+
const n = [];
|
|
26339
|
+
let r = e.parent;
|
|
26340
|
+
for (; r; )
|
|
26341
|
+
n.push(r), r = r.parent;
|
|
26342
|
+
for (const i of n.reverse())
|
|
26343
|
+
i.provides && Object.assign(t, i.provides);
|
|
26341
26344
|
return t;
|
|
26342
26345
|
}
|
|
26343
26346
|
function H1(e) {
|
|
@@ -53738,7 +53741,7 @@ df.exportActionSchema = Cs.z.object({
|
|
|
53738
53741
|
});
|
|
53739
53742
|
var bc = {};
|
|
53740
53743
|
(function(e) {
|
|
53741
|
-
Object.defineProperty(e, "__esModule", { value: !0 }), e.templateDocumentWithCampaignInfoSchema = e.templateCampaignLinkSchema = e.templateDocumentSchema = void 0;
|
|
53744
|
+
Object.defineProperty(e, "__esModule", { value: !0 }), e.templateDocumentWithCampaignInfoSchema = e.templateCampaignUsageSchema = e.templateCampaignUsageEntrySchema = e.templateCampaignLinkSchema = e.templateDocumentSchema = void 0;
|
|
53742
53745
|
const t = Jt, n = ["widget", "team", "web", "batch", "api", "email", "template"], r = t.z.enum(n);
|
|
53743
53746
|
e.templateDocumentSchema = t.z.object({
|
|
53744
53747
|
id: t.z.string().uuid(),
|
|
@@ -53799,9 +53802,23 @@ var bc = {};
|
|
|
53799
53802
|
active: t.z.boolean(),
|
|
53800
53803
|
customSlug: t.z.string().nullable(),
|
|
53801
53804
|
customDomain: t.z.string().nullable()
|
|
53805
|
+
}), e.templateCampaignUsageEntrySchema = t.z.object({
|
|
53806
|
+
campaignId: t.z.number(),
|
|
53807
|
+
campaignName: t.z.string(),
|
|
53808
|
+
campaignType: r,
|
|
53809
|
+
/** A paused campaign still depends on the template; the row says which is which. */
|
|
53810
|
+
active: t.z.boolean(),
|
|
53811
|
+
/** Auth0 sub of the campaign's creator; the client resolves it to an avatar. */
|
|
53812
|
+
ownerSub: t.z.string()
|
|
53813
|
+
}), e.templateCampaignUsageSchema = t.z.object({
|
|
53814
|
+
/** Total campaigns the viewer can reach that use this template. */
|
|
53815
|
+
total: t.z.number().default(0),
|
|
53816
|
+
/** Capped detail list for the hover card. */
|
|
53817
|
+
campaigns: t.z.array(e.templateCampaignUsageEntrySchema).default([])
|
|
53802
53818
|
}), e.templateDocumentWithCampaignInfoSchema = e.templateDocumentSchema.extend({
|
|
53803
53819
|
campaignTypes: t.z.array(r).default([]),
|
|
53804
|
-
templateCampaign: e.templateCampaignLinkSchema.nullable().default(null)
|
|
53820
|
+
templateCampaign: e.templateCampaignLinkSchema.nullable().default(null),
|
|
53821
|
+
campaignUsage: e.templateCampaignUsageSchema.default({ total: 0, campaigns: [] })
|
|
53805
53822
|
});
|
|
53806
53823
|
})(bc);
|
|
53807
53824
|
var n2 = {}, ff = {};
|
|
@@ -1 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Everything the host app injects, flattened so a popup — which renders in a
|
|
3
|
+
* SEPARATE Vue app (see PopupProvider) — can be given the same context.
|
|
4
|
+
*
|
|
5
|
+
* APP-LEVEL PROVIDES ARE THE HALF THIS USED TO MISS, and they are the half
|
|
6
|
+
* that matters most. Vue builds a component's provides as
|
|
7
|
+
*
|
|
8
|
+
* provides: parent ? parent.provides : Object.create(appContext.provides)
|
|
9
|
+
*
|
|
10
|
+
* so anything installed with `app.use(...)` or `app.provide(...)` — the router
|
|
11
|
+
* above all, but equally a store or an i18n instance — lives on
|
|
12
|
+
* `appContext.provides` and reaches components through the PROTOTYPE chain.
|
|
13
|
+
* `Object.assign` copies own properties only, so walking the parent chain
|
|
14
|
+
* never saw them: `useRouter()` inside any popup returned undefined, and every
|
|
15
|
+
* `router.push` in a dialog, drawer or toast silently did nothing.
|
|
16
|
+
*
|
|
17
|
+
* Merged FIRST, so a component-level `provide()` closer to the caller still
|
|
18
|
+
* wins over an app-level one of the same key.
|
|
19
|
+
*/
|
|
1
20
|
export declare function captureCurrentContext(): Record<string | symbol, any>;
|