@matdata/yasgui-graph-plugin 1.0.4 → 1.0.6

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.
package/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # YASGUI Graph Plugin
2
2
 
3
3
  [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
4
- [![npm version](https://img.shields.io/npm/v/yasgui-graph-plugin.svg)](https://www.npmjs.com/package/yasgui-graph-plugin)
4
+ [![npm version](https://img.shields.io/npm/v/@matdata/yasgui-graph-plugin.svg)](https://www.npmjs.com/package/@matdata/yasgui-graph-plugin)
5
5
 
6
6
  A YASGUI plugin for visualizing SPARQL CONSTRUCT and DESCRIBE query results as interactive graphs with nodes (subjects/objects) and edges (predicates).
7
7
 
@@ -24,12 +24,12 @@ A YASGUI plugin for visualizing SPARQL CONSTRUCT and DESCRIBE query results as i
24
24
  ### NPM
25
25
 
26
26
  ```bash
27
- npm install yasgui-graph-plugin @zazuko/yasgui vis-network
27
+ npm install @matdata/yasgui-graph-plugin @zazuko/yasgui vis-network
28
28
  ```
29
29
 
30
30
  ```javascript
31
31
  import Yasgui from '@zazuko/yasgui';
32
- import GraphPlugin from 'yasgui-graph-plugin';
32
+ import GraphPlugin from '@matdata/yasgui-graph-plugin';
33
33
 
34
34
  Yasgui.Yasr.registerPlugin('Graph', GraphPlugin);
35
35
 
@@ -44,7 +44,7 @@ const yasgui = new Yasgui(document.getElementById('yasgui'));
44
44
  <script src="https://cdn.jsdelivr.net/npm/@zazuko/yasgui@4/build/yasgui.min.js"></script>
45
45
 
46
46
  <!-- Graph Plugin -->
47
- <script src="https://cdn.jsdelivr.net/npm/yasgui-graph-plugin/dist/yasgui-graph-plugin.min.js"></script>
47
+ <script src="https://cdn.jsdelivr.net/npm/@matdata/yasgui-graph-plugin/dist/yasgui-graph-plugin.min.js"></script>
48
48
 
49
49
  <script>
50
50
  // Plugin auto-registers as 'graph'
package/dist/index.d.ts CHANGED
@@ -2,27 +2,27 @@
2
2
  // Project: https://github.com/Matdata-eu/yasgui-graph-plugin
3
3
 
4
4
  declare module '@matdata/yasgui-graph-plugin' {
5
- import type { default as Yasr } from '@zazuko/yasgui/build/ts/yasr';
5
+ import type { Plugin, DownloadInfo } from '@zazuko/yasr/build/ts/plugins';
6
+ import type Yasr from '@zazuko/yasr';
6
7
 
7
8
  /**
8
9
  * YASGUI plugin for visualizing SPARQL CONSTRUCT and DESCRIBE query results as interactive graphs
9
10
  */
10
- export default class GraphPlugin {
11
+ export default class GraphPlugin implements Plugin<any> {
11
12
  /**
12
- * Creates a new GraphPlugin instance
13
- * @param yasr - The YASR instance
13
+ * Plugin priority (higher = shown first in tabs)
14
14
  */
15
- constructor(yasr: typeof Yasr);
15
+ priority: number;
16
16
 
17
17
  /**
18
- * Plugin priority (higher = shown first in tabs)
18
+ * Plugin label for tab display
19
19
  */
20
- static get priority(): number;
20
+ label?: string;
21
21
 
22
22
  /**
23
- * Plugin label for tab display
23
+ * Reference to help documentation
24
24
  */
25
- static get label(): string;
25
+ helpReference?: string;
26
26
 
27
27
  /**
28
28
  * Check if plugin can handle the current results
@@ -33,12 +33,22 @@ declare module '@matdata/yasgui-graph-plugin' {
33
33
  /**
34
34
  * Render the graph visualization
35
35
  */
36
- draw(): void;
36
+ draw(persistentConfig: any, runtimeConfig?: any): Promise<void> | void;
37
+
38
+ /**
39
+ * Get icon element for plugin tab
40
+ */
41
+ getIcon(): Element | undefined;
37
42
 
38
43
  /**
39
44
  * Download the current visualization as PNG
40
45
  */
41
- download(): void;
46
+ download(filename?: string): DownloadInfo | undefined;
47
+
48
+ /**
49
+ * Cleanup resources when plugin is destroyed
50
+ */
51
+ destroy?(): void;
42
52
 
43
53
  /**
44
54
  * Get vis-network configuration options
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@matdata/yasgui-graph-plugin",
3
3
  "private": false,
4
- "version": "1.0.4",
4
+ "version": "1.0.6",
5
5
  "description": "YASGUI plugin for visualizing SPARQL CONSTRUCT and DESCRIBE query results as interactive graphs",
6
6
  "main": "dist/yasgui-graph-plugin.cjs.js",
7
7
  "module": "dist/yasgui-graph-plugin.esm.js",