mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-28 07:03:17 +08:00
replace mermaid/dist with relative paths
This commit is contained in:
parent
6a3f1d194a
commit
571dfda629
@ -1,4 +1,4 @@
|
||||
import { unknownIcon } from 'mermaid/dist/rendering-util/icons.js';
|
||||
import { unknownIcon } from '../../rendering-util/icons.js';
|
||||
import type { IconifyJSON } from '@iconify/types';
|
||||
|
||||
const wrapIcon = (icon: string) => {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { registerIconPacks } from 'mermaid/dist/rendering-util/icons.js';
|
||||
import { registerIconPacks } from '../../rendering-util/icons.js';
|
||||
import type { Position } from 'cytoscape';
|
||||
import cytoscape from 'cytoscape';
|
||||
import type { FcoseLayoutOptions } from 'cytoscape-fcose';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { getIconSVG } from 'mermaid/dist/rendering-util/icons.js';
|
||||
import { getIconSVG } from '../../rendering-util/icons.js';
|
||||
import type cytoscape from 'cytoscape';
|
||||
import { getConfig } from '../../diagram-api/diagramAPI.js';
|
||||
import { createText } from '../../rendering-util/createText.js';
|
||||
|
@ -2,7 +2,7 @@
|
||||
* Web page integration module for the mermaid framework. It uses the mermaidAPI for mermaid
|
||||
* functionality and to render the diagrams to svg code!
|
||||
*/
|
||||
import { registerIconPacks } from 'mermaid/dist/rendering-util/icons.js';
|
||||
import { registerIconPacks } from './rendering-util/icons.js';
|
||||
import { dedent } from 'ts-dedent';
|
||||
import type { MermaidConfig } from './config.type.js';
|
||||
import { detectType, registerLazyLoadedDiagrams } from './diagram-api/detectType.js';
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
// @ts-nocheck TODO: Fix types
|
||||
import { getConfig } from 'mermaid/dist/diagram-api/diagramAPI.js';
|
||||
import common, { hasKatex, renderKatex } from 'mermaid/dist/diagrams/common/common.js';
|
||||
import { getConfig } from '../diagram-api/diagramAPI.js';
|
||||
import common, { hasKatex, renderKatex } from '../diagrams/common/common.js';
|
||||
import { select } from 'd3';
|
||||
import type { MermaidConfig } from '../config.type.js';
|
||||
import type { SVGGroup } from '../diagram-api/types.js';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { log } from 'mermaid/dist/logger.js';
|
||||
import { log } from '../logger.js';
|
||||
import type { ExtendedIconifyIcon, IconifyIcon, IconifyJSON } from '@iconify/types';
|
||||
import type { IconifyIconCustomisations } from '@iconify/utils';
|
||||
import { getIconData, iconToHTML, iconToSVG, replaceIDs, stringToIcon } from '@iconify/utils';
|
||||
|
@ -23,7 +23,7 @@ import {
|
||||
insertEdge,
|
||||
clear as clearEdges,
|
||||
} from '../../rendering-elements/edges.js';
|
||||
import { log } from 'mermaid/dist/logger.js';
|
||||
import { log } from '../../../logger.js';
|
||||
import { getSubGraphTitleMargins } from '../../../utils/subGraphTitleMargins.js';
|
||||
import { getConfig } from '../../../diagram-api/diagramAPI.js';
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/** Decorates with functions required by mermaids dagre-wrapper. */
|
||||
import { log } from 'mermaid/dist/logger.js';
|
||||
import { log } from '../../../logger.js';
|
||||
import * as graphlib from 'dagre-d3-es/src/graphlib/index.js';
|
||||
import * as graphlibJson from 'dagre-d3-es/src/graphlib/json.js';
|
||||
|
||||
|
@ -6,7 +6,7 @@ import {
|
||||
extractDescendants,
|
||||
sortNodesByHierarchy,
|
||||
} from './mermaid-graphlib.js';
|
||||
import { setLogLevel, log } from 'mermaid/dist/logger.js';
|
||||
import { setLogLevel, log } from '../../../logger.js';
|
||||
|
||||
describe('Graphlib decorations', () => {
|
||||
let g;
|
||||
|
@ -1,7 +1,7 @@
|
||||
import type { SVG } from 'mermaid/dist/diagram-api/types.js';
|
||||
import type { InternalHelpers } from 'mermaid/dist/internals.js';
|
||||
import { internalHelpers } from 'mermaid/dist/internals.js';
|
||||
import { log } from 'mermaid/dist/logger.js';
|
||||
import type { SVG } from '../diagram-api/types.js';
|
||||
import type { InternalHelpers } from '../internals.js';
|
||||
import { internalHelpers } from '../internals.js';
|
||||
import { log } from '../logger.js';
|
||||
import type { LayoutData } from './types.js';
|
||||
|
||||
export interface RenderOptions {
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { getConfig } from 'mermaid/dist/diagram-api/diagramAPI.js';
|
||||
import { evaluate } from 'mermaid/dist/diagrams/common/common.js';
|
||||
import { log } from 'mermaid/dist/logger.js';
|
||||
import { getSubGraphTitleMargins } from 'mermaid/dist/utils/subGraphTitleMargins.js';
|
||||
import { getConfig } from '../../diagram-api/diagramAPI.js';
|
||||
import { evaluate } from '../../diagrams/common/common.js';
|
||||
import { log } from '../../logger.js';
|
||||
import { getSubGraphTitleMargins } from '../../utils/subGraphTitleMargins.js';
|
||||
import { select } from 'd3';
|
||||
import rough from 'roughjs';
|
||||
import { createText } from '../createText.ts';
|
||||
@ -11,7 +11,7 @@ import { createRoundedRectPathD } from './shapes/roundedRectPath.ts';
|
||||
import {
|
||||
styles2String,
|
||||
userNodeOverrides,
|
||||
} from 'mermaid/dist/rendering-util/rendering-elements/shapes/handDrawnShapeStyles.js';
|
||||
} from './shapes/handDrawnShapeStyles.js';
|
||||
|
||||
const rect = async (parent, node) => {
|
||||
log.info('Creating subgraph rect for ', node.id, node);
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { select } from 'd3';
|
||||
import { log } from 'mermaid/dist/logger.js';
|
||||
import { getConfig } from 'mermaid/dist/diagram-api/diagramAPI.js';
|
||||
import common, { evaluate, renderKatex, hasKatex } from 'mermaid/dist/diagrams/common/common.js';
|
||||
import { decodeEntities } from 'mermaid/dist/utils.js';
|
||||
import { log } from '../../logger.js';
|
||||
import { getConfig } from '../../diagram-api/diagramAPI.js';
|
||||
import common, { evaluate, renderKatex, hasKatex } from '../../diagrams/common/common.js';
|
||||
import { decodeEntities } from '../../utils.js';
|
||||
|
||||
/**
|
||||
* @param dom
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* eslint-disable @typescript-eslint/unbound-method */
|
||||
import type { SVG } from 'mermaid/dist/diagram-api/types.js';
|
||||
import type { SVG } from '../../diagram-api/types.js';
|
||||
import type { Mocked } from 'vitest';
|
||||
import { addEdgeMarkers } from './edgeMarker.js';
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
import type { SVG } from 'mermaid/dist/diagram-api/types.js';
|
||||
import { log } from 'mermaid/dist/logger.js';
|
||||
import type { EdgeData } from 'mermaid/dist/types.js';
|
||||
import type { SVG } from '../../diagram-api/types.js';
|
||||
import { log } from '../../logger.js';
|
||||
import type { EdgeData } from '../../types.js';
|
||||
/**
|
||||
* Adds SVG markers to a path element based on the arrow types specified in the edge.
|
||||
*
|
||||
|
@ -1,10 +1,10 @@
|
||||
import { getConfig } from 'mermaid/dist/diagram-api/diagramAPI.js';
|
||||
import { evaluate } from 'mermaid/dist/diagrams/common/common.js';
|
||||
import { log } from 'mermaid/dist/logger.js';
|
||||
import { createText } from 'mermaid/dist/rendering-util/createText.ts';
|
||||
import utils from 'mermaid/dist/utils.js';
|
||||
import { getLineFunctionsWithOffset } from 'mermaid/dist/utils/lineWithOffset.js';
|
||||
import { getSubGraphTitleMargins } from 'mermaid/dist/utils/subGraphTitleMargins.js';
|
||||
import { getConfig } from '../../diagram-api/diagramAPI.js';
|
||||
import { evaluate } from '../../diagrams/common/common.js';
|
||||
import { log } from '../../logger.js';
|
||||
import { createText } from '../createText.js';
|
||||
import utils from '../../utils.js';
|
||||
import { getLineFunctionsWithOffset } from '../../utils/lineWithOffset.js';
|
||||
import { getSubGraphTitleMargins } from '../../utils/subGraphTitleMargins.js';
|
||||
import { curveBasis, line, select } from 'd3';
|
||||
import rough from 'roughjs';
|
||||
import createLabel from './createLabel.js';
|
||||
|
@ -1,5 +1,5 @@
|
||||
/** Setup arrow head and define the marker. The result is appended to the svg. */
|
||||
import { log } from 'mermaid/dist/logger.js';
|
||||
import { log } from '../../logger.js';
|
||||
|
||||
// Only add the number of markers that the diagram needs
|
||||
const insertMarkers = (elem, markerArray, type, id) => {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { log } from 'mermaid/dist/logger.js';
|
||||
import { log } from '../../logger.js';
|
||||
import { state } from './shapes/state.ts';
|
||||
import { roundedRect } from './shapes/roundedRect.ts';
|
||||
import { squareRect } from './shapes/squareRect.ts';
|
||||
@ -9,7 +9,7 @@ import { choice } from './shapes/choice.ts';
|
||||
import { note } from './shapes/note.ts';
|
||||
import { stadium } from './shapes/stadium.js';
|
||||
import { rectWithTitle } from './shapes/rectWithTitle.js';
|
||||
import { getConfig } from 'mermaid/dist/diagram-api/diagramAPI.js';
|
||||
import { getConfig } from '../../diagram-api/diagramAPI.js';
|
||||
import { subroutine } from './shapes/subroutine.js';
|
||||
import { cylinder } from './shapes/cylinder.js';
|
||||
import { circle } from './shapes/circle.js';
|
||||
|
@ -1,10 +1,10 @@
|
||||
import intersect from '../intersect/index.js';
|
||||
import type { Node } from 'mermaid/dist/rendering-util/types.d.ts';
|
||||
import type { SVG } from 'mermaid/dist/diagram-api/types.js';
|
||||
import type { Node } from '../../types.js';
|
||||
import type { SVG } from '../../../diagram-api/types.js';
|
||||
// @ts-ignore TODO: Fix rough typings
|
||||
import rough from 'roughjs';
|
||||
import { solidStateFill, styles2String } from './handDrawnShapeStyles.js';
|
||||
import { getConfig } from 'mermaid/dist/diagram-api/diagramAPI.js';
|
||||
import { getConfig } from '../../../diagram-api/diagramAPI.js';
|
||||
|
||||
export const choice = (parent: SVG, node: Node) => {
|
||||
const { labelStyles, nodeStyles } = styles2String(node);
|
||||
|
@ -1,11 +1,11 @@
|
||||
import { log } from 'mermaid/dist/logger.js';
|
||||
import { log } from '../../../logger.js';
|
||||
import { labelHelper, updateNodeBounds, getNodeClasses } from './util.js';
|
||||
import intersect from '../intersect/index.js';
|
||||
import type { Node } from 'mermaid/dist/rendering-util/types.d.ts';
|
||||
import type { Node } from '../../types.js';
|
||||
import {
|
||||
styles2String,
|
||||
userNodeOverrides,
|
||||
} from 'mermaid/dist/rendering-util/rendering-elements/shapes/handDrawnShapeStyles.js';
|
||||
} from './handDrawnShapeStyles.js';
|
||||
import rough from 'roughjs';
|
||||
|
||||
export const circle = async (parent: SVGAElement, node: Node): Promise<SVGAElement> => {
|
||||
|
@ -1,10 +1,10 @@
|
||||
import { labelHelper, updateNodeBounds, getNodeClasses } from './util.js';
|
||||
import intersect from '../intersect/index.js';
|
||||
import type { Node } from 'mermaid/dist/rendering-util/types.d.ts';
|
||||
import type { Node } from '../../types.js';
|
||||
import {
|
||||
styles2String,
|
||||
userNodeOverrides,
|
||||
} from 'mermaid/dist/rendering-util/rendering-elements/shapes/handDrawnShapeStyles.js';
|
||||
} from './handDrawnShapeStyles.js';
|
||||
import rough from 'roughjs';
|
||||
|
||||
export const createCylinderPathD = (
|
||||
|
@ -1,11 +1,11 @@
|
||||
import { log } from 'mermaid/dist/logger.js';
|
||||
import { log } from '../../../logger.js';
|
||||
import { labelHelper, updateNodeBounds, getNodeClasses } from './util.js';
|
||||
import intersect from '../intersect/index.js';
|
||||
import type { Node } from 'mermaid/dist/rendering-util/types.d.ts';
|
||||
import type { Node } from '../../types.js';
|
||||
import {
|
||||
styles2String,
|
||||
userNodeOverrides,
|
||||
} from 'mermaid/dist/rendering-util/rendering-elements/shapes/handDrawnShapeStyles.js';
|
||||
} from './handDrawnShapeStyles.js';
|
||||
import rough from 'roughjs';
|
||||
|
||||
export const doublecircle = async (parent: SVGAElement, node: Node): Promise<SVGAElement> => {
|
||||
|
@ -1,11 +1,11 @@
|
||||
import { labelHelper, updateNodeBounds, getNodeClasses } from './util.js';
|
||||
import intersect from '../intersect/index.js';
|
||||
import type { Node, RectOptions } from 'mermaid/dist/rendering-util/types.d.ts';
|
||||
import type { Node, RectOptions } from '../../types.js';
|
||||
import { createRoundedRectPathD } from './roundedRectPath.js';
|
||||
import {
|
||||
userNodeOverrides,
|
||||
styles2String,
|
||||
} from 'mermaid/dist/rendering-util/rendering-elements/shapes/handDrawnShapeStyles.js';
|
||||
} from './handDrawnShapeStyles.js';
|
||||
import rough from 'roughjs';
|
||||
|
||||
export const drawRect = async (parent: SVGAElement, node: Node, options: RectOptions) => {
|
||||
|
@ -1,10 +1,10 @@
|
||||
import { updateNodeBounds } from './util.js';
|
||||
import intersect from '../intersect/index.js';
|
||||
import type { Node } from 'mermaid/dist/rendering-util/types.d.ts';
|
||||
import type { SVG } from 'mermaid/dist/diagram-api/types.js';
|
||||
import type { Node } from '../../types.js';
|
||||
import type { SVG } from '../../../diagram-api/types.js';
|
||||
import rough from 'roughjs';
|
||||
import { solidStateFill } from './handDrawnShapeStyles.js';
|
||||
import { getConfig } from 'mermaid/dist/diagram-api/diagramAPI.js';
|
||||
import { getConfig } from '../../../diagram-api/diagramAPI.js';
|
||||
|
||||
export const forkJoin = (parent: SVG, node: Node, dir: string) => {
|
||||
const { themeVariables } = getConfig();
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { getConfig } from 'mermaid/dist/diagram-api/diagramAPI.js';
|
||||
import type { Node } from 'mermaid/dist/rendering-util/types.d.ts';
|
||||
import { getConfig } from '../../../diagram-api/diagramAPI.js';
|
||||
import type { Node } from '../../types.js';
|
||||
|
||||
// Striped fill like start or fork nodes in state diagrams
|
||||
export const solidStateFill = (color: string) => {
|
||||
|
@ -1,10 +1,10 @@
|
||||
import { labelHelper, updateNodeBounds, getNodeClasses } from './util.js';
|
||||
import intersect from '../intersect/index.js';
|
||||
import type { Node } from 'mermaid/dist/rendering-util/types.d.ts';
|
||||
import type { Node } from '../../types.js';
|
||||
import {
|
||||
styles2String,
|
||||
userNodeOverrides,
|
||||
} from 'mermaid/dist/rendering-util/rendering-elements/shapes/handDrawnShapeStyles.js';
|
||||
} from './handDrawnShapeStyles.js';
|
||||
import rough from 'roughjs';
|
||||
|
||||
import { insertPolygonShape } from './insertPolygonShape.js';
|
||||
|
@ -1,10 +1,10 @@
|
||||
import { labelHelper, updateNodeBounds, getNodeClasses } from './util.js';
|
||||
import intersect from '../intersect/index.js';
|
||||
import type { Node } from 'mermaid/dist/rendering-util/types.d.ts';
|
||||
import type { Node } from '../../types.js';
|
||||
import {
|
||||
styles2String,
|
||||
userNodeOverrides,
|
||||
} from 'mermaid/dist/rendering-util/rendering-elements/shapes/handDrawnShapeStyles.js';
|
||||
} from './handDrawnShapeStyles.js';
|
||||
import rough from 'roughjs';
|
||||
import { insertPolygonShape } from './insertPolygonShape.js';
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import type { Node, RectOptions } from 'mermaid/dist/rendering-util/types.d.ts';
|
||||
import type { Node, RectOptions } from '../../types.js';
|
||||
import { drawRect } from './drawRect.js';
|
||||
import { labelHelper, updateNodeBounds } from './util.js';
|
||||
import intersect from '../intersect/index.js';
|
||||
|
@ -1,10 +1,10 @@
|
||||
import { labelHelper, updateNodeBounds, getNodeClasses } from './util.js';
|
||||
import intersect from '../intersect/index.js';
|
||||
import type { Node } from 'mermaid/dist/rendering-util/types.d.ts';
|
||||
import type { Node } from '../../types.js';
|
||||
import {
|
||||
styles2String,
|
||||
userNodeOverrides,
|
||||
} from 'mermaid/dist/rendering-util/rendering-elements/shapes/handDrawnShapeStyles.js';
|
||||
} from './handDrawnShapeStyles.js';
|
||||
import rough from 'roughjs';
|
||||
import { insertPolygonShape } from './insertPolygonShape.js';
|
||||
|
||||
|
@ -1,10 +1,10 @@
|
||||
import { labelHelper, updateNodeBounds, getNodeClasses } from './util.js';
|
||||
import intersect from '../intersect/index.js';
|
||||
import type { Node } from 'mermaid/dist/rendering-util/types.d.ts';
|
||||
import type { Node } from '../../types.js';
|
||||
import {
|
||||
styles2String,
|
||||
userNodeOverrides,
|
||||
} from 'mermaid/dist/rendering-util/rendering-elements/shapes/handDrawnShapeStyles.js';
|
||||
} from './handDrawnShapeStyles.js';
|
||||
import rough from 'roughjs';
|
||||
import { insertPolygonShape } from './insertPolygonShape.js';
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { log } from 'mermaid/dist/logger.js';
|
||||
import { log } from '../../../logger.js';
|
||||
import { labelHelper, updateNodeBounds } from './util.js';
|
||||
import intersect from '../intersect/index.js';
|
||||
import { getConfig } from 'mermaid/dist/diagram-api/diagramAPI.js';
|
||||
import type { Node } from 'mermaid/dist/rendering-util/types.d.ts';
|
||||
import { getConfig } from '../../../diagram-api/diagramAPI.js';
|
||||
import type { Node } from '../../types.js';
|
||||
import rough from 'roughjs';
|
||||
|
||||
export const note = async (parent: SVGAElement, node: Node) => {
|
||||
|
@ -1,11 +1,11 @@
|
||||
import { log } from 'mermaid/dist/logger.js';
|
||||
import { log } from '../../../logger.js';
|
||||
import { labelHelper, updateNodeBounds, getNodeClasses } from './util.js';
|
||||
import intersect from '../intersect/index.js';
|
||||
import type { Node } from 'mermaid/dist/rendering-util/types.d.ts';
|
||||
import type { Node } from '../../types.js';
|
||||
import {
|
||||
styles2String,
|
||||
userNodeOverrides,
|
||||
} from 'mermaid/dist/rendering-util/rendering-elements/shapes/handDrawnShapeStyles.js';
|
||||
} from './handDrawnShapeStyles.js';
|
||||
import rough from 'roughjs';
|
||||
import { insertPolygonShape } from './insertPolygonShape.js';
|
||||
|
||||
|
@ -1,10 +1,10 @@
|
||||
import { labelHelper, updateNodeBounds, getNodeClasses } from './util.js';
|
||||
import intersect from '../intersect/index.js';
|
||||
import type { Node } from 'mermaid/dist/rendering-util/types.d.ts';
|
||||
import type { Node } from '../../types.js';
|
||||
import {
|
||||
styles2String,
|
||||
userNodeOverrides,
|
||||
} from 'mermaid/dist/rendering-util/rendering-elements/shapes/handDrawnShapeStyles.js';
|
||||
} from './handDrawnShapeStyles.js';
|
||||
import rough from 'roughjs';
|
||||
import { insertPolygonShape } from './insertPolygonShape.js';
|
||||
|
||||
|
@ -1,17 +1,17 @@
|
||||
import type { Node } from 'mermaid/dist/rendering-util/types.d.ts';
|
||||
import type { Node } from '../../types.js';
|
||||
import { select } from 'd3';
|
||||
import { evaluate } from 'mermaid/dist/diagrams/common/common.js';
|
||||
import { evaluate } from '../../../diagrams/common/common.js';
|
||||
import { updateNodeBounds } from './util.js';
|
||||
import createLabel from '../createLabel.js';
|
||||
import intersect from '../intersect/index.js';
|
||||
import {
|
||||
styles2String,
|
||||
userNodeOverrides,
|
||||
} from 'mermaid/dist/rendering-util/rendering-elements/shapes/handDrawnShapeStyles.js';
|
||||
} from './handDrawnShapeStyles.js';
|
||||
import rough from 'roughjs';
|
||||
import { getConfig } from 'mermaid/dist/diagram-api/diagramAPI.js';
|
||||
import { getConfig } from '../../../diagram-api/diagramAPI.js';
|
||||
import { createRoundedRectPathD } from './roundedRectPath.js';
|
||||
import { log } from 'mermaid/dist/logger.js';
|
||||
import { log } from '../../../logger.js';
|
||||
|
||||
export const rectWithTitle = async (parent: SVGElement, node: Node) => {
|
||||
const { labelStyles, nodeStyles } = styles2String(node);
|
||||
|
@ -1,4 +1,4 @@
|
||||
import type { Node, RectOptions } from 'mermaid/dist/rendering-util/types.d.ts';
|
||||
import type { Node, RectOptions } from '../../types.js';
|
||||
import { drawRect } from './drawRect.js';
|
||||
|
||||
export const roundedRect = async (parent: SVGAElement, node: Node) => {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import type { Node, RectOptions } from 'mermaid/dist/rendering-util/types.d.ts';
|
||||
import type { Node, RectOptions } from '../../types.js';
|
||||
import { drawRect } from './drawRect.js';
|
||||
|
||||
export const squareRect = async (parent: SVGAElement, node: Node) => {
|
||||
|
@ -1,10 +1,10 @@
|
||||
import { labelHelper, updateNodeBounds, getNodeClasses } from './util.js';
|
||||
import intersect from '../intersect/index.js';
|
||||
import type { Node } from 'mermaid/dist/rendering-util/types.d.ts';
|
||||
import type { Node } from '../../types.js';
|
||||
import {
|
||||
styles2String,
|
||||
userNodeOverrides,
|
||||
} from 'mermaid/dist/rendering-util/rendering-elements/shapes/handDrawnShapeStyles.js';
|
||||
} from './handDrawnShapeStyles.js';
|
||||
import rough from 'roughjs';
|
||||
import { createRoundedRectPathD } from './roundedRectPath.js';
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import type { Node, RectOptions } from 'mermaid/dist/rendering-util/types.d.ts';
|
||||
import type { Node, RectOptions } from '../../types.js';
|
||||
import { drawRect } from './drawRect.js';
|
||||
|
||||
export const state = async (parent: SVGAElement, node: Node) => {
|
||||
|
@ -1,10 +1,10 @@
|
||||
import { updateNodeBounds } from './util.js';
|
||||
import intersect from '../intersect/index.js';
|
||||
import type { Node } from 'mermaid/dist/rendering-util/types.d.ts';
|
||||
import type { SVG } from 'mermaid/dist/diagram-api/types.js';
|
||||
import type { Node } from '../../types.js';
|
||||
import type { SVG } from '../../../diagram-api/types.js';
|
||||
import rough from 'roughjs';
|
||||
import { solidStateFill } from './handDrawnShapeStyles.js';
|
||||
import { getConfig } from 'mermaid/dist/diagram-api/diagramAPI.js';
|
||||
import { getConfig } from '../../../diagram-api/diagramAPI.js';
|
||||
|
||||
export const stateEnd = (parent: SVG, node: Node) => {
|
||||
const { themeVariables } = getConfig();
|
||||
|
@ -1,10 +1,10 @@
|
||||
import { updateNodeBounds } from './util.js';
|
||||
import intersect from '../intersect/index.js';
|
||||
import type { Node } from 'mermaid/dist/rendering-util/types.d.ts';
|
||||
import type { SVG } from 'mermaid/dist/diagram-api/types.js';
|
||||
import type { Node } from '../../types.js';
|
||||
import type { SVG } from '../../../diagram-api/types.js';
|
||||
import rough from 'roughjs';
|
||||
import { solidStateFill } from './handDrawnShapeStyles.js';
|
||||
import { getConfig } from 'mermaid/dist/diagram-api/diagramAPI.js';
|
||||
import { getConfig } from '../../../diagram-api/diagramAPI.js';
|
||||
|
||||
export const stateStart = (parent: SVG, node: Node) => {
|
||||
const { themeVariables } = getConfig();
|
||||
|
@ -1,10 +1,10 @@
|
||||
import { labelHelper, updateNodeBounds, getNodeClasses } from './util.js';
|
||||
import intersect from '../intersect/index.js';
|
||||
import type { Node } from 'mermaid/dist/rendering-util/types.d.ts';
|
||||
import type { Node } from '../../types.js';
|
||||
import {
|
||||
styles2String,
|
||||
userNodeOverrides,
|
||||
} from 'mermaid/dist/rendering-util/rendering-elements/shapes/handDrawnShapeStyles.js';
|
||||
} from './handDrawnShapeStyles.js';
|
||||
import rough from 'roughjs';
|
||||
import { insertPolygonShape } from './insertPolygonShape.js';
|
||||
|
||||
|
@ -1,10 +1,10 @@
|
||||
import { labelHelper, updateNodeBounds, getNodeClasses } from './util.js';
|
||||
import intersect from '../intersect/index.js';
|
||||
import type { Node } from 'mermaid/dist/rendering-util/types.d.ts';
|
||||
import type { Node } from '../../types.js';
|
||||
import {
|
||||
styles2String,
|
||||
userNodeOverrides,
|
||||
} from 'mermaid/dist/rendering-util/rendering-elements/shapes/handDrawnShapeStyles.js';
|
||||
} from './handDrawnShapeStyles.js';
|
||||
import rough from 'roughjs';
|
||||
import { insertPolygonShape } from './insertPolygonShape.js';
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { createText } from 'mermaid/dist/rendering-util/createText.ts';
|
||||
import { getConfig } from 'mermaid/dist/diagram-api/diagramAPI.js';
|
||||
import { createText } from '../../createText.js';
|
||||
import { getConfig } from '../../../diagram-api/diagramAPI.js';
|
||||
import { select } from 'd3';
|
||||
import { evaluate, sanitizeText } from 'mermaid/dist/diagrams/common/common.js';
|
||||
import { decodeEntities } from 'mermaid/dist/utils.js';
|
||||
import { evaluate, sanitizeText } from '../../../diagrams/common/common.js';
|
||||
import { decodeEntities } from '../../../utils.js';
|
||||
|
||||
export const labelHelper = async (parent, node, _classes) => {
|
||||
let cssClasses;
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { configureSvgSize } from 'mermaid/dist/setupGraphViewbox.js';
|
||||
import type { SVG } from 'mermaid/dist/diagram-api/types.js';
|
||||
import { log } from 'mermaid/dist/logger.js';
|
||||
import { configureSvgSize } from '../setupGraphViewbox.js';
|
||||
import type { SVG } from '../diagram-api/types.js';
|
||||
import { log } from '../logger.js';
|
||||
|
||||
export const setupViewPortForSVG = (
|
||||
svg: SVG,
|
||||
|
@ -2,16 +2,10 @@ import jison from './.vite/jisonPlugin.js';
|
||||
import jsonSchemaPlugin from './.vite/jsonSchemaPlugin.js';
|
||||
import typescript from '@rollup/plugin-typescript';
|
||||
import { defaultExclude, defineConfig } from 'vitest/config';
|
||||
import path from 'path';
|
||||
|
||||
export default defineConfig({
|
||||
resolve: {
|
||||
extensions: ['.js'],
|
||||
alias: {
|
||||
// Define your alias here
|
||||
'mermaid/dist': path.resolve(__dirname, 'packages/mermaid/src'),
|
||||
},
|
||||
},
|
||||
extensions: ['.js'] },
|
||||
plugins: [
|
||||
jison(),
|
||||
jsonSchemaPlugin(), // handles .schema.yaml JSON Schema files
|
||||
|
Loading…
x
Reference in New Issue
Block a user