-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2debdbf
commit f08c53d
Showing
129 changed files
with
301,109 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { DetailedError } from './utils'; | ||
export declare type ParseErrorFunction = (err: string | DetailedError | unknown, hash?: any) => void; | ||
/** | ||
* An object representing a parsed mermaid diagram definition. | ||
* @privateRemarks This is exported as part of the public mermaidAPI. | ||
*/ | ||
export declare class Diagram { | ||
text: string; | ||
type: string; | ||
parser: any; | ||
renderer: any; | ||
db: import("./diagram-api/types").DiagramDb; | ||
private detectError?; | ||
constructor(text: string); | ||
parse(): void; | ||
render(id: string, version: string): Promise<void>; | ||
getParser(): any; | ||
getType(): string; | ||
} | ||
/** | ||
* Parse the text asynchronously and generate a Diagram object asynchronously. | ||
* **Warning:** This function may be changed in the future. | ||
* @alpha | ||
* @param text - The mermaid diagram definition. | ||
* @returns A the Promise of a Diagram object. | ||
* @throws {@link UnknownDiagramError} if the diagram type can not be found. | ||
* @privateRemarks This is exported as part of the public mermaidAPI. | ||
*/ | ||
export declare const getDiagramFromText: (text: string) => Promise<Diagram>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/** | ||
* Accessibility (a11y) functions, types, helpers | ||
* @see https://www.w3.org/WAI/ | ||
* @see https://www.w3.org/TR/wai-aria-1.1/ | ||
* @see https://www.w3.org/TR/svg-aam-1.0/ | ||
* | ||
*/ | ||
import { D3Element } from './mermaidAPI'; | ||
/** | ||
* Add role and aria-roledescription to the svg element | ||
* | ||
* @param svg - d3 object that contains the SVG HTML element | ||
* @param diagramType - diagram name for to the aria-roledescription | ||
*/ | ||
export declare function setA11yDiagramInfo(svg: D3Element, diagramType: string | null | undefined): void; | ||
/** | ||
* Add an accessible title and/or description element to a chart. | ||
* The title is usually not displayed and the description is never displayed. | ||
* | ||
* The following charts display their title as a visual and accessibility element: gantt | ||
* | ||
* @param svg - d3 node to insert the a11y title and desc info | ||
* @param a11yTitle - a11y title. null and undefined are meaningful: means to skip it | ||
* @param a11yDesc - a11y description. null and undefined are meaningful: means to skip it | ||
* @param baseId - id used to construct the a11y title and description id | ||
*/ | ||
export declare function addSVGa11yTitleDescription(svg: D3Element, a11yTitle: string | null | undefined, a11yDesc: string | null | undefined, baseId: string): void; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export {}; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
export default assignWithDepth; | ||
/** | ||
* @function assignWithDepth Extends the functionality of {@link ObjectConstructor.assign} with the | ||
* ability to merge arbitrary-depth objects For each key in src with path `k` (recursively) | ||
* performs an Object.assign(dst[`k`], src[`k`]) with a slight change from the typical handling of | ||
* undefined for dst[`k`]: instead of raising an error, dst[`k`] is auto-initialized to {} and | ||
* effectively merged with src[`k`]<p> Additionally, dissimilar types will not clobber unless the | ||
* config.clobber parameter === true. Example: | ||
* | ||
* ```js | ||
* let config_0 = { foo: { bar: 'bar' }, bar: 'foo' }; | ||
* let config_1 = { foo: 'foo', bar: 'bar' }; | ||
* let result = assignWithDepth(config_0, config_1); | ||
* console.log(result); | ||
* //-> result: { foo: { bar: 'bar' }, bar: 'bar' } | ||
* ``` | ||
* | ||
* Traditional Object.assign would have clobbered foo in config_0 with foo in config_1. If src is a | ||
* destructured array of objects and dst is not an array, assignWithDepth will apply each element | ||
* of src to dst in order. | ||
* @param {any} dst - The destination of the merge | ||
* @param {any} src - The source object(s) to merge into destination | ||
* @param {{ depth: number; clobber: boolean }} [config={ depth: 2, clobber: false }] - Depth: depth | ||
* to traverse within src and dst for merging - clobber: should dissimilar types clobber (default: | ||
* { depth: 2, clobber: false }). Default is `{ depth: 2, clobber: false }` | ||
* @returns {any} | ||
*/ | ||
declare function assignWithDepth(dst: any, src: any, config?: { | ||
depth: number; | ||
clobber: boolean; | ||
} | undefined): any; |
Oops, something went wrong.