frontend: preact 11.2.0
All four packages move from preact 10.29.8 to 11.2.0. The new types need four small changes in swarm-ui and the shared dropdown: a ref that may be empty is typed RefObject<T | null>, HTMLAttributes is imported from preact instead of read from the JSX namespace, and TextField's type is the five kinds it is used with, asserted once for the input's new union. npm-deps-hash follows the lockfile.
This commit is contained in:
parent
fae9398295
commit
d76d54c412
11 changed files with 23 additions and 20 deletions
|
|
@ -1 +1 @@
|
|||
sha256-PO8UpPlpyNE4DbhFJAFk3PQNWrBf02XirBuYqtu5fAg=
|
||||
sha256-Hzu21wcDxdn32JJPpj/3sJSkEDH32mqrm4YsFvHfni0=
|
||||
|
|
|
|||
16
frontend/package-lock.json
generated
16
frontend/package-lock.json
generated
|
|
@ -904,16 +904,16 @@
|
|||
}
|
||||
},
|
||||
"node_modules/preact": {
|
||||
"version": "10.29.8",
|
||||
"resolved": "https://registry.npmjs.org/preact/-/preact-10.29.8.tgz",
|
||||
"integrity": "sha512-ej2aVZ+vZ8WO7tvlQWRM9N63A0KzF9q4mWJfDUHgYaIofWY9hu74QdnQrjoPMmZi2/nZ5gN0bJCQF49xQqx09Q==",
|
||||
"version": "11.2.0",
|
||||
"resolved": "https://registry.npmjs.org/preact/-/preact-11.2.0.tgz",
|
||||
"integrity": "sha512-/HfHI/7N84e6GrWBJ3J280z3mLaRJiDcSvj/A+y/4AbLnND/1UlGHe1sR6oYuTGwId0nP7dqDU9OnLxMPZ7xBg==",
|
||||
"license": "MIT",
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/preact"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"preact-render-to-string": ">=5"
|
||||
"preact-render-to-string": ">=6.7.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"preact-render-to-string": {
|
||||
|
|
@ -983,7 +983,7 @@
|
|||
"dependencies": {
|
||||
"@hive/shared": "*",
|
||||
"chart.js": "4.6.1",
|
||||
"preact": "10.29.8"
|
||||
"preact": "11.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"typescript": "7.0.2"
|
||||
|
|
@ -994,7 +994,7 @@
|
|||
"version": "0.0.0",
|
||||
"dependencies": {
|
||||
"@hive/shared": "*",
|
||||
"preact": "10.29.8"
|
||||
"preact": "11.2.0"
|
||||
}
|
||||
},
|
||||
"packages/shared": {
|
||||
|
|
@ -1003,7 +1003,7 @@
|
|||
"dependencies": {
|
||||
"dompurify": "^3.2.4",
|
||||
"marked": "18.1.3",
|
||||
"preact": "10.29.8"
|
||||
"preact": "11.2.0"
|
||||
}
|
||||
},
|
||||
"packages/swarm-ui": {
|
||||
|
|
@ -1011,7 +1011,7 @@
|
|||
"version": "0.0.0",
|
||||
"dependencies": {
|
||||
"@hive/shared": "*",
|
||||
"preact": "10.29.8",
|
||||
"preact": "11.2.0",
|
||||
"wouter-preact": "3.13.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
"dependencies": {
|
||||
"@hive/shared": "*",
|
||||
"chart.js": "4.6.1",
|
||||
"preact": "10.29.8"
|
||||
"preact": "11.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"typescript": "7.0.2"
|
||||
|
|
|
|||
|
|
@ -9,6 +9,6 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"@hive/shared": "*",
|
||||
"preact": "10.29.8"
|
||||
"preact": "11.2.0"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
"dependencies": {
|
||||
"dompurify": "^3.2.4",
|
||||
"marked": "18.1.3",
|
||||
"preact": "10.29.8"
|
||||
"preact": "11.2.0"
|
||||
},
|
||||
"exports": {
|
||||
".": "./src/index.js",
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ export interface DropdownProps {
|
|||
* `MetaNav`'s own hand-rolled popover (which wraps trigger+popover in
|
||||
* one ref) already avoids this.
|
||||
*/
|
||||
anchorRef?: RefObject<HTMLElement>;
|
||||
anchorRef?: RefObject<HTMLElement | null>;
|
||||
}
|
||||
|
||||
export function Dropdown({
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"@hive/shared": "*",
|
||||
"preact": "10.29.8",
|
||||
"preact": "11.2.0",
|
||||
"wouter-preact": "3.13.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ export function AgentDetailPopover({
|
|||
agent: string;
|
||||
open: boolean;
|
||||
onClose: () => void;
|
||||
anchorRef: RefObject<HTMLElement>;
|
||||
anchorRef: RefObject<HTMLElement | null>;
|
||||
}) {
|
||||
// `undefined` until the roster has answered; `null` when it has and the
|
||||
// agent is not in it.
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
// the slots with the real sub components; `AgentCardSkeleton` fills the same
|
||||
// slots with placeholder shapes, so the card that replaces it lands in the same
|
||||
// place.
|
||||
import type { ComponentChildren, JSX } from "preact";
|
||||
import type { ComponentChildren, HTMLAttributes } from "preact";
|
||||
import "./AgentCard.css";
|
||||
|
||||
export function AgentCardLayout({
|
||||
|
|
@ -23,7 +23,7 @@ export function AgentCardLayout({
|
|||
message: ComponentChildren;
|
||||
chevron?: ComponentChildren;
|
||||
/** Attributes of the header row, for the card that opens on a click. */
|
||||
rowProps?: JSX.HTMLAttributes<HTMLDivElement>;
|
||||
rowProps?: HTMLAttributes<HTMLDivElement>;
|
||||
}) {
|
||||
return (
|
||||
<div class="ui-agent-card-row" {...rowProps}>
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ export function Popover({
|
|||
onClose: () => void;
|
||||
/** The element the popover hangs under. A click on it is not an outside
|
||||
* click, so its own toggle handler stays in charge of closing. */
|
||||
anchorRef: RefObject<HTMLElement>;
|
||||
anchorRef: RefObject<HTMLElement | null>;
|
||||
/** `aria-label` for the floating box. */
|
||||
label: string;
|
||||
children: ComponentChildren;
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ export function TextField({
|
|||
label: string;
|
||||
value: string;
|
||||
onInput: (value: string) => void;
|
||||
type?: string;
|
||||
type?: "text" | "password" | "number" | "url" | "datetime-local";
|
||||
pattern?: string;
|
||||
title?: string;
|
||||
required?: boolean;
|
||||
|
|
@ -46,7 +46,10 @@ export function TextField({
|
|||
<input
|
||||
id={id}
|
||||
class="ui-form-control"
|
||||
type={type}
|
||||
// preact 11 types `type` as a union that ties each kind to its own
|
||||
// `list` and `role` attributes; the field takes any of its kinds and
|
||||
// passes `list` only for suggestions, so the union is asserted here.
|
||||
type={type as "text"}
|
||||
value={value}
|
||||
pattern={pattern}
|
||||
title={title}
|
||||
|
|
|
|||
Loading…
Reference in a new issue