@weasel-js/core 1.0.2 → 1.0.4
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 +208 -0
- package/dist/{DrawCommand-DCmiNkBj.d.ts → DrawCommand-BbPrSTra.d.ts} +24 -0
- package/dist/{chunk-6SHZHXXR.js → chunk-4Z6J4IVH.js} +43 -27
- package/dist/chunk-4Z6J4IVH.js.map +1 -0
- package/dist/{chunk-PI56ORHE.js → chunk-AYGSXNY3.js} +540 -263
- package/dist/chunk-AYGSXNY3.js.map +1 -0
- package/dist/{chunk-UB6A6L77.js → chunk-CSMF654J.js} +3 -3
- package/dist/{chunk-UB6A6L77.js.map → chunk-CSMF654J.js.map} +1 -1
- package/dist/{chunk-IO5Z75X4.js → chunk-HGF5X6MZ.js} +2 -2
- package/dist/chunk-HGF5X6MZ.js.map +1 -0
- package/dist/{chunk-W2WB4352.js → chunk-J3YC3GVF.js} +5 -4
- package/dist/chunk-J3YC3GVF.js.map +1 -0
- package/dist/{chunk-Z3KNFTTS.js → chunk-J7LUY47N.js} +3 -3
- package/dist/chunk-J7LUY47N.js.map +1 -0
- package/dist/{chunk-775XXAHR.js → chunk-JOSUVS6C.js} +2 -2
- package/dist/{chunk-775XXAHR.js.map → chunk-JOSUVS6C.js.map} +1 -1
- package/dist/clipboard.d.ts +5 -2
- package/dist/clipboard.js +1 -1
- package/dist/clone.d.ts +2 -2
- package/dist/{geometry-CnISZ11w.d.ts → geometry-5X6TrAkX.d.ts} +1 -1
- package/dist/{grid-CBiLBnyc.d.ts → grid-sfilv5HP.d.ts} +7 -2
- package/dist/index.d.ts +552 -56
- package/dist/index.js +7 -7
- package/dist/insert.d.ts +6 -3
- package/dist/insert.js +1 -1
- package/dist/insert.js.map +1 -1
- package/dist/move.d.ts +26 -5
- package/dist/move.js +3 -3
- package/dist/move.js.map +1 -1
- package/dist/{options-DoOvx50U.d.ts → options-CbsIgQci.d.ts} +3 -1
- package/dist/patterns-builtin.d.ts +8 -0
- package/dist/patterns-builtin.js +1 -1
- package/dist/{pointSnapToGrid-Bj4r_lEQ.d.ts → pointSnapToGrid-C3wowsQy.d.ts} +9 -3
- package/dist/{registry-BQL4oyTg.d.ts → registry-QRg8KiNM.d.ts} +91 -7
- package/dist/renderer.d.ts +54 -17
- package/dist/renderer.js +7 -7
- package/dist/resize.d.ts +12 -5
- package/dist/resize.js +2 -2
- package/dist/routing.d.ts +7 -7
- package/dist/routing.js +1 -1
- package/dist/{types-Dtxe7jTS.d.ts → types-BHK2dkMu.d.ts} +23 -0
- package/dist/{types-Ct4n0Z38.d.ts → types-ByZxoD6P.d.ts} +1 -1
- package/dist/{types-Ch0Goo-j.d.ts → types-DpQ0cWYC.d.ts} +20 -0
- package/dist/{types-Kh_osAq9.d.ts → types-vqxpCFVp.d.ts} +31 -0
- package/dist/{viewToMat3-BvaWCN99.d.ts → viewToMat3-CQW_YqDw.d.ts} +1 -1
- package/package.json +6 -6
- package/dist/chunk-6SHZHXXR.js.map +0 -1
- package/dist/chunk-IO5Z75X4.js.map +0 -1
- package/dist/chunk-PI56ORHE.js.map +0 -1
- package/dist/chunk-W2WB4352.js.map +0 -1
- package/dist/chunk-Z3KNFTTS.js.map +0 -1
package/dist/clipboard.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { WEASEL_CLIPBOARD_MIME, WEASEL_CLIPBOARD_MIME_WEB, buildWeaselClipboardText, embedWeaselMetadataInSvg, extractWeaselClipboardFromSvg, parseWeaselClipboardText, sniffWeaselClipboardText, useClipboardOps } from './chunk-
|
|
1
|
+
export { WEASEL_CLIPBOARD_MIME, WEASEL_CLIPBOARD_MIME_WEB, buildWeaselClipboardText, embedWeaselMetadataInSvg, extractWeaselClipboardFromSvg, parseWeaselClipboardText, sniffWeaselClipboardText, useClipboardOps } from './chunk-JOSUVS6C.js';
|
|
2
2
|
import './chunk-BHVYVFGV.js';
|
|
3
3
|
import './chunk-GVCNT7UH.js';
|
|
4
4
|
//# sourceMappingURL=clipboard.js.map
|
package/dist/clone.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { C as CloneBehavior } from './types-
|
|
1
|
+
import { C as CloneBehavior } from './types-ByZxoD6P.js';
|
|
2
2
|
import '@weasel-js/history';
|
|
3
|
-
import './types-
|
|
3
|
+
import './types-DpQ0cWYC.js';
|
|
4
4
|
|
|
5
5
|
/** Clone-on-alt-drag behavior for `useClone`; activates when Alt/Option is held at drag start. */
|
|
6
6
|
declare function cloneByAltDrag(): CloneBehavior;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { V as View } from './view-DSQgxBJB.js';
|
|
2
|
-
import { R as ResizePose, a as RotatedPose } from './types-
|
|
2
|
+
import { R as ResizePose, a as RotatedPose } from './types-ByZxoD6P.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Axis-aligned rectangle in world space. Kit-wide `Bounds` shape used by
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { b as MoveBehavior, S as SnapStrategy } from './types-
|
|
2
|
-
import { D as DebugSink } from './types-
|
|
1
|
+
import { b as MoveBehavior, S as SnapStrategy } from './types-ByZxoD6P.js';
|
|
2
|
+
import { D as DebugSink } from './types-BHK2dkMu.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Units — a tiny customizable unit system for canvas-kit APIs.
|
|
@@ -55,6 +55,8 @@ declare const PIXELS: UnitSystem;
|
|
|
55
55
|
* Consumers should import from here directly; `move.ts` re-exports the
|
|
56
56
|
* same symbol for back-compat. */
|
|
57
57
|
|
|
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. */
|
|
58
60
|
interface UseMoveOptions<TPose> {
|
|
59
61
|
/** How to apply a `(dx, dy)` translation to a pose. Defaults to
|
|
60
62
|
* `translateRectPose`, which assumes the pose carries top-level
|
|
@@ -113,10 +115,13 @@ declare const RECT_ORIGIN_PROJECTION: OriginProjection<{
|
|
|
113
115
|
* `spacing` (resolved through `unitSystem`). For non-rect TPose pass an
|
|
114
116
|
* `OriginProjection` so the strategy knows how to read/write the origin. */
|
|
115
117
|
declare function gridSnapStrategy<TPose>(spacing: UnitValue, unitSystem?: UnitSystem): SnapStrategy<TPose>;
|
|
118
|
+
/** As above, additionally reporting each candidate to a debug sink. */
|
|
116
119
|
declare function gridSnapStrategy<TPose>(spacing: UnitValue, opts: {
|
|
117
120
|
unitSystem?: UnitSystem;
|
|
118
121
|
debug?: DebugSink;
|
|
119
122
|
}): SnapStrategy<TPose>;
|
|
123
|
+
/** As above, for a `TPose` that is not a rect: `origin` tells the strategy how
|
|
124
|
+
* to read and write the pose's origin. */
|
|
120
125
|
declare function gridSnapStrategy<TPose>(spacing: UnitValue, opts: {
|
|
121
126
|
unitSystem?: UnitSystem;
|
|
122
127
|
origin: OriginProjection<TPose>;
|