@myissue/vue-website-page-builder 3.5.12 → 3.5.13
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/stores/page-builder-state.d.ts +9 -0
- package/dist/style.css +1 -1
- package/dist/types/index.d.ts +37 -0
- package/dist/utils/builder/font-family-map.d.ts +22 -0
- package/dist/vue-website-page-builder.js +7590 -7507
- package/dist/vue-website-page-builder.umd.cjs +59 -59
- package/package.json +1 -1
package/dist/types/index.d.ts
CHANGED
|
@@ -172,6 +172,21 @@ export interface ThemeColorPresetSettings {
|
|
|
172
172
|
enabled: boolean;
|
|
173
173
|
colors: readonly ThemeColorPreset[];
|
|
174
174
|
}
|
|
175
|
+
/**
|
|
176
|
+
* Per-element font overrides for the builder canvas.
|
|
177
|
+
* Each value is a font key name or comma-separated list (e.g. `'jost'` or
|
|
178
|
+
* `'jost, raleway, arial'`). The first recognised font name is applied;
|
|
179
|
+
* unrecognised names are silently skipped.
|
|
180
|
+
*/
|
|
181
|
+
export interface PageBuilderElementFonts {
|
|
182
|
+
h1?: string;
|
|
183
|
+
h2?: string;
|
|
184
|
+
h3?: string;
|
|
185
|
+
h4?: string;
|
|
186
|
+
h5?: string;
|
|
187
|
+
h6?: string;
|
|
188
|
+
p?: string;
|
|
189
|
+
}
|
|
175
190
|
export interface PageBuilderConfig {
|
|
176
191
|
updateOrCreate: {
|
|
177
192
|
/**
|
|
@@ -216,7 +231,29 @@ export interface PageBuilderConfig {
|
|
|
216
231
|
};
|
|
217
232
|
autoSave?: boolean;
|
|
218
233
|
notifications?: boolean;
|
|
234
|
+
/**
|
|
235
|
+
* Default canvas font and, optionally, the restricted set of fonts shown in
|
|
236
|
+
* the font-family picker.
|
|
237
|
+
*
|
|
238
|
+
* - Single value: `'jost'` — sets the canvas default; picker shows all fonts.
|
|
239
|
+
* - Comma-separated list: `'jost, raleway, arial'` — first entry is the
|
|
240
|
+
* canvas default; picker is restricted to the listed fonts.
|
|
241
|
+
*
|
|
242
|
+
* Unknown font names (not in the built-in list) are silently ignored.
|
|
243
|
+
*/
|
|
219
244
|
fontFamily?: string;
|
|
245
|
+
/**
|
|
246
|
+
* Per-element font overrides applied to the builder canvas.
|
|
247
|
+
* Each value follows the same format as `fontFamily` — a font key name or
|
|
248
|
+
* comma-separated list; the first recognised entry is used.
|
|
249
|
+
*
|
|
250
|
+
* Available font names: jost, raleway, palantino, arial, helvetica, georgia,
|
|
251
|
+
* times, times-new-roman, courier, courier-new, verdana, tahoma, trebuchet,
|
|
252
|
+
* garamond, bookman, comic-sans, impact, lucida, lucida-console, lucida-sans,
|
|
253
|
+
* candara, optima, avenir, futura, calibri, cambria, didot, franklin-gothic,
|
|
254
|
+
* rockwell, baskerville, sans, serif, mono
|
|
255
|
+
*/
|
|
256
|
+
elementFonts?: PageBuilderElementFonts;
|
|
220
257
|
} | null;
|
|
221
258
|
settings?: {
|
|
222
259
|
brandColor?: string;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Maps the short font key names (matching tailwind.config.ts fontFamily keys and
|
|
3
|
+
* the pbx-font-* class suffixes) to their CSS font-family strings.
|
|
4
|
+
*
|
|
5
|
+
* Used to resolve element-level font overrides (elementFonts config) into the
|
|
6
|
+
* CSS custom properties that style.css targets with var(--pbx-el-{tag}-font).
|
|
7
|
+
*/
|
|
8
|
+
declare const fontFamilyMap: Record<string, string>;
|
|
9
|
+
/**
|
|
10
|
+
* Resolves a font config value to a CSS font-family string.
|
|
11
|
+
*
|
|
12
|
+
* Accepts a short name ("jost"), a pbx-font- prefixed class name ("pbx-font-jost"),
|
|
13
|
+
* a CSS generic keyword ("fantasy"), or a comma-separated list in any of those
|
|
14
|
+
* formats. The first recognised entry wins:
|
|
15
|
+
* 1. Known font in fontFamilyMap → returns its CSS font-family stack
|
|
16
|
+
* 2. CSS generic keyword → returned as-is (e.g. "fantasy")
|
|
17
|
+
* 3. Anything else → skipped
|
|
18
|
+
*
|
|
19
|
+
* Returns undefined when no recognised font is found in the entire list.
|
|
20
|
+
*/
|
|
21
|
+
export declare function resolveFontFamily(fontConfig: string): string | undefined;
|
|
22
|
+
export default fontFamilyMap;
|