@node-projects/web-component-designer 0.0.257 → 0.0.258

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.
@@ -1,7 +1,9 @@
1
1
  import { IDesignItem } from '../../item/IDesignItem.js';
2
2
  import { IndentedTextWriter } from '../../helper/IndentedTextWriter.js';
3
3
  import { AbstractHtmlWriterService } from './AbstractHtmlWriterService.js';
4
+ import { IHtmlWriterOptions } from './IHtmlWriterOptions.js';
4
5
  export declare class HtmlWriterService extends AbstractHtmlWriterService {
6
+ constructor(options?: IHtmlWriterOptions);
5
7
  private _conditionalyWriteIndent;
6
8
  private _conditionalyWriteIndentBefore;
7
9
  private _conditionalyWriteNewline;
@@ -3,6 +3,9 @@ import { NodeType } from '../../item/NodeType.js';
3
3
  import { isEmptyTextNode, isInline, isInlineAfter } from '../../helper/ElementHelper.js';
4
4
  import { AbstractHtmlWriterService } from './AbstractHtmlWriterService.js';
5
5
  export class HtmlWriterService extends AbstractHtmlWriterService {
6
+ constructor(options) {
7
+ super(options);
8
+ }
6
9
  _conditionalyWriteIndent(indentedTextWriter, designItem) {
7
10
  if ((designItem.element instanceof HTMLElement && !isInlineAfter(designItem.element)) ||
8
11
  (designItem.element.previousElementSibling instanceof HTMLElement && !isInline(designItem.element.previousElementSibling)) ||
@@ -1,5 +1,7 @@
1
1
  import { IDesignItem } from '../../item/IDesignItem.js';
2
2
  import { ITextWriter } from '../../helper/ITextWriter.js';
3
+ import { IHtmlWriterOptions } from './IHtmlWriterOptions.js';
3
4
  export interface IHtmlWriterService {
5
+ options: IHtmlWriterOptions;
4
6
  write(textWriter: ITextWriter, designItems: IDesignItem[], rootContainerKeepInline: boolean, updatePositions?: boolean): any;
5
7
  }
@@ -1,7 +1,10 @@
1
1
  import { IDesignItem } from '../../item/IDesignItem.js';
2
2
  import { IHtmlWriterService } from './IHtmlWriterService.js';
3
3
  import { IndentedTextWriter } from '../../helper/IndentedTextWriter.js';
4
+ import { IHtmlWriterOptions } from './IHtmlWriterOptions.js';
4
5
  export declare class LitTsElementWriterService implements IHtmlWriterService {
6
+ options: IHtmlWriterOptions;
7
+ constructor(options?: IHtmlWriterOptions);
5
8
  write(indentedTextWriter: IndentedTextWriter, designItems: IDesignItem[], rootContainerKeepInline: boolean): void;
6
9
  static head: string;
7
10
  }
@@ -1,5 +1,14 @@
1
1
  //needs InternalBindinsgStorrageService -> keeps bindings
2
2
  export class LitTsElementWriterService {
3
+ options;
4
+ constructor(options) {
5
+ this.options = options ?? {};
6
+ this.options.beautifyOutput ??= true;
7
+ this.options.compressCssToShorthandProperties ??= true;
8
+ this.options.writeDesignerProperties ??= true;
9
+ this.options.parseJsonInAttributes ??= true;
10
+ this.options.jsonWriteMode ??= 'min';
11
+ }
3
12
  write(indentedTextWriter, designItems, rootContainerKeepInline) {
4
13
  throw new Error('Method not implemented.');
5
14
  }
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.257",
4
+ "version": "0.0.258",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "author": "",