Expand description
§vize_croquis
Croquis - The semantic analysis layer for Vize.
§Name Origin
Croquis (/kʁɔ.ki/) is a French term for a quick, sketchy drawing that captures
the essential features of a subject. Like how artists use croquis to rapidly
capture the essence of a pose or scene, vize_croquis quickly analyzes Vue
templates to extract semantic meaning from the syntactic structure.
§Purpose
This crate bridges the gap between parsing (vize_armature) and transformation (vize_atelier_core) by providing:
- Scope Analysis: Track variable scopes across templates and scripts
- Binding Resolution: Resolve identifiers to their declarations
- Reactivity Tracking: Understand ref/reactive dependencies
- Symbol Tables: Fast lookup of bindings and their metadata
§Architecture
vize_armature (Parse)
↓
vize_relief (AST)
↓
vize_croquis (Semantic Analysis) ← This crate
↓
vize_atelier_core (Transform)Re-exports§
pub use analyzer::Analyzer;pub use analyzer::AnalyzerOptions;pub use croquis::AnalysisStats;pub use croquis::BindingMetadata;pub use croquis::COMPILER_MACRO_NAMES;pub use croquis::ComponentShape;pub use croquis::Croquis;pub use croquis::CroquisSemanticSnapshot;pub use croquis::CroquisSemanticSummary;pub use croquis::CroquisStats;pub use croquis::ImportStatementInfo;pub use croquis::InvalidExport;pub use croquis::InvalidExportKind;pub use croquis::OptionGroup;pub use croquis::OptionKey;pub use croquis::OptionMember;pub use croquis::OptionsDescriptor;pub use croquis::ReExportInfo;pub use croquis::SemanticBindingSnapshot;pub use croquis::SemanticComponentUsageSnapshot;pub use croquis::SemanticEventListenerSnapshot;pub use croquis::SemanticInjectSnapshot;pub use croquis::SemanticPassedPropSnapshot;pub use croquis::SemanticProvideSnapshot;pub use croquis::SemanticReactiveSourceSnapshot;pub use croquis::SemanticReactivityLossSnapshot;pub use croquis::SemanticScopeBindingSnapshot;pub use croquis::SemanticScopeSnapshot;pub use croquis::SemanticSlotUsageSnapshot;pub use croquis::SemanticSourceRange;pub use croquis::SemanticTemplateExpressionSnapshot;pub use croquis::TemplateExpression;pub use croquis::TemplateExpressionKind;pub use croquis::TypeExport;pub use croquis::TypeExportKind;pub use croquis::UndefinedRef;pub use croquis::UnusedTemplateVar;pub use croquis::UnusedVarContext;pub use drawer::Drawer;pub use drawer::DrawerOptions;pub use effect_graph::EffectGraph;pub use effect_graph::EffectGraphScript;pub use effect_graph::EffectGraphSummary;pub use effect_graph::build_effect_graph_from_script;pub use effect_graph::build_effect_graph_from_script_setup;pub use effect_graph::build_effect_graph_from_sfc_scripts;pub use reactivity_overlay::ReactivityEffectEdgeOverlay;pub use reactivity_overlay::ReactivityEffectGraphOverlay;pub use reactivity_overlay::ReactivityLossOverlay;pub use reactivity_overlay::ReactivityOverlay;pub use reactivity_overlay::ReactivityOverlaySummary;pub use reactivity_overlay::ReactivitySourceOverlay;
Modules§
- analysis
- Compatibility re-exports for semantic summary types.
- analyzer
- Compatibility re-exports for the croquis drawer.
- builtins
- Vue built-in identifiers for semantic analysis.
- call_
graph - Function call graph for tracking Vue API calls and composables.
- croquis
- Croquis model for Vue SFC semantics.
- css
- CSS analysis for Vue SFC styles.
- declaration_
ts - Declaration TypeScript generation from Croquis analysis.
- display
- Display types for VIR (Vize Intermediate Representation) output.
- drawer
- Croquis drawer for Vue SFC semantics.
- effect_
graph - Reactive effect graph: dependencies between
computed,watch, and refs. - hoist
- Static hoisting analysis for Vue templates.
- import_
resolver - Import resolution for TypeScript type definitions.
- macros
- naming
- Naming convention utilities for Vue components and properties.
- optimization
- Optimization tracking for Vue template compilation.
- provide
- Provide/Inject tracking for Vue components.
- race
- Race-condition risk tracking for Vue reactive flows.
- reactivity
- Reactivity tracking for Vue templates.
- reactivity_
overlay - Stable overlay model for parser-driven reactivity analysis.
- reactivity_
tracking - Ultra-strict Reactivity Tracking System.
- render_
tree - Render-tree call graph: which parent template renders which child component.
- script_
parser - OXC-based script parser for high-performance AST analysis.
- setup_
context - Setup context violation tracking.
- sfc
- Parse-only Vue Single File Component support.
- types
- TypeScript type resolution for Vue compiler macros.
- virtual_
ts - Virtual TypeScript code generation for Vue SFC type checking.
Structs§
- Binding
Flags - Binding flags for tracking usage and mutation
- Block
Scope Data - Data specific to block scope (if, for, switch, etc.)
- Callback
Scope Data - Data specific to callback scope
- Client
Only Scope Data - Data specific to client-only scope (onMounted, onBeforeUnmount, etc.)
- Closure
Scope Data - Data specific to closure scope (function declaration, function expression, arrow function)
- Event
Handler Scope Data - Data specific to event handler scope
- External
Module Scope Data - Data specific to external module scope
- JsGlobal
Scope Data - Data specific to JavaScript global scope
- NonScript
Setup Scope Data - Data specific to non-script-setup scope (Options API, regular script)
- Scope
- A single scope in the scope chain
- Scope
Binding - A binding within a scope
- Scope
Chain - Manages the scope chain during analysis
- ScopeId
- Unique identifier for a scope
- Script
Setup Scope Data - Data specific to script setup scope
- Span
- Source span
- Symbol
- A symbol in the symbol table
- Symbol
Flags - Flags for symbol properties
- Symbol
Id - Unique identifier for a symbol
- Symbol
Table - Symbol table for the entire compilation unit
- Universal
Scope Data - Data specific to universal scope (SSR - runs on both server and client)
- VFor
Scope Data - Data specific to v-for scope
- VSlot
Scope Data - Data specific to v-slot scope
- VueGlobal
Scope Data - Data specific to Vue global scope
Enums§
- Binding
Type - Binding type from script setup.
- Block
Kind - Block kind for block scopes
- JsRuntime
- Runtime environment for JavaScript globals
- Scope
Data - Scope-specific data
- Scope
Kind - Kind of scope
Constants§
- PARAM_
INLINE_ CAP - Maximum parameters typically seen in v-for/v-slot/callbacks Stack-allocated up to this count, heap-allocated beyond
Functions§
- is_
builtin_ directive - Check if a directive is a built-in directive
- is_
builtin_ tag - Check if a tag is a built-in tag
- is_
html_ tag - Check if tag is a valid HTML tag
- is_
math_ ml_ tag - Check if tag is a valid MathML tag
- is_
native_ tag - Check if tag is a native tag (HTML, SVG, or MathML)
- is_
reserved_ prop - Check if a property name is reserved
- is_
svg_ tag - Check if tag is a valid SVG tag
- is_
void_ tag - Check if tag is a void (self-closing) tag
Type Aliases§
- Param
Names - Type alias for parameter name lists (stack-allocated for small counts)
- Parent
Scopes - Parent scope references (typically 1-2 parents)