scribe-widget 1.0.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/.prettierrc +7 -0
- package/FLOW.md +94 -0
- package/README.md +1 -0
- package/dist/scribe-widget.es.js +1086 -1141
- package/dist/scribe-widget.umd.js +12 -12
- package/package.json +4 -2
- package/src/index.tsx +11 -18
- package/vite.config.ts +2 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "scribe-widget",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Floating panel widget for medical transcription using eka.scribe",
|
|
5
5
|
"main": "dist/scribe-widget.umd.js",
|
|
6
6
|
"module": "dist/scribe-widget.es.js",
|
|
@@ -9,7 +9,9 @@
|
|
|
9
9
|
"dev": "vite",
|
|
10
10
|
"build": "vite build",
|
|
11
11
|
"preview": "vite preview",
|
|
12
|
-
"typecheck": "tsc --noEmit"
|
|
12
|
+
"typecheck": "tsc --noEmit",
|
|
13
|
+
"clean": "rm -rf dist",
|
|
14
|
+
"prepublishOnly": "npm run clean && npm run build"
|
|
13
15
|
},
|
|
14
16
|
"dependencies": {
|
|
15
17
|
"med-scribe-alliance-ts-sdk": "1.0.2",
|
package/src/index.tsx
CHANGED
|
@@ -87,10 +87,10 @@ class ScribeWidget {
|
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
|
|
90
|
-
// Global initialization function
|
|
90
|
+
// Global initialization function
|
|
91
91
|
let widgetInstance: ScribeWidget | null = null;
|
|
92
92
|
|
|
93
|
-
function
|
|
93
|
+
function init(config: ScribeWidgetConfig = {} as ScribeWidgetConfig): ScribeWidget {
|
|
94
94
|
if (widgetInstance) {
|
|
95
95
|
widgetInstance.unmount();
|
|
96
96
|
}
|
|
@@ -99,25 +99,18 @@ function initEkaScribe(config: ScribeWidgetConfig): ScribeWidget {
|
|
|
99
99
|
return widgetInstance;
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
-
function
|
|
102
|
+
function getInstance(): ScribeWidget | null {
|
|
103
103
|
return widgetInstance;
|
|
104
104
|
}
|
|
105
105
|
|
|
106
|
-
//
|
|
107
|
-
|
|
108
|
-
(window as Window & { EkaScribe?: unknown }).EkaScribe = {
|
|
109
|
-
init: initEkaScribe,
|
|
110
|
-
getInstance: getEkaScribe,
|
|
111
|
-
Widget: ScribeWidget,
|
|
112
|
-
};
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
// Named exports for ES module usage
|
|
116
|
-
export { ScribeWidget, initEkaScribe as init, getEkaScribe as getInstance };
|
|
106
|
+
// Named exports - these become window.EkaScribe.init, window.EkaScribe.getInstance, etc. in UMD
|
|
107
|
+
export { ScribeWidget, init, getInstance };
|
|
117
108
|
|
|
118
|
-
// Default export for module
|
|
119
|
-
|
|
120
|
-
init
|
|
121
|
-
getInstance
|
|
109
|
+
// Default export for ES module convenience
|
|
110
|
+
const EkaScribe = {
|
|
111
|
+
init,
|
|
112
|
+
getInstance,
|
|
122
113
|
Widget: ScribeWidget,
|
|
123
114
|
};
|
|
115
|
+
|
|
116
|
+
export default EkaScribe;
|
package/vite.config.ts
CHANGED
|
@@ -12,8 +12,9 @@ export default defineConfig({
|
|
|
12
12
|
formats: ['umd', 'es'],
|
|
13
13
|
},
|
|
14
14
|
rollupOptions: {
|
|
15
|
-
// Don't externalize React - bundle it for standalone use
|
|
16
15
|
output: {
|
|
16
|
+
// Use named exports to avoid the .default issue
|
|
17
|
+
exports: 'named',
|
|
17
18
|
globals: {},
|
|
18
19
|
},
|
|
19
20
|
},
|