@volvel/ui 0.6.0 → 0.7.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/THIRD_PARTY_NOTICES.md +21 -3
- package/dist/ContextMenu.js +28 -1
- package/package.json +8 -3
package/THIRD_PARTY_NOTICES.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Third-party notices
|
|
2
2
|
|
|
3
|
-
Volvel is licensed under the Apache License 2.0. It distributes the
|
|
3
|
+
Volvel is licensed under the Apache License 2.0. It distributes the 523 packages below, each under its own license, and each license asks that its notice travel with the code. This file is generated by `node scripts/third-party-notices.mjs`.
|
|
4
4
|
|
|
5
5
|
## @antfu/install-pkg 2.1.0
|
|
6
6
|
|
|
@@ -8975,7 +8975,7 @@ MIT License
|
|
|
8975
8975
|
SOFTWARE
|
|
8976
8976
|
~~~~
|
|
8977
8977
|
|
|
8978
|
-
## @types/node
|
|
8978
|
+
## @types/node 26.6.11
|
|
8979
8979
|
|
|
8980
8980
|
License: MIT
|
|
8981
8981
|
Home page: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node
|
|
@@ -9304,6 +9304,24 @@ The above copyright notice and this permission notice shall be included in all c
|
|
|
9304
9304
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
9305
9305
|
~~~~
|
|
9306
9306
|
|
|
9307
|
+
## @xmldom/xmldom 0.9.12
|
|
9308
|
+
|
|
9309
|
+
License: MIT
|
|
9310
|
+
Home page: https://github.com/xmldom/xmldom
|
|
9311
|
+
|
|
9312
|
+
### LICENSE
|
|
9313
|
+
|
|
9314
|
+
~~~~text
|
|
9315
|
+
Copyright 2019 - present Christopher J. Brody and other contributors, as listed in: https://github.com/xmldom/xmldom/graphs/contributors
|
|
9316
|
+
Copyright 2012 - 2017 @jindw <jindw@xidea.org> and other contributors, as listed in: https://github.com/jindw/xmldom/graphs/contributors
|
|
9317
|
+
|
|
9318
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
9319
|
+
|
|
9320
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
9321
|
+
|
|
9322
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
9323
|
+
~~~~
|
|
9324
|
+
|
|
9307
9325
|
## @xyflow/react 13.0.3
|
|
9308
9326
|
|
|
9309
9327
|
License: MIT
|
|
@@ -21120,7 +21138,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
|
21120
21138
|
SOFTWARE.
|
|
21121
21139
|
~~~~
|
|
21122
21140
|
|
|
21123
|
-
## undici-types
|
|
21141
|
+
## undici-types 8.9.0
|
|
21124
21142
|
|
|
21125
21143
|
License: MIT
|
|
21126
21144
|
Home page: https://undici.nodejs.org
|
package/dist/ContextMenu.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { ContextMenu as Base } from "@base-ui/react/context-menu";
|
|
3
|
+
/** Shift+F10 and the Menu key: the keyboard's way to a context menu. */
|
|
4
|
+
const asksForMenu = (event) => event.key === "ContextMenu" || (event.key === "F10" && event.shiftKey);
|
|
3
5
|
/**
|
|
4
6
|
* A menu that opens where something is right-clicked, or from the keyboard
|
|
5
7
|
* with Shift+F10 or the Menu key on what has focus (08 §3.16). Its items have
|
|
@@ -7,5 +9,30 @@ import { ContextMenu as Base } from "@base-ui/react/context-menu";
|
|
|
7
9
|
* `items` may depend on what was clicked: read it in `onOpen`.
|
|
8
10
|
*/
|
|
9
11
|
export function ContextMenu({ items, children, onOpen, className = "", }) {
|
|
10
|
-
return (_jsxs(Base.Root, { children: [_jsx(Base.Trigger, { className: className,
|
|
12
|
+
return (_jsxs(Base.Root, { children: [_jsx(Base.Trigger, { className: className,
|
|
13
|
+
// Browsers do not all send a right click for these keys, nor to the focused element, so the
|
|
14
|
+
// menu is opened here, at the element that has focus: the step or the canvas.
|
|
15
|
+
onKeyDown: (event) => {
|
|
16
|
+
const on = event.target;
|
|
17
|
+
if (event.defaultPrevented || !asksForMenu(event) || !(on instanceof HTMLElement))
|
|
18
|
+
return;
|
|
19
|
+
if (on.matches("input, textarea, select, [contenteditable]"))
|
|
20
|
+
return;
|
|
21
|
+
event.preventDefault();
|
|
22
|
+
const at = on.getBoundingClientRect();
|
|
23
|
+
// A small element is opened on at its lower edge; a large one (the canvas) near its corner.
|
|
24
|
+
const big = at.width > 320 || at.height > 240;
|
|
25
|
+
on.dispatchEvent(new MouseEvent("contextmenu", {
|
|
26
|
+
bubbles: true,
|
|
27
|
+
cancelable: true,
|
|
28
|
+
button: 2,
|
|
29
|
+
clientX: Math.round(big ? at.left + 24 : at.left + at.width / 2),
|
|
30
|
+
clientY: Math.round(big ? at.top + 24 : at.bottom),
|
|
31
|
+
}));
|
|
32
|
+
},
|
|
33
|
+
// Some systems send the menu on the key coming up: that one is already answered.
|
|
34
|
+
onKeyUp: (event) => {
|
|
35
|
+
if (asksForMenu(event))
|
|
36
|
+
event.preventDefault();
|
|
37
|
+
}, onContextMenu: (event) => onOpen?.(event.target instanceof Element ? event.target : null), children: children }), _jsx(Base.Portal, { children: _jsx(Base.Positioner, { className: "layer-popover", children: _jsx(Base.Popup, { className: "max-h-[70vh] min-w-44 overflow-y-auto rounded-control border border-line bg-surface p-1 shadow-overlay transition-[opacity,translate] motion-base data-[ending-style]:opacity-0 data-[starting-style]:opacity-0 data-[starting-style]:-translate-y-1", children: items.map((item) => (_jsxs("div", { children: [item.separated ? _jsx(Base.Separator, { className: "my-1 h-px bg-line" }) : null, _jsxs(Base.Item, { onClick: item.onSelect, className: `flex cursor-default items-center gap-2 rounded-inner px-3 py-1.5 data-[highlighted]:bg-action-soft ${item.danger ? "text-danger data-[highlighted]:bg-danger-soft" : ""}`, children: [item.icon ? _jsx("span", { className: "flex w-4 justify-center", children: item.icon }) : null, _jsx("span", { className: "min-w-0 flex-1 truncate", children: item.label }), item.keys ? (_jsx("kbd", { className: "font-mono text-code-sm text-ink-subtle", children: item.keys })) : null] })] }, item.label))) }) }) })] }));
|
|
11
38
|
}
|
package/package.json
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@volvel/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Volvel's component kit: the components the console and tenants' apps are drawn with, on theme tokens.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/volveldev/Volvel.git",
|
|
10
|
+
"directory": "packages/ui"
|
|
11
|
+
},
|
|
7
12
|
"exports": {
|
|
8
13
|
".": {
|
|
9
14
|
"types": "./dist/index.d.ts",
|
|
@@ -33,8 +38,8 @@
|
|
|
33
38
|
"vega": "^6.4.0",
|
|
34
39
|
"vega-interpreter": "^2.3.2",
|
|
35
40
|
"vega-lite": "^6.5.0",
|
|
36
|
-
"@volvel/
|
|
37
|
-
"@volvel/
|
|
41
|
+
"@volvel/markup": "0.7.0",
|
|
42
|
+
"@volvel/widgets": "0.7.0"
|
|
38
43
|
},
|
|
39
44
|
"devDependencies": {
|
|
40
45
|
"@testing-library/react": "^16.3.3",
|