@isentropic/dim-si 0.4.2 → 0.5.0
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 +189 -0
- package/esm/deps/jsr.io/@std/assert/{1.0.18 → 1.0.19}/almost_equals.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.18 → 1.0.19}/array_includes.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.18 → 1.0.19}/assert.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.18 → 1.0.19}/assertion_error.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/1.0.19/equal.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.19/equals.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/{1.0.18 → 1.0.19}/exists.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.18 → 1.0.19}/fail.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.18 → 1.0.19}/false.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.18 → 1.0.19}/greater.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.18 → 1.0.19}/greater_or_equal.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.18 → 1.0.19}/instance_of.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.18 → 1.0.19}/is_error.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.18 → 1.0.19}/less.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.18 → 1.0.19}/less_or_equal.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.18 → 1.0.19}/match.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.18 → 1.0.19}/mod.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/1.0.19/not_equals.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/{1.0.18 → 1.0.19}/not_instance_of.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.18 → 1.0.19}/not_match.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.18 → 1.0.19}/not_strict_equals.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.18 → 1.0.19}/object_match.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.18 → 1.0.19}/rejects.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.18 → 1.0.19}/strict_equals.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.18 → 1.0.19}/string_includes.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.18 → 1.0.19}/throws.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.18 → 1.0.19}/unimplemented.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.18 → 1.0.19}/unreachable.d.ts.map +1 -1
- package/esm/src/absorbed-dose.d.ts +2 -1
- package/esm/src/absorbed-dose.d.ts.map +1 -1
- package/esm/src/absorbed-dose.js +2 -1
- package/esm/src/angular-acceleration.d.ts +23 -0
- package/esm/src/angular-acceleration.d.ts.map +1 -0
- package/esm/src/angular-acceleration.js +18 -0
- package/esm/src/angular-velocity.d.ts +31 -0
- package/esm/src/angular-velocity.d.ts.map +1 -0
- package/esm/src/angular-velocity.js +26 -0
- package/esm/src/area.d.ts +4 -0
- package/esm/src/area.d.ts.map +1 -1
- package/esm/src/area.js +5 -0
- package/esm/src/charge.d.ts +5 -1
- package/esm/src/charge.d.ts.map +1 -1
- package/esm/src/charge.js +6 -0
- package/esm/src/concentration.d.ts +27 -0
- package/esm/src/concentration.d.ts.map +1 -0
- package/esm/src/concentration.js +24 -0
- package/esm/src/current-density.d.ts +23 -0
- package/esm/src/current-density.d.ts.map +1 -0
- package/esm/src/current-density.js +18 -0
- package/esm/src/density.d.ts +30 -0
- package/esm/src/density.d.ts.map +1 -0
- package/esm/src/density.js +30 -0
- package/esm/src/dynamic-viscosity.d.ts +23 -0
- package/esm/src/dynamic-viscosity.d.ts.map +1 -0
- package/esm/src/dynamic-viscosity.js +18 -0
- package/esm/src/electric-field-strength.d.ts +23 -0
- package/esm/src/electric-field-strength.d.ts.map +1 -0
- package/esm/src/electric-field-strength.js +18 -0
- package/esm/src/frequency.d.ts +2 -1
- package/esm/src/frequency.d.ts.map +1 -1
- package/esm/src/frequency.js +2 -1
- package/esm/src/heat-capacity.d.ts +23 -0
- package/esm/src/heat-capacity.d.ts.map +1 -0
- package/esm/src/heat-capacity.js +18 -0
- package/esm/src/kinematic-viscosity.d.ts +23 -0
- package/esm/src/kinematic-viscosity.d.ts.map +1 -0
- package/esm/src/kinematic-viscosity.js +18 -0
- package/esm/src/mass-flow-rate.d.ts +23 -0
- package/esm/src/mass-flow-rate.d.ts.map +1 -0
- package/esm/src/mass-flow-rate.js +18 -0
- package/esm/src/molar-mass.d.ts +27 -0
- package/esm/src/molar-mass.d.ts.map +1 -0
- package/esm/src/molar-mass.js +23 -0
- package/esm/src/momentum.d.ts +23 -0
- package/esm/src/momentum.d.ts.map +1 -0
- package/esm/src/momentum.js +18 -0
- package/esm/src/permeability.d.ts +23 -0
- package/esm/src/permeability.d.ts.map +1 -0
- package/esm/src/permeability.js +18 -0
- package/esm/src/permittivity.d.ts +23 -0
- package/esm/src/permittivity.d.ts.map +1 -0
- package/esm/src/permittivity.js +18 -0
- package/esm/src/pressure.d.ts +2 -0
- package/esm/src/pressure.d.ts.map +1 -1
- package/esm/src/pressure.js +2 -0
- package/esm/src/specific-energy.d.ts +27 -0
- package/esm/src/specific-energy.d.ts.map +1 -0
- package/esm/src/specific-energy.js +22 -0
- package/esm/src/specific-heat-capacity.d.ts +23 -0
- package/esm/src/specific-heat-capacity.d.ts.map +1 -0
- package/esm/src/specific-heat-capacity.js +19 -0
- package/esm/src/specific-volume.d.ts +23 -0
- package/esm/src/specific-volume.d.ts.map +1 -0
- package/esm/src/specific-volume.js +18 -0
- package/esm/src/surface-tension.d.ts +23 -0
- package/esm/src/surface-tension.d.ts.map +1 -0
- package/esm/src/surface-tension.js +18 -0
- package/esm/src/thermal-conductivity.d.ts +23 -0
- package/esm/src/thermal-conductivity.d.ts.map +1 -0
- package/esm/src/thermal-conductivity.js +18 -0
- package/esm/src/torque.d.ts +26 -0
- package/esm/src/torque.d.ts.map +1 -0
- package/esm/src/torque.js +21 -0
- package/esm/src/velocity.d.ts +3 -1
- package/esm/src/velocity.d.ts.map +1 -1
- package/esm/src/velocity.js +4 -0
- package/esm/src/volumetric-flow-rate.d.ts +30 -0
- package/esm/src/volumetric-flow-rate.d.ts.map +1 -0
- package/esm/src/volumetric-flow-rate.js +27 -0
- package/esm/src/wavenumber.d.ts +23 -0
- package/esm/src/wavenumber.d.ts.map +1 -0
- package/esm/src/wavenumber.js +18 -0
- package/package.json +77 -3
- package/esm/deps/jsr.io/@std/assert/1.0.18/equal.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.18/equals.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.18/not_equals.d.ts.map +0 -1
package/README.md
ADDED
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
# @isentropic/dim-si
|
|
2
|
+
|
|
3
|
+
Ready-to-use SI units with compile-time dimensional analysis.
|
|
4
|
+
|
|
5
|
+
Provides the [SI](https://en.wikipedia.org/wiki/International_System_of_Units)
|
|
6
|
+
unit system — unit conversions, SI prefixes, and affine units like temperature
|
|
7
|
+
scales, all with dimensions tracked at the type level. Wrap raw numbers in typed
|
|
8
|
+
quantities and let the compiler catch dimension mismatches before your code
|
|
9
|
+
runs.
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
### Create and compute
|
|
14
|
+
|
|
15
|
+
Unit functions wrap raw numbers into typed quantities. The fluent `q()` API
|
|
16
|
+
chains arithmetic while tracking dimensions at compile time:
|
|
17
|
+
|
|
18
|
+
```typescript
|
|
19
|
+
import { kilometer, meter } from "@isentropic/dim-si/length";
|
|
20
|
+
import { hour } from "@isentropic/dim-si/time";
|
|
21
|
+
import { q } from "@isentropic/dim-si/ops";
|
|
22
|
+
|
|
23
|
+
const distance = kilometer(100);
|
|
24
|
+
const duration = hour(2);
|
|
25
|
+
|
|
26
|
+
const speed = q(distance).div(duration);
|
|
27
|
+
const total = q(kilometer(5)).plus(meter(500));
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Temperature conversions handle offsets correctly. Absolute temperatures use
|
|
31
|
+
affine conversion (applying the zero-point offset), while deltas stay linear:
|
|
32
|
+
|
|
33
|
+
```typescript
|
|
34
|
+
import { celsius, kelvin } from "@isentropic/dim-si/temperature";
|
|
35
|
+
|
|
36
|
+
q(celsius(100)).in(kelvin); // 373.15
|
|
37
|
+
q(celsius(100)).minus(celsius(0)).in(kelvin); // 100 (linear delta)
|
|
38
|
+
q(celsius(20)).plus(celsius.delta(5)).in(celsius); // 25
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Extract values
|
|
42
|
+
|
|
43
|
+
Use `.in(unit)` to get a plain number back — for example, to serialize or
|
|
44
|
+
display:
|
|
45
|
+
|
|
46
|
+
```typescript
|
|
47
|
+
import { meterPerSecond } from "@isentropic/dim-si/velocity";
|
|
48
|
+
|
|
49
|
+
speed.in(meterPerSecond); // ~13.89
|
|
50
|
+
total.in(meter); // 5500
|
|
51
|
+
total.in(kilometer); // 5.5
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
The free function `valueIn(quantity, unit)` does the same thing outside a chain.
|
|
55
|
+
Free functions `add`, `subtract`, `multiply`, `divide`, and `scale` are also
|
|
56
|
+
available from `@isentropic/dim-si/ops`.
|
|
57
|
+
|
|
58
|
+
### Type safety
|
|
59
|
+
|
|
60
|
+
Dimension mismatches are caught at compile time:
|
|
61
|
+
|
|
62
|
+
```typescript
|
|
63
|
+
q(kilometer(5)).plus(hour(1)); // Error: can't add length and time
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Use the exported quantity types for function signatures:
|
|
67
|
+
|
|
68
|
+
```typescript
|
|
69
|
+
import type { Length } from "@isentropic/dim-si/length";
|
|
70
|
+
import type { Time } from "@isentropic/dim-si/time";
|
|
71
|
+
import type { Velocity } from "@isentropic/dim-si/velocity";
|
|
72
|
+
|
|
73
|
+
function speed(d: Length, t: Time): Velocity {
|
|
74
|
+
return q(d).div(t);
|
|
75
|
+
}
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### Custom units
|
|
79
|
+
|
|
80
|
+
Use SI prefixes to create units not provided out of the box:
|
|
81
|
+
|
|
82
|
+
```typescript
|
|
83
|
+
import { meter } from "@isentropic/dim-si/length";
|
|
84
|
+
import { gram } from "@isentropic/dim-si/mass";
|
|
85
|
+
import { MEGA, PICO } from "@isentropic/dim-si/prefixes";
|
|
86
|
+
|
|
87
|
+
const megameter = meter.scaled(MEGA);
|
|
88
|
+
const picogram = gram.scaled(PICO);
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
See
|
|
92
|
+
[prefixes.ts](https://github.com/isentropic-dev/dim/blob/main/packages/dim-si/src/prefixes.ts)
|
|
93
|
+
for all available SI prefixes.
|
|
94
|
+
|
|
95
|
+
You can also compose units from other unit scales:
|
|
96
|
+
|
|
97
|
+
```typescript
|
|
98
|
+
import { joule } from "@isentropic/dim-si/energy";
|
|
99
|
+
import { kilowatt } from "@isentropic/dim-si/power";
|
|
100
|
+
import { hour } from "@isentropic/dim-si/time";
|
|
101
|
+
|
|
102
|
+
const kilowattHour = joule.scaled(kilowatt.scale * hour.scale);
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
If you find yourself using a custom unit frequently, consider
|
|
106
|
+
[contributing it](https://github.com/isentropic-dev/dim/blob/main/CONTRIBUTING.md#adding-a-new-si-unit)
|
|
107
|
+
to the package.
|
|
108
|
+
|
|
109
|
+
## Installation
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
# Deno
|
|
113
|
+
deno add jsr:@isentropic/dim-si
|
|
114
|
+
# npm
|
|
115
|
+
npm install @isentropic/dim-si
|
|
116
|
+
# Bun
|
|
117
|
+
bun add @isentropic/dim-si
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
## Units
|
|
121
|
+
|
|
122
|
+
### Base
|
|
123
|
+
|
|
124
|
+
| Quantity | Units |
|
|
125
|
+
| ------------------------ | ------------------------------------------------------------------------------------------- |
|
|
126
|
+
| Length | `meter`, `kilometer`, `centimeter`, `millimeter`, `micrometer`, `nanometer`, `picometer` |
|
|
127
|
+
| Mass | `kilogram`, `gram`, `milligram`, `microgram`, `nanogram`, `tonne` |
|
|
128
|
+
| Time | `second`, `millisecond`, `microsecond`, `nanosecond`, `picosecond`, `minute`, `hour`, `day` |
|
|
129
|
+
| Temperature [*](#affine) | `kelvin`, `celsius`, `fahrenheit` |
|
|
130
|
+
| Electric Current | `ampere`, `milliampere`, `microampere` |
|
|
131
|
+
| Amount of Substance | `mole`, `millimole`, `micromole` |
|
|
132
|
+
| Luminous Intensity | `candela` |
|
|
133
|
+
|
|
134
|
+
### Derived
|
|
135
|
+
|
|
136
|
+
| Quantity | Units |
|
|
137
|
+
| ----------------------- | ------------------------------------------------------------------- |
|
|
138
|
+
| Area | `squareMeter`, `squareKilometer`, `squareCentimeter`, `hectare` |
|
|
139
|
+
| Volume | `cubicMeter`, `liter`, `milliliter`, `microliter` |
|
|
140
|
+
| Velocity | `meterPerSecond`, `kilometerPerHour` |
|
|
141
|
+
| Acceleration | `meterPerSecondSquared` |
|
|
142
|
+
| Force | `newton` |
|
|
143
|
+
| Pressure | `pascal`, `bar`, `millibar`, `atmosphere` |
|
|
144
|
+
| Energy | `joule`, `kilojoule`, `megajoule`, `kilowattHour` |
|
|
145
|
+
| Power | `watt`, `milliwatt`, `kilowatt`, `megawatt`, `gigawatt`, `terawatt` |
|
|
146
|
+
| Frequency | `hertz`, `kilohertz`, `megahertz`, `gigahertz`, `becquerel` |
|
|
147
|
+
| Density | `kilogramPerCubicMeter`, `gramPerLiter`, `gramPerCubicCentimeter` |
|
|
148
|
+
| Specific Volume | `cubicMeterPerKilogram` |
|
|
149
|
+
| Momentum | `newtonSecond` |
|
|
150
|
+
| Angular Velocity | `radianPerSecond`, `revolutionPerMinute` |
|
|
151
|
+
| Angular Acceleration | `radianPerSecondSquared` |
|
|
152
|
+
| Torque | `newtonMeter` |
|
|
153
|
+
| Dynamic Viscosity | `pascalSecond` |
|
|
154
|
+
| Kinematic Viscosity | `squareMeterPerSecond` |
|
|
155
|
+
| Surface Tension | `newtonPerMeter` |
|
|
156
|
+
| Wavenumber | `reciprocalMeter` |
|
|
157
|
+
| Voltage | `volt`, `millivolt`, `kilovolt` |
|
|
158
|
+
| Resistance | `ohm`, `milliohm`, `kilohm`, `megohm` |
|
|
159
|
+
| Capacitance | `farad`, `microfarad`, `nanofarad`, `picofarad` |
|
|
160
|
+
| Inductance | `henry`, `millihenry`, `microhenry` |
|
|
161
|
+
| Charge | `coulomb`, `ampereHour`, `milliampereHour` |
|
|
162
|
+
| Magnetic Flux | `weber` |
|
|
163
|
+
| Magnetic Flux Density | `tesla` |
|
|
164
|
+
| Conductance | `siemens` |
|
|
165
|
+
| Electric Field Strength | `voltPerMeter` |
|
|
166
|
+
| Permittivity | `faradPerMeter` |
|
|
167
|
+
| Permeability | `henryPerMeter` |
|
|
168
|
+
| Current Density | `amperePerSquareMeter` |
|
|
169
|
+
| Illuminance | `lux` |
|
|
170
|
+
| Luminous Flux | `lumen` |
|
|
171
|
+
| Catalytic Activity | `katal` |
|
|
172
|
+
| Thermal Conductance | `wattPerKelvin`, `milliwattPerKelvin`, `kilowattPerKelvin` |
|
|
173
|
+
| Heat Capacity | `joulePerKelvin` |
|
|
174
|
+
| Specific Heat Capacity | `joulePerKilogramKelvin` |
|
|
175
|
+
| Specific Energy | `joulePerKilogram` |
|
|
176
|
+
| Thermal Conductivity | `wattPerMeterKelvin` |
|
|
177
|
+
| Absorbed Dose | `gray`, `sievert` |
|
|
178
|
+
| Volumetric Flow Rate | `cubicMeterPerSecond`, `literPerSecond`, `literPerMinute` |
|
|
179
|
+
| Mass Flow Rate | `kilogramPerSecond` |
|
|
180
|
+
| Concentration | `molePerCubicMeter`, `molePerLiter` |
|
|
181
|
+
| Molar Mass | `kilogramPerMole`, `gramPerMole` |
|
|
182
|
+
|
|
183
|
+
_<a id="affine">\*</a>
|
|
184
|
+
[Affine quantity](https://github.com/isentropic-dev/dim/blob/main/packages/dim-unit/README.md#affine-units)
|
|
185
|
+
— zero point is arbitrary, which restricts valid operations._
|
|
186
|
+
|
|
187
|
+
## License
|
|
188
|
+
|
|
189
|
+
MIT
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"almost_equals.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.
|
|
1
|
+
{"version":3,"file":"almost_equals.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.19/almost_equals.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,SAAS,CAAC,EAAE,MAAM,EAClB,GAAG,CAAC,EAAE,MAAM,QAmBb"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"array_includes.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.
|
|
1
|
+
{"version":3,"file":"array_includes.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.19/array_includes.ts"],"names":[],"mappings":"AAMA,0FAA0F;AAC1F,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI,SAAS,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC;AAOpD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,EACnC,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC,EACvB,QAAQ,EAAE,YAAY,CAAC,CAAC,CAAC,EACzB,GAAG,CAAC,EAAE,MAAM,GACX,IAAI,CAgCN"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assert.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.
|
|
1
|
+
{"version":3,"file":"assert.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.19/assert.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,MAAM,CAAC,IAAI,EAAE,OAAO,EAAE,GAAG,SAAK,GAAG,OAAO,CAAC,IAAI,CAI5D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assertion_error.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.
|
|
1
|
+
{"version":3,"file":"assertion_error.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.19/assertion_error.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;GAgBG;AACH,qBAAa,cAAe,SAAQ,KAAK;IACvC;;;;OAIG;gBACS,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,YAAY;CAIpD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"equal.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.19/equal.ts"],"names":[],"mappings":"AA0FA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,KAAK,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,GAAG,OAAO,CAgHrD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"equals.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.19/equals.ts"],"names":[],"mappings":"AAUA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAC5B,MAAM,EAAE,CAAC,EACT,QAAQ,EAAE,CAAC,EACX,GAAG,CAAC,EAAE,MAAM,QAmBb"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exists.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.
|
|
1
|
+
{"version":3,"file":"exists.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.19/exists.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAC5B,MAAM,EAAE,CAAC,EACT,GAAG,CAAC,EAAE,MAAM,GACX,OAAO,CAAC,MAAM,IAAI,WAAW,CAAC,CAAC,CAAC,CAOlC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fail.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.
|
|
1
|
+
{"version":3,"file":"fail.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.19/fail.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AACH,wBAAgB,IAAI,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,KAAK,CAGxC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"false.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.
|
|
1
|
+
{"version":3,"file":"false.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.19/false.ts"],"names":[],"mappings":"AAIA,uDAAuD;AACvD,MAAM,MAAM,KAAK,GAAG,KAAK,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,GAAG,SAAS,CAAC;AAE3D;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,OAAO,EAAE,GAAG,SAAK,GAAG,OAAO,CAAC,IAAI,IAAI,KAAK,CAI1E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"greater.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.
|
|
1
|
+
{"version":3,"file":"greater.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.19/greater.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,MAAM,QAMpE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"greater_or_equal.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.
|
|
1
|
+
{"version":3,"file":"greater_or_equal.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.19/greater_or_equal.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,EACpC,MAAM,EAAE,CAAC,EACT,QAAQ,EAAE,CAAC,EACX,GAAG,CAAC,EAAE,MAAM,QASb"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instance_of.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.
|
|
1
|
+
{"version":3,"file":"instance_of.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.19/instance_of.ts"],"names":[],"mappings":"AAIA,sBAAsB;AAEtB,MAAM,MAAM,cAAc,GAAG,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC;AACzD,4BAA4B;AAC5B,MAAM,MAAM,kBAAkB,CAAC,CAAC,SAAS,cAAc,IAAI,YAAY,CAAC,CAAC,CAAC,CAAC;AAE3E;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,gBAAgB,CAE9B,CAAC,SAAS,QAAQ,MAAM,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,EAE9C,MAAM,EAAE,OAAO,EACf,YAAY,EAAE,CAAC,EACf,GAAG,SAAK,GACP,OAAO,CAAC,MAAM,IAAI,YAAY,CAAC,CAAC,CAAC,CA6BnC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"is_error.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.
|
|
1
|
+
{"version":3,"file":"is_error.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.19/is_error.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,aAAa,CAAC,CAAC,SAAS,KAAK,GAAG,KAAK,EACnD,KAAK,EAAE,OAAO,EAEd,UAAU,CAAC,EAAE,QAAQ,MAAM,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,EAC/C,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,EAC5B,GAAG,CAAC,EAAE,MAAM,GACX,OAAO,CAAC,KAAK,IAAI,CAAC,CA8BpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"less.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.
|
|
1
|
+
{"version":3,"file":"less.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.19/less.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,MAAM,QAMjE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"less_or_equal.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.
|
|
1
|
+
{"version":3,"file":"less_or_equal.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.19/less_or_equal.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,EACjC,MAAM,EAAE,CAAC,EACT,QAAQ,EAAE,CAAC,EACX,GAAG,CAAC,EAAE,MAAM,QASb"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"match.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.
|
|
1
|
+
{"version":3,"file":"match.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.19/match.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,WAAW,CACzB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,GAAG,CAAC,EAAE,MAAM,QAMb"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.
|
|
1
|
+
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.19/mod.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;GAeG;AAEH,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,uBAAuB,CAAC;AACtC,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC;AACrC,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"not_equals.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.19/not_equals.ts"],"names":[],"mappings":"AAOA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,MAAM,QAUtE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"not_instance_of.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.
|
|
1
|
+
{"version":3,"file":"not_instance_of.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.19/not_instance_of.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,CAAC,EACtC,MAAM,EAAE,CAAC,EAET,cAAc,EAAE,QAAQ,MAAM,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,EAClD,GAAG,CAAC,EAAE,MAAM,GACX,OAAO,CAAC,MAAM,IAAI,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAKjC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"not_match.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.
|
|
1
|
+
{"version":3,"file":"not_match.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.19/not_match.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,GAAG,CAAC,EAAE,MAAM,QAMb"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"not_strict_equals.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.
|
|
1
|
+
{"version":3,"file":"not_strict_equals.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.19/not_strict_equals.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,qBAAqB,CAAC,CAAC,EACrC,MAAM,EAAE,CAAC,EACT,QAAQ,EAAE,CAAC,EACX,GAAG,CAAC,EAAE,MAAM,QAYb"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"object_match.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.
|
|
1
|
+
{"version":3,"file":"object_match.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.19/object_match.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,iBAAiB,CAE/B,MAAM,EAAE,MAAM,CAAC,WAAW,EAAE,GAAG,CAAC,EAChC,QAAQ,EAAE,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,EACtC,GAAG,CAAC,EAAE,MAAM,GACX,IAAI,CAUN"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rejects.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.
|
|
1
|
+
{"version":3,"file":"rejects.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.19/rejects.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,aAAa,CAC3B,EAAE,EAAE,MAAM,WAAW,CAAC,OAAO,CAAC,EAC9B,GAAG,CAAC,EAAE,MAAM,GACX,OAAO,CAAC,OAAO,CAAC,CAAC;AACpB;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,aAAa,CAAC,CAAC,SAAS,KAAK,GAAG,KAAK,EACnD,EAAE,EAAE,MAAM,WAAW,CAAC,OAAO,CAAC,EAE9B,UAAU,EAAE,QAAQ,MAAM,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,EAC9C,WAAW,CAAC,EAAE,MAAM,EACpB,GAAG,CAAC,EAAE,MAAM,GACX,OAAO,CAAC,CAAC,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"strict_equals.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.
|
|
1
|
+
{"version":3,"file":"strict_equals.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.19/strict_equals.ts"],"names":[],"mappings":"AASA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,EAClC,MAAM,EAAE,OAAO,EACf,QAAQ,EAAE,CAAC,EACX,GAAG,CAAC,EAAE,MAAM,GACX,OAAO,CAAC,MAAM,IAAI,CAAC,CAgCrB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"string_includes.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.
|
|
1
|
+
{"version":3,"file":"string_includes.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.19/string_includes.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,GAAG,CAAC,EAAE,MAAM,QAMb"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"throws.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.
|
|
1
|
+
{"version":3,"file":"throws.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.19/throws.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,YAAY,CAC1B,EAAE,EAAE,MAAM,OAAO,EACjB,GAAG,CAAC,EAAE,MAAM,GACX,OAAO,CAAC;AACX;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,YAAY,CAAC,CAAC,SAAS,KAAK,GAAG,KAAK,EAClD,EAAE,EAAE,MAAM,OAAO,EAEjB,UAAU,EAAE,QAAQ,MAAM,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,EAC9C,WAAW,CAAC,EAAE,MAAM,EACpB,GAAG,CAAC,EAAE,MAAM,GACX,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unimplemented.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.
|
|
1
|
+
{"version":3,"file":"unimplemented.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.19/unimplemented.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AACH,wBAAgB,aAAa,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,KAAK,CAGjD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unreachable.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.
|
|
1
|
+
{"version":3,"file":"unreachable.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.19/unreachable.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AACH,wBAAgB,WAAW,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,KAAK,CAG/C"}
|
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
* SI unit: gray (Gy).
|
|
5
5
|
*
|
|
6
6
|
* Note: gray (absorbed radiation dose) and sievert (equivalent dose)
|
|
7
|
-
* share this dimension. This is intentional per SI
|
|
7
|
+
* share this dimension. This is intentional per SI — the type system
|
|
8
|
+
* cannot distinguish them.
|
|
8
9
|
*
|
|
9
10
|
* @example Creating dose quantities
|
|
10
11
|
* ```ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"absorbed-dose.d.ts","sourceRoot":"","sources":["../../src/src/absorbed-dose.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"absorbed-dose.d.ts","sourceRoot":"","sources":["../../src/src/absorbed-dose.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,YAAY,IAAI,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAEnD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAGtC,oCAAoC;AACpC,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,eAAe,EAAE,EAAE,CAAC,CAAC;AAEvD,4CAA4C;AAC5C,eAAO,MAAM,IAAI,EAAE,QAAQ,CAAC,eAAe,CAAyB,CAAC;AAErE,0EAA0E;AAC1E,eAAO,MAAM,OAAO,EAAE,QAAQ,CAAC,eAAe,CAAyB,CAAC"}
|
package/esm/src/absorbed-dose.js
CHANGED
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
* SI unit: gray (Gy).
|
|
5
5
|
*
|
|
6
6
|
* Note: gray (absorbed radiation dose) and sievert (equivalent dose)
|
|
7
|
-
* share this dimension. This is intentional per SI
|
|
7
|
+
* share this dimension. This is intentional per SI — the type system
|
|
8
|
+
* cannot distinguish them.
|
|
8
9
|
*
|
|
9
10
|
* @example Creating dose quantities
|
|
10
11
|
* ```ts
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Angular acceleration units (T⁻²).
|
|
3
|
+
*
|
|
4
|
+
* SI unit: radian per second squared (rad/s²).
|
|
5
|
+
*
|
|
6
|
+
* @example Creating an angular acceleration
|
|
7
|
+
* ```ts
|
|
8
|
+
* import { radianPerSecondSquared } from "@isentropic/dim-si/angular-acceleration";
|
|
9
|
+
*
|
|
10
|
+
* const alpha = radianPerSecondSquared(5);
|
|
11
|
+
* ```
|
|
12
|
+
*
|
|
13
|
+
* @module
|
|
14
|
+
*/
|
|
15
|
+
import type { AngularAcceleration as AngularAccelerationDim } from "@isentropic/dim-isq";
|
|
16
|
+
import type { Linear } from "@isentropic/dim-unit";
|
|
17
|
+
import type { BaseUnit } from "./types.js";
|
|
18
|
+
import type { Si } from "./system.js";
|
|
19
|
+
/** An SI angular acceleration quantity. */
|
|
20
|
+
export type AngularAcceleration = Linear<AngularAccelerationDim, Si>;
|
|
21
|
+
/** Radian per second squared (rad/s²) — SI unit of angular acceleration. */
|
|
22
|
+
export declare const radianPerSecondSquared: BaseUnit<AngularAccelerationDim>;
|
|
23
|
+
//# sourceMappingURL=angular-acceleration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"angular-acceleration.d.ts","sourceRoot":"","sources":["../../src/src/angular-acceleration.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,mBAAmB,IAAI,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AACzF,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAEnD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAGtC,2CAA2C;AAC3C,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC,sBAAsB,EAAE,EAAE,CAAC,CAAC;AAErE,4EAA4E;AAC5E,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,sBAAsB,CAEnE,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Angular acceleration units (T⁻²).
|
|
3
|
+
*
|
|
4
|
+
* SI unit: radian per second squared (rad/s²).
|
|
5
|
+
*
|
|
6
|
+
* @example Creating an angular acceleration
|
|
7
|
+
* ```ts
|
|
8
|
+
* import { radianPerSecondSquared } from "@isentropic/dim-si/angular-acceleration";
|
|
9
|
+
*
|
|
10
|
+
* const alpha = radianPerSecondSquared(5);
|
|
11
|
+
* ```
|
|
12
|
+
*
|
|
13
|
+
* @module
|
|
14
|
+
*/
|
|
15
|
+
import { angularAcceleration } from "@isentropic/dim-isq";
|
|
16
|
+
import { si } from "./system.js";
|
|
17
|
+
/** Radian per second squared (rad/s²) — SI unit of angular acceleration. */
|
|
18
|
+
export const radianPerSecondSquared = si.unit(angularAcceleration);
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Angular velocity units (T⁻¹).
|
|
3
|
+
*
|
|
4
|
+
* SI unit: radian per second (rad/s).
|
|
5
|
+
*
|
|
6
|
+
* Note: angular velocity shares this dimension with frequency
|
|
7
|
+
* (hertz). This is intentional per SI — the type system cannot
|
|
8
|
+
* distinguish them.
|
|
9
|
+
*
|
|
10
|
+
* @example Converting RPM to radians per second
|
|
11
|
+
* ```ts
|
|
12
|
+
* import { radianPerSecond, revolutionPerMinute } from "@isentropic/dim-si/angular-velocity";
|
|
13
|
+
* import { valueIn } from "@isentropic/dim-si/ops";
|
|
14
|
+
*
|
|
15
|
+
* const engine = revolutionPerMinute(3000);
|
|
16
|
+
* valueIn(engine, radianPerSecond); // ~314.16
|
|
17
|
+
* ```
|
|
18
|
+
*
|
|
19
|
+
* @module
|
|
20
|
+
*/
|
|
21
|
+
import type { AngularVelocity as AngularVelocityDim } from "@isentropic/dim-isq";
|
|
22
|
+
import type { Linear } from "@isentropic/dim-unit";
|
|
23
|
+
import type { BaseUnit, ScaledUnit } from "./types.js";
|
|
24
|
+
import type { Si } from "./system.js";
|
|
25
|
+
/** An SI angular velocity quantity. */
|
|
26
|
+
export type AngularVelocity = Linear<AngularVelocityDim, Si>;
|
|
27
|
+
/** Radian per second (rad/s) — SI unit of angular velocity. */
|
|
28
|
+
export declare const radianPerSecond: BaseUnit<AngularVelocityDim>;
|
|
29
|
+
/** Revolution per minute (rpm) — 2π/60 rad/s. */
|
|
30
|
+
export declare const revolutionPerMinute: ScaledUnit<AngularVelocityDim>;
|
|
31
|
+
//# sourceMappingURL=angular-velocity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"angular-velocity.d.ts","sourceRoot":"","sources":["../../src/src/angular-velocity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAAE,eAAe,IAAI,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACjF,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAEnD,OAAO,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACvD,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAGtC,uCAAuC;AACvC,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,kBAAkB,EAAE,EAAE,CAAC,CAAC;AAE7D,+DAA+D;AAC/D,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,kBAAkB,CAExD,CAAC;AAEF,iDAAiD;AACjD,eAAO,MAAM,mBAAmB,EAAE,UAAU,CAAC,kBAAkB,CACrB,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Angular velocity units (T⁻¹).
|
|
3
|
+
*
|
|
4
|
+
* SI unit: radian per second (rad/s).
|
|
5
|
+
*
|
|
6
|
+
* Note: angular velocity shares this dimension with frequency
|
|
7
|
+
* (hertz). This is intentional per SI — the type system cannot
|
|
8
|
+
* distinguish them.
|
|
9
|
+
*
|
|
10
|
+
* @example Converting RPM to radians per second
|
|
11
|
+
* ```ts
|
|
12
|
+
* import { radianPerSecond, revolutionPerMinute } from "@isentropic/dim-si/angular-velocity";
|
|
13
|
+
* import { valueIn } from "@isentropic/dim-si/ops";
|
|
14
|
+
*
|
|
15
|
+
* const engine = revolutionPerMinute(3000);
|
|
16
|
+
* valueIn(engine, radianPerSecond); // ~314.16
|
|
17
|
+
* ```
|
|
18
|
+
*
|
|
19
|
+
* @module
|
|
20
|
+
*/
|
|
21
|
+
import { angularVelocity } from "@isentropic/dim-isq";
|
|
22
|
+
import { si } from "./system.js";
|
|
23
|
+
/** Radian per second (rad/s) — SI unit of angular velocity. */
|
|
24
|
+
export const radianPerSecond = si.unit(angularVelocity);
|
|
25
|
+
/** Revolution per minute (rpm) — 2π/60 rad/s. */
|
|
26
|
+
export const revolutionPerMinute = radianPerSecond.scaled(2 * Math.PI / 60);
|
package/esm/src/area.d.ts
CHANGED
|
@@ -22,6 +22,10 @@ import type { Si } from "./system.js";
|
|
|
22
22
|
export type Area = Linear<AreaDim, Si>;
|
|
23
23
|
/** Square meter (m²) — SI unit of area. */
|
|
24
24
|
export declare const squareMeter: BaseUnit<AreaDim>;
|
|
25
|
+
/** Square kilometer (km²) — 10⁶ square meters. */
|
|
26
|
+
export declare const squareKilometer: ScaledUnit<AreaDim>;
|
|
27
|
+
/** Square centimeter (cm²) — 10⁻⁴ square meters. */
|
|
28
|
+
export declare const squareCentimeter: ScaledUnit<AreaDim>;
|
|
25
29
|
/** Hectare (ha) — 10000 square meters. */
|
|
26
30
|
export declare const hectare: ScaledUnit<AreaDim>;
|
|
27
31
|
//# sourceMappingURL=area.d.ts.map
|
package/esm/src/area.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"area.d.ts","sourceRoot":"","sources":["../../src/src/area.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,IAAI,IAAI,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAEnD,OAAO,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACvD,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"area.d.ts","sourceRoot":"","sources":["../../src/src/area.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,IAAI,IAAI,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAEnD,OAAO,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACvD,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAItC,2BAA2B;AAC3B,MAAM,MAAM,IAAI,GAAG,MAAM,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;AAEvC,2CAA2C;AAC3C,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,OAAO,CAAiB,CAAC;AAE5D,kDAAkD;AAClD,eAAO,MAAM,eAAe,EAAE,UAAU,CAAC,OAAO,CAE/C,CAAC;AAEF,oDAAoD;AACpD,eAAO,MAAM,gBAAgB,EAAE,UAAU,CAAC,OAAO,CAEhD,CAAC;AAEF,0CAA0C;AAC1C,eAAO,MAAM,OAAO,EAAE,UAAU,CAAC,OAAO,CAA6B,CAAC"}
|
package/esm/src/area.js
CHANGED
|
@@ -16,7 +16,12 @@
|
|
|
16
16
|
*/
|
|
17
17
|
import { area } from "@isentropic/dim-isq";
|
|
18
18
|
import { si } from "./system.js";
|
|
19
|
+
import { centimeter, kilometer } from "./length.js";
|
|
19
20
|
/** Square meter (m²) — SI unit of area. */
|
|
20
21
|
export const squareMeter = si.unit(area);
|
|
22
|
+
/** Square kilometer (km²) — 10⁶ square meters. */
|
|
23
|
+
export const squareKilometer = squareMeter.scaled(kilometer.scale ** 2);
|
|
24
|
+
/** Square centimeter (cm²) — 10⁻⁴ square meters. */
|
|
25
|
+
export const squareCentimeter = squareMeter.scaled(centimeter.scale ** 2);
|
|
21
26
|
/** Hectare (ha) — 10000 square meters. */
|
|
22
27
|
export const hectare = squareMeter.scaled(10000);
|
package/esm/src/charge.d.ts
CHANGED
|
@@ -18,10 +18,14 @@
|
|
|
18
18
|
*/
|
|
19
19
|
import type { Charge as ChargeDim } from "@isentropic/dim-isq";
|
|
20
20
|
import type { Linear } from "@isentropic/dim-unit";
|
|
21
|
-
import type { BaseUnit } from "./types.js";
|
|
21
|
+
import type { BaseUnit, ScaledUnit } from "./types.js";
|
|
22
22
|
import type { Si } from "./system.js";
|
|
23
23
|
/** An SI charge quantity. */
|
|
24
24
|
export type Charge = Linear<ChargeDim, Si>;
|
|
25
25
|
/** Coulomb (C) — SI unit of electric charge. */
|
|
26
26
|
export declare const coulomb: BaseUnit<ChargeDim>;
|
|
27
|
+
/** Ampere-hour (Ah) — 3600 coulombs. */
|
|
28
|
+
export declare const ampereHour: ScaledUnit<ChargeDim>;
|
|
29
|
+
/** Milliampere-hour (mAh) — 3.6 coulombs. */
|
|
30
|
+
export declare const milliampereHour: ScaledUnit<ChargeDim>;
|
|
27
31
|
//# sourceMappingURL=charge.d.ts.map
|
package/esm/src/charge.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"charge.d.ts","sourceRoot":"","sources":["../../src/src/charge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,MAAM,IAAI,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAEnD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"charge.d.ts","sourceRoot":"","sources":["../../src/src/charge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,MAAM,IAAI,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAEnD,OAAO,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACvD,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAKtC,6BAA6B;AAC7B,MAAM,MAAM,MAAM,GAAG,MAAM,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;AAE3C,gDAAgD;AAChD,eAAO,MAAM,OAAO,EAAE,QAAQ,CAAC,SAAS,CAAmB,CAAC;AAE5D,wCAAwC;AACxC,eAAO,MAAM,UAAU,EAAE,UAAU,CAAC,SAAS,CAE5C,CAAC;AAEF,6CAA6C;AAC7C,eAAO,MAAM,eAAe,EAAE,UAAU,CAAC,SAAS,CAEjD,CAAC"}
|
package/esm/src/charge.js
CHANGED
|
@@ -18,5 +18,11 @@
|
|
|
18
18
|
*/
|
|
19
19
|
import { charge } from "@isentropic/dim-isq";
|
|
20
20
|
import { si } from "./system.js";
|
|
21
|
+
import { ampere, milliampere } from "./current.js";
|
|
22
|
+
import { hour } from "./time.js";
|
|
21
23
|
/** Coulomb (C) — SI unit of electric charge. */
|
|
22
24
|
export const coulomb = si.unit(charge);
|
|
25
|
+
/** Ampere-hour (Ah) — 3600 coulombs. */
|
|
26
|
+
export const ampereHour = coulomb.scaled(ampere.scale * hour.scale);
|
|
27
|
+
/** Milliampere-hour (mAh) — 3.6 coulombs. */
|
|
28
|
+
export const milliampereHour = coulomb.scaled(milliampere.scale * hour.scale);
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Concentration units (N·L⁻³).
|
|
3
|
+
*
|
|
4
|
+
* SI unit: mole per cubic meter (mol/m³).
|
|
5
|
+
*
|
|
6
|
+
* @example Converting between concentration units
|
|
7
|
+
* ```ts
|
|
8
|
+
* import { molePerCubicMeter, molePerLiter } from "@isentropic/dim-si/concentration";
|
|
9
|
+
* import { valueIn } from "@isentropic/dim-si/ops";
|
|
10
|
+
*
|
|
11
|
+
* const c = molePerLiter(1);
|
|
12
|
+
* valueIn(c, molePerCubicMeter); // 1000
|
|
13
|
+
* ```
|
|
14
|
+
*
|
|
15
|
+
* @module
|
|
16
|
+
*/
|
|
17
|
+
import type { Concentration as ConcentrationDim } from "@isentropic/dim-isq";
|
|
18
|
+
import type { Linear } from "@isentropic/dim-unit";
|
|
19
|
+
import type { BaseUnit, ScaledUnit } from "./types.js";
|
|
20
|
+
import type { Si } from "./system.js";
|
|
21
|
+
/** An SI concentration quantity. */
|
|
22
|
+
export type Concentration = Linear<ConcentrationDim, Si>;
|
|
23
|
+
/** Mole per cubic meter (mol/m³) — SI unit of concentration. */
|
|
24
|
+
export declare const molePerCubicMeter: BaseUnit<ConcentrationDim>;
|
|
25
|
+
/** Mole per liter (mol/L) — 1000 mol/m³. */
|
|
26
|
+
export declare const molePerLiter: ScaledUnit<ConcentrationDim>;
|
|
27
|
+
//# sourceMappingURL=concentration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"concentration.d.ts","sourceRoot":"","sources":["../../src/src/concentration.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,aAAa,IAAI,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC7E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAEnD,OAAO,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACvD,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAItC,oCAAoC;AACpC,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,gBAAgB,EAAE,EAAE,CAAC,CAAC;AAEzD,gEAAgE;AAChE,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,gBAAgB,CAExD,CAAC;AAEF,4CAA4C;AAC5C,eAAO,MAAM,YAAY,EAAE,UAAU,CAAC,gBAAgB,CACvC,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Concentration units (N·L⁻³).
|
|
3
|
+
*
|
|
4
|
+
* SI unit: mole per cubic meter (mol/m³).
|
|
5
|
+
*
|
|
6
|
+
* @example Converting between concentration units
|
|
7
|
+
* ```ts
|
|
8
|
+
* import { molePerCubicMeter, molePerLiter } from "@isentropic/dim-si/concentration";
|
|
9
|
+
* import { valueIn } from "@isentropic/dim-si/ops";
|
|
10
|
+
*
|
|
11
|
+
* const c = molePerLiter(1);
|
|
12
|
+
* valueIn(c, molePerCubicMeter); // 1000
|
|
13
|
+
* ```
|
|
14
|
+
*
|
|
15
|
+
* @module
|
|
16
|
+
*/
|
|
17
|
+
import { concentration } from "@isentropic/dim-isq";
|
|
18
|
+
import { si } from "./system.js";
|
|
19
|
+
import { KILO } from "./prefixes.js";
|
|
20
|
+
/** Mole per cubic meter (mol/m³) — SI unit of concentration. */
|
|
21
|
+
export const molePerCubicMeter = si.unit(concentration);
|
|
22
|
+
/** Mole per liter (mol/L) — 1000 mol/m³. */
|
|
23
|
+
export const molePerLiter = molePerCubicMeter
|
|
24
|
+
.scaled(KILO);
|