@boomitra/carbon-calculator 0.2.13 → 0.2.15
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 +62 -2
- package/dist-embed/carbon-calculator-widget.iife.js +51 -35
- package/dist-embed/index.html +1 -2
- package/dist-package/index.cjs.js +1 -1
- package/dist-package/index.es.js +12 -9
- package/dist-package/index.html +1 -2
- package/package.json +14 -11
package/dist-package/index.es.js
CHANGED
|
@@ -10211,9 +10211,10 @@ const ef = "data:image/svg+xml,%3csvg%20width='124'%20height='124'%20viewBox='0%
|
|
|
10211
10211
|
flightEmission: n = 0,
|
|
10212
10212
|
energyEmission: r = 0,
|
|
10213
10213
|
totalEmission: o = 0,
|
|
10214
|
-
host: i
|
|
10214
|
+
host: i,
|
|
10215
|
+
navigate: s
|
|
10215
10216
|
}) => {
|
|
10216
|
-
const
|
|
10217
|
+
const a = o > 0 ? Math.round(t / o * 100) : 0, l = o > 0 ? Math.round(n / o * 100) : 0, u = o > 0 ? Math.round(r / o * 100) : 0, d = o / 1e3, h = Math.ceil(d);
|
|
10217
10218
|
return /* @__PURE__ */ U(
|
|
10218
10219
|
"section",
|
|
10219
10220
|
{
|
|
@@ -10222,8 +10223,8 @@ const ef = "data:image/svg+xml,%3csvg%20width='124'%20height='124'%20viewBox='0%
|
|
|
10222
10223
|
/* @__PURE__ */ P(
|
|
10223
10224
|
Ns,
|
|
10224
10225
|
{
|
|
10225
|
-
totalEmission:
|
|
10226
|
-
creditsValue:
|
|
10226
|
+
totalEmission: d,
|
|
10227
|
+
creditsValue: h
|
|
10227
10228
|
}
|
|
10228
10229
|
),
|
|
10229
10230
|
/* @__PURE__ */ U(q, { className: "self-stretch flex flex-col items-start gap-3 z-[1]", children: [
|
|
@@ -10262,7 +10263,7 @@ const ef = "data:image/svg+xml,%3csvg%20width='124'%20height='124'%20viewBox='0%
|
|
|
10262
10263
|
fontWeight: "700"
|
|
10263
10264
|
},
|
|
10264
10265
|
children: [
|
|
10265
|
-
|
|
10266
|
+
u,
|
|
10266
10267
|
"%"
|
|
10267
10268
|
]
|
|
10268
10269
|
}
|
|
@@ -10282,7 +10283,7 @@ const ef = "data:image/svg+xml,%3csvg%20width='124'%20height='124'%20viewBox='0%
|
|
|
10282
10283
|
fontWeight: "700"
|
|
10283
10284
|
},
|
|
10284
10285
|
children: [
|
|
10285
|
-
|
|
10286
|
+
l,
|
|
10286
10287
|
"%"
|
|
10287
10288
|
]
|
|
10288
10289
|
}
|
|
@@ -10303,7 +10304,7 @@ const ef = "data:image/svg+xml,%3csvg%20width='124'%20height='124'%20viewBox='0%
|
|
|
10303
10304
|
fontWeight: "700"
|
|
10304
10305
|
},
|
|
10305
10306
|
children: [
|
|
10306
|
-
|
|
10307
|
+
a,
|
|
10307
10308
|
"%"
|
|
10308
10309
|
]
|
|
10309
10310
|
}
|
|
@@ -10319,7 +10320,7 @@ const ef = "data:image/svg+xml,%3csvg%20width='124'%20height='124'%20viewBox='0%
|
|
|
10319
10320
|
sx: { color: "#197827", fontWeight: "bold" },
|
|
10320
10321
|
children: [
|
|
10321
10322
|
"Total: ",
|
|
10322
|
-
|
|
10323
|
+
d.toFixed(2),
|
|
10323
10324
|
" tCO₂e"
|
|
10324
10325
|
]
|
|
10325
10326
|
}
|
|
@@ -10340,7 +10341,9 @@ const ef = "data:image/svg+xml,%3csvg%20width='124'%20height='124'%20viewBox='0%
|
|
|
10340
10341
|
height: 40
|
|
10341
10342
|
},
|
|
10342
10343
|
type: "button",
|
|
10343
|
-
onClick: () =>
|
|
10344
|
+
onClick: () => {
|
|
10345
|
+
console.log("offset now clicked"), s(i);
|
|
10346
|
+
},
|
|
10344
10347
|
children: "Offset now"
|
|
10345
10348
|
}
|
|
10346
10349
|
)
|
package/dist-package/index.html
CHANGED
|
@@ -28,8 +28,7 @@
|
|
|
28
28
|
<!-- The target div as requested -->
|
|
29
29
|
<div id="boomitra-carbon-calculator"></div>
|
|
30
30
|
</div>
|
|
31
|
-
|
|
32
|
-
<script src="https://unpkg.com/react-dom@17/umd/react-dom.production.min.js"></script> -->
|
|
31
|
+
|
|
33
32
|
|
|
34
33
|
<!-- Load the built script -->
|
|
35
34
|
<script src="../dist-embed/carbon-calculator-widget.iife.js"></script>
|
package/package.json
CHANGED
|
@@ -20,10 +20,7 @@
|
|
|
20
20
|
"@testing-library/react": "^16.3.0",
|
|
21
21
|
"@testing-library/user-event": "^14.6.1",
|
|
22
22
|
"@types/jest": "^29.5.14",
|
|
23
|
-
"
|
|
24
|
-
"@types/react-dom": "^19.0.0",
|
|
25
|
-
"prop-types": "^15.8.1",
|
|
26
|
-
"web-vitals": "^4.2.4"
|
|
23
|
+
"prop-types": "^15.8.1"
|
|
27
24
|
},
|
|
28
25
|
"main": "dist-package/index.cjs.js",
|
|
29
26
|
"module": "dist-package/index.es.js",
|
|
@@ -43,6 +40,13 @@
|
|
|
43
40
|
"react-dom": ">=17 <20"
|
|
44
41
|
},
|
|
45
42
|
"devDependencies": {
|
|
43
|
+
"@semantic-release/commit-analyzer": "^13.0.1",
|
|
44
|
+
"@semantic-release/git": "^10.0.1",
|
|
45
|
+
"@semantic-release/github": "^12.0.2",
|
|
46
|
+
"@semantic-release/npm": "^13.1.3",
|
|
47
|
+
"@semantic-release/release-notes-generator": "^14.1.0",
|
|
48
|
+
"@types/react": "^19.2.8",
|
|
49
|
+
"@types/react-dom": "^19.2.3",
|
|
46
50
|
"@vitejs/plugin-react": "^4.4.1",
|
|
47
51
|
"autoprefixer": "^10.4.23",
|
|
48
52
|
"eslint": "^9.25.1",
|
|
@@ -50,13 +54,12 @@
|
|
|
50
54
|
"eslint-plugin-react-hooks": "^5.2.0",
|
|
51
55
|
"eslint-plugin-react-refresh": "^0.4.19",
|
|
52
56
|
"postcss": "^8.5.3",
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"react": "^19.0.0",
|
|
56
|
-
"react-dom": "^19.0.0",
|
|
57
|
+
"react": "^19.2.3",
|
|
58
|
+
"react-dom": "^19.2.3",
|
|
57
59
|
"react-router-dom": "^7.5.0",
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
+
"semantic-release": "^25.0.2",
|
|
61
|
+
"tailwindcss": "^3.4.19",
|
|
62
|
+
"vite": "^6.3.2"
|
|
60
63
|
},
|
|
61
64
|
"eslintConfig": {
|
|
62
65
|
"root": true
|
|
@@ -64,7 +67,7 @@
|
|
|
64
67
|
"name": "@boomitra/carbon-calculator",
|
|
65
68
|
"private": false,
|
|
66
69
|
"type": "module",
|
|
67
|
-
"version": "0.2.
|
|
70
|
+
"version": "0.2.15",
|
|
68
71
|
"scripts": {
|
|
69
72
|
"start": "vite",
|
|
70
73
|
"build": "vite build",
|