@motifx-community/ui 0.1.0-beta.14 → 0.1.0-beta.16
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/CHANGELOG.md +113 -0
- package/README.md +2 -2
- package/dist/components/diagram/Diagram.d.ts +607 -0
- package/dist/components/diagram/DiagramAutoPan.d.ts +17 -0
- package/dist/components/diagram/DiagramBends.d.ts +70 -0
- package/dist/components/diagram/DiagramDragging.d.ts +66 -0
- package/dist/components/diagram/DiagramEdgeView.d.ts +78 -0
- package/dist/components/diagram/DiagramGrid.d.ts +13 -0
- package/dist/components/diagram/DiagramHistory.d.ts +16 -0
- package/dist/components/diagram/DiagramLinks.d.ts +177 -0
- package/dist/components/diagram/DiagramMap.d.ts +62 -0
- package/dist/components/diagram/DiagramNodeView.d.ts +143 -0
- package/dist/components/diagram/DiagramOverview.d.ts +20 -0
- package/dist/components/diagram/DiagramPanning.d.ts +34 -0
- package/dist/components/diagram/diagram-alignment.d.ts +2 -0
- package/dist/components/diagram/diagram-auto-pan-host.d.ts +8 -0
- package/dist/components/diagram/diagram-background.d.ts +2 -0
- package/dist/components/diagram/diagram-bends-host.d.ts +17 -0
- package/dist/components/diagram/diagram-card-kind.d.ts +42 -0
- package/dist/components/diagram/diagram-card-node.d.ts +11 -0
- package/dist/components/diagram/diagram-center-options.d.ts +6 -0
- package/dist/components/diagram/diagram-change.d.ts +11 -0
- package/dist/components/diagram/diagram-class-member.d.ts +13 -0
- package/dist/components/diagram/diagram-class-node.d.ts +12 -0
- package/dist/components/diagram/diagram-column-checked-event-args.d.ts +9 -0
- package/dist/components/diagram/diagram-connected-event-args.d.ts +6 -0
- package/dist/components/diagram/diagram-connecting-event-args.d.ts +9 -0
- package/dist/components/diagram/diagram-connection.d.ts +7 -0
- package/dist/components/diagram/diagram-data.d.ts +12 -0
- package/dist/components/diagram/diagram-deleted-event-args.d.ts +8 -0
- package/dist/components/diagram/diagram-deleting-event-args.d.ts +9 -0
- package/dist/components/diagram/diagram-dragging-host.d.ts +47 -0
- package/dist/components/diagram/diagram-drawn-node.d.ts +10 -0
- package/dist/components/diagram/diagram-edge-end.d.ts +2 -0
- package/dist/components/diagram/diagram-edge-path.d.ts +5 -0
- package/dist/components/diagram/diagram-edge-reshaped-event-args.d.ts +8 -0
- package/dist/components/diagram/diagram-edge-reshaping-event-args.d.ts +6 -0
- package/dist/components/diagram/diagram-edge.d.ts +49 -0
- package/dist/components/diagram/diagram-edit.d.ts +10 -0
- package/dist/components/diagram/diagram-export-options.d.ts +14 -0
- package/dist/components/diagram/diagram-export.d.ts +28 -0
- package/dist/components/diagram/diagram-fit-options.d.ts +12 -0
- package/dist/components/diagram/diagram-history-changed-event-args.d.ts +14 -0
- package/dist/components/diagram/diagram-history-step.d.ts +9 -0
- package/dist/components/diagram/diagram-kinds.d.ts +9 -0
- package/dist/components/diagram/diagram-layered.d.ts +39 -0
- package/dist/components/diagram/diagram-layout-direction.d.ts +2 -0
- package/dist/components/diagram/diagram-layout-options.d.ts +24 -0
- package/dist/components/diagram/diagram-layout-type.d.ts +5 -0
- package/dist/components/diagram/diagram-layout.d.ts +33 -0
- package/dist/components/diagram/diagram-line-look.d.ts +6 -0
- package/dist/components/diagram/diagram-line.d.ts +11 -0
- package/dist/components/diagram/diagram-links-host.d.ts +45 -0
- package/dist/components/diagram/diagram-links-options.d.ts +7 -0
- package/dist/components/diagram/diagram-map-props.d.ts +10 -0
- package/dist/components/diagram/diagram-map-target.d.ts +27 -0
- package/dist/components/diagram/diagram-marker.d.ts +6 -0
- package/dist/components/diagram/diagram-mini-map-options.d.ts +13 -0
- package/dist/components/diagram/diagram-mini-map-position.d.ts +2 -0
- package/dist/components/diagram/diagram-node-context.d.ts +26 -0
- package/dist/components/diagram/diagram-node-host.d.ts +23 -0
- package/dist/components/diagram/diagram-node-kind.d.ts +43 -0
- package/dist/components/diagram/diagram-node-move.d.ts +11 -0
- package/dist/components/diagram/diagram-node-resized-event-args.d.ts +8 -0
- package/dist/components/diagram/diagram-node-resizing-event-args.d.ts +6 -0
- package/dist/components/diagram/diagram-node-size.d.ts +8 -0
- package/dist/components/diagram/diagram-node-status.d.ts +2 -0
- package/dist/components/diagram/diagram-node-toggled-event-args.d.ts +7 -0
- package/dist/components/diagram/diagram-node.d.ts +56 -0
- package/dist/components/diagram/diagram-nodes-moved-event-args.d.ts +6 -0
- package/dist/components/diagram/diagram-nodes-moving-event-args.d.ts +6 -0
- package/dist/components/diagram/diagram-panning-host.d.ts +19 -0
- package/dist/components/diagram/diagram-pasted-event-args.d.ts +7 -0
- package/dist/components/diagram/diagram-pasting-event-args.d.ts +11 -0
- package/dist/components/diagram/diagram-path-ends.d.ts +11 -0
- package/dist/components/diagram/diagram-path-result.d.ts +6 -0
- package/dist/components/diagram/diagram-paths.d.ts +35 -0
- package/dist/components/diagram/diagram-point.d.ts +5 -0
- package/dist/components/diagram/diagram-port-place.d.ts +9 -0
- package/dist/components/diagram/diagram-port.d.ts +27 -0
- package/dist/components/diagram/diagram-props.d.ts +159 -0
- package/dist/components/diagram/diagram-reconnected-event-args.d.ts +10 -0
- package/dist/components/diagram/diagram-reconnecting-event-args.d.ts +11 -0
- package/dist/components/diagram/diagram-rect.d.ts +7 -0
- package/dist/components/diagram/diagram-resize-side.d.ts +2 -0
- package/dist/components/diagram/diagram-route.d.ts +10 -0
- package/dist/components/diagram/diagram-selection-changed-event-args.d.ts +9 -0
- package/dist/components/diagram/diagram-selection.d.ts +5 -0
- package/dist/components/diagram/diagram-side.d.ts +2 -0
- package/dist/components/diagram/diagram-table-column.d.ts +13 -0
- package/dist/components/diagram/diagram-table-node.d.ts +12 -0
- package/dist/components/diagram/diagram-tree.d.ts +14 -0
- package/dist/components/diagram/diagram-viewport-changed-event-args.d.ts +8 -0
- package/dist/components/diagram/diagram-viewport-options.d.ts +5 -0
- package/dist/components/diagram/diagram-viewport.d.ts +6 -0
- package/dist/components/diagram/index.d.ts +65 -0
- package/dist/components/diagram/swallow-next-click.d.ts +5 -0
- package/dist/components/expressioneditor/ExpressionEditor.d.ts +111 -0
- package/dist/components/expressioneditor/expression-editor-props.d.ts +24 -0
- package/dist/components/expressioneditor/index.d.ts +2 -0
- package/dist/components/formlayout/FormLayout.d.ts +10 -3
- package/dist/components/formlayout/form-editor-type.d.ts +1 -1
- package/dist/components/formlayout/form-item.d.ts +4 -1
- package/dist/components/formlayout/form-layout-props.d.ts +1 -1
- package/dist/components/formlayout/index.d.ts +1 -0
- package/dist/components/formlayout/schema-items.d.ts +26 -0
- package/dist/components/pivotgrid/model/PivotAxisWindow.d.ts +53 -1
- package/dist/components/pivotgrid/model/PivotCellWindow.d.ts +2 -0
- package/dist/components/pivotgrid/model/PivotWindows.d.ts +3 -6
- package/dist/components/toolbar/Toolbar.d.ts +5 -3
- package/dist/core/control.d.ts +2 -0
- package/dist/core/keyboard.d.ts +5 -0
- package/dist/core/measure/index.d.ts +2 -0
- package/dist/core/measure/picture.d.ts +27 -0
- package/dist/core/shortcut-options.d.ts +5 -2
- package/dist/core/ui-strings.d.ts +191 -0
- package/dist/generated/tokens.d.ts +1615 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +11501 -705
- package/dist/index.js.map +1 -1
- package/dist/locales/en.json +180 -1
- package/dist/locales/tr.json +180 -1
- package/dist/styles.css +2262 -3
- package/dist/tokens/index.d.ts +1615 -0
- package/dist/tokens/index.js +1615 -0
- package/dist/tokens/index.js.map +1 -1
- package/dist/{tr-BGbF9uCs.js → tr-4GNbFdQh.js} +361 -3
- package/dist/{tr-BGbF9uCs.js.map → tr-4GNbFdQh.js.map} +1 -1
- package/docs/accordion.md +1 -1
- package/docs/actionsheet.md +1 -1
- package/docs/appbar.md +1 -1
- package/docs/appmenu-api.md +1 -1
- package/docs/appmenu-programmatic.md +1 -1
- package/docs/appmenu-search.md +1 -1
- package/docs/appmenu.md +1 -1
- package/docs/avatar.md +1 -1
- package/docs/badge.md +1 -1
- package/docs/bar-gauge-angles.md +1 -1
- package/docs/bar-gauge-data.md +1 -1
- package/docs/bar-gauge-labels.md +1 -1
- package/docs/bar-gauge.md +1 -1
- package/docs/barcode.md +1 -1
- package/docs/bottomnavigation.md +1 -1
- package/docs/bottomsheet.md +1 -1
- package/docs/breadcrumb.md +1 -1
- package/docs/button.md +1 -1
- package/docs/buttongroup.md +1 -1
- package/docs/buttons.md +1 -1
- package/docs/calendar.md +1 -1
- package/docs/card.md +1 -1
- package/docs/chart-bars.md +1 -1
- package/docs/chart-candles.md +1 -1
- package/docs/chart-funnel.md +1 -1
- package/docs/chart-heatmap.md +1 -1
- package/docs/chart-lines.md +1 -1
- package/docs/chart-live.md +1 -1
- package/docs/chart-pie.md +1 -1
- package/docs/chart-radar.md +1 -1
- package/docs/chart-ranges.md +1 -1
- package/docs/chart-references.md +1 -1
- package/docs/chart-scatter.md +1 -1
- package/docs/chart-waterfall.md +1 -1
- package/docs/chart-zoom.md +1 -1
- package/docs/chart.md +1 -1
- package/docs/chat.md +1 -1
- package/docs/checkbox.md +1 -1
- package/docs/chip.md +1 -1
- package/docs/choice.md +1 -1
- package/docs/colorbox.md +1 -1
- package/docs/combobox.md +1 -1
- package/docs/commands.md +1 -1
- package/docs/control.md +1 -1
- package/docs/data.md +2 -2
- package/docs/datagrid-api.md +1 -1
- package/docs/datagrid-bands.md +1 -1
- package/docs/datagrid-drag-select.md +1 -1
- package/docs/datagrid-drag.md +1 -1
- package/docs/datagrid-editing.md +1 -1
- package/docs/datagrid-filtering.md +1 -1
- package/docs/datagrid-forms.md +1 -1
- package/docs/datagrid-grouping.md +1 -1
- package/docs/datagrid-layout.md +1 -1
- package/docs/datagrid-lookups.md +1 -1
- package/docs/datagrid-master-detail.md +1 -1
- package/docs/datagrid-scrolling.md +1 -1
- package/docs/datagrid-selection.md +1 -1
- package/docs/datagrid.md +1 -1
- package/docs/datalayer-api.md +491 -0
- package/docs/datalayer-changes.md +501 -0
- package/docs/datalayer-odata.md +998 -0
- package/docs/datalayer-pivot.md +850 -0
- package/docs/datalayer-queries.md +516 -0
- package/docs/datalayer-rest.md +529 -0
- package/docs/datalayer-soap.md +576 -0
- package/docs/datalayer-source.md +464 -0
- package/docs/datalayer.md +264 -0
- package/docs/datebox.md +1 -1
- package/docs/daterangebox.md +1 -1
- package/docs/diagram-api.md +200 -0
- package/docs/diagram-commands.md +79 -0
- package/docs/diagram-connections.md +157 -0
- package/docs/diagram-custom-nodes.md +325 -0
- package/docs/diagram-designer.md +816 -0
- package/docs/diagram-editing.md +62 -0
- package/docs/diagram-flow.md +157 -0
- package/docs/diagram-keyboard.md +58 -0
- package/docs/diagram-layout.md +354 -0
- package/docs/diagram-nodes.md +206 -0
- package/docs/diagram-tables.md +212 -0
- package/docs/diagram.md +217 -0
- package/docs/display.md +1 -1
- package/docs/draggable.md +1 -1
- package/docs/drawer.md +1 -1
- package/docs/dropdown.md +1 -1
- package/docs/editors.md +1 -1
- package/docs/expressioneditor.md +469 -0
- package/docs/expressions.md +431 -0
- package/docs/feedback.md +1 -1
- package/docs/fileuploader.md +1 -1
- package/docs/filterbuilder.md +1 -1
- package/docs/formlayout-schema.md +143 -0
- package/docs/formlayout.md +16 -4
- package/docs/foundations.md +1 -1
- package/docs/gallery.md +1 -1
- package/docs/gauge-base.md +1 -1
- package/docs/gauge-circular.md +1 -1
- package/docs/gauge-dashboards.md +1 -1
- package/docs/gauge-linear.md +1 -1
- package/docs/gauge-markers.md +1 -1
- package/docs/gauge-marks.md +1 -1
- package/docs/gauge-ranges.md +1 -1
- package/docs/gauge-scales.md +1 -1
- package/docs/gauge.md +1 -1
- package/docs/home.md +1 -1
- package/docs/keyboard.md +2 -2
- package/docs/language.md +1 -1
- package/docs/layout.md +1 -1
- package/docs/listbox.md +1 -1
- package/docs/loadpanel.md +1 -1
- package/docs/lookup.md +1 -1
- package/docs/markdown.md +1 -1
- package/docs/menus-api.md +1 -1
- package/docs/menus-context.md +1 -1
- package/docs/menus-customization.md +1 -1
- package/docs/menus-merging.md +1 -1
- package/docs/menus-programmatic.md +1 -1
- package/docs/menus.md +1 -1
- package/docs/multiview.md +1 -1
- package/docs/navigation.md +1 -1
- package/docs/numberbox.md +1 -1
- package/docs/otpinput.md +1 -1
- package/docs/pagination.md +1 -1
- package/docs/pivotgrid-api.md +1 -1
- package/docs/pivotgrid-chart.md +1 -1
- package/docs/pivotgrid-drilldown.md +1 -1
- package/docs/pivotgrid-export.md +1 -1
- package/docs/pivotgrid-fields.md +1 -1
- package/docs/pivotgrid-keyboard.md +1 -1
- package/docs/pivotgrid-layout.md +1 -1
- package/docs/pivotgrid-panel.md +1 -1
- package/docs/pivotgrid-remote.md +122 -44
- package/docs/pivotgrid-sorting.md +3 -3
- package/docs/pivotgrid-state.md +1 -1
- package/docs/pivotgrid-summaries.md +1 -1
- package/docs/pivotgrid.md +1 -1
- package/docs/popover.md +1 -1
- package/docs/progress.md +1 -1
- package/docs/qrcode.md +1 -1
- package/docs/radiogroup.md +1 -1
- package/docs/rating.md +1 -1
- package/docs/resizable.md +1 -1
- package/docs/ribbonmenu-api.md +1 -1
- package/docs/ribbonmenu-commands.md +1 -1
- package/docs/ribbonmenu-customization.md +1 -1
- package/docs/ribbonmenu-display.md +1 -1
- package/docs/ribbonmenu-layouts.md +1 -1
- package/docs/ribbonmenu-programmatic.md +1 -1
- package/docs/ribbonmenu.md +1 -1
- package/docs/scheduler-agenda.md +1 -1
- package/docs/scheduler-big-data.md +1 -1
- package/docs/scheduler-editing.md +1 -1
- package/docs/scheduler-form.md +1 -1
- package/docs/scheduler-icalendar.md +1 -1
- package/docs/scheduler-mobile.md +1 -1
- package/docs/scheduler-recurrence.md +1 -1
- package/docs/scheduler-resources.md +1 -1
- package/docs/scheduler-timeline.md +1 -1
- package/docs/scheduler.md +1 -1
- package/docs/scrollview.md +1 -1
- package/docs/shortcuteditor.md +1 -1
- package/docs/showcase-flowstudio.md +61 -0
- package/docs/showcase-home.md +1 -1
- package/docs/showcase-mail.md +1 -1
- package/docs/showcase.md +1 -1
- package/docs/signature.md +1 -1
- package/docs/skeleton.md +1 -1
- package/docs/slider.md +1 -1
- package/docs/sortable.md +1 -1
- package/docs/sparkline.md +1 -1
- package/docs/speeddial.md +1 -1
- package/docs/splitter.md +1 -1
- package/docs/stepper.md +1 -1
- package/docs/switch.md +1 -1
- package/docs/tabdocs-dock.md +1 -1
- package/docs/tabdocs-drag.md +1 -1
- package/docs/tabdocs-menus.md +1 -1
- package/docs/tabdocs-mobile.md +1 -1
- package/docs/tabdocs-tabs.md +1 -1
- package/docs/tabdocs-windows.md +1 -1
- package/docs/tabdocs-workspace.md +1 -1
- package/docs/tabdocs.md +1 -1
- package/docs/tabs.md +1 -1
- package/docs/tagbox.md +1 -1
- package/docs/textarea.md +1 -1
- package/docs/textbox.md +1 -1
- package/docs/tileview.md +1 -1
- package/docs/timeline.md +1 -1
- package/docs/toast.md +1 -1
- package/docs/tokens.md +324 -1
- package/docs/toolbar-api.md +1 -1
- package/docs/toolbar-customization.md +1 -1
- package/docs/toolbar.md +1 -1
- package/docs/tooltip.md +1 -1
- package/docs/treeview.md +1 -1
- package/docs/validationsummary.md +1 -1
- package/docs/window.md +1 -1
- package/docs/wizard.md +1 -1
- package/llms-full.txt +10142 -462
- package/llms.txt +32 -1
- package/package.json +2 -2
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { DiagramAutoPanHost } from './diagram-auto-pan-host';
|
|
2
|
+
import type { DiagramConnectedEventArgs } from './diagram-connected-event-args';
|
|
3
|
+
import type { DiagramConnectingEventArgs } from './diagram-connecting-event-args';
|
|
4
|
+
import type { DiagramConnection } from './diagram-connection';
|
|
5
|
+
import type { DiagramEdge } from './diagram-edge';
|
|
6
|
+
import type { DiagramEdgePath } from './diagram-edge-path';
|
|
7
|
+
import type { DiagramEdgeReshapedEventArgs } from './diagram-edge-reshaped-event-args';
|
|
8
|
+
import type { DiagramEdgeReshapingEventArgs } from './diagram-edge-reshaping-event-args';
|
|
9
|
+
import type { DiagramNode } from './diagram-node';
|
|
10
|
+
import type { DiagramNodeView } from './DiagramNodeView';
|
|
11
|
+
import type { DiagramPoint } from './diagram-point';
|
|
12
|
+
import type { DiagramReconnectedEventArgs } from './diagram-reconnected-event-args';
|
|
13
|
+
import type { DiagramReconnectingEventArgs } from './diagram-reconnecting-event-args';
|
|
14
|
+
import type { DiagramViewport } from './diagram-viewport';
|
|
15
|
+
/** What `DiagramLinks` asks of the diagram whose connections it draws; it pans the view while a drag nears an edge. */
|
|
16
|
+
export interface DiagramLinksHost<N extends DiagramNode = DiagramNode, E extends DiagramEdge = DiagramEdge> extends DiagramAutoPanHost {
|
|
17
|
+
/** A click on a connection, which selects it. */
|
|
18
|
+
edgeClicked(edge: E, e: MouseEvent): void;
|
|
19
|
+
/** The connections: the array the diagram was given, which a new connection is added to. */
|
|
20
|
+
edges(): E[];
|
|
21
|
+
view(id: string): DiagramNodeView<N> | undefined;
|
|
22
|
+
/** The node a connection to `id` is drawn to: the node, or the collapsed group it is hidden in. */
|
|
23
|
+
shown(id: string): DiagramNodeView<N> | undefined;
|
|
24
|
+
views(): Iterable<DiagramNodeView<N>>;
|
|
25
|
+
viewport(): DiagramViewport;
|
|
26
|
+
/** Where the inside of the surface starts on the page. */
|
|
27
|
+
origin(): DiagramPoint;
|
|
28
|
+
/** The shape of a line that names none. */
|
|
29
|
+
shape(): DiagramEdgePath;
|
|
30
|
+
connectable(): boolean;
|
|
31
|
+
/** The app's own rule for a connection. */
|
|
32
|
+
allows(connection: DiagramConnection): boolean;
|
|
33
|
+
connecting(e: DiagramConnectingEventArgs<E>): void;
|
|
34
|
+
connected(e: DiagramConnectedEventArgs<E>): void;
|
|
35
|
+
reconnecting(e: DiagramReconnectingEventArgs<E>): void;
|
|
36
|
+
reconnected(e: DiagramReconnectedEventArgs<E>): void;
|
|
37
|
+
/** The step a point of a line snaps to while it is dragged, or `null`. */
|
|
38
|
+
snapStep(): number | null;
|
|
39
|
+
reshaping(e: DiagramEdgeReshapingEventArgs<E>): void;
|
|
40
|
+
reshaped(e: DiagramEdgeReshapedEventArgs<E>): void;
|
|
41
|
+
/** Asks for a draw with the next frame, where the lines marked to draw are drawn. */
|
|
42
|
+
askDraw(): void;
|
|
43
|
+
/** A node moved or changed its size, or the nodes were read again: what the diagram shows changed. */
|
|
44
|
+
nodesMoved(): void;
|
|
45
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** Which connections of a node `edgesOf` and `nodesOf` take. */
|
|
2
|
+
export interface DiagramLinksOptions {
|
|
3
|
+
/** `'in'`: those that end at the node; `'out'`: those that start at it. Default: `'both'`. */
|
|
4
|
+
direction?: 'in' | 'out' | 'both';
|
|
5
|
+
/** Only those at this port of the node, by its `id`; a connection that names no port at the node is at none. */
|
|
6
|
+
port?: string;
|
|
7
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Bind } from '@motifx/core';
|
|
2
|
+
import type { ControlProps } from '../../core/control';
|
|
3
|
+
import type { DiagramMapTarget } from './diagram-map-target';
|
|
4
|
+
/** Props of `DiagramMap`. Each prop is also a settable property, and a function is tracked. */
|
|
5
|
+
export interface DiagramMapProps extends ControlProps {
|
|
6
|
+
/** The diagram the map shows and moves the view of: give it by `ref`, or later. */
|
|
7
|
+
diagram?: Bind<DiagramMapTarget | null>;
|
|
8
|
+
/** The accessible name of the map. */
|
|
9
|
+
label?: Bind<string>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { Event as MotifEvent } from '@motifx/core';
|
|
2
|
+
import type { DiagramCenterOptions } from './diagram-center-options';
|
|
3
|
+
import type { DiagramDrawnNode } from './diagram-drawn-node';
|
|
4
|
+
import type { DiagramNode } from './diagram-node';
|
|
5
|
+
import type { DiagramPoint } from './diagram-point';
|
|
6
|
+
import type { DiagramRect } from './diagram-rect';
|
|
7
|
+
import type { DiagramViewport } from './diagram-viewport';
|
|
8
|
+
import type { DiagramViewportOptions } from './diagram-viewport-options';
|
|
9
|
+
/** What a map reads of a diagram and moves its view with: every `Diagram`, whatever its nodes and connections are. */
|
|
10
|
+
export interface DiagramMapTarget {
|
|
11
|
+
readonly isDisposed: boolean;
|
|
12
|
+
readonly viewport: DiagramViewport;
|
|
13
|
+
readonly visibleArea: DiagramRect;
|
|
14
|
+
readonly selectedNodes: readonly DiagramNode[];
|
|
15
|
+
readonly minZoom: number;
|
|
16
|
+
readonly maxZoom: number;
|
|
17
|
+
readonly pannable: boolean;
|
|
18
|
+
readonly zoomable: boolean;
|
|
19
|
+
readonly onContentChanged: MotifEvent<void>;
|
|
20
|
+
readonly onViewportChanged: MotifEvent<unknown>;
|
|
21
|
+
readonly onSelectionChanged: MotifEvent<unknown>;
|
|
22
|
+
drawnNodes(): readonly DiagramDrawnNode[];
|
|
23
|
+
centerOn(target: string | DiagramPoint, options?: DiagramCenterOptions): void;
|
|
24
|
+
setViewport(viewport: DiagramViewport, options?: DiagramViewportOptions): void;
|
|
25
|
+
zoomIn(options?: DiagramViewportOptions): void;
|
|
26
|
+
zoomOut(options?: DiagramViewportOptions): void;
|
|
27
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The mark at an end of a connection. `arrow`, `arrow-open` and `circle` for a flow; `triangle-open` (inheritance),
|
|
3
|
+
* `diamond` (composition) and `diamond-open` (aggregation) for a class diagram; and the crow's feet of a table diagram,
|
|
4
|
+
* by how many rows the end takes: `one`, `many`, `zero-or-one`, `one-or-many` and `zero-or-many`.
|
|
5
|
+
*/
|
|
6
|
+
export type DiagramMarker = 'none' | 'arrow' | 'arrow-open' | 'circle' | 'triangle-open' | 'diamond' | 'diamond-open' | 'one' | 'many' | 'zero-or-one' | 'one-or-many' | 'zero-or-many';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { DiagramMiniMapPosition } from './diagram-mini-map-position';
|
|
2
|
+
/** The map a diagram shows in a corner of its own, as `miniMap` gives it. */
|
|
3
|
+
export interface DiagramMiniMapOptions {
|
|
4
|
+
/** Default: `true`. */
|
|
5
|
+
visible?: boolean;
|
|
6
|
+
/** Default: `'bottom-end'`. */
|
|
7
|
+
position?: DiagramMiniMapPosition;
|
|
8
|
+
/** Its size in pixels. Default: the design language's. */
|
|
9
|
+
width?: number;
|
|
10
|
+
height?: number;
|
|
11
|
+
/** Its accessible name. Default: the kit's “Diagram map”. */
|
|
12
|
+
label?: string;
|
|
13
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { ComponentBase } from '@motifx/core';
|
|
2
|
+
import type { DiagramNode } from './diagram-node';
|
|
3
|
+
import type { Diagram } from './Diagram';
|
|
4
|
+
/** What a node kind's `content` and `update` receive: the node, the place its content goes, and the diagram. */
|
|
5
|
+
export interface DiagramNodeContext<N extends DiagramNode = DiagramNode> {
|
|
6
|
+
readonly node: N;
|
|
7
|
+
/** The node's content area. Content made in code goes into its `controls`. */
|
|
8
|
+
readonly host: ComponentBase;
|
|
9
|
+
/** The diagram the node is on, to call its methods. */
|
|
10
|
+
readonly diagram: Diagram<N>;
|
|
11
|
+
/** Whether the node is selected now. */
|
|
12
|
+
readonly selected: boolean;
|
|
13
|
+
/** Makes `part` the only place a press drags the node from, as a title bar: elsewhere its content keeps the pointer. */
|
|
14
|
+
dragHandle(part: ComponentBase): void;
|
|
15
|
+
/**
|
|
16
|
+
* Stands the port `id` beside `part`, a row of the content: at the middle of the part along the port's side, read
|
|
17
|
+
* again as the node is laid out. While the part is not laid out (hidden), the port takes its own `offset`; `null`
|
|
18
|
+
* gives the port back to it for good.
|
|
19
|
+
*/
|
|
20
|
+
anchor(id: string, part: ComponentBase | null): void;
|
|
21
|
+
/**
|
|
22
|
+
* Names the node with `read`, read again whenever the reactive data it reads changes: a screen reader hears that name,
|
|
23
|
+
* and the diagram says it, in place of the node's `text`. For a name the user changes inside the content.
|
|
24
|
+
*/
|
|
25
|
+
label(read: () => string): void;
|
|
26
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { Size } from '../../core/measure';
|
|
2
|
+
import type { DiagramNode } from './diagram-node';
|
|
3
|
+
import type { Diagram } from './Diagram';
|
|
4
|
+
import type { DiagramNodeKind } from './diagram-node-kind';
|
|
5
|
+
import type { DiagramNodeView } from './DiagramNodeView';
|
|
6
|
+
import type { DiagramPort } from './diagram-port';
|
|
7
|
+
import type { DiagramResizeSide } from './diagram-resize-side';
|
|
8
|
+
/** What a node's part asks of its diagram, and tells it. */
|
|
9
|
+
export interface DiagramNodeHost<N extends DiagramNode = DiagramNode> {
|
|
10
|
+
/** The diagram, which a kind's content receives. */
|
|
11
|
+
readonly diagram: Diagram<N>;
|
|
12
|
+
/** The kind of a node: one of the diagram's, a built-in one, or the node of a text. */
|
|
13
|
+
kindOf(node: N): DiagramNodeKind<N>;
|
|
14
|
+
isSelected(view: DiagramNodeView<N>): boolean;
|
|
15
|
+
/** Its size was laid out anew. */
|
|
16
|
+
sized(view: DiagramNodeView<N>): void;
|
|
17
|
+
/** The size a node not laid out yet is likely to have, in a large diagram; none in one that lays out every node. */
|
|
18
|
+
estimate(view: DiagramNodeView<N>): Size;
|
|
19
|
+
/** A press on the node, on one of its ports or not; `drags` is false off its drag handle. */
|
|
20
|
+
pressed(view: DiagramNodeView<N>, port: DiagramPort | null, e: PointerEvent, drags: boolean): void;
|
|
21
|
+
/** A press on a resize handle of the node. */
|
|
22
|
+
resizePressed(view: DiagramNodeView<N>, side: DiagramResizeSide, e: PointerEvent): void;
|
|
23
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { DiagramNode } from './diagram-node';
|
|
2
|
+
import type { DiagramNodeContext } from './diagram-node-context';
|
|
3
|
+
import type { DiagramPort } from './diagram-port';
|
|
4
|
+
/**
|
|
5
|
+
* A kind of node, named by `DiagramNode.kind`: its content, its ports, its look and what the user does with it. A press
|
|
6
|
+
* on a control inside the content (a button, a field, a list) is the control's and does not drag the node.
|
|
7
|
+
*/
|
|
8
|
+
export interface DiagramNodeKind<N extends DiagramNode = DiagramNode> {
|
|
9
|
+
/**
|
|
10
|
+
* Makes the content of a node of the kind, once per node, in place of its text: a component made with JSX or in code,
|
|
11
|
+
* or a text. Content may also be added to `context.host` and nothing returned.
|
|
12
|
+
*/
|
|
13
|
+
content?: (context: DiagramNodeContext<N>) => unknown;
|
|
14
|
+
/** Writes what changed in the content when the node is drawn again: after `refresh()`, `reState()`, an undo or a resize. */
|
|
15
|
+
update?: (context: DiagramNodeContext<N>) => void;
|
|
16
|
+
/**
|
|
17
|
+
* The ports of a node of the kind that names none of its own; a function makes them from the node, as a table makes
|
|
18
|
+
* a port for each of its columns. It is read again whenever the node is drawn.
|
|
19
|
+
*/
|
|
20
|
+
ports?: readonly DiagramPort[] | ((node: N) => readonly DiagramPort[]);
|
|
21
|
+
/** Classes on the element of every node of the kind, for its look. */
|
|
22
|
+
cssClass?: string;
|
|
23
|
+
/** Whether the user resizes the nodes of the kind by the handles of a selected node. Default: `false`. */
|
|
24
|
+
resizable?: boolean;
|
|
25
|
+
/** The smallest size a resize leaves, in the diagram's units. Default: `40` by `24`. */
|
|
26
|
+
minWidth?: number;
|
|
27
|
+
minHeight?: number;
|
|
28
|
+
/**
|
|
29
|
+
* Whether the nodes of the kind hold other nodes: a node dropped inside one becomes its child (`parent`) and moves with
|
|
30
|
+
* it, and a node dragged out of it leaves it. Default: `false`.
|
|
31
|
+
*/
|
|
32
|
+
group?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Whether the nodes of the kind collapse to their header (`collapsed`), as a table hides its columns and a class its
|
|
35
|
+
* members; a group always does. Default: `false`.
|
|
36
|
+
*/
|
|
37
|
+
collapsible?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* How a collapsed group of the kind shrinks: `'vertical'` keeps its width and takes the height of its header (a group),
|
|
40
|
+
* `'horizontal'` keeps its height and takes the width of its header (a lane, its title down its side). Default: `'vertical'`.
|
|
41
|
+
*/
|
|
42
|
+
collapse?: 'vertical' | 'horizontal';
|
|
43
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { DiagramNode } from './diagram-node';
|
|
2
|
+
import type { DiagramPoint } from './diagram-point';
|
|
3
|
+
/** A node the user moved: where it was and where it is now, in the diagram's units. */
|
|
4
|
+
export interface DiagramNodeMove<N extends DiagramNode = DiagramNode> {
|
|
5
|
+
readonly node: N;
|
|
6
|
+
readonly from: DiagramPoint;
|
|
7
|
+
readonly to: DiagramPoint;
|
|
8
|
+
/** The group it was in and the group it is in now, when the drop took it into a group or out of one. */
|
|
9
|
+
readonly fromParent?: string;
|
|
10
|
+
readonly toParent?: string;
|
|
11
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { DiagramNode } from './diagram-node';
|
|
2
|
+
import type { DiagramRect } from './diagram-rect';
|
|
3
|
+
/** Occurs after the user resized a node: its `x`, `y`, `width` and `height` hold the new place and size. */
|
|
4
|
+
export interface DiagramNodeResizedEventArgs<N extends DiagramNode = DiagramNode> {
|
|
5
|
+
readonly node: N;
|
|
6
|
+
readonly from: DiagramRect;
|
|
7
|
+
readonly to: DiagramRect;
|
|
8
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { DiagramNode } from './diagram-node';
|
|
2
|
+
/** The size a node gives, in the diagram's units; a side it does not give it takes from its content. */
|
|
3
|
+
export interface DiagramNodeSize {
|
|
4
|
+
width?: number;
|
|
5
|
+
height?: number;
|
|
6
|
+
}
|
|
7
|
+
/** Gives a node a size: a side without one is taken off, so the node takes it from its content again. */
|
|
8
|
+
export declare function giveSize(node: DiagramNode, size: DiagramNodeSize): void;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { DiagramNode } from './diagram-node';
|
|
2
|
+
/** Occurs after a node collapsed to its header or opened, a group or a node of a kind that collapses: its `collapsed` holds the new state. */
|
|
3
|
+
export interface DiagramNodeToggledEventArgs<N extends DiagramNode = DiagramNode> {
|
|
4
|
+
readonly node: N;
|
|
5
|
+
readonly collapsed: boolean;
|
|
6
|
+
readonly byUser: boolean;
|
|
7
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { DiagramNodeStatus } from './diagram-node-status';
|
|
2
|
+
import type { DiagramPort } from './diagram-port';
|
|
3
|
+
/** A node of a diagram: the app's own object, kept and handed back as it is given. */
|
|
4
|
+
export interface DiagramNode {
|
|
5
|
+
/** Unique among the nodes. A node given again with the same `id` keeps its part on the surface. */
|
|
6
|
+
id: string;
|
|
7
|
+
/** Where its top left corner is, in the diagram's units. */
|
|
8
|
+
x: number;
|
|
9
|
+
y: number;
|
|
10
|
+
/** Its size in the diagram's units; without one the node takes the size of its content. */
|
|
11
|
+
width?: number;
|
|
12
|
+
height?: number;
|
|
13
|
+
/** The text of the node. */
|
|
14
|
+
text?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Its kind, by name: one of the diagram's `kinds`, or a built-in one: `'group'`, `'lane'`, `'note'`, `'table'`
|
|
17
|
+
* (`DiagramTableNode`) or `'class'` (`DiagramClassNode`). Default: a node of its text.
|
|
18
|
+
*/
|
|
19
|
+
kind?: string;
|
|
20
|
+
/**
|
|
21
|
+
* The `id` of the group it is in: it moves with the group and hides while the group is collapsed. Its `x` and `y` stay
|
|
22
|
+
* in the diagram's units, not the group's. The user drops a node into a group and drags it out.
|
|
23
|
+
*/
|
|
24
|
+
parent?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Collapsed to its header: a group's nodes are hidden and their connections end at the group; a table hides its
|
|
27
|
+
* columns, a class its members. Only for a kind that collapses.
|
|
28
|
+
*/
|
|
29
|
+
collapsed?: boolean;
|
|
30
|
+
/** Whether the user resizes it; default: as its kind says. */
|
|
31
|
+
resizable?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Where connections start and end. Default: a port in the middle of each side, named by the side; connections end at
|
|
34
|
+
* `top` and `left` and start at `right` and `bottom`.
|
|
35
|
+
*/
|
|
36
|
+
ports?: DiagramPort[];
|
|
37
|
+
/** Classes of the app's own on the node's element, for its look. */
|
|
38
|
+
cssClass?: string;
|
|
39
|
+
/** Styles on the node's element: CSS properties by name, `background` or `--my-color` alike. */
|
|
40
|
+
style?: Record<string, string>;
|
|
41
|
+
/** `false` keeps it in its place. Default: `true`. */
|
|
42
|
+
draggable?: boolean;
|
|
43
|
+
/** `false` keeps the user from selecting it. Default: `true`. */
|
|
44
|
+
selectable?: boolean;
|
|
45
|
+
/** `false` keeps the user from drawing connections from its ports and to them. Default: `true`. */
|
|
46
|
+
connectable?: boolean;
|
|
47
|
+
/** `false` keeps the user from deleting it. Default: `true`. */
|
|
48
|
+
deletable?: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* What it is doing as a run goes through it: a mark in its corner and its frame, a screen reader hears it with its
|
|
51
|
+
* name. `Diagram.setNodeStatus` changes it and says it.
|
|
52
|
+
*/
|
|
53
|
+
status?: DiagramNodeStatus;
|
|
54
|
+
/** A short text with the status, such as what failed or how many rows came: in the mark's tip and said with it. */
|
|
55
|
+
statusText?: string;
|
|
56
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { DiagramNode } from './diagram-node';
|
|
2
|
+
import type { DiagramNodeMove } from './diagram-node-move';
|
|
3
|
+
/** Occurs after the user dropped the nodes they dragged; their `x` and `y` hold the new places. */
|
|
4
|
+
export interface DiagramNodesMovedEventArgs<N extends DiagramNode = DiagramNode> {
|
|
5
|
+
readonly moves: readonly DiagramNodeMove<N>[];
|
|
6
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { DiagramNode } from './diagram-node';
|
|
2
|
+
/** Occurs when the user starts to drag nodes; `cancel` keeps them where they are. */
|
|
3
|
+
export interface DiagramNodesMovingEventArgs<N extends DiagramNode = DiagramNode> {
|
|
4
|
+
readonly nodes: readonly N[];
|
|
5
|
+
cancel: boolean;
|
|
6
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Size } from '../../core/measure';
|
|
2
|
+
import type { DiagramPoint } from './diagram-point';
|
|
3
|
+
import type { DiagramViewport } from './diagram-viewport';
|
|
4
|
+
/** What `DiagramPanning` asks of the diagram it pans. */
|
|
5
|
+
export interface DiagramPanningHost {
|
|
6
|
+
viewport(): DiagramViewport;
|
|
7
|
+
/** The size of the surface in pixels. */
|
|
8
|
+
room(): Size;
|
|
9
|
+
pannable(): boolean;
|
|
10
|
+
zoomable(): boolean;
|
|
11
|
+
/** Whether an event comes from a node, which keeps its own presses. */
|
|
12
|
+
fromNode(e: Event): boolean;
|
|
13
|
+
/** `from` zoomed to `zoom` around `at`, a point of the surface in pixels that stays where it is. */
|
|
14
|
+
zoomed(from: DiagramViewport, zoom: number, at: DiagramPoint): DiagramViewport;
|
|
15
|
+
/** Moves the view as the user's move. */
|
|
16
|
+
move(viewport: DiagramViewport): void;
|
|
17
|
+
/** Stops a glide of the view under way. */
|
|
18
|
+
stop(): void;
|
|
19
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { DiagramEdge } from './diagram-edge';
|
|
2
|
+
import type { DiagramNode } from './diagram-node';
|
|
3
|
+
/** Occurs after copies were added to `nodes` and `edges` by a paste or a duplicate; they are the selection now. */
|
|
4
|
+
export interface DiagramPastedEventArgs<N extends DiagramNode = DiagramNode, E extends DiagramEdge = DiagramEdge> {
|
|
5
|
+
readonly nodes: readonly N[];
|
|
6
|
+
readonly edges: readonly E[];
|
|
7
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { DiagramEdge } from './diagram-edge';
|
|
2
|
+
import type { DiagramNode } from './diagram-node';
|
|
3
|
+
/**
|
|
4
|
+
* Occurs before copies are added by a paste or a duplicate: they are new objects with new ids, a step of the grid away.
|
|
5
|
+
* Change their fields (an id of the app's own), or `cancel` the paste.
|
|
6
|
+
*/
|
|
7
|
+
export interface DiagramPastingEventArgs<N extends DiagramNode = DiagramNode, E extends DiagramEdge = DiagramEdge> {
|
|
8
|
+
readonly nodes: readonly N[];
|
|
9
|
+
readonly edges: readonly E[];
|
|
10
|
+
cancel: boolean;
|
|
11
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { DiagramPoint } from './diagram-point';
|
|
2
|
+
import type { DiagramSide } from './diagram-side';
|
|
3
|
+
/** Where a connection's line starts and ends, in the diagram's units, and the sides of the nodes it leaves and enters. */
|
|
4
|
+
export interface DiagramPathEnds {
|
|
5
|
+
source: DiagramPoint;
|
|
6
|
+
sourceSide: DiagramSide;
|
|
7
|
+
target: DiagramPoint;
|
|
8
|
+
targetSide: DiagramSide;
|
|
9
|
+
/** The points of the connection's own the line passes through, in order. */
|
|
10
|
+
points: readonly DiagramPoint[];
|
|
11
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { DiagramEdgePath } from './diagram-edge-path';
|
|
2
|
+
import type { DiagramLine } from './diagram-line';
|
|
3
|
+
import type { DiagramLineLook } from './diagram-line-look';
|
|
4
|
+
import type { DiagramMarker } from './diagram-marker';
|
|
5
|
+
import type { DiagramPathEnds } from './diagram-path-ends';
|
|
6
|
+
import type { DiagramPathResult } from './diagram-path-result';
|
|
7
|
+
import type { DiagramPoint } from './diagram-point';
|
|
8
|
+
import type { DiagramPort } from './diagram-port';
|
|
9
|
+
import type { DiagramRect } from './diagram-rect';
|
|
10
|
+
import type { DiagramSide } from './diagram-side';
|
|
11
|
+
/** Where a port stands: on `side` of the node, `offset` of the way along it. */
|
|
12
|
+
export declare function portPoint(rect: DiagramRect, side: DiagramSide, offset: number): DiagramPoint;
|
|
13
|
+
/** The side of a node that faces a point: across when the point is farther across than up or down, else up or down. */
|
|
14
|
+
export declare function sideToward(rect: DiagramRect, toward: DiagramPoint): DiagramSide;
|
|
15
|
+
/** The sides a port stands on. */
|
|
16
|
+
export declare function sidesOf(port: DiagramPort): readonly DiagramSide[];
|
|
17
|
+
/** Whether a line of this shape turns at right angles: its runs move sideways, and its points of its own are where it turns. */
|
|
18
|
+
export declare function turnsSquare(shape: unknown): boolean;
|
|
19
|
+
export declare function centerOf(rect: DiagramRect): DiagramPoint;
|
|
20
|
+
/**
|
|
21
|
+
* How far a mark at an end takes the line back from the node: to the back of a shape that is filled over the line or
|
|
22
|
+
* open inside; a crow's foot and its bars and rings stand on a line that reaches the node.
|
|
23
|
+
*/
|
|
24
|
+
export declare function markerInset(marker: DiagramMarker, size: number): number;
|
|
25
|
+
/**
|
|
26
|
+
* The line of a connection from `source` to `target` (each a point on a node and the side it leaves by) through the
|
|
27
|
+
* connection's own `points`, its ends taken back by `insets` for their marks; `orthogonal` lines go around
|
|
28
|
+
* `obstacles`, the nodes. With it, the way back along the line at each end, which a mark points against.
|
|
29
|
+
*/
|
|
30
|
+
export declare function routeOf(shape: DiagramEdgePath | ((ends: DiagramPathEnds) => DiagramPathResult), source: DiagramPoint, sourceSide: DiagramSide, target: DiagramPoint, targetSide: DiagramSide, insets: {
|
|
31
|
+
source: number;
|
|
32
|
+
target: number;
|
|
33
|
+
}, look: DiagramLineLook, points?: readonly DiagramPoint[], obstacles?: readonly DiagramRect[]): DiagramLine;
|
|
34
|
+
/** A mark at `tip`, pointing against `back`, the way back along the line. */
|
|
35
|
+
export declare function markerPath(marker: DiagramMarker, tip: DiagramPoint, back: DiagramPoint, size: number): string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { DiagramPoint } from './diagram-point';
|
|
2
|
+
import type { DiagramPort } from './diagram-port';
|
|
3
|
+
import type { DiagramSide } from './diagram-side';
|
|
4
|
+
/** A port on one of its sides, and where it stands there now, in the diagram's units. */
|
|
5
|
+
export interface DiagramPortPlace {
|
|
6
|
+
readonly port: DiagramPort;
|
|
7
|
+
readonly side: DiagramSide;
|
|
8
|
+
readonly point: DiagramPoint;
|
|
9
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { DiagramSide } from './diagram-side';
|
|
2
|
+
/** A point of a node where connections start and end. */
|
|
3
|
+
export interface DiagramPort {
|
|
4
|
+
/** Unique among the node's ports. */
|
|
5
|
+
id: string;
|
|
6
|
+
/**
|
|
7
|
+
* The side of the node it stands on, or several: a connection then takes the one that faces its other end best, as
|
|
8
|
+
* a column of a table takes its left or its right.
|
|
9
|
+
*/
|
|
10
|
+
side: DiagramSide | readonly DiagramSide[];
|
|
11
|
+
/**
|
|
12
|
+
* Where along the side, from 0 at its left or top end to 1. Default: `0.5`, the middle. A port its kind's content
|
|
13
|
+
* stands beside a part of its own (`context.anchor`) is where that part is.
|
|
14
|
+
*/
|
|
15
|
+
offset?: number;
|
|
16
|
+
/** Whether connections start here, end here, or both. Default: `'both'`. */
|
|
17
|
+
direction?: 'source' | 'target' | 'both';
|
|
18
|
+
/** A port with a type connects only to a port of the same type. */
|
|
19
|
+
type?: string;
|
|
20
|
+
/** The most connections the port takes. Default: any number. */
|
|
21
|
+
maxConnections?: number;
|
|
22
|
+
/**
|
|
23
|
+
* A short text for it, such as `yes` and `no` on the ways out of a decision: the `card` kind writes it in a row the
|
|
24
|
+
* port stands beside; on any kind it is the port's tip.
|
|
25
|
+
*/
|
|
26
|
+
label?: string;
|
|
27
|
+
}
|