@wire-dsl/engine 0.5.0 → 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/index.d.cts CHANGED
@@ -290,8 +290,8 @@ interface IRComponentNode {
290
290
  interface IRNodeStyle {
291
291
  padding?: string;
292
292
  gap?: string;
293
- align?: 'left' | 'center' | 'right' | 'justify';
294
- justify?: 'start' | 'center' | 'end';
293
+ justify?: 'start' | 'center' | 'end' | 'stretch' | 'spaceBetween' | 'spaceAround';
294
+ align?: 'start' | 'center' | 'end';
295
295
  background?: string;
296
296
  }
297
297
  interface IRMeta {
@@ -480,6 +480,19 @@ declare class LayoutEngine {
480
480
  private wrapTextToLines;
481
481
  private getIntrinsicComponentHeight;
482
482
  private getControlLabelOffset;
483
+ /**
484
+ * Returns true when a container's width can be calculated from its children
485
+ * (i.e. it is a horizontal non-stretch stack). False means the container
486
+ * behaves like `flex-grow:1` and should absorb remaining space.
487
+ */
488
+ private containerHasIntrinsicWidth;
489
+ /**
490
+ * Returns the natural (intrinsic) width of any node — component or container.
491
+ * For horizontal non-stretch containers the width is the sum of their children's
492
+ * intrinsic widths plus gaps, capped at `availableWidth`. All other containers
493
+ * are assumed to take the full available width (they stretch or grow).
494
+ */
495
+ private getIntrinsicWidth;
483
496
  private getIntrinsicComponentWidth;
484
497
  private calculateChildHeight;
485
498
  private calculateChildWidth;
@@ -690,6 +703,7 @@ declare class SVGRenderer {
690
703
  protected renderTable(node: IRComponentNode, pos: any): string;
691
704
  protected renderChartPlaceholder(node: IRComponentNode, pos: any): string;
692
705
  protected renderText(node: IRComponentNode, pos: any): string;
706
+ protected renderParagraph(node: IRComponentNode, pos: any): string;
693
707
  protected renderLabel(node: IRComponentNode, pos: any): string;
694
708
  protected renderCode(node: IRComponentNode, pos: any): string;
695
709
  protected renderTextarea(node: IRComponentNode, pos: any): string;
@@ -986,6 +1000,7 @@ declare class SketchSVGRenderer extends SVGRenderer {
986
1000
  * Render text with Comic Sans
987
1001
  */
988
1002
  protected renderText(node: IRComponentNode, pos: any): string;
1003
+ protected renderParagraph(node: IRComponentNode, pos: any): string;
989
1004
  /**
990
1005
  * Render label with Comic Sans
991
1006
  */
@@ -1054,10 +1069,6 @@ declare class SketchSVGRenderer extends SVGRenderer {
1054
1069
  * Render icon (same as base, icons don't need filter)
1055
1070
  */
1056
1071
  protected renderIcon(node: IRComponentNode, pos: any): string;
1057
- /**
1058
- * Render chart placeholder with sketch filter and Comic Sans
1059
- */
1060
- protected renderChartPlaceholder(node: IRComponentNode, pos: any): string;
1061
1072
  /**
1062
1073
  * Helper method to get icon SVG
1063
1074
  */
package/dist/index.d.ts CHANGED
@@ -290,8 +290,8 @@ interface IRComponentNode {
290
290
  interface IRNodeStyle {
291
291
  padding?: string;
292
292
  gap?: string;
293
- align?: 'left' | 'center' | 'right' | 'justify';
294
- justify?: 'start' | 'center' | 'end';
293
+ justify?: 'start' | 'center' | 'end' | 'stretch' | 'spaceBetween' | 'spaceAround';
294
+ align?: 'start' | 'center' | 'end';
295
295
  background?: string;
296
296
  }
297
297
  interface IRMeta {
@@ -480,6 +480,19 @@ declare class LayoutEngine {
480
480
  private wrapTextToLines;
481
481
  private getIntrinsicComponentHeight;
482
482
  private getControlLabelOffset;
483
+ /**
484
+ * Returns true when a container's width can be calculated from its children
485
+ * (i.e. it is a horizontal non-stretch stack). False means the container
486
+ * behaves like `flex-grow:1` and should absorb remaining space.
487
+ */
488
+ private containerHasIntrinsicWidth;
489
+ /**
490
+ * Returns the natural (intrinsic) width of any node — component or container.
491
+ * For horizontal non-stretch containers the width is the sum of their children's
492
+ * intrinsic widths plus gaps, capped at `availableWidth`. All other containers
493
+ * are assumed to take the full available width (they stretch or grow).
494
+ */
495
+ private getIntrinsicWidth;
483
496
  private getIntrinsicComponentWidth;
484
497
  private calculateChildHeight;
485
498
  private calculateChildWidth;
@@ -690,6 +703,7 @@ declare class SVGRenderer {
690
703
  protected renderTable(node: IRComponentNode, pos: any): string;
691
704
  protected renderChartPlaceholder(node: IRComponentNode, pos: any): string;
692
705
  protected renderText(node: IRComponentNode, pos: any): string;
706
+ protected renderParagraph(node: IRComponentNode, pos: any): string;
693
707
  protected renderLabel(node: IRComponentNode, pos: any): string;
694
708
  protected renderCode(node: IRComponentNode, pos: any): string;
695
709
  protected renderTextarea(node: IRComponentNode, pos: any): string;
@@ -986,6 +1000,7 @@ declare class SketchSVGRenderer extends SVGRenderer {
986
1000
  * Render text with Comic Sans
987
1001
  */
988
1002
  protected renderText(node: IRComponentNode, pos: any): string;
1003
+ protected renderParagraph(node: IRComponentNode, pos: any): string;
989
1004
  /**
990
1005
  * Render label with Comic Sans
991
1006
  */
@@ -1054,10 +1069,6 @@ declare class SketchSVGRenderer extends SVGRenderer {
1054
1069
  * Render icon (same as base, icons don't need filter)
1055
1070
  */
1056
1071
  protected renderIcon(node: IRComponentNode, pos: any): string;
1057
- /**
1058
- * Render chart placeholder with sketch filter and Comic Sans
1059
- */
1060
- protected renderChartPlaceholder(node: IRComponentNode, pos: any): string;
1061
1072
  /**
1062
1073
  * Helper method to get icon SVG
1063
1074
  */