@node-projects/web-component-designer 0.1.259 → 0.1.260

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.
@@ -26,7 +26,7 @@ export declare class DesignItem implements IDesignItem {
26
26
  nodeReplaced: TypedEvent<void>;
27
27
  get window(): Window & typeof globalThis;
28
28
  get document(): Document;
29
- get usableContainer(): Element | ShadowRoot | Document;
29
+ get usableContainer(): Element | Document | ShadowRoot;
30
30
  clone(): Promise<IDesignItem>;
31
31
  allMatching(selectors: string): Generator<IDesignItem, void, any>;
32
32
  replaceNode(newNode: Node): void;
@@ -2,6 +2,6 @@ import { IDesignItem } from "../../item/IDesignItem.js";
2
2
  export declare class DomConverter {
3
3
  static normalizeAttributeValue(value: string | number, useSingleQuotes?: boolean): string;
4
4
  static normalizeContentValue(value: string): string;
5
- static IsSelfClosingElement(tag: string): tag is "area" | "base" | "br" | "col" | "embed" | "hr" | "img" | "input" | "keygen" | "link" | "meta" | "param" | "source" | "track" | "wbr";
5
+ static IsSelfClosingElement(tag: string): tag is "input" | "area" | "base" | "br" | "col" | "embed" | "hr" | "img" | "keygen" | "link" | "meta" | "param" | "source" | "track" | "wbr";
6
6
  static ConvertToString(designItems: IDesignItem[], beautifyOutput?: boolean, updatePositions?: boolean): string;
7
7
  }
@@ -0,0 +1,9 @@
1
+ import { BaseCustomWebComponentLazyAppend } from '@node-projects/base-custom-webcomponent';
2
+ import { IMiniatureView } from './IMiniatureView.js';
3
+ import { IDesignerCanvas } from '../designerView/IDesignerCanvas.js';
4
+ export declare class FirefoxElementMiniatiureView extends BaseCustomWebComponentLazyAppend implements IMiniatureView {
5
+ static readonly template: HTMLTemplateElement;
6
+ private _imgdiv;
7
+ constructor();
8
+ reRender(designerView: IDesignerCanvas): void;
9
+ }
@@ -0,0 +1,19 @@
1
+ import { BaseCustomWebComponentLazyAppend, html } from '@node-projects/base-custom-webcomponent';
2
+ //TODO: does not work atm.
3
+ //see: https://bugzilla.mozilla.org/show_bug.cgi?id=1966844
4
+ export class FirefoxElementMiniatiureView extends BaseCustomWebComponentLazyAppend {
5
+ static template = html `<div class="imgdiv"></div>`;
6
+ _imgdiv;
7
+ constructor() {
8
+ super();
9
+ this._restoreCachedInititalValues();
10
+ this._imgdiv = this._getDomElement('imgdiv');
11
+ this._imgdiv.style.backgroundImage = `-moz-element(#web-compoent-designer-${1234})`;
12
+ }
13
+ reRender(designerView) {
14
+ //@ts-ignore
15
+ document.mozSetImageElement("web-compoent-designer", designerView.rootDesignItem.element);
16
+ }
17
+ }
18
+ customElements.define('node-projects-firefox-element-miniature-view', FirefoxElementMiniatiureView);
19
+ //# sourceMappingURL=FirefoxElementMiniatiureView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FirefoxElementMiniatiureView.js","sourceRoot":"","sources":["../../../../src/elements/widgets/miniatureView/FirefoxElementMiniatiureView.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gCAAgC,EAAE,IAAI,EAAE,MAAM,yCAAyC,CAAC;AAIjG,0BAA0B;AAC1B,2DAA2D;AAC3D,MAAM,OAAO,4BAA6B,SAAQ,gCAAgC;IAEhF,MAAM,CAAmB,QAAQ,GAAG,IAAI,CAAA,4BAA4B,CAAC;IAE7D,OAAO,CAAiB;IAEhC;QACE,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,4BAA4B,EAAE,CAAC;QAEpC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,cAAc,CAAiB,QAAQ,CAAC,CAAC;QAC7D,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,eAAe,GAAG,uCAAuC,IAAI,GAAG,CAAA;IACrF,CAAC;IAED,QAAQ,CAAC,YAA6B;QACpC,YAAY;QACZ,QAAQ,CAAC,kBAAkB,CAAC,uBAAuB,EAAE,YAAY,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;IAC5F,CAAC;;AAGH,cAAc,CAAC,MAAM,CAAC,8CAA8C,EAAE,4BAA4B,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "description": "A WYSIWYG designer webcomponent for html components",
3
3
  "name": "@node-projects/web-component-designer",
4
- "version": "0.1.259",
4
+ "version": "0.1.260",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "author": "jochen.kuehner@gmx.de",
@@ -1,13 +0,0 @@
1
- import { IDesignItem } from '../../item/IDesignItem.js';
2
- import { OverlayLayerView } from './overlayLayerView.js';
3
- import { Snaplines } from './Snaplines.js';
4
- export interface IPlacementView {
5
- alignOnSnap: boolean;
6
- alignOnGrid: boolean;
7
- gridSize: number;
8
- rootDesignItem: IDesignItem;
9
- overlayLayer: OverlayLayerView;
10
- snapLines: Snaplines;
11
- readonly zoomFactor: number;
12
- readonly scaleFactor: number;
13
- }
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=IPlacementView.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IPlacementView.js","sourceRoot":"","sources":["../../../../src/elements/widgets/designerView/IPlacementView.ts"],"names":[],"mappings":""}