physical-quantity 1.3.0 → 1.3.2

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.
@@ -29,12 +29,11 @@ By leveraging these custom elements, developers can easily incorporate sophistic
29
29
  > **Missing a unit or category?** We'd love your input!
30
30
  > Email [don.wen@calcslive.com](mailto:don.wen@calcslive.com) with your suggestions — your feedback directly shapes the unit library.
31
31
 
32
- ## Demo: Physical Quantity element - No Unit Converter or Dual Units Needed
32
+ ## Live Demo: Physical Quantity elements - 3 Components
33
+ [Live Demo 0 - primary usages](https://v2-docs.donwen.com/demo/pq-samples-less.html)
33
34
  [Live Demo 1 - technical writing](https://v2-docs.donwen.com/fun-calculations/slingshot-stress-calculation.html)
34
35
  [Live Demo 2 - typical product specs](https://v2-docs.donwen.com/demo/products/quik2.html)
35
36
  [Live Demo 3 - typical product specs](https://v2-docs.donwen.com/demo/products/motioncanada/gates-a36.html)
36
- [Live Demo 4 - unique ft-in conversion](https://v2-docs.donwen.com/demo/pq-samples-less.html)
37
-
38
37
 
39
38
  ![Physical Quantity (Gif Animation)](https://firebasestorage.googleapis.com/v0/b/auto-calc-80237.appspot.com/o/PQE%2Fexamples%2FPhysicalQuantityElementDemo3-ezgif.com.gif?alt=media&token=b910c493-e990-490b-bf4d-015a4d4c10d2)
40
39
 
@@ -42,6 +41,16 @@ By leveraging these custom elements, developers can easily incorporate sophistic
42
41
 
43
42
  [![Example 2 in UI](https://firebasestorage.googleapis.com/v0/b/auto-calc-80237.appspot.com/o/PQE%2Fexamples%2FPhysicalQuantityElementExample2.png?alt=media&token=5c899acf-a04c-44b7-b8ac-b1740f308d40)](https://jsfiddle.net/hithere/tz8ym4fh/100/embedded/result)
44
43
 
44
+ ## Use on WordPress
45
+
46
+ The `physical-quantity` components are available as a WordPress plugin [CalcsLive Unit Converter & Sizing Calculator for Product Pages](https://wordpress.org/plugins/calcslive-article-embed/) — no npm, no build step. Install once, then use the shortcodes anywhere in your content:
47
+
48
+ ```
49
+ [calcslive_qty value="25.4" unit="mm"]
50
+ [calcslive_qty_pair values="10x20" unit="cm"]
51
+ [calcslive_qty_triplet values="(10, 20, 30)" unit="cm"]
52
+ ```
53
+
45
54
  ## Installation
46
55
 
47
56
  You can install the `physical-quantity` package using npm:
@@ -68,8 +77,10 @@ Include the following script tag in your HTML file:
68
77
  ### Using the Component
69
78
  Add the `<physical-quantity>`, `<uc-qty>`, `<uc-qty-pair>`, or `<uc-qty-triplet>` tag to your HTML file:
70
79
  ```html
71
- <physical-quantity value="25.4" unit="mm" decimal-places="4"></physical-quantity>
72
- <uc-qty value="25.4" unit="mm" decimal-places="4"></uc-qty>
80
+ <physical-quantity value="25.4" unit="mm" decimal-places="4"></physical-quantity> <br>
81
+ <uc-qty value="25.4" unit="mm" decimal-places="4"></uc-qty> Value input with " " <br>
82
+ <uc-qty value='2.5' unit="kg" decimal-places="4"></uc-qty> Value input with ' ' <br>
83
+ <uc-qty value=2500 unit="mm" decimal-places="4"></uc-qty> Value input without quotes <br>
73
84
  <uc-qty value="25.4" unit="mm" show-unit-arrow="false"></uc-qty> Compact mode, no arrow.<br>
74
85
  <physical-quantity value="25.4" unit="mxm" decimal-places="2"></physical-quantity> Non-exist unit, shown as is.<br>
75
86
  <physical-quantity value="25" unit="mm" decimal-places="2"></physical-quantity><br>
package/index.html CHANGED
@@ -26,7 +26,8 @@
26
26
 
27
27
  <h3>physical-quantity or uc-qty:</h3>
28
28
  <physical-quantity value="25.4" unit="mm" decimal-places="4"></physical-quantity>
29
- <uc-qty value="25.4" unit="mm" decimal-places="4"></uc-qty>
29
+ <uc-qty value="25.4" unit="mm" decimal-places="4"></uc-qty> Value input with text string. <br>
30
+ <uc-qty value=1 unit="in" decimal-places="4"></uc-qty> Value input with number. <br>
30
31
  <uc-qty value="50" unit="mm" show-unit-arrow="false"></uc-qty> Compact mode, no arrow.<br>
31
32
  <physical-quantity value="25.4" unit="mxm" decimal-places="2"></physical-quantity> Non-exist unit, shown as is.<br>
32
33
  <physical-quantity value="25" unit="mm" decimal-places="2"></physical-quantity><br>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "physical-quantity",
3
- "version": "1.3.0",
3
+ "version": "1.3.2",
4
4
  "description": "A web component bundle to represent physical quantities with automated unit conversion.",
5
5
  "main": "dist/pq.umd.js",
6
6
  "module": "dist/pq.es.js",
@@ -23,8 +23,7 @@
23
23
  "test": "jest",
24
24
  "tw": "jest --watch",
25
25
  "test:watch": "jest --watch",
26
- "release": "release-it",
27
- "pub": "npm publish --access public"
26
+ "release": "release-it"
28
27
  },
29
28
  "release-it": {
30
29
  "plugins": {