@pie-players/pie-tool-protractor 0.1.10 → 0.1.11

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.
@@ -2753,6 +2753,24 @@ class Zf {
2753
2753
  getToolsByLevel(t) {
2754
2754
  return this.getAllTools().filter((e) => e.supportedLevels.includes(t));
2755
2755
  }
2756
+ /**
2757
+ * Resolve tool activation with backward-compatible defaults.
2758
+ */
2759
+ getToolActivation(t) {
2760
+ return this.get(t)?.activation || "toolbar-toggle";
2761
+ }
2762
+ /**
2763
+ * Resolve singleton scope for a tool when present.
2764
+ */
2765
+ getToolSingletonScope(t) {
2766
+ return this.get(t)?.singletonScope || null;
2767
+ }
2768
+ /**
2769
+ * Filter tool IDs by activation type.
2770
+ */
2771
+ filterToolIdsByActivation(t, e) {
2772
+ return t.filter((n) => this.getToolActivation(n) === e);
2773
+ }
2756
2774
  /**
2757
2775
  * Filter tools by visibility in a given context
2758
2776
  *
@@ -2792,7 +2810,9 @@ class Zf {
2792
2810
  name: t.name,
2793
2811
  description: t.description,
2794
2812
  pnpSupportIds: t.pnpSupportIds || [],
2795
- supportedLevels: t.supportedLevels
2813
+ supportedLevels: t.supportedLevels,
2814
+ activation: t.activation || "toolbar-toggle",
2815
+ singletonScope: t.singletonScope || null
2796
2816
  }));
2797
2817
  }
2798
2818
  /**
@@ -3433,6 +3453,7 @@ const rc = /* @__PURE__ */ new Set([
3433
3453
  name: "Highlighter",
3434
3454
  description: "Highlight text",
3435
3455
  icon: "highlighter",
3456
+ activation: "toolbar-toggle",
3436
3457
  // Highlighter appears at passage, rubric, item, and element levels
3437
3458
  supportedLevels: ["passage", "rubric", "item", "element"],
3438
3459
  // PNP support IDs
@@ -3581,6 +3602,8 @@ const rc = /* @__PURE__ */ new Set([
3581
3602
  name: "Highlighter",
3582
3603
  description: "Highlight and annotate text",
3583
3604
  icon: "highlighter",
3605
+ activation: "selection-gateway",
3606
+ singletonScope: "section",
3584
3607
  // Annotation appears where there's text content
3585
3608
  supportedLevels: ["passage", "rubric", "item", "element"],
3586
3609
  // PNP support IDs
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pie-players/pie-tool-protractor",
3
- "version": "0.1.10",
3
+ "version": "0.1.11",
4
4
  "type": "module",
5
5
  "description": "Draggable and rotatable protractor tool for PIE assessment player",
6
6
  "repository": {
@@ -42,9 +42,9 @@
42
42
  "unpkg": "./dist/tool-protractor.js",
43
43
  "jsdelivr": "./dist/tool-protractor.js",
44
44
  "dependencies": {
45
- "@pie-players/pie-assessment-toolkit": "0.2.10",
46
- "@pie-players/pie-context": "0.1.2",
47
- "@pie-players/pie-players-shared": "0.2.6",
45
+ "@pie-players/pie-assessment-toolkit": "0.2.11",
46
+ "@pie-players/pie-context": "0.1.3",
47
+ "@pie-players/pie-players-shared": "0.2.7",
48
48
  "daisyui": "^5.5.18",
49
49
  "moveable": "^0.53.0"
50
50
  },