[data-shapes] UI: Inventory of widgets (#718)

danielbeeke has just created a new issue for https://github.com/w3c/data-shapes:

== UI: Inventory of widgets ==
Issue: Expansion of `shui` Viewers, Editors, and Property Roles
---------------------------------------------------------------

### Description

To improve the utility of the `shui` namespace, we propose the inclusion of additional standard viewers and editors. While the current import of `dash` provides a strong foundation, modern RDF applications frequently require specialized handling for Markdown, Geospatial data, and complex HTML5 media elements.

### Proposed Viewers & Editors

| Category    | Component            | Description                                         |
|-------------|----------------------|-----------------------------------------------------|
| Media       | shui:VideoViewer     | Handles subtitles, captions, and sources via property roles. |
|             | shui:AudioViewer     | Standard audio controls and source management.      |
|             | shui:PictureViewer   | Optimized for <img> and <picture> with alt-text.    |
|             | shui:IIIfViewer      | Specifically for IIIF manifest/image integration.   |
| Geospatial  | shui:SimpleGeoViewer | Basic polygon/shape rendering.                      |
|             | shui:MapGeoViewer    | Interactive map view for single points/polygons.    |
|             | shui:GeoMultiViewer  | Layered map view for multiple geo-entities.  Uses property roles       |
|             | shui:GeoEditor       | Input for WKT or GeoJSON strings.                   |
| Code/Markup | shui:MarkdownViewer \* | Renders Markdown literals as HTML.                  |
|             | shui:MarkdownEditor \*  | WYSIWYG or side-by-side Markdown editor.            |
|             | shui:MermaidViewer \*   | Renders diagram code into visual charts.            |
|             | shui:JSONViewer      | Formatted view for rdf:JSON literals.               |
|             | shui:SPARQLViewer  \*   | Syntax highlighting for SPARQL queries.             |

* * *

### Handling Complex Media with `shui:propertyRole`

For complex HTML elements like `<picture>` or `<video>`, a flat literal is often insufficient. We propose leveraging `shui:propertyRole` to map specific properties of a `shui:NodeShape` to the internal requirements of the viewer.

Example: Picture Multi-Viewer Logic

A NodeShape representing an image could utilize the following new roles:

*   `shui:AltRole`: Maps a property to the `alt` attribute.
    
*   `shui:SrcsetRole`: Maps a property to responsive image sources.
    
*   `shui:CreditRole`: For attribution or captions.
    

* * *

### Canonical IRIs for Literals (Question for the Group)

To implement the viewers marked with an asterisk (\*), we need to finalize the canonical IRIs for these datatypes. Potential candidates include:

*   **Markdown:** `https://w3id.org/formats/Markdown` (or a specific IANA-based URN)
    
*   **Mermaid:** `https://mermaid.js.org/datatype` (?)
    
*   **SPARQL:** `http://www.w3.org/ns/formats/SPARQL_Query`
    

### Proposed New Roles

*   `shui:AltRole`
    
*   `shui:SubTitleRole`
    
*   `shui:CreditRole`
    
*   `shui:SrcsetRole`
    
*   `shui:GeoRole` (To differentiate between primary coordinates and metadata)
    

* * *

### Discussion Points

1.  **Core widgets vs. comunity:** Which of these potential widgets should be in SHACL 1.2 UI?
2. **Missing widgets:** Do you have additional widgets that could be in SHACL 1.2 UI?

Please view or discuss this issue at https://github.com/w3c/data-shapes/issues/718 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 7 January 2026 10:26:39 UTC