@webx-ui/module-blocks 0.6.4 → 0.7.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/BlockStage.d.ts +10 -3
- package/dist/frame.d.ts +26 -0
- package/dist/index.js +1332 -1267
- package/dist/index.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types.d.ts +5 -0
- package/package.json +4 -4
package/dist/BlockStage.d.ts
CHANGED
|
@@ -1,19 +1,26 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The block on
|
|
3
|
-
* or a phone at one to one.
|
|
4
|
-
*
|
|
2
|
+
* The block as it will stand on the site, at a chosen width: a desktop scaled down to fit the
|
|
3
|
+
* column, a tablet or a phone at one to one.
|
|
4
|
+
*
|
|
5
|
+
* With `stage` the frame is a page of the site — its layout, header, footer and styles, with
|
|
6
|
+
* an empty place for the block — loaded once; every change after that swaps the block and its
|
|
7
|
+
* styles in place, so the site around it does not redraw under the editor's typing. Without
|
|
8
|
+
* it (a server older than the stage) the frame is the block on a bare document, as before.
|
|
5
9
|
*/
|
|
6
10
|
type __VLS_Props = {
|
|
7
11
|
html: string;
|
|
8
12
|
styles: string;
|
|
9
13
|
script?: string | null;
|
|
10
14
|
runtime?: string | null;
|
|
15
|
+
/** The address of the stage page; null draws the block on a bare document. */
|
|
16
|
+
stage?: string | null;
|
|
11
17
|
loading?: boolean;
|
|
12
18
|
};
|
|
13
19
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
14
20
|
script: string | null;
|
|
15
21
|
loading: boolean;
|
|
16
22
|
runtime: string | null;
|
|
23
|
+
stage: string | null;
|
|
17
24
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
18
25
|
box: HTMLDivElement;
|
|
19
26
|
frame: HTMLIFrameElement;
|
package/dist/frame.d.ts
CHANGED
|
@@ -55,6 +55,32 @@ export interface FrameBinding {
|
|
|
55
55
|
export declare function bindFrame(doc: Document, handlers: {
|
|
56
56
|
select: (key: string | null) => void;
|
|
57
57
|
}): FrameBinding;
|
|
58
|
+
/**
|
|
59
|
+
* The same picture without the choosing: nothing in the page navigates, submits or is dragged
|
|
60
|
+
* away. What the block editor's stage needs — the site's header is full of links, and one
|
|
61
|
+
* click on them would leave the frame on another page of the site with the block gone.
|
|
62
|
+
*/
|
|
63
|
+
export declare function freezeFrame(doc: Document): FrameBinding;
|
|
64
|
+
/** The key the stage draws its block under — `StageController::KEY` on the server. */
|
|
65
|
+
export declare const STAGE_KEY = "sample";
|
|
66
|
+
/** The `<style>` of the stage the block's styles go into — `StageController::STYLES`. */
|
|
67
|
+
export declare const STAGE_STYLES = "wx-stage-styles";
|
|
68
|
+
/**
|
|
69
|
+
* Put a block on the stage page: its styles into the stage's `<style>`, its markup between the
|
|
70
|
+
* markers. False when the page has no place for it — a layout that dropped its slot.
|
|
71
|
+
*
|
|
72
|
+
* The script is not here on purpose: a script registered in a page cannot be taken back, so
|
|
73
|
+
* a new one means a new page (see `mountScript`).
|
|
74
|
+
*/
|
|
75
|
+
export declare function fillStage(doc: Document, input: {
|
|
76
|
+
html: string;
|
|
77
|
+
styles: string;
|
|
78
|
+
}): boolean;
|
|
79
|
+
/**
|
|
80
|
+
* Run a block's script in the page: `webx.block()` registers it and mounts what is already
|
|
81
|
+
* there. Added as an element, since that is what makes a browser run it.
|
|
82
|
+
*/
|
|
83
|
+
export declare function mountScript(doc: Document, script: string): void;
|
|
58
84
|
export interface StageInput {
|
|
59
85
|
html: string;
|
|
60
86
|
styles: string;
|