@baziapi/widget 1.0.2 → 1.0.4
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/widget.cjs +2 -4
- package/dist/widget.mjs +2 -4
- package/package.json +9 -14
package/dist/widget.cjs
CHANGED
|
@@ -193,10 +193,8 @@
|
|
|
193
193
|
const container = document.getElementById(WIDGET_CONTAINER_ID);
|
|
194
194
|
if (!container) return;
|
|
195
195
|
const apiKey = container.getAttribute("data-api-key") || "";
|
|
196
|
-
const
|
|
197
|
-
|
|
198
|
-
""
|
|
199
|
-
);
|
|
196
|
+
const rawBaseUrl = (container.getAttribute("data-base-url") || "https://api.baziapi.pro").trim().replace(/\/+$/, "");
|
|
197
|
+
const baseUrl = rawBaseUrl.replace(/\/api\/v1\/?$/, "").replace(/\/api\/?$/, "");
|
|
200
198
|
injectStyles();
|
|
201
199
|
container.innerHTML = `
|
|
202
200
|
<div class="bazi-widget-container">
|
package/dist/widget.mjs
CHANGED
|
@@ -191,10 +191,8 @@
|
|
|
191
191
|
const container = document.getElementById(WIDGET_CONTAINER_ID);
|
|
192
192
|
if (!container) return;
|
|
193
193
|
const apiKey = container.getAttribute("data-api-key") || "";
|
|
194
|
-
const
|
|
195
|
-
|
|
196
|
-
""
|
|
197
|
-
);
|
|
194
|
+
const rawBaseUrl = (container.getAttribute("data-base-url") || "https://api.baziapi.pro").trim().replace(/\/+$/, "");
|
|
195
|
+
const baseUrl = rawBaseUrl.replace(/\/api\/v1\/?$/, "").replace(/\/api\/?$/, "");
|
|
198
196
|
injectStyles();
|
|
199
197
|
container.innerHTML = `
|
|
200
198
|
<div class="bazi-widget-container">
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@baziapi/widget",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Embeddable interactive Web Widget for BaZi Four Pillars calculator",
|
|
6
6
|
"author": "Md. Nasir Uddin Shoyas",
|
|
@@ -14,22 +14,17 @@
|
|
|
14
14
|
"files": [
|
|
15
15
|
"dist"
|
|
16
16
|
],
|
|
17
|
-
"scripts": {
|
|
18
|
-
"build": "unbuild",
|
|
19
|
-
"dev": "unbuild --stub",
|
|
20
|
-
"lint": "eslint src"
|
|
21
|
-
},
|
|
22
17
|
"devDependencies": {
|
|
23
18
|
"typescript": "^5.6.3",
|
|
24
19
|
"unbuild": "^3.0.0"
|
|
25
20
|
},
|
|
26
|
-
"homepage": "https://
|
|
27
|
-
"repository": {
|
|
28
|
-
"type": "git",
|
|
29
|
-
"url": "https://github.com/Shoyas/bazi-api-sdk.git",
|
|
30
|
-
"directory": "packages/bazi-widget"
|
|
31
|
-
},
|
|
21
|
+
"homepage": "https://baziapi.pro",
|
|
32
22
|
"bugs": {
|
|
33
|
-
"url": "https://
|
|
23
|
+
"url": "https://baziapi.pro"
|
|
24
|
+
},
|
|
25
|
+
"scripts": {
|
|
26
|
+
"build": "unbuild",
|
|
27
|
+
"dev": "unbuild --stub",
|
|
28
|
+
"lint": "eslint src"
|
|
34
29
|
}
|
|
35
|
-
}
|
|
30
|
+
}
|