@weasel-js/core 1.4.4 → 1.5.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.
Files changed (58) hide show
  1. package/CHANGELOG.md +1295 -2197
  2. package/README.md +118 -75
  3. package/dist/autoPoseDescriptor-Dr6CwNZK.d.ts +26 -0
  4. package/dist/{chunk-WPM42WJP.js → chunk-3LPQ2XZG.js} +196 -406
  5. package/dist/chunk-3LPQ2XZG.js.map +1 -0
  6. package/dist/{chunk-R3AWPTLZ.js → chunk-GREL4MVO.js} +7593 -8533
  7. package/dist/chunk-GREL4MVO.js.map +1 -0
  8. package/dist/chunk-HAGOFNP5.js +162 -0
  9. package/dist/chunk-HAGOFNP5.js.map +1 -0
  10. package/dist/chunk-LXJDWBEL.js +318 -0
  11. package/dist/chunk-LXJDWBEL.js.map +1 -0
  12. package/dist/{chunk-2VXGHUVL.js → chunk-P6MGECVO.js} +4 -22
  13. package/dist/chunk-P6MGECVO.js.map +1 -0
  14. package/dist/{chunk-PRGBGMH3.js → chunk-XXQ6FLCJ.js} +3 -3
  15. package/dist/chunk-XXQ6FLCJ.js.map +1 -0
  16. package/dist/clipboard.d.ts +2 -3
  17. package/dist/clone.d.ts +3 -2
  18. package/dist/depSchema-BubKMv-2.d.ts +3479 -0
  19. package/dist/{grid-0Pbn5B2C.d.ts → grid-Z_Af3vTl.d.ts} +7 -10
  20. package/dist/index.d.ts +2588 -1556
  21. package/dist/index.js +6 -5
  22. package/dist/insert.d.ts +4 -4
  23. package/dist/insert.js +2 -1
  24. package/dist/insert.js.map +1 -1
  25. package/dist/math-E3rZn4bR.d.ts +282 -0
  26. package/dist/math.d.ts +5 -0
  27. package/dist/math.js +4 -0
  28. package/dist/math.js.map +1 -0
  29. package/dist/move.d.ts +5 -6
  30. package/dist/move.js +4 -6
  31. package/dist/move.js.map +1 -1
  32. package/dist/{options-DbYLImvq.d.ts → options-BPcmwYk7.d.ts} +3 -2
  33. package/dist/{autoPoseDescriptor-DF1SnnSx.d.ts → pointSnapToGrid-CgcK2R_I.d.ts} +11 -32
  34. package/dist/poseDescriptor-PgfVKfa0.d.ts +134 -0
  35. package/dist/renderer.d.ts +9 -4
  36. package/dist/renderer.js +6 -5
  37. package/dist/resize.d.ts +11 -12
  38. package/dist/resize.js +3 -2
  39. package/dist/routing.d.ts +1 -142
  40. package/dist/routing.js +1 -1
  41. package/dist/routing.js.map +1 -1
  42. package/dist/{types-ei3UMl9R.d.ts → types-BHGdrOcu.d.ts} +12 -41
  43. package/dist/{types-DEALFt5F.d.ts → types-BdaK9PcP.d.ts} +10 -4
  44. package/package.json +17 -10
  45. package/dist/DrawCommand-CD-ug3d9.d.ts +0 -332
  46. package/dist/builtins-BXFBXegF.d.ts +0 -840
  47. package/dist/chunk-2VXGHUVL.js.map +0 -1
  48. package/dist/chunk-BL65SHCX.js +0 -573
  49. package/dist/chunk-BL65SHCX.js.map +0 -1
  50. package/dist/chunk-PRGBGMH3.js.map +0 -1
  51. package/dist/chunk-R3AWPTLZ.js.map +0 -1
  52. package/dist/chunk-WPM42WJP.js.map +0 -1
  53. package/dist/geometry-6fCNhAux.d.ts +0 -114
  54. package/dist/path-JEV2c5If.d.ts +0 -48
  55. package/dist/registry-BY-wI9gm.d.ts +0 -4003
  56. package/dist/types-BHK2dkMu.d.ts +0 -172
  57. package/dist/types-bcc7jcUy.d.ts +0 -594
  58. package/dist/view-DSQgxBJB.d.ts +0 -63
@@ -1,5 +1,5 @@
1
- import { b as MoveBehavior, S as SnapStrategy } from './types-ei3UMl9R.js';
2
- import { D as DebugSink } from './types-BHK2dkMu.js';
1
+ import { M as MoveBehavior, S as SnapStrategy } from './types-BHGdrOcu.js';
2
+ import { DebugSink } from '@weasel-js/routing';
3
3
 
4
4
  /**
5
5
  * Units — a tiny customizable unit system for canvas-kit APIs.
@@ -45,6 +45,8 @@ declare function formatUnit(baseValue: number, displayUnit: Unit, unitSystem: Un
45
45
  declare const IMPERIAL_INCHES: UnitSystem;
46
46
  /** Metric unit system with base 'mm'. */
47
47
  declare const METRIC_MM: UnitSystem;
48
+ /** Angle unit system with base 'rad'. */
49
+ declare const ANGLE_RADIANS: UnitSystem;
48
50
  /** Pixel unit system — sole unit is the base. */
49
51
  declare const PIXELS: UnitSystem;
50
52
 
@@ -55,14 +57,9 @@ declare const PIXELS: UnitSystem;
55
57
  * Consumers should import from here directly; `move.ts` re-exports the
56
58
  * same symbol for back-compat. */
57
59
 
58
- /** Options for the `move` action: how a translation is applied to the pose,
59
- * and the behaviors (snapping, momentum) layered over the raw drag. */
60
+ /** Options for the `move` action: the behaviors (snapping, momentum) layered
61
+ * over the raw drag, and how a gesture expands a group into its leaves. */
60
62
  interface UseMoveOptions<TPose> {
61
- /** How to apply a `(dx, dy)` translation to a pose. Defaults to
62
- * `translateRectPose`, which assumes the pose carries top-level
63
- * `x`/`y` (the common rect-shaped case). Override for non-rect poses
64
- * (e.g. `Path` → `translatePath`). */
65
- translatePose?: (pose: TPose, dx: number, dy: number) => TPose;
66
63
  behaviors?: MoveBehavior<TPose>[];
67
64
  dragThresholdPx?: number;
68
65
  moveLabel?: string;
@@ -142,4 +139,4 @@ declare function pointToGridCell(point: {
142
139
  row: number;
143
140
  };
144
141
 
145
- export { IMPERIAL_INCHES as I, METRIC_MM as M, type OriginProjection as O, PIXELS as P, RECT_ORIGIN_PROJECTION as R, type UseMoveOptions as U, type UnitValue as a, type UnitSystem as b, type Unit as c, formatUnit as f, gridSnapStrategy as g, pointToGridCell as p, resolveUnit as r };
142
+ export { ANGLE_RADIANS as A, IMPERIAL_INCHES as I, METRIC_MM as M, type OriginProjection as O, PIXELS as P, RECT_ORIGIN_PROJECTION as R, type UseMoveOptions as U, type UnitValue as a, type UnitSystem as b, type Unit as c, formatUnit as f, gridSnapStrategy as g, pointToGridCell as p, resolveUnit as r };