mirror of
https://github.com/DustinBrett/daedalOS.git
synced 2025-12-06 00:20:05 +01:00
This commit is contained in:
parent
22f539a54b
commit
c98d8d823d
|
|
@ -5,7 +5,9 @@
|
|||
"rules": {
|
||||
"alpha-value-notation": "percentage",
|
||||
"hue-degree-notation": "number",
|
||||
"nesting-selector-no-missing-scoping-root": null,
|
||||
"no-empty-source": null,
|
||||
"no-invalid-position-declaration": null,
|
||||
"order/properties-alphabetical-order": true,
|
||||
"value-keyword-case": [
|
||||
"lower",
|
||||
|
|
|
|||
|
|
@ -78,10 +78,10 @@ const formatSize = (size?: number): string => {
|
|||
let newSize = size / 1024 ** power;
|
||||
newSize =
|
||||
newSize >= 100 ? Math.round(newSize) : Math.round(newSize * 10) / 10;
|
||||
let newNumber = Number(newSize).toString();
|
||||
let newNumber = newSize.toString();
|
||||
|
||||
if (newNumber.length > 3) {
|
||||
newNumber = Number(Math.round(newSize)).toString();
|
||||
newNumber = Math.round(newSize).toString();
|
||||
}
|
||||
|
||||
const addTrailingZero = newSize !== 0 && newSize < 10 && newSize % 1 === 0;
|
||||
|
|
|
|||
|
|
@ -415,7 +415,7 @@ const Browser: FC<ComponentProcessProps> = ({ id }) => {
|
|||
</Button>
|
||||
<Button
|
||||
disabled={!canGoForward}
|
||||
onClick={() => changeHistory(+1)}
|
||||
onClick={() => changeHistory(1)}
|
||||
{...label("Click to go forward")}
|
||||
{...forwardMenu}
|
||||
>
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ const Navigation: FC<NavigationProps> = ({
|
|||
</Button>
|
||||
<Button
|
||||
disabled={!canGoForward}
|
||||
onClick={() => moveHistory(+1)}
|
||||
onClick={() => moveHistory(1)}
|
||||
{...label(
|
||||
canGoForward
|
||||
? `Forward to ${basename(history[position + 1]) || ROOT_NAME}`
|
||||
|
|
|
|||
|
|
@ -11,10 +11,10 @@ const StyledMarked = styled.div`
|
|||
font-size: 16px;
|
||||
height: 100%;
|
||||
line-height: 1.5;
|
||||
overflow-wrap: break-word;
|
||||
overflow-y: auto;
|
||||
padding: 16px 32px;
|
||||
width: 100%;
|
||||
word-wrap: break-word;
|
||||
|
||||
* {
|
||||
all: revert;
|
||||
|
|
|
|||
|
|
@ -78,8 +78,8 @@ const StyledChatLog = styled.ol`
|
|||
div {
|
||||
cursor: auto;
|
||||
overflow: hidden;
|
||||
overflow-wrap: break-word;
|
||||
user-select: text;
|
||||
word-wrap: break-word;
|
||||
|
||||
img {
|
||||
border-radius: 5px;
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ const usePDF = (
|
|||
canvas.height = viewport.height;
|
||||
canvas.width = viewport.width;
|
||||
|
||||
await page.render({ canvasContext, viewport }).promise;
|
||||
await page.render({ canvas, canvasContext, viewport }).promise;
|
||||
|
||||
return canvas;
|
||||
},
|
||||
|
|
|
|||
|
|
@ -160,7 +160,10 @@ const Paint: FC<ComponentProcessProps> = ({ id }) => {
|
|||
prependFileToTitle("Untitled");
|
||||
}
|
||||
};
|
||||
jsPaintInstance.open_from_file(new File([buffer], url), url);
|
||||
jsPaintInstance.open_from_file(
|
||||
new File([buffer as BlobPart], url),
|
||||
url
|
||||
);
|
||||
prependFileToTitle(basename(url));
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -179,7 +179,9 @@ const loadWapm = async (
|
|||
) {
|
||||
bindings ||= (await import("wasi-js/dist/bindings/browser")).default;
|
||||
|
||||
const wasmModule = await WebAssembly.compile(moduleResponse);
|
||||
const wasmModule = await WebAssembly.compile(
|
||||
moduleResponse as BufferSource
|
||||
);
|
||||
const stdIn =
|
||||
(WAPM_STD_IN_APPS.includes(args[0]) ||
|
||||
(getExtension(args[0]) === ".wasm" &&
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ export const runPython = async (
|
|||
result = await window.pyodide.runPythonAsync("sys.stdout.getvalue()");
|
||||
}
|
||||
|
||||
if (result) printLn(result.toString());
|
||||
if (result) printLn(result);
|
||||
} catch (error) {
|
||||
const { message } = error as PyError;
|
||||
|
||||
|
|
|
|||
|
|
@ -242,7 +242,7 @@ const useVideoPlayer = ({
|
|||
|
||||
codecBox.current = window.initCodecBox?.({
|
||||
canvas: canvasElement as HTMLCanvasElement,
|
||||
file: new File([buffer as Buffer], basename(url)),
|
||||
file: new File([buffer as BlobPart], basename(url)),
|
||||
onDecoding: (currentTime) => {
|
||||
if (!Number.isNaN(currentTime)) {
|
||||
target?.player?.tech_?.stopTrackingCurrentTime();
|
||||
|
|
|
|||
|
|
@ -302,7 +302,7 @@ export const parseTrack = async (
|
|||
|
||||
export const createM3uPlaylist = (tracks: URLTrack[]): string => {
|
||||
const m3uPlaylist = tracks.map((track): string => {
|
||||
const trackUrl = track.url ? `\n${track.url.toString()}` : "";
|
||||
const trackUrl = track.url ? `\n${track.url}` : "";
|
||||
let title = track.defaultName;
|
||||
|
||||
if (track.metaData?.artist) {
|
||||
|
|
|
|||
|
|
@ -26,6 +26,8 @@ const StyledRenameBox = styled.textarea.attrs<StyledRenameBoxProps>(() => ({
|
|||
min-height: 19px;
|
||||
min-width: 30px;
|
||||
overflow: hidden;
|
||||
overflow-wrap: ${({ $singleLineMode }) =>
|
||||
$singleLineMode ? "normal" : undefined};
|
||||
padding: ${({ theme }) => `1px ${theme.sizes.fileEntry.renamePadding}px`};
|
||||
position: ${({ $singleLineMode }) =>
|
||||
$singleLineMode ? "absolute" : "relative"};
|
||||
|
|
@ -34,8 +36,6 @@ const StyledRenameBox = styled.textarea.attrs<StyledRenameBoxProps>(() => ({
|
|||
top: ${({ $singleLineMode }) => ($singleLineMode ? "3px" : "2px")};
|
||||
user-select: text;
|
||||
white-space: break-spaces;
|
||||
word-wrap: ${({ $singleLineMode }) =>
|
||||
$singleLineMode ? "normal" : undefined};
|
||||
z-index: 1;
|
||||
`;
|
||||
|
||||
|
|
|
|||
|
|
@ -325,7 +325,7 @@ const useFolder = (
|
|||
});
|
||||
const fileWriter = await filePickerHandle.createWritable();
|
||||
|
||||
await fileWriter.write(contents);
|
||||
await fileWriter.write(contents as BufferSource);
|
||||
await fileWriter.close();
|
||||
} catch {
|
||||
// Ignore failure with file picker
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ const useMinMaxRef = (id: string): React.RefObject<boolean> => {
|
|||
const blockAutoPositionRef = useRef(false);
|
||||
|
||||
useEffect(() => {
|
||||
blockAutoPositionRef.current = Boolean(maximized || minimized);
|
||||
blockAutoPositionRef.current = maximized || minimized;
|
||||
}, [maximized, minimized]);
|
||||
|
||||
return blockAutoPositionRef;
|
||||
|
|
|
|||
|
|
@ -273,14 +273,15 @@ test.describe("has files & folders", () => {
|
|||
|
||||
await context.grantPermissions(["clipboard-write"]);
|
||||
await page.evaluate(
|
||||
([icon]) =>
|
||||
async ([icon]) =>
|
||||
navigator.clipboard.write([
|
||||
new ClipboardItem({
|
||||
"image/png": atob(icon.replace("data:image/png;base64,", "")),
|
||||
"image/png": await (await fetch(icon)).blob(),
|
||||
}),
|
||||
]),
|
||||
[UNKNOWN_ICON]
|
||||
);
|
||||
|
||||
await fileExplorerEntryIsHidden(TEST_IMAGE_NAME, { page });
|
||||
|
||||
await page.keyboard.press("Control+KeyV");
|
||||
|
|
|
|||
48
package.json
48
package.json
|
|
@ -60,22 +60,22 @@
|
|||
"gif.js": "^0.2.0",
|
||||
"idb": "^8.0.3",
|
||||
"ini": "^5.0.0",
|
||||
"isomorphic-git": "^1.32.1",
|
||||
"isomorphic-git": "^1.32.2",
|
||||
"libheif-js": "^1.19.8",
|
||||
"mediainfo.js": "0.3.5",
|
||||
"minimist": "^1.2.8",
|
||||
"motion": "^12.23.6",
|
||||
"motion": "^12.23.12",
|
||||
"multiformats": "^13.3.7",
|
||||
"music-metadata-browser": "^2.5.11",
|
||||
"next": "^15.4.2",
|
||||
"next": "^15.4.5",
|
||||
"nostr-tools": "^1.17.0",
|
||||
"opentype.js": "^1.3.4",
|
||||
"playlist-parser": "^0.0.12",
|
||||
"prettier": "^3.6.2",
|
||||
"print-js": "^1.6.0",
|
||||
"quickjs-emscripten": "^0.31.0",
|
||||
"react": "^19.1.0",
|
||||
"react-dom": "^19.1.0",
|
||||
"react": "^19.1.1",
|
||||
"react-dom": "^19.1.1",
|
||||
"react-rnd": "^10.5.2",
|
||||
"resedit": "^2.0.3",
|
||||
"rtf.js": "^3.0.9",
|
||||
|
|
@ -86,9 +86,9 @@
|
|||
"devDependencies": {
|
||||
"7z-wasm": "^1.2.0",
|
||||
"@axe-core/playwright": "^4.10.2",
|
||||
"@next/bundle-analyzer": "^15.4.2",
|
||||
"@next/eslint-plugin-next": "^15.4.2",
|
||||
"@playwright/test": "^1.54.1",
|
||||
"@next/bundle-analyzer": "^15.4.5",
|
||||
"@next/eslint-plugin-next": "^15.4.5",
|
||||
"@playwright/test": "^1.54.2",
|
||||
"@types/canvas-confetti": "^1.9.0",
|
||||
"@types/dom-chromium-ai": "0.0.6",
|
||||
"@types/dompurify": "^3.2.0",
|
||||
|
|
@ -97,34 +97,34 @@
|
|||
"@types/jest": "^30.0.0",
|
||||
"@types/lunr": "^2.3.7",
|
||||
"@types/minimist": "^1.2.5",
|
||||
"@types/node": "^24.0.15",
|
||||
"@types/node": "^24.2.0",
|
||||
"@types/offscreencanvas": "^2019.7.3",
|
||||
"@types/opentype.js": "^1.3.8",
|
||||
"@types/react": "^19.1.8",
|
||||
"@types/react-dom": "^19.1.6",
|
||||
"@types/react": "^19.1.9",
|
||||
"@types/react-dom": "^19.1.7",
|
||||
"@types/ua-parser-js": "^0.7.39",
|
||||
"@types/video.js": "^7.3.58",
|
||||
"@types/wicg-file-system-access": "^2023.10.6",
|
||||
"@typescript-eslint/eslint-plugin": "^8.37.0",
|
||||
"@typescript-eslint/parser": "^8.37.0",
|
||||
"@typescript-eslint/eslint-plugin": "^8.39.0",
|
||||
"@typescript-eslint/parser": "^8.39.0",
|
||||
"emulators": "^8.3.9",
|
||||
"emulators-ui": "^0.73.9",
|
||||
"eruda": "^3.4.3",
|
||||
"eslint": "^8.57.0",
|
||||
"eslint-config-airbnb": "^19.0.4",
|
||||
"eslint-config-next": "^15.4.2",
|
||||
"eslint-config-next": "^15.4.5",
|
||||
"eslint-config-prettier": "^10.1.8",
|
||||
"eslint-plugin-deprecation": "^3.0.0",
|
||||
"eslint-plugin-import": "^2.32.0",
|
||||
"eslint-plugin-jest": "^29.0.1",
|
||||
"eslint-plugin-jsx-a11y": "^6.10.2",
|
||||
"eslint-plugin-no-relative-import-paths": "^1.6.1",
|
||||
"eslint-plugin-playwright": "^2.2.0",
|
||||
"eslint-plugin-playwright": "^2.2.2",
|
||||
"eslint-plugin-promise": "^7.2.1",
|
||||
"eslint-plugin-react": "^7.37.5",
|
||||
"eslint-plugin-react-hooks": "^5.2.0",
|
||||
"eslint-plugin-react-hooks-addons": "^0.5.0",
|
||||
"eslint-plugin-regexp": "^2.9.0",
|
||||
"eslint-plugin-regexp": "^2.9.1",
|
||||
"eslint-plugin-sonarjs": "^3.0.4",
|
||||
"eslint-plugin-sort-keys-fix": "^1.1.2",
|
||||
"eslint-plugin-typescript-sort-keys": "^3.3.0",
|
||||
|
|
@ -133,24 +133,24 @@
|
|||
"html-minifier-terser": "^7.2.0",
|
||||
"html-to-image": "^1.11.13",
|
||||
"husky": "^9.1.7",
|
||||
"jest": "^30.0.4",
|
||||
"jest-environment-jsdom": "^30.0.4",
|
||||
"lint-staged": "^16.1.2",
|
||||
"jest": "^30.0.5",
|
||||
"jest-environment-jsdom": "^30.0.5",
|
||||
"lint-staged": "^16.1.4",
|
||||
"lunr": "^2.3.9",
|
||||
"monaco-editor": "^0.52.2",
|
||||
"pdfjs-dist": "^5.3.93",
|
||||
"playwright-core": "^1.54.1",
|
||||
"pdfjs-dist": "^5.4.54",
|
||||
"playwright-core": "^1.54.2",
|
||||
"postcss": "^8.5.6",
|
||||
"postcss-styled-syntax": "^0.7.1",
|
||||
"postcss-syntax": "^0.36.2",
|
||||
"serve": "^14.2.4",
|
||||
"stylelint": "^16.22.0",
|
||||
"stylelint-config-standard": "^38.0.0",
|
||||
"stylelint": "^16.23.0",
|
||||
"stylelint-config-standard": "^39.0.0",
|
||||
"stylelint-order": "^7.0.0",
|
||||
"terser": "^5.43.1",
|
||||
"tinymce": "^7.9.1",
|
||||
"ts-prune": "^0.10.3",
|
||||
"typescript": "^5.8.3",
|
||||
"typescript": "^5.9.2",
|
||||
"webamp": "^2.2.0",
|
||||
"xlsx": "^0.18.5",
|
||||
"xterm": "^5.3.0"
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ import {
|
|||
} from "utils/constants";
|
||||
|
||||
export const bufferToBlob = (buffer: Buffer, type?: string): Blob =>
|
||||
new Blob([buffer], type ? { type } : undefined);
|
||||
new Blob([buffer as BlobPart], type ? { type } : undefined);
|
||||
|
||||
export const bufferToUrl = (buffer: Buffer, mimeType?: string): string =>
|
||||
mimeType === "image/svg+xml"
|
||||
|
|
@ -764,9 +764,7 @@ const formatNumber = (number: number, roundUpNumber = false): string => {
|
|||
minimumSignificantDigits: number < 1 ? 2 : 3,
|
||||
}
|
||||
).format(
|
||||
roundUpNumber
|
||||
? Math.ceil(Number(number))
|
||||
: Number(number.toFixed(4).slice(0, -2))
|
||||
roundUpNumber ? Math.ceil(number) : Number(number.toFixed(4).slice(0, -2))
|
||||
);
|
||||
|
||||
if (roundUpNumber) return formattedNumber;
|
||||
|
|
@ -1028,9 +1026,11 @@ const supportsModulePreload = (): boolean => {
|
|||
if (HAS_MODULE_PRELOAD_SUPPORT) return true;
|
||||
|
||||
try {
|
||||
HAS_MODULE_PRELOAD_SUPPORT = Boolean(
|
||||
document.createElement("link").relList?.supports?.("modulepreload")
|
||||
);
|
||||
const { relList } = document.createElement("link");
|
||||
|
||||
HAS_MODULE_PRELOAD_SUPPORT = relList
|
||||
? relList.supports("modulepreload")
|
||||
: false;
|
||||
} catch {
|
||||
// Ignore failure to check for modulepreload support
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user