@weasel-js/measure 0.0.0-stage → 2.0.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.
Files changed (40) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +55 -2
  3. package/dist/MeasureReadout/MeasureReadout.d.ts +24 -0
  4. package/dist/MeasureReadout/MeasureReadout.d.ts.map +1 -0
  5. package/dist/MeasureReadout/index.d.ts +3 -0
  6. package/dist/MeasureReadout/index.d.ts.map +1 -0
  7. package/dist/actionIds.d.ts +18 -0
  8. package/dist/actionIds.d.ts.map +1 -0
  9. package/dist/actionParamSchema.d.ts +15 -0
  10. package/dist/actionParamSchema.d.ts.map +1 -0
  11. package/dist/icons.gen.d.ts +3 -0
  12. package/dist/icons.gen.d.ts.map +1 -0
  13. package/dist/index.d.ts +11 -0
  14. package/dist/index.d.ts.map +1 -0
  15. package/dist/index.js +1022 -0
  16. package/dist/index.js.map +1 -0
  17. package/dist/measureActions.d.ts +35 -0
  18. package/dist/measureActions.d.ts.map +1 -0
  19. package/dist/measureCommands.d.ts +12 -0
  20. package/dist/measureCommands.d.ts.map +1 -0
  21. package/dist/measureContribution.d.ts +11 -0
  22. package/dist/measureContribution.d.ts.map +1 -0
  23. package/dist/measureEdits.d.ts +29 -0
  24. package/dist/measureEdits.d.ts.map +1 -0
  25. package/dist/measureHit.d.ts +22 -0
  26. package/dist/measureHit.d.ts.map +1 -0
  27. package/dist/measureLayer.d.ts +15 -0
  28. package/dist/measureLayer.d.ts.map +1 -0
  29. package/dist/measurePainter.d.ts +17 -0
  30. package/dist/measurePainter.d.ts.map +1 -0
  31. package/dist/measurement.d.ts +71 -0
  32. package/dist/measurement.d.ts.map +1 -0
  33. package/dist/measurements.d.ts +39 -0
  34. package/dist/measurements.d.ts.map +1 -0
  35. package/dist/style.css +47 -0
  36. package/dist/toolSets.d.ts +12 -0
  37. package/dist/toolSets.d.ts.map +1 -0
  38. package/dist/useMeasureTool.d.ts +26 -0
  39. package/dist/useMeasureTool.d.ts.map +1 -0
  40. package/package.json +68 -4
@@ -0,0 +1,71 @@
1
+ import { type MarkNode, type NodeId, type SceneNode, type RectPose, type ScopedScene } from '@weasel-js/core';
2
+ import { type Point } from '@weasel-js/geom';
3
+ /** A world-space point. */
4
+ export type MeasurePoint = Point;
5
+ /**
6
+ * The frame each end of a measurement landed in: the node declaring a unit
7
+ * scope it was placed inside (`createUnitFrameLookup`), or `null` for the top of the
8
+ * tree. The measurement reads in the scope chain the two frames share, so ends
9
+ * in one frame, or in frames declaring equal scopes, read that frame's
10
+ * modeled length, and ends whose frames disagree read the innermost frame
11
+ * holding both, which is world when only the root does.
12
+ */
13
+ export interface MeasureFrames {
14
+ readonly start: NodeId | null;
15
+ readonly end: NodeId | null;
16
+ }
17
+ /**
18
+ * The offset from `start` to `end`, in world units. `dx` and `dy` are on the
19
+ * world's own axes, where y grows downward; `angle` reads like a protractor
20
+ * instead, counterclockwise-positive on screen, so a line rising up and to
21
+ * the right at 30° reads +30°. The canvas's own rotations are
22
+ * clockwise-positive: a rotate that follows the line turns by `-angle`.
23
+ */
24
+ export interface Measurement {
25
+ readonly start: MeasurePoint;
26
+ readonly end: MeasurePoint;
27
+ readonly dx: number;
28
+ readonly dy: number;
29
+ readonly distance: number;
30
+ /** `atan2(-dy, dx)`, in `(-π, π]`. Zero for a zero-length measurement. */
31
+ readonly angle: number;
32
+ /** The frames its ends landed in. Absent, it reads in world. */
33
+ readonly frames?: MeasureFrames;
34
+ }
35
+ /** Measure from `start` to `end`, landed in `frames`. */
36
+ export declare function measureBetween(start: MeasurePoint, end: MeasurePoint, frames?: MeasureFrames): Measurement;
37
+ /** How large the frame `frames` share is drawn in world: a measurement's
38
+ * world lengths divided by it are its modeled lengths. 1 without frames. */
39
+ export declare function measureMagnification(scene: ScopedScene, frames: MeasureFrames | undefined): number;
40
+ /** What a measurement node keeps in `data`: its two ends, in world units, and
41
+ * the frames they landed in. A `label` beside it names the node in a layer
42
+ * list. */
43
+ export interface MeasureData {
44
+ measure: {
45
+ start: MeasurePoint;
46
+ end: MeasurePoint;
47
+ frames?: MeasureFrames;
48
+ };
49
+ label?: string;
50
+ }
51
+ /** Where an end placed at a world point lands: what a `createUnitFrameLookup` lookup answers. */
52
+ export type MeasureFrameAt = (p: MeasurePoint) => NodeId | null;
53
+ /** Which end of a measurement. */
54
+ export type MeasureEnd = 'start' | 'end';
55
+ /** The ends `node` measures between, or null when it is not a measurement. */
56
+ export declare function measureEndsOf(node: Pick<SceneNode<unknown, string, unknown>, 'data'> | undefined): MeasureData['measure'] | null;
57
+ /** The measurement `node` holds, or null when it is not one. */
58
+ export declare function measurementOf(node: Pick<SceneNode<unknown, string, unknown>, 'data'> | undefined): Measurement | null;
59
+ /** The box a measurement's pose holds: its two ends' bounds, which is what
60
+ * culling, area queries, and fitting the view read. */
61
+ export declare function measurePose(start: MeasurePoint, end: MeasurePoint): RectPose;
62
+ /** A measurement node on `layer`, ready to insert, or to list in a scene's
63
+ * `initial` nodes: typed with that layer and a `RectPose`. */
64
+ export declare function measureNode<TLayer extends string>(id: NodeId, layer: TLayer, start: MeasurePoint, end: MeasurePoint, frames?: MeasureFrames): MarkNode<MeasureData, TLayer, RectPose>;
65
+ /** `node`'s data and pose with its `which` end moved to `to`, landed in
66
+ * `frame`. Without `frame` the end keeps the one it had. */
67
+ export declare function withMeasureEnd(node: SceneNode<unknown, string, unknown>, which: MeasureEnd, to: MeasurePoint, frame?: NodeId | null): {
68
+ data: MeasureData;
69
+ pose: RectPose;
70
+ } | null;
71
+ //# sourceMappingURL=measurement.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"measurement.d.ts","sourceRoot":"","sources":["../src/measurement.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,QAAQ,EAAE,KAAK,MAAM,EAAE,KAAK,SAAS,EAAE,KAAK,QAAQ,EAAsB,KAAK,WAAW,EAChG,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAe,KAAK,KAAK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,GAAG,OAAO,GAAG,KAAK,CAAC;AAGzC,8EAA8E;AAC9E,wBAAgB,aAAa,CAAC,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,GAAG,SAAS,GAAG,WAAW,CAAC,SAAS,CAAC,GAAG,IAAI,CAIhI;AAED,gEAAgE;AAChE,wBAAgB,aAAa,CAAC,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,GAAG,SAAS,GAAG,WAAW,GAAG,IAAI,CAGrH;AAED;wDACwD;AACxD,wBAAgB,WAAW,CAAC,KAAK,EAAE,YAAY,EAAE,GAAG,EAAE,YAAY,GAAG,QAAQ,CAE5E;AAED;+DAC+D;AAC/D,wBAAgB,WAAW,CAAC,MAAM,SAAS,MAAM,EAC/C,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,YAAY,EACnB,GAAG,EAAE,YAAY,EACjB,MAAM,CAAC,EAAE,aAAa,GACrB,QAAQ,CAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,CAAC,CAGzC;AAED;6DAC6D;AAC7D,wBAAgB,cAAc,CAC5B,IAAI,EAAE,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EACzC,KAAK,EAAE,UAAU,EACjB,EAAE,EAAE,YAAY,EAChB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,GACpB;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,IAAI,EAAE,QAAQ,CAAA;CAAE,GAAG,IAAI,CAO9C"}
@@ -0,0 +1,39 @@
1
+ import { type ValueStore } from '@weasel-js/registry';
2
+ import { type NodeId, type Scene } from '@weasel-js/core';
3
+ import { type Measurement } from './measurement.js';
4
+ /** One value, readable and watchable — what a readout re-renders from. */
5
+ export type MeasureCell<T> = ValueStore<T>;
6
+ /**
7
+ * Where a scene's measurements go, and the state around them that is not
8
+ * the document's: which one is picked, and the one a measure drag is still
9
+ * drawing. The measurements themselves are nodes on `layer`, an annotation
10
+ * layer (`isAnnotationLayer`), so they save with the scene, undo with it,
11
+ * and stay out of export and content picking.
12
+ *
13
+ * The pick sits beside the content selection rather than in it: picking a
14
+ * measurement leaves the selection alone, so Move by can carry the selection
15
+ * by the picked measurement.
16
+ */
17
+ export interface Measurements {
18
+ /** The annotation layer new measurements are added to. */
19
+ readonly layer: string;
20
+ /** The picked measurement's id. */
21
+ readonly picked: MeasureCell<NodeId | null>;
22
+ /** The measurement a measure drag is drawing, before it is added. */
23
+ readonly draft: MeasureCell<Measurement | null>;
24
+ /** Whether the measure tool is active, which changes what a press on a
25
+ * measurement does: under it, only the picked one's ends take a drag, so a
26
+ * drag from anywhere else starts a new measurement. */
27
+ readonly measuring: MeasureCell<boolean>;
28
+ }
29
+ /** The measurements on `layer`, none picked and none in progress. */
30
+ export declare function createMeasurements(options: {
31
+ layer: string;
32
+ }): Measurements;
33
+ /** The measurement nodes on `ms.layer`, oldest first. */
34
+ export declare function measureIds(scene: Pick<Scene<unknown, string, unknown>, 'nodesOnLayer'>, ms: Pick<Measurements, 'layer'>): NodeId[];
35
+ /** The measurement commands act on: the picked one while it is still in the
36
+ * scene, else the newest. A hidden one (`nodeGates`), which nothing draws, is
37
+ * passed over as the hit test passes over it. */
38
+ export declare function currentMeasureId(scene: Pick<Scene<unknown, string, unknown>, 'nodesOnLayer' | 'get'> & Partial<Pick<Scene<unknown, string, unknown>, 'layers'>>, ms: Pick<Measurements, 'layer' | 'picked'>): NodeId | null;
39
+ //# sourceMappingURL=measurements.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"measurements.d.ts","sourceRoot":"","sources":["../src/measurements.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACxE,OAAO,EAAa,KAAK,MAAM,EAAE,KAAK,KAAK,EAAE,MAAM,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1
+ /* Numeric text: equal-width digits in the UI face. This is the one definition —
2
+ * compose it, mix it into Less, or put its class on the element; never restate
3
+ * the pair. `npm run check:numeric` holds every stylesheet to that. */._numeric_25fd0b {
4
+ font-family: var(--wzl-font-numeric);
5
+ font-variant-numeric: tabular-nums;
6
+ }
7
+
8
+ ._readout_7e51b2 {
9
+ position: absolute;
10
+ bottom: var(--wzl-space-6);
11
+ left: 50%;
12
+ translate: -50% 0;
13
+ display: flex;
14
+ align-items: center;
15
+ gap: var(--wzl-space-5);
16
+ padding: var(--wzl-space-2) var(--wzl-space-5);
17
+ border-radius: var(--wzl-radius-md);
18
+ background: color-mix(in srgb, var(--wzl-surface-raised) 78%, transparent);
19
+ backdrop-filter: blur(var(--wzl-glass-blur));
20
+ color: var(--wzl-fg);
21
+ font-size: var(--wzl-font-size-sm);
22
+ white-space: nowrap;
23
+ z-index: var(--wzl-z-overlay);
24
+ }
25
+
26
+ ._actions_7e51b2 {
27
+ flex: none;
28
+ display: flex;
29
+ gap: var(--wzl-space-2);
30
+ }
31
+
32
+ ._cell_7e51b2 {
33
+ display: inline-flex;
34
+ gap: var(--wzl-space-2);
35
+ align-items: baseline;
36
+ }
37
+
38
+ ._name_7e51b2 {
39
+ color: var(--wzl-fg-muted);
40
+ }
41
+
42
+ /* Sized for the widest value a page holds, so a live readout does not shift its neighbors. */
43
+ ._value_7e51b2 {
44
+ min-width: 9ch;
45
+ text-align: end;
46
+ }
47
+ /*$vite$:1*/
@@ -0,0 +1,12 @@
1
+ import { type Tool, type ToolSet } from '@weasel-js/core';
2
+ import { type UseMeasureToolOptions } from './useMeasureTool.js';
3
+ /** The ids {@link useMeasureTools} keys its tools by. */
4
+ export type MeasureToolId = 'measure';
5
+ /** Every tool `@weasel-js/measure` ships: the measure tool. */
6
+ export declare const MEASURE_TOOLS: ToolSet<MeasureToolId>;
7
+ /**
8
+ * Every tool in {@link MEASURE_TOOLS}, keyed by id, for `<SceneCanvas tools>` beside the
9
+ * `createMeasurementsContribution` whose actions they bind. `options` go to `useMeasureTool`.
10
+ */
11
+ export declare function useMeasureTools(options: UseMeasureToolOptions): Record<MeasureToolId, Tool>;
12
+ //# sourceMappingURL=toolSets.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toolSets.d.ts","sourceRoot":"","sources":["../src/toolSets.ts"],"names":[],"mappings":"AACA,OAAO,EAAW,KAAK,IAAI,EAAE,KAAK,OAAO,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,EAAkB,KAAK,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAE9E,yDAAyD;AACzD,MAAM,MAAM,aAAa,GAAG,SAAS,CAAC;AAEtC,+DAA+D;AAC/D,eAAO,MAAM,aAAa,EAAE,OAAO,CAAC,aAAa,CAAyD,CAAC;AAE3G;;;GAGG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,qBAAqB,GAAG,MAAM,CAAC,aAAa,EAAE,IAAI,CAAC,CAG3F"}
@@ -0,0 +1,26 @@
1
+ import { type Tool } from '@weasel-js/core';
2
+ import type { ToolKeybinding } from '@weasel-js/routing';
3
+ import type { Measurements } from './measurements.js';
4
+ /** Options for `useMeasureTool`. */
5
+ export interface UseMeasureToolOptions {
6
+ /** Where the measurements go and which one is picked — the same object the
7
+ * canvas's `createMeasurementsContribution` and a readout are given. */
8
+ measurements: Measurements;
9
+ /** The angle step, in radians, Shift holds a measurement to. Default 15°.
10
+ * Read on every pointer move, so a change mid-drag applies at once. */
11
+ angleStep?: number;
12
+ /** Override the default keybinding (`{ key: 'M' }`). Pass `null` to omit. */
13
+ keybinding?: ToolKeybinding | null;
14
+ }
15
+ /**
16
+ * Measure tool. A drag adds a measurement from press to release in world
17
+ * units — both ends through the `snap` dep, Shift holding the angle to
18
+ * `angleStep` — as one undo step, and picks it. A click picks the
19
+ * measurement under it, Escape drops the pick, and Delete removes the
20
+ * current measurement. The measurements are scene nodes on an annotation
21
+ * layer, so they stay when the tool changes; editing them under any tool,
22
+ * and the commands that transform by them, come from
23
+ * `createMeasurementsContribution`, which the canvas installs beside this tool.
24
+ */
25
+ export declare function useMeasureTool(options: UseMeasureToolOptions): Tool;
26
+ //# sourceMappingURL=useMeasureTool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useMeasureTool.d.ts","sourceRoot":"","sources":["../src/useMeasureTool.ts"],"names":[],"mappings":"AAEA,OAAO,EAA8B,KAAK,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAExE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAKnD,oCAAoC;AACpC,MAAM,WAAW,qBAAqB;IACpC;6EACyE;IACzE,YAAY,EAAE,YAAY,CAAC;IAC3B;4EACwE;IACxE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6EAA6E;IAC7E,UAAU,CAAC,EAAE,cAAc,GAAG,IAAI,CAAC;CACpC;AAED;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,qBAAqB,GAAG,IAAI,CA8BnE"}
package/package.json CHANGED
@@ -1,6 +1,70 @@
1
1
  {
2
2
  "name": "@weasel-js/measure",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "2.0.0",
4
+ "description": "Measuring for a weasel canvas: a measure tool, measurements kept as scene nodes on an annotation layer, the commands that move and rotate by them, and a readout that shows them.",
5
+ "weasel": {
6
+ "tier": "plugin"
7
+ },
8
+ "license": "MIT",
9
+ "type": "module",
10
+ "sideEffects": [
11
+ "*.css"
12
+ ],
13
+ "main": "./dist/index.js",
14
+ "module": "./dist/index.js",
15
+ "types": "./dist/index.d.ts",
16
+ "exports": {
17
+ ".": {
18
+ "types": "./dist/index.d.ts",
19
+ "import": "./dist/index.js"
20
+ },
21
+ "./style.css": "./dist/style.css",
22
+ "./package.json": "./package.json"
23
+ },
24
+ "author": "orochi235",
25
+ "homepage": "https://orochi235.github.io/weasel/",
26
+ "repository": {
27
+ "type": "git",
28
+ "url": "git+https://github.com/orochi235/weasel.git",
29
+ "directory": "packages/measure"
30
+ },
31
+ "bugs": {
32
+ "url": "https://github.com/orochi235/weasel/issues"
33
+ },
34
+ "engines": {
35
+ "node": ">=24"
36
+ },
37
+ "files": [
38
+ "dist",
39
+ "README.md",
40
+ "LICENSE"
41
+ ],
42
+ "scripts": {
43
+ "build": "vite build && tsc -p tsconfig.build.json && node ../../scripts/dts-extensions.mjs dist",
44
+ "test": "node ../../scripts/package-test.mjs"
45
+ },
46
+ "dependencies": {
47
+ "@weasel-js/editing": "2.0.0",
48
+ "@weasel-js/gestures": "2.0.0",
49
+ "@weasel-js/icons": "2.0.0",
50
+ "@weasel-js/quantity": "2.0.0",
51
+ "@weasel-js/react": "2.0.0",
52
+ "@weasel-js/registry": "2.0.0",
53
+ "@weasel-js/renderer": "2.0.0",
54
+ "@weasel-js/routing": "2.0.0",
55
+ "@weasel-js/ui": "2.0.0"
56
+ },
57
+ "peerDependencies": {
58
+ "@weasel-js/core": "2.0.0",
59
+ "@weasel-js/geom": "2.0.0",
60
+ "react": ">=18",
61
+ "react-dom": ">=18"
62
+ },
63
+ "publishConfig": {
64
+ "access": "public",
65
+ "provenance": true
66
+ },
67
+ "devDependencies": {
68
+ "@weasel-js/theme": "2.0.0"
69
+ }
70
+ }