@matdata/yasgui-utils 5.0.0 → 5.1.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.
Files changed (2) hide show
  1. package/README.md +148 -0
  2. package/package.json +1 -1
package/README.md ADDED
@@ -0,0 +1,148 @@
1
+ # YASGUI
2
+
3
+ YASGUI (Yet Another SPARQL GUI) is an advanced SPARQL client for querying and exploring RDF data. It provides a user-friendly interface for writing SPARQL queries, executing them against SPARQL endpoints, and visualizing the results in various formats.
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
30
+
31
+ ## Features
32
+
33
+ ### Themes
34
+
35
+ Yasgui supports both **light** and **dark** themes with instant switching:
36
+
37
+ - **Theme Toggle Button**: Quickly switch between light and dark modes using the button in the tab bar
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)
41
+
42
+ See the [Theme Guide](./docs/THEME_GUIDE.md) for detailed configuration options and usage examples.
43
+
44
+ See the [Theme Implementation Guide](./docs/THEME_IMPLEMENTATION_GUIDE.md) for detailed instructions on how to implement theme support in your own Yasgui plugins.
45
+
46
+ ### Keyboard Shortcuts
47
+
48
+ #### Query Editor (Yasqe)
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
57
+
58
+ #### Fullscreen Mode
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
62
+
63
+ #### URI Explorer
64
+ - **Ctrl+Click** on any URI in the query editor: Automatically executes a CONSTRUCT query to explore the clicked URI's connections (incoming and outgoing triples). The query runs in the background without modifying your current query in the editor.
65
+
66
+ ### Prefix Management
67
+ - **PREFIX Button**: Insert saved prefix declarations into your query (replaces existing PREFIX lines at the beginning)
68
+ - **Settings Modal**: Access via the settings button (⚙) to manage:
69
+ - **Saved Prefixes**: Define reusable PREFIX declarations
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.
74
+
75
+ ### Result Visualization Plugins (Yasr)
76
+
77
+ Yasgui includes several built-in plugins to visualize SPARQL query results:
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.
85
+
86
+ Plugins are automatically selected based on the query type and response format. You can manually switch between available plugins using the view selector in the results pane.
87
+
88
+ ## Installation
89
+
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
+ ### npm
94
+
95
+ ```sh
96
+ npm i @matdata/yasgui
97
+ ```
98
+
99
+ ### Yarn
100
+
101
+ ```sh
102
+ yarn add @matdata/yasgui
103
+ ```
104
+
105
+ ### Docker
106
+
107
+ Yasgui is also available as a Docker image on Docker Hub. Images are built and published automatically when a new release is created.
108
+
109
+ ```sh
110
+ docker pull mathiasvda/yasgui:latest
111
+ docker run -p 8080:8080 mathiasvda/yasgui:latest
112
+ ```
113
+
114
+ You can customize the default SPARQL endpoint by setting the `YASGUI_DEFAULT_ENDPOINT` environment variable:
115
+
116
+ ```sh
117
+ docker run -p 8080:8080 -e YASGUI_DEFAULT_ENDPOINT=https://your-endpoint.com/sparql mathiasvda/yasgui:latest
118
+ ```
119
+
120
+ The application will be available at `http://localhost:8080`.
121
+
122
+ ## Local Development
123
+
124
+ #### Installing dependencies
125
+
126
+ Run `npm install`.
127
+
128
+ #### Running Yasgui locally
129
+
130
+ To develop locally, run `npm run dev`
131
+
132
+ Go to `http://localhost:5173/demo` in your browser to see Yasgui in action.
133
+
134
+ #### Compiling Yasgui
135
+
136
+ Run `npm run build`. It'll store the transpiled js/css files in the `build` directory.
137
+
138
+ ## License
139
+
140
+ This is a fork from [Zazuko](https://github.com/zazuko/Yasgui) who forked it from [Triply](https://github.com/TriplyDB/Yasgui).
141
+
142
+ This code is released under the MIT license.
143
+
144
+ ## Release notes
145
+
146
+ Release notes can be found in the release section of the GitHub repository: [Yasgui Releases](https://github.com/Matdata-eu/yasgui/releases)
147
+
148
+ Instructions on how to write release notes are found in
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@matdata/yasgui-utils",
3
- "version": "5.0.0",
3
+ "version": "5.1.0",
4
4
  "description": "Utils for YASGUI libs",
5
5
  "main": "build/utils.min.js",
6
6
  "types": "build/ts/src/index.d.ts",