@taterboom/shiteki 0.1.1 → 0.1.2
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 +14 -4
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +375 -148
- package/dist/index.mjs +357 -130
- package/dist/standalone.global.js +9 -9
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -35,13 +35,21 @@ function App() {
|
|
|
35
35
|
|
|
36
36
|
### Standalone (CDN with auto-mount)
|
|
37
37
|
|
|
38
|
+
Add a `data-shiteki` attribute with a JSON config:
|
|
39
|
+
|
|
38
40
|
```html
|
|
39
41
|
<script
|
|
40
42
|
src="https://unpkg.com/@taterboom/shiteki/dist/standalone.global.js"
|
|
41
|
-
data-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
data-shiteki='{"endpoint":"https://your-api.workers.dev","owner":"your-github-username","repo":"your-repo"}'
|
|
44
|
+
></script>
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
You can also mount with no config — the widget will load with annotation & copy features enabled, but send will be disabled until configured via settings:
|
|
48
|
+
|
|
49
|
+
```html
|
|
50
|
+
<script
|
|
51
|
+
src="https://unpkg.com/@taterboom/shiteki/dist/standalone.global.js"
|
|
52
|
+
data-shiteki
|
|
45
53
|
></script>
|
|
46
54
|
```
|
|
47
55
|
|
|
@@ -58,6 +66,8 @@ function App() {
|
|
|
58
66
|
</script>
|
|
59
67
|
```
|
|
60
68
|
|
|
69
|
+
`Shiteki.mount()` can also be called with no arguments.
|
|
70
|
+
|
|
61
71
|
## Config
|
|
62
72
|
|
|
63
73
|
| Property | Type | Required | Description |
|
package/dist/index.d.mts
CHANGED