orcasvn-react-diagrams 0.1.5 → 0.1.7
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/cjs/index.js +23 -0
- package/dist/cjs/types/models/implementations/Text.d.ts +15 -0
- package/dist/cjs/types/models/implementations/index.d.ts +2 -1
- package/dist/esm/index.js +23 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/models/implementations/Text.d.ts +15 -0
- package/dist/esm/types/models/implementations/index.d.ts +2 -1
- package/dist/index.d.ts +13 -1
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -610,6 +610,28 @@ var ElementLink$1 = /** @class */ (function () {
|
|
|
610
610
|
return ElementLink;
|
|
611
611
|
}());
|
|
612
612
|
|
|
613
|
+
var Text$2 = /** @class */ (function () {
|
|
614
|
+
function Text(content, width, height, x, y, align, fontSize, border) {
|
|
615
|
+
this._id = generateUniqueId();
|
|
616
|
+
this.content = content;
|
|
617
|
+
this.align = align;
|
|
618
|
+
this.fontSize = fontSize;
|
|
619
|
+
this.border = border;
|
|
620
|
+
this.size = { width: width, height: height };
|
|
621
|
+
if (x && y) {
|
|
622
|
+
this.position = { x: x, y: y };
|
|
623
|
+
}
|
|
624
|
+
}
|
|
625
|
+
Object.defineProperty(Text.prototype, "id", {
|
|
626
|
+
get: function () {
|
|
627
|
+
return this._id;
|
|
628
|
+
},
|
|
629
|
+
enumerable: false,
|
|
630
|
+
configurable: true
|
|
631
|
+
});
|
|
632
|
+
return Text;
|
|
633
|
+
}());
|
|
634
|
+
|
|
613
635
|
var EditorContext = /** @class */ (function () {
|
|
614
636
|
function EditorContext(elements, links, texts) {
|
|
615
637
|
this._elements = elements;
|
|
@@ -8763,5 +8785,6 @@ exports.PortRC = Port;
|
|
|
8763
8785
|
exports.RectangleRC = Rectangle;
|
|
8764
8786
|
exports.RectangularFrameRC = RectangularFrame;
|
|
8765
8787
|
exports.ShapeWrapperRC = ShapeWrapper;
|
|
8788
|
+
exports.Text = Text$2;
|
|
8766
8789
|
exports.TextRC = Text$1;
|
|
8767
8790
|
exports.default = Editor;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { TextAlign } from "../enums";
|
|
2
|
+
import IText from "../IText";
|
|
3
|
+
import IPosition from "../position";
|
|
4
|
+
import ISize from "../size";
|
|
5
|
+
export default class Text implements IText {
|
|
6
|
+
private readonly _id;
|
|
7
|
+
content: string;
|
|
8
|
+
size: ISize;
|
|
9
|
+
position?: IPosition;
|
|
10
|
+
align?: TextAlign;
|
|
11
|
+
fontSize?: number;
|
|
12
|
+
border?: string;
|
|
13
|
+
constructor(content: string, width: number, height: number, x?: number, y?: number, align?: TextAlign, fontSize?: number, border?: string);
|
|
14
|
+
get id(): string;
|
|
15
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import Element from './Element';
|
|
2
2
|
import Port from './Port';
|
|
3
3
|
import ElementLink from './ElementLink';
|
|
4
|
+
import Text from './Text';
|
|
4
5
|
export * from './EditorContext';
|
|
5
6
|
export * from './CustomPort';
|
|
6
|
-
export { Element, Port, ElementLink };
|
|
7
|
+
export { Element, Port, ElementLink, Text };
|
package/dist/esm/index.js
CHANGED
|
@@ -606,6 +606,28 @@ var ElementLink$1 = /** @class */ (function () {
|
|
|
606
606
|
return ElementLink;
|
|
607
607
|
}());
|
|
608
608
|
|
|
609
|
+
var Text$2 = /** @class */ (function () {
|
|
610
|
+
function Text(content, width, height, x, y, align, fontSize, border) {
|
|
611
|
+
this._id = generateUniqueId();
|
|
612
|
+
this.content = content;
|
|
613
|
+
this.align = align;
|
|
614
|
+
this.fontSize = fontSize;
|
|
615
|
+
this.border = border;
|
|
616
|
+
this.size = { width: width, height: height };
|
|
617
|
+
if (x && y) {
|
|
618
|
+
this.position = { x: x, y: y };
|
|
619
|
+
}
|
|
620
|
+
}
|
|
621
|
+
Object.defineProperty(Text.prototype, "id", {
|
|
622
|
+
get: function () {
|
|
623
|
+
return this._id;
|
|
624
|
+
},
|
|
625
|
+
enumerable: false,
|
|
626
|
+
configurable: true
|
|
627
|
+
});
|
|
628
|
+
return Text;
|
|
629
|
+
}());
|
|
630
|
+
|
|
609
631
|
var EditorContext = /** @class */ (function () {
|
|
610
632
|
function EditorContext(elements, links, texts) {
|
|
611
633
|
this._elements = elements;
|
|
@@ -8746,5 +8768,5 @@ function Editor(_a) {
|
|
|
8746
8768
|
React.createElement(Paper, { size: { width: 3000, height: 3000 }, elements: editorContext.elements, links: editorContext.links, texts: editorContext.texts, onPaperClicked: editorContext.onPaperClicked, onPortMoved: editorContext.onPortMoved, onElementMoved: editorContext.onElementMoved, onElementResized: editorContext.onElementResized, onLinkValidation: editorContext.validateLink, onCreatingLink: editorContext.onCreatingLink, onCreatingPortByLinking: editorContext.onCreatingPortByLinking })));
|
|
8747
8769
|
}
|
|
8748
8770
|
|
|
8749
|
-
export { Circle as CircleRC, Crescent as CrescentRC, CustomPort, CustomShape as CustomShapeRC, EditorContext, Element$1 as Element, ElementLink$1 as ElementLink, ElementLink as ElementLinkRC, Port$1 as Port, Port as PortRC, PositioningAnchor, Rectangle as RectangleRC, RectangularFrame as RectangularFrameRC, ResizingDirection, ShapeWrapper as ShapeWrapperRC, SubObjectDirection, TextAlign, Text$1 as TextRC, Editor as default };
|
|
8771
|
+
export { Circle as CircleRC, Crescent as CrescentRC, CustomPort, CustomShape as CustomShapeRC, EditorContext, Element$1 as Element, ElementLink$1 as ElementLink, ElementLink as ElementLinkRC, Port$1 as Port, Port as PortRC, PositioningAnchor, Rectangle as RectangleRC, RectangularFrame as RectangularFrameRC, ResizingDirection, ShapeWrapper as ShapeWrapperRC, SubObjectDirection, Text$2 as Text, TextAlign, Text$1 as TextRC, Editor as default };
|
|
8750
8772
|
//# sourceMappingURL=index.js.map
|