Skip to content

Commit 21fb651

Browse files
committed
improve docs
1 parent fc172da commit 21fb651

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

README.md

+14-14
Original file line numberDiff line numberDiff line change
@@ -89,27 +89,34 @@ A custom CSS selector to specify which elements to mark.
8989
- Type: `string`
9090
- Default: `"button, input, a, select, textarea"`
9191

92+
### getLabel
93+
94+
Provide a function for generating labels. By default, labels are generated as integers starting from 0.
95+
96+
- Type: `(element: Element, index: number) => string`
97+
- Default: `(_, index) => index.toString()`
98+
9299
### markAttribute
93100

94101
A custom attribute to add to the marked elements. This attribute contains the label of the mark.
95102

96103
- Type: `string`
97104
- Default: `"data-mark-label"`
98105

99-
### markStyle
100-
101-
A CSS style to apply to the label element. You can also specify a function that returns a CSS style object.
102-
103-
- Type: `Partial<CSSStyleDeclaration> | (element: Element) => Partial<CSSStyleDeclaration>`
104-
- Default: `{backgroundColor: "red", color: "white", padding: "2px 4px", fontSize: "12px", fontWeight: "bold"}`
105-
106106
### markPlacement
107107

108108
The placement of the mark relative to the element.
109109

110110
- Type: `'top' | 'top-start' | 'top-end' | 'right' | 'right-start' | 'right-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end'`
111111
- Default: `'top-start'`
112112

113+
### markStyle
114+
115+
A CSS style to apply to the label element. You can also specify a function that returns a CSS style object.
116+
117+
- Type: `Partial<CSSStyleDeclaration> | (element: Element) => Partial<CSSStyleDeclaration>`
118+
- Default: `{backgroundColor: "red", color: "white", padding: "2px 4px", fontSize: "12px", fontWeight: "bold"}`
119+
113120
### boundingBoxStyle
114121

115122
A CSS style to apply to the bounding box element. You can also specify a function that returns a CSS style object. Bounding boxes are only shown if showBoundingBoxes is true.
@@ -124,13 +131,6 @@ Whether or not to show bounding boxes around the elements.
124131
- Type: `boolean`
125132
- Default: `true`
126133

127-
### getLabel
128-
129-
Provide a function for generating labels. By default, labels are generated as integers starting from 0.
130-
131-
- Type: `(element: Element, index: number) => string`
132-
- Default: `(_, index) => index.toString()`
133-
134134
### containerElement
135135

136136
Provide a container element to query the elements to be marked. By default, the container element is document.body.

docs/pages/index.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { Logo } from "../components/Logo";
1010
<br />
1111

1212
<div className="text-center">
13-
Mark web pages for use with multimodal large language models
13+
Mark web pages for use with vision-language models
1414
</div>
1515

1616
<Demo />

0 commit comments

Comments
 (0)