@webx-ui/module-banners 0.1.12 → 0.2.0
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/LayerInspector.d.ts +30 -0
- package/dist/LayersField.d.ts +14 -0
- package/dist/api.d.ts +3 -1
- package/dist/editor.d.ts +14 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.js +1993 -487
- package/dist/index.js.map +1 -1
- package/dist/layers.d.ts +122 -0
- package/dist/style.css +1 -1
- package/dist/types.d.ts +31 -0
- package/package.json +4 -3
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { BannerLayer, LayerFrame, LayerView } from './layers';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
layer: BannerLayer;
|
|
4
|
+
view: LayerView;
|
|
5
|
+
tags: {
|
|
6
|
+
value: string;
|
|
7
|
+
label: string;
|
|
8
|
+
}[];
|
|
9
|
+
variants: {
|
|
10
|
+
value: string;
|
|
11
|
+
label: string;
|
|
12
|
+
}[];
|
|
13
|
+
palette: {
|
|
14
|
+
key: string;
|
|
15
|
+
value: string;
|
|
16
|
+
}[];
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
};
|
|
19
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
20
|
+
delete: () => any;
|
|
21
|
+
"same-as-desktop": () => any;
|
|
22
|
+
update: (layer: BannerLayer) => any;
|
|
23
|
+
frame: (patch: Partial<LayerFrame>) => any;
|
|
24
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
25
|
+
onDelete?: (() => any) | undefined;
|
|
26
|
+
"onSame-as-desktop"?: (() => any) | undefined;
|
|
27
|
+
onUpdate?: ((layer: BannerLayer) => any) | undefined;
|
|
28
|
+
onFrame?: ((patch: Partial<LayerFrame>) => any) | undefined;
|
|
29
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
30
|
+
export default _default;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { BannerLayer } from './layers';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
modelValue?: BannerLayer[] | null;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
};
|
|
6
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
7
|
+
"update:modelValue": (value: BannerLayer[]) => any;
|
|
8
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
9
|
+
"onUpdate:modelValue"?: ((value: BannerLayer[]) => any) | undefined;
|
|
10
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
11
|
+
canvas: HTMLDivElement;
|
|
12
|
+
stage: HTMLDivElement;
|
|
13
|
+
}, HTMLDivElement>;
|
|
14
|
+
export default _default;
|
package/dist/api.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AdminContext } from '@webx-ui/module-admin';
|
|
2
2
|
import { ScreenModel } from '@webx-ui/schema';
|
|
3
|
-
import { BannerDetail, BannerRow, PlaceInput, PlaceRow } from './types';
|
|
3
|
+
import { BannerDetail, BannerRow, BannersTheme, PlaceInput, PlaceRow } from './types';
|
|
4
4
|
export interface BannersApi {
|
|
5
5
|
/** Every place: the declared ones in the config's order, then the own ones by name. */
|
|
6
6
|
places(): Promise<PlaceRow[]>;
|
|
@@ -26,6 +26,8 @@ export interface BannersApi {
|
|
|
26
26
|
restore(id: number): Promise<BannerRow>;
|
|
27
27
|
/** The order of one place, written whole. */
|
|
28
28
|
reorder(place: string, ids: number[]): Promise<void>;
|
|
29
|
+
/** The site's theme as the layer editor shows it; empty on a site without one. */
|
|
30
|
+
theme(): Promise<BannersTheme>;
|
|
29
31
|
}
|
|
30
32
|
/** Everything under `/banners`, below the panel's API path (§5.6). */
|
|
31
33
|
export declare function createBannersApi(admin: AdminContext): BannersApi;
|
package/dist/editor.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ComputedRef, Ref } from 'vue';
|
|
2
|
+
import { ScreenModel } from '@webx-ui/schema';
|
|
3
|
+
import { PlaceRow } from './types';
|
|
4
|
+
/**
|
|
5
|
+
* What the banner's page tells the fields of its screen that need more than their own value: the
|
|
6
|
+
* layer editor draws the banner's picture, puts in its title and text, and lays out its buttons,
|
|
7
|
+
* in the frame of the place the banner stands in.
|
|
8
|
+
*/
|
|
9
|
+
export interface BannerEditorContext {
|
|
10
|
+
values: Ref<ScreenModel>;
|
|
11
|
+
place: ComputedRef<PlaceRow | null>;
|
|
12
|
+
}
|
|
13
|
+
export declare function provideBannerEditor(context: BannerEditorContext): void;
|
|
14
|
+
export declare function useBannerEditor(): BannerEditorContext | null;
|
package/dist/index.d.ts
CHANGED
|
@@ -3,4 +3,6 @@ export { createBannersApi, type BannersApi } from './api';
|
|
|
3
3
|
export { bannersMessages } from './messages';
|
|
4
4
|
export { default as WxBannersPage } from './BannersPage';
|
|
5
5
|
export { default as WxBannerEditorPage } from './BannerEditorPage';
|
|
6
|
-
export
|
|
6
|
+
export { default as WxBannerLayers } from './LayersField';
|
|
7
|
+
export * from './layers';
|
|
8
|
+
export type { BannerButton, BannerDetail, BannerRow, BannerSummary, PlaceInput, PlaceLayers, PlaceRow, BannersTheme, } from './types';
|