@matdata/yasgui-utils 5.1.0 → 5.3.0
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 +128 -96
- package/package.json +1 -1
- package/src/store.d.ts +13 -0
package/README.md
CHANGED
|
@@ -1,148 +1,180 @@
|
|
|
1
1
|
# YASGUI
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
Go to https://yasgui.matdata.eu/ and use it freely in production. Or fork this repo and extend it yourself. Contributions are certainly welcome!
|
|
6
|
-
|
|
7
|
-
## Table of Contents
|
|
8
|
-
|
|
9
|
-
- [Useful Links](#useful-links)
|
|
10
|
-
- [Features](#features)
|
|
11
|
-
- [Keyboard Shortcuts](#keyboard-shortcuts)
|
|
12
|
-
- [Query Editor (Yasqe)](#query-editor-yasqe)
|
|
13
|
-
- [Fullscreen Mode](#fullscreen-mode)
|
|
14
|
-
- [URI Explorer](#uri-explorer)
|
|
15
|
-
- [Prefix Management](#prefix-management)
|
|
16
|
-
- [Result Visualization Plugins (Yasr)](#result-visualization-plugins-yasr)
|
|
17
|
-
- [Installation](#installation)
|
|
18
|
-
- [npm](#npm)
|
|
19
|
-
- [Yarn](#yarn)
|
|
20
|
-
- [Local Development](#local-development)
|
|
21
|
-
- [License](#license)
|
|
22
|
-
|
|
23
|
-
## Useful Links
|
|
24
|
-
|
|
25
|
-
- Production environment: https://yasgui.matdata.eu/
|
|
26
|
-
- Dev environment: https://yasgui-dev.matdata.eu/ (GitHub Pages - automatically updated with every commit to main branch)
|
|
27
|
-
- User documentation: https://docs.triply.cc/yasgui/
|
|
28
|
-
- Developer documentation: https://docs.triply.cc/yasgui-api/
|
|
29
|
-
- Docker Hub: https://hub.docker.com/r/mathiasvda/yasgui
|
|
3
|
+
**Yet Another SPARQL GUI (YASGUI)** is a powerful, user-friendly web-based interface for querying and exploring RDF data using SPARQL. It combines a feature-rich query editor (YASQE) with a versatile results viewer (YASR) to provide a comprehensive SPARQL IDE.
|
|
30
4
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
### Themes
|
|
5
|
+
🌐 **Try it now**: [https://yasgui.matdata.eu/](https://yasgui.matdata.eu/)
|
|
34
6
|
|
|
35
|
-
|
|
7
|
+
[](https://www.npmjs.com/package/@matdata/yasgui)
|
|
8
|
+
[](https://opensource.org/licenses/MIT)
|
|
36
9
|
|
|
37
|
-
|
|
38
|
-
- **Persistent Preference**: Your theme choice is automatically saved
|
|
39
|
-
- **System Detection**: Automatically matches your system's dark/light mode preference
|
|
40
|
-
- **Full Coverage**: Consistent theming across all components (editor, results, modals)
|
|
10
|
+
---
|
|
41
11
|
|
|
42
|
-
|
|
12
|
+
## Quick Links
|
|
43
13
|
|
|
44
|
-
|
|
14
|
+
- 📖 **[User Guide](./docs/user-guide.md)** - Complete guide for end users
|
|
15
|
+
- 🛠️ **[Developer Guide](./docs/developer-guide.md)** - API reference and integration guide
|
|
16
|
+
- 🚀 **[Production Environment](https://yasgui.matdata.eu/)** - Live instance
|
|
17
|
+
- 📦 **[npm Package](https://www.npmjs.com/package/@matdata/yasgui)**
|
|
18
|
+
- 🐳 **[Docker Hub](https://hub.docker.com/r/mathiasvda/yasgui)**
|
|
19
|
+
- 📝 **[Releases & Changelog](https://github.com/Matdata-eu/Yasgui/releases)**
|
|
20
|
+
- 💻 **[GitHub Repository](https://github.com/Matdata-eu/Yasgui)**
|
|
45
21
|
|
|
46
|
-
|
|
22
|
+
---
|
|
47
23
|
|
|
48
|
-
|
|
49
|
-
- **Ctrl+Enter** / **Cmd+Enter**: Execute the current query
|
|
50
|
-
- **Ctrl+Space**: Trigger autocomplete
|
|
51
|
-
- **Ctrl+S**: Save query to local storage
|
|
52
|
-
- **Shift+Ctrl+F**: Auto-format the query
|
|
53
|
-
- **Ctrl+/**: Comment/uncomment selected lines
|
|
54
|
-
- **Shift+Ctrl+D**: Duplicate the current line
|
|
55
|
-
- **Shift+Ctrl+K**: Delete the current line
|
|
56
|
-
- **Esc**: Remove focus from the editor
|
|
24
|
+
## Documentation
|
|
57
25
|
|
|
58
|
-
|
|
59
|
-
- **F11**: Toggle fullscreen mode for the query editor (Yasqe)
|
|
60
|
-
- **F10**: Toggle fullscreen mode for the results viewer (Yasr)
|
|
61
|
-
- **Ctrl+Shift+F**: Switch between Yasqe and Yasr fullscreen modes
|
|
26
|
+
The **documentation for YASGUI is hosted on GitHub Pages**:
|
|
62
27
|
|
|
63
|
-
|
|
64
|
-
-
|
|
28
|
+
- **📚 Documentation Website**: [https://yasgui-doc.matdata.eu/](https://matdata-eu.github.io/Yasgui/)
|
|
29
|
+
- User Guide, Developer Guide, API Reference
|
|
30
|
+
- Built with Docusaurus
|
|
31
|
+
- Version-tagged with the repository
|
|
65
32
|
|
|
66
|
-
|
|
67
|
-
-
|
|
68
|
-
-
|
|
69
|
-
-
|
|
70
|
-
- **Auto-capture**: Automatically captures new prefixes from your queries (enabled by default)
|
|
71
|
-
- **Request Configuration**: Configure HTTP request method, accept headers, arguments, headers, and named/default graphs
|
|
72
|
-
- **Default Prefixes**: Automatically includes `rdf:` and `rdfs:` prefixes for new users
|
|
73
|
-
- **Prefix Autocomplete**: When typing a prefix declaration (e.g., `PREFIX foaf:`), the editor automatically queries [prefix.cc](https://prefix.cc) to suggest and auto-complete the full URI commonly associated with that prefix. This helps you quickly add standard prefixes without needing to remember their full URIs.
|
|
33
|
+
- **🚀 Development Build**: [https://yasgui-doc.matdata.eu/dev/main/](https://matdata-eu.github.io/Yasgui/dev/main/)
|
|
34
|
+
- Live build from the main branch
|
|
35
|
+
- Updated automatically with every commit
|
|
36
|
+
- Test latest features before release
|
|
74
37
|
|
|
75
|
-
|
|
38
|
+
The documentation is version-tagged with the repository, ensuring consistency between code and documentation across releases.
|
|
76
39
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
- **Table**: Interactive table view with sorting, filtering, pagination, and column resizing. Ideal for SELECT query results.
|
|
80
|
-
- **Boolean**: Displays boolean results (true/false) with visual indicators. Automatically used for ASK queries.
|
|
81
|
-
- **Response**: Raw response viewer with syntax highlighting and code folding. Shows the original response from the endpoint in JSON, XML, Turtle, or other formats.
|
|
82
|
-
- **Geo**: Geographic visualization plugin for displaying spatial data on interactive maps. Visualizes geospatial triples with coordinates. See [Yasgui Geo TG Plugin](https://github.com/Thib-G/yasgui-geo-tg) for more details.
|
|
83
|
-
- **Graph**: Visual graph representation of RDF data using nodes and edges. Ideal for CONSTRUCT/DESCRIBE query results. See [Yasgui Graph Plugin](https://github.com/Matdata-eu/yasgui-graph-plugin) for more details.
|
|
84
|
-
- **Error**: Displays error messages and diagnostics when queries fail, including CORS troubleshooting guidance.
|
|
40
|
+
## Features
|
|
85
41
|
|
|
86
|
-
|
|
42
|
+
YASGUI provides a complete SPARQL development environment with powerful features:
|
|
43
|
+
|
|
44
|
+
### ✏️ Advanced Query Editor
|
|
45
|
+
- **[SPARQL Syntax Highlighting](./docs/user-guide.md#yasqe-query-editor)** - Color-coded SPARQL with error detection
|
|
46
|
+
- **[Smart Autocomplete](./docs/user-guide.md#prefix-management)** - Context-aware suggestions for keywords, prefixes, and URIs
|
|
47
|
+
- **[Query Formatting](./docs/user-guide.md#query-formatting)** - One-click query beautification with configurable formatters
|
|
48
|
+
- **[Prefix Management](./docs/user-guide.md#prefix-management)** - Auto-capture and reuse PREFIX declarations
|
|
49
|
+
- **[URI Explorer](./docs/user-guide.md#uri-explorer)** - Ctrl+Click URIs to explore connections
|
|
50
|
+
- **[Keyboard Shortcuts](./docs/user-guide.md#keyboard-shortcuts)** - Efficient query development workflow
|
|
51
|
+
|
|
52
|
+
### 📊 Powerful Visualizations
|
|
53
|
+
- **[Table Plugin](./docs/user-guide.md#table-plugin)** - Sortable, filterable, paginated result tables
|
|
54
|
+
- **[Graph Plugin](./docs/user-guide.md#graph-plugin)** - Interactive RDF graph visualization
|
|
55
|
+
- **[Geo Plugin](./docs/user-guide.md#geo-plugin)** - Geographic data on interactive maps
|
|
56
|
+
- **[Response Plugin](./docs/user-guide.md#response-plugin)** - Raw response viewer with syntax highlighting
|
|
57
|
+
- **[Boolean Plugin](./docs/user-guide.md#boolean-plugin)** - Visual true/false indicators for ASK queries
|
|
58
|
+
- **[Error Plugin](./docs/user-guide.md#error-plugin)** - Detailed error diagnostics
|
|
59
|
+
|
|
60
|
+
### 🎨 Themes & Layouts
|
|
61
|
+
- **[Light & Dark Themes](./docs/user-guide.md#themes)** - Seamless theme switching with persistent preferences
|
|
62
|
+
- **[Flexible Layouts](./docs/user-guide.md#layout-orientation)** - Vertical or horizontal editor/results arrangement
|
|
63
|
+
|
|
64
|
+
### 🔧 Expert Features
|
|
65
|
+
- **[Multiple Tabs](./docs/user-guide.md#query-tabs)** - Work on multiple queries simultaneously
|
|
66
|
+
- **[Endpoint Management](./docs/user-guide.md#endpoint-quick-switch)** - Quick-switch between SPARQL endpoints
|
|
67
|
+
- **[Persistent Storage](./docs/user-guide.md#query-history-and-persistence)** - Auto-save queries and preferences
|
|
68
|
+
- **[URL Sharing](./docs/user-guide.md#share-queries)** - Share queries via URL parameters
|
|
69
|
+
- **[Fullscreen Mode](./docs/user-guide.md#fullscreen-mode)** - Maximize editor or results viewer
|
|
70
|
+
- **[Export Results](./docs/developer-guide.md#yasr-class)** - Download results in various formats
|
|
71
|
+
|
|
72
|
+
For detailed feature documentation, see the **[User Guide](./docs/user-guide.md)**.
|
|
87
73
|
|
|
88
74
|
## Installation
|
|
89
75
|
|
|
90
|
-
Below are instructions on how to include Yasgui in your project.
|
|
91
|
-
If you only want to install Yasr or Yasqe, replace yasgui in the commands below.
|
|
92
|
-
|
|
93
76
|
### npm
|
|
94
77
|
|
|
95
|
-
```
|
|
96
|
-
npm
|
|
78
|
+
```bash
|
|
79
|
+
npm install @matdata/yasgui
|
|
97
80
|
```
|
|
98
81
|
|
|
99
82
|
### Yarn
|
|
100
83
|
|
|
101
|
-
```
|
|
84
|
+
```bash
|
|
102
85
|
yarn add @matdata/yasgui
|
|
103
86
|
```
|
|
104
87
|
|
|
105
|
-
###
|
|
88
|
+
### CDN
|
|
106
89
|
|
|
107
|
-
|
|
90
|
+
```html
|
|
91
|
+
<link rel="stylesheet" href="https://unpkg.com/@matdata/yasgui/build/yasgui.min.css" />
|
|
92
|
+
<script src="https://unpkg.com/@matdata/yasgui/build/yasgui.min.js"></script>
|
|
93
|
+
```
|
|
108
94
|
|
|
109
|
-
|
|
95
|
+
### Docker
|
|
96
|
+
|
|
97
|
+
```bash
|
|
110
98
|
docker pull mathiasvda/yasgui:latest
|
|
111
99
|
docker run -p 8080:8080 mathiasvda/yasgui:latest
|
|
112
100
|
```
|
|
113
101
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
```sh
|
|
102
|
+
**Custom endpoint:**
|
|
103
|
+
```bash
|
|
117
104
|
docker run -p 8080:8080 -e YASGUI_DEFAULT_ENDPOINT=https://your-endpoint.com/sparql mathiasvda/yasgui:latest
|
|
118
105
|
```
|
|
119
106
|
|
|
120
|
-
|
|
107
|
+
For detailed installation instructions and usage examples, see the **[Developer Guide](./docs/developer-guide.md#installation)**.
|
|
108
|
+
|
|
109
|
+
## Quick Start
|
|
110
|
+
|
|
111
|
+
### Basic HTML Usage
|
|
112
|
+
|
|
113
|
+
```html
|
|
114
|
+
<!DOCTYPE html>
|
|
115
|
+
<html>
|
|
116
|
+
<head>
|
|
117
|
+
<link rel="stylesheet" href="https://unpkg.com/@matdata/yasgui/build/yasgui.min.css" />
|
|
118
|
+
</head>
|
|
119
|
+
<body>
|
|
120
|
+
<div id="yasgui"></div>
|
|
121
|
+
|
|
122
|
+
<script src="https://unpkg.com/@matdata/yasgui/build/yasgui.min.js"></script>
|
|
123
|
+
<script>
|
|
124
|
+
const yasgui = new Yasgui(document.getElementById("yasgui"), {
|
|
125
|
+
requestConfig: {
|
|
126
|
+
endpoint: "https://dbpedia.org/sparql"
|
|
127
|
+
}
|
|
128
|
+
});
|
|
129
|
+
</script>
|
|
130
|
+
</body>
|
|
131
|
+
</html>
|
|
132
|
+
```
|
|
121
133
|
|
|
122
|
-
|
|
134
|
+
### ES Modules / React / Vue / Angular
|
|
123
135
|
|
|
124
|
-
|
|
136
|
+
```javascript
|
|
137
|
+
import Yasgui from '@matdata/yasgui';
|
|
138
|
+
import '@matdata/yasgui/build/yasgui.min.css';
|
|
125
139
|
|
|
126
|
-
|
|
140
|
+
const yasgui = new Yasgui(document.getElementById('yasgui'), {
|
|
141
|
+
requestConfig: {
|
|
142
|
+
endpoint: 'https://query.wikidata.org/sparql'
|
|
143
|
+
},
|
|
144
|
+
theme: 'dark',
|
|
145
|
+
orientation: 'horizontal'
|
|
146
|
+
});
|
|
147
|
+
```
|
|
127
148
|
|
|
128
|
-
|
|
149
|
+
For framework-specific examples and advanced usage, see the **[Developer Guide](./docs/developer-guide.md#usage-examples)**.
|
|
129
150
|
|
|
130
|
-
|
|
151
|
+
---
|
|
131
152
|
|
|
132
|
-
|
|
153
|
+
## Contributing
|
|
133
154
|
|
|
134
|
-
|
|
155
|
+
We welcome contributions! To get started:
|
|
135
156
|
|
|
136
|
-
|
|
157
|
+
1. Fork the repository
|
|
158
|
+
2. Clone and install: `npm install`
|
|
159
|
+
3. Run dev server: `npm run dev`
|
|
160
|
+
4. Make your changes
|
|
161
|
+
5. Run tests: `npm test`
|
|
162
|
+
6. Submit a pull request
|
|
163
|
+
|
|
164
|
+
For detailed contribution guidelines, see the **[Developer Guide](./docs/developer-guide.md#contributing)**.
|
|
165
|
+
|
|
166
|
+
---
|
|
137
167
|
|
|
138
168
|
## License
|
|
139
169
|
|
|
170
|
+
MIT License - see [LICENSE](./LICENSE) file for details.
|
|
171
|
+
|
|
140
172
|
This is a fork from [Zazuko](https://github.com/zazuko/Yasgui) who forked it from [Triply](https://github.com/TriplyDB/Yasgui).
|
|
141
173
|
|
|
142
|
-
|
|
174
|
+
---
|
|
143
175
|
|
|
144
|
-
## Release
|
|
176
|
+
## Release Notes & Changelog
|
|
145
177
|
|
|
146
|
-
Release notes
|
|
178
|
+
Release notes and changelog are available in the [Releases](https://github.com/Matdata-eu/Yasgui/releases) section.
|
|
147
179
|
|
|
148
|
-
|
|
180
|
+
For instructions on writing release notes, see [release_notes_instructions.md](./docs/release_notes_instructions.md)
|
package/package.json
CHANGED
package/src/store.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare module "store" {
|
|
2
|
+
interface StoreAPI {
|
|
3
|
+
enabled: boolean;
|
|
4
|
+
get(key: string): any;
|
|
5
|
+
set(key: string, value: any): void;
|
|
6
|
+
remove(key: string): void;
|
|
7
|
+
clearAll(): void;
|
|
8
|
+
each(callback: (value: any, key: string) => void): void;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const store: StoreAPI;
|
|
12
|
+
export default store;
|
|
13
|
+
}
|