@willwade/aac-processors 0.2.19 → 0.2.20

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.
@@ -27,12 +27,29 @@ export var AACSemanticIntent;
27
27
  AACSemanticIntent["CLEAR_TEXT"] = "CLEAR_TEXT";
28
28
  AACSemanticIntent["COPY_TEXT"] = "COPY_TEXT";
29
29
  AACSemanticIntent["PASTE_TEXT"] = "PASTE_TEXT";
30
+ AACSemanticIntent["SELECT_ALL"] = "SELECT_ALL";
31
+ AACSemanticIntent["CURSOR_MOVE"] = "CURSOR_MOVE";
32
+ AACSemanticIntent["UNDO"] = "UNDO";
33
+ AACSemanticIntent["PRINT"] = "PRINT";
30
34
  // System Control
31
35
  AACSemanticIntent["SEND_KEYS"] = "SEND_KEYS";
32
36
  AACSemanticIntent["MOUSE_CLICK"] = "MOUSE_CLICK";
37
+ AACSemanticIntent["DEVICE_MUTE"] = "DEVICE_MUTE";
38
+ AACSemanticIntent["TOGGLE_STATE"] = "TOGGLE_STATE";
39
+ // Web Control
40
+ AACSemanticIntent["WEB_NAVIGATE"] = "WEB_NAVIGATE";
41
+ AACSemanticIntent["WEB_SCROLL"] = "WEB_SCROLL";
42
+ AACSemanticIntent["WEB_FOCUS_ELEMENT"] = "WEB_FOCUS_ELEMENT";
43
+ AACSemanticIntent["WEB_ACTIVATE_ELEMENT"] = "WEB_ACTIVATE_ELEMENT";
44
+ AACSemanticIntent["WEB_EXECUTE_SCRIPT"] = "WEB_EXECUTE_SCRIPT";
33
45
  // Media
34
46
  AACSemanticIntent["PLAY_SOUND"] = "PLAY_SOUND";
35
47
  AACSemanticIntent["PLAY_VIDEO"] = "PLAY_VIDEO";
48
+ AACSemanticIntent["STOP_MEDIA"] = "STOP_MEDIA";
49
+ AACSemanticIntent["TAKE_PHOTO"] = "TAKE_PHOTO";
50
+ // Command Execution
51
+ AACSemanticIntent["WAIT"] = "WAIT";
52
+ AACSemanticIntent["REPEAT_COMMANDS"] = "REPEAT_COMMANDS";
36
53
  // Accessibility
37
54
  AACSemanticIntent["SCAN_NEXT"] = "SCAN_NEXT";
38
55
  AACSemanticIntent["SCAN_SELECT"] = "SCAN_SELECT";
@@ -54,13 +54,23 @@ export function findButtonPosition(page, button, fallbackIndex) {
54
54
  }
55
55
  }
56
56
  }
57
- // Fallback positioning
57
+ // Fallback positioning using button's own x/y/span properties
58
+ const bx = button.x;
59
+ const by = button.y;
58
60
  const gridCols = page.grid?.[0]?.length || Math.ceil(Math.sqrt(page.buttons.length));
61
+ if (bx !== undefined && by !== undefined) {
62
+ return {
63
+ x: bx,
64
+ y: by,
65
+ columnSpan: button.columnSpan || 1,
66
+ rowSpan: button.rowSpan || 1,
67
+ };
68
+ }
59
69
  return {
60
70
  x: fallbackIndex % gridCols,
61
71
  y: Math.floor(fallbackIndex / gridCols),
62
- columnSpan: 1,
63
- rowSpan: 1,
72
+ columnSpan: button.columnSpan || 1,
73
+ rowSpan: button.rowSpan || 1,
64
74
  };
65
75
  }
66
76
  /**