webmarker-js 0.5.0 → 0.6.0

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
@@ -87,7 +87,7 @@ await page.evaluate(async () => await WebMarker.unmark());
87
87
  A custom CSS selector to specify which elements to mark.
88
88
 
89
89
  - Type: `string`
90
- - Default: `"button, input, a, select, textarea"`
90
+ - Default: `'a[href], button, input:not([type="hidden"]), select, textarea, summary, [role="button"], [tabindex]:not([tabindex="-1"])'`
91
91
 
92
92
  ### getLabel
93
93
 
package/dist/main.js CHANGED
@@ -931,7 +931,7 @@ var WebMarker = (() => {
931
931
  function mark(options = {}) {
932
932
  try {
933
933
  const {
934
- selector = "button, input, a, select, textarea",
934
+ selector = 'a[href], button, input:not([type="hidden"]), select, textarea, summary, [role="button"], [tabindex]:not([tabindex="-1"])',
935
935
  getLabel = (_, index) => index.toString(),
936
936
  markAttribute = "data-mark-label",
937
937
  markPlacement = "top-start",
package/dist/module.js CHANGED
@@ -907,7 +907,7 @@ var cleanupFns = [];
907
907
  function mark(options = {}) {
908
908
  try {
909
909
  const {
910
- selector = "button, input, a, select, textarea",
910
+ selector = 'a[href], button, input:not([type="hidden"]), select, textarea, summary, [role="button"], [tabindex]:not([tabindex="-1"])',
911
911
  getLabel = (_, index) => index.toString(),
912
912
  markAttribute = "data-mark-label",
913
913
  markPlacement = "top-start",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "webmarker-js",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "description": "A library for marking web pages for Set-of-Mark prompting with vision-language models.",
5
5
  "source": "src/index.ts",
6
6
  "main": "dist/main.js",
@@ -14,7 +14,7 @@
14
14
  "docs:dev": "cd docs && next",
15
15
  "docs:build": "cd docs && next build",
16
16
  "docs:start": "cd docs && next start",
17
- "test:playwright": "cd test/playwright && npx playwright test"
17
+ "test:playwright": "npx playwright test"
18
18
  },
19
19
  "author": "Reid Barber",
20
20
  "license": "MIT",