linting, tenant slug -> name
This commit is contained in:
@@ -123,10 +123,11 @@ const readTransferData = (dataTransfer, mimeTypes) => {
|
||||
if (raw) {
|
||||
return raw;
|
||||
}
|
||||
} catch (
|
||||
// eslint-disable-next-line no-empty
|
||||
error
|
||||
) {}
|
||||
} catch (error) {
|
||||
if (DEBUG_DROP) {
|
||||
console.warn('[skeuo] readTransferData failed for type', type, error);
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
};
|
||||
@@ -141,10 +142,9 @@ const parseTagTransferPayload = (event) => {
|
||||
}
|
||||
try {
|
||||
return JSON.parse(raw);
|
||||
} catch (
|
||||
// eslint-disable-next-line no-empty
|
||||
error
|
||||
) {}
|
||||
} catch (error) {
|
||||
console.warn('[skeuo] parseTagTransferPayload failed', error);
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
||||
@@ -465,10 +465,9 @@ const usePreviewMetadata = (documents, getDocumentAsset, ensureAssetUrl) => {
|
||||
view = createAssetView(asset);
|
||||
metadata = view.getPrimaryMetadata();
|
||||
}
|
||||
} catch (
|
||||
// eslint-disable-next-line no-empty
|
||||
error
|
||||
) {}
|
||||
} catch (error) {
|
||||
console.warn('[skeuo] ensureDocumentSize metadata fetch failed', error);
|
||||
}
|
||||
}
|
||||
|
||||
if (!hasDimensions(metadata)) {
|
||||
@@ -509,7 +508,7 @@ const usePreviewMetadata = (documents, getDocumentAsset, ensureAssetUrl) => {
|
||||
return metadataMap;
|
||||
};
|
||||
|
||||
const seededRandom = (input) => {
|
||||
function seededRandom(input) {
|
||||
const text = String(input);
|
||||
let hash = 2166136261;
|
||||
for (let index = 0; index < text.length; index += 1) {
|
||||
@@ -517,16 +516,18 @@ const seededRandom = (input) => {
|
||||
hash = Math.imul(hash, 16777619);
|
||||
}
|
||||
return (hash >>> 0) / 4294967295;
|
||||
};
|
||||
}
|
||||
|
||||
const randomRangeFromSeed = (seedKey, min, max) => {
|
||||
function randomRangeFromSeed(seedKey, min, max) {
|
||||
const span = max - min;
|
||||
if (span <= 0) return min;
|
||||
const seed = seededRandom(seedKey);
|
||||
return min + seed * span;
|
||||
};
|
||||
}
|
||||
|
||||
const buildKey = (docId, suffix) => `${docId}::${suffix}`;
|
||||
function buildKey(docId, suffix) {
|
||||
return `${docId}::${suffix}`;
|
||||
}
|
||||
|
||||
const clampCardDimensions = (width, height) => {
|
||||
const w = Number(width);
|
||||
@@ -758,10 +759,11 @@ const DesktopWorkspace = ({
|
||||
if (DEBUG_FOCUS) {
|
||||
console.log('[skeuo] focusCanvas: applied focus. activeElement:', document?.activeElement);
|
||||
}
|
||||
} catch (
|
||||
// eslint-disable-next-line no-empty
|
||||
error
|
||||
) {}
|
||||
} catch (error) {
|
||||
if (DEBUG_FOCUS) {
|
||||
console.warn('[skeuo] focusTarget failed to focus canvas', error);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
if (typeof window === 'undefined') {
|
||||
@@ -1551,20 +1553,18 @@ const syncLayoutSnapshot = useCallback(() => {
|
||||
if (event.dataTransfer) {
|
||||
event.dataTransfer.effectAllowed = 'copyMove';
|
||||
}
|
||||
} catch (
|
||||
// eslint-disable-next-line no-empty
|
||||
error
|
||||
) {}
|
||||
} catch (error) {
|
||||
console.warn('[skeuo] Failed to set drag effect', error);
|
||||
}
|
||||
|
||||
const payload = JSON.stringify({ id: tag.id, label: tag.label, sourceDocId: doc.id });
|
||||
try {
|
||||
event.dataTransfer?.setData('application/x-papercrate-tag', payload);
|
||||
event.dataTransfer?.setData('text/papercrate-tag', payload);
|
||||
event.dataTransfer?.setData('text/plain', tag.label || 'Tag');
|
||||
} catch (
|
||||
// eslint-disable-next-line no-empty
|
||||
error
|
||||
) {}
|
||||
} catch (error) {
|
||||
console.warn('[skeuo] Failed to populate drag data for tag', error);
|
||||
}
|
||||
|
||||
const pending = pendingDocTagDragRef.current;
|
||||
const node = event.currentTarget;
|
||||
@@ -1593,10 +1593,9 @@ const syncLayoutSnapshot = useCallback(() => {
|
||||
if (preview && event.dataTransfer) {
|
||||
try {
|
||||
event.dataTransfer.setDragImage(preview.clone, preview.offsetX, preview.offsetY);
|
||||
} catch (
|
||||
// eslint-disable-next-line no-empty
|
||||
error
|
||||
) {}
|
||||
} catch (error) {
|
||||
console.warn('[skeuo] Failed to set drag image', error);
|
||||
}
|
||||
}
|
||||
}
|
||||
draggingTagRef.current = {
|
||||
|
||||
Reference in New Issue
Block a user