@i2analyze/notebook-sdk 1.8.0-dev.7 → 1.8.0-dev.9

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.
@@ -648,7 +648,16 @@ export declare namespace app {
648
648
  * A set of methods for modifying the appearance of a node.
649
649
  * @i2since 1.2
650
650
  */
651
- export interface INodeEditor extends IElementEditorBase {
651
+ export interface INodeEditor extends Omit<IElementEditorBase, 'setColor'> {
652
+ /**
653
+ * Sets or resets the color of the element.
654
+ *
655
+ * @param color - The color to set, or `undefined` to reset the color to the theme default, or 'null' to remove the color.
656
+ * @returns The element, with its color set to the specified value.
657
+ * @throws `Error` if the specified value is not in a form that CSS supports, such as a hexadecimal number, an `rgb()` value, or a color name.
658
+ * @i2since 1.2
659
+ */
660
+ setColor(color: string | undefined | null): this;
652
661
  /**
653
662
  * Sets or resets the size of the node.
654
663
  *
@@ -705,35 +714,38 @@ export declare namespace app {
705
714
  /**
706
715
  * Sets or resets the color of the node group.
707
716
  *
708
- * @param color - The color to set, or `undefined` to reset the color to the theme default.
709
- * @returns The node group, with its color set to the specified value.
710
- * @throws `Error` if the specified value is not in a form that CSS supports, such as a hexadecimal number, an `rgb()` value, or a color name.
717
+ * @param color - The color to set, or `null` to remove the border, or `undefined` to reset the border color to the theme default.
718
+ * @returns The node group, with its border color set to the specified value.
719
+ * @throws `Error` if the specified value is not in a form that CSS supports, such as a hexadecimal number, an `rgb()` value, or a color name, or `null` or `undefined`.
711
720
  * @i2since 1.8
712
721
  */
713
- setBorderColor(color: string | undefined): this;
722
+ setBorderColor(color: string | undefined | null): this;
714
723
  /**
715
724
  * Sets or resets the border width of the node group.
716
725
  *
717
726
  * @param width - The width to set, or `undefined` to reset the width to the theme default.
718
727
  * @returns The node group, with its border width set to the specified value.
728
+ * @throws `Error` if the specified value is not either a positive number or `undefined`.
729
+ * @remarks A size of 0 is valid, and indicates that the node group has no border - equivalent to `setBorderColor(null)`.
719
730
  * @i2since 1.8
720
731
  */
721
732
  setBorderWidth(width: number | undefined): this;
722
733
  /**
723
- * Sets or resets the fill color of the node group.
734
+ * Sets or resets the background color of the node group.
724
735
  *
725
- * @param color - The color to set, or `undefined` to reset the fill color to the theme default.
726
- * @returns The node group, with its fill color set to the specified value.
727
- * @throws `Error` if the specified value is not in a form that CSS supports, such as a hexadecimal number, an `rgb()` value, or a color name.
736
+ * @param color - The color to set, or `null` to remove the background, or `undefined` to reset the background color to the theme default.
737
+ * @returns The node group, with its background color set to the specified value.
738
+ * @throws `Error` if the specified value is not in a form that CSS supports, such as a hexadecimal number, an `rgb()` value, or a color name, or `null` or `undefined`.
728
739
  * @i2since 1.8
729
740
  */
730
- setFillColor(color: string | undefined): this;
741
+ setColor(color: string | undefined | null): this;
731
742
  /**
732
743
  * Sets or resets the image for the node group.
733
744
  *
734
745
  * @param href - The URL of the image to use, or 'undefined' to indicate there is no image.
735
746
  * @param description - A description of the image.
736
747
  * @returns The node group, with its image set to the specified URL and description.
748
+ * @remarks If an image is not set, then a default image will be used when a label is also set.
737
749
  * @i2since 1.8
738
750
  */
739
751
  setImage(href: string | undefined, description?: string): this;
@@ -5654,7 +5666,12 @@ export declare namespace visual {
5654
5666
  * A style for a node, which affects its appearance.
5655
5667
  * @i2since 1.0
5656
5668
  */
5657
- export interface INodeStyle extends IElementStyleBase {
5669
+ export interface INodeStyle extends Omit<IElementStyleBase, 'color'> {
5670
+ /**
5671
+ * Gets the color of the node, or null if there is no color and the node background is transparent.
5672
+ * @i2since 1.2
5673
+ */
5674
+ readonly color: IElementSetting<string | null>;
5658
5675
  /**
5659
5676
  * Gets the image to display for the node.
5660
5677
  * @i2since 1.0
@@ -5754,22 +5771,27 @@ export declare namespace visual {
5754
5771
  * A style for a node group, which affects its appearance.
5755
5772
  * @i2since 1.8
5756
5773
  */
5757
- export interface INodeGroupStyle extends IElementStyleBase {
5774
+ export interface INodeGroupStyle {
5758
5775
  /**
5759
- * Gets the image to display for the node group, or undefined if there is no image.
5776
+ * Gets the image to display for the node group.
5760
5777
  * @i2since 1.8
5761
5778
  */
5762
5779
  readonly image: IImageSetting;
5763
5780
  /**
5764
- * Gets the border color of the node group.
5781
+ * Gets the color of the node group, or null if there is no background.
5782
+ * @i2since 1.8
5783
+ */
5784
+ readonly color: IElementSetting<string | null>;
5785
+ /**
5786
+ * Gets the border color of the node group, or null if there is no border.
5765
5787
  * @i2since 1.8
5766
5788
  */
5767
- readonly borderColor: IElementSetting<string | undefined>;
5789
+ readonly borderColor: IElementSetting<string | null>;
5768
5790
  /**
5769
5791
  * Gets the border width of the node group.
5770
5792
  * @i2since 1.8
5771
5793
  */
5772
- readonly borderWidth: IElementSetting<number | undefined>;
5794
+ readonly borderWidth: IElementSetting<number>;
5773
5795
  }
5774
5796
  }
5775
5797
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@i2analyze/notebook-sdk",
3
- "version": "1.8.0-dev.7",
3
+ "version": "1.8.0-dev.9",
4
4
  "description": "i2 Notebook SDK",
5
5
  "license": "MIT",
6
6
  "publishConfig": {