Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::view::JsxLockResult Struct Reference

Result of locking one tweak into an authored JSX/TSX source string. More...

#include <jsx_lock.hpp>

Public Member Functions

bool mutated () const
 True when the lock changed the source text.
bool ok () const
 True when the element + prop were located and the source carries the value (already_current counts — the value is already there).

Public Attributes

JsxLockStatus status = JsxLockStatus::anchor_not_found
std::string source
 The (possibly patched) source text.
std::string property
 The resolved style / prop key the path mapped to (camelCase, e.g.
std::string message
 Human-readable summary, suitable for CLI / inspector display.
int line = 0
 1-based line number of the patched value, or 0 when nothing was patched.

Detailed Description

Result of locking one tweak into an authored JSX/TSX source string.

Member Function Documentation

◆ mutated()

bool pulp::view::JsxLockResult::mutated ( ) const
inline

True when the lock changed the source text.

◆ ok()

bool pulp::view::JsxLockResult::ok ( ) const
inline

True when the element + prop were located and the source carries the value (already_current counts — the value is already there).

Member Data Documentation

◆ line

int pulp::view::JsxLockResult::line = 0

1-based line number of the patched value, or 0 when nothing was patched.

Useful for a "jump to source" / diff-preview affordance.

◆ message

std::string pulp::view::JsxLockResult::message

Human-readable summary, suitable for CLI / inspector display.

On too_dynamic this carries the specific reason.

◆ property

std::string pulp::view::JsxLockResult::property

The resolved style / prop key the path mapped to (camelCase, e.g.

"backgroundColor", "padding"). Empty when the path was unsupported.

◆ source

std::string pulp::view::JsxLockResult::source

The (possibly patched) source text.

On any non-patched status this equals the input verbatim.

◆ status

JsxLockStatus pulp::view::JsxLockResult::status = JsxLockStatus::anchor_not_found

The documentation for this struct was generated from the following file:
  • /home/runner/work/pulp/pulp/core/view/include/pulp/view/jsx_lock.hpp