[mod] latest deps

This commit is contained in:
Andy Bunce 2025-08-26 10:53:45 +01:00
parent 5ffd6c7630
commit 5a8d24dc49
9 changed files with 990 additions and 2529 deletions

View file

@ -15,8 +15,8 @@
<body>
<nav class="navbar bg-body-tertiary">
<div class="container-fluid">
<a class="navbar-brand">XQuery 4.0 LSP client</a>
<a id="help" class="navbar-brand" >XQuery 4.0 LSP client
<button popovertarget="popHelp"><i class="bi bi-info-circle"></i></button></a>
<ul class="nav nav-pills">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="#">Editor</a>
@ -73,8 +73,8 @@
<div class="col flex-grow-1" style="overflow: auto;">
<div class="navbar py-0 bg-light">
<div class="btn-group mr-2" role="group" aria-label="First group">
<div class="btn-group mr-2" role="group" aria-label="First group">
<label for="file">File:</label>
<input id="iFile" type="url" value="file:///some/file.xqm" />
<select id="language">
@ -84,7 +84,7 @@
<option value="xml">xml</option>
</select>
<label for="symbols">Symbols:</label><select id="symbols" disabled="disabled"></select>
</div>
</div>
<div class="btn-group btn-group-sm " role="group" aria-label="Second group">
<button id="search" type="button" class="btn btn-light"><i class="bi bi-search"></i></button>
<button id="lint" type="button" class="btn btn-light"><i class="bi bi-info-square"></i></button>
@ -118,10 +118,11 @@
<button id="connect">connect</button>
</div>
</dialog>
<popup-info id="popHelp">hhhh</popup-info>
<dialog id="popSettings" popover>
<header>Editor configuration
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"
onclick="$('popSettings').hidePopover(); "></button>
</header>
<div class="modal-body">
@TODO

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -10,72 +10,21 @@ class PopupInfo extends HTMLElement {
const shadow = this.attachShadow({ mode: "open" });
// Create spans
const wrapper = document.createElement("span");
wrapper.setAttribute("class", "wrapper");
const icon = document.createElement("span");
icon.setAttribute("class", "icon");
icon.setAttribute("tabindex", 0);
const info = document.createElement("span");
info.setAttribute("class", "info");
// Take attribute content and put it inside the info span
const text = this.getAttribute("data-text");
info.textContent = text;
// Insert icon
let imgUrl;
if (this.hasAttribute("img")) {
imgUrl = this.getAttribute("img");
} else {
imgUrl = "img/default.png";
}
const img = document.createElement("img");
img.src = imgUrl;
icon.appendChild(img);
// Create some CSS to apply to the shadow dom
const style = document.createElement("style");
console.log(style.isConnected);
style.textContent = `
.wrapper {
position: relative;
}
.info {
font-size: 0.8rem;
width: 200px;
display: inline-block;
border: 1px solid black;
padding: 10px;
background: white;
border-radius: 10px;
opacity: 0;
transition: 0.6s all;
position: absolute;
bottom: 20px;
left: 10px;
z-index: 3;
}
img {
width: 1.2rem;
}
.icon:hover + .info, .icon:focus + .info {
opacity: 1;
}
`;
const dialog = document.createElement("dialog");
dialog.setAttribute("id", this.getAttribute("id"));
dialog.setAttribute("popover","popover");
const header = document.createElement("header");
header.innerText="HEADE"
const main = document.createElement("main");
main.innerText="MAIN"
const footer = document.createElement("footer");
footer.innerText="WWW"
dialog.appendChild(header);
dialog.appendChild(main);
dialog.appendChild(footer)
// Attach the created elements to the shadow dom
shadow.appendChild(style);
console.log(style.isConnected);
shadow.appendChild(wrapper);
wrapper.appendChild(icon);
wrapper.appendChild(info);
shadow.appendChild(dialog);
}
}

View file

@ -72,7 +72,7 @@ function connect() {
client = new lsp.LSPClient().connect(transport);
$("popConnect").hidePopover();
connectStatus(true);
let extLsp = lsp.languageServerSupport(client, file, "xquery");
let extLsp = lsp.languageServerSupport(client, file, "XXXXX");
extLint = lsp.linter(null,{ autoPanel: true });
const doc = view.state.doc.toString();
const state = lsp.createEditorState(doc, [...lsp.baseExts, extLsp, extLint,