HandwritingInput
Handwriting input canvas composite β DigitalInk + RecognitionBridge + BrushConfiguration assembly (Layer 2 Composite).
Statusβ
| Key | Value |
|---|---|
| Layer | composite |
| Tier | L1 |
| Status | wip |
| Version | 0.9.0 |
| Price | Free (free) |
| Category | Input & UX |
Overviewβ
Overviewβ
HandwritingInput is multi-saas-kit's first Layer 2 Composite Plugin, assembled from 3 base plugins. It provides a single entry point for the canvas stroke input β provider recognition call β normalized result flow.
Dependencies (3 base plugins)β
| Plugin | Role | Layer |
|---|---|---|
| DigitalInk | Stroke standard + validation | L0 Foundation |
| BrushConfiguration | Canvas / brush rendering config | L0 Foundation |
| RecognitionBridge | Recognition API adapters | L1 Core |
Core Componentβ
HandwritingInputServiceβ
Single entry point process() encapsulating 5 steps:
1. StrokeData::fromArray($payload) β DigitalInk validation
2. (optional) Normalize round-trip β Coordinate cleanup
3. RecognizerInterface::recognize β RecognitionBridge
4. (optional) Normalize brush config β Brush meta attachment
5. (optional) Compute bounding box β Drawing area meta
β HandwritingInputResult
HandwritingInputResult (DTO)β
{
ok, provider, elapsed_ms, candidates, message,
canvas: { width, height },
brush: { line_width, stroke_color, ... }, // when include_brush=true
bounding_box: { min_x, max_x, width, ... } // when include_bounding=true
}
Configurationβ
return [
'enabled' => env('PLG_HANDWRITING_INPUT_ENABLED', true),
'flow' => [
'normalize_strokes' => false,
'include_brush' => true,
'include_bounding' => true,
],
];
Usageβ
$service = new HandwritingInputService(
recognizer: $chain,
strokeNormalizer: new StrokeNormalizer,
brushNormalizer: BrushConfigNormalizer::fromConfig(config('brush-configuration')),
flow: config('handwriting-input.flow'),
);
$result = $service->process(
payload: ['ink' => [...], 'width' => 200, 'height' => 100],
brushInput: ['line_width' => 8],
options: ['language' => 'en', 'mode' => 'numeric'],
);
Scopeβ
HandwritingInput only composes the input stack. It does not include domain scoring, learning evaluation, submission workflows, or UI screens. Recognition provider operations and billing belong to the configured provider project, and SaaS-specific business rules belong to the consumer side.
Licenseβ
MIT
Dependenciesβ
Demosβ
- Platform κ΄λ¦¬μ ν¨λμμ λ©ν νμΈ π Login required
- μ¬μ© μμ (PHP)
π View on Plugin Store: store.codebase.how/plugins/handwriting-input