@node-projects/web-component-designer 0.0.40 → 0.0.46

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.
Files changed (44) hide show
  1. package/dist/commandHandling/CommandType.d.ts +3 -3
  2. package/dist/commandHandling/CommandType.js +3 -3
  3. package/dist/elements/controls/NumericInput.d.ts +0 -0
  4. package/dist/elements/controls/NumericInput.js +1 -0
  5. package/dist/elements/controls/NumericPopup.d.ts +6 -0
  6. package/dist/elements/controls/NumericPopup.js +39 -0
  7. package/dist/elements/controls/NumericStyleInput.d.ts +16 -0
  8. package/dist/elements/controls/NumericStyleInput.js +56 -0
  9. package/dist/elements/controls/ThicknessEditor copy.d.ts +33 -0
  10. package/dist/elements/controls/ThicknessEditor copy.js +145 -0
  11. package/dist/elements/helper/LayoutHelper.d.ts +0 -0
  12. package/dist/elements/helper/LayoutHelper.js +4 -0
  13. package/dist/elements/item/DesignItem.js +10 -0
  14. package/dist/elements/services/BaseServiceContainer.js +0 -2
  15. package/dist/elements/services/DefaultServiceBootstrap.js +2 -0
  16. package/dist/elements/services/InstanceServiceContainer.d.ts +3 -0
  17. package/dist/elements/services/InstanceServiceContainer.js +5 -0
  18. package/dist/elements/services/ServiceContainer.d.ts +3 -0
  19. package/dist/elements/services/ServiceContainer.js +3 -0
  20. package/dist/elements/services/htmlWriterService/HtmlWriterService.js +2 -2
  21. package/dist/elements/services/modelCommandService/DefaultInstanceService.d.ts +8 -0
  22. package/dist/elements/services/modelCommandService/DefaultInstanceService.js +14 -0
  23. package/dist/elements/services/modelCommandService/DefaultModelCommandService.d.ts +7 -0
  24. package/dist/elements/services/modelCommandService/DefaultModelCommandService.js +68 -0
  25. package/dist/elements/services/modelCommandService/IInstanceService.d.ts +8 -0
  26. package/dist/elements/services/modelCommandService/IInstanceService.js +1 -0
  27. package/dist/elements/services/modelCommandService/IModelCommandService.d.ts +7 -0
  28. package/dist/elements/services/modelCommandService/IModelCommandService.js +1 -0
  29. package/dist/elements/services/placementService/DefaultPlacementService.js +2 -2
  30. package/dist/elements/services/undoService/UndoService.d.ts +3 -0
  31. package/dist/elements/services/undoService/UndoService.js +7 -0
  32. package/dist/elements/widgets/designerView/DomConverter.js +2 -2
  33. package/dist/elements/widgets/designerView/designerCanvas.d.ts +0 -2
  34. package/dist/elements/widgets/designerView/designerCanvas.js +14 -20
  35. package/dist/elements/widgets/designerView/extensions/PrimarySelectionDefaultExtension.js +1 -1
  36. package/dist/elements/widgets/designerView/extensions/PrimarySelectionDefaultExtensionProvider.d.ts +1 -0
  37. package/dist/elements/widgets/designerView/extensions/PrimarySelectionDefaultExtensionProvider.js +4 -0
  38. package/dist/elements/widgets/designerView/extensions/ResizeExtensionProvider.d.ts +1 -0
  39. package/dist/elements/widgets/designerView/extensions/ResizeExtensionProvider.js +4 -0
  40. package/dist/elements/widgets/designerView/overlayLayerView.js +0 -2
  41. package/dist/elements/widgets/designerView/tools/RectangleSelectorTool.js +0 -1
  42. package/dist/index.d.ts +2 -0
  43. package/dist/index.js +1 -0
  44. package/package.json +1 -1
@@ -12,12 +12,12 @@ export declare enum CommandType {
12
12
  'moveToBack' = "moveToBack",
13
13
  'arrangeLeft' = "arrangeLeft",
14
14
  'arrangeCenter' = "arrangeCenter",
15
- 'arrangeRigtht' = "arrangeRigtht",
15
+ 'arrangeRight' = "arrangeRight",
16
16
  'arrangeTop' = "arrangeTop",
17
17
  'arrangeMiddle' = "arrangeMiddle",
18
18
  'arrangeBottom' = "arrangeBottom",
19
- 'adjustWidth' = "adjustWidth",
20
- 'adjustHeight' = "adjustHeight",
19
+ 'unifyWidth' = "unifyWidth",
20
+ 'unifyHeight' = "unifyHeight",
21
21
  'distributeHorizontal' = "distributeHorizontaly",
22
22
  'distributeVertical' = "distributeVertical",
23
23
  'setTool' = "setTool",
@@ -13,12 +13,12 @@ export var CommandType;
13
13
  CommandType["moveToBack"] = "moveToBack";
14
14
  CommandType["arrangeLeft"] = "arrangeLeft";
15
15
  CommandType["arrangeCenter"] = "arrangeCenter";
16
- CommandType["arrangeRigtht"] = "arrangeRigtht";
16
+ CommandType["arrangeRight"] = "arrangeRight";
17
17
  CommandType["arrangeTop"] = "arrangeTop";
18
18
  CommandType["arrangeMiddle"] = "arrangeMiddle";
19
19
  CommandType["arrangeBottom"] = "arrangeBottom";
20
- CommandType["adjustWidth"] = "adjustWidth";
21
- CommandType["adjustHeight"] = "adjustHeight";
20
+ CommandType["unifyWidth"] = "unifyWidth";
21
+ CommandType["unifyHeight"] = "unifyHeight";
22
22
  CommandType["distributeHorizontal"] = "distributeHorizontaly";
23
23
  CommandType["distributeVertical"] = "distributeVertical";
24
24
  CommandType["setTool"] = "setTool";
File without changes
@@ -0,0 +1 @@
1
+ "use strict";
@@ -0,0 +1,6 @@
1
+ import { BaseCustomWebComponentConstructorAppend } from '@node-projects/base-custom-webcomponent';
2
+ export declare class NumericPopup extends BaseCustomWebComponentConstructorAppend {
3
+ static readonly style: CSSStyleSheet;
4
+ static readonly template: HTMLTemplateElement;
5
+ ready(): void;
6
+ }
@@ -0,0 +1,39 @@
1
+ import { BaseCustomWebComponentConstructorAppend, css, html } from '@node-projects/base-custom-webcomponent';
2
+ export class NumericPopup extends BaseCustomWebComponentConstructorAppend {
3
+ static style = css `
4
+ :host {
5
+ }
6
+ .predefined {
7
+ grid-template-rows: 1fr 1fr 1fr 1fr 1fr;
8
+ grid-template-columns: 1fr 1fr;
9
+ }
10
+ `;
11
+ static template = html `
12
+ <div>
13
+ <input type="range" min="0" max="100">
14
+ <input id="value">
15
+ <select>
16
+ <option>px</option>
17
+ <option>%</option>
18
+ <option>pt</option>
19
+ <option>em</option>
20
+ <option>rem</option>
21
+ <option>auto</option>
22
+ </select>
23
+ </div>
24
+ <div class="predefined">
25
+ <button>Auto</button>
26
+ <button>0</button>
27
+ <button>10</button>
28
+ <button>20</button>
29
+ <button>40</button>
30
+ <button>50</button>
31
+ <button>70</button>
32
+ <button>90</button>
33
+ <button>100</button>
34
+ </div>
35
+ `;
36
+ ready() {
37
+ }
38
+ }
39
+ customElements.define('node-projects-numeric-popup', NumericPopup);
@@ -0,0 +1,16 @@
1
+ import { BaseCustomWebComponentConstructorAppend, TypedEvent } from '@node-projects/base-custom-webcomponent';
2
+ export declare type ImageButtonListSelectorValueChangedEventArgs = {
3
+ newValue?: string;
4
+ oldValue?: string;
5
+ };
6
+ export declare class NumericStyleInput extends BaseCustomWebComponentConstructorAppend {
7
+ static readonly style: CSSStyleSheet;
8
+ static readonly template: HTMLTemplateElement;
9
+ private _value;
10
+ get value(): string;
11
+ set value(value: string);
12
+ valueChanged: TypedEvent<ImageButtonListSelectorValueChangedEventArgs>;
13
+ private _input;
14
+ constructor();
15
+ private _updateValue;
16
+ }
@@ -0,0 +1,56 @@
1
+ import { BaseCustomWebComponentConstructorAppend, css, html, TypedEvent } from '@node-projects/base-custom-webcomponent';
2
+ export class NumericStyleInput extends BaseCustomWebComponentConstructorAppend {
3
+ static style = css `
4
+ :host {
5
+ }
6
+
7
+ input {
8
+ cursor: ew-resize;
9
+ }
10
+ `;
11
+ static template = html `
12
+ <input id="input" type="text">
13
+ <select id="select">
14
+ <option>px</option>
15
+ <option>%</option>
16
+ <option>pt</option>
17
+ </select>
18
+ `;
19
+ _value;
20
+ get value() {
21
+ return this._value;
22
+ }
23
+ set value(value) {
24
+ const oldValue = this._value;
25
+ this._value = value;
26
+ this._updateValue();
27
+ this.valueChanged.emit({ newValue: this._value, oldValue: oldValue });
28
+ }
29
+ valueChanged = new TypedEvent();
30
+ _input;
31
+ //private _select: HTMLSelectElement;
32
+ constructor() {
33
+ super();
34
+ this._input = this._getDomElement('input');
35
+ //this._select = this._getDomElement<HTMLSelectElement>('select');
36
+ let oldX = null;
37
+ this._input.onpointerdown = (e) => {
38
+ oldX = e.x;
39
+ this._input.setPointerCapture(e.pointerId);
40
+ };
41
+ this._input.onpointermove = (e) => {
42
+ if (oldX !== null) {
43
+ let diffX = e.x - oldX;
44
+ if (diffX != 0)
45
+ this._input.value = parseInt(this._input.value) + diffX;
46
+ }
47
+ };
48
+ this._input.onpointerup = (e) => {
49
+ oldX = null;
50
+ this._input.releasePointerCapture(e.pointerId);
51
+ };
52
+ }
53
+ _updateValue() {
54
+ }
55
+ }
56
+ customElements.define('node-projects-numeric-style-input', NumericStyleInput);
@@ -0,0 +1,33 @@
1
+ import { BaseCustomWebComponentConstructorAppend, TypedEvent } from '@node-projects/base-custom-webcomponent';
2
+ export declare type ThicknessEditorValueChangedEventArgs = {
3
+ newValue?: string;
4
+ oldValue?: string;
5
+ };
6
+ export declare class ThicknessEditor extends BaseCustomWebComponentConstructorAppend {
7
+ static readonly style: CSSStyleSheet;
8
+ static readonly template: HTMLTemplateElement;
9
+ private _leftInput;
10
+ private _topInput;
11
+ private _rightInput;
12
+ private _bottomInput;
13
+ private _valueLeft;
14
+ get valueLeft(): string;
15
+ set valueLeft(value: string);
16
+ valueLeftChanged: TypedEvent<ThicknessEditorValueChangedEventArgs>;
17
+ private _valueTop;
18
+ get valueTop(): string;
19
+ set valueTop(value: string);
20
+ valueTopChanged: TypedEvent<ThicknessEditorValueChangedEventArgs>;
21
+ private _valueRight;
22
+ get valueRight(): string;
23
+ set valueRight(value: string);
24
+ valueRightChanged: TypedEvent<ThicknessEditorValueChangedEventArgs>;
25
+ private _valueBottom;
26
+ get valueBottom(): string;
27
+ set valueBottom(value: string);
28
+ valueBottomChanged: TypedEvent<ThicknessEditorValueChangedEventArgs>;
29
+ property: string;
30
+ unsetValue: string;
31
+ _updateValue(): void;
32
+ ready(): void;
33
+ }
@@ -0,0 +1,145 @@
1
+ import { BaseCustomWebComponentConstructorAppend, css, html, TypedEvent } from '@node-projects/base-custom-webcomponent';
2
+ export class ThicknessEditor extends BaseCustomWebComponentConstructorAppend {
3
+ static style = css `
4
+ :host {
5
+ margin: 4px;
6
+ margin-left: auto;
7
+ margin-right: auto;
8
+ }
9
+ #container {
10
+ display: grid;
11
+ grid-template-columns: minmax(30px, 40px) minmax(30px, 60px) minmax(30px, 40px);
12
+ grid-template-rows: auto;
13
+ grid-template-areas:
14
+ " . top ."
15
+ "left middle right"
16
+ " . bottom .";
17
+ column-gap: 2px;
18
+ row-gap: 2px;
19
+ }
20
+ input {
21
+ width: 20px;
22
+ text-align: center;
23
+ font-size: 10px;
24
+ height: 20px;
25
+ padding: 0;
26
+ }
27
+ #left {
28
+ grid-area: left;
29
+ justify-self: end;
30
+ }
31
+ #top {
32
+ grid-area: top;
33
+ align-self: end;
34
+ justify-self: center;
35
+ }
36
+ #right {
37
+ grid-area: right;
38
+ justify-self: start;
39
+ }
40
+ #bottom {
41
+ grid-area: bottom;
42
+ align-self: start;
43
+ justify-self: center;
44
+ }
45
+ #rect {
46
+ grid-area: middle;
47
+ border: 1px solid black;
48
+ background: lightgray;
49
+ }
50
+ `;
51
+ static template = html `
52
+ <div id="container">
53
+ <input id="left">
54
+ <input id="top">
55
+ <input id="right">
56
+ <input id="bottom">
57
+ <div id="rect"></div>
58
+ </div>
59
+ `;
60
+ _leftInput;
61
+ _topInput;
62
+ _rightInput;
63
+ _bottomInput;
64
+ _valueLeft;
65
+ get valueLeft() {
66
+ return this._valueLeft;
67
+ }
68
+ set valueLeft(value) {
69
+ const oldValue = this._valueLeft;
70
+ this._valueLeft = value;
71
+ if (oldValue !== value) {
72
+ this._updateValue();
73
+ this.valueLeftChanged.emit({ newValue: value, oldValue: oldValue });
74
+ }
75
+ }
76
+ valueLeftChanged = new TypedEvent();
77
+ _valueTop;
78
+ get valueTop() {
79
+ return this._valueTop;
80
+ }
81
+ set valueTop(value) {
82
+ const oldValue = this._valueTop;
83
+ this._valueTop = value;
84
+ if (oldValue !== value) {
85
+ this._updateValue();
86
+ this.valueTopChanged.emit({ newValue: value, oldValue: oldValue });
87
+ }
88
+ }
89
+ valueTopChanged = new TypedEvent();
90
+ _valueRight;
91
+ get valueRight() {
92
+ return this._valueRight;
93
+ }
94
+ set valueRight(value) {
95
+ const oldValue = this._valueRight;
96
+ this._valueRight = value;
97
+ if (oldValue !== value) {
98
+ this._updateValue();
99
+ this.valueRightChanged.emit({ newValue: value, oldValue: oldValue });
100
+ }
101
+ }
102
+ valueRightChanged = new TypedEvent();
103
+ _valueBottom;
104
+ get valueBottom() {
105
+ return this._valueBottom;
106
+ }
107
+ set valueBottom(value) {
108
+ const oldValue = this._valueBottom;
109
+ this._valueBottom = value;
110
+ if (oldValue !== value) {
111
+ this._updateValue();
112
+ this.valueBottomChanged.emit({ newValue: value, oldValue: oldValue });
113
+ }
114
+ }
115
+ valueBottomChanged = new TypedEvent();
116
+ property;
117
+ unsetValue;
118
+ _updateValue() {
119
+ this._leftInput.value = this.valueLeft;
120
+ this._topInput.value = this.valueTop;
121
+ this._rightInput.value = this.valueRight;
122
+ this._bottomInput.value = this._valueBottom;
123
+ }
124
+ ready() {
125
+ this._parseAttributesToProperties();
126
+ this._leftInput = this._getDomElement('left');
127
+ this._topInput = this._getDomElement('top');
128
+ this._rightInput = this._getDomElement('right');
129
+ this._bottomInput = this._getDomElement('bottom');
130
+ this._leftInput.onkeyup = (e) => { if (e.key === 'Enter')
131
+ this._valueLeft = this._leftInput.value; };
132
+ this._topInput.onkeyup = (e) => { if (e.key === 'Enter')
133
+ this._valueTop = this._topInput.value; };
134
+ this._rightInput.onkeyup = (e) => { if (e.key === 'Enter')
135
+ this._valueRight = this._rightInput.value; };
136
+ this._bottomInput.onkeyup = (e) => { if (e.key === 'Enter')
137
+ this._valueBottom = this._bottomInput.value; };
138
+ this._leftInput.onblur = (e) => this._valueLeft = this._leftInput.value;
139
+ this._topInput.onblur = (e) => this._valueTop = this._topInput.value;
140
+ this._rightInput.onblur = (e) => this._valueRight = this._rightInput.value;
141
+ this._bottomInput.onblur = (e) => this._valueBottom = this._bottomInput.value;
142
+ this._updateValue();
143
+ }
144
+ }
145
+ customElements.define('node-projects-thickness-editor', ThicknessEditor);
File without changes
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ //todo
3
+ //this function should return the correct property to change a layout, for example left/right when left or right is used,
4
+ //maybe margin on grid? or transform??
@@ -1,6 +1,8 @@
1
1
  import { CssStyleChangeAction } from '../services/undoService/transactionItems/CssStyleChangeAction';
2
2
  import { NodeType } from './NodeType';
3
3
  import { AttributeChangeAction } from '../services/undoService/transactionItems/AttributeChangeAction';
4
+ //import { PropertyChangeAction } from '../services/undoService/transactionItems/PropertyChangeAction';
5
+ import { ExtensionType } from '../widgets/designerView/extensions/ExtensionType';
4
6
  import { DomHelper } from '@node-projects/base-custom-webcomponent/dist/DomHelper';
5
7
  import { CssAttributeParser } from '../helper/CssAttributeParser.js';
6
8
  const hideAtDesignTimeAttributeName = 'node-projects-hide-at-design-time';
@@ -66,6 +68,9 @@ export class DesignItem {
66
68
  return this.getOrCreateDesignItem(this.element.parentNode);
67
69
  }
68
70
  insertChild(designItem, index) {
71
+ //todo... via undoredo system....
72
+ if (designItem.parent && this.instanceServiceContainer.selectionService.primarySelection == designItem)
73
+ designItem.instanceServiceContainer.designerCanvas.extensionManager.removeExtension(designItem.parent, ExtensionType.PrimarySelectionContainer);
69
74
  if (designItem.parent) {
70
75
  designItem.parent.removeChild(designItem);
71
76
  }
@@ -79,8 +84,13 @@ export class DesignItem {
79
84
  this.node.insertBefore(designItem.node, el.element);
80
85
  this._childArray.splice(index, 0, designItem);
81
86
  }
87
+ if (this.instanceServiceContainer.selectionService.primarySelection == designItem)
88
+ designItem.instanceServiceContainer.designerCanvas.extensionManager.applyExtension(designItem.parent, ExtensionType.PrimarySelectionContainer);
82
89
  }
83
90
  removeChild(designItem) {
91
+ //todo... via undoredo system....
92
+ if (designItem.parent && this.instanceServiceContainer.selectionService.primarySelection == designItem)
93
+ designItem.instanceServiceContainer.designerCanvas.extensionManager.removeExtension(designItem.parent, ExtensionType.PrimarySelectionContainer);
84
94
  const index = this._childArray.indexOf(designItem);
85
95
  if (index > -1) {
86
96
  this._childArray.splice(index, 1);
@@ -17,7 +17,6 @@ export class BaseServiceContainer {
17
17
  forSomeServicesTillResult(service, callback) {
18
18
  let services = this.getServices(service);
19
19
  if (services == null) {
20
- console.warn('no services of type: ' + service + ' found');
21
20
  return null;
22
21
  }
23
22
  for (let index = services.length - 1; index >= 0; index--) {
@@ -31,7 +30,6 @@ export class BaseServiceContainer {
31
30
  getLastServiceWhere(service, callback) {
32
31
  let services = this.getServices(service);
33
32
  if (services == null) {
34
- console.warn('no services of type: ' + service + ' found');
35
33
  return null;
36
34
  }
37
35
  for (let index = services.length - 1; index >= 0; index--) {
@@ -44,6 +44,7 @@ import { PrepareElementsForDesignerService } from './instanceService/PrepareElem
44
44
  import { DragDropService } from './dragDropService/DragDropService';
45
45
  import { EditTextExtensionProvider } from '../widgets/designerView/extensions/EditText/EditTextExtensionProvider.js';
46
46
  import { CopyPasteService } from './copyPasteService/CopyPasteService';
47
+ import { DefaultModelCommandService } from './modelCommandService/DefaultModelCommandService';
47
48
  export function createDefaultServiceContainer() {
48
49
  let serviceContainer = new ServiceContainer();
49
50
  serviceContainer.register("propertyService", new PolymerPropertiesService());
@@ -63,6 +64,7 @@ export function createDefaultServiceContainer() {
63
64
  serviceContainer.register("prepareElementsForDesignerService", new PrepareElementsForDesignerService());
64
65
  serviceContainer.register("dragDropService", new DragDropService());
65
66
  serviceContainer.register("copyPasteService", new CopyPasteService());
67
+ serviceContainer.register("modelCommandService", new DefaultModelCommandService());
66
68
  serviceContainer.designerExtensions.set(ExtensionType.Permanent, [
67
69
  new ResizeExtensionProvider(false),
68
70
  new InvisibleDivExtensionProvider()
@@ -3,6 +3,7 @@ import { IUndoService } from './undoService/IUndoService';
3
3
  import { BaseServiceContainer } from './BaseServiceContainer';
4
4
  import { IContentService } from './contentService/IContentService';
5
5
  import { IDesignContext } from '../widgets/designerView/IDesignContext';
6
+ import { IDesignerCanvas } from '../widgets/designerView/IDesignerCanvas.js';
6
7
  interface InstanceServiceNameMap {
7
8
  "undoService": IUndoService;
8
9
  "selectionService": ISelectionService;
@@ -10,6 +11,8 @@ interface InstanceServiceNameMap {
10
11
  }
11
12
  export declare class InstanceServiceContainer extends BaseServiceContainer<InstanceServiceNameMap> {
12
13
  designContext: IDesignContext;
14
+ readonly designerCanvas: IDesignerCanvas;
15
+ constructor(designerCanvas: IDesignerCanvas);
13
16
  get undoService(): IUndoService;
14
17
  get selectionService(): ISelectionService;
15
18
  get contentService(): IContentService;
@@ -2,6 +2,11 @@ import { BaseServiceContainer } from './BaseServiceContainer';
2
2
  import { DesignContext } from '../widgets/designerView/DesignContext';
3
3
  export class InstanceServiceContainer extends BaseServiceContainer {
4
4
  designContext = new DesignContext();
5
+ designerCanvas;
6
+ constructor(designerCanvas) {
7
+ super();
8
+ this.designerCanvas = designerCanvas;
9
+ }
5
10
  get undoService() {
6
11
  return this.getLastService('undoService');
7
12
  }
@@ -22,6 +22,7 @@ import { IPrepareElementsForDesignerService } from './instanceService/IPrepareEl
22
22
  import { IDragDropService } from './dragDropService/IDragDropService';
23
23
  import { ICopyPasteService } from "./copyPasteService/ICopyPasteService.js";
24
24
  import { IDesignerPointerExtensionProvider } from "../widgets/designerView/extensions/pointerExtensions/IDesignerPointerExtensionProvider.js";
25
+ import { IModelCommandService } from "./modelCommandService/IModelCommandService.js";
25
26
  interface ServiceNameMap {
26
27
  "propertyService": IPropertiesService;
27
28
  "containerService": IPlacementService;
@@ -37,6 +38,7 @@ interface ServiceNameMap {
37
38
  "prepareElementsForDesignerService": IPrepareElementsForDesignerService;
38
39
  "dragDropService": IDragDropService;
39
40
  "copyPasteService": ICopyPasteService;
41
+ "modelCommandService": IModelCommandService;
40
42
  }
41
43
  export declare class ServiceContainer extends BaseServiceContainer<ServiceNameMap> {
42
44
  readonly config: {
@@ -62,5 +64,6 @@ export declare class ServiceContainer extends BaseServiceContainer<ServiceNameMa
62
64
  get prepareElementsForDesignerService(): IPrepareElementsForDesignerService;
63
65
  get dragDropService(): IDragDropService;
64
66
  get copyPasteService(): ICopyPasteService;
67
+ get modelCommandService(): IModelCommandService;
65
68
  }
66
69
  export {};
@@ -54,4 +54,7 @@ export class ServiceContainer extends BaseServiceContainer {
54
54
  get copyPasteService() {
55
55
  return this.getLastService('copyPasteService');
56
56
  }
57
+ get modelCommandService() {
58
+ return this.getLastService('modelCommandService');
59
+ }
57
60
  }
@@ -9,12 +9,12 @@ export class HtmlWriterService {
9
9
  }
10
10
  _conditionalyWriteIndent(indentedTextWriter, designItem) {
11
11
  if ((designItem.element instanceof HTMLElement && !isInline(designItem.element)) ||
12
- (designItem.element.previousSibling instanceof HTMLElement && !isInline(designItem.element.previousSibling)))
12
+ (designItem.element.previousElementSibling instanceof HTMLElement && !isInline(designItem.element.previousElementSibling)))
13
13
  indentedTextWriter.writeIndent();
14
14
  }
15
15
  _conditionalyWriteNewline(indentedTextWriter, designItem) {
16
16
  if ((designItem.element instanceof HTMLElement && !isInline(designItem.element)) ||
17
- (designItem.element.nextSibling instanceof HTMLElement && !isInline(designItem.element.nextSibling)))
17
+ (designItem.element.nextElementSibling instanceof HTMLElement && !isInline(designItem.element.nextElementSibling)))
18
18
  indentedTextWriter.writeNewline();
19
19
  }
20
20
  write(indentedTextWriter, designItem, options, designItemsAssignmentList) {
@@ -0,0 +1,8 @@
1
+ import { IInstanceService } from './IInstanceService';
2
+ import { IElementDefinition } from '../elementsService/IElementDefinition';
3
+ import type { ServiceContainer } from '../ServiceContainer';
4
+ import type { InstanceServiceContainer } from '../InstanceServiceContainer';
5
+ import { IDesignItem } from '../../item/IDesignItem';
6
+ export declare class DefaultInstanceService implements IInstanceService {
7
+ getElement(definition: IElementDefinition, serviceContainer: ServiceContainer, instanceServiceContainer: InstanceServiceContainer): Promise<IDesignItem>;
8
+ }
@@ -0,0 +1,14 @@
1
+ import { DesignItem } from '../../item/DesignItem';
2
+ export class DefaultInstanceService {
3
+ handleMoveCommand(command) {
4
+ let sel = this.instanceServiceContainer.selectionService.primarySelection;
5
+ if (command == CommandType.moveBackward)
6
+ this.instanceServiceContainer.undoService.execute(new MoveElementInDomAction(sel, DesignItem.GetDesignItem(sel.element.previousElementSibling), 'beforebegin', DesignItem.GetDesignItem(sel.element.previousElementSibling), 'afterend'));
7
+ else if (command == CommandType.moveForward)
8
+ this.instanceServiceContainer.undoService.execute(new MoveElementInDomAction(sel, DesignItem.GetDesignItem(sel.element.nextElementSibling), 'afterend', DesignItem.GetDesignItem(sel.element.nextElementSibling), 'beforebegin'));
9
+ else if (command == CommandType.moveToBack)
10
+ this.instanceServiceContainer.undoService.execute(new MoveElementInDomAction(sel, DesignItem.GetDesignItem(sel.element.parentElement), 'afterbegin', DesignItem.GetDesignItem(sel.element.previousElementSibling), 'afterend'));
11
+ else if (command == CommandType.moveToFront)
12
+ this.instanceServiceContainer.undoService.execute(new MoveElementInDomAction(sel, DesignItem.GetDesignItem(sel.element.parentElement), 'beforeend', DesignItem.GetDesignItem(sel.element.nextElementSibling), 'beforebegin'));
13
+ }
14
+ }
@@ -0,0 +1,7 @@
1
+ import { IUiCommand } from "../../../commandHandling/IUiCommand.js";
2
+ import { IDesignerCanvas } from "../../widgets/designerView/IDesignerCanvas.js";
3
+ import { IModelCommandService } from "./IModelCommandService.js";
4
+ export declare class DefaultModelCommandService implements IModelCommandService {
5
+ canExecuteCommand(designerCanvas: IDesignerCanvas, command: IUiCommand): boolean;
6
+ executeCommand(designerCanvas: IDesignerCanvas, command: IUiCommand): Promise<boolean>;
7
+ }
@@ -0,0 +1,68 @@
1
+ import { CommandType } from "../../../commandHandling/CommandType.js";
2
+ import { DesignItem } from "../../item/DesignItem.js";
3
+ import { MoveElementInDomAction } from "../undoService/transactionItems/MoveElementInDomAction.js";
4
+ export class DefaultModelCommandService {
5
+ canExecuteCommand(designerCanvas, command) {
6
+ if (command.type == CommandType.moveBackward ||
7
+ command.type == CommandType.moveForward ||
8
+ command.type == CommandType.moveToBack ||
9
+ command.type == CommandType.moveToFront)
10
+ return designerCanvas.instanceServiceContainer.selectionService.primarySelection != null;
11
+ if (command.type == CommandType.arrangeBottom ||
12
+ command.type == CommandType.arrangeCenter ||
13
+ command.type == CommandType.arrangeLeft ||
14
+ command.type == CommandType.arrangeMiddle ||
15
+ command.type == CommandType.arrangeRight ||
16
+ command.type == CommandType.arrangeTop ||
17
+ command.type == CommandType.unifyHeight ||
18
+ command.type == CommandType.unifyWidth)
19
+ return designerCanvas.instanceServiceContainer.selectionService.selectedElements.length > 1;
20
+ return null;
21
+ }
22
+ async executeCommand(designerCanvas, command) {
23
+ let sel = designerCanvas.instanceServiceContainer.selectionService.primarySelection;
24
+ if (command.type == CommandType.moveBackward)
25
+ designerCanvas.instanceServiceContainer.undoService.execute(new MoveElementInDomAction(sel, DesignItem.GetDesignItem(sel.element.previousElementSibling), 'beforebegin', DesignItem.GetDesignItem(sel.element.previousElementSibling), 'afterend'));
26
+ else if (command.type == CommandType.moveForward)
27
+ designerCanvas.instanceServiceContainer.undoService.execute(new MoveElementInDomAction(sel, DesignItem.GetDesignItem(sel.element.nextElementSibling), 'afterend', DesignItem.GetDesignItem(sel.element.nextElementSibling), 'beforebegin'));
28
+ else if (command.type == CommandType.moveToBack)
29
+ designerCanvas.instanceServiceContainer.undoService.execute(new MoveElementInDomAction(sel, DesignItem.GetDesignItem(sel.element.parentElement), 'afterbegin', DesignItem.GetDesignItem(sel.element.previousElementSibling), 'afterend'));
30
+ else if (command.type == CommandType.moveToFront)
31
+ designerCanvas.instanceServiceContainer.undoService.execute(new MoveElementInDomAction(sel, DesignItem.GetDesignItem(sel.element.parentElement), 'beforeend', DesignItem.GetDesignItem(sel.element.nextElementSibling), 'beforebegin'));
32
+ else if (command.type == CommandType.arrangeLeft) {
33
+ const grp = designerCanvas.instanceServiceContainer.selectionService.primarySelection.openGroup('arrangeLeft');
34
+ const left = designerCanvas.instanceServiceContainer.selectionService.primarySelection.styles.get('left');
35
+ for (let s of designerCanvas.instanceServiceContainer.selectionService.selectedElements) {
36
+ s.setStyle('left', left);
37
+ }
38
+ grp.commit();
39
+ }
40
+ else if (command.type == CommandType.arrangeTop) {
41
+ const grp = designerCanvas.instanceServiceContainer.selectionService.primarySelection.openGroup('arrangeTop');
42
+ const top = designerCanvas.instanceServiceContainer.selectionService.primarySelection.styles.get('top');
43
+ for (let s of designerCanvas.instanceServiceContainer.selectionService.selectedElements) {
44
+ s.setStyle('top', top);
45
+ }
46
+ grp.commit();
47
+ }
48
+ else if (command.type == CommandType.unifyHeight) {
49
+ const grp = designerCanvas.instanceServiceContainer.selectionService.primarySelection.openGroup('unifyHeight');
50
+ const height = designerCanvas.instanceServiceContainer.selectionService.primarySelection.styles.get('height');
51
+ for (let s of designerCanvas.instanceServiceContainer.selectionService.selectedElements) {
52
+ s.setStyle('height', height);
53
+ }
54
+ grp.commit();
55
+ }
56
+ else if (command.type == CommandType.unifyWidth) {
57
+ const grp = designerCanvas.instanceServiceContainer.selectionService.primarySelection.openGroup('unifyWidth');
58
+ const width = designerCanvas.instanceServiceContainer.selectionService.primarySelection.styles.get('width');
59
+ for (let s of designerCanvas.instanceServiceContainer.selectionService.selectedElements) {
60
+ s.setStyle('width', width);
61
+ }
62
+ grp.commit();
63
+ }
64
+ else
65
+ return null;
66
+ return true;
67
+ }
68
+ }
@@ -0,0 +1,8 @@
1
+ import { IService } from '../IService';
2
+ import { IElementDefinition } from '../elementsService/IElementDefinition';
3
+ import type { ServiceContainer } from '../ServiceContainer';
4
+ import type { InstanceServiceContainer } from '../InstanceServiceContainer';
5
+ import { IDesignItem } from '../../item/IDesignItem';
6
+ export interface IInstanceService extends IService {
7
+ getElement(definition: IElementDefinition, serviceContainer: ServiceContainer, instanceServiceContainer: InstanceServiceContainer): Promise<IDesignItem>;
8
+ }
@@ -0,0 +1,7 @@
1
+ import { IUiCommand } from '../../../commandHandling/IUiCommand.js';
2
+ import { IDesignerCanvas } from '../../widgets/designerView/IDesignerCanvas.js';
3
+ import { IService } from '../IService';
4
+ export interface IModelCommandService extends IService {
5
+ canExecuteCommand(designerCanvas: IDesignerCanvas, command: IUiCommand): boolean | null;
6
+ executeCommand(designerCanvas: IDesignerCanvas, command: IUiCommand): any;
7
+ }
@@ -89,9 +89,9 @@ export class DefaultPlacementService {
89
89
  let track = this.calculateTrack(event, placementView, startPoint, offsetInControl, newPoint, items[0]);
90
90
  for (const designItem of items) {
91
91
  let movedElement = designItem.element;
92
- let oldLeft = parseInt(movedElement.style.left);
92
+ let oldLeft = parseFloat(movedElement.style.left);
93
93
  oldLeft = Number.isNaN(oldLeft) ? 0 : oldLeft;
94
- let oldTop = parseInt(movedElement.style.top);
94
+ let oldTop = parseFloat(movedElement.style.top);
95
95
  oldTop = Number.isNaN(oldTop) ? 0 : oldTop;
96
96
  //let oldPosition = movedElement.style.position;
97
97
  designItem.element.style.transform = null;
@@ -2,10 +2,13 @@ import { ITransactionItem } from './ITransactionItem.js';
2
2
  import { ChangeGroup } from "./ChangeGroup.js";
3
3
  import { IUndoService } from './IUndoService.js';
4
4
  import { IDesignItem } from '../../item/IDesignItem';
5
+ import { IDesignerCanvas } from '../../widgets/designerView/IDesignerCanvas.js';
5
6
  export declare class UndoService implements IUndoService {
6
7
  private _undoStack;
7
8
  private _redoStack;
8
9
  private _transactionStack;
10
+ private _designerCanvas;
11
+ constructor(designerCanvas?: IDesignerCanvas);
9
12
  openGroup(title: string, affectedItems: IDesignItem[]): ChangeGroup;
10
13
  private commitTransactionItem;
11
14
  private abortTransactionItem;
@@ -6,6 +6,10 @@ export class UndoService {
6
6
  _undoStack = [];
7
7
  _redoStack = [];
8
8
  _transactionStack = [];
9
+ _designerCanvas;
10
+ constructor(designerCanvas) {
11
+ this._designerCanvas = designerCanvas;
12
+ }
9
13
  openGroup(title, affectedItems) {
10
14
  let t = new ChangeGroup(title, affectedItems, (t) => this.commitTransactionItem(t), (t) => this.abortTransactionItem(t));
11
15
  this._transactionStack.push(t);
@@ -37,6 +41,7 @@ export class UndoService {
37
41
  else {
38
42
  this._transactionStack[this._transactionStack.length - 1].execute(item);
39
43
  }
44
+ this._designerCanvas.extensionManager.refreshAllExtensions(item.affectedItems);
40
45
  }
41
46
  clear() {
42
47
  this._undoStack = [];
@@ -57,6 +62,7 @@ export class UndoService {
57
62
  this.clear();
58
63
  throw err;
59
64
  }
65
+ this._designerCanvas.extensionManager.refreshAllExtensions(item.affectedItems);
60
66
  }
61
67
  redo() {
62
68
  if (!this.canRedo())
@@ -72,6 +78,7 @@ export class UndoService {
72
78
  this.clear();
73
79
  throw err;
74
80
  }
81
+ this._designerCanvas.extensionManager.refreshAllExtensions(item.affectedItems);
75
82
  }
76
83
  canUndo() {
77
84
  return this._undoStack.length > 0;
@@ -2,12 +2,12 @@ import { IndentedTextWriter } from "../../helper/IndentedTextWriter";
2
2
  export class DomConverter {
3
3
  static normalizeAttributeValue(value) {
4
4
  if (value)
5
- return value.replace(/"/g, '&quot;');
5
+ return value.replaceAll('"', '&quot;');
6
6
  return value;
7
7
  }
8
8
  static normalizeContentValue(value) {
9
9
  if (value)
10
- return value.replace(/</g, '&lt;');
10
+ return value.replaceAll('<', '&lt;').replaceAll(' ', '&nbsp;'); // !caution! -> this is not normal space, it's nbsp
11
11
  return value;
12
12
  }
13
13
  static IsSelfClosingElement(tag) {
@@ -6,7 +6,6 @@ import { IDesignerCanvas } from './IDesignerCanvas';
6
6
  import { Snaplines } from './Snaplines';
7
7
  import { ContextMenuHelper } from '../../helper/contextMenu/ContextMenuHelper';
8
8
  import { IPlacementView } from './IPlacementView';
9
- import { CommandType } from '../../../commandHandling/CommandType';
10
9
  import { IUiCommandHandler } from '../../../commandHandling/IUiCommandHandler';
11
10
  import { IUiCommand } from '../../../commandHandling/IUiCommand';
12
11
  import { IExtensionManager } from "./extensions/IExtensionManger";
@@ -54,7 +53,6 @@ export declare class DesignerCanvas extends BaseCustomWebComponentLazyAppend imp
54
53
  handleCopyCommand(): Promise<void>;
55
54
  handlePasteCommand(): Promise<void>;
56
55
  handleDeleteCommand(): void;
57
- handleMoveCommand(command: CommandType): void;
58
56
  initialize(serviceContainer: ServiceContainer): void;
59
57
  elementFromPoint(x: number, y: number): Element;
60
58
  connectedCallback(): void;
@@ -11,7 +11,6 @@ import { Snaplines } from './Snaplines';
11
11
  import { ContextMenuHelper } from '../../helper/contextMenu/ContextMenuHelper';
12
12
  import { DeleteAction } from '../../services/undoService/transactionItems/DeleteAction';
13
13
  import { CommandType } from '../../../commandHandling/CommandType';
14
- import { MoveElementInDomAction } from '../../services/undoService/transactionItems/MoveElementInDomAction';
15
14
  import { DefaultHtmlParserService } from "../../services/htmlParserService/DefaultHtmlParserService";
16
15
  import { ExtensionType } from "./extensions/ExtensionType";
17
16
  import { ExtensionManager } from "./extensions/ExtensionManager";
@@ -116,8 +115,8 @@ export class DesignerCanvas extends BaseCustomWebComponentLazyAppend {
116
115
  this._canvas = this._getDomElement('node-projects-designer-canvas-canvas');
117
116
  this._canvasContainer = this._getDomElement('node-projects-designer-canvas-canvasContainer');
118
117
  this._outercanvas2 = this._getDomElement('node-projects-designer-canvas-outercanvas2');
119
- this.instanceServiceContainer = new InstanceServiceContainer();
120
- this.instanceServiceContainer.register("undoService", new UndoService);
118
+ this.instanceServiceContainer = new InstanceServiceContainer(this);
119
+ this.instanceServiceContainer.register("undoService", new UndoService(this));
121
120
  this.instanceServiceContainer.register("selectionService", new SelectionService);
122
121
  this.extensionManager = new ExtensionManager(this);
123
122
  this._onKeyDownBound = this.onKeyDown.bind(this);
@@ -162,6 +161,12 @@ export class DesignerCanvas extends BaseCustomWebComponentLazyAppend {
162
161
  }
163
162
  /* --- start IUiCommandHandler --- */
164
163
  async executeCommand(command) {
164
+ const modelCommandService = this.serviceContainer.modelCommandService;
165
+ if (modelCommandService) {
166
+ let handeled = await modelCommandService.executeCommand(this, command);
167
+ if (handeled != null)
168
+ return;
169
+ }
165
170
  switch (command.type) {
166
171
  case CommandType.screenshot:
167
172
  {
@@ -194,12 +199,6 @@ export class DesignerCanvas extends BaseCustomWebComponentLazyAppend {
194
199
  case CommandType.redo:
195
200
  this.instanceServiceContainer.undoService.redo();
196
201
  break;
197
- case CommandType.moveToFront:
198
- case CommandType.moveForward:
199
- case CommandType.moveBackward:
200
- case CommandType.moveToBack:
201
- this.handleMoveCommand(command.type);
202
- break;
203
202
  case CommandType.copy:
204
203
  this.handleCopyCommand();
205
204
  break;
@@ -216,6 +215,12 @@ export class DesignerCanvas extends BaseCustomWebComponentLazyAppend {
216
215
  }
217
216
  }
218
217
  canExecuteCommand(command) {
218
+ const modelCommandService = this.serviceContainer.modelCommandService;
219
+ if (modelCommandService) {
220
+ let handeled = modelCommandService.canExecuteCommand(this, command);
221
+ if (handeled !== null)
222
+ return handeled;
223
+ }
219
224
  if (command.type === CommandType.undo) {
220
225
  return this.instanceServiceContainer.undoService.canUndo();
221
226
  }
@@ -256,17 +261,6 @@ export class DesignerCanvas extends BaseCustomWebComponentLazyAppend {
256
261
  this.instanceServiceContainer.undoService.execute(new DeleteAction(items, this.extensionManager));
257
262
  this.instanceServiceContainer.selectionService.setSelectedElements(null);
258
263
  }
259
- handleMoveCommand(command) {
260
- let sel = this.instanceServiceContainer.selectionService.primarySelection;
261
- if (command == CommandType.moveBackward)
262
- this.instanceServiceContainer.undoService.execute(new MoveElementInDomAction(sel, DesignItem.GetDesignItem(sel.element.previousElementSibling), 'beforebegin', DesignItem.GetDesignItem(sel.element.previousElementSibling), 'afterend'));
263
- else if (command == CommandType.moveForward)
264
- this.instanceServiceContainer.undoService.execute(new MoveElementInDomAction(sel, DesignItem.GetDesignItem(sel.element.nextElementSibling), 'afterend', DesignItem.GetDesignItem(sel.element.nextElementSibling), 'beforebegin'));
265
- else if (command == CommandType.moveToBack)
266
- this.instanceServiceContainer.undoService.execute(new MoveElementInDomAction(sel, DesignItem.GetDesignItem(sel.element.parentElement), 'afterbegin', DesignItem.GetDesignItem(sel.element.previousElementSibling), 'afterend'));
267
- else if (command == CommandType.moveToFront)
268
- this.instanceServiceContainer.undoService.execute(new MoveElementInDomAction(sel, DesignItem.GetDesignItem(sel.element.parentElement), 'beforeend', DesignItem.GetDesignItem(sel.element.nextElementSibling), 'beforebegin'));
269
- }
270
264
  initialize(serviceContainer) {
271
265
  this.serviceContainer = serviceContainer;
272
266
  this.rootDesignItem = DesignItem.GetOrCreateDesignItem(this._canvas, this.serviceContainer, this.instanceServiceContainer);
@@ -13,7 +13,7 @@ export class PrimarySelectionDefaultExtension extends AbstractExtension {
13
13
  refresh() {
14
14
  const boundRect = this.extendedItem.element.getBoundingClientRect();
15
15
  this._rect = this._drawRect(boundRect.x - this.designerCanvas.containerBoundingRect.x, boundRect.y - this.designerCanvas.containerBoundingRect.y - 16, 60, 15, 'svg-primary-selection-move', this._rect);
16
- this._text = this._drawText(this.extendedItem.name.substring(0, 10) + '…', boundRect.x - this.designerCanvas.containerBoundingRect.x, boundRect.y - this.designerCanvas.containerBoundingRect.y - 5, 'svg-text', this._text);
16
+ this._text = this._drawText(this.extendedItem.name.substring(0, 10) + '…', boundRect.x - this.designerCanvas.containerBoundingRect.x, boundRect.y - this.designerCanvas.containerBoundingRect.y - 5, 'svg-text-primary', this._text);
17
17
  }
18
18
  dispose() {
19
19
  this._removeAllOverlays();
@@ -6,4 +6,5 @@ import { IExtensionManager } from "./IExtensionManger";
6
6
  export declare class PrimarySelectionDefaultExtensionProvider implements IDesignerExtensionProvider {
7
7
  shouldExtend(extensionManager: IExtensionManager, designerView: IDesignerCanvas, designItem: IDesignItem): boolean;
8
8
  getExtension(extensionManager: IExtensionManager, designerView: IDesignerCanvas, designItem: IDesignItem): IDesignerExtension;
9
+ readonly style: CSSStyleSheet;
9
10
  }
@@ -1,4 +1,5 @@
1
1
  import { PrimarySelectionDefaultExtension } from "./PrimarySelectionDefaultExtension";
2
+ import { css } from "@node-projects/base-custom-webcomponent";
2
3
  export class PrimarySelectionDefaultExtensionProvider {
3
4
  shouldExtend(extensionManager, designerView, designItem) {
4
5
  return true;
@@ -6,4 +7,7 @@ export class PrimarySelectionDefaultExtensionProvider {
6
7
  getExtension(extensionManager, designerView, designItem) {
7
8
  return new PrimarySelectionDefaultExtension(extensionManager, designerView, designItem);
8
9
  }
10
+ style = css `
11
+ .svg-text-primary { stroke: none; fill: white; stroke-width: 1; font-size: 10px; font-family: monospace; }
12
+ `;
9
13
  }
@@ -8,4 +8,5 @@ export declare class ResizeExtensionProvider implements IDesignerExtensionProvid
8
8
  constructor(resizeAllSelected?: boolean);
9
9
  shouldExtend(extensionManager: IExtensionManager, designerView: IDesignerCanvas, designItem: IDesignItem): boolean;
10
10
  getExtension(extensionManager: IExtensionManager, designerView: IDesignerCanvas, designItem: IDesignItem): IDesignerExtension;
11
+ readonly style: CSSStyleSheet;
11
12
  }
@@ -1,4 +1,5 @@
1
1
  import { ResizeExtension } from "./ResizeExtension";
2
+ import { css } from "@node-projects/base-custom-webcomponent";
2
3
  export class ResizeExtensionProvider {
3
4
  resizeAllSelected;
4
5
  constructor(resizeAllSelected = false) {
@@ -10,4 +11,7 @@ export class ResizeExtensionProvider {
10
11
  getExtension(extensionManager, designerView, designItem) {
11
12
  return new ResizeExtension(extensionManager, designerView, designItem, this.resizeAllSelected);
12
13
  }
14
+ style = css `
15
+ .svg-primary-resizer { stroke: #3899ec; fill: white; pointer-events: all }
16
+ `;
13
17
  }
@@ -17,8 +17,6 @@ export class OverlayLayerView extends BaseCustomWebComponentConstructorAppend {
17
17
  .svg-snapline { stroke: purple; stroke-dasharray: 4; fill: transparent; }
18
18
  .svg-selector { stroke: black; fill: #3899ec55; stroke-width: 1; stroke-dasharray: 2; }
19
19
  .svg-primary-selection-move { stroke: #3899ec; fill: #3899ec; cursor: move; pointer-events: all }
20
- .svg-text { stroke: none; fill: white; stroke-width: 1; font-size: 10px; font-family: monospace; }
21
- .svg-primary-resizer { stroke: #3899ec; fill: white; pointer-events: all }
22
20
  .svg-position { stroke: black; stroke-dasharray: 2; }
23
21
  .svg-path { stroke: #3899ec; fill: orange; pointer-events: all }
24
22
  .svg-path-line { stroke: #3899ec; stroke-dasharray: 2; }
@@ -24,7 +24,6 @@ export class RectangleSelectorTool {
24
24
  break;
25
25
  case EventNames.PointerMove:
26
26
  if (this._initialPoint) {
27
- console.warn(currentPoint);
28
27
  let w = currentPoint.x - this._initialPoint.x;
29
28
  let h = currentPoint.y - this._initialPoint.y;
30
29
  if (w >= 0) {
package/dist/index.d.ts CHANGED
@@ -49,6 +49,8 @@ export * from "./elements/services/instanceService/DefaultInstanceService.js";
49
49
  export type { IInstanceService } from "./elements/services/instanceService/IInstanceService.js";
50
50
  export * from "./elements/services/instanceService/PrepareElementsForDesignerService.js";
51
51
  export type { IPrepareElementsForDesignerService } from "./elements/services/instanceService/IPrepareElementsForDesignerService.js";
52
+ export type { IModelCommandService } from "./elements/services/modelCommandService/IModelCommandService.js";
53
+ export * from "./elements/services/modelCommandService/DefaultModelCommandService.js";
52
54
  export * from "./elements/services/propertiesService/DefaultEditorTypesService.js";
53
55
  export type { IEditorTypesService } from "./elements/services/propertiesService/IEditorTypesService.js";
54
56
  export type { IPropertiesService } from "./elements/services/propertiesService/IPropertiesService.js";
package/dist/index.js CHANGED
@@ -28,6 +28,7 @@ export * from "./elements/services/htmlParserService/DefaultHtmlParserService.js
28
28
  export * from "./elements/services/htmlParserService/NodeHtmlParserService.js";
29
29
  export * from "./elements/services/instanceService/DefaultInstanceService.js";
30
30
  export * from "./elements/services/instanceService/PrepareElementsForDesignerService.js";
31
+ export * from "./elements/services/modelCommandService/DefaultModelCommandService.js";
31
32
  export * from "./elements/services/propertiesService/DefaultEditorTypesService.js";
32
33
  export * from "./elements/services/propertiesService/services/BaseCustomWebComponentPropertiesService.js";
33
34
  export * from "./elements/services/propertiesService/services/CommonPropertiesService.js";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "description": "A UI designer for Polymer apps",
3
3
  "name": "@node-projects/web-component-designer",
4
- "version": "0.0.40",
4
+ "version": "0.0.46",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "author": "",