@matdata/yasgui-utils 5.1.0 → 5.2.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 +48 -0
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -43,6 +43,42 @@ See the [Theme Guide](./docs/THEME_GUIDE.md) for detailed configuration options
43
43
 
44
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
45
 
46
+ ### Layout Orientation
47
+
48
+ Yasgui supports two layout orientations to optimize screen space usage:
49
+
50
+ - **Vertical Layout (Default)**: YASQE (query editor) positioned above YASR (results viewer)
51
+ - **Horizontal Layout**: YASQE and YASR positioned side-by-side
52
+
53
+ The horizontal layout is particularly useful for wide monitors, allowing you to dedicate the complete height to both the query editor and results viewer.
54
+
55
+ #### Runtime Toggle
56
+
57
+ Users can switch between vertical and horizontal layouts at any time using the **layout toggle button** in the control bar (next to the endpoint selector). This button shows:
58
+ - **Side-by-side rectangles icon** when in vertical mode (click to switch to horizontal)
59
+ - **Stacked rectangles icon** when in horizontal mode (click to switch to vertical)
60
+
61
+ #### Initial Configuration
62
+
63
+ You can also set the initial layout orientation when creating a Yasgui instance:
64
+
65
+ ```javascript
66
+ new Yasgui(document.getElementById("yasgui"), {
67
+ orientation: "horizontal" // or "vertical" (default)
68
+ });
69
+ ```
70
+
71
+ #### CSS Customization
72
+
73
+ Customize the header height used in the horizontal layout calculation by setting the CSS custom property:
74
+
75
+ ```css
76
+ .yasgui {
77
+ --yasgui-header-height: 120px; /* Adjust based on your header height */
78
+ --yasgui-min-height: 500px; /* Minimum height for horizontal layout panels */
79
+ }
80
+ ```
81
+
46
82
  ### Keyboard Shortcuts
47
83
 
48
84
  #### Query Editor (Yasqe)
@@ -72,6 +108,18 @@ See the [Theme Implementation Guide](./docs/THEME_IMPLEMENTATION_GUIDE.md) for d
72
108
  - **Default Prefixes**: Automatically includes `rdf:` and `rdfs:` prefixes for new users
73
109
  - **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
110
 
111
+ ### Endpoint Quick Switch Buttons
112
+
113
+ Configure predefined SPARQL endpoint buttons for quick switching between different endpoints:
114
+
115
+ - **Predefined Buttons**: Configure a list of endpoint buttons during Yasgui initialization
116
+ - **User-Defined Buttons**: Users can add their own custom endpoint buttons through the Settings modal
117
+ - **One-Click Switching**: Instantly switch to a different SPARQL endpoint with a single button click
118
+ - **Persistent Custom Buttons**: User-defined buttons are saved in local storage
119
+ - **Fully Themed**: Buttons automatically adapt to light and dark themes
120
+
121
+ For detailed configuration options and examples, see the [Endpoint Buttons Guide](./docs/ENDPOINT_BUTTONS.md).
122
+
75
123
  ### Result Visualization Plugins (Yasr)
76
124
 
77
125
  Yasgui includes several built-in plugins to visualize SPARQL query results:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@matdata/yasgui-utils",
3
- "version": "5.1.0",
3
+ "version": "5.2.0",
4
4
  "description": "Utils for YASGUI libs",
5
5
  "main": "build/utils.min.js",
6
6
  "types": "build/ts/src/index.d.ts",