@weasel-js/core 1.4.4 → 1.5.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/CHANGELOG.md +937 -2202
- package/README.md +118 -75
- package/dist/{autoPoseDescriptor-DF1SnnSx.d.ts → autoPoseDescriptor-CvjflWJK.d.ts} +29 -26
- package/dist/{chunk-2VXGHUVL.js → chunk-BDWAA634.js} +4 -22
- package/dist/chunk-BDWAA634.js.map +1 -0
- package/dist/{chunk-R3AWPTLZ.js → chunk-MG7OXCAI.js} +2760 -4491
- package/dist/chunk-MG7OXCAI.js.map +1 -0
- package/dist/{chunk-PRGBGMH3.js → chunk-MQI4PIX3.js} +3 -3
- package/dist/chunk-MQI4PIX3.js.map +1 -0
- package/dist/{chunk-WPM42WJP.js → chunk-UCPV7JXC.js} +201 -256
- package/dist/chunk-UCPV7JXC.js.map +1 -0
- package/dist/clipboard.d.ts +2 -3
- package/dist/clone.d.ts +3 -2
- package/dist/depSchema-nMqj_qTM.d.ts +3490 -0
- package/dist/{grid-0Pbn5B2C.d.ts → grid-BrIa38gG.d.ts} +7 -10
- package/dist/index.d.ts +1996 -1229
- package/dist/index.js +4 -5
- package/dist/insert.d.ts +4 -4
- package/dist/insert.js +1 -1
- package/dist/move.d.ts +5 -6
- package/dist/move.js +3 -6
- package/dist/move.js.map +1 -1
- package/dist/{options-DbYLImvq.d.ts → options-BDyCnrp8.d.ts} +3 -2
- package/dist/poseDescriptor-CGOgIgf8.d.ts +134 -0
- package/dist/renderer.d.ts +10 -4
- package/dist/renderer.js +4 -5
- package/dist/resize.d.ts +10 -12
- package/dist/resize.js +2 -2
- package/dist/routing.d.ts +1 -142
- package/dist/routing.js +1 -1
- package/dist/routing.js.map +1 -1
- package/dist/{types-ei3UMl9R.d.ts → types-DMyo7dnM.d.ts} +12 -41
- package/dist/{types-DEALFt5F.d.ts → types-DtjCJA5r.d.ts} +9 -3
- package/package.json +13 -10
- package/dist/DrawCommand-CD-ug3d9.d.ts +0 -332
- package/dist/builtins-BXFBXegF.d.ts +0 -840
- package/dist/chunk-2VXGHUVL.js.map +0 -1
- package/dist/chunk-BL65SHCX.js +0 -573
- package/dist/chunk-BL65SHCX.js.map +0 -1
- package/dist/chunk-PRGBGMH3.js.map +0 -1
- package/dist/chunk-R3AWPTLZ.js.map +0 -1
- package/dist/chunk-WPM42WJP.js.map +0 -1
- package/dist/geometry-6fCNhAux.d.ts +0 -114
- package/dist/path-JEV2c5If.d.ts +0 -48
- package/dist/registry-BY-wI9gm.d.ts +0 -4003
- package/dist/types-BHK2dkMu.d.ts +0 -172
- package/dist/types-bcc7jcUy.d.ts +0 -594
- package/dist/view-DSQgxBJB.d.ts +0 -63
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { M as MoveBehavior, S as SnapStrategy } from './types-DMyo7dnM.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:
|
|
59
|
-
*
|
|
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 };
|