@umbraci/jsmind 0.10.14 → 0.10.17

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.
Files changed (70) hide show
  1. package/LICENSE +24 -24
  2. package/README.md +116 -116
  3. package/dist/jsmind.copy-paste.js +9 -0
  4. package/dist/jsmind.copy-paste.js.map +1 -0
  5. package/dist/jsmind.draggable-node.js +1 -1
  6. package/dist/jsmind.draggable-node.js.map +1 -1
  7. package/dist/jsmind.history.js +1 -1
  8. package/dist/jsmind.history.js.map +1 -1
  9. package/dist/jsmind.js +1 -1
  10. package/dist/jsmind.js.map +1 -1
  11. package/dist/jsmind.multi-select.js +1 -1
  12. package/dist/jsmind.multi-select.js.map +1 -1
  13. package/dist/jsmind.multiline-text.js +1 -1
  14. package/dist/jsmind.multiline-text.js.map +1 -1
  15. package/dist/jsmind.screenshot.js +1 -1
  16. package/dist/jsmind.screenshot.js.map +1 -1
  17. package/es/jsmind.copy-paste.js +9 -0
  18. package/es/jsmind.copy-paste.js.map +1 -0
  19. package/es/jsmind.draggable-node.js +1 -1
  20. package/es/jsmind.draggable-node.js.map +1 -1
  21. package/es/jsmind.history.js +1 -1
  22. package/es/jsmind.history.js.map +1 -1
  23. package/es/jsmind.js +1 -1
  24. package/es/jsmind.js.map +1 -1
  25. package/es/jsmind.multi-select.js +1 -1
  26. package/es/jsmind.multi-select.js.map +1 -1
  27. package/es/jsmind.multiline-text.js +1 -1
  28. package/es/jsmind.multiline-text.js.map +1 -1
  29. package/es/jsmind.screenshot.js +1 -1
  30. package/es/jsmind.screenshot.js.map +1 -1
  31. package/lib/jsmind.copy-paste.js +9 -0
  32. package/lib/jsmind.copy-paste.js.map +1 -0
  33. package/lib/jsmind.draggable-node.js +1 -1
  34. package/lib/jsmind.draggable-node.js.map +1 -1
  35. package/lib/jsmind.history.js +1 -1
  36. package/lib/jsmind.history.js.map +1 -1
  37. package/lib/jsmind.js +1 -1
  38. package/lib/jsmind.js.map +1 -1
  39. package/lib/jsmind.multi-select.js +1 -1
  40. package/lib/jsmind.multi-select.js.map +1 -1
  41. package/lib/jsmind.multiline-text.js +1 -1
  42. package/lib/jsmind.multiline-text.js.map +1 -1
  43. package/lib/jsmind.screenshot.js +1 -1
  44. package/lib/jsmind.screenshot.js.map +1 -1
  45. package/package.json +115 -115
  46. package/style/jsmind.css +408 -408
  47. package/types/generated/index.d.ts +8 -0
  48. package/types/generated/jsmind.common.d.ts +68 -0
  49. package/types/generated/jsmind.d.ts +438 -0
  50. package/types/generated/jsmind.data_provider.d.ts +56 -0
  51. package/types/generated/jsmind.dom.d.ts +59 -0
  52. package/types/generated/jsmind.enhanced-plugin.d.ts +103 -0
  53. package/types/generated/jsmind.format.d.ts +113 -0
  54. package/types/generated/jsmind.graph.d.ts +180 -0
  55. package/types/generated/jsmind.layout_provider.d.ts +182 -0
  56. package/types/generated/jsmind.mind.d.ts +121 -0
  57. package/types/generated/jsmind.node.d.ts +69 -0
  58. package/types/generated/jsmind.option.d.ts +73 -0
  59. package/types/generated/jsmind.plugin.d.ts +21 -0
  60. package/types/generated/jsmind.shortcut_provider.d.ts +52 -0
  61. package/types/generated/jsmind.util.d.ts +26 -0
  62. package/types/generated/jsmind.view_provider.d.ts +347 -0
  63. package/types/generated/plugins/history/history-diff.d.ts +297 -0
  64. package/types/generated/plugins/history/jsmind.history.d.ts +87 -0
  65. package/types/generated/plugins/jsmind.draggable-node.d.ts +262 -0
  66. package/types/generated/plugins/jsmind.multi-select.d.ts +238 -0
  67. package/types/generated/plugins/jsmind.multiline-text-v2.d.ts +58 -0
  68. package/types/generated/plugins/jsmind.multiline-text.d.ts +43 -0
  69. package/types/generated/plugins/jsmind.screenshot.d.ts +83 -0
  70. package/types/tsconfig.declaration.json +19 -19
@@ -0,0 +1,83 @@
1
+ /**
2
+ * Screenshot plugin for jsMind.
3
+ */
4
+ export class JmScreenshot {
5
+ /**
6
+ * Create screenshot plugin instance.
7
+ * @param {import('../jsmind.js').default} jm - jsMind instance
8
+ * @param {Partial<ScreenshotOptions>} options - Plugin options
9
+ */
10
+ constructor(jm: import("../jsmind.js").default, options: Partial<ScreenshotOptions>);
11
+ version: string;
12
+ /** @type {import('../jsmind.js').default} */
13
+ jm: import("../jsmind.js").default;
14
+ /** @type {ScreenshotOptions} */
15
+ options: ScreenshotOptions;
16
+ /** @type {number} */
17
+ dpr: number;
18
+ /** Take a screenshot of the mind map. */
19
+ shoot(): void;
20
+ /**
21
+ * Create canvas for screenshot.
22
+ * @returns {HTMLCanvasElement} Canvas element
23
+ */
24
+ create_canvas(): HTMLCanvasElement;
25
+ /**
26
+ * Clean up canvas element.
27
+ * @param {HTMLCanvasElement} c - Canvas to remove
28
+ */
29
+ clear(c: HTMLCanvasElement): void;
30
+ /**
31
+ * Draw background on canvas.
32
+ * @param {CanvasRenderingContext2D} ctx - Canvas context
33
+ * @returns {Promise<CanvasRenderingContext2D>} Promise resolving to context
34
+ */
35
+ draw_background(ctx: CanvasRenderingContext2D): Promise<CanvasRenderingContext2D>;
36
+ /**
37
+ * Draw connection lines on canvas by copying from view graph.
38
+ * @param {CanvasRenderingContext2D} ctx
39
+ * @returns {Promise<CanvasRenderingContext2D>}
40
+ */
41
+ draw_lines(ctx: CanvasRenderingContext2D): Promise<CanvasRenderingContext2D>;
42
+ /**
43
+ * Draw node DOM into canvas via SVG snapshot.
44
+ * @param {CanvasRenderingContext2D} ctx
45
+ * @returns {Promise<CanvasRenderingContext2D>}
46
+ */
47
+ draw_nodes(ctx: CanvasRenderingContext2D): Promise<CanvasRenderingContext2D>;
48
+ /**
49
+ * Draw watermark text on canvas.
50
+ * @param {HTMLCanvasElement} c
51
+ * @param {CanvasRenderingContext2D} ctx
52
+ * @returns {CanvasRenderingContext2D}
53
+ */
54
+ draw_watermark(c: HTMLCanvasElement, ctx: CanvasRenderingContext2D): CanvasRenderingContext2D;
55
+ /**
56
+ * Load image from URL and resolve img element.
57
+ * @param {string} url
58
+ * @returns {Promise<HTMLImageElement>}
59
+ */
60
+ load_image(url: string): Promise<HTMLImageElement>;
61
+ /**
62
+ * Trigger download of canvas content as PNG.
63
+ * @param {HTMLCanvasElement} c
64
+ */
65
+ download(c: HTMLCanvasElement): void;
66
+ }
67
+ /**
68
+ * Screenshot plugin registration.
69
+ * @type {import('../jsmind.plugin.js').Plugin<Partial<ScreenshotOptions>>}
70
+ */
71
+ export const screenshot_plugin: import("../jsmind.plugin.js").Plugin<Partial<ScreenshotOptions>>;
72
+ export default JmScreenshot;
73
+ /**
74
+ * Default options for screenshot plugin.
75
+ */
76
+ export type ScreenshotOptions = {
77
+ filename?: string | null;
78
+ watermark?: {
79
+ left?: string | Location;
80
+ right?: string;
81
+ };
82
+ background?: string;
83
+ };
@@ -1,19 +1,19 @@
1
- {
2
- "compilerOptions": {
3
- "target": "ES2020",
4
- "module": "ESNext",
5
- "moduleResolution": "node",
6
- "strict": false,
7
- "esModuleInterop": true,
8
- "skipLibCheck": true,
9
- "declaration": true,
10
- "emitDeclarationOnly": true,
11
- "stripInternal": true,
12
- "allowJs": true,
13
- "checkJs": false,
14
- "rootDirs": ["../src"],
15
- "outDir": "./generated",
16
- "baseUrl": "."
17
- },
18
- "include" : ["../src/**/*.ts", "../src/**/*.js"]
19
- }
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2020",
4
+ "module": "ESNext",
5
+ "moduleResolution": "node",
6
+ "strict": false,
7
+ "esModuleInterop": true,
8
+ "skipLibCheck": true,
9
+ "declaration": true,
10
+ "emitDeclarationOnly": true,
11
+ "stripInternal": true,
12
+ "allowJs": true,
13
+ "checkJs": false,
14
+ "rootDirs": ["../src"],
15
+ "outDir": "./generated",
16
+ "baseUrl": "."
17
+ },
18
+ "include" : ["../src/**/*.ts", "../src/**/*.js"]
19
+ }