@csalvato/remarq 2.0.0 → 2.1.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
@@ -43,27 +43,24 @@ cp node_modules/@csalvato/remarq/dist/feedback-layer.js public/
43
43
  Then add to your HTML:
44
44
 
45
45
  ```html
46
- <script
47
- src="/feedback-layer.js"
48
- data-api-url="http://localhost:3333"
49
- data-content-selector="article"
50
- ></script>
46
+ <script src="/feedback-layer.js" data-api-url="http://localhost:3333" data-content-selector="article"></script>
51
47
  ```
52
48
 
53
49
  ## Configuration
54
50
 
55
51
  Configure via data attributes on the script tag:
56
52
 
57
- | Attribute | Required | Default | Description |
58
- |-----------|----------|---------|-------------|
59
- | `data-api-url` | Yes | - | URL of your Remarq server |
60
- | `data-content-selector` | No | `"body"` | CSS selector for annotatable content |
61
- | `data-document-uri` | No | `window.location.pathname` | Unique identifier for this document |
62
- | `data-theme` | No | `"auto"` | Color theme: `"auto"` (follows OS), `"dark"`, or `"light"` |
53
+ | Attribute | Required | Default | Description |
54
+ | ----------------------- | -------- | -------------------------- | ---------------------------------------------------------- |
55
+ | `data-api-url` | Yes | - | URL of your Remarq server |
56
+ | `data-content-selector` | No | `"body"` | CSS selector for annotatable content |
57
+ | `data-document-uri` | No | `window.location.pathname` | Unique identifier for this document |
58
+ | `data-theme` | No | `"auto"` | Color theme: `"auto"` (follows OS), `"dark"`, or `"light"` |
63
59
 
64
60
  ### Examples
65
61
 
66
62
  **Annotate just the main article:**
63
+
67
64
  ```html
68
65
  <script
69
66
  src="https://unpkg.com/@csalvato/remarq@1/dist/feedback-layer.js"
@@ -73,6 +70,7 @@ Configure via data attributes on the script tag:
73
70
  ```
74
71
 
75
72
  **Annotate a specific div:**
73
+
76
74
  ```html
77
75
  <script
78
76
  src="https://unpkg.com/@csalvato/remarq@1/dist/feedback-layer.js"
@@ -82,6 +80,7 @@ Configure via data attributes on the script tag:
82
80
  ```
83
81
 
84
82
  **Multiple documents on same domain:**
83
+
85
84
  ```html
86
85
  <script
87
86
  src="https://unpkg.com/@csalvato/remarq@1/dist/feedback-layer.js"
@@ -112,23 +111,23 @@ The server implements these endpoints:
112
111
 
113
112
  **Documents**
114
113
 
115
- | Method | Endpoint | Description |
116
- |--------|----------|-------------|
117
- | `GET` | `/documents` | List all documents |
118
- | `POST` | `/documents` | Create or find a document by URI |
119
- | `GET` | `/documents/:id` | Retrieve a document |
114
+ | Method | Endpoint | Description |
115
+ | -------- | ---------------- | ---------------------------------- |
116
+ | `GET` | `/documents` | List all documents |
117
+ | `POST` | `/documents` | Create or find a document by URI |
118
+ | `GET` | `/documents/:id` | Retrieve a document |
120
119
  | `DELETE` | `/documents/:id` | Delete a document and its comments |
121
120
 
122
121
  **Comments**
123
122
 
124
- | Method | Endpoint | Description |
125
- |--------|----------|-------------|
126
- | `GET` | `/comments?document=<id>` | List comments by document ID |
127
- | `GET` | `/comments?uri=<url>` | List comments by document URI |
128
- | `POST` | `/comments` | Create a comment |
129
- | `GET` | `/comments/:id` | Retrieve a comment |
130
- | `PATCH` | `/comments/:id` | Update body or status |
131
- | `DELETE` | `/comments/:id` | Delete a comment and its replies |
123
+ | Method | Endpoint | Description |
124
+ | -------- | ------------------------- | -------------------------------- |
125
+ | `GET` | `/comments?document=<id>` | List comments by document ID |
126
+ | `GET` | `/comments?uri=<url>` | List comments by document URI |
127
+ | `POST` | `/comments` | Create a comment |
128
+ | `GET` | `/comments/:id` | Retrieve a comment |
129
+ | `PATCH` | `/comments/:id` | Update body or status |
130
+ | `DELETE` | `/comments/:id` | Delete a comment and its replies |
132
131
 
133
132
  ## Usage
134
133
 
@@ -167,5 +166,6 @@ MIT
167
166
  ## Credits
168
167
 
169
168
  Built with:
169
+
170
170
  - [Apache Annotator](https://annotator.apache.org/) - Text anchoring
171
171
  - [esbuild](https://esbuild.github.io/) - Bundling