Initial commit: drawNET Alpha v1.0 - Professional Topology Designer with Full i18n and Performance Optimizations

This commit is contained in:
leeyj
2026-03-22 22:37:24 +09:00
commit 5cea93e317
192 changed files with 14449 additions and 0 deletions
+49
View File
@@ -0,0 +1,49 @@
import { DEFAULTS } from './constants.js';
// Shared state across modules
export const state = {
assetMap: {},
assetsData: [],
graph: null,
// Grid & Interaction State
gridSpacing: DEFAULTS.GRID_SPACING,
gridStyle: 'none', // 'none', 'solid', or 'dashed'
isSnapEnabled: false,
canvasSize: { width: '100%', height: '100%' },
// Attribute Copy/Paste Clipboard
clipboardNodeData: null,
clipboardNodeAttrs: null,
clipboardEdgeData: null,
// Layer Management
layers: [
{ id: 'l1', name: 'Main Layer', visible: true, locked: false, color: '#3b82f6', type: 'standard' }
],
activeLayerId: 'l1',
inactiveLayerOpacity: 0.3,
// Interaction State
isRightDragging: false,
isCtrlPressed: false, // Global tracking for Ctrl+Drag copy
// Selection Order Tracking
selectionOrder: [],
// Asset Management
selectedPackIds: JSON.parse(localStorage.getItem('selectedPackIds') || '[]'),
language: localStorage.getItem('drawNET_lang') || (navigator.language.startsWith('ko') ? 'ko' : 'en'),
// Global Application Config (from config.json)
appConfig: {},
// License State
license: {
level: 'Trial',
valid: false,
data: {}
},
// Project Metadata
projectName: "" // Will be set to t('untitled_project') on init
};
// Expose to window for browser debugging
if (typeof window !== 'undefined') {
window.state = state;
}
// For browser console debugging
window.state = state;