feat(blueprint): add Schema type system and @BlueprintArray decorator

- Add Schema fluent API for defining complex data types
- Add @BlueprintArray decorator for array properties with itemSchema
- Support primitive types: float, int, string, boolean, vector2, vector3
- Support composite types: object, array, enum, ref
- Add path-utils for nested property access
- Update documentation with examples and usage guide
This commit is contained in:
yhh
2026-01-06 18:19:08 +08:00
parent 7caa69a22e
commit 4e66bd8e2b
9 changed files with 1666 additions and 324 deletions

View File

@@ -0,0 +1,18 @@
---
"@esengine/blueprint": minor
---
feat(blueprint): add Schema type system and @BlueprintArray decorator
- Add `Schema` fluent API for defining complex data types:
- Primitive types: `Schema.float()`, `Schema.int()`, `Schema.string()`, `Schema.boolean()`, `Schema.vector2()`, `Schema.vector3()`
- Composite types: `Schema.object()`, `Schema.array()`, `Schema.enum()`, `Schema.ref()`
- Support for constraints: `min`, `max`, `step`, `defaultValue`, `placeholder`, etc.
- Add `@BlueprintArray` decorator for array properties:
- `itemSchema`: Define schema for array items using Schema API
- `reorderable`: Allow drag-and-drop reordering
- `exposeElementPorts`: Create individual ports for each array element
- `portNameTemplate`: Custom naming for element ports (e.g., "Waypoint {index1}")
- Update documentation with examples and usage guide