Fix alignment, progress bar, grid safety, and strict typing issues

- Load layout name before reading it in progress bar creation
- Load shape dimensions before aligning and align to slide edges/center
- Clamp grid spacing/opacity and guard zero spacing before deleting a grid
- Use hasText and text-capable shape checks with null-safe property matching
- Add info status style and remove dead imports
- Enable strict mode and skipLibCheck; add typecheck script
This commit is contained in:
schihei committed 2026-11-25 11:43:23 +01:00
1 parent 16491c00ce
commit 791cbc7b6c
13 files changed
+271 -183

No files matched your search

@@ -15,6 +15,7 @@ import {
} from "@fluentui/react-icons";
import { useStatusContext } from "./App";
import { useCommonStyles } from "./commonStyles";
import { getErrorMessage } from "../types/office-types";
/**
* Configuration constants for confidential markings
@@ -93,11 +94,10 @@ export const ConfidentialButtons: React.FC = () => {
* @param error - The error object
* @param operation - The operation being performed (for logging)
*/
const handleError = (error: any, operation: string): void => {
setStatusMessage(`Error: ${error.message || "Unknown error occurred"}`);
const handleError = (error: unknown, operation: string): void => {
setStatusMessage(`Error: ${getErrorMessage(error)}`);
setStatusType("error");
console.error(`${operation} error:`, error);
setIsProcessing(false);
};
/**
@@ -107,7 +107,7 @@ export const ConfidentialButtons: React.FC = () => {
* @param isAddOperation - Whether this was an add operation (true) or remove operation (false)
*/
const updateStatusFromResult = (result: ProcessingResult, isAddOperation: boolean): void => {
const { processedSlides, errorSlides, affectedCount } = result;
const { errorSlides, affectedCount } = result;
if (affectedCount > 0) {
const action = isAddOperation ? "Added" : "Removed";