@corti/dictation-web 0.1.10 → 0.1.12

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/dist/bundle.js CHANGED
@@ -1007,8 +1007,7 @@ var DEFAULT_DICTATION_CONFIG = {
1007
1007
  primaryLanguage: "en",
1008
1008
  interimResults: true,
1009
1009
  spokenPunctuation: true,
1010
- automaticPunctuation: true,
1011
- model: "others"
1010
+ automaticPunctuation: true
1012
1011
  };
1013
1012
 
1014
1013
  // dist/styles/callout.js
@@ -1419,7 +1418,7 @@ var ThemeStyles = i`
1419
1418
  :host {
1420
1419
  color-scheme: light dark;
1421
1420
  /* Component Defaults */
1422
- --component-font-family: 'Segoe UI', Roboto, sans-serif;
1421
+ --component-font-family: -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, Cantarell, Ubuntu, roboto, noto, helvetica, arial, sans-serif;
1423
1422
  --component-text-color: light-dark(#333, #eee);
1424
1423
 
1425
1424
  /* Card Defaults */
@@ -47,103 +47,103 @@ let SettingsMenu = class SettingsMenu extends LitElement {
47
47
  }));
48
48
  }
49
49
  render() {
50
- return html `
51
- <div class="mic-selector">
52
- <button id="settings-popover-button" popovertarget="settings-popover">
53
- <icon-settings></icon-settings>
54
- </button>
55
- <div id="settings-popover" popover>
56
- <div class="settings-wrapper">
50
+ return html `
51
+ <div class="mic-selector">
52
+ <button id="settings-popover-button" popovertarget="settings-popover">
53
+ <icon-settings></icon-settings>
54
+ </button>
55
+ <div id="settings-popover" popover>
56
+ <div class="settings-wrapper">
57
57
  ${this.settingsDisabled
58
- ? html `
59
- <div class="callout warn">
60
- Recording is in progress. Stop recording to change settings.
61
- </div>
58
+ ? html `
59
+ <div class="callout warn">
60
+ Recording is in progress. Stop recording to change settings.
61
+ </div>
62
62
  `
63
- : ''}
64
- <div class="form-group">
65
- <label id="device-select-label" for="device-select">
66
- Recording Device
67
- </label>
68
- <select
69
- id="device-select"
70
- aria-labelledby="device-select-label"
63
+ : ''}
64
+ <div class="form-group">
65
+ <label id="device-select-label" for="device-select">
66
+ Recording Device
67
+ </label>
68
+ <select
69
+ id="device-select"
70
+ aria-labelledby="device-select-label"
71
71
  @change=${(e) => {
72
72
  this._selectDevice(e.target.value);
73
- }}
74
- ?disabled=${this.settingsDisabled}
75
- >
76
- ${this._devices.map(device => html `
77
- <option
78
- value=${device.deviceId}
79
- ?selected=${this.selectedDevice === device}
80
- >
81
- ${device.label || 'Unknown Device'}
82
- </option>
83
- `)}
84
- </select>
85
- </div>
86
- <div class="form-group">
87
- <label id="language-select-label" for="language-select">
88
- Dictation Language
89
- </label>
90
- <select
91
- id="language-select"
92
- aria-labelledby="language-select-label"
73
+ }}
74
+ ?disabled=${this.settingsDisabled}
75
+ >
76
+ ${this._devices.map(device => html `
77
+ <option
78
+ value=${device.deviceId}
79
+ ?selected=${this.selectedDevice === device}
80
+ >
81
+ ${device.label || 'Unknown Device'}
82
+ </option>
83
+ `)}
84
+ </select>
85
+ </div>
86
+ <div class="form-group">
87
+ <label id="language-select-label" for="language-select">
88
+ Dictation Language
89
+ </label>
90
+ <select
91
+ id="language-select"
92
+ aria-labelledby="language-select-label"
93
93
  @change=${(e) => {
94
94
  this._selectDevice(e.target.value);
95
- }}
96
- ?disabled=${this.settingsDisabled}
97
- >
98
- ${LANGUAGES_SUPPORTED.map(language => html `
99
- <option
100
- value=${language}
101
- ?selected=${this.selectedLanguage === language}
102
- >
103
- ${getLanguageName(language)}
104
- </option>
105
- `)}
106
- </select>
107
- </div>
108
- </div>
109
- </div>
110
- </div>
95
+ }}
96
+ ?disabled=${this.settingsDisabled}
97
+ >
98
+ ${LANGUAGES_SUPPORTED.map(language => html `
99
+ <option
100
+ value=${language}
101
+ ?selected=${this.selectedLanguage === language}
102
+ >
103
+ ${getLanguageName(language)}
104
+ </option>
105
+ `)}
106
+ </select>
107
+ </div>
108
+ </div>
109
+ </div>
110
+ </div>
111
111
  `;
112
112
  }
113
113
  };
114
114
  SettingsMenu.styles = [
115
- css `
116
- :host {
117
- display: block;
118
- font-family: var(--component-font-family);
119
- }
120
- /* Retain the anchor-name styling for this component */
121
- #settings-popover-button {
122
- anchor-name: --settings_popover_btn;
123
- }
124
- [popover] {
125
- margin: 0;
126
- padding: 16px;
127
- border: 0;
128
- background: var(--card-background);
129
- border: 1px solid var(--card-border-color);
130
- border-radius: var(--card-border-radius);
131
- box-shadow: var(--card-box-shadow);
132
- z-index: 1000;
133
- max-width: 260px;
134
- width: 100%;
135
- min-width: 200px;
136
- position-anchor: --settings_popover_btn;
137
- position-area: bottom span-right;
138
- position-visibility: always;
139
- position-try-fallbacks: flip-inline;
140
- overflow-x: hidden;
141
- }
142
- .settings-wrapper {
143
- display: flex;
144
- flex-direction: column;
145
- gap: 20px;
146
- }
115
+ css `
116
+ :host {
117
+ display: block;
118
+ font-family: var(--component-font-family);
119
+ }
120
+ /* Retain the anchor-name styling for this component */
121
+ #settings-popover-button {
122
+ anchor-name: --settings_popover_btn;
123
+ }
124
+ [popover] {
125
+ margin: 0;
126
+ padding: 16px;
127
+ border: 0;
128
+ background: var(--card-background);
129
+ border: 1px solid var(--card-border-color);
130
+ border-radius: var(--card-border-radius);
131
+ box-shadow: var(--card-box-shadow);
132
+ z-index: 1000;
133
+ max-width: 260px;
134
+ width: 100%;
135
+ min-width: 200px;
136
+ position-anchor: --settings_popover_btn;
137
+ position-area: bottom span-right;
138
+ position-visibility: always;
139
+ position-try-fallbacks: flip-inline;
140
+ overflow-x: hidden;
141
+ }
142
+ .settings-wrapper {
143
+ display: flex;
144
+ flex-direction: column;
145
+ gap: 20px;
146
+ }
147
147
  `,
148
148
  ButtonStyles,
149
149
  SelectStyles,
@@ -1 +1 @@
1
- {"version":3,"file":"settings-menu.js","sourceRoot":"","sources":["../../src/components/settings-menu.ts"],"names":[],"mappings":";;;;;;AAAA,kBAAkB;AAClB,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAkC,MAAM,KAAK,CAAC;AAC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ADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;oDACiB;AAG5C;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;sDACG;AAG9B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;sDACM;AAG1B;IADP,KAAK,EAAE;8CACiC;AAX9B,YAAY;IADxB,aAAa,CAAC,eAAe,CAAC;GAClB,YAAY,CA+JxB","sourcesContent":["// mic-selector.ts\nimport { LitElement, html, css, TemplateResult, CSSResultGroup } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\n\nimport ButtonStyles from '../styles/buttons.js';\nimport SelectStyles from '../styles/select.js';\nimport { LANGUAGES_SUPPORTED } from '../constants.js';\nimport { getAudioDevices, getLanguageName } from '../utils.js';\nimport CalloutStyles from '../styles/callout.js';\n\n@customElement('settings-menu')\nexport class SettingsMenu extends LitElement {\n @property({ type: String })\n selectedDevice: MediaDeviceInfo | undefined;\n\n @property({ type: String })\n selectedLanguage: string = '';\n\n @property({ type: Boolean })\n settingsDisabled: boolean = false;\n\n @state()\n private _devices: MediaDeviceInfo[] = [];\n\n constructor() {\n super();\n navigator.mediaDevices.addEventListener(\n 'devicechange',\n this.handleDevicesChange.bind(this),\n );\n }\n\n // on load, get the available devices\n async connectedCallback(): Promise<void> {\n super.connectedCallback();\n const deviceResponse = await getAudioDevices();\n this._devices = deviceResponse.devices;\n }\n\n private async handleDevicesChange() {\n const deviceResponse = await getAudioDevices();\n this._devices = deviceResponse.devices;\n }\n\n static styles: CSSResultGroup = [\n css`\n :host {\n display: block;\n font-family: var(--component-font-family);\n }\n /* Retain the anchor-name styling for this component */\n #settings-popover-button {\n anchor-name: --settings_popover_btn;\n }\n [popover] {\n margin: 0;\n padding: 16px;\n border: 0;\n background: var(--card-background);\n border: 1px solid var(--card-border-color);\n border-radius: var(--card-border-radius);\n box-shadow: var(--card-box-shadow);\n z-index: 1000;\n max-width: 260px;\n width: 100%;\n min-width: 200px;\n position-anchor: --settings_popover_btn;\n position-area: bottom span-right;\n position-visibility: always;\n position-try-fallbacks: flip-inline;\n overflow-x: hidden;\n }\n .settings-wrapper {\n display: flex;\n flex-direction: column;\n gap: 20px;\n }\n `,\n ButtonStyles,\n SelectStyles,\n CalloutStyles,\n ];\n\n private _selectDevice(deviceId: string): void {\n // Find the device object\n const device = this._devices.find(d => d.deviceId === deviceId);\n if (!device) {\n return;\n }\n this.selectedDevice = device;\n this.dispatchEvent(\n new CustomEvent('recording-devices-changed', {\n detail: {\n devices: this._devices,\n selectedDevice: device,\n },\n bubbles: true,\n composed: true,\n }),\n );\n }\n\n render(): TemplateResult {\n return html`\n <div class=\"mic-selector\">\n <button id=\"settings-popover-button\" popovertarget=\"settings-popover\">\n <icon-settings></icon-settings>\n </button>\n <div id=\"settings-popover\" popover>\n <div class=\"settings-wrapper\">\n ${this.settingsDisabled\n ? html`\n <div class=\"callout warn\">\n Recording is in progress. Stop recording to change settings.\n </div>\n `\n : ''}\n <div class=\"form-group\">\n <label id=\"device-select-label\" for=\"device-select\">\n Recording Device\n </label>\n <select\n id=\"device-select\"\n aria-labelledby=\"device-select-label\"\n @change=${(e: Event) => {\n this._selectDevice((e.target as HTMLSelectElement).value);\n }}\n ?disabled=${this.settingsDisabled}\n >\n ${this._devices.map(\n device => html`\n <option\n value=${device.deviceId}\n ?selected=${this.selectedDevice === device}\n >\n ${device.label || 'Unknown Device'}\n </option>\n `,\n )}\n </select>\n </div>\n <div class=\"form-group\">\n <label id=\"language-select-label\" for=\"language-select\">\n Dictation Language\n </label>\n <select\n id=\"language-select\"\n aria-labelledby=\"language-select-label\"\n @change=${(e: Event) => {\n this._selectDevice((e.target as HTMLSelectElement).value);\n }}\n ?disabled=${this.settingsDisabled}\n >\n ${LANGUAGES_SUPPORTED.map(\n language => html`\n <option\n value=${language}\n ?selected=${this.selectedLanguage === language}\n >\n ${getLanguageName(language)}\n </option>\n `,\n )}\n </select>\n </div>\n </div>\n </div>\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'settings-menu': SettingsMenu;\n }\n}\n"]}
1
+ {"version":3,"file":"settings-menu.js","sourceRoot":"","sources":["../../src/components/settings-menu.ts"],"names":[],"mappings":";;;;;;AAAA,kBAAkB;AAClB,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAkC,MAAM,KAAK,CAAC;AAC5E,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAEnE,OAAO,YAAY,MAAM,sBAAsB,CAAC;AAChD,OAAO,YAAY,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC/D,OAAO,aAAa,MAAM,sBAAsB,CAAC;AAG1C,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,UAAU;IAa1C;QACE,KAAK,EAAE,CAAC;QATV,qBAAgB,GAAW,EAAE,CAAC;QAG9B,qBAAgB,GAAY,KAAK,CAAC;QAG1B,aAAQ,GAAsB,EAAE,CAAC;QAIvC,SAAS,CAAC,YAAY,CAAC,gBAAgB,CACrC,cAAc,EACd,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,CACpC,CAAC;IACJ,CAAC;IAED,qCAAqC;IACrC,KAAK,CAAC,iBAAiB;QACrB,KAAK,CAAC,iBAAiB,EAAE,CAAC;QAC1B,MAAM,cAAc,GAAG,MAAM,eAAe,EAAE,CAAC;QAC/C,IAAI,CAAC,QAAQ,GAAG,cAAc,CAAC,OAAO,CAAC;IACzC,CAAC;IAEO,KAAK,CAAC,mBAAmB;QAC/B,MAAM,cAAc,GAAG,MAAM,eAAe,EAAE,CAAC;QAC/C,IAAI,CAAC,QAAQ,GAAG,cAAc,CAAC,OAAO,CAAC;IACzC,CAAC;IAyCO,aAAa,CA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AI,CAAC,gBAAgB,KAAK,QAAQ;;wBAE5C,eAAe,CAAC,QAAQ,CAAC;;mBAE9B,CACF;;;;;;KAMZ,CAAC;IACJ,CAAC;;AA7HM,mBAAM,GAAmB;IAC9B,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAgCF;IACD,YAAY;IACZ,YAAY;IACZ,aAAa;CACd,AArCY,CAqCX;AApEF;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;oDACiB;AAG5C;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;sDACG;AAG9B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;sDACM;AAG1B;IADP,KAAK,EAAE;8CACiC;AAX9B,YAAY;IADxB,aAAa,CAAC,eAAe,CAAC;GAClB,YAAY,CA+JxB","sourcesContent":["// mic-selector.ts\r\nimport { LitElement, html, css, TemplateResult, CSSResultGroup } from 'lit';\r\nimport { customElement, property, state } from 'lit/decorators.js';\r\n\r\nimport ButtonStyles from '../styles/buttons.js';\r\nimport SelectStyles from '../styles/select.js';\r\nimport { LANGUAGES_SUPPORTED } from '../constants.js';\r\nimport { getAudioDevices, getLanguageName } from '../utils.js';\r\nimport CalloutStyles from '../styles/callout.js';\r\n\r\n@customElement('settings-menu')\r\nexport class SettingsMenu extends LitElement {\r\n @property({ type: String })\r\n selectedDevice: MediaDeviceInfo | undefined;\r\n\r\n @property({ type: String })\r\n selectedLanguage: string = '';\r\n\r\n @property({ type: Boolean })\r\n settingsDisabled: boolean = false;\r\n\r\n @state()\r\n private _devices: MediaDeviceInfo[] = [];\r\n\r\n constructor() {\r\n super();\r\n navigator.mediaDevices.addEventListener(\r\n 'devicechange',\r\n this.handleDevicesChange.bind(this),\r\n );\r\n }\r\n\r\n // on load, get the available devices\r\n async connectedCallback(): Promise<void> {\r\n super.connectedCallback();\r\n const deviceResponse = await getAudioDevices();\r\n this._devices = deviceResponse.devices;\r\n }\r\n\r\n private async handleDevicesChange() {\r\n const deviceResponse = await getAudioDevices();\r\n this._devices = deviceResponse.devices;\r\n }\r\n\r\n static styles: CSSResultGroup = [\r\n css`\r\n :host {\r\n display: block;\r\n font-family: var(--component-font-family);\r\n }\r\n /* Retain the anchor-name styling for this component */\r\n #settings-popover-button {\r\n anchor-name: --settings_popover_btn;\r\n }\r\n [popover] {\r\n margin: 0;\r\n padding: 16px;\r\n border: 0;\r\n background: var(--card-background);\r\n border: 1px solid var(--card-border-color);\r\n border-radius: var(--card-border-radius);\r\n box-shadow: var(--card-box-shadow);\r\n z-index: 1000;\r\n max-width: 260px;\r\n width: 100%;\r\n min-width: 200px;\r\n position-anchor: --settings_popover_btn;\r\n position-area: bottom span-right;\r\n position-visibility: always;\r\n position-try-fallbacks: flip-inline;\r\n overflow-x: hidden;\r\n }\r\n .settings-wrapper {\r\n display: flex;\r\n flex-direction: column;\r\n gap: 20px;\r\n }\r\n `,\r\n ButtonStyles,\r\n SelectStyles,\r\n CalloutStyles,\r\n ];\r\n\r\n private _selectDevice(deviceId: string): void {\r\n // Find the device object\r\n const device = this._devices.find(d => d.deviceId === deviceId);\r\n if (!device) {\r\n return;\r\n }\r\n this.selectedDevice = device;\r\n this.dispatchEvent(\r\n new CustomEvent('recording-devices-changed', {\r\n detail: {\r\n devices: this._devices,\r\n selectedDevice: device,\r\n },\r\n bubbles: true,\r\n composed: true,\r\n }),\r\n );\r\n }\r\n\r\n render(): TemplateResult {\r\n return html`\r\n <div class=\"mic-selector\">\r\n <button id=\"settings-popover-button\" popovertarget=\"settings-popover\">\r\n <icon-settings></icon-settings>\r\n </button>\r\n <div id=\"settings-popover\" popover>\r\n <div class=\"settings-wrapper\">\r\n ${this.settingsDisabled\r\n ? html`\r\n <div class=\"callout warn\">\r\n Recording is in progress. Stop recording to change settings.\r\n </div>\r\n `\r\n : ''}\r\n <div class=\"form-group\">\r\n <label id=\"device-select-label\" for=\"device-select\">\r\n Recording Device\r\n </label>\r\n <select\r\n id=\"device-select\"\r\n aria-labelledby=\"device-select-label\"\r\n @change=${(e: Event) => {\r\n this._selectDevice((e.target as HTMLSelectElement).value);\r\n }}\r\n ?disabled=${this.settingsDisabled}\r\n >\r\n ${this._devices.map(\r\n device => html`\r\n <option\r\n value=${device.deviceId}\r\n ?selected=${this.selectedDevice === device}\r\n >\r\n ${device.label || 'Unknown Device'}\r\n </option>\r\n `,\r\n )}\r\n </select>\r\n </div>\r\n <div class=\"form-group\">\r\n <label id=\"language-select-label\" for=\"language-select\">\r\n Dictation Language\r\n </label>\r\n <select\r\n id=\"language-select\"\r\n aria-labelledby=\"language-select-label\"\r\n @change=${(e: Event) => {\r\n this._selectDevice((e.target as HTMLSelectElement).value);\r\n }}\r\n ?disabled=${this.settingsDisabled}\r\n >\r\n ${LANGUAGES_SUPPORTED.map(\r\n language => html`\r\n <option\r\n value=${language}\r\n ?selected=${this.selectedLanguage === language}\r\n >\r\n ${getLanguageName(language)}\r\n </option>\r\n `,\r\n )}\r\n </select>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n `;\r\n }\r\n}\r\n\r\ndeclare global {\r\n interface HTMLElementTagNameMap {\r\n 'settings-menu': SettingsMenu;\r\n }\r\n}\r\n"]}
package/dist/constants.js CHANGED
@@ -4,6 +4,5 @@ export const DEFAULT_DICTATION_CONFIG = {
4
4
  interimResults: true,
5
5
  spokenPunctuation: true,
6
6
  automaticPunctuation: true,
7
- model: 'others',
8
7
  };
9
8
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;AAChD,MAAM,CAAC,MAAM,wBAAwB,GAAoB;IACvD,eAAe,EAAE,IAAI;IACrB,cAAc,EAAE,IAAI;IACpB,iBAAiB,EAAE,IAAI;IACvB,oBAAoB,EAAE,IAAI;IAC1B,KAAK,EAAE,QAAQ;CAChB,CAAC","sourcesContent":["import { DictationConfig } from './types.js';\n\nexport const LANGUAGES_SUPPORTED = ['en', 'da'];\nexport const DEFAULT_DICTATION_CONFIG: DictationConfig = {\n primaryLanguage: 'en',\n interimResults: true,\n spokenPunctuation: true,\n automaticPunctuation: true,\n model: 'others',\n};\n"]}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;AAChD,MAAM,CAAC,MAAM,wBAAwB,GAAoB;IACvD,eAAe,EAAE,IAAI;IACrB,cAAc,EAAE,IAAI;IACpB,iBAAiB,EAAE,IAAI;IACvB,oBAAoB,EAAE,IAAI;CAC3B,CAAC","sourcesContent":["import { DictationConfig } from './types.js';\r\n\r\nexport const LANGUAGES_SUPPORTED = ['en', 'da'];\r\nexport const DEFAULT_DICTATION_CONFIG: DictationConfig = {\r\n primaryLanguage: 'en',\r\n interimResults: true,\r\n spokenPunctuation: true,\r\n automaticPunctuation: true,\r\n};\r\n"]}
@@ -1,53 +1,53 @@
1
1
  import { css } from 'lit';
2
- const ThemeStyles = css `
3
- :host {
4
- color-scheme: light dark;
5
- /* Component Defaults */
6
- --component-font-family: 'Segoe UI', Roboto, sans-serif;
7
- --component-text-color: light-dark(#333, #eee);
8
-
9
- /* Card Defaults */
10
- --card-background: light-dark(#fff, #333);
11
- --card-border-color: light-dark(#ddd, #555);
12
- --card-padding: 4px;
13
- --card-border-radius: 8px;
14
- --card-inner-border-radius: 6px;
15
- --card-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
16
-
17
- /* Actions Defaults */
18
- --action-plain-border-color: light-dark(#ccc, #555);
19
- --action-plain-background-hover: light-dark(#ddd, #444);
20
-
21
- --action-accent-background: light-dark(#007bff, #0056b3);
22
- --action-accent-background-hover: light-dark(#0056b3, #003d80);
23
- --action-accent-text-color: #fff;
24
-
25
- --action-red-background: light-dark(#dc3545, #bd2130);
26
- --action-red-background-hover: light-dark(#bd2130, #a71c24);
27
- --action-red-text-color: #fff;
28
-
29
- /* Callout Defaults */
30
- --callout-info-background: light-dark(#007bff33, #0056b333);
31
- --callout-info-border: light-dark(#007bff99, #0056b399);
32
- --callout-info-text: light-dark(#007bff, #0056b3);
33
-
34
- --callout-error-background: light-dark(#dc354533, #bd213033);
35
- --callout-error-border: light-dark(#dc354599, #bd213099);
36
- --callout-error-text: light-dark(#dc3545, #bd2130);
37
-
38
- --callout-warn-background: light-dark(#fd7e1433, #e06c1233);
39
- --callout-warn-border: light-dark(#fd7e1499, #e06c1299);
40
- --callout-warn-text: light-dark(#fd7e14, #e06c12);
41
-
42
- /* Visualiser Defaults */
43
- --visualiser-background: light-dark(#e0e0e0, #fff);
44
- }
45
-
46
- :host {
47
- box-sizing: border-box;
48
- font-family: var(--component-font-family);
49
- color: var(--component-text-color);
50
- }
2
+ const ThemeStyles = css `
3
+ :host {
4
+ color-scheme: light dark;
5
+ /* Component Defaults */
6
+ --component-font-family: -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, Cantarell, Ubuntu, roboto, noto, helvetica, arial, sans-serif;
7
+ --component-text-color: light-dark(#333, #eee);
8
+
9
+ /* Card Defaults */
10
+ --card-background: light-dark(#fff, #333);
11
+ --card-border-color: light-dark(#ddd, #555);
12
+ --card-padding: 4px;
13
+ --card-border-radius: 8px;
14
+ --card-inner-border-radius: 6px;
15
+ --card-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
16
+
17
+ /* Actions Defaults */
18
+ --action-plain-border-color: light-dark(#ccc, #555);
19
+ --action-plain-background-hover: light-dark(#ddd, #444);
20
+
21
+ --action-accent-background: light-dark(#007bff, #0056b3);
22
+ --action-accent-background-hover: light-dark(#0056b3, #003d80);
23
+ --action-accent-text-color: #fff;
24
+
25
+ --action-red-background: light-dark(#dc3545, #bd2130);
26
+ --action-red-background-hover: light-dark(#bd2130, #a71c24);
27
+ --action-red-text-color: #fff;
28
+
29
+ /* Callout Defaults */
30
+ --callout-info-background: light-dark(#007bff33, #0056b333);
31
+ --callout-info-border: light-dark(#007bff99, #0056b399);
32
+ --callout-info-text: light-dark(#007bff, #0056b3);
33
+
34
+ --callout-error-background: light-dark(#dc354533, #bd213033);
35
+ --callout-error-border: light-dark(#dc354599, #bd213099);
36
+ --callout-error-text: light-dark(#dc3545, #bd2130);
37
+
38
+ --callout-warn-background: light-dark(#fd7e1433, #e06c1233);
39
+ --callout-warn-border: light-dark(#fd7e1499, #e06c1299);
40
+ --callout-warn-text: light-dark(#fd7e14, #e06c12);
41
+
42
+ /* Visualiser Defaults */
43
+ --visualiser-background: light-dark(#e0e0e0, #fff);
44
+ }
45
+
46
+ :host {
47
+ box-sizing: border-box;
48
+ font-family: var(--component-font-family);
49
+ color: var(--component-text-color);
50
+ }
51
51
  `;
52
52
  export default ThemeStyles;
53
53
  //# sourceMappingURL=theme.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"theme.js","sourceRoot":"","sources":["../../src/styles/theme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,WAAW,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiDtB,CAAC;AAEF,eAAe,WAAW,CAAC","sourcesContent":["import { css } from 'lit';\n\nconst ThemeStyles = css`\n :host {\n color-scheme: light dark;\n /* Component Defaults */\n --component-font-family: 'Segoe UI', Roboto, sans-serif;\n --component-text-color: light-dark(#333, #eee);\n\n /* Card Defaults */\n --card-background: light-dark(#fff, #333);\n --card-border-color: light-dark(#ddd, #555);\n --card-padding: 4px;\n --card-border-radius: 8px;\n --card-inner-border-radius: 6px;\n --card-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);\n\n /* Actions Defaults */\n --action-plain-border-color: light-dark(#ccc, #555);\n --action-plain-background-hover: light-dark(#ddd, #444);\n\n --action-accent-background: light-dark(#007bff, #0056b3);\n --action-accent-background-hover: light-dark(#0056b3, #003d80);\n --action-accent-text-color: #fff;\n\n --action-red-background: light-dark(#dc3545, #bd2130);\n --action-red-background-hover: light-dark(#bd2130, #a71c24);\n --action-red-text-color: #fff;\n\n /* Callout Defaults */\n --callout-info-background: light-dark(#007bff33, #0056b333);\n --callout-info-border: light-dark(#007bff99, #0056b399);\n --callout-info-text: light-dark(#007bff, #0056b3);\n\n --callout-error-background: light-dark(#dc354533, #bd213033);\n --callout-error-border: light-dark(#dc354599, #bd213099);\n --callout-error-text: light-dark(#dc3545, #bd2130);\n\n --callout-warn-background: light-dark(#fd7e1433, #e06c1233);\n --callout-warn-border: light-dark(#fd7e1499, #e06c1299);\n --callout-warn-text: light-dark(#fd7e14, #e06c12);\n\n /* Visualiser Defaults */\n --visualiser-background: light-dark(#e0e0e0, #fff);\n }\n\n :host {\n box-sizing: border-box;\n font-family: var(--component-font-family);\n color: var(--component-text-color);\n }\n`;\n\nexport default ThemeStyles;\n"]}
1
+ {"version":3,"file":"theme.js","sourceRoot":"","sources":["../../src/styles/theme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,WAAW,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiDtB,CAAC;AAEF,eAAe,WAAW,CAAC","sourcesContent":["import { css } from 'lit';\r\n\r\nconst ThemeStyles = css`\r\n :host {\r\n color-scheme: light dark;\r\n /* Component Defaults */\r\n --component-font-family: -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, Cantarell, Ubuntu, roboto, noto, helvetica, arial, sans-serif;\r\n --component-text-color: light-dark(#333, #eee);\r\n\r\n /* Card Defaults */\r\n --card-background: light-dark(#fff, #333);\r\n --card-border-color: light-dark(#ddd, #555);\r\n --card-padding: 4px;\r\n --card-border-radius: 8px;\r\n --card-inner-border-radius: 6px;\r\n --card-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);\r\n\r\n /* Actions Defaults */\r\n --action-plain-border-color: light-dark(#ccc, #555);\r\n --action-plain-background-hover: light-dark(#ddd, #444);\r\n\r\n --action-accent-background: light-dark(#007bff, #0056b3);\r\n --action-accent-background-hover: light-dark(#0056b3, #003d80);\r\n --action-accent-text-color: #fff;\r\n\r\n --action-red-background: light-dark(#dc3545, #bd2130);\r\n --action-red-background-hover: light-dark(#bd2130, #a71c24);\r\n --action-red-text-color: #fff;\r\n\r\n /* Callout Defaults */\r\n --callout-info-background: light-dark(#007bff33, #0056b333);\r\n --callout-info-border: light-dark(#007bff99, #0056b399);\r\n --callout-info-text: light-dark(#007bff, #0056b3);\r\n\r\n --callout-error-background: light-dark(#dc354533, #bd213033);\r\n --callout-error-border: light-dark(#dc354599, #bd213099);\r\n --callout-error-text: light-dark(#dc3545, #bd2130);\r\n\r\n --callout-warn-background: light-dark(#fd7e1433, #e06c1233);\r\n --callout-warn-border: light-dark(#fd7e1499, #e06c1299);\r\n --callout-warn-text: light-dark(#fd7e14, #e06c12);\r\n\r\n /* Visualiser Defaults */\r\n --visualiser-background: light-dark(#e0e0e0, #fff);\r\n }\r\n\r\n :host {\r\n box-sizing: border-box;\r\n font-family: var(--component-font-family);\r\n color: var(--component-text-color);\r\n }\r\n`;\r\n\r\nexport default ThemeStyles;\r\n"]}
package/dist/types.d.ts CHANGED
@@ -14,7 +14,7 @@ export interface DictationConfig {
14
14
  interimResults: boolean;
15
15
  spokenPunctuation: boolean;
16
16
  automaticPunctuation: boolean;
17
- model: string;
17
+ model?: string;
18
18
  commands?: Command[];
19
19
  }
20
20
  export type PartialDictationConfig = Partial<DictationConfig>;
package/dist/types.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"","sourcesContent":["export type RecordingState =\n | 'initializing'\n | 'recording'\n | 'stopping'\n | 'stopped';\n\ninterface CommandVariable {\n key: string;\n type: 'enum' | 'string';\n enum?: string[];\n}\n\nexport interface Command {\n id: string;\n phrases: string[];\n variables?: CommandVariable[];\n}\n\nexport interface DictationConfig {\n primaryLanguage: string;\n interimResults: boolean;\n spokenPunctuation: boolean;\n automaticPunctuation: boolean;\n model: string;\n commands?: Command[];\n}\n\nexport type PartialDictationConfig = Partial<DictationConfig>;\n\nexport interface ServerConfig {\n environment: string;\n tenant: string;\n accessToken: string;\n}\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"","sourcesContent":["export type RecordingState =\r\n | 'initializing'\r\n | 'recording'\r\n | 'stopping'\r\n | 'stopped';\r\n\r\ninterface CommandVariable {\r\n key: string;\r\n type: 'enum' | 'string';\r\n enum?: string[];\r\n}\r\n\r\nexport interface Command {\r\n id: string;\r\n phrases: string[];\r\n variables?: CommandVariable[];\r\n}\r\n\r\nexport interface DictationConfig {\r\n primaryLanguage: string;\r\n interimResults: boolean;\r\n spokenPunctuation: boolean;\r\n automaticPunctuation: boolean;\r\n model?: string;\r\n commands?: Command[];\r\n}\r\n\r\nexport type PartialDictationConfig = Partial<DictationConfig>;\r\n\r\nexport interface ServerConfig {\r\n environment: string;\r\n tenant: string;\r\n accessToken: string;\r\n}\r\n"]}
package/package.json CHANGED
@@ -1,117 +1,117 @@
1
- {
2
- "name": "@corti/dictation-web",
3
- "description": "Web component for Corti Dictation",
4
- "author": "Corti ApS",
5
- "version": "0.1.10",
6
- "license": "MIT",
7
- "type": "module",
8
- "main": "dist/index.js",
9
- "module": "dist/index.js",
10
- "exports": {
11
- "import": "./dist/index.js",
12
- "default": "./dist/bundle.js"
13
- },
14
- "jsdelivr": "./dist/bundle.js",
15
- "files": [
16
- "dist"
17
- ],
18
- "bugs": {
19
- "url": "https://help.corti.app",
20
- "email": "help@corti.ai"
21
- },
22
- "repository": "github:corticph/dictation-web-sdk",
23
- "homepage": "https://help.corti.app/en/articles/10714657-introducing-the-corti-dictation-browser-sdk",
24
- "keywords": [
25
- "corti",
26
- "dictation",
27
- "web",
28
- "sdk",
29
- "speech",
30
- "recognition",
31
- "transcription",
32
- "audio",
33
- "medical",
34
- "healthcare"
35
- ],
36
- "scripts": {
37
- "analyze": "cem analyze --litelement",
38
- "build": "tsc && npm run analyze -- --exclude dist",
39
- "build:bundle": "esbuild dist/index.js --bundle --outfile=dist/bundle.js --format=esm --platform=browser",
40
- "release": "npm run build && npm run build:bundle && npm publish --access public",
41
- "start": "npm run build && concurrently -k -r \"tsc --watch --preserveWatchOutput\" \"web-dev-server\"",
42
- "prepublish": "tsc && npm run analyze -- --exclude dist",
43
- "lint": "eslint --ext .ts,.tsx src --ignore-path .gitignore && prettier \"src/**/*.ts\" --check --ignore-path .gitignore",
44
- "format": "eslint --ext .ts,.tsx src --fix --ignore-path .gitignore && prettier \"src/**/*.ts\" --write --ignore-path .gitignore",
45
- "prepare": "husky && husky install",
46
- "test": "tsc && wtr --coverage",
47
- "test:watch": "tsc && concurrently -k -r \"tsc --watch --preserveWatchOutput\" \"wtr --watch\"",
48
- "storybook": "tsc && npm run analyze -- --exclude dist && concurrently -k -r \"tsc --watch --preserveWatchOutput\" \"storybook dev -p 8080\"",
49
- "storybook:build": "tsc && npm run analyze -- --exclude dist && storybook build"
50
- },
51
- "dependencies": {
52
- "lit": "^3.1.4"
53
- },
54
- "devDependencies": {
55
- "@custom-elements-manifest/analyzer": "^0.10.3",
56
- "@open-wc/eslint-config": "^12.0.3",
57
- "@open-wc/testing": "^4.0.0",
58
- "@storybook/addon-a11y": "^7.6.20",
59
- "@storybook/addon-essentials": "^7.6.20",
60
- "@storybook/addon-links": "^7.6.20",
61
- "@storybook/web-components": "^7.6.20",
62
- "@types/mocha": "^10.0.7",
63
- "@typescript-eslint/eslint-plugin": "^7.18.0",
64
- "@typescript-eslint/parser": "^7.18.0",
65
- "@web/dev-server": "^0.4.6",
66
- "@web/storybook-builder": "^0.1.16",
67
- "@web/storybook-framework-web-components": "^0.1.2",
68
- "@web/test-runner": "^0.18.2",
69
- "concurrently": "^8.2.2",
70
- "esbuild": "^0.25.0",
71
- "eslint": "^8.57.0",
72
- "eslint-config-prettier": "^9.1.0",
73
- "eslint-plugin-html": "^8.1.2",
74
- "husky": "^8.0.0",
75
- "lint-staged": "^15.2.7",
76
- "prettier": "^3.3.2",
77
- "sinon": "^19.0.2",
78
- "storybook": "^7.6.20",
79
- "tslib": "^2.6.3",
80
- "typescript": "^5.5.3"
81
- },
82
- "customElements": "custom-elements.json",
83
- "eslintConfig": {
84
- "parser": "@typescript-eslint/parser",
85
- "extends": [
86
- "@open-wc",
87
- "prettier"
88
- ],
89
- "plugins": [
90
- "@typescript-eslint"
91
- ],
92
- "rules": {
93
- "no-unused-vars": "off",
94
- "@typescript-eslint/no-unused-vars": [
95
- "error"
96
- ],
97
- "import/no-unresolved": "off",
98
- "import/extensions": [
99
- "error",
100
- "always",
101
- {
102
- "ignorePackages": true
103
- }
104
- ]
105
- }
106
- },
107
- "prettier": {
108
- "singleQuote": true,
109
- "arrowParens": "avoid"
110
- },
111
- "lint-staged": {
112
- "*.ts": [
113
- "eslint --fix",
114
- "prettier --write"
115
- ]
116
- }
117
- }
1
+ {
2
+ "name": "@corti/dictation-web",
3
+ "description": "Web component for Corti Dictation",
4
+ "author": "Corti ApS",
5
+ "version": "0.1.12",
6
+ "license": "MIT",
7
+ "type": "module",
8
+ "main": "dist/index.js",
9
+ "module": "dist/index.js",
10
+ "exports": {
11
+ "import": "./dist/index.js",
12
+ "default": "./dist/bundle.js"
13
+ },
14
+ "jsdelivr": "./dist/bundle.js",
15
+ "files": [
16
+ "dist"
17
+ ],
18
+ "bugs": {
19
+ "url": "https://help.corti.app",
20
+ "email": "help@corti.ai"
21
+ },
22
+ "repository": "github:corticph/dictation-web-sdk",
23
+ "homepage": "https://help.corti.app/en/articles/10714657-introducing-the-corti-dictation-browser-sdk",
24
+ "keywords": [
25
+ "corti",
26
+ "dictation",
27
+ "web",
28
+ "sdk",
29
+ "speech",
30
+ "recognition",
31
+ "transcription",
32
+ "audio",
33
+ "medical",
34
+ "healthcare"
35
+ ],
36
+ "scripts": {
37
+ "analyze": "cem analyze --litelement",
38
+ "build": "tsc && npm run analyze -- --exclude dist",
39
+ "build:bundle": "esbuild dist/index.js --bundle --outfile=dist/bundle.js --format=esm --platform=browser",
40
+ "release": "npm run build && npm run build:bundle && npm publish --access public",
41
+ "start": "npm run build && concurrently -k -r \"tsc --watch --preserveWatchOutput\" \"web-dev-server\"",
42
+ "prepublish": "tsc && npm run analyze -- --exclude dist",
43
+ "lint": "eslint --ext .ts,.tsx src --ignore-path .gitignore && prettier \"src/**/*.ts\" --check --ignore-path .gitignore",
44
+ "format": "eslint --ext .ts,.tsx src --fix --ignore-path .gitignore && prettier \"src/**/*.ts\" --write --ignore-path .gitignore",
45
+ "prepare": "husky && husky install",
46
+ "test": "tsc && wtr --coverage",
47
+ "test:watch": "tsc && concurrently -k -r \"tsc --watch --preserveWatchOutput\" \"wtr --watch\"",
48
+ "storybook": "tsc && npm run analyze -- --exclude dist && concurrently -k -r \"tsc --watch --preserveWatchOutput\" \"storybook dev -p 8080\"",
49
+ "storybook:build": "tsc && npm run analyze -- --exclude dist && storybook build"
50
+ },
51
+ "dependencies": {
52
+ "lit": "^3.1.4"
53
+ },
54
+ "devDependencies": {
55
+ "@custom-elements-manifest/analyzer": "^0.10.3",
56
+ "@open-wc/eslint-config": "^12.0.3",
57
+ "@open-wc/testing": "^4.0.0",
58
+ "@storybook/addon-a11y": "^7.6.20",
59
+ "@storybook/addon-essentials": "^7.6.20",
60
+ "@storybook/addon-links": "^7.6.20",
61
+ "@storybook/web-components": "^7.6.20",
62
+ "@types/mocha": "^10.0.7",
63
+ "@typescript-eslint/eslint-plugin": "^7.18.0",
64
+ "@typescript-eslint/parser": "^7.18.0",
65
+ "@web/dev-server": "^0.4.6",
66
+ "@web/storybook-builder": "^0.1.16",
67
+ "@web/storybook-framework-web-components": "^0.1.2",
68
+ "@web/test-runner": "^0.18.2",
69
+ "concurrently": "^8.2.2",
70
+ "esbuild": "^0.25.0",
71
+ "eslint": "^8.57.0",
72
+ "eslint-config-prettier": "^9.1.0",
73
+ "eslint-plugin-html": "^8.1.2",
74
+ "husky": "^8.0.0",
75
+ "lint-staged": "^15.2.7",
76
+ "prettier": "^3.3.2",
77
+ "sinon": "^19.0.2",
78
+ "storybook": "^7.6.20",
79
+ "tslib": "^2.6.3",
80
+ "typescript": "^5.5.3"
81
+ },
82
+ "customElements": "custom-elements.json",
83
+ "eslintConfig": {
84
+ "parser": "@typescript-eslint/parser",
85
+ "extends": [
86
+ "@open-wc",
87
+ "prettier"
88
+ ],
89
+ "plugins": [
90
+ "@typescript-eslint"
91
+ ],
92
+ "rules": {
93
+ "no-unused-vars": "off",
94
+ "@typescript-eslint/no-unused-vars": [
95
+ "error"
96
+ ],
97
+ "import/no-unresolved": "off",
98
+ "import/extensions": [
99
+ "error",
100
+ "always",
101
+ {
102
+ "ignorePackages": true
103
+ }
104
+ ]
105
+ }
106
+ },
107
+ "prettier": {
108
+ "singleQuote": true,
109
+ "arrowParens": "avoid"
110
+ },
111
+ "lint-staged": {
112
+ "*.ts": [
113
+ "eslint --fix",
114
+ "prettier --write"
115
+ ]
116
+ }
117
+ }