@pie-players/pie-tool-ruler 0.1.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 +36 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/tool-ruler.js +12745 -0
- package/dist/tool-ruler.js.map +1 -0
- package/index.ts +8 -0
- package/package.json +66 -0
- package/ruler-cm.svg +281 -0
- package/ruler-inches.svg +94 -0
- package/tool-ruler.svelte +422 -0
package/README.md
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Ruler Tool
|
|
2
|
+
|
|
3
|
+
A draggable and rotatable ruler measurement tool for the PIEoneer assessment player.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- **Draggable**: Click and drag anywhere on the ruler to move it
|
|
8
|
+
- **Rotatable**: Use the green rotation handle or keyboard shortcuts
|
|
9
|
+
- **Unit Toggle**: Switch between inches and centimeters
|
|
10
|
+
- **Keyboard Navigation**:
|
|
11
|
+
- Arrow keys: Move the ruler
|
|
12
|
+
- Shift + Arrow keys: Rotate the ruler
|
|
13
|
+
- PageUp/PageDown: Fine rotation control
|
|
14
|
+
- U key: Toggle between inches and centimeters
|
|
15
|
+
- **Accessibility**: Full ARIA support and screen reader announcements
|
|
16
|
+
|
|
17
|
+
## Usage
|
|
18
|
+
|
|
19
|
+
```svelte
|
|
20
|
+
<script>
|
|
21
|
+
import ToolRuler from '$lib/tags/tool-ruler/tool-ruler.svelte';
|
|
22
|
+
|
|
23
|
+
let showRuler = false;
|
|
24
|
+
</script>
|
|
25
|
+
|
|
26
|
+
<ToolRuler visible={showRuler} toolId="ruler" />
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Props
|
|
30
|
+
|
|
31
|
+
- `visible` (boolean): Controls visibility of the tool
|
|
32
|
+
- `toolId` (string): Unique identifier for tool coordination (default: 'ruler')
|
|
33
|
+
|
|
34
|
+
## Based On
|
|
35
|
+
|
|
36
|
+
This implementation is based on production ruler tool patterns, adapted for the PIE architecture.
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
|