@rnacanvas/app-object 3.6.1 → 3.7.1

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.
@@ -0,0 +1,28 @@
1
+ import { HorizontalScrollbar, VerticalScrollbar } from '@rnacanvas/scrollbars';
2
+ import { Scrollbars } from '@rnacanvas/scrollbars';
3
+ /**
4
+ * A container that permits scrolling of its contents when its contents are larger than it
5
+ * and that centers its contents when its contents are smaller than it.
6
+ */
7
+ export declare class CenteringScrollContainer {
8
+ /**
9
+ * The actual DOM node corresponding to the container.
10
+ */
11
+ private readonly domNode;
12
+ /**
13
+ * Is to hold the actual content of the container.
14
+ */
15
+ private readonly contentContainer;
16
+ readonly horizontalScrollbar: HorizontalScrollbar;
17
+ readonly verticalScrollbar: VerticalScrollbar;
18
+ readonly scrollbars: Scrollbars;
19
+ constructor();
20
+ appendTo(container: Node): void;
21
+ remove(): void;
22
+ /**
23
+ * Appends the provided node to the container.
24
+ */
25
+ append(node: Node): void;
26
+ get style(): CSSStyleDeclaration;
27
+ }
28
+ //# sourceMappingURL=CenteringScrollContainer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CenteringScrollContainer.d.ts","sourceRoot":"","sources":["../src/CenteringScrollContainer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE/E,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD;;;GAGG;AACH,qBAAa,wBAAwB;IACnC;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAiB;IAEzC;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAiB;IAElD,QAAQ,CAAC,mBAAmB,EAAE,mBAAmB,CAAC;IAClD,QAAQ,CAAC,iBAAiB,EAAE,iBAAiB,CAAC;IAE9C,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC;;IAgDhC,QAAQ,CAAC,SAAS,EAAE,IAAI,GAAG,IAAI;IAI/B,MAAM,IAAI,IAAI;IAId;;OAEG;IACH,MAAM,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI;IAIxB,IAAI,KAAK,wBAER;CACF"}
@@ -1,10 +1,14 @@
1
1
  import { Drawing } from '@rnacanvas/draw';
2
2
  import type { Nucleobase } from '@rnacanvas/draw';
3
- import { HorizontalScrollbar, VerticalScrollbar } from '@rnacanvas/scrollbars';
4
- import { Scrollbars } from '@rnacanvas/scrollbars';
5
3
  import { DrawingView } from './DrawingView';
6
4
  import { EventfulSet } from '@rnacanvas/utilities';
7
5
  import { SelectedBases } from '@rnacanvas/draw.interact';
6
+ interface Form {
7
+ /**
8
+ * Appends the form to the provided container node.
9
+ */
10
+ appendTo(container: Node): void;
11
+ }
8
12
  /**
9
13
  * An RNAcanvas app object that can be included as a component of a web page / app.
10
14
  */
@@ -27,18 +31,8 @@ export declare class RNAcanvas {
27
31
  * The 2D nucleic acid structure drawing of the app object.
28
32
  */
29
33
  readonly drawing: Drawing;
30
- /**
31
- * The horizontal scrollbar for the drawing.
32
- */
33
- readonly horizontalDrawingScrollbar: HorizontalScrollbar;
34
- /**
35
- * The vertical scrollbar for the drawing.
36
- */
37
- readonly verticalDrawingScrollbar: VerticalScrollbar;
38
- /**
39
- * The scrollbars controlling the user's view of the drawing.
40
- */
41
- readonly drawingScrollbars: Scrollbars;
34
+ private readonly drawingScrollContainer;
35
+ private readonly stackedDrawingsContainer;
42
36
  /**
43
37
  * The user's view of the drawing.
44
38
  */
@@ -61,6 +55,10 @@ export declare class RNAcanvas {
61
55
  private readonly clickSelectTool;
62
56
  readonly selectedBases: SelectedBases<Nucleobase>;
63
57
  private readonly consecutiveBasesSelectingTool;
58
+ /**
59
+ * Forms are to go in here.
60
+ */
61
+ private readonly formsContainer;
64
62
  constructor();
65
63
  /**
66
64
  * Appends the DOM node of the app object to the given container node.
@@ -72,6 +70,18 @@ export declare class RNAcanvas {
72
70
  * (Has no effect if the DOM node of the app object had no parent container node to begin with.)
73
71
  */
74
72
  remove(): void;
73
+ /**
74
+ * The horizontal scrollbar for the drawing of the app.
75
+ */
76
+ get horizontalDrawingScrollbar(): import("@rnacanvas/scrollbars").HorizontalScrollbar;
77
+ /**
78
+ * The vertical scrollbar for the drawing of the app.
79
+ */
80
+ get verticalDrawingScrollbar(): import("@rnacanvas/scrollbars").VerticalScrollbar;
81
+ /**
82
+ * The scrollbars for the drawing of the app.
83
+ */
84
+ get drawingScrollbars(): import("@rnacanvas/scrollbars").Scrollbars;
75
85
  /**
76
86
  * Draws the specified structure (expressed in dot-bracket notation) on the drawing of the app.
77
87
  *
@@ -91,9 +101,23 @@ export declare class RNAcanvas {
91
101
  * @param dotBracket Dot-bracket notation expressing the base-pairs in the structure to draw.
92
102
  */
93
103
  drawDotBracket(seq: string, dotBracket: string): void;
104
+ /**
105
+ * Opens the provided form simply by adding it within the DOM structure of the RNAcanvas app.
106
+ *
107
+ * Forms are to be closed simply by removing them from the DOM structure of the RNAcanvas app
108
+ * (e.g., by calling the `remove` method of the DOM node corresponding to the form).
109
+ *
110
+ * Forms input to this method should have absolute positioning
111
+ * (i.e., have a `position` CSS property of `absolute`).
112
+ *
113
+ * Forms will be added in such a way that (with absolute positioning)
114
+ * they will be positioned relative to the bounding box of the RNAcanvas app.
115
+ */
116
+ openForm(form: Node | Form): void;
94
117
  /**
95
118
  * The CSS style declaration for the actual DOM node of the app object.
96
119
  */
97
120
  get style(): CSSStyleDeclaration;
98
121
  }
122
+ export {};
99
123
  //# sourceMappingURL=RNAcanvas.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"RNAcanvas.d.ts","sourceRoot":"","sources":["../src/RNAcanvas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAE1C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAA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