physical-quantity 1.3.5 → 1.3.7

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.
Files changed (2) hide show
  1. package/README.md +259 -216
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,216 +1,259 @@
1
- # Web Components for Physical Quantities with Built-in Unit Conversion
2
-
3
- ![Physical Quantity to/from Feet-Inches (Gif Animation)](https://firebasestorage.googleapis.com/v0/b/auto-calc-80237.appspot.com/o/PQE%2Fexamples%2FFt-In%20Demo.gif?alt=media&token=e8ee1bfd-e30c-4d81-93e9-7033ed0927bb)
4
-
5
- This package introduces three custom HTML elements designed for expressing and manipulating physical quantities with seamless unit conversion:
6
-
7
- - `<physical-quantity>` (alias: `<uc-qty>`) A versatile component for single quantities, featuring a value input and a unit dropdown. It automatically handles conversions within the same unit category.
8
-
9
- - `<uc-qty-pair>` Represents a pair of physical quantities sharing the same unit. It displays two values and a unit dropdown, enabling simultaneous conversion of both quantities. With 2 formats, it is designed to represent 2D dimension pairs, 2D coordinates, or value ranges.
10
-
11
- - `<uc-qty-triplet>` Designed for triplets of physical quantities with a common unit. It presents three values and a unit dropdown, facilitating synchronized conversion across all three quantities. With 2 formats, it is designed to represent 3D dimension triplets and 3D coordinates.
12
-
13
- These web components offer:
14
- - Self-contained unit conversion
15
- - A clean, compact user interface
16
- - Elimination of redundant dual units
17
- - Seamless integration across various websites and platforms
18
-
19
- By leveraging these custom elements, web designers and developers can easily incorporate sophisticated physical quantity handling and unit conversion into their web applications, enhancing user experience and data presentation.
20
-
21
- ## Why physical-quantity Package
22
-
23
- It brings unit awareness to your website with minimal code — and delivers significant value for both website owners and end users. Visitors see quantities in the units they are familiar with, without leaving the page or reaching for an external converter.
24
-
25
- ## Typical Use Cases
26
-
27
- **E-commerce product pages** Product specs are full of physical quantities: dimensions, weight, power consumption, capacity. Embedding these components lets shoppers instantly switch between metric and imperial without leaving the page — reducing confusion and support queries from international customers.
28
-
29
- **Technical documentation and manuals** — Engineering docs, data sheets, and user manuals often target readers across regions with different unit preferences. These components eliminate the need for conversion tables or external tools, keeping readers focused on the content.
30
-
31
- **Scientific and research publications** — Papers and reports that present measurements benefit from on-page conversion, letting readers from different scientific communities work in their preferred units.
32
-
33
- **Educational content** — Science, engineering, and health courses that present quantities with unit conversion built in reinforce unit literacy and reduce friction for students working in different systems.
34
-
35
- **Medical and health information** — Dosage guides, lab reference ranges, and fitness content that show values in multiple unit systems (kg/lbs, °C/°F, ml/oz) are more accessible to a global audience.
36
-
37
- ## Features
38
-
39
- - **570+ units across 60+ categories** — covering the most common engineering, science, and everyday measurement needs, from Length, Mass, and Temperature to Flow Rate, Viscosity, Electrical quantities, and more. See the full [Units Reference](https://calcslive.com/help/units-reference).
40
- - Create a `<physical-quantity>` / `<uc-qty>`, `<uc-qty-pair>`, or `<uc-qty-triplet>` with a value and unit.
41
- - Automatically convert between units within the same category.
42
- - Display values with customizable decimal places; integers shown without trailing decimals.
43
- - Easy to integrate into any web project — no framework required.
44
-
45
- > **Missing a unit or category?** We'd love your input!
46
- > Email [don.wen@calcslive.com](mailto:don.wen@calcslive.com) with your suggestions — your feedback directly shapes the unit library.
47
-
48
- ## Live Demo: Physical Quantity elements - 3 Components
49
- [Live Demo 0 - primary usages](https://v2-docs.donwen.com/demo/pq-samples-less.html) ⭐ **NEW**
50
- [Live Demo 1 - technical writing](https://v2-docs.donwen.com/fun-calculations/slingshot-stress-calculation.html)
51
- [Live Demo 2 - typical product specs](https://v2-docs.donwen.com/demo/products/quik2.html)
52
- [Live Demo 3 - typical product specs](https://v2-docs.donwen.com/demo/products/motioncanada/gates-a36.html)
53
-
54
- ![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)
55
-
56
- [![Example 1 in UI](https://firebasestorage.googleapis.com/v0/b/auto-calc-80237.appspot.com/o/PQE%2Fexamples%2FPhysicalQuantityElementExample1.png?alt=media&token=2aa81849-9299-4ba5-9f62-79b8604b814f)](https://jsfiddle.net/hithere/tz8ym4fh/100/embedded/result)
57
-
58
- [![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)
59
-
60
- ## Use on WordPress
61
-
62
- 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:
63
-
64
- ```
65
- [calcslive_qty value="25.4" unit="mm"]
66
- [calcslive_qty value='2000' unit="g"]
67
- [calcslive_qty value=2 unit="in"]
68
- [calcslive_qty_pair values="10x20" unit="cm"]
69
- [calcslive_qty_triplet values="(10, 20, 30)" unit="cm"]
70
- ```
71
-
72
- ## Installation
73
-
74
- You can install the `physical-quantity` package using npm:
75
-
76
- ```bash
77
- npm install physical-quantity
78
- ```
79
-
80
- ## Usage
81
- ### For Web Visitors
82
- The unit list displays available units for the physical quantity category. Users can easily switch between units to view the same quantity in different measurements.
83
-
84
- When hovering over the unit list, an icon appears, providing access to a comprehensive [Generic Unit Converter](https://v2-docs.donwen.com/daily-calculations/unit-converter.html) powered by [AutoCalcs](https://v2.donwen.com). This tool allows users to convert quantities across 60+ categories.
85
-
86
- ### For Developers
87
- After installation, you can import and use the physical-quantity component in your project.
88
-
89
- ### Importing the Component
90
- Include the following script tag in your HTML file:
91
- ```html
92
- <script src="node_modules/physical-quantity/dist/pq.es.js"></script>
93
- ```
94
-
95
- ### Using the Component
96
- Add the `<physical-quantity>`, `<uc-qty>`, `<uc-qty-pair>`, or `<uc-qty-triplet>` tag to your HTML file:
97
- ```html
98
- <physical-quantity value="25.4" unit="mm" decimal-places="4"></physical-quantity> <br>
99
- <uc-qty value="25.4" unit="mm" decimal-places="4"></uc-qty> Value input with " " <br>
100
- <uc-qty value='2.5' unit="kg" decimal-places="4"></uc-qty> Value input with ' ' <br>
101
- <uc-qty value=2500 unit="mm" decimal-places="4"></uc-qty> Value input without quotes <br>
102
- <uc-qty value="25.4" unit="mm" show-unit-arrow="false"></uc-qty> Compact mode, no arrow.<br>
103
- <physical-quantity value="25.4" unit="mxm" decimal-places="2"></physical-quantity> Non-exist unit, shown as is.<br>
104
- <physical-quantity value="25" unit="mm" decimal-places="2"></physical-quantity><br>
105
- <physical-quantity value="25" unit="mm" decimal-places="3"></physical-quantity> 3 digits<br>
106
- <physical-quantity value="25" unit="mm" decimal-places="4"></physical-quantity> 4 digits<br>
107
- <physical-quantity value="25" unit="mm" decimal-places="5"></physical-quantity> 5 digits<br>
108
- <physical-quantity value="1500" unit="g"></physical-quantity> <br>
109
- <physical-quantity value="1500" unit="psf"></physical-quantity> <br>
110
- <physical-quantity value="137.16" unit="cm"></physical-quantity>x
111
- <physical-quantity value="137.16" unit="cm"></physical-quantity>x
112
- <physical-quantity value="91.44" unit="cm"></physical-quantity><br>
113
- <physical-quantity value="800" unit="kg/m³"></physical-quantity><br>
114
- <physical-quantity value="800" unit="kg/m³" show-unit-arrow="false"></physical-quantity>Compact mode, no arrow.<br>
115
- <uc-qty value="91" unit="cm"></uc-qty><br>
116
- <uc-qty value="2" unit="minute"></uc-qty><br>
117
- <uc-qty value="2" unit="A"></uc-qty> Default with arrow.<br>
118
- <uc-qty value="2" unit="A" show-unit-arrow="false"></uc-qty>Compact mode, no arrow.<br>
119
- <uc-qty value="37.778" unit="°C" show-unit-arrow="false"></uc-qty>Compact mode, no arrow.<br>
120
- <uc-qty value="100" unit="°F"></uc-qty><br>
121
- <uc-qty value="2'-3" unit="ft-in"></uc-qty>For Feet-Inches unit<br>
122
- <physical-quantity value="2'-3 3/16" unit="ft-in" ></physical-quantity>
123
- <physical-quantity value="2" unit="ft-in"></physical-quantity>
124
- <physical-quantity value="2'-3" unit="ft-in" ></physical-quantity><br>
125
- <physical-quantity value="10" unit="kgf" ></physical-quantity>
126
- <physical-quantity value="10" unit="Volt" ></physical-quantity>
127
-
128
- <uc-qty-pair values="10x20" unit="cm"></uc-qty-pair> Dimension pair (width x height)<br>
129
- <uc-qty-pair values="(10, 20)" unit="cm"></uc-qty-pair> Coordinate pair (x, y), or value range <br>
130
-
131
- <uc-qty-triplet values="10x20x30" unit="cm"></uc-qty-triplet> Dimension triplet (L x W x H)<br>
132
- <uc-qty-triplet values="(10, 20, 30)" unit="cm"></uc-qty-triplet> Coordinate triplet (x, y, z)<br>
133
- ```
134
- [Above Rendered in Web Browser](https://v2-docs.donwen.com/demo/pq-samples.html)
135
-
136
- ### Example - Linking the Code
137
- Here's an example of how to use the component in an HTML file:
138
-
139
- ```html
140
- <!DOCTYPE html>
141
- <html lang="en">
142
- <head>
143
- <meta charset="UTF-8">
144
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
145
- <title>Physical Quantity Component Example</title>
146
- </head>
147
- <body>
148
- <physical-quantity value="25.4" unit="mm"></physical-quantity>
149
- <uc-qty value="25.4" unit="mm" decimal-places="4"></uc-qty> <br>
150
- <uc-qty-pair values="10x20" unit="cm"></uc-qty-pair><br> <!-- x-format: dimensions -->
151
- <uc-qty-pair values="(10, 20)" unit="cm"></uc-qty-pair><br> <!-- tuple: coordinates, value ranges -->
152
- <uc-qty-triplet values="10x20x30" unit="cm"></uc-qty-triplet><br> <!-- x-format: L x W x H -->
153
- <uc-qty-triplet values="(10, 20, 30)" unit="cm"></uc-qty-triplet><br><!-- tuple: coordinates -->
154
-
155
- <script src="node_modules/physical-quantity/src/pq.es.js"></script>
156
- </body>
157
- </html>
158
- ```
159
-
160
- ### Example - HTML File Using CDN
161
- ```html
162
- <!DOCTYPE html>
163
- <html lang="en">
164
- <head>
165
- <meta charset="UTF-8">
166
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
167
- <title>Physical Quantity Component Example</title>
168
- <script src="https://unpkg.com/physical-quantity@latest/dist/pq.umd.js"></script>
169
- </head>
170
- <body>
171
- <physical-quantity value="25.4" unit="mm"></physical-quantity>
172
- <physical-quantity value="1500" unit="psf" decimal-places=4></physical-quantity> <br>
173
- <uc-qty value="2" unit="lbm" decimal-places="2"></uc-qty> <br>
174
- <uc-qty-pair values="10x20" unit="cm"></uc-qty-pair><br> <!-- x-format: dimensions -->
175
- <uc-qty-pair values="(10, 20)" unit="cm"></uc-qty-pair><br> <!-- tuple: coordinates, value ranges -->
176
- <uc-qty-triplet values="10x20x30" unit="cm"></uc-qty-triplet><br> <!-- x-format: L x W x H -->
177
- <uc-qty-triplet values="(10, 20, 30)" unit="cm"></uc-qty-triplet><br><!-- tuple: coordinates -->
178
-
179
- </body>
180
- </html>
181
- ```
182
-
183
- ### Attributes
184
- The physical-quantity component supports the following attributes:
185
-
186
- - <ins>_value_</ins>: The initial value of the physical quantity. It can be any number.
187
- - <ins>_values_</ins>: For `uc-qty-pair` and `uc-qty-triplet`. Two formats are supported:
188
- - **x-format** `values="AxB"` or `values="AxBxC"` — for dimensions (e.g., width x height x depth)
189
- - **tuple format** `values="(A, B)"` or `values="(A, B, C)"` — for coordinates or ranges
190
- - <ins>_unit_</ins>: The initial unit of the physical quantity.
191
- When a valid unit within the supported unit categories (e.g., mm, cm, m, in, ft for length), unit conversion is automated;
192
- When a unit provided is not in the library, it will show per the author's input, like a regular text input.
193
- - <ins>_decimal-places_</ins>: web author can specify the decimal-places depending on the magnitude of the quantity. Default to 2.
194
- - <ins>_show-unit-arrow_</ins>: specify to show the downward arrow following the units list. Default to be true. When set to false, it is suitable when the author wants to show in a compact format.
195
-
196
- ### Supported Units
197
- For the full list of supported units and categories, see the
198
- [Units Reference](https://calcslive.com/help/units-reference) on CalcsLive —
199
- kept in sync with the Excel master source.
200
-
201
- ## License
202
- This project is licensed under the MIT License. See the LICENSE file for more details.
203
-
204
- ## Contributing
205
- Contributions are welcome! Please contact the developer for any bugs, features, or improvements.
206
-
207
- ## Changelog
208
-
209
- See `CHANGELOG.md` (included in the package) for the full version history.
210
-
211
- ## Contact
212
- If you have any questions or feedback, feel free to contact me at don.wen@calcslive.com.
213
- For more info, please visit:
214
- [AutoCalcs](https://www.donwen.com/)
215
- [AutoCalcs Docs and Library](https://v2-docs.donwen.com/)
216
- [Demo](https://v2-docs.donwen.com/demo/index.html)
1
+ # physical-quantity
2
+
3
+ Web Components for physical quantities with built-in unit conversion.
4
+
5
+ `physical-quantity` provides lightweight custom HTML elements for displaying and converting quantities directly in the page. It is designed for product specs, technical documentation, engineering content, educational material, and any interface where users benefit from viewing values in the units they already understand.
6
+
7
+ Visitors can switch units inline without leaving the page or opening a separate converter, keeping content compact while still giving readers access to the units they prefer.
8
+
9
+ ![Physical Quantity to/from Feet-Inches (Gif Animation)](https://firebasestorage.googleapis.com/v0/b/auto-calc-80237.appspot.com/o/PQE%2Fexamples%2FFt-In%20Demo.gif?alt=media&token=e8ee1bfd-e30c-4d81-93e9-7033ed0927bb)
10
+
11
+ ## Why use it
12
+
13
+ - **Built-in unit conversion** directly in the UI
14
+ - **570+ units across 60+ categories**
15
+ - **Works as standard Web Components** with no framework required
16
+ - **Supports single values, pairs, and triplets**
17
+ - **More concise than showing two unit systems side by side, with conversion among most units in the same category**
18
+ - **Easy to embed** in websites, docs, product pages, and CMS content
19
+
20
+ This package is especially useful when your audience spans regions, industries, or disciplines that use different unit systems. Instead of filling the page with duplicate metric and imperial values, you can present one clean quantity component and let each visitor choose from most units in the same category.
21
+
22
+ ## Components
23
+
24
+ This package includes three custom elements:
25
+
26
+ ### `<uc-qty>` / `<physical-quantity>`
27
+ Displays a single quantity with a value field and a unit selector.
28
+
29
+ ### `<uc-qty-pair>`
30
+ Displays two quantities that share the same unit. Useful for:
31
+ - dimensions (`width x height`)
32
+ - coordinate pairs
33
+ - value ranges
34
+
35
+ ### `<uc-qty-triplet>`
36
+ Displays three quantities that share the same unit. Useful for:
37
+ - 3D dimensions (`length x width x height`)
38
+ - 3D coordinates
39
+
40
+ ## Installation
41
+
42
+ ```bash
43
+ npm install physical-quantity
44
+ ```
45
+
46
+ ## Quick start
47
+
48
+ This package is designed to be useful with very little setup: include the script, add the custom element, and the quantity becomes unit-aware in the page.
49
+
50
+ ### ESM / bundler
51
+
52
+ ```html
53
+ <script type="module" src="node_modules/physical-quantity/dist/pq.es.js"></script>
54
+
55
+ <physical-quantity value="25.4" unit="mm"></physical-quantity>
56
+ <uc-qty-pair values="10x20" unit="cm"></uc-qty-pair>
57
+ <uc-qty-triplet values="10x20x30" unit="cm"></uc-qty-triplet>
58
+ ```
59
+
60
+ ### CDN
61
+
62
+ ```html
63
+ <script src="https://unpkg.com/physical-quantity@latest/dist/pq.umd.js"></script>
64
+
65
+ <physical-quantity value="25.4" unit="mm"></physical-quantity>
66
+ <uc-qty value="2" unit="lbm" decimal-places="2"></uc-qty>
67
+ <uc-qty-pair values="10x20" unit="cm"></uc-qty-pair>
68
+ ```
69
+
70
+ ## What it looks like
71
+
72
+ [Watch the demo on YouTube Shorts](https://www.youtube.com/shorts/Cg2H7P_D3fo)⭐ **NEW**
73
+ [Live Demo 0 - primary usages](https://v2-docs.donwen.com/demo/pq-samples-less.html) ⭐ **NEW**
74
+ [Live Demo 1 - technical writing](https://v2-docs.donwen.com/fun-calculations/slingshot-stress-calculation.html)
75
+ [Live Demo 2 - typical product specs](https://v2-docs.donwen.com/demo/products/quik2.html)
76
+ [Live Demo 3 - typical product specs](https://v2-docs.donwen.com/demo/products/motioncanada/gates-a36.html)
77
+
78
+ ## Typical use cases
79
+
80
+ These components are most valuable anywhere physical measurements appear in content, specifications, or interfaces that serve users with different unit preferences.
81
+
82
+ ### E-commerce product pages
83
+ Show dimensions, weight, power, capacity, and other specifications in a way that international customers can immediately understand.
84
+
85
+ ### Technical documentation and manuals
86
+ Let readers switch units without scanning conversion tables or leaving the page.
87
+
88
+ ### Scientific and engineering content
89
+ Present measurements in a format that adapts to the reader’s preferred unit system without duplicating values throughout the page.
90
+
91
+ ### Educational material
92
+ Help students and learners interact with values in familiar units while reinforcing unit literacy.
93
+
94
+ ### Medical and health content
95
+ Support user-friendly presentation of measurements such as kg/lb, °C/°F, ml/oz, and similar values.
96
+
97
+ ## Features
98
+
99
+ The package focuses on practical display and conversion rather than forcing users to leave the page for a separate conversion workflow.
100
+
101
+ - **570+ units across 60+ categories** from common everyday measurements to engineering and scientific quantities such as Flow Rate, Viscosity, Electrical values, Density, Pressure, Temperature, and more
102
+ - Automatic conversion within the same unit category
103
+ - Customizable decimal places
104
+ - Integers displayed without unnecessary trailing decimals
105
+ - Clean, compact UI
106
+ - No framework required
107
+ - Works well for inline specs and structured dimensional data
108
+
109
+ ## Usage
110
+
111
+ ### Single quantity
112
+
113
+ ```html
114
+ <physical-quantity value="25.4" unit="mm" decimal-places="4"></physical-quantity>
115
+ <uc-qty value="2.5" unit="kg" decimal-places="4"></uc-qty>
116
+ <uc-qty value="25.4" unit="mm" show-unit-arrow="false"></uc-qty>
117
+ ```
118
+
119
+ ### Quantity pair
120
+
121
+ ```html
122
+ <uc-qty-pair values="10x20" unit="cm"></uc-qty-pair>
123
+ <uc-qty-pair values="(10, 20)" unit="cm"></uc-qty-pair>
124
+ ```
125
+
126
+ ### Quantity triplet
127
+
128
+ ```html
129
+ <uc-qty-triplet values="10x20x30" unit="cm"></uc-qty-triplet>
130
+ <uc-qty-triplet values="(10, 20, 30)" unit="cm"></uc-qty-triplet>
131
+ ```
132
+
133
+ ### More examples
134
+
135
+ ```html
136
+ <physical-quantity value="1500" unit="g"></physical-quantity>
137
+ <physical-quantity value="1500" unit="psf"></physical-quantity>
138
+ <physical-quantity value="800" unit="kg/m³"></physical-quantity>
139
+ <uc-qty value="37.778" unit="°C" show-unit-arrow="false"></uc-qty>
140
+ <uc-qty value="100" unit="°F"></uc-qty>
141
+ <uc-qty value="2'-3" unit="ft-in"></uc-qty>
142
+ <physical-quantity value="2'-3 3/16" unit="ft-in"></physical-quantity>
143
+ <physical-quantity value="10" unit="kgf"></physical-quantity>
144
+ <physical-quantity value="10" unit="Volt"></physical-quantity>
145
+ ```
146
+
147
+ Rendered example: [Above Rendered in Web Browser](https://v2-docs.donwen.com/demo/pq-samples.html)
148
+
149
+ ## Example page
150
+
151
+ ```html
152
+ <!DOCTYPE html>
153
+ <html lang="en">
154
+ <head>
155
+ <meta charset="UTF-8">
156
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
157
+ <title>Physical Quantity Component Example</title>
158
+ <script src="https://unpkg.com/physical-quantity@latest/dist/pq.umd.js"></script>
159
+ </head>
160
+ <body>
161
+ <physical-quantity value="25.4" unit="mm"></physical-quantity>
162
+ <uc-qty value="25.4" unit="mm" decimal-places="4"></uc-qty><br>
163
+ <uc-qty-pair values="10x20" unit="cm"></uc-qty-pair><br>
164
+ <uc-qty-pair values="(10, 20)" unit="cm"></uc-qty-pair><br>
165
+ <uc-qty-triplet values="10x20x30" unit="cm"></uc-qty-triplet><br>
166
+ <uc-qty-triplet values="(10, 20, 30)" unit="cm"></uc-qty-triplet><br>
167
+ </body>
168
+ </html>
169
+ ```
170
+
171
+ ## Attributes
172
+
173
+ ### Common attributes
174
+
175
+ - `value`: initial value for `<physical-quantity>` / `<uc-qty>`
176
+ - `unit`: initial unit
177
+ - `decimal-places`: number of decimal places to display; defaults to `2`
178
+ - `show-unit-arrow`: shows or hides the unit dropdown arrow; defaults to `true`
179
+
180
+ ### Pair and triplet attribute
181
+
182
+ - `values`: used by `<uc-qty-pair>` and `<uc-qty-triplet>`
183
+
184
+ Supported formats:
185
+ - dimensions: `AxB` or `AxBxC`
186
+ - tuples: `(A, B)` or `(A, B, C)`
187
+
188
+ ### Unit behavior
189
+
190
+ When `unit` is recognized in the supported library, the component enables conversion within that category.
191
+
192
+ When `unit` is not recognized, the value is still displayed, but conversion is not applied.
193
+
194
+ ## For website visitors
195
+
196
+ The unit dropdown displays other available units from the same category. Users can switch units directly in the page.
197
+
198
+ ## Supported units
199
+
200
+ For the full list of supported units and categories, see the [Units Reference](https://calcslive.com/help/units-reference).
201
+
202
+ > **Missing a unit or category?**
203
+ > Email [don.wen@calcslive.com](mailto:don.wen@calcslive.com) with suggestions.
204
+
205
+ ## Use on WordPress
206
+
207
+ The same components are also available through the WordPress plugin [CalcsLive Unit Converter & Sizing Calculator for Product Pages](https://wordpress.org/plugins/calcslive-article-embed/).
208
+
209
+ That gives WordPress users a no-build option via shortcodes:
210
+
211
+ ```txt
212
+ [calcslive_qty value="25.4" unit="mm"]
213
+ [calcslive_qty value="2000" unit="g"]
214
+ [calcslive_qty value="2" unit="in"]
215
+ [calcslive_qty_pair values="10x20" unit="cm"]
216
+ [calcslive_qty_pair values="(10, 20)" unit="cm"]
217
+ [calcslive_qty_triplet values="10x20x30)" unit="cm"]
218
+ [calcslive_qty_triplet values="(10, 20, 30)" unit="cm"]
219
+ ```
220
+
221
+ ## Works with
222
+
223
+ - Plain HTML pages
224
+ - Static sites
225
+ - Technical documentation
226
+ - Product pages
227
+ - CMS content
228
+ - WordPress
229
+ - Framework apps that support custom elements
230
+
231
+ ## Compatibility notes
232
+
233
+ Because this package is built as Web Components, it works naturally in plain HTML and in projects that can render custom elements.
234
+
235
+ For framework-based apps, the main requirement is that the framework allows custom elements to pass through to the DOM cleanly.
236
+
237
+ ## Contributing
238
+
239
+ Contributions, bug reports, feature requests, and unit suggestions are welcome.
240
+
241
+ Please contact the developer for bugs, improvements, or missing units.
242
+
243
+ ## Changelog
244
+
245
+ See `CHANGELOG.md` included in the package for version history.
246
+
247
+ ## License
248
+
249
+ MIT License. See `LICENSE` for details.
250
+
251
+ ## Contact
252
+
253
+ Questions, feedback, bug reports, or unit requests:
254
+
255
+ - Email: don.wen@calcslive.com
256
+ - [AutoCalcs](https://www.donwen.com/)
257
+ - [AutoCalcs Docs and Library](https://v2-docs.donwen.com/)
258
+ - [Demo](https://v2-docs.donwen.com/demo/index.html)
259
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "physical-quantity",
3
- "version": "1.3.5",
3
+ "version": "1.3.7",
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",