@pixerate/editor 0.41.0 → 0.42.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.
- package/THIRD_PARTY_NOTICES.md +4 -0
- package/dist/vector/index.cjs +1605 -330
- package/dist/vector/index.cjs.map +1 -1
- package/dist/vector/index.d.cts +459 -13
- package/dist/vector/index.d.ts +459 -13
- package/dist/vector/index.js +1369 -94
- package/dist/vector/index.js.map +1 -1
- package/package.json +1 -1
package/THIRD_PARTY_NOTICES.md
CHANGED
|
@@ -43,6 +43,8 @@ reproduced at the end of this file. Paths are relative to each source repository
|
|
|
43
43
|
|
|
44
44
|
- `crates/path/src/varstroke.rs` (`outline`: a variable-width stroke as the union of positively wound trapezoids per flattened segment, round wedges at bends and the caps, filled non-zero; `flatten` with a width-sampling step; `dash_intervals`; `width_factor` with the `Taper` lengths, widths and quarter-circle `ease` and the `Wave` amount, cycles and phase) → `variableStrokeRings` / `variableStrokeOutline` / `dashIntervals` in `packages/core/src/vector/varstroke.ts` and `taperWaveFactor` / `generateWidthProfile` in `packages/core/src/vector/width.ts`; the pieces are emitted as the boundary they add up to (offset sides, outer joins, inner sides trimmed at the offsets' crossing or routed through the centre) instead of being unioned one by one, and the result is refitted with cubics; test cases re-expressed → `packages/core/tests/vector-width.test.ts`
|
|
45
45
|
- `crates/path/src/interp.rs` (`with_vertex_count`: largest-remainder allocation of new vertices by segment length and de Casteljau splits at equal arc length; `correspond`: same winding, then the cyclic offset with the lowest cost of normalised positions plus χ² distances of log-polar shape-context histograms, coarse then refined for long contours; `interpolate`: Procrustes rotation and scale interpolated with the residual blended in and a straight-line mix; `paths_cross`) → `refineMorphContour`, `correspondMorphContours`, `interpolateMorphContours` and `morphPathsCross` in `packages/core/src/vector/blend.ts`; the offset cost is what remains after the best-fit rotation (plus a small turn penalty) and the histograms measure angles from the contour's direction, so a turned shape corresponds by turning; test cases re-expressed → `packages/core/tests/vector-blend.test.ts`
|
|
46
|
+
- `crates/path/src/ops.rs` (`trim` / `trim_individually` with `trim_intervals` and `Measured::append`: start / end percentages swapped when reversed, an offset in degrees wrapping round, a piece that starts where the last ended continuing it; `pucker_bloat`; `round_corners`; `offset` with copies at `amount · (i + 1 + copy_offset)`; `twist` with subdivided segments and handles mapped through the warp's derivative; `resample` and `emit` (corner bisectors, smooth handles as a fraction of the pieces); `zigzag`; `WiggleParams`, `splitmix`, `hash`, the Catmull-Rom `noise` and `wiggle`; `MergeMode` and `merge`) → `trimPaths`, `trimPathsIndividually`, `puckerBloatPaths`, `offsetPaths`, `twistPaths`, `zigzagPaths`, `wigglePaths` and `mergePaths` in `packages/core/src/vector/pathEffects.ts`; arc lengths come from our `segmentLength` / `trimSegments`, offsets from `offsetPath`, booleans from `pathBoolean`, and Round Corners (`roundCornerPaths`) uses our live-corner maths (a true radius) instead of the port's setback arc; the wiggle's time is a plain parameter; test cases from `crates/path/src/ops/tests.rs` re-expressed → `packages/core/tests/vector-effects.test.ts`
|
|
47
|
+
- `crates/render/src/shapes.rs` (the module's stacking rule — an operator acts on every path above it in its group, nested groups included, and operators below a repeater act on its copies; the `"repeater"` branch of `collect()`: copy i transformed by `translate(position·k) · rotate(rotation·k) · scale^k` about the anchor with `k = i + offset`, opacity ramped from start to end, a fractional count fading the last copy, below / above composite order; Merge Paths painting with the paint below it) → `applyVectorEffects` / `vectorAppearanceShapes` in `packages/core/src/vector/appearance.ts` and `vectorRepeaterCopies` / `repeatPaths` in `packages/core/src/vector/pathEffects.ts`; effects live on path and group nodes rather than as items among paints, each shape painted in its source path's style (merged results in the bottom one's), and the repeater's anchor is an offset from the middle of the shapes' bounds
|
|
46
48
|
|
|
47
49
|
## figcraft
|
|
48
50
|
|
|
@@ -68,6 +70,7 @@ reproduced at the end of this file. Paths are relative to each source repository
|
|
|
68
70
|
- `crates/doc/src/vector_faces.rs` (`faces` / `cycles`: a half-edge walk of the planar graph turning at each vertex to the next half-edge in angular order, bounded faces positive, the outside of each connected piece negative and nested inside the smallest face around it as a hole; `components`; `interior_point`) → `PlanarMap` in `packages/core/src/canvas/pathops/planar.ts`; its linear scans per step were replaced by per-vertex sorted lists and half-edge slots, and its even-odd test over the whole network by per-face nesting
|
|
69
71
|
- `crates/engine/src/shapebuilder.rs` (merging regions styled like the top-most shape over the first one, every covering shape losing the area, removal, a stroke-only shape taking part as its stroke's outlined area filled with the stroke paint, one command per gesture) → `vectorPathfinderShape`, `vectorResultStyle` and `planShapeBuilder` in `packages/core/src/vector/builder.ts`
|
|
70
72
|
- `crates/pathops/src/width.rs` (`variable_outline`: one-sided widths offset along each side's normal, the outer side joined with the style's join and the inner side through the centre) → `packages/core/src/vector/varstroke.ts`
|
|
73
|
+
- `crates/render/src/boolean.rs` (`fold_cached` and `PathCache`: a boolean group's operands folded bottom to top, every prefix cached under a rolling hash of the operands it covers so the fold restarts from the longest cached prefix, least recently used half dropped when full, a step counter) and `crates/engine/src/booleans.rs` (per-operand operations falling back to the group's, a lone group setting the operation and clearing its operands', operands setting their own, anything else wrapped in a new group; results hit except while the group or a layer in it is selected, when operands are hit and outlined — `result_outline`, `outlined_operands`) → `foldVectorBooleanOperands`, `vectorEnteredGroups` and the live boolean shapes in `packages/core/src/vector/appearance.ts`, `booleanOp(op, { live })` and `hitPath` in `packages/core/src/vector/controller.ts`; the result is painted in the bottom operand's style instead of the group's own fills; test cases from `crates/render/src/boolean_cache_tests.rs` re-expressed → `packages/core/tests/vector-effects.test.ts`
|
|
71
74
|
|
|
72
75
|
## filmcraft
|
|
73
76
|
|
|
@@ -189,6 +192,7 @@ GridCraft. Apache POI is © The Apache Software Foundation, licensed under the A
|
|
|
189
192
|
- `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`
|
|
190
193
|
- `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`
|
|
191
194
|
---
|
|
195
|
+
- `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`
|
|
192
196
|
|
|
193
197
|
## wordcraft
|
|
194
198
|
|