@elucim/dsl 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -126,6 +126,8 @@ Every document has this structure:
126
126
  | `rect` | `x`, `y`, `width`, `height` | Rectangle |
127
127
  | `polygon` | `points` (array of [x,y]) | Polygon/polyline |
128
128
  | `text` | `x`, `y`, `content` | Text element |
129
+ | `image` | `src`, `x`, `y`, `width`, `height` | Embed external images (PNG, SVG, etc.) |
130
+ | `barChart` | `bars` | Animated bar chart with labels and colors |
129
131
 
130
132
  #### Math Visualizations
131
133
  | Type | Required Props | Description |
@@ -154,7 +156,7 @@ Every document has this structure:
154
156
  | Type | Key Props | Description |
155
157
  |------|----------|-------------|
156
158
  | `sequence` | `from`, `durationInFrames` | Time-offset wrapper |
157
- | `group` | `children` | Logical grouping |
159
+ | `group` | `children` | Logical grouping with shared transforms (rotation, scale, translate) and zIndex sorting of children |
158
160
 
159
161
  ### Inline Animation Props
160
162
 
@@ -164,6 +166,15 @@ All primitives support these optional animation props directly:
164
166
  - `draw?: number` — Progressive stroke draw over N frames
165
167
  - `easing?: string | { type, ... }` — Easing function
166
168
 
169
+ ### Spatial Transform Props
170
+
171
+ All primitives and groups support these optional spatial transform props:
172
+ - `rotation?: number` — Rotate element in degrees
173
+ - `rotationOrigin?: [number, number]` — Center of rotation [cx, cy]
174
+ - `scale?: number` — Uniform scale factor
175
+ - `translate?: [number, number]` — Offset [dx, dy]
176
+ - `zIndex?: number` — Stacking order (higher renders on top)
177
+
167
178
  ### Easing
168
179
 
169
180
  **Named easings:** `linear`, `easeInQuad`, `easeOutQuad`, `easeInOutQuad`, `easeInCubic`, `easeOutCubic`, `easeInOutCubic`, `easeInQuart`, `easeOutQuart`, `easeInOutQuart`, `easeInSine`, `easeOutSine`, `easeInOutSine`, `easeInExpo`, `easeOutExpo`, `easeInOutExpo`, `easeInBack`, `easeOutBack`, `easeOutElastic`, `easeOutBounce`
package/dist/index.d.ts CHANGED
@@ -252,7 +252,7 @@ export declare interface GroupNode {
252
252
  zIndex?: number;
253
253
  }
254
254
 
255
- declare interface ImageNode {
255
+ export declare interface ImageNode {
256
256
  type: 'image';
257
257
  id?: string;
258
258
  src: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elucim/dsl",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "JSON/YAML DSL for declarative Elucim animations — define visualizations without writing React code",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -19,6 +19,9 @@
19
19
  "yaml",
20
20
  "visualization",
21
21
  "elucim",
22
+ "image",
23
+ "group",
24
+ "transforms",
22
25
  "declarative"
23
26
  ],
24
27
  "publishConfig": {
@@ -42,7 +45,7 @@
42
45
  "react-dom": "^18.0.0 || ^19.0.0"
43
46
  },
44
47
  "dependencies": {
45
- "@elucim/core": "0.2.0"
48
+ "@elucim/core": "0.2.1"
46
49
  },
47
50
  "devDependencies": {
48
51
  "@types/react": "^18.3.0",