mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-11-05 21:34:14 +01:00
revert import changes
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
import type { Positions, SVG } from '../diagram-api/types.js';
|
import type { Positions, SVG } from '../diagram-api/types.js';
|
||||||
import type { InternalHelpers } from '../internals.js';
|
|
||||||
import { internalHelpers } from '../internals.js';
|
|
||||||
import { log } from '../logger.js';
|
import { log } from '../logger.js';
|
||||||
|
import { internalHelpers } from '../internals.js';
|
||||||
|
import type { InternalHelpers } from '../internals.js';
|
||||||
import type { LayoutData } from './types.js';
|
import type { LayoutData } from './types.js';
|
||||||
|
|
||||||
export interface RenderOptions {
|
export interface RenderOptions {
|
||||||
|
|||||||
@@ -1,13 +1,12 @@
|
|||||||
// import { curveBasis, curveLinear, curveCardinal, line, select } from 'd3';
|
|
||||||
import { curveBasis, line, select } from 'd3';
|
|
||||||
import rough from 'roughjs';
|
|
||||||
import { getConfig } from '../../diagram-api/diagramAPI.js';
|
import { getConfig } from '../../diagram-api/diagramAPI.js';
|
||||||
import { evaluate } from '../../diagrams/common/common.js';
|
import { evaluate } from '../../diagrams/common/common.js';
|
||||||
import { log } from '../../logger.js';
|
import { log } from '../../logger.js';
|
||||||
|
import { createText } from '../createText.js';
|
||||||
import utils from '../../utils.js';
|
import utils from '../../utils.js';
|
||||||
import { getLineFunctionsWithOffset } from '../../utils/lineWithOffset.js';
|
import { getLineFunctionsWithOffset } from '../../utils/lineWithOffset.js';
|
||||||
import { getSubGraphTitleMargins } from '../../utils/subGraphTitleMargins.js';
|
import { getSubGraphTitleMargins } from '../../utils/subGraphTitleMargins.js';
|
||||||
import { createText } from '../createText.js';
|
import { curveBasis, line, select } from 'd3';
|
||||||
|
import rough from 'roughjs';
|
||||||
import createLabel from './createLabel.js';
|
import createLabel from './createLabel.js';
|
||||||
import { addEdgeMarkers } from './edgeMarker.ts';
|
import { addEdgeMarkers } from './edgeMarker.ts';
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,9 @@
|
|||||||
import rough from 'roughjs';
|
|
||||||
import { log } from '../../../logger.js';
|
import { log } from '../../../logger.js';
|
||||||
import {
|
import { updateNodeBounds, getNodeClasses } from './util.js';
|
||||||
styles2String,
|
|
||||||
userNodeOverrides,
|
|
||||||
} from '../../rendering-elements/shapes/handDrawnShapeStyles.js';
|
|
||||||
import type { Node } from '../../types.d.ts';
|
|
||||||
import intersect from '../intersect/index.js';
|
import intersect from '../intersect/index.js';
|
||||||
import { getNodeClasses, updateNodeBounds } from './util.js';
|
import type { Node } from '../../types.d.ts';
|
||||||
|
import { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';
|
||||||
|
import rough from 'roughjs';
|
||||||
|
|
||||||
export const anchor = (parent: SVGAElement, node: Node): Promise<SVGAElement> => {
|
export const anchor = (parent: SVGAElement, node: Node): Promise<SVGAElement> => {
|
||||||
const { labelStyles } = styles2String(node);
|
const { labelStyles } = styles2String(node);
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import rough from 'roughjs';
|
import { labelHelper, updateNodeBounds, getNodeClasses, createPathFromPoints } from './util.js';
|
||||||
import type { Node } from '../../types.d.ts';
|
|
||||||
import intersect from '../intersect/index.js';
|
import intersect from '../intersect/index.js';
|
||||||
|
import type { Node } from '../../types.d.ts';
|
||||||
import { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';
|
import { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';
|
||||||
import { createPathFromPoints, getNodeClasses, labelHelper, updateNodeBounds } from './util.js';
|
import rough from 'roughjs';
|
||||||
|
|
||||||
function generateArcPoints(
|
function generateArcPoints(
|
||||||
x1: number,
|
x1: number,
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import rough from 'roughjs';
|
import { labelHelper, updateNodeBounds, getNodeClasses } from './util.js';
|
||||||
import type { Node } from '../../types.d.ts';
|
|
||||||
import intersect from '../intersect/index.js';
|
import intersect from '../intersect/index.js';
|
||||||
|
import type { Node } from '../../types.d.ts';
|
||||||
import { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';
|
import { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';
|
||||||
import { getNodeClasses, labelHelper, updateNodeBounds } from './util.js';
|
import rough from 'roughjs';
|
||||||
|
|
||||||
import { insertPolygonShape } from './insertPolygonShape.js';
|
import { insertPolygonShape } from './insertPolygonShape.js';
|
||||||
import { createPathFromPoints } from './util.js';
|
import { createPathFromPoints } from './util.js';
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import type { SVG } from '../../../diagram-api/types.js';
|
|
||||||
import type { Node } from '../../types.js';
|
|
||||||
import intersect from '../intersect/index.js';
|
import intersect from '../intersect/index.js';
|
||||||
|
import type { Node } from '../../types.js';
|
||||||
|
import type { SVG } from '../../../diagram-api/types.js';
|
||||||
// @ts-ignore TODO: Fix rough typings
|
// @ts-ignore TODO: Fix rough typings
|
||||||
import rough from 'roughjs';
|
import rough from 'roughjs';
|
||||||
import { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';
|
import { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import rough from 'roughjs';
|
import { labelHelper, updateNodeBounds, getNodeClasses, createPathFromPoints } from './util.js';
|
||||||
import type { Node } from '../../types.d.ts';
|
|
||||||
import intersect from '../intersect/index.js';
|
import intersect from '../intersect/index.js';
|
||||||
|
import type { Node } from '../../types.d.ts';
|
||||||
import { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';
|
import { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';
|
||||||
import { createPathFromPoints, getNodeClasses, labelHelper, updateNodeBounds } from './util.js';
|
import rough from 'roughjs';
|
||||||
|
|
||||||
function generateCirclePoints(
|
function generateCirclePoints(
|
||||||
centerX: number,
|
centerX: number,
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import rough from 'roughjs';
|
import { labelHelper, updateNodeBounds, getNodeClasses, createPathFromPoints } from './util.js';
|
||||||
import type { Node } from '../../types.d.ts';
|
|
||||||
import intersect from '../intersect/index.js';
|
import intersect from '../intersect/index.js';
|
||||||
|
import type { Node } from '../../types.d.ts';
|
||||||
import { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';
|
import { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';
|
||||||
import { createPathFromPoints, getNodeClasses, labelHelper, updateNodeBounds } from './util.js';
|
import rough from 'roughjs';
|
||||||
|
|
||||||
function generateCirclePoints(
|
function generateCirclePoints(
|
||||||
centerX: number,
|
centerX: number,
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import rough from 'roughjs';
|
import { labelHelper, updateNodeBounds, getNodeClasses, createPathFromPoints } from './util.js';
|
||||||
import type { Node } from '../../types.d.ts';
|
|
||||||
import intersect from '../intersect/index.js';
|
import intersect from '../intersect/index.js';
|
||||||
|
import type { Node } from '../../types.d.ts';
|
||||||
import { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';
|
import { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';
|
||||||
import { createPathFromPoints, getNodeClasses, labelHelper, updateNodeBounds } from './util.js';
|
import rough from 'roughjs';
|
||||||
|
|
||||||
function generateCirclePoints(
|
function generateCirclePoints(
|
||||||
centerX: number,
|
centerX: number,
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import rough from 'roughjs';
|
import { labelHelper, updateNodeBounds, getNodeClasses, createPathFromPoints } from './util.js';
|
||||||
import type { Node } from '../../types.d.ts';
|
|
||||||
import intersect from '../intersect/index.js';
|
import intersect from '../intersect/index.js';
|
||||||
|
import type { Node } from '../../types.d.ts';
|
||||||
import { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';
|
import { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';
|
||||||
import { createPathFromPoints, getNodeClasses, labelHelper, updateNodeBounds } from './util.js';
|
import rough from 'roughjs';
|
||||||
|
|
||||||
function createCurvedTrapezoidPathD(
|
function createCurvedTrapezoidPathD(
|
||||||
x: number,
|
x: number,
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import rough from 'roughjs';
|
import { labelHelper, updateNodeBounds, getNodeClasses } from './util.js';
|
||||||
import { getConfig } from '../../../config.js';
|
|
||||||
import type { Node } from '../../types.js';
|
|
||||||
import intersect from '../intersect/index.js';
|
import intersect from '../intersect/index.js';
|
||||||
|
import type { Node } from '../../types.js';
|
||||||
import { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';
|
import { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';
|
||||||
import { getNodeClasses, labelHelper, updateNodeBounds } from './util.js';
|
import { getConfig } from '../../../config.js';
|
||||||
|
import rough from 'roughjs';
|
||||||
|
|
||||||
export const createCylinderPathD = (
|
export const createCylinderPathD = (
|
||||||
x: number,
|
x: number,
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import rough from 'roughjs';
|
import { labelHelper, updateNodeBounds, getNodeClasses, createPathFromPoints } from './util.js';
|
||||||
import type { Node } from '../../types.d.ts';
|
|
||||||
import intersect from '../intersect/index.js';
|
import intersect from '../intersect/index.js';
|
||||||
|
import type { Node } from '../../types.d.ts';
|
||||||
import { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';
|
import { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';
|
||||||
import { createPathFromPoints, getNodeClasses, labelHelper, updateNodeBounds } from './util.js';
|
import rough from 'roughjs';
|
||||||
|
|
||||||
export const dividedRectangle = async (parent: SVGAElement, node: Node) => {
|
export const dividedRectangle = async (parent: SVGAElement, node: Node) => {
|
||||||
const { labelStyles, nodeStyles } = styles2String(node);
|
const { labelStyles, nodeStyles } = styles2String(node);
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import rough from 'roughjs';
|
import { labelHelper, updateNodeBounds, getNodeClasses } from './util.js';
|
||||||
import type { Node } from '../../types.d.ts';
|
|
||||||
import intersect from '../intersect/index.js';
|
import intersect from '../intersect/index.js';
|
||||||
|
import type { Node } from '../../types.d.ts';
|
||||||
import { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';
|
import { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';
|
||||||
import { getNodeClasses, labelHelper, updateNodeBounds } from './util.js';
|
import rough from 'roughjs';
|
||||||
|
|
||||||
export const createCylinderPathD = (
|
export const createCylinderPathD = (
|
||||||
x: number,
|
x: number,
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
import rough from 'roughjs';
|
|
||||||
import { log } from '../../../logger.js';
|
import { log } from '../../../logger.js';
|
||||||
import type { Node } from '../../types.d.ts';
|
import { labelHelper, updateNodeBounds, getNodeClasses } from './util.js';
|
||||||
import intersect from '../intersect/index.js';
|
import intersect from '../intersect/index.js';
|
||||||
|
import type { Node } from '../../types.d.ts';
|
||||||
import { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';
|
import { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';
|
||||||
import { createPathFromPoints, getNodeClasses, labelHelper, updateNodeBounds } from './util.js';
|
import rough from 'roughjs';
|
||||||
|
import { createPathFromPoints } from './util.js';
|
||||||
|
|
||||||
export const flippedTriangle = async (parent: SVGAElement, node: Node): Promise<SVGAElement> => {
|
export const flippedTriangle = async (parent: SVGAElement, node: Node): Promise<SVGAElement> => {
|
||||||
const { labelStyles, nodeStyles } = styles2String(node);
|
const { labelStyles, nodeStyles } = styles2String(node);
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import rough from 'roughjs';
|
|
||||||
import type { SVG } from '../../../diagram-api/types.js';
|
|
||||||
import type { Node } from '../../types.d.ts';
|
|
||||||
import intersect from '../intersect/index.js';
|
|
||||||
import { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';
|
|
||||||
import { getNodeClasses, updateNodeBounds } from './util.js';
|
import { getNodeClasses, updateNodeBounds } from './util.js';
|
||||||
|
import intersect from '../intersect/index.js';
|
||||||
|
import type { Node } from '../../types.js';
|
||||||
|
import type { SVG } from '../../../diagram-api/types.js';
|
||||||
|
import rough from 'roughjs';
|
||||||
|
import { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';
|
||||||
|
|
||||||
export const forkJoin = (parent: SVG, node: Node, dir: string) => {
|
export const forkJoin = (parent: SVG, node: Node, dir: string) => {
|
||||||
const { nodeStyles } = styles2String(node);
|
const { nodeStyles } = styles2String(node);
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import rough from 'roughjs';
|
|
||||||
import { log } from '../../../logger.js';
|
import { log } from '../../../logger.js';
|
||||||
import type { Node } from '../../types.d.ts';
|
import { labelHelper, updateNodeBounds, getNodeClasses } from './util.js';
|
||||||
import intersect from '../intersect/index.js';
|
import intersect from '../intersect/index.js';
|
||||||
|
import type { Node } from '../../types.d.ts';
|
||||||
import { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';
|
import { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';
|
||||||
import { getNodeClasses, labelHelper, updateNodeBounds } from './util.js';
|
import rough from 'roughjs';
|
||||||
|
|
||||||
function createHalfRoundedRectShapePathD(h: number, w: number, rx: number, ry: number) {
|
function createHalfRoundedRectShapePathD(h: number, w: number, rx: number, ry: number) {
|
||||||
return ` M ${w} ${h}
|
return ` M ${w} ${h}
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
import rough from 'roughjs';
|
|
||||||
import type { SVG } from '../../../diagram-api/types.js';
|
|
||||||
import { log } from '../../../logger.js';
|
import { log } from '../../../logger.js';
|
||||||
import type { Node } from '../../types.d.ts';
|
|
||||||
import intersect from '../intersect/index.js';
|
|
||||||
import { userNodeOverrides } from './handDrawnShapeStyles.js';
|
|
||||||
import { createPathFromPoints, getNodeClasses, updateNodeBounds } from './util.js';
|
import { createPathFromPoints, getNodeClasses, updateNodeBounds } from './util.js';
|
||||||
|
import type { Node } from '../../types.d.ts';
|
||||||
|
import type { SVG } from '../../../diagram-api/types.js';
|
||||||
|
import { userNodeOverrides } from './handDrawnShapeStyles.js';
|
||||||
|
import rough from 'roughjs';
|
||||||
|
import intersect from '../intersect/index.js';
|
||||||
|
|
||||||
export const lightningBolt = (parent: SVG, node: Node) => {
|
export const lightningBolt = (parent: SVG, node: Node) => {
|
||||||
node.label = '';
|
node.label = '';
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import rough from 'roughjs';
|
import { labelHelper, updateNodeBounds, getNodeClasses } from './util.js';
|
||||||
import type { Node } from '../../types.d.ts';
|
|
||||||
import intersect from '../intersect/index.js';
|
import intersect from '../intersect/index.js';
|
||||||
|
import type { Node } from '../../types.d.ts';
|
||||||
|
import rough from 'roughjs';
|
||||||
import { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';
|
import { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';
|
||||||
import { getNodeClasses, labelHelper, updateNodeBounds } from './util.js';
|
|
||||||
|
|
||||||
export const createCylinderPathWithoutInnerArcD = (
|
export const createCylinderPathWithoutInnerArcD = (
|
||||||
w: number,
|
w: number,
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
import rough from 'roughjs';
|
|
||||||
import type { Node } from '../../types.d.ts';
|
|
||||||
import intersect from '../intersect/index.js';
|
|
||||||
import { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';
|
|
||||||
import {
|
import {
|
||||||
createPathFromPoints,
|
|
||||||
generateFullSineWavePoints,
|
|
||||||
getNodeClasses,
|
|
||||||
labelHelper,
|
labelHelper,
|
||||||
updateNodeBounds,
|
updateNodeBounds,
|
||||||
|
getNodeClasses,
|
||||||
|
generateFullSineWavePoints,
|
||||||
|
createPathFromPoints,
|
||||||
} from './util.js';
|
} from './util.js';
|
||||||
|
import intersect from '../intersect/index.js';
|
||||||
|
import type { Node } from '../../types.d.ts';
|
||||||
|
import rough from 'roughjs';
|
||||||
|
import { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';
|
||||||
|
|
||||||
export const linedWaveEdgedRect = async (parent: SVGAElement, node: Node) => {
|
export const linedWaveEdgedRect = async (parent: SVGAElement, node: Node) => {
|
||||||
const { labelStyles, nodeStyles } = styles2String(node);
|
const { labelStyles, nodeStyles } = styles2String(node);
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import rough from 'roughjs';
|
import { labelHelper, getNodeClasses, updateNodeBounds, createPathFromPoints } from './util.js';
|
||||||
import type { Node } from '../../types.d.ts';
|
import type { Node } from '../../types.d.ts';
|
||||||
import intersect from '../intersect/index.js';
|
|
||||||
import { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';
|
import { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';
|
||||||
import { createPathFromPoints, getNodeClasses, labelHelper, updateNodeBounds } from './util.js';
|
import rough from 'roughjs';
|
||||||
|
import intersect from '../intersect/index.js';
|
||||||
|
|
||||||
export const multiRect = async (parent: SVGAElement, node: Node) => {
|
export const multiRect = async (parent: SVGAElement, node: Node) => {
|
||||||
const { labelStyles, nodeStyles } = styles2String(node);
|
const { labelStyles, nodeStyles } = styles2String(node);
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
import rough from 'roughjs';
|
|
||||||
import type { Node } from '../../types.d.ts';
|
|
||||||
import intersect from '../intersect/index.js';
|
|
||||||
import { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';
|
|
||||||
import {
|
import {
|
||||||
createPathFromPoints,
|
|
||||||
generateFullSineWavePoints,
|
|
||||||
getNodeClasses,
|
|
||||||
labelHelper,
|
labelHelper,
|
||||||
updateNodeBounds,
|
updateNodeBounds,
|
||||||
|
getNodeClasses,
|
||||||
|
createPathFromPoints,
|
||||||
|
generateFullSineWavePoints,
|
||||||
} from './util.js';
|
} from './util.js';
|
||||||
|
import intersect from '../intersect/index.js';
|
||||||
|
import type { Node } from '../../types.d.ts';
|
||||||
|
import rough from 'roughjs';
|
||||||
|
import { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';
|
||||||
|
|
||||||
export const multiWaveEdgedRectangle = async (parent: SVGAElement, node: Node) => {
|
export const multiWaveEdgedRectangle = async (parent: SVGAElement, node: Node) => {
|
||||||
const { labelStyles, nodeStyles } = styles2String(node);
|
const { labelStyles, nodeStyles } = styles2String(node);
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import rough from 'roughjs';
|
|
||||||
import { log } from '../../../logger.js';
|
import { log } from '../../../logger.js';
|
||||||
import type { Node } from '../../types.js';
|
|
||||||
import intersect from '../intersect/index.js';
|
|
||||||
import { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';
|
|
||||||
import { getNodeClasses, labelHelper, updateNodeBounds } from './util.js';
|
import { getNodeClasses, labelHelper, updateNodeBounds } from './util.js';
|
||||||
|
import intersect from '../intersect/index.js';
|
||||||
|
import type { Node } from '../../types.js';
|
||||||
|
import rough from 'roughjs';
|
||||||
|
import { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';
|
||||||
|
|
||||||
export const note = async (parent: SVGAElement, node: Node) => {
|
export const note = async (parent: SVGAElement, node: Node) => {
|
||||||
const { labelStyles, nodeStyles } = styles2String(node);
|
const { labelStyles, nodeStyles } = styles2String(node);
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import rough from 'roughjs';
|
import { labelHelper, updateNodeBounds, getNodeClasses } from './util.js';
|
||||||
import type { Node } from '../../types.d.ts';
|
|
||||||
import intersect from '../intersect/index.js';
|
import intersect from '../intersect/index.js';
|
||||||
|
import type { Node } from '../../types.d.ts';
|
||||||
import { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';
|
import { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';
|
||||||
import { getNodeClasses, labelHelper, updateNodeBounds } from './util.js';
|
import rough from 'roughjs';
|
||||||
|
|
||||||
export const shadedProcess = async (parent: SVGAElement, node: Node) => {
|
export const shadedProcess = async (parent: SVGAElement, node: Node) => {
|
||||||
const { labelStyles, nodeStyles } = styles2String(node);
|
const { labelStyles, nodeStyles } = styles2String(node);
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import rough from 'roughjs';
|
import { labelHelper, updateNodeBounds, getNodeClasses, createPathFromPoints } from './util.js';
|
||||||
import type { Node } from '../../types.d.ts';
|
|
||||||
import intersect from '../intersect/index.js';
|
import intersect from '../intersect/index.js';
|
||||||
|
import type { Node } from '../../types.d.ts';
|
||||||
import { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';
|
import { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';
|
||||||
import { createPathFromPoints, getNodeClasses, labelHelper, updateNodeBounds } from './util.js';
|
import rough from 'roughjs';
|
||||||
|
|
||||||
export const slopedRect = async (parent: SVGAElement, node: Node) => {
|
export const slopedRect = async (parent: SVGAElement, node: Node) => {
|
||||||
const { labelStyles, nodeStyles } = styles2String(node);
|
const { labelStyles, nodeStyles } = styles2String(node);
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
import rough from 'roughjs';
|
|
||||||
import { getConfig } from '../../../diagram-api/diagramAPI.js';
|
|
||||||
import type { SVG } from '../../../mermaid.js';
|
|
||||||
import type { Node } from '../../types.js';
|
|
||||||
import intersect from '../intersect/index.js';
|
|
||||||
import { solidStateFill, styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';
|
|
||||||
import { updateNodeBounds } from './util.js';
|
import { updateNodeBounds } from './util.js';
|
||||||
|
import intersect from '../intersect/index.js';
|
||||||
|
import type { Node } from '../../types.js';
|
||||||
|
import type { SVG } from '../../../diagram-api/types.js';
|
||||||
|
import rough from 'roughjs';
|
||||||
|
import { solidStateFill, styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';
|
||||||
|
import { getConfig } from '../../../diagram-api/diagramAPI.js';
|
||||||
|
|
||||||
export const stateEnd = (parent: SVG, node: Node) => {
|
export const stateEnd = (parent: SVG, node: Node) => {
|
||||||
const { labelStyles, nodeStyles } = styles2String(node);
|
const { labelStyles, nodeStyles } = styles2String(node);
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
import rough from 'roughjs';
|
import { labelHelper, updateNodeBounds, getNodeClasses } from './util.js';
|
||||||
import { getConfig } from '../../../config.js';
|
|
||||||
import type { Node } from '../../types.js';
|
|
||||||
import intersect from '../intersect/index.js';
|
import intersect from '../intersect/index.js';
|
||||||
|
import type { Node } from '../../types.js';
|
||||||
import { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';
|
import { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';
|
||||||
|
import rough from 'roughjs';
|
||||||
import { insertPolygonShape } from './insertPolygonShape.js';
|
import { insertPolygonShape } from './insertPolygonShape.js';
|
||||||
import { getNodeClasses, labelHelper, updateNodeBounds } from './util.js';
|
import { getConfig } from '../../../config.js';
|
||||||
|
|
||||||
export const createSubroutinePathD = (
|
export const createSubroutinePathD = (
|
||||||
x: number,
|
x: number,
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import rough from 'roughjs';
|
import { labelHelper, getNodeClasses, updateNodeBounds, createPathFromPoints } from './util.js';
|
||||||
import type { Node } from '../../types.d.ts';
|
import type { Node } from '../../types.d.ts';
|
||||||
import intersect from '../intersect/index.js';
|
|
||||||
import { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';
|
import { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';
|
||||||
import { createPathFromPoints, getNodeClasses, labelHelper, updateNodeBounds } from './util.js';
|
import rough from 'roughjs';
|
||||||
|
import intersect from '../intersect/index.js';
|
||||||
|
|
||||||
export const taggedRect = async (parent: SVGAElement, node: Node) => {
|
export const taggedRect = async (parent: SVGAElement, node: Node) => {
|
||||||
const { labelStyles, nodeStyles } = styles2String(node);
|
const { labelStyles, nodeStyles } = styles2String(node);
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
import rough from 'roughjs';
|
|
||||||
import type { Node } from '../../types.d.ts';
|
|
||||||
import intersect from '../intersect/index.js';
|
|
||||||
import { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';
|
|
||||||
import {
|
import {
|
||||||
createPathFromPoints,
|
|
||||||
generateFullSineWavePoints,
|
|
||||||
getNodeClasses,
|
|
||||||
labelHelper,
|
labelHelper,
|
||||||
updateNodeBounds,
|
updateNodeBounds,
|
||||||
|
getNodeClasses,
|
||||||
|
generateFullSineWavePoints,
|
||||||
|
createPathFromPoints,
|
||||||
} from './util.js';
|
} from './util.js';
|
||||||
|
import intersect from '../intersect/index.js';
|
||||||
|
import type { Node } from '../../types.d.ts';
|
||||||
|
import rough from 'roughjs';
|
||||||
|
import { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';
|
||||||
|
|
||||||
export const taggedWaveEdgedRectangle = async (parent: SVGAElement, node: Node) => {
|
export const taggedWaveEdgedRectangle = async (parent: SVGAElement, node: Node) => {
|
||||||
const { labelStyles, nodeStyles } = styles2String(node);
|
const { labelStyles, nodeStyles } = styles2String(node);
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import type { Node } from '../../types.d.ts';
|
import { labelHelper, updateNodeBounds, getNodeClasses } from './util.js';
|
||||||
import intersect from '../intersect/index.js';
|
import intersect from '../intersect/index.js';
|
||||||
|
import type { Node } from '../../types.d.ts';
|
||||||
import { styles2String } from './handDrawnShapeStyles.js';
|
import { styles2String } from './handDrawnShapeStyles.js';
|
||||||
import { getNodeClasses, labelHelper, updateNodeBounds } from './util.js';
|
|
||||||
|
|
||||||
export async function text(parent: SVGAElement, node: Node): Promise<SVGAElement> {
|
export async function text(parent: SVGAElement, node: Node): Promise<SVGAElement> {
|
||||||
const { labelStyles, nodeStyles } = styles2String(node);
|
const { labelStyles, nodeStyles } = styles2String(node);
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import rough from 'roughjs';
|
import { labelHelper, getNodeClasses, updateNodeBounds } from './util.js';
|
||||||
import type { Node } from '../../types.d.ts';
|
import type { Node } from '../../types.d.ts';
|
||||||
import intersect from '../intersect/index.js';
|
|
||||||
import { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';
|
import { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';
|
||||||
import { getNodeClasses, labelHelper, updateNodeBounds } from './util.js';
|
import rough from 'roughjs';
|
||||||
|
import intersect from '../intersect/index.js';
|
||||||
|
|
||||||
function createCylinderPathD(rx: number, ry: number, w: number, h: number) {
|
function createCylinderPathD(rx: number, ry: number, w: number, h: number) {
|
||||||
return `M ${w / 2} ${-h / 2}
|
return `M ${w / 2} ${-h / 2}
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import rough from 'roughjs';
|
import { labelHelper, updateNodeBounds, getNodeClasses, createPathFromPoints } from './util.js';
|
||||||
import type { Node } from '../../types.d.ts';
|
|
||||||
import intersect from '../intersect/index.js';
|
import intersect from '../intersect/index.js';
|
||||||
|
import type { Node } from '../../types.d.ts';
|
||||||
import { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';
|
import { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';
|
||||||
import { createPathFromPoints, getNodeClasses, labelHelper, updateNodeBounds } from './util.js';
|
import rough from 'roughjs';
|
||||||
|
|
||||||
export const trapezoidalPentagon = async (parent: SVGAElement, node: Node) => {
|
export const trapezoidalPentagon = async (parent: SVGAElement, node: Node) => {
|
||||||
const { labelStyles, nodeStyles } = styles2String(node);
|
const { labelStyles, nodeStyles } = styles2String(node);
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
import rough from 'roughjs';
|
|
||||||
import { getConfig } from '../../../diagram-api/diagramAPI.js';
|
|
||||||
import { evaluate } from '../../../diagrams/common/common.js';
|
|
||||||
import { log } from '../../../logger.js';
|
import { log } from '../../../logger.js';
|
||||||
import type { Node } from '../../types.d.ts';
|
import { labelHelper, updateNodeBounds, getNodeClasses } from './util.js';
|
||||||
import intersect from '../intersect/index.js';
|
import intersect from '../intersect/index.js';
|
||||||
|
import type { Node } from '../../types.d.ts';
|
||||||
import { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';
|
import { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';
|
||||||
import { createPathFromPoints, getNodeClasses, labelHelper, updateNodeBounds } from './util.js';
|
import rough from 'roughjs';
|
||||||
|
import { createPathFromPoints } from './util.js';
|
||||||
|
import { evaluate } from '../../../diagrams/common/common.js';
|
||||||
|
import { getConfig } from '../../../diagram-api/diagramAPI.js';
|
||||||
|
|
||||||
export const triangle = async (parent: SVGAElement, node: Node): Promise<SVGAElement> => {
|
export const triangle = async (parent: SVGAElement, node: Node): Promise<SVGAElement> => {
|
||||||
const { labelStyles, nodeStyles } = styles2String(node);
|
const { labelStyles, nodeStyles } = styles2String(node);
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
import rough from 'roughjs';
|
|
||||||
import type { Node } from '../../types.d.ts';
|
|
||||||
import intersect from '../intersect/index.js';
|
|
||||||
import { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';
|
|
||||||
import {
|
import {
|
||||||
createPathFromPoints,
|
|
||||||
generateFullSineWavePoints,
|
|
||||||
getNodeClasses,
|
|
||||||
labelHelper,
|
labelHelper,
|
||||||
updateNodeBounds,
|
updateNodeBounds,
|
||||||
|
getNodeClasses,
|
||||||
|
generateFullSineWavePoints,
|
||||||
|
createPathFromPoints,
|
||||||
} from './util.js';
|
} from './util.js';
|
||||||
|
import intersect from '../intersect/index.js';
|
||||||
|
import type { Node } from '../../types.d.ts';
|
||||||
|
import rough from 'roughjs';
|
||||||
|
import { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';
|
||||||
|
|
||||||
export const waveEdgedRectangle = async (parent: SVGAElement, node: Node) => {
|
export const waveEdgedRectangle = async (parent: SVGAElement, node: Node) => {
|
||||||
const { labelStyles, nodeStyles } = styles2String(node);
|
const { labelStyles, nodeStyles } = styles2String(node);
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
import rough from 'roughjs';
|
|
||||||
import type { Node } from '../../types.d.ts';
|
|
||||||
import intersect from '../intersect/index.js';
|
|
||||||
import { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';
|
|
||||||
import {
|
import {
|
||||||
createPathFromPoints,
|
|
||||||
generateFullSineWavePoints,
|
|
||||||
getNodeClasses,
|
|
||||||
labelHelper,
|
labelHelper,
|
||||||
updateNodeBounds,
|
updateNodeBounds,
|
||||||
|
getNodeClasses,
|
||||||
|
createPathFromPoints,
|
||||||
|
generateFullSineWavePoints,
|
||||||
} from './util.js';
|
} from './util.js';
|
||||||
|
import intersect from '../intersect/index.js';
|
||||||
|
import type { Node } from '../../types.d.ts';
|
||||||
|
import { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';
|
||||||
|
import rough from 'roughjs';
|
||||||
|
|
||||||
export const waveRectangle = async (parent: SVGAElement, node: Node) => {
|
export const waveRectangle = async (parent: SVGAElement, node: Node) => {
|
||||||
const { labelStyles, nodeStyles } = styles2String(node);
|
const { labelStyles, nodeStyles } = styles2String(node);
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import rough from 'roughjs';
|
import { labelHelper, getNodeClasses, updateNodeBounds, createPathFromPoints } from './util.js';
|
||||||
import type { Node } from '../../types.d.ts';
|
import type { Node } from '../../types.d.ts';
|
||||||
import intersect from '../intersect/index.js';
|
|
||||||
import { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';
|
import { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';
|
||||||
import { createPathFromPoints, getNodeClasses, labelHelper, updateNodeBounds } from './util.js';
|
import rough from 'roughjs';
|
||||||
|
import intersect from '../intersect/index.js';
|
||||||
|
|
||||||
export const windowPane = async (parent: SVGAElement, node: Node) => {
|
export const windowPane = async (parent: SVGAElement, node: Node) => {
|
||||||
const { labelStyles, nodeStyles } = styles2String(node);
|
const { labelStyles, nodeStyles } = styles2String(node);
|
||||||
|
|||||||
Reference in New Issue
Block a user