@pie-players/pie-tool-ruler 0.3.75 → 1.0.0-beta.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.
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Ruler Tool
1
+ # @pie-players/pie-tool-ruler
2
2
 
3
3
  A draggable and rotatable ruler measurement tool for PIE assessment players.
4
4
 
@@ -6,7 +6,7 @@ A draggable and rotatable ruler measurement tool for PIE assessment players.
6
6
 
7
7
  - **Draggable**: Drag anywhere on the ruler, with a mouse, pen or finger, to move it.
8
8
  It may overhang the card it opens on, but keeps 100px inside it.
9
- - **Rotatable**: Drag the handle above the ruler to turn it about its centre, or use
9
+ - **Rotatable**: Drag the handle above the ruler to turn it about its center, or use
10
10
  the keyboard shortcuts
11
11
  - **Tap controls**: While the ruler has focus, a strip below it moves it 10px and
12
12
  turns it 5° or 1° a press, so it can be placed without dragging
@@ -35,7 +35,3 @@ A draggable and rotatable ruler measurement tool for PIE assessment players.
35
35
 
36
36
  - `visible` (boolean): Controls visibility of the tool
37
37
  - `toolId` (string): Unique identifier for tool coordination (default: 'ruler')
38
-
39
- ## Based On
40
-
41
- This implementation is based on production ruler tool patterns, adapted for the PIE architecture.
@@ -0,0 +1,68 @@
1
+ {
2
+ "schemaVersion": "2.1.0",
3
+ "modules": [
4
+ {
5
+ "kind": "javascript-module",
6
+ "path": "dist/tool-ruler.js",
7
+ "declarations": [
8
+ {
9
+ "kind": "class",
10
+ "description": "Draggable, rotatable ruler overlay with an inch and a centimetre scale. The host shows it with `visible`; inside a toolkit runtime context it registers `tool-id` with the tool coordinator on the tool layer, which brings it to the front when pressed. Arrow keys move it, Shift+Arrow and PageUp/PageDown rotate it, U switches units, and tap controls shown while it has focus move and turn it without dragging.",
11
+ "name": "ToolRuler",
12
+ "tagName": "pie-tool-ruler",
13
+ "customElement": true,
14
+ "members": [
15
+ {
16
+ "kind": "field",
17
+ "name": "visible",
18
+ "type": {
19
+ "text": "boolean"
20
+ },
21
+ "default": "false",
22
+ "attribute": "visible"
23
+ },
24
+ {
25
+ "kind": "field",
26
+ "name": "toolId",
27
+ "type": {
28
+ "text": "string"
29
+ },
30
+ "default": "'ruler'",
31
+ "attribute": "tool-id"
32
+ }
33
+ ],
34
+ "attributes": [
35
+ {
36
+ "name": "visible",
37
+ "type": {
38
+ "text": "boolean"
39
+ },
40
+ "default": "false",
41
+ "fieldName": "visible"
42
+ },
43
+ {
44
+ "name": "tool-id",
45
+ "type": {
46
+ "text": "string"
47
+ },
48
+ "default": "'ruler'",
49
+ "fieldName": "toolId"
50
+ }
51
+ ],
52
+ "x-pie": {
53
+ "shadow": "open"
54
+ }
55
+ }
56
+ ],
57
+ "exports": [
58
+ {
59
+ "kind": "custom-element-definition",
60
+ "name": "pie-tool-ruler",
61
+ "declaration": {
62
+ "name": "ToolRuler"
63
+ }
64
+ }
65
+ ]
66
+ }
67
+ ]
68
+ }