scribe-widget 1.0.1 → 1.0.3
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/scribe-widget.es.js +16 -0
- package/dist/scribe-widget.umd.js +1 -1
- package/package.json +1 -1
- package/src/App.tsx +2 -4
- package/src/index.tsx +24 -0
- package/src/types.ts +2 -2
package/dist/scribe-widget.es.js
CHANGED
|
@@ -64500,6 +64500,22 @@ const EkaScribe = {
|
|
|
64500
64500
|
getInstance,
|
|
64501
64501
|
Widget: ScribeWidget
|
|
64502
64502
|
};
|
|
64503
|
+
if (typeof window !== "undefined" && typeof document !== "undefined") {
|
|
64504
|
+
const autoInit = () => {
|
|
64505
|
+
const scriptTag = document.currentScript || document.querySelector('script[src*="scribe-widget"]');
|
|
64506
|
+
if (scriptTag == null ? void 0 : scriptTag.hasAttribute("data-no-auto-init")) {
|
|
64507
|
+
return;
|
|
64508
|
+
}
|
|
64509
|
+
if (!widgetInstance) {
|
|
64510
|
+
init({});
|
|
64511
|
+
}
|
|
64512
|
+
};
|
|
64513
|
+
if (document.readyState === "loading") {
|
|
64514
|
+
document.addEventListener("DOMContentLoaded", autoInit);
|
|
64515
|
+
} else {
|
|
64516
|
+
autoInit();
|
|
64517
|
+
}
|
|
64518
|
+
}
|
|
64503
64519
|
export {
|
|
64504
64520
|
ScribeWidget,
|
|
64505
64521
|
EkaScribe as default,
|