@pixerate/editor 0.43.0 → 0.44.0

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.
@@ -134,6 +134,7 @@ GridCraft. Apache POI is © The Apache Software Foundation, licensed under the A
134
134
  - `crates/export/src/lib.rs` (`body_size`: body text size by character count; `level`: heading levels relative to it, bold body-size headings; `tables`: grid columns from aligned cell edges, rows from overlapping spans, spanning header and totals rows next to a run, the 63-column cap) → `packages/core/src/import/pdf-layout.ts`
135
135
  - `crates/edit/src/text_regions.rs` (`group_layout`: runs joined on a baseline across small gaps, rows grouped into blocks by pitch and alignment, line-end hyphens removed when joining rows) → `packages/core/src/import/pdf-layout.ts`
136
136
  - Test cases from `crates/export/src/lib.rs` (`grid_text_becomes_a_real_table_in_every_format`, `a_staircase_of_blocks_is_not_a_huge_table`, `two_column_body_text_is_not_mistaken_for_a_table`, `word_does_not_invent_borders_for_aligned_invoice_fields`), re-expressed → `packages/core/tests/pdf-layout.test.ts`
137
+ - `crates/geom/src/perspective.rs` (`Homography::from_points` with the eight-unknown system and the check that the four points really map, `Homography::apply`, `solve8` Gaussian elimination with partial pivoting, `order_quad`) → `vectorHomography`, `applyVectorHomography`, `solve8` and `orderVectorQuad` in `packages/core/src/vector/perspective.ts`, used by Free Distort; test cases re-expressed → `packages/core/tests/vector-distort.test.ts`
137
138
 
138
139
  ## photocraft
139
140
 
@@ -154,6 +155,8 @@ GridCraft. Apache POI is © The Apache Software Foundation, licensed under the A
154
155
  - `crates/engine/src/layer_mask_props_cmds.rs` and `crates/compose/src/masks.rs` (non-destructive mask density and feather) → `packages/core/src/image-editor/selection/layer-mask.ts`
155
156
  - Test cases from `crates/algo/src/selection.rs`, `crates/algo/src/selection_blur.rs`, `crates/algo/src/matting.rs` and `crates/algo/src/tests_selection_mix.rs`, re-expressed → `packages/core/tests/image-editor-selection.test.ts`, `packages/core/tests/image-editor-selection-controller.test.ts`
156
157
  - `crates/compose/src/gradient_fill.rs` (`midpoint_remap`; `Ramp`; `handles` / `from_handles`: the start and end points of the Linear, Radial, Angle, Reflected and Diamond styles) and `crates/compose/src/effects.rs` (`gradient_t`: Reflected as `|u|`, Diamond as `|along| + |across|`, Angle as a clockwise sweep from the gradient's direction) → `gradientMidpointRemap`, `vectorGradientParam` and the reflected / diamond / conic styles in `packages/core/src/vector/gradient.ts`; the styles share vectorcraft's start / end frame instead of an angle, scale and centre offset
158
+ - `crates/vector/src/map.rs` (`map_points`; `map_path`, `map_subpath`, `map_segment`, `split_mapped`, `halves`, `off_line`: segments halved until the mapped control points follow the mapped curve within a tolerance, straight segments whose image is straight kept as one, the split depth bounded on huge paths) → `mapVectorPoints`, `mapVectorSubpaths` and `mapBezierPath` in `packages/core/src/vector/pathMap.ts`; runs of pieces are then refitted with fewer cubics by our `fitCubicRun` where that stays within the tolerance, and smooth anchors have their handles made collinear again; test cases re-expressed → `packages/core/tests/vector-distort.test.ts`
159
+ - `crates/geom/src/warp.rs` (`WarpStyle` and its fifteen presets; `StyleWarp`; `rest_grid`, `edge_arc`, `arc_grid`, `blend_rows` and `preset_grid` with bend, horizontal and vertical distortion and the vertical orientation; `bernstein`, `split_cubic`, `BERN_INV`; `BezierMesh` — `identity`, `fit`, `eval`, `locate`, `split_u` / `split_v`, `remove_split_u` / `remove_split_v`, `transpose`, `map_points`, `param_at`, `pull`, `smooth_lines`, `drag_point`, `control_bounds`; `Warp::map`, `Warp::to_mesh`) → `packages/core/src/vector/warp.ts`, the `envelope` effect in `packages/core/src/vector/appearance.ts` and the Envelope tool in `packages/core/src/vector/controller.ts`; meshes are plain data (points in the node's space), the end patches extrapolate outside the box so handles past it map smoothly, and `vectorMeshFromOutline` (a Coons patch for Make with Top Object) is our own; Photoshop's measured cases were not copied — the presets are tested by their corner and edge behaviour → `packages/core/tests/vector-distort.test.ts`
157
160
  - `crates/io/src/gradient_bake.rs` (`eval`: stop midpoints remapping each segment, Smoothness as a blend of linear interpolation and a Catmull-Rom spline through the stop colours with end tangents at half the chord slope, clamped to each segment; the Classic / Linear / Perceptual interpolation spaces as sRGB, linear light and Oklab; `bake`: the curve sampled into linear stops) → `vectorGradientRamp` and `expandVectorGradientStops` in `packages/core/src/vector/gradient.ts`; stops are placed adaptively to a tolerance instead of 96 even samples, and Photoshop's measured Smooth easing table was not ported; test cases re-expressed → `packages/core/tests/vector-gradient.test.ts`
158
161
 
159
162
  ## soundcraft
@@ -196,6 +199,7 @@ GridCraft. Apache POI is © The Apache Software Foundation, licensed under the A
196
199
  - `crates/tools/src/distort/width.rs` (the Width tool: the stroke under the pointer and its width there, dragging outward to add or widen a width point — symmetric, Alt one side — dragging a point's centre to slide it along the path, its handle ends to widen it, width-point diamonds and side handles in the overlay, Delete removing the selected point) → `getVectorWidthHandles`, the `width` hover and drag in `packages/core/src/vector/controller.ts` and the overlay's `widthPoints` / `widthSpot` in `packages/core/src/vector/render.ts`; and its later additions: Alt-dragging a centre to slide a copy (`stroke.widthPoint.copy`), dropping a slid point onto another to make a discontinuous point, Shift-click multi-selection with selected points moved or widened together and kept selected after a move (`group` / `toggle` / `selected_indices`), Delete removing every selected point, and double-click opening Width Point Edit on a point or a stroke spot (the `widthPoint` dialog) → `selectedWidthPoints`, `selectWidthPoints`, `removeWidthPoints`, `setWidthPoint`, `openWidthPointEdit` / `commitWidthPointEdit` / `widthPointEdit` and the `copy` drag in `packages/core/src/vector/controller.ts`, and `VectorWidthPointEditor` in `packages/react/src/vector/VectorWidthPointEditor.tsx` and `packages/svelte/src/vector/VectorWidthPointEditor.svelte`; test cases re-expressed → `packages/core/tests/vector-width.test.ts`
197
200
  - `crates/doc/src/blend.rs` (`lerp_paint` with `common_stops` / `resample_stops`: gradients of one kind with their stops resampled at every offset either has, a solid colour against a gradient through a gradient of that colour, other kinds switching halfway; `lerp_profile`, `lerp_dash` (a solid stroke as the other's pattern with its gaps closed), `lerp_stroke`; `lerp_affine` turning the shorter way round; `PathPair` with clicked start anchors (`start_at`: a closed subpath restarted, an open one clicked at its end reversed); `Lerp` pairing group children in stacking order with the extra ones collapsing to a point; `blend_step_count` for Specified Steps, Specified Distance and Smooth Color; `Spine` / `blend_spine` / `Rail::place`: steps laid along a replaced spine by arc length, moved by the spine's offset from the straight line and turned with Align to Path; `blend_expand` in paint order) → `interpolateVectorPaint` / `interpolateVectorStyle` / `interpolateWidthProfiles` / `interpolateRigidMatrix` / `createVectorMorph` in `packages/core/src/vector/blend.ts` and `vectorBlendStepCount`, `vectorBlendRail`, `vectorBlendSpine` and `generateVectorBlendChildren` in `packages/core/src/vector/blendGroup.ts`, the Blend tool and the `blend` / `expandBlend` / `releaseBlend` / `replaceBlendSpine` actions in `packages/core/src/vector/controller.ts`; colours mix in OKLab rather than per colour model, its `grow` (splitting the longest segment by chord) was replaced by effectcraft's arc-length insertion, the steps are offset by how far the spine bends from the chord between the keys and turn by the change in its direction, so keys stay put; test cases re-expressed → `packages/core/tests/vector-blend.test.ts`
198
201
  ---
202
+ - `crates/tools/src/xform/free.rs` (the Free Transform tool's distort modes: `distort_quad` — a corner moved freely, or in perspective with its partner on the drag's dominant axis mirrored, a side moving both its corners — `shear_for_side` about the opposite side or the centre with Alt, and `handle_op`'s modifiers: Cmd on a side shears, Cmd+Alt+Shift on a corner is perspective) → `vectorDistortQuad`, `vectorShearForSide` in `packages/core/src/vector/distort.ts` and Free Distort mode in `packages/core/src/vector/controller.ts`; the mode is a toggle of the Select tool's box rather than a separate tool, and its other distort tools (`distort/arap.rs`, `liquify.rs`, `puppet.rs`, the perspective grid) were not ported; test cases re-expressed → `packages/core/tests/vector-distort.test.ts`
199
203
  - `crates/doc/src/live.rs` (live objects stored as their sources plus parameters and evaluated on demand for drawing and export — `expand_live`, `expanded_group` keeping the object's id, name and transparency, `expand_deep`, `subtree_has_live`) → `expandVectorAppearance` / `hasVectorAppearance` in `packages/core/src/vector/appearance.ts` and `expandAppearance` in `packages/core/src/vector/controller.ts`
200
204
  - `crates/color/src/gradient.rs` (`GradientStop` midpoints; `Gradient::sample_with` midpoint mapping; `expanded_stops` / `expanded`: an extra stop at each off-centre midpoint; `reverse` with mirrored midpoints; `span`; `insert_stop`, `remove_stop` (never below two), `move_stop`, `midpoint_pos`, `midpoint_from_pos`; `GradientGeom`'s start / end / aspect / focal frame, `unit_frame`, `param_at` with the focal point, `set_focal` kept inside the circle and `keep_focal_from`; `GradientPaint::pin` and `transform`) → `packages/core/src/vector/gradient.ts`; the aspect is stored as the secondary axis' end point (figcraft's third handle), so any affine map of a shape maps its gradient exactly; test cases re-expressed → `packages/core/tests/vector-gradient.test.ts`
201
205
  - `crates/svg/src/import/spread.rs` (`expand`, `whole_period`, `mirror`: `reflect` and `repeat` emulated by repeating the stops over the periods the painted area needs, every other one mirrored for reflect, capped at 64) → `periodicVectorGradientStops` / `expandVectorGradientSpread` in `packages/core/src/vector/gradient.ts`, used where SVG has no spread mode for the style (reflected gradients that pad or repeat); import keeps `spreadMethod` as the gradient's `spread`; test cases re-expressed → `packages/core/tests/vector-gradient.test.ts`