Skip to content

Commit cb1a73a

Browse files
authored
Merge branch 'main' into coverage-link
2 parents 6780a16 + 1dcf973 commit cb1a73a

File tree

5 files changed

+23
-18
lines changed

5 files changed

+23
-18
lines changed

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,11 @@
6363
"esbuild": "^0.25.8",
6464
"eslint": "^9.32.0",
6565
"eslint-plugin-html": "^8.1.1",
66-
"eslint-plugin-react-hooks": "^5.2.0",
66+
"eslint-plugin-react-hooks": "^7.0.0",
6767
"eslint-plugin-react-refresh": "^0.4.19",
6868
"express": "^5.1.0",
6969
"globals": "^16.0.0",
70-
"globby": "^14.0.0",
70+
"globby": "^15.0.0",
7171
"glsl-strip-comments": "^1.0.0",
7272
"gulp": "^5.0.0",
7373
"gulp-clean-css": "^4.3.0",
@@ -101,7 +101,7 @@
101101
"prismjs": "^1.28.0",
102102
"rimraf": "^6.0.1",
103103
"tsd-jsdoc": "^2.5.0",
104-
"typescript": "~5.8.3",
104+
"typescript": "^5.9.3",
105105
"typescript-eslint": "^8.30.1",
106106
"yargs": "^18.0.0"
107107
},

packages/sandcastle/package.json

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,15 @@
3737
"@types/prettier": "^2.7.3",
3838
"@types/react": "^19.0.10",
3939
"@types/react-dom": "^19.0.4",
40-
"@vitejs/plugin-react": "^4.3.4",
41-
"globals": "^15.15.0",
42-
"globby": "^14.1.0",
43-
"jsdom": "^26.1.0",
40+
"@vitejs/plugin-react": "^5.0.4",
41+
"globby": "^15.0.0",
42+
"jsdom": "^27.0.0",
4443
"pagefind": "^1.3.0",
4544
"rimraf": "^6.0.1",
4645
"slugify": "^1.6.6",
47-
"typescript": "~5.8.3",
48-
"vite": "^6.2.0",
49-
"vite-plugin-static-copy": "^2.3.1",
46+
"typescript": "^5.9.3",
47+
"vite": "^7.1.9",
48+
"vite-plugin-static-copy": "^3.1.3",
5049
"yaml": "^2.8.0"
5150
},
5251
"overrides": {

packages/sandcastle/src/App.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,12 @@ function RightSideAllotment({
106106
]);
107107
}
108108
setConsoleExpanded(!consoleExpanded);
109-
}, [consoleExpanded, previousConsoleHeight]);
109+
}, [
110+
consoleExpanded,
111+
previousConsoleHeight,
112+
consoleCollapsedHeight,
113+
setConsoleExpanded,
114+
]);
110115

111116
useImperativeHandle(ref, () => {
112117
return {

packages/sandcastle/src/Gallery/GalleryItemSearchInput.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { useCallback, useMemo, useRef } from "react";
1+
import { useCallback, useMemo, useRef, useState } from "react";
22
import { IconButton, TextBox } from "@stratakit/bricks";
33
import { close, search as searchIcon } from "../icons.ts";
44

@@ -7,14 +7,14 @@ import { useGalleryItemContext } from "./GalleryItemStore.ts";
77
export function GalleryItemSearchInput() {
88
const store = useGalleryItemContext();
99
const inputRef = useRef<HTMLInputElement>(null);
10-
const value = inputRef.current?.value;
1110
const { setSearchTerm, items } = store ?? {};
12-
const hasValue = !!value && value !== "";
11+
const [hasValue, setHasValue] = useState(false);
1312

1413
const clearSearch = useCallback(() => {
1514
const input = inputRef.current;
1615
if (input) {
1716
input.value = "";
17+
setHasValue(false);
1818
input.focus();
1919
}
2020

@@ -26,6 +26,7 @@ export function GalleryItemSearchInput() {
2626
const updateSearch = useCallback(
2727
(e: { target: { value: string | null } }) => {
2828
let term = e.target.value;
29+
setHasValue(!!term && term !== "");
2930
if (setSearchTerm) {
3031
if (term) {
3132
term = term.trim();

packages/sandcastle/src/SandcastleEditor.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,10 @@ function SandcastleEditor({
117117
});
118118
}, [fontSize]);
119119

120+
function formatEditor() {
121+
internalEditorRef.current?.getAction("editor.action.formatDocument")?.run();
122+
}
123+
120124
useImperativeHandle(ref, () => {
121125
return {
122126
formatCode() {
@@ -125,10 +129,6 @@ function SandcastleEditor({
125129
};
126130
}, []);
127131

128-
function formatEditor() {
129-
internalEditorRef.current?.getAction("editor.action.formatDocument")?.run();
130-
}
131-
132132
function handleEditorDidMount(
133133
editor: monaco.editor.IStandaloneCodeEditor,
134134
monaco: Monaco,

0 commit comments

Comments
 (0)