sketchmark 1.1.0 → 1.1.2
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.
Potentially problematic release.
This version of sketchmark might be problematic. Click here for more details.
- package/README.md +46 -9
- package/dist/index.cjs +1549 -28
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +25 -50
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1547 -29
- package/dist/index.js.map +1 -1
- package/dist/render.d.ts +25 -0
- package/dist/render.d.ts.map +1 -0
- package/dist/sketchmark.iife.js +1549 -28
- package/dist/ui/canvas.d.ts +129 -0
- package/dist/ui/canvas.d.ts.map +1 -0
- package/dist/ui/editor.d.ts +52 -0
- package/dist/ui/editor.d.ts.map +1 -0
- package/dist/ui/embed.d.ts +91 -0
- package/dist/ui/embed.d.ts.map +1 -0
- package/dist/ui/shared.d.ts +6 -0
- package/dist/ui/shared.d.ts.map +1 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,51 +1,26 @@
|
|
|
1
|
-
export { parse, ParseError } from
|
|
2
|
-
export type { DiagramAST } from
|
|
3
|
-
export { buildSceneGraph, nodeMap, groupMap, markdownMap } from
|
|
4
|
-
export type { SceneGraph, SceneNode, SceneEdge, SceneGroup, SceneMarkdown } from
|
|
5
|
-
export { layout, connPoint } from
|
|
6
|
-
export { renderToSVG, svgToString } from
|
|
7
|
-
export type { SVGRendererOptions } from
|
|
8
|
-
export { renderToCanvas, canvasToPNGBlob, canvasToPNGDataURL } from
|
|
9
|
-
export type { CanvasRendererOptions } from
|
|
10
|
-
export { AnimationController, ANIMATION_CSS } from
|
|
11
|
-
export type { AnimationEvent, AnimationEventType } from
|
|
12
|
-
export { exportSVG, exportPNG, exportCanvasPNG, exportHTML, exportGIF, exportMP4, getSVGBlob, svgToPNGDataURL, } from
|
|
13
|
-
export type { ExportFormat, ExportOptions } from
|
|
14
|
-
export type { NodeShape, EdgeConnector, LayoutType, AlignItems, JustifyContent, AnimationAction, AnimationTrigger, StyleProps, StepPace, ASTNode, ASTEdge, ASTGroup, ASTStep, ASTBeat, ASTStepItem, ASTChart, ASTTable, GroupChildRef, RootItemRef, ASTMarkdown, } from
|
|
15
|
-
export { hashStr, clamp, lerp, parseHex, sleep, throttle, debounce, EventEmitter } from
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
export
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
renderer?: 'svg' | 'canvas';
|
|
27
|
-
/** Inject animation CSS into <head> */
|
|
28
|
-
injectCSS?: boolean;
|
|
29
|
-
/** SVG-specific options */
|
|
30
|
-
svgOptions?: SVGRendererOptions;
|
|
31
|
-
/** Canvas-specific options */
|
|
32
|
-
canvasOptions?: CanvasRendererOptions;
|
|
33
|
-
/** Called when a node is clicked */
|
|
34
|
-
onNodeClick?: (nodeId: string) => void;
|
|
35
|
-
/** Callback with the AnimationController after render */
|
|
36
|
-
onReady?: (anim: AnimationController, svg?: SVGSVGElement) => void;
|
|
37
|
-
}
|
|
38
|
-
export interface DiagramInstance {
|
|
39
|
-
scene: ReturnType<typeof buildSceneGraph>;
|
|
40
|
-
anim: AnimationController;
|
|
41
|
-
svg?: SVGSVGElement;
|
|
42
|
-
canvas?: HTMLCanvasElement;
|
|
43
|
-
/** Re-render with the same or updated options */
|
|
44
|
-
update: (dsl: string) => DiagramInstance;
|
|
45
|
-
exportSVG: (filename?: string) => void;
|
|
46
|
-
exportPNG: (filename?: string) => Promise<void>;
|
|
47
|
-
}
|
|
48
|
-
export declare function render(options: RenderOptions): DiagramInstance;
|
|
49
|
-
export { PALETTES, resolvePalette, THEME_CONFIG_KEY, listThemes, THEME_NAMES } from './theme';
|
|
50
|
-
export { resolveFont, loadFont, registerFont, BUILTIN_FONTS } from './fonts';
|
|
1
|
+
export { parse, ParseError } from "./parser";
|
|
2
|
+
export type { DiagramAST } from "./parser";
|
|
3
|
+
export { buildSceneGraph, nodeMap, groupMap, markdownMap } from "./scene";
|
|
4
|
+
export type { SceneGraph, SceneNode, SceneEdge, SceneGroup, SceneMarkdown, } from "./scene";
|
|
5
|
+
export { layout, connPoint } from "./layout";
|
|
6
|
+
export { renderToSVG, svgToString } from "./renderer/svg";
|
|
7
|
+
export type { SVGRendererOptions } from "./renderer/svg";
|
|
8
|
+
export { renderToCanvas, canvasToPNGBlob, canvasToPNGDataURL, } from "./renderer/canvas";
|
|
9
|
+
export type { CanvasRendererOptions } from "./renderer/canvas";
|
|
10
|
+
export { AnimationController, ANIMATION_CSS } from "./animation";
|
|
11
|
+
export type { AnimationEvent, AnimationEventType } from "./animation";
|
|
12
|
+
export { exportSVG, exportPNG, exportCanvasPNG, exportHTML, exportGIF, exportMP4, getSVGBlob, svgToPNGDataURL, } from "./export";
|
|
13
|
+
export type { ExportFormat, ExportOptions } from "./export";
|
|
14
|
+
export type { NodeShape, EdgeConnector, LayoutType, AlignItems, JustifyContent, AnimationAction, AnimationTrigger, StyleProps, StepPace, ASTNode, ASTEdge, ASTGroup, ASTStep, ASTBeat, ASTStepItem, ASTChart, ASTTable, GroupChildRef, RootItemRef, ASTMarkdown, } from "./ast/types";
|
|
15
|
+
export { hashStr, clamp, lerp, parseHex, sleep, throttle, debounce, EventEmitter, } from "./utils";
|
|
16
|
+
export { render } from "./render";
|
|
17
|
+
export type { RenderOptions, DiagramInstance } from "./render";
|
|
18
|
+
export { SketchmarkCanvas } from "./ui/canvas";
|
|
19
|
+
export type { SketchmarkCanvasOptions, SketchmarkCanvasEvents, SketchmarkCanvasBindEditorOptions, } from "./ui/canvas";
|
|
20
|
+
export { SketchmarkEditor } from "./ui/editor";
|
|
21
|
+
export type { SketchmarkEditorOptions, SketchmarkEditorEvents, } from "./ui/editor";
|
|
22
|
+
export { SketchmarkEmbed } from "./ui/embed";
|
|
23
|
+
export type { SketchmarkEmbedOptions, SketchmarkEmbedEvents, } from "./ui/embed";
|
|
24
|
+
export { PALETTES, resolvePalette, THEME_CONFIG_KEY, listThemes, THEME_NAMES, } from "./theme";
|
|
25
|
+
export { resolveFont, loadFont, registerFont, BUILTIN_FONTS } from "./fonts";
|
|
51
26
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAC7C,YAAY,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAC1E,YAAY,EACV,UAAU,EACV,SAAS,EACT,SAAS,EACT,UAAU,EACV,aAAa,GACd,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAG7C,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC1D,YAAY,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EACL,cAAc,EACd,eAAe,EACf,kBAAkB,GACnB,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAG/D,OAAO,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjE,YAAY,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAGtE,OAAO,EACL,SAAS,EACT,SAAS,EACT,eAAe,EACf,UAAU,EACV,SAAS,EACT,SAAS,EACT,UAAU,EACV,eAAe,GAChB,MAAM,UAAU,CAAC;AACl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