canvas/dist/commands/index.mjs.map

1 line
466 KiB
Text
Raw Permalink Normal View History

2026-03-11 18:42:08 -07:00
{"version":3,"sources":["../../src/commands/registry.ts","../../src/core/graph-store.ts","../../src/utils/debug.ts","../../src/core/selection-store.ts","../../src/utils/mutation-queue.ts","../../src/core/perf.ts","../../src/core/graph-position.ts","../../src/core/history-actions.ts","../../src/core/history-store.ts","../../src/core/group-store.ts","../../src/core/graph-derived.ts","../../src/utils/layout.ts","../../src/core/viewport-store.ts","../../src/core/reduced-motion-store.ts","../../src/core/types.ts","../../src/core/graph-mutations-edges.ts","../../src/core/graph-mutations-advanced.ts","../../src/core/graph-mutations.ts","../../src/core/sync-store.ts","../../src/core/interaction-store.ts","../../src/core/locked-node-store.ts","../../src/core/node-type-registry.tsx","../../src/core/toast-store.ts","../../src/core/snap-store.ts","../../src/core/event-types.ts","../../src/core/action-types.ts","../../src/core/settings-state-types.ts","../../src/core/settings-types.ts","../../src/core/actions-node.ts","../../src/core/actions-viewport.ts","../../src/core/built-in-actions.ts","../../src/core/action-registry.ts","../../src/core/action-executor.ts","../../src/core/settings-presets.ts","../../src/core/settings-store.ts","../../src/core/canvas-serializer.ts","../../src/core/clipboard-store.ts","../../src/core/spatial-index.ts","../../src/core/virtualization-store.ts","../../src/core/canvas-api.ts","../../src/core/port-types.ts","../../src/core/input-classifier.ts","../../src/core/input-store.ts","../../src/core/selection-path-store.ts","../../src/core/search-store.ts","../../src/core/gesture-resolver.ts","../../src/core/gesture-rules-defaults.ts","../../src/core/gesture-rules.ts","../../src/core/gesture-rule-store.ts","../../src/core/external-keyboard-store.ts","../../src/core/plugin-types.ts","../../src/gestures/types.ts","../../src/gestures/dispatcher.ts","../../src/utils/edge-path-calculators.ts","../../src/utils/edge-path-registry.ts","../../src/core/plugin-registry.ts","../../src/core/index.ts","../../src/commands/index.ts","../../src/commands/store.ts","../../src/commands/store-atoms.ts","../../src/commands/keyboard.ts","../../src/commands/executor.ts","../../src/commands/CommandProvider.tsx","../../src/hooks/useLayout.ts","../../src/hooks/useForceLayout.ts","../../src/hooks/useTreeLayout.ts","../../src/hooks/useAnimatedLayout.ts","../../src/hooks/useGridLayout.ts","../../src/commands/builtins/viewport-commands.ts","../../src/commands/builtins/selection-commands.ts","../../src/commands/builtins/history-commands.ts","../../src/commands/builtins/layout-commands.ts","../../src/commands/builtins/clipboard-commands.ts","../../src/commands/builtins/group-commands.ts","../../src/commands/builtins/search-commands.ts","../../src/commands/builtins/merge-commands.ts","../../src/commands/builtins/serialization-commands.ts","../../src/commands/builtins/index.ts"],"sourcesContent":["/**\n * Command Registry\n *\n * Singleton class for managing all available commands.\n * Commands can be registered by the canvas package (built-ins)\n * or by consuming apps (custom commands).\n */\n\n/**\n * Command Registry - Singleton class for managing all available commands.\n *\n * Usage:\n * ```typescript\n * import { commandRegistry } from '@blinksgg/canvas';\n *\n * // Register a command\n * commandRegistry.register(myCommand);\n *\n * // Get a command by name or alias\n * const cmd = commandRegistry.get('createNode'); // or 'cn'\n *\n * // Search commands\n * const results = commandRegistry.search('node');\n * ```\n */\nclass CommandRegistry {\n commands = new Map();\n aliases = new Map(); // alias -> command name\n\n /**\n * Register a command with the registry.\n * @param command The command definition to register\n * @throws Error if command name or alias already exists\n */\n register(command) {\n if (this.commands.has(command.name)) {\n throw new Error(`Command \"${command.name}\" is already registered`);\n }\n this.commands.set(command.name, command);\n\n // Register aliases\n if (command.aliases) {\n