@kubex/zinc 1.1.64 → 1.1.65
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/custom-elements.json +246 -27
- package/dist/vscode.html-custom-data.json +13 -3
- package/dist/web-types.json +44 -5
- package/dist/zn.d.ts +46 -11
- package/dist/zn.min.js +441 -389
- package/docs/pages/components/remarkd-editor.md +25 -9
- package/package.json +2 -2
- package/src/components/page-builder/page-builder.component.ts +118 -54
- package/src/components/query-builder/query-builder.component.ts +2 -1
- package/src/components/remarkd-editor/remarkd-editor.component.ts +240 -55
- package/src/components/remarkd-editor/remarkd-editor.scss +106 -3
- package/src/components/remarkd-editor/remarkd-editor.test.ts +40 -6
- package/web-test-runner.config.js +2 -2
package/dist/zn.d.ts
CHANGED
|
@@ -8711,9 +8711,7 @@ declare module "components/remarkd-editor/remarkd-editor.component" {
|
|
|
8711
8711
|
* @dependency zn-button
|
|
8712
8712
|
* @dependency zn-button-group
|
|
8713
8713
|
* @dependency zn-icon
|
|
8714
|
-
* @dependency zn-dialog
|
|
8715
8714
|
* @dependency zn-file
|
|
8716
|
-
* @dependency zn-input
|
|
8717
8715
|
*
|
|
8718
8716
|
* @event zn-input - Emitted on each keystroke while editing a block.
|
|
8719
8717
|
* @event zn-change - Emitted when a block edit is committed and the value changes.
|
|
@@ -8724,6 +8722,7 @@ declare module "components/remarkd-editor/remarkd-editor.component" {
|
|
|
8724
8722
|
* @csspart rendered - The rendered remarkd output of a block.
|
|
8725
8723
|
* @csspart input - The textarea shown while editing a block.
|
|
8726
8724
|
* @csspart slash-menu - The context menu opened by typing "/" in a block.
|
|
8725
|
+
* @csspart image-controls - The caption / alignment / size panel shown when an image block is clicked.
|
|
8727
8726
|
*/
|
|
8728
8727
|
export default class ZnRemarkdEditor extends ZincElement implements ZincFormControl {
|
|
8729
8728
|
static styles: CSSResultGroup;
|
|
@@ -8737,11 +8736,11 @@ declare module "components/remarkd-editor/remarkd-editor.component" {
|
|
|
8737
8736
|
private slashMenuOpen;
|
|
8738
8737
|
private slashQuery;
|
|
8739
8738
|
private slashActiveIndex;
|
|
8740
|
-
private
|
|
8739
|
+
private imagePickerIndex;
|
|
8740
|
+
private imageEdit;
|
|
8741
8741
|
private dropIndicator;
|
|
8742
8742
|
private dragIndex;
|
|
8743
8743
|
private editShell;
|
|
8744
|
-
private imageInsertIndex;
|
|
8745
8744
|
private pendingDragHandle;
|
|
8746
8745
|
private dragStartX;
|
|
8747
8746
|
private dragStartY;
|
|
@@ -8755,10 +8754,9 @@ declare module "components/remarkd-editor/remarkd-editor.component" {
|
|
|
8755
8754
|
/** Placeholder shown when the document is empty. */
|
|
8756
8755
|
placeholder: string;
|
|
8757
8756
|
/**
|
|
8758
|
-
* Endpoint for image uploads. Posting the file
|
|
8759
|
-
* `{uploadPath, uploadUrl}`; the file is then PUT
|
|
8760
|
-
* `
|
|
8761
|
-
* prompts for a URL instead.
|
|
8757
|
+
* Endpoint for image uploads — required for image support. Posting the file
|
|
8758
|
+
* metadata here must return `{uploadPath, uploadUrl}`; the file is then PUT
|
|
8759
|
+
* to `uploadUrl` and the returned `uploadPath` is embedded as the image URL.
|
|
8762
8760
|
*/
|
|
8763
8761
|
attachmentUrl: string;
|
|
8764
8762
|
/** Makes the editor required for form submission. */
|
|
@@ -8789,8 +8787,17 @@ declare module "components/remarkd-editor/remarkd-editor.component" {
|
|
|
8789
8787
|
private closesFence;
|
|
8790
8788
|
private updateBlocks;
|
|
8791
8789
|
private handleRenderedClick;
|
|
8790
|
+
/** Parses a block that is purely an image (with optional caption/align lines). */
|
|
8791
|
+
private parseImageBlock;
|
|
8792
|
+
private serializeImageBlock;
|
|
8792
8793
|
private toggleCheckbox;
|
|
8793
8794
|
private startEdit;
|
|
8795
|
+
private updateImageEdit;
|
|
8796
|
+
private saveImageEdit;
|
|
8797
|
+
private closeImageEdit;
|
|
8798
|
+
private deleteImageBlock;
|
|
8799
|
+
private editImageSource;
|
|
8800
|
+
private handleImageControlsKeydown;
|
|
8794
8801
|
/**
|
|
8795
8802
|
* The remarkd chrome the editing block should keep, derived from its first
|
|
8796
8803
|
* line — so a NOTE still looks like a note while its source is edited.
|
|
@@ -8798,6 +8805,7 @@ declare module "components/remarkd-editor/remarkd-editor.component" {
|
|
|
8798
8805
|
private computeEditShell;
|
|
8799
8806
|
private focusInput;
|
|
8800
8807
|
private addBlockAt;
|
|
8808
|
+
private deleteBlock;
|
|
8801
8809
|
/** Inserts a draft block — committed (or dropped, if left empty) on blur. */
|
|
8802
8810
|
private insertDraftBlock;
|
|
8803
8811
|
/**
|
|
@@ -8824,16 +8832,19 @@ declare module "components/remarkd-editor/remarkd-editor.component" {
|
|
|
8824
8832
|
private createDragGhost;
|
|
8825
8833
|
private moveDragGhost;
|
|
8826
8834
|
private pickImage;
|
|
8827
|
-
private
|
|
8828
|
-
private
|
|
8835
|
+
private closeImagePicker;
|
|
8836
|
+
private handleImagePicked;
|
|
8829
8837
|
private insertImage;
|
|
8830
8838
|
private uploadImage;
|
|
8831
8839
|
private autosize;
|
|
8832
8840
|
private handleToolbarInsert;
|
|
8833
8841
|
private renderSlashMenu;
|
|
8842
|
+
private renderImageControls;
|
|
8834
8843
|
private renderBlock;
|
|
8835
8844
|
render(): import("lit-html").TemplateResult<1>;
|
|
8836
|
-
|
|
8845
|
+
/** The block views, with the inline image picker spliced in when active. */
|
|
8846
|
+
private renderBody;
|
|
8847
|
+
private renderImagePicker;
|
|
8837
8848
|
}
|
|
8838
8849
|
}
|
|
8839
8850
|
declare module "components/remarkd-editor/index" {
|
|
@@ -10152,6 +10163,11 @@ declare module "components/page-builder/page-builder.component" {
|
|
|
10152
10163
|
'zn-page-palette-item': typeof ZnPagePaletteItem;
|
|
10153
10164
|
'zn-page-section-card': typeof ZnPageSectionCard;
|
|
10154
10165
|
};
|
|
10166
|
+
private readonly formControlController;
|
|
10167
|
+
/** The name of the control, submitted as a name/value pair with form data. */
|
|
10168
|
+
name: string;
|
|
10169
|
+
/** Associates the control with a form by id. The form must be in the same document or shadow root. */
|
|
10170
|
+
form: string;
|
|
10155
10171
|
/** The page state as a JSON string. Parsed on set; invalid JSON is ignored with a warning. */
|
|
10156
10172
|
config: string;
|
|
10157
10173
|
heading: string;
|
|
@@ -10188,6 +10204,24 @@ declare module "components/page-builder/page-builder.component" {
|
|
|
10188
10204
|
get state(): PageState;
|
|
10189
10205
|
/** Replaces the page state wholesale (does not emit zn-page-change). */
|
|
10190
10206
|
set state(next: PageState);
|
|
10207
|
+
/** The page state as a JSON string — the value submitted with form data. */
|
|
10208
|
+
get value(): string;
|
|
10209
|
+
/** Replaces the page state from a JSON string (does not emit zn-page-change). */
|
|
10210
|
+
set value(next: string);
|
|
10211
|
+
/** The serialised state of the last externally loaded page — restored on form reset. */
|
|
10212
|
+
defaultValue: string;
|
|
10213
|
+
/** Gets the validity state object. */
|
|
10214
|
+
get validity(): ValidityState;
|
|
10215
|
+
/** Gets the validation message. */
|
|
10216
|
+
get validationMessage(): string;
|
|
10217
|
+
/** Checks for validity but does not show a validation message. */
|
|
10218
|
+
checkValidity(): boolean;
|
|
10219
|
+
/** Gets the associated form, if one exists. */
|
|
10220
|
+
getForm(): HTMLFormElement | null;
|
|
10221
|
+
/** Checks for validity and shows the browser's validation message if the control is invalid. */
|
|
10222
|
+
reportValidity(): boolean;
|
|
10223
|
+
/** Sets a custom validation message. Pass an empty string to restore validity. */
|
|
10224
|
+
setCustomValidity(_message?: string): void;
|
|
10191
10225
|
handleConfigChange(): void;
|
|
10192
10226
|
handleSectionTypesChange(): void;
|
|
10193
10227
|
registerSectionType(type: PageSectionType): this;
|
|
@@ -10229,6 +10263,7 @@ declare module "components/page-builder/page-builder.component" {
|
|
|
10229
10263
|
*/
|
|
10230
10264
|
private _offerRestoreIfNewer;
|
|
10231
10265
|
protected willUpdate(changed: PropertyValues): void;
|
|
10266
|
+
protected firstUpdated(changed: PropertyValues): void;
|
|
10232
10267
|
private _typeFromTemplate;
|
|
10233
10268
|
private _registerSlottedTemplates;
|
|
10234
10269
|
/** Normalises and installs an externally provided state; resets selection. */
|