dictate-button 0.3.0 → 1.0.1

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
@@ -24,8 +24,8 @@ Choose the auto-inject mode that best suits your needs:
24
24
 
25
25
  | Mode | Description | Scripts |
26
26
  |---|---|---|
27
- | Exclusive | Automatically injects the dictate button into any textarea or text input **with the `data-dictate-button-on` attribute**. | `inject-exclusive.es.js`, `inject-exclusive.cjs.js` |
28
- | Inclusive | Automatically injects the dictate button into any textarea or text input **without the `data-dictate-button-off` attribute**. | `inject-inclusive.es.js`, `inject-inclusive.cjs.js` |
27
+ | Exclusive | Enables for `textarea` and `input[type=text]` with the `data-dictate-button-on` attribute only. | `inject-exclusive.js` |
28
+ | Inclusive | Enables for all `textarea` and `input[type=text]` without the `data-dictate-button-off` attribute. | `inject-inclusive.js` |
29
29
 
30
30
  ### From CDN
31
31
 
@@ -34,8 +34,8 @@ Choose the auto-inject mode that best suits your needs:
34
34
  In your HTML `<head>` tag, add the following script tags:
35
35
 
36
36
  ```html
37
- <script type="module" crossorigin src="https://cdn.dictate-button.io/dictate-button.es.js"></script>
38
- <script type="module" crossorigin src="https://cdn.dictate-button.io/inject-exclusive.es.js"></script>
37
+ <script type="module" crossorigin src="https://cdn.dictate-button.io/dictate-button.js"></script>
38
+ <script type="module" crossorigin src="https://cdn.dictate-button.io/inject-exclusive.js"></script>
39
39
  ```
40
40
 
41
41
  Add the `data-dictate-button-on` attribute to any `textarea` or `input[type=text]` elements where you want the dictate button to appear:
@@ -50,8 +50,8 @@ Add the `data-dictate-button-on` attribute to any `textarea` or `input[type=text
50
50
  In your HTML `<head>` tag, add the following script tags:
51
51
 
52
52
  ```html
53
- <script type="module" crossorigin src="https://cdn.dictate-button.io/dictate-button.es.js"></script>
54
- <script type="module" crossorigin src="https://cdn.dictate-button.io/inject-inclusive.es.js"></script>
53
+ <script type="module" crossorigin src="https://cdn.dictate-button.io/dictate-button.js"></script>
54
+ <script type="module" crossorigin src="https://cdn.dictate-button.io/inject-inclusive.js"></script>
55
55
  ```
56
56
 
57
57
  All `textarea` and `input[type=text]` elements without the `data-dictate-button-off` attribute will be automatically enhanced with the dictate button by default.
@@ -68,9 +68,9 @@ To disable that for a specific field, add the `data-dictate-button-off` attribut
68
68
  Import the component and use it directly in your code:
69
69
 
70
70
  ```html
71
- <script type="module" crossorigin src="https://cdn.dictate-button.io/dictate-button.es.js"></script>
71
+ <script type="module" crossorigin src="https://cdn.dictate-button.io/dictate-button.js"></script>
72
72
 
73
- <dictate-button size="24" api-endpoint="https://api.dictate-button.io/transcribe" language="en"></dictate-button>
73
+ <dictate-button size="30" api-endpoint="https://api.dictate-button.io/transcribe" language="en"></dictate-button>
74
74
  ```
75
75
 
76
76
  ### From NPM
@@ -86,8 +86,9 @@ import 'dictate-button'
86
86
  The auto-inject script:
87
87
 
88
88
  ```js
89
+ // For selected text fields (with data-dictate-button-on attribute):
89
90
  import 'dictate-button/inject-exclusive'
90
- // or
91
+ // or for all text fields (except those with data-dictate-button-off attribute):
91
92
  import 'dictate-button/inject-inclusive'
92
93
  ```
93
94
 
@@ -122,7 +123,7 @@ dictateButton.addEventListener('transcribing:finished', (event) => {
122
123
 
123
124
  | Attribute | Type | Default | Description |
124
125
  |---------------|---------|-----------------------------------------|----------------------------------------|
125
- | size | number | 24 | Size of the button in pixels |
126
+ | size | number | 30 | Size of the button in pixels |
126
127
  | apiEndpoint | string | https://api.dictate-button.io/transcribe| API endpoint for transcription service |
127
128
  | language | string | (not set) | Optional language code (e.g., 'en', 'fr', 'de') which may speed up the transcription. |
128
129
  | theme | string | (inherits from page) | 'light' or 'dark' |