@pie-players/pie-tool-graph 0.3.42 → 0.3.43
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/dist/defineProperty-CyepwRr5.js +33 -0
- package/dist/dist-DIBQdekL.js +466 -0
- package/dist/dist-rF11IR1B.js +213 -0
- package/dist/tool-graph.js +3474 -1711
- package/package.json +5 -4
- package/tool-graph.svelte +8 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-players/pie-tool-graph",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.43",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Interactive coordinate grid graphing tool for PIE assessment player",
|
|
6
6
|
"repository": {
|
|
@@ -38,14 +38,15 @@
|
|
|
38
38
|
"unpkg": "./dist/tool-graph.js",
|
|
39
39
|
"jsdelivr": "./dist/tool-graph.js",
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@pie-players/pie-assessment-toolkit": "0.3.
|
|
42
|
-
"@pie-players/pie-context": "0.3.
|
|
43
|
-
"@pie-players/pie-players-shared": "0.3.
|
|
41
|
+
"@pie-players/pie-assessment-toolkit": "0.3.43",
|
|
42
|
+
"@pie-players/pie-context": "0.3.43",
|
|
43
|
+
"@pie-players/pie-players-shared": "0.3.43"
|
|
44
44
|
},
|
|
45
45
|
"types": "./dist/index.d.ts",
|
|
46
46
|
"scripts": {
|
|
47
47
|
"build": "vite build",
|
|
48
48
|
"dev": "vite build --watch",
|
|
49
|
+
"test": "bun test tests",
|
|
49
50
|
"typecheck": "tsc --noEmit",
|
|
50
51
|
"lint": "biome check ."
|
|
51
52
|
},
|
package/tool-graph.svelte
CHANGED
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
<script lang="ts">
|
|
13
13
|
|
|
14
|
+
import { connectToolRuntimeContext } from '@pie-players/pie-assessment-toolkit';
|
|
14
15
|
|
|
15
16
|
// Props
|
|
16
17
|
let {
|
|
@@ -44,6 +45,7 @@
|
|
|
44
45
|
|
|
45
46
|
// State
|
|
46
47
|
let canvasWrapperEl = $state<HTMLDivElement | undefined>();
|
|
48
|
+
let containerEl = $state<HTMLDivElement | undefined>();
|
|
47
49
|
let svgCanvasEl = $state<SVGSVGElement | undefined>();
|
|
48
50
|
|
|
49
51
|
// Tool state
|
|
@@ -107,6 +109,11 @@
|
|
|
107
109
|
}
|
|
108
110
|
];
|
|
109
111
|
|
|
112
|
+
$effect(() => {
|
|
113
|
+
if (!containerEl) return;
|
|
114
|
+
return connectToolRuntimeContext(containerEl, () => undefined);
|
|
115
|
+
});
|
|
116
|
+
|
|
110
117
|
// Helper functions
|
|
111
118
|
function getUniqueId(): number {
|
|
112
119
|
return nextId++;
|
|
@@ -372,6 +379,7 @@
|
|
|
372
379
|
|
|
373
380
|
{#if visible}
|
|
374
381
|
<div
|
|
382
|
+
bind:this={containerEl}
|
|
375
383
|
class="pie-tool-graph"
|
|
376
384
|
role="dialog"
|
|
377
385
|
tabindex="-1"
|