@myissue/vue-website-page-builder 3.5.4 → 3.5.5
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/README.md +33 -1
- package/dist/App.vue.d.ts +1 -2
- package/dist/Components/ComponentThumbnail.vue.d.ts +8 -4
- package/dist/Components/Homepage/Footer.vue.d.ts +1 -2
- package/dist/Components/Inputs/ToggleInput.vue.d.ts +1 -2
- package/dist/Components/Loaders/ElementLoader.vue.d.ts +1 -2
- package/dist/Components/Loaders/GlobalLoader.vue.d.ts +1 -2
- package/dist/Components/Modals/BuilderComponents.vue.d.ts +1 -2
- package/dist/Components/Modals/DynamicModalBuilder.vue.d.ts +7 -8
- package/dist/Components/Modals/MediaLibraryModal.vue.d.ts +1 -2
- package/dist/Components/Modals/ModalBuilder.vue.d.ts +4 -5
- package/dist/Components/Overlays/FloatingSidePanel.vue.d.ts +4 -5
- package/dist/Components/PageBuilder/EditorMenu/Editables/BackgroundColorEditor.vue.d.ts +1 -2
- package/dist/Components/PageBuilder/EditorMenu/Editables/BorderRadius.vue.d.ts +1 -2
- package/dist/Components/PageBuilder/EditorMenu/Editables/Borders.vue.d.ts +1 -2
- package/dist/Components/PageBuilder/EditorMenu/Editables/ClassEditor.vue.d.ts +1 -2
- package/dist/Components/PageBuilder/EditorMenu/Editables/ComponentTopMenu.vue.d.ts +1 -2
- package/dist/Components/PageBuilder/EditorMenu/Editables/EditGetElement.vue.d.ts +1 -2
- package/dist/Components/PageBuilder/EditorMenu/Editables/HTMLEditor.vue.d.ts +1 -2
- package/dist/Components/PageBuilder/EditorMenu/Editables/ImageEditor.vue.d.ts +1 -2
- package/dist/Components/PageBuilder/EditorMenu/Editables/ManageBackgroundOpacity.vue.d.ts +1 -2
- package/dist/Components/PageBuilder/EditorMenu/Editables/ManageOpacity.vue.d.ts +1 -2
- package/dist/Components/PageBuilder/EditorMenu/Editables/Margin.vue.d.ts +1 -2
- package/dist/Components/PageBuilder/EditorMenu/Editables/OpacityEditor.vue.d.ts +1 -2
- package/dist/Components/PageBuilder/EditorMenu/Editables/Padding.vue.d.ts +1 -2
- package/dist/Components/PageBuilder/EditorMenu/Editables/StyleEditor.vue.d.ts +1 -2
- package/dist/Components/PageBuilder/EditorMenu/Editables/TextColorEditor.vue.d.ts +1 -2
- package/dist/Components/PageBuilder/EditorMenu/Editables/ThemeColorPresetManager.vue.d.ts +1 -2
- package/dist/Components/PageBuilder/EditorMenu/Editables/Typography.vue.d.ts +1 -2
- package/dist/Components/PageBuilder/EditorMenu/Editables/TypographyForTipTap.vue.d.ts +1 -2
- package/dist/Components/PageBuilder/EditorMenu/EditorAccordion.vue.d.ts +2 -3
- package/dist/Components/PageBuilder/EditorMenu/RightSidebarEditor.vue.d.ts +1 -2
- package/dist/Components/PageBuilder/Settings/AdvancedPageBuilderSettings.vue.d.ts +1 -2
- package/dist/Components/PageBuilder/Settings/PageBuilderSettings.vue.d.ts +1 -2
- package/dist/Components/PageBuilder/ToolbarOption/ToolbarOption.vue.d.ts +1 -2
- package/dist/Components/PageBuilder/UndoRedo/UndoRedo.vue.d.ts +1 -2
- package/dist/Components/TipTap/TipTapInput.vue.d.ts +1 -2
- package/dist/PageBuilder/PageBuilder.vue.d.ts +1 -2
- package/dist/PageBuilder/Preview.vue.d.ts +1 -2
- package/dist/composables/useThemeColorPresets.d.ts +18 -0
- package/dist/index.d.ts +2 -1
- package/dist/services/PageBuilderService.d.ts +9 -0
- package/dist/stores/page-builder-state.d.ts +19 -5
- package/dist/style.css +1 -1
- package/dist/tests/DefaultComponents/DefaultBuilderComponents.vue.d.ts +1 -2
- package/dist/tests/DefaultComponents/DefaultMediaLibraryComponent.vue.d.ts +1 -2
- package/dist/tests/PageBuilderTest.vue.d.ts +1 -2
- package/dist/tests/TestComponents/DemoMediaLibraryComponentTest.vue.d.ts +1 -2
- package/dist/tests/TestComponents/DemoUnsplash.vue.d.ts +1 -2
- package/dist/tests/composables/useThemeColorPresets.test.d.ts +16 -0
- package/dist/types/index.d.ts +56 -6
- package/dist/utils/html-elements/componentHelpers.d.ts +1 -0
- package/dist/vue-website-page-builder.js +8761 -8162
- package/dist/vue-website-page-builder.umd.cjs +88 -72
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const
|
|
1
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
2
2
|
customMediaComponent: {
|
|
3
3
|
type: ObjectConstructor;
|
|
4
4
|
default: null;
|
|
@@ -11,5 +11,4 @@ declare const __VLS_export: import('vue').DefineComponent<import('vue').ExtractP
|
|
|
11
11
|
}>> & Readonly<{}>, {
|
|
12
12
|
customMediaComponent: Record<string, any>;
|
|
13
13
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
14
|
-
declare const _default: typeof __VLS_export;
|
|
15
14
|
export default _default;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
declare const
|
|
2
|
-
declare const _default: typeof __VLS_export;
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
3
2
|
export default _default;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
declare const
|
|
2
|
-
declare const _default: typeof __VLS_export;
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
3
2
|
export default _default;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
declare const
|
|
2
|
-
declare const _default: typeof __VLS_export;
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
3
2
|
export default _default;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
declare const
|
|
2
|
-
declare const _default: typeof __VLS_export;
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
3
2
|
export default _default;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tests for useThemeColorPresets composable.
|
|
3
|
+
*
|
|
4
|
+
* Covers:
|
|
5
|
+
* - buildStorageKey() — user-scoped vs shared key derivation
|
|
6
|
+
* - Initial hydration — config values become initial defaults
|
|
7
|
+
* - Persistence priority — localStorage beats config on re-hydration
|
|
8
|
+
* - Same-session preservation — modal reopen does NOT revert user changes
|
|
9
|
+
* - Page-reload persistence — changes survive clearing hasLoaded
|
|
10
|
+
* - updateThemeColorPreset() — normalises hex, persists to localStorage
|
|
11
|
+
* - setThemeColorPresetsEnabled() — toggles global enabled flag, persists
|
|
12
|
+
* - resetThemeColorPresets() — clears storage and restores built-in defaults
|
|
13
|
+
* - User-specific isolation — different user ids write to separate keys
|
|
14
|
+
* - PageBuilderUser.id type — accepts string and number ids
|
|
15
|
+
*/
|
|
16
|
+
export {};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -125,12 +125,27 @@ export interface User {
|
|
|
125
125
|
name: string;
|
|
126
126
|
}
|
|
127
127
|
export interface PageBuilderUser {
|
|
128
|
-
|
|
128
|
+
/**
|
|
129
|
+
* Optional stable user identifier.
|
|
130
|
+
* When provided, theme color presets are stored under a user-scoped localStorage
|
|
131
|
+
* key (`vueWebsitePageBuilderThemeColorPresets-u{id}`) so every user keeps their
|
|
132
|
+
* own personalized presets on the same device. Accepts any string or number that
|
|
133
|
+
* uniquely identifies the user in the host application (e.g. a database row id).
|
|
134
|
+
* Also accepts `null` for cases where the DB returns a nullable id column.
|
|
135
|
+
*/
|
|
136
|
+
id?: string | number | null;
|
|
137
|
+
/**
|
|
138
|
+
* Display name shown in the builder toolbar.
|
|
139
|
+
* Optional so consumers can omit it or pass auth-user objects where the name
|
|
140
|
+
* field may be `username`, `displayName`, etc. — just pick the right field.
|
|
141
|
+
*/
|
|
142
|
+
name?: string;
|
|
129
143
|
image?: string;
|
|
130
144
|
}
|
|
131
145
|
export interface PageSettings {
|
|
132
|
-
classes
|
|
146
|
+
classes?: string;
|
|
133
147
|
style?: string | Record<string, string>;
|
|
148
|
+
[key: string]: unknown;
|
|
134
149
|
}
|
|
135
150
|
export type ThemeColorPresetId = 'primary' | 'secondary' | 'custom1' | 'custom2' | 'custom3' | 'custom4' | 'custom5' | 'custom6';
|
|
136
151
|
export interface ThemeColorPreset {
|
|
@@ -139,21 +154,56 @@ export interface ThemeColorPreset {
|
|
|
139
154
|
color: string;
|
|
140
155
|
enabled: boolean;
|
|
141
156
|
}
|
|
157
|
+
/** Flexible input for consumer configs — id accepts any string (e.g. inferred from variables). */
|
|
158
|
+
export interface ThemeColorPresetInput {
|
|
159
|
+
id: ThemeColorPresetId | (string & {});
|
|
160
|
+
label?: string;
|
|
161
|
+
color?: string;
|
|
162
|
+
enabled?: boolean;
|
|
163
|
+
[key: string]: unknown;
|
|
164
|
+
}
|
|
165
|
+
/** Input shape for themeColorPresets in PageBuilderConfig (partial colors are normalized at runtime). */
|
|
166
|
+
export interface ThemeColorPresetSettingsInput {
|
|
167
|
+
enabled?: boolean;
|
|
168
|
+
colors?: ReadonlyArray<ThemeColorPresetInput>;
|
|
169
|
+
[key: string]: unknown;
|
|
170
|
+
}
|
|
142
171
|
export interface ThemeColorPresetSettings {
|
|
143
172
|
enabled: boolean;
|
|
144
173
|
colors: readonly ThemeColorPreset[];
|
|
145
174
|
}
|
|
146
175
|
export interface PageBuilderConfig {
|
|
147
176
|
updateOrCreate: {
|
|
148
|
-
|
|
177
|
+
/**
|
|
178
|
+
* Whether the builder is creating new content or updating existing content.
|
|
179
|
+
* Accepts `'create'`, `'update'`, or any other string for dynamic / computed values.
|
|
180
|
+
* The union with `(string & {})` preserves autocomplete for the two common values
|
|
181
|
+
* while allowing any string without requiring `as const` or explicit casting.
|
|
182
|
+
*
|
|
183
|
+
* @example
|
|
184
|
+
* // Dynamic value — works without `as const`
|
|
185
|
+
* formType: hasContent ? 'update' : 'create'
|
|
186
|
+
*/
|
|
187
|
+
formType: 'create' | 'update' | (string & {});
|
|
149
188
|
formName: FormName | (string & {});
|
|
189
|
+
[key: string]: unknown;
|
|
150
190
|
};
|
|
151
191
|
pageBuilderLogo?: {
|
|
152
192
|
src: string;
|
|
193
|
+
[key: string]: unknown;
|
|
153
194
|
} | null;
|
|
154
195
|
resourceData?: {
|
|
155
|
-
|
|
156
|
-
|
|
196
|
+
/**
|
|
197
|
+
* Optional page/resource title shown in the builder toolbar.
|
|
198
|
+
* Made optional so consumers can pass a resource object without a title
|
|
199
|
+
* or when the title isn't known yet at the time `startBuilder` is called.
|
|
200
|
+
*/
|
|
201
|
+
title?: string;
|
|
202
|
+
/**
|
|
203
|
+
* Accepts both numeric IDs and string-based IDs (e.g. UUIDs).
|
|
204
|
+
* The service handles both types at runtime when building localStorage keys.
|
|
205
|
+
*/
|
|
206
|
+
id?: number | string;
|
|
157
207
|
[key: string]: unknown;
|
|
158
208
|
} | null;
|
|
159
209
|
userForPageBuilder?: PageBuilderUser;
|
|
@@ -170,7 +220,7 @@ export interface PageBuilderConfig {
|
|
|
170
220
|
} | null;
|
|
171
221
|
settings?: {
|
|
172
222
|
brandColor?: string;
|
|
173
|
-
themeColorPresets?: ThemeColorPresetSettings | null;
|
|
223
|
+
themeColorPresets?: ThemeColorPresetSettingsInput | ThemeColorPresetSettings | null;
|
|
174
224
|
[key: string]: unknown;
|
|
175
225
|
} | null;
|
|
176
226
|
pageSettings?: PageSettings;
|