@bluepic/embed 0.4.0-next.106 → 0.4.0-next.108
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 +69 -69
- package/dist/bluepic-embed.umd.js +72 -72
- package/dist/components/BxSelect.vue.d.ts +14 -4
- package/dist/main.cjs +62 -62
- package/dist/main.mjs +7355 -7392
- package/dist/style.css +1 -1
- package/dist/util/gallery.d.ts +13 -56
- package/package.json +1 -1
package/dist/util/gallery.d.ts
CHANGED
|
@@ -14,70 +14,23 @@ export declare function groupTemplatesByName(templates: {
|
|
|
14
14
|
};
|
|
15
15
|
};
|
|
16
16
|
};
|
|
17
|
-
/**
|
|
18
|
-
* A campaign-level template→category override map (`config.categories`), keyed
|
|
19
|
-
* by TEMPLATE ID. This is the sole source of a template's category — there is
|
|
20
|
-
* no template-level category to fall back to. Templates with no entry
|
|
21
|
-
* collapse into "Other".
|
|
22
|
-
*/
|
|
23
|
-
export type CampaignCategories = {
|
|
24
|
-
[templateId: string]: string;
|
|
25
|
-
} | undefined;
|
|
26
17
|
export declare const OTHER_CATEGORY = "Other";
|
|
27
|
-
/**
|
|
28
|
-
* Order a set of category names.
|
|
29
|
-
*
|
|
30
|
-
* `categoryOrder` (campaign config) wins, in its own order; anything not listed
|
|
31
|
-
* follows alphabetically; "Other" is always last.
|
|
32
|
-
*
|
|
33
|
-
* Alphabetical-only was fine for a template gallery but wrong for a brand
|
|
34
|
-
* portal — customers expect "Logos, Templates, Guidelines" in that order.
|
|
35
|
-
* Unknown categories degrade to the old behaviour instead of disappearing, so
|
|
36
|
-
* an incomplete `categoryOrder` never hides content.
|
|
37
|
-
*/
|
|
38
|
-
export declare function orderCategories(categories: Iterable<string>, categoryOrder?: string[]): string[];
|
|
39
|
-
export declare function collectTemplatesCategories(templates: {
|
|
40
|
-
[k: string]: z.infer<typeof Studio.publicTemplateDescriptor>;
|
|
41
|
-
}, overrides?: CampaignCategories, categoryOrder?: string[]): string[];
|
|
42
|
-
export declare function groupTemplatesByCategory(templates: {
|
|
43
|
-
[k: string]: z.infer<typeof Studio.publicTemplateDescriptor>;
|
|
44
|
-
}, overrides?: CampaignCategories, categoryOrder?: string[]): {
|
|
45
|
-
category: string;
|
|
46
|
-
templatesByName: {
|
|
47
|
-
[k: string]: {
|
|
48
|
-
[k: string]: {
|
|
49
|
-
serial: any;
|
|
50
|
-
preview: string | null;
|
|
51
|
-
name: string;
|
|
52
|
-
width: number;
|
|
53
|
-
height: number;
|
|
54
|
-
dpi?: number | undefined;
|
|
55
|
-
};
|
|
56
|
-
};
|
|
57
|
-
};
|
|
58
|
-
}[];
|
|
59
18
|
export type PortalAsset = z.infer<typeof Studio.publicCampaignAssetDescriptor>;
|
|
19
|
+
export type CampaignCategory = Studio.CampaignCategory;
|
|
60
20
|
/**
|
|
61
|
-
*
|
|
21
|
+
* Group templates AND assets by the campaign's categories.
|
|
62
22
|
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
* a template in "Logos" and an asset in "Logos" land in the same tab.
|
|
67
|
-
*/
|
|
68
|
-
export declare function collectPortalCategories(templates: {
|
|
69
|
-
[k: string]: z.infer<typeof Studio.publicTemplateDescriptor>;
|
|
70
|
-
}, assets: PortalAsset[] | undefined, overrides?: CampaignCategories, categoryOrder?: string[]): string[];
|
|
71
|
-
/**
|
|
72
|
-
* Group templates AND assets by category, in portal order.
|
|
23
|
+
* Takes the CONVERTED category array — `Studio.convertCampaign` has already run
|
|
24
|
+
* at the boundary — so there is no shape-guessing here, no legacy record, and
|
|
25
|
+
* no separate order field: array position IS the order.
|
|
73
26
|
*
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
*
|
|
27
|
+
* Anything no category claims falls into "Other", which always renders last.
|
|
28
|
+
* Categories that end up empty are dropped: an empty category is legitimate
|
|
29
|
+
* while editing, but not something to render a tab for.
|
|
77
30
|
*/
|
|
78
31
|
export declare function groupPortalItemsByCategory(templates: {
|
|
79
32
|
[k: string]: z.infer<typeof Studio.publicTemplateDescriptor>;
|
|
80
|
-
}, assets: PortalAsset[] | undefined,
|
|
33
|
+
}, assets: PortalAsset[] | undefined, categories: CampaignCategory[] | undefined): {
|
|
81
34
|
category: string;
|
|
82
35
|
templatesByName: {
|
|
83
36
|
[k: string]: {
|
|
@@ -107,3 +60,7 @@ export declare function groupPortalItemsByCategory(templates: {
|
|
|
107
60
|
pageCount?: number | undefined;
|
|
108
61
|
}[];
|
|
109
62
|
}[];
|
|
63
|
+
/** The category strip: only labels that actually have something in them. */
|
|
64
|
+
export declare function collectPortalCategories(templates: {
|
|
65
|
+
[k: string]: z.infer<typeof Studio.publicTemplateDescriptor>;
|
|
66
|
+
}, assets: PortalAsset[] | undefined, categories: CampaignCategory[] | undefined): string[];
|