Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
design_shortcuts.hpp File Reference

Keyboard-shortcut import for designs: static-scan extracted shortcuts, platform-convention default shortcuts (detect / apply / serialize), and the small import heuristics (bundler-entry detection, audio-widget naming) shared by the import pipeline. More...

#include <pulp/view/design_ir.hpp>
#include <string>
#include <vector>

Go to the source code of this file.

Classes

struct  pulp::view::DetectedShortcut
struct  pulp::view::DefaultShortcutCandidate
 One default-binding emission produced by the source heuristic. More...
struct  pulp::view::DefaultShortcutCollision
 One unresolved candidate set — emitted when multiple components match the same pattern with comparable confidence. More...
struct  pulp::view::DefaultShortcutScan
 Result of running detect_default_shortcuts. More...

Namespaces

namespace  pulp
namespace  pulp::view
 Hover-cursor tracking for platform window hosts.

Enumerations

enum class  pulp::view::DefaultShortcutPattern {
  pulp::view::settings , pulp::view::help , pulp::view::cheatsheet , pulp::view::new_file ,
  pulp::view::open_file , pulp::view::save_file , pulp::view::find
}
 Which platform-convention surface a default binding maps to. More...
enum class  pulp::view::TargetPlatform { pulp::view::macos , pulp::view::win_linux }
 Convert accepted candidates from detect_default_shortcuts into the DetectedShortcut form that V2 codegen expects. More...

Functions

std::vector< DetectedShortcut > pulp::view::extract_keyboard_shortcuts (const std::string &source, const std::string &filename="")
 Static-scan a TSX/JS source string for keyboard-shortcut patterns.
std::string pulp::view::serialize_detected_shortcuts (const std::vector< DetectedShortcut > &shortcuts)
 Serialize a list of DetectedShortcuts to JSON in the caller-provided order.
DefaultShortcutScan pulp::view::detect_default_shortcuts (const std::string &source, const std::vector< DetectedShortcut > &existing_extracted)
 Static-scan a TSX/JS source string for components matching the platform-convention defaults table.
std::vector< DetectedShortcut > pulp::view::apply_default_shortcuts (const std::vector< DefaultShortcutCandidate > &accepted, TargetPlatform platform)
std::string pulp::view::serialize_default_shortcut_scan (const DefaultShortcutScan &scan)
 Render the auto-bound defaults + collisions into JSON for emission alongside the extracted-shortcuts manifest.
bool pulp::view::looks_like_bundler_entry (const std::string &html)
 Heuristic: does this HTML look like a JS-bundler entry (React, Vue, Svelte, @pulp/react, generic webpack/vite/bun output) rather than a hand-authored Claude Design page?
AudioWidgetType pulp::view::detect_audio_widget (const std::string &name)
 Detect audio widget type from a node name.

Detailed Description

Keyboard-shortcut import for designs: static-scan extracted shortcuts, platform-convention default shortcuts (detect / apply / serialize), and the small import heuristics (bundler-entry detection, audio-widget naming) shared by the import pipeline.