symcrys 0.10.0 → 0.11.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.
Files changed (218) hide show
  1. package/README.md +6 -6
  2. package/dist/cell.d.ts +19 -16
  3. package/dist/cell.d.ts.map +1 -1
  4. package/dist/cell.js +63 -35
  5. package/dist/cell.js.map +1 -1
  6. package/dist/checks.d.ts +29 -0
  7. package/dist/checks.d.ts.map +1 -0
  8. package/dist/checks.js +79 -0
  9. package/dist/checks.js.map +1 -0
  10. package/dist/closure.d.ts +43 -0
  11. package/dist/closure.d.ts.map +1 -0
  12. package/dist/closure.js +201 -0
  13. package/dist/closure.js.map +1 -0
  14. package/dist/crystalClasses.d.ts +146 -118
  15. package/dist/crystalClasses.d.ts.map +1 -1
  16. package/dist/crystalClasses.js +163 -124
  17. package/dist/crystalClasses.js.map +1 -1
  18. package/dist/freeze.d.ts +7 -0
  19. package/dist/freeze.d.ts.map +1 -0
  20. package/dist/freeze.js +15 -0
  21. package/dist/freeze.js.map +1 -0
  22. package/dist/index.d.ts +11 -10
  23. package/dist/index.d.ts.map +1 -1
  24. package/dist/index.js +4 -3
  25. package/dist/index.js.map +1 -1
  26. package/dist/indices.d.ts +31 -5
  27. package/dist/indices.d.ts.map +1 -1
  28. package/dist/indices.js +104 -13
  29. package/dist/indices.js.map +1 -1
  30. package/dist/lattice.d.ts +15 -1
  31. package/dist/lattice.d.ts.map +1 -1
  32. package/dist/lattice.js +30 -1
  33. package/dist/lattice.js.map +1 -1
  34. package/dist/linalg.d.ts +2 -2
  35. package/dist/linalg.d.ts.map +1 -1
  36. package/dist/linalg.js +3 -3
  37. package/dist/linalg.js.map +1 -1
  38. package/dist/magnetic.d.ts +12 -10
  39. package/dist/magnetic.d.ts.map +1 -1
  40. package/dist/magnetic.js +8 -6
  41. package/dist/magnetic.js.map +1 -1
  42. package/dist/notation.d.ts +16 -0
  43. package/dist/notation.d.ts.map +1 -0
  44. package/dist/notation.js +66 -0
  45. package/dist/notation.js.map +1 -0
  46. package/dist/operations.d.ts +40 -26
  47. package/dist/operations.d.ts.map +1 -1
  48. package/dist/operations.js +48 -60
  49. package/dist/operations.js.map +1 -1
  50. package/dist/plane.d.ts +141 -79
  51. package/dist/plane.d.ts.map +1 -1
  52. package/dist/plane.js +147 -77
  53. package/dist/plane.js.map +1 -1
  54. package/dist/pointGroups/crystalForms.d.ts +6 -21
  55. package/dist/pointGroups/crystalForms.d.ts.map +1 -1
  56. package/dist/pointGroups/crystalForms.js +9 -16
  57. package/dist/pointGroups/crystalForms.js.map +1 -1
  58. package/dist/pointGroups/crystalFormsData.d.ts +4 -1
  59. package/dist/pointGroups/crystalFormsData.d.ts.map +1 -1
  60. package/dist/pointGroups/crystalFormsData.js +64 -1
  61. package/dist/pointGroups/crystalFormsData.js.map +1 -1
  62. package/dist/pointGroups/elements.d.ts +19 -17
  63. package/dist/pointGroups/elements.d.ts.map +1 -1
  64. package/dist/pointGroups/elements.js +65 -83
  65. package/dist/pointGroups/elements.js.map +1 -1
  66. package/dist/pointGroups/identify.d.ts +10 -18
  67. package/dist/pointGroups/identify.d.ts.map +1 -1
  68. package/dist/pointGroups/identify.js +27 -79
  69. package/dist/pointGroups/identify.js.map +1 -1
  70. package/dist/pointGroups/itaOrder.d.ts +15 -14
  71. package/dist/pointGroups/itaOrder.d.ts.map +1 -1
  72. package/dist/pointGroups/itaOrder.js +116 -94
  73. package/dist/pointGroups/itaOrder.js.map +1 -1
  74. package/dist/pointGroups/itcData.d.ts +96 -0
  75. package/dist/pointGroups/itcData.d.ts.map +1 -0
  76. package/dist/pointGroups/itcData.js +336 -0
  77. package/dist/pointGroups/itcData.js.map +1 -0
  78. package/dist/pointGroups/itcMagneticData.d.ts +55 -0
  79. package/dist/pointGroups/itcMagneticData.d.ts.map +1 -0
  80. package/dist/pointGroups/itcMagneticData.js +172 -0
  81. package/dist/pointGroups/itcMagneticData.js.map +1 -0
  82. package/dist/pointGroups/keys.d.ts +32 -0
  83. package/dist/pointGroups/keys.d.ts.map +1 -0
  84. package/dist/pointGroups/keys.js +120 -0
  85. package/dist/pointGroups/keys.js.map +1 -0
  86. package/dist/pointGroups/magneticSymbols.d.ts +6 -5
  87. package/dist/pointGroups/magneticSymbols.d.ts.map +1 -1
  88. package/dist/pointGroups/magneticSymbols.js +15 -12
  89. package/dist/pointGroups/magneticSymbols.js.map +1 -1
  90. package/dist/pointGroups/orbits.d.ts +23 -42
  91. package/dist/pointGroups/orbits.d.ts.map +1 -1
  92. package/dist/pointGroups/orbits.js +20 -62
  93. package/dist/pointGroups/orbits.js.map +1 -1
  94. package/dist/pointGroups/pointGroups.d.ts +135 -67
  95. package/dist/pointGroups/pointGroups.d.ts.map +1 -1
  96. package/dist/pointGroups/pointGroups.js +409 -244
  97. package/dist/pointGroups/pointGroups.js.map +1 -1
  98. package/dist/pointGroups/properties.d.ts +21 -22
  99. package/dist/pointGroups/properties.d.ts.map +1 -1
  100. package/dist/pointGroups/properties.js +40 -37
  101. package/dist/pointGroups/properties.js.map +1 -1
  102. package/dist/pointGroups/seitzData.d.ts +26 -0
  103. package/dist/pointGroups/seitzData.d.ts.map +1 -0
  104. package/dist/pointGroups/seitzData.js +130 -0
  105. package/dist/pointGroups/seitzData.js.map +1 -0
  106. package/dist/pointGroups/wyckoff.d.ts +70 -40
  107. package/dist/pointGroups/wyckoff.d.ts.map +1 -1
  108. package/dist/pointGroups/wyckoff.js +98 -91
  109. package/dist/pointGroups/wyckoff.js.map +1 -1
  110. package/dist/pointGroups/wyckoffData.d.ts +7 -4
  111. package/dist/pointGroups/wyckoffData.d.ts.map +1 -1
  112. package/dist/pointGroups/wyckoffData.js +789 -168
  113. package/dist/pointGroups/wyckoffData.js.map +1 -1
  114. package/dist/siteSymmetry.d.ts +9 -17
  115. package/dist/siteSymmetry.d.ts.map +1 -1
  116. package/dist/siteSymmetry.js +62 -47
  117. package/dist/siteSymmetry.js.map +1 -1
  118. package/dist/spaceGroups/affine.d.ts.map +1 -1
  119. package/dist/spaceGroups/affine.js +3 -2
  120. package/dist/spaceGroups/affine.js.map +1 -1
  121. package/dist/spaceGroups/cell.d.ts +43 -31
  122. package/dist/spaceGroups/cell.d.ts.map +1 -1
  123. package/dist/spaceGroups/cell.js +173 -85
  124. package/dist/spaceGroups/cell.js.map +1 -1
  125. package/dist/spaceGroups/describe.d.ts +12 -10
  126. package/dist/spaceGroups/describe.d.ts.map +1 -1
  127. package/dist/spaceGroups/describe.js +11 -10
  128. package/dist/spaceGroups/describe.js.map +1 -1
  129. package/dist/spaceGroups/planeGroupData.d.ts +1 -1
  130. package/dist/spaceGroups/planeGroupData.d.ts.map +1 -1
  131. package/dist/spaceGroups/planeGroupData.js +8 -8
  132. package/dist/spaceGroups/planeGroupData.js.map +1 -1
  133. package/dist/spaceGroups/planeGroups.d.ts.map +1 -1
  134. package/dist/spaceGroups/planeGroups.js +2 -1
  135. package/dist/spaceGroups/planeGroups.js.map +1 -1
  136. package/dist/spaceGroups/positions.d.ts +48 -19
  137. package/dist/spaceGroups/positions.d.ts.map +1 -1
  138. package/dist/spaceGroups/positions.js +166 -67
  139. package/dist/spaceGroups/positions.js.map +1 -1
  140. package/dist/tensors/propertyTable.d.ts +3 -1
  141. package/dist/tensors/propertyTable.d.ts.map +1 -1
  142. package/dist/tensors/propertyTable.js +17 -10
  143. package/dist/tensors/propertyTable.js.map +1 -1
  144. package/dist/tensors/rowEchelon.d.ts +12 -4
  145. package/dist/tensors/rowEchelon.d.ts.map +1 -1
  146. package/dist/tensors/rowEchelon.js +24 -11
  147. package/dist/tensors/rowEchelon.js.map +1 -1
  148. package/dist/tensors/tensorForm.d.ts +75 -34
  149. package/dist/tensors/tensorForm.d.ts.map +1 -1
  150. package/dist/tensors/tensorForm.js +173 -68
  151. package/dist/tensors/tensorForm.js.map +1 -1
  152. package/dist/tensors/tensorProperties.d.ts +10 -9
  153. package/dist/tensors/tensorProperties.d.ts.map +1 -1
  154. package/dist/tensors/tensorProperties.js +22 -12
  155. package/dist/tensors/tensorProperties.js.map +1 -1
  156. package/dist/tolerances.d.ts +56 -1
  157. package/dist/tolerances.d.ts.map +1 -1
  158. package/dist/tolerances.js +51 -1
  159. package/dist/tolerances.js.map +1 -1
  160. package/dist/version.d.ts +1 -1
  161. package/dist/version.js +1 -1
  162. package/package.json +1 -1
  163. package/src/cell.ts +78 -51
  164. package/src/checks.ts +84 -0
  165. package/src/closure.ts +214 -0
  166. package/src/crystalClasses.ts +234 -160
  167. package/src/freeze.ts +14 -0
  168. package/src/index.ts +21 -10
  169. package/src/indices.ts +108 -18
  170. package/src/lattice.ts +41 -1
  171. package/src/linalg.ts +3 -3
  172. package/src/magnetic.ts +14 -9
  173. package/src/notation.ts +73 -0
  174. package/src/operations.ts +78 -69
  175. package/src/plane.ts +253 -127
  176. package/src/pointGroups/crystalForms.ts +11 -44
  177. package/src/pointGroups/crystalFormsData.ts +66 -1
  178. package/src/pointGroups/elements.ts +82 -92
  179. package/src/pointGroups/identify.ts +38 -97
  180. package/src/pointGroups/itaOrder.ts +117 -101
  181. package/src/pointGroups/itcData.ts +404 -0
  182. package/src/pointGroups/itcMagneticData.ts +206 -0
  183. package/src/pointGroups/keys.ts +144 -0
  184. package/src/pointGroups/magneticSymbols.ts +18 -17
  185. package/src/pointGroups/orbits.ts +41 -89
  186. package/src/pointGroups/pointGroups.ts +540 -297
  187. package/src/pointGroups/properties.ts +44 -40
  188. package/src/pointGroups/seitzData.ts +147 -0
  189. package/src/pointGroups/wyckoff.ts +137 -112
  190. package/src/pointGroups/wyckoffData.ts +793 -170
  191. package/src/siteSymmetry.ts +71 -64
  192. package/src/spaceGroups/affine.ts +3 -2
  193. package/src/spaceGroups/cell.ts +227 -116
  194. package/src/spaceGroups/describe.ts +22 -19
  195. package/src/spaceGroups/planeGroupData.ts +9 -9
  196. package/src/spaceGroups/planeGroups.ts +2 -1
  197. package/src/spaceGroups/positions.ts +202 -78
  198. package/src/tensors/propertyTable.ts +29 -17
  199. package/src/tensors/rowEchelon.ts +28 -9
  200. package/src/tensors/tensorForm.ts +260 -89
  201. package/src/tensors/tensorProperties.ts +34 -14
  202. package/src/tolerances.ts +66 -1
  203. package/src/version.ts +1 -1
  204. package/dist/pointGroups/data.d.ts +0 -75
  205. package/dist/pointGroups/data.d.ts.map +0 -1
  206. package/dist/pointGroups/data.js +0 -212
  207. package/dist/pointGroups/data.js.map +0 -1
  208. package/dist/pointGroups/magneticData.d.ts +0 -66
  209. package/dist/pointGroups/magneticData.d.ts.map +0 -1
  210. package/dist/pointGroups/magneticData.js +0 -184
  211. package/dist/pointGroups/magneticData.js.map +0 -1
  212. package/dist/spaceGroups/snap.d.ts +0 -20
  213. package/dist/spaceGroups/snap.d.ts.map +0 -1
  214. package/dist/spaceGroups/snap.js +0 -103
  215. package/dist/spaceGroups/snap.js.map +0 -1
  216. package/src/pointGroups/data.ts +0 -305
  217. package/src/pointGroups/magneticData.ts +0 -328
  218. package/src/spaceGroups/snap.ts +0 -121
@@ -10,6 +10,7 @@
10
10
  * Everything is computed by the modules that serve both entry points; this module checks what
11
11
  * comes in and leaves time reversal out of what goes back.
12
12
  */
13
+ import { checkOptions, shown, TOLERANCE_KEYS } from './checks.js';
13
14
  import * as elements from './pointGroups/elements.js';
14
15
  import * as groups from './pointGroups/pointGroups.js';
15
16
  import * as properties from './pointGroups/properties.js';
@@ -21,6 +22,7 @@ import * as cell from './cell.js';
21
22
  import * as site from './siteSymmetry.js';
22
23
  import { TENSOR_PROPERTIES as ALL_TENSOR_PROPERTIES } from './tensors/propertyTable.js';
23
24
  import * as tensors from './tensors/tensorForm.js';
25
+ import { deepFreeze } from './freeze.js';
24
26
  const USE_MAGNETIC = "the crystallographic API has no time reversal; use the magnetic API ('symcrys/magnetic', in Python symcrys.magnetic)";
25
27
  /**
26
28
  * The named tensor properties of the crystal classes: those of time-even tensors. `'gyrotropic'`
@@ -28,11 +30,11 @@ const USE_MAGNETIC = "the crystallographic API has no time reversal; use the mag
28
30
  * magnetic API.
29
31
  */
30
32
  export const TENSOR_PROPERTIES = Object.freeze(Object.fromEntries(Object.entries(ALL_TENSOR_PROPERTIES)
31
- .filter(([, p]) => p.spec.timeParity === 'i')
33
+ .filter(([, p]) => p.spec.timeParity === 'even')
32
34
  .map(([name, { spec, description, source }]) => [
33
35
  name,
34
36
  Object.freeze({
35
- spec: Object.freeze({ rank: spec.rank, parity: spec.parity, intrinsic: spec.intrinsic }),
37
+ spec: Object.freeze({ rank: spec.rank, kind: spec.kind, intrinsic: spec.intrinsic }),
36
38
  description,
37
39
  source,
38
40
  }),
@@ -44,9 +46,9 @@ function classKey(key) {
44
46
  if (groups.isPointGroupKey(key))
45
47
  return key;
46
48
  if (groups.isMagneticPointGroupKey(key)) {
47
- throw new RangeError(`${JSON.stringify(key)} is a magnetic point group, not a crystal class: ${USE_MAGNETIC}`);
49
+ throw new RangeError(`${shown(key)} is a magnetic point group, not a crystal class: ${USE_MAGNETIC}`);
48
50
  }
49
- throw new RangeError(`Unknown point group key: ${JSON.stringify(key)}`);
51
+ throw new RangeError(`Unknown point group key: ${shown(key)}`);
50
52
  }
51
53
  /** A name of the table of this API, checked. */
52
54
  function propertyName(name) {
@@ -54,50 +56,59 @@ function propertyName(name) {
54
56
  if (Object.hasOwn(TENSOR_PROPERTIES, name))
55
57
  return name;
56
58
  if (Object.hasOwn(ALL_TENSOR_PROPERTIES, name)) {
57
- throw new RangeError(`${JSON.stringify(name)} is the property of a time-odd tensor: ${USE_MAGNETIC}`);
59
+ throw new RangeError(`${shown(name)} is the property of a time-odd tensor: ${USE_MAGNETIC}`);
58
60
  }
59
61
  }
60
- throw new RangeError(`Unknown tensor property: ${JSON.stringify(name)} (known: ${TENSOR_PROPERTY_NAMES.join(', ')})`);
62
+ throw new RangeError(`Unknown tensor property: ${shown(name)} (known: ${TENSOR_PROPERTY_NAMES.join(', ')})`);
61
63
  }
62
64
  /** The time-even tensor of a specification or of a property name, as the shared modules take it. */
63
65
  function timeEven(specOrName) {
64
66
  if (typeof specOrName === 'string')
65
67
  return propertyName(specOrName);
66
68
  if (typeof specOrName !== 'object' || specOrName === null) {
67
- throw new RangeError(`Not a tensor specification: ${JSON.stringify(specOrName)}`);
69
+ throw new RangeError(`Not a tensor specification: ${shown(specOrName)}`);
68
70
  }
69
71
  const timeParity = specOrName.timeParity;
70
- if (timeParity === 'c')
71
- throw new RangeError(`A time-odd tensor (timeParity 'c'): ${USE_MAGNETIC}`);
72
- if (timeParity !== undefined && timeParity !== 'i') {
73
- throw new RangeError(`Unknown time parity: ${JSON.stringify(timeParity)}`);
72
+ if (timeParity === 'odd' || timeParity === 'c') {
73
+ throw new RangeError(`A time-odd tensor (timeParity '${timeParity}'): ${USE_MAGNETIC}`);
74
74
  }
75
- return { rank: specOrName.rank, parity: specOrName.parity, timeParity: 'i', intrinsic: specOrName.intrinsic };
75
+ if (timeParity !== undefined && timeParity !== 'even') {
76
+ // The shared check names the values and the names up to 0.10 ('i', 'c').
77
+ return { ...specOrName, timeParity: timeParity };
78
+ }
79
+ // The other fields are passed on as they are, so that the shared check reports a field of 0.10 (parity).
80
+ return { ...specOrName, timeParity: 'even' };
76
81
  }
77
82
  /** Checks a list of operations of a caller: an operation with time reversal is an error. */
78
83
  function checkUnitary(operations) {
84
+ if (!Array.isArray(operations))
85
+ throw new RangeError('The operations must be an array');
79
86
  operations.forEach((op, i) => {
87
+ if (typeof op !== 'object' || op === null)
88
+ throw new RangeError(`Operation ${i} is not an object`);
80
89
  const timeReversal = op.timeReversal;
81
90
  if (timeReversal === true) {
82
91
  throw new RangeError(`Operation ${i} is combined with time reversal: ${USE_MAGNETIC}`);
83
92
  }
84
93
  if (timeReversal !== undefined && timeReversal !== false) {
85
- throw new RangeError(`Operation ${i}: timeReversal must be false or absent, not ${JSON.stringify(timeReversal)}`);
94
+ throw new RangeError(`Operation ${i}: timeReversal must be false or absent, not ${shown(timeReversal)}`);
86
95
  }
87
96
  });
88
97
  }
89
98
  /** A list of operations as the shared modules take it. */
90
99
  function unitary(operations) {
91
100
  checkUnitary(operations);
92
- return operations.map((op) => ({ matrix: op.matrix, timeReversal: false }));
101
+ // The other fields are kept for the checks of the shared modules (a record with `matrix` only
102
+ // is refused there with a hint).
103
+ return operations.map((op) => ({ ...op, timeReversal: false }));
93
104
  }
94
105
  // --- what goes back --------------------------------------------------------------------------------
95
106
  const withoutTimeCache = new WeakMap();
96
- /** The operations as their matrices; the shared modules return the same frozen list for the same call. */
97
- function matricesOnly(ops) {
107
+ /** The operations without time reversal; the shared modules return the same frozen list for the same call. */
108
+ function withoutTime(ops) {
98
109
  let result = withoutTimeCache.get(ops);
99
110
  if (!result) {
100
- result = Object.freeze(ops.map((op) => Object.freeze({ matrix: op.matrix })));
111
+ result = Object.freeze(ops.map((op) => Object.freeze({ matrix: op.matrix, cartesian: op.cartesian })));
101
112
  withoutTimeCache.set(ops, result);
102
113
  }
103
114
  return result;
@@ -114,73 +125,98 @@ const groupCache = new Map();
114
125
  export function pointGroup(key) {
115
126
  let g = groupCache.get(classKey(key));
116
127
  if (!g) {
117
- const { crystalSystem, order, centrosymmetric, polar, chiral, laueClass } = groups.pointGroup(key);
118
- g = Object.freeze({ key, crystalSystem, order, centrosymmetric, polar, chiral, laueClass });
128
+ const { crystalSystem, order, centrosymmetric, polar, enantiomorphic, laueClass } = groups.pointGroup(key);
129
+ g = Object.freeze({ key, crystalSystem, order, centrosymmetric, polar, enantiomorphic, laueClass });
119
130
  groupCache.set(key, g);
120
131
  }
121
132
  return g;
122
133
  }
123
134
  /** All 32 crystal classes, in the order of `POINT_GROUP_KEYS` (by crystal system, as in ITA). */
124
135
  export function pointGroups() {
125
- return groups.POINT_GROUP_KEYS.map((key) => pointGroup(key));
136
+ return deepFreeze(groups.POINT_GROUP_KEYS.map((key) => pointGroup(key)));
126
137
  }
127
138
  /**
128
- * Finds a crystal class by a Hermann–Mauguin symbol in the given convention (default `'itc'`): the
129
- * short symbol of a setting, a full symbol, or the key (spaces are ignored). A symbol that names
130
- * one setting gives that setting; the key, and a short symbol that several settings share (the
131
- * monoclinic ones: `2` for unique axis b and c), give the default setting of the convention.
132
- * Returns undefined if nothing matches, also for a value that is not a string and for the
133
- * symbol of a magnetic group with time reversal. Symbols are written as in this library: `-` for
134
- * the overbar, also in the Birss convention (`m-3m`, where Birss prints `m3m`; docs/conventions.md,
135
- * "Where ITC and Birss differ").
139
+ * Finds a crystal class by a symbol, read tolerantly.
140
+ * It reads, spaces ignored (#96; docs/conventions.md, "Reading symbols"): the key; the short or
141
+ * full symbol of a setting (`312`, `1 1 2`); a Schoenflies symbol, ITA's or ITC Vol. D's (`D3`,
142
+ * `C3i`, `S6`); Birss's cubic symbols without the overbar on the 3 (`m3m`). A symbol that names
143
+ * several settings (the key `32`, which is also the symbol of the setting with rhombohedral axes;
144
+ * `2` for unique axis b, c and a; any Schoenflies symbol) gives the standard (ITC default) setting,
145
+ * unless the options `axes` or `uniqueAxis` choose another, as the headlines of ITA name the
146
+ * settings (the option `axes` set to `'rhombohedral'` for the key `32`).
147
+ *
148
+ * Spellings: the overbar as `-`, `−`, a combining overbar or `¯` after the digit (`m3̄m`), `bar3` (also with a backslash and braces, as in LaTeX);
149
+ * Schoenflies subscripts also as Unicode or LaTeX subscripts (`C₃ᵥ`, `C_{3v}`). Returns undefined if nothing matches,
150
+ * also for a value that is not a string and for the symbol of a magnetic group with time reversal; a
151
+ * symbol that names several groups is a RangeError that lists them.
136
152
  */
137
- export function findPointGroup(hm, conventionName = 'itc') {
138
- return groups.findPointGroup(hm, conventionName);
153
+ export function findPointGroup(symbol, options) {
154
+ if (arguments.length > 2)
155
+ groups.rejectConventionArgument(arguments.length);
156
+ return deepFreeze(groups.findPointGroup(symbol, options));
139
157
  }
140
- /** The settings of a crystal class, with symbols and the default of the given convention (default `'itc'`). */
141
- export function settings(key, conventionName = 'itc') {
142
- return groups.settings(classKey(key), conventionName);
158
+ /** The settings of a crystal class, with their symbols and the ITC default. */
159
+ export function settings(key) {
160
+ groups.rejectConventionArgument(arguments.length);
161
+ return deepFreeze(groups.settings(classKey(key)));
143
162
  }
144
163
  /**
145
- * All operations of the crystal class in the requested setting (default: the convention's default
146
- * setting). ITC convention: in ITA's order, identity first, then as ITA numbers the general
147
- * position. Birss convention: in birss-app's order (docs/conventions.md, "Order of the
148
- * operations"). The matrices are Cartesian (docs/conventions.md, "Cartesian frame").
164
+ * All operations of the crystal class in the requested setting (default: the ITC default setting),
165
+ * in ITA's order: identity first, then as ITA numbers the general position (docs/conventions.md,
166
+ * "Order of the operations"). Each operation is ITA's matrix W in the lattice basis of the setting
167
+ * (`matrix`) with the same operation as a Cartesian matrix (`cartesian`; docs/conventions.md,
168
+ * "Operations").
149
169
  */
150
170
  export function operations(key, options) {
151
- return matricesOnly(groups.operations(classKey(key), options));
171
+ return withoutTime(groups.operations(classKey(key), options));
152
172
  }
153
173
  /**
154
- * Generators of the crystal class in the requested setting (docs/conventions.md, "Generators"). ITC
155
- * convention: ITA's selected generators in printed order, without the identity and ITA's lattice
156
- * translations, so the list is empty for `1`; for `mm2` settings 2 and 3, which ITA does not list,
157
- * those of setting 1 carried into their frame. Birss convention: birss-app's generators (for `1`
158
- * the identity, as in birss-app).
174
+ * Generators of the crystal class in the requested setting (docs/conventions.md, "Generators"):
175
+ * ITA's selected generators in printed order, without the identity and ITA's lattice translations,
176
+ * so the list is empty for `1`; for the settings ITA does not print (`mm2` settings 2 and 3, monoclinic unique axis a), those of setting 1
177
+ * carried into their frame.
159
178
  */
160
179
  export function generators(key, options) {
161
- return matricesOnly(groups.generators(classKey(key), options));
180
+ return withoutTime(groups.generators(classKey(key), options));
162
181
  }
163
- /** A symbol of the crystal class in the requested convention and setting. */
182
+ /**
183
+ * A symbol of the crystal class in the requested setting, as ITA writes it (Tables 3.2.1.2 and
184
+ * 3.2.3.2: `321`, `C3i`; docs/conventions.md, "Symbols").
185
+ */
164
186
  export function symbol(key, options) {
165
- return groups.symbol(classKey(key), options);
187
+ const result = groups.symbol(classKey(key), options);
188
+ // The Schoenflies symbol as ITA writes it (`C3i`); the magnetic API follows ITC Vol. D (`S6`).
189
+ return options?.form === 'schoenflies' ? groups.itaSchoenflies(key) : result;
166
190
  }
167
191
  // --- properties that follow from operations ---------------------------------------------------------
168
192
  export { holohedry } from './pointGroups/properties.js';
193
+ /**
194
+ * The lattice systems of a crystal class: those whose lattices it can act on (ITA § 1.3.4.4.2 and
195
+ * Table 1.3.4.1, p. 39). One for every class but the trigonal ones, which belong to the hexagonal
196
+ * (hP) or the rhombohedral (hR) lattice system depending on the basis, so they give both,
197
+ * `['hexagonal', 'rhombohedral']`. The holohedry of each is `holohedry(latticeSystem)`. Throws a
198
+ * RangeError for an unknown key.
199
+ */
200
+ export function latticeSystems(key) {
201
+ return groups.latticeSystems(classKey(key));
202
+ }
169
203
  /**
170
204
  * True if the group generated by `operations` contains the inversion, e.g. for the operations of a
171
- * distorted crystal. A list that is not closed is closed first. For a crystal class, read
172
- * `pointGroup(key).centrosymmetric`. Throws a RangeError for a matrix that is not orthogonal.
205
+ * distorted crystal. The list is closed into a group within the tolerance and made exact first, as
206
+ * `tensorFormOf` does. For a crystal class, read `pointGroup(key).centrosymmetric`. Throws a
207
+ * RangeError as `tensorFormOf`.
173
208
  */
174
- export function isCentrosymmetricOf(operations) {
175
- return properties.isCentrosymmetricOf(unitary(operations));
209
+ export function isCentrosymmetricOf(operations, options) {
210
+ return properties.isCentrosymmetricOf(unitary(operations), options);
176
211
  }
177
212
  /**
178
- * True if the group generated by `operations` is chiral: proper rotations only. For a crystal
179
- * class, read `pointGroup(key).chiral`. Polar is the named property `'pyroelectric'`:
180
- * `allowsPropertyOf(operations, 'pyroelectric')`. Throws a RangeError for a matrix that is not orthogonal.
213
+ * True if the group generated by `operations` is enantiomorphic: proper rotations only (ITA
214
+ * § 3.2.2.1.3). For a crystal class, read `pointGroup(key).enantiomorphic`. Polar is the named property `'pyroelectric'`:
215
+ * `allowsPropertyOf(operations, 'pyroelectric')`. Throws a RangeError for an operation without an
216
+ * orthogonal Cartesian matrix (`cartesian`; within the tolerance).
181
217
  */
182
- export function isChiralOf(operations) {
183
- return properties.isChiralOf(unitary(operations));
218
+ export function isEnantiomorphicOf(operations, options) {
219
+ return properties.isEnantiomorphicOf(unitary(operations), options);
184
220
  }
185
221
  /**
186
222
  * The crystal class generated by a list of Cartesian operations, for instance those left after
@@ -188,8 +224,7 @@ export function isChiralOf(operations) {
188
224
  * (absent if the group is the class in another orientation, e.g. a threefold axis along [111]). The
189
225
  * list is closed into a group first, two matrices being equal when no entry differs by `tolerance`
190
226
  * (default `EPSILON`) or more. Returns undefined if the operations generate no crystal class (an
191
- * operation of order 5, a group larger than 48). Throws a RangeError for a matrix that is not
192
- * orthogonal (within `tolerance`, at least `EPSILON`). The classes `1` and `-1` have no
227
+ * operation of order 5, a group larger than 48). Throws a RangeError for an operation without an orthogonal Cartesian matrix (`cartesian`; within `tolerance`, at least `EPSILON`). The classes `1` and `-1` have no
193
228
  * orientation, so they always have setting 1. The first call builds a table of the groups (about
194
229
  * 0.1 s; docs/conventions.md, "Point group of a list of operations").
195
230
  */
@@ -201,7 +236,7 @@ export function pointGroupOf(operations, options) {
201
236
  * Cartesian axis (rotation or rotoinversion axis, mirror normal) with its first non-zero component,
202
237
  * in the order x, y, z, positive, and for n ≥ 3 the sense about that axis. The axes are not named
203
238
  * by lattice directions, since the list need not belong to a setting; for a crystal class given by
204
- * its key, `describeOperations` names them. Throws a RangeError for a matrix that is not orthogonal
239
+ * its key, `describeOperations` names them. Throws a RangeError for an operation without an orthogonal Cartesian matrix (`cartesian`)
205
240
  * or not a crystallographic operation (a rotation part by an angle other than 360°/n, n = 1, 2, 3,
206
241
  * 4, 6), both within `tolerance` (default `EPSILON`, as for `pointGroupOf`).
207
242
  */
@@ -214,26 +249,27 @@ export function describeOperationsOf(operations, options) {
214
249
  // --- symmetry elements -----------------------------------------------------------------------------
215
250
  /**
216
251
  * Each operation of the crystal class described geometrically, in the order of `operations` for
217
- * the same key and options. Axes are named by the symmetry direction they lie along: in the ITC
218
- * convention with the sign of ITA Table 2.1.3.1, in the Birss convention signed as birss-app signs
219
- * them (first non-zero Cartesian component positive); the sign fixes what the sense refers to.
252
+ * the same key and options. An axis lies along a symmetry direction and has the sign of the
253
+ * operation's Seitz symbol (ITA 6th ed., Tables 1.4.2.1–1.4.2.3, p. 52), e.g. [1, 1, 0] for 2₁₁₀ in
254
+ * the hexagonal family, where ITA Table 2.1.3.1 lists [1̄, 1̄, 0]; for n ≥ 3 the sign fixes what the
255
+ * sense refers to.
220
256
  */
221
257
  export function describeOperations(key, options) {
222
258
  const described = elements.describeOperations(classKey(key), options);
223
259
  let result = descriptionCache.get(described);
224
260
  if (!result) {
225
- result = Object.freeze(described.map(({ kind, order, axis, sense }) => Object.freeze({ kind, order, ...(axis ? { axis } : {}), ...(sense ? { sense } : {}) })));
261
+ result = Object.freeze(described.map(({ kind, n, axis, sense }) => Object.freeze({ kind, n, ...(axis ? { axis } : {}), ...(sense ? { sense } : {}) })));
226
262
  descriptionCache.set(described, result);
227
263
  }
228
264
  return result;
229
265
  }
230
266
  /**
231
- * The positions of the full Hermann–Mauguin symbol in the requested convention and setting, each
232
- * with its symmetry directions (ITA Table 2.1.3.1) and the symmetry elements along them. All
233
- * positions of the crystal family are listed, also those the symbol of the class leaves out (then
234
- * without `symbol`); the triclinic family has none. The directions keep the sign of Table 2.1.3.1
235
- * in both conventions; in the Birss convention an axis of `describeOperations` may be reversed, so
236
- * match it to a direction whose dot product with it is ±1, not by identity.
267
+ * The positions of the full Hermann–Mauguin symbol in the requested setting, each with its
268
+ * symmetry directions (ITA Table 2.1.3.1) and the symmetry elements along them. All positions of the
269
+ * crystal family are listed (for rhombohedral axes the two of that row of the table), also those the
270
+ * symbol of the class leaves out (then without `symbol`); the triclinic family has none. A direction
271
+ * has the sign of ITA Table 2.1.3.1, the axis of an operation along it that of its Seitz symbol, so
272
+ * the two are parallel and may be opposite: match them by direction, up to sign.
237
273
  */
238
274
  export function symmetryDirections(key, options) {
239
275
  return elements.symmetryDirections(classKey(key), options);
@@ -245,20 +281,27 @@ export function symmetryDirections(key, options) {
245
281
  * fixing the direction within the tolerance are closed under the products found in the list and
246
282
  * the direction is set onto their fixed space, repeated until stable, so that for a group the
247
283
  * result is a subgroup and the set direction lies exactly on its elements. For a list that is not a
248
- * group, `multiplicity` may not be an integer. The matrices must be Cartesian and orthogonal (not
249
- * those of `latticeOperations`). Throws a RangeError for a matrix that is not orthogonal (within
284
+ * group, `multiplicity` may not be an integer. Each operation is read by its Cartesian matrix
285
+ * (`cartesian`). Throws a RangeError for an operation without an orthogonal Cartesian matrix (`cartesian`; within
250
286
  * `tolerance`, at least `EPSILON`), for a zero vector, and if the closed operations fix no common
251
- * direction (a tolerance far too large, e.g. 0.5).
287
+ * direction or do not settle into a group (a tolerance far too large, e.g. 0.5).
252
288
  */
253
- export function siteSymmetry(operations, direction, options) {
289
+ export function siteSymmetryOf(operations, direction, options) {
254
290
  checkUnitary(operations);
255
- // The shared function reads the matrices only, and it keeps the products of a list by the identity
256
- // of the list, so the list of the caller is passed on as it is.
257
- return site.siteSymmetry(operations, direction, options);
291
+ // The shared function reads the matrices only, so the list of the caller is passed on as it is.
292
+ return site.siteSymmetryOf(operations, direction, options);
293
+ }
294
+ /**
295
+ * The site symmetry of a direction (any non-zero Cartesian vector) under a crystal class in a
296
+ * setting: `siteSymmetryOf` applied to `operations(key, options)`, so the indices refer to those
297
+ * operations (#137 C1). Throws a RangeError as `siteSymmetryOf` does.
298
+ */
299
+ export function siteSymmetry(key, direction, options) {
300
+ return wyckoff.siteSymmetry(classKey(key), direction, options);
258
301
  }
259
302
  /**
260
303
  * The Wyckoff positions of a crystal class for directions, as ITA tabulates them (general position
261
- * first), in the ITC convention only (docs/conventions.md, "Site symmetry and Wyckoff positions").
304
+ * first) (docs/conventions.md, "Site symmetry and Wyckoff positions").
262
305
  */
263
306
  export function wyckoffPositions(key, options) {
264
307
  return wyckoff.wyckoffPositions(classKey(key), options);
@@ -266,16 +309,16 @@ export function wyckoffPositions(key, options) {
266
309
  /**
267
310
  * The Wyckoff position of a direction (Cartesian) in a crystal class: the position whose site
268
311
  * symmetry is conjugate to that of the direction (ITA's definition). `tolerance` as for
269
- * `siteSymmetry`.
312
+ * `siteSymmetryOf`.
270
313
  */
271
- export function wyckoffPositionOf(key, direction, options) {
272
- return wyckoff.wyckoffPositionOf(classKey(key), direction, options);
314
+ export function wyckoffPosition(key, direction, options) {
315
+ return wyckoff.wyckoffPosition(classKey(key), direction, options);
273
316
  }
274
317
  // --- lattice basis and orbits ---------------------------------------------------------------------
275
318
  /**
276
319
  * The operations of a list that keep the metric of a cell: W with WᵀGW = G, G the metric tensor
277
- * of `basis`. The operations are integer matrices on lattice coordinates, as `latticeOperations`
278
- * gives them; the list is taken as it is and the kept operations are the ones of the list, in its
320
+ * of `basis`. The operations are read by `matrix`, the integer matrix W on lattice coordinates, as
321
+ * `operations` gives them; the list is taken as it is and the kept operations are the ones of the list, in its
279
322
  * order. The deviation counts relative to the largest entry of G (`tolerance`, default
280
323
  * `EPSILON`). An operation combined with time reversal belongs to the magnetic API.
281
324
  */
@@ -283,20 +326,6 @@ export function residualOperations(operations, basis, options) {
283
326
  checkUnitary(operations);
284
327
  return cell.residualOperations(operations, basis, options);
285
328
  }
286
- /**
287
- * The operations of the crystal class in the conventional lattice basis (a, b, c; for the trigonal
288
- * classes the hexagonal axes), in the order of `operations` for the same setting and convention:
289
- * integer matrices W acting on the coordinates of a lattice direction [uvw], W = B⁻¹·R·B with the
290
- * basis B of `latticeBasis` and the Cartesian matrix R of `operations`. They do not depend on the
291
- * cell angles, so they exist for every family; for the monoclinic and triclinic families a, b, c
292
- * are taken along x, y, z, as for the Wyckoff positions. In the ITC convention they are the
293
- * matrices of ITA's general position (6th ed., Table 3.2.3.2). Not orthogonal in general: pass
294
- * them to no function that takes Cartesian operations (docs/conventions.md, "Lattice basis and
295
- * orbits").
296
- */
297
- export function latticeOperations(key, options) {
298
- return matricesOnly(orbits.latticeOperations(classKey(key), options));
299
- }
300
329
  export function orbit(key, indices, options) {
301
330
  return orbits.orbit(classKey(key), indices, options);
302
331
  }
@@ -304,9 +333,9 @@ export function orbit(key, indices, options) {
304
333
  * The orbit of a direction (any non-zero vector, Cartesian, e.g. a face normal) under a list of
305
334
  * operations, for instance those of a distorted crystal: the images of its unit vector under each
306
335
  * operation, coinciding images merged (closer than `tolerance`, default `EPSILON`, as for
307
- * `siteSymmetry`), in the order in which the operations reach them, each with the indices of the
336
+ * `siteSymmetryOf`), in the order in which the operations reach them, each with the indices of the
308
337
  * operations that map the direction there. The list is taken as it is, not closed into a group.
309
- * Throws a RangeError for a zero vector and for a matrix that is not orthogonal (within
338
+ * Throws a RangeError for a zero vector and for an operation without an orthogonal Cartesian matrix (`cartesian`; within
310
339
  * `tolerance`, at least `EPSILON`).
311
340
  */
312
341
  export function orbitOf(operations, direction, options) {
@@ -324,19 +353,16 @@ export const CRYSTAL_FORM_TYPES = forms.CRYSTAL_FORM_TYPES;
324
353
  /**
325
354
  * The crystal forms of a crystal class, as ITA 6th ed. Table 3.2.3.2 prints them: for each Wyckoff
326
355
  * position (general position first) its basic form (two for the cubic faces (hhl) of -43m and
327
- * m-3m), then its limiting forms. In the ITC convention
328
- * only, like the Wyckoff positions (docs/conventions.md, "Crystal forms").
356
+ * m-3m), then its limiting forms (docs/conventions.md, "Crystal forms").
329
357
  */
330
358
  export function crystalForms(key, options) {
331
359
  return forms.crystalForms(classKey(key), options);
332
360
  }
333
361
  // --- tensors ---------------------------------------------------------------------------------------
334
362
  /**
335
- * The form of a tensor under a crystal class in the requested setting (default: the default
336
- * setting of the convention, `'itc'` unless given). The tensor is given by its specification or by
337
- * the name of a property in `TENSOR_PROPERTIES` (`'piezoelectric'`). The convention matters only
338
- * through the setting: the same setting index gives the same form in both conventions
339
- * (docs/conventions.md, "Tensors").
363
+ * The form of a tensor under a crystal class in the requested setting (default: the ITC default
364
+ * setting). The tensor is given by its specification or by the name of a property in
365
+ * `TENSOR_PROPERTIES` (`'piezoelectric'`; docs/conventions.md, "Tensors").
340
366
  */
341
367
  export function tensorForm(key, spec, options) {
342
368
  return tensors.tensorForm(classKey(key), timeEven(spec), options);
@@ -344,28 +370,33 @@ export function tensorForm(key, spec, options) {
344
370
  /**
345
371
  * The form of a tensor under the group generated by `operations`, e.g. the site symmetry of a
346
372
  * surface normal (`siteSymmetry`) or the operations of a distorted crystal. The tensor is given by
347
- * its specification or by the name of a property in `TENSOR_PROPERTIES`. The operations are
348
- * Cartesian and orthogonal; a list that is not closed is closed first. Throws a RangeError for a
349
- * matrix that is not orthogonal.
373
+ * its specification or by the name of a property in `TENSOR_PROPERTIES`. Each operation is read by
374
+ * its Cartesian matrix (`cartesian`), which must be orthogonal. The list is closed into a group
375
+ * within the tolerance, and that group is made exact before the form is computed, so that matrices
376
+ * with rounding errors (e.g. rounded to 6 decimals) give the form of the exact group, with its
377
+ * number of free parameters (docs/conventions.md, "Tolerances"). Throws a RangeError for an
378
+ * operation without an orthogonal Cartesian matrix (`cartesian`; within the tolerance) and for
379
+ * operations that generate no finite group within the tolerance.
350
380
  */
351
- export function tensorFormOf(operations, spec) {
352
- return tensors.tensorFormOf(unitary(operations), timeEven(spec));
381
+ export function tensorFormOf(operations, spec, options) {
382
+ return tensors.tensorFormOf(unitary(operations), timeEven(spec), options);
353
383
  }
354
384
  /**
355
- * The components of `tensor` (length 3^rank, flat index) in a frame rotated by the orthogonal
385
+ * The tensor `tensor` in a frame rotated by the orthogonal
356
386
  * matrix `rotation`: t′_{i…} = f·Σ R_{ia}…R_{…}·t_{a…}, with f = det(R) for an axial tensor and 1
357
387
  * for a polar one. To express a tensor in the frame of a surface, pass the matrix whose rows are
358
388
  * the new axes in the old frame. The kind of tensor is given by its specification or by the name
359
- * of a property in `TENSOR_PROPERTIES`.
389
+ * of a property in `TENSOR_PROPERTIES`. Throws a RangeError for a rotation that is not orthogonal
390
+ * within the tolerance (per matrix entry of RᵀR).
360
391
  */
361
- export function rotateTensor(tensor, rotation, specOrName) {
362
- return tensors.rotateTensor(tensor, rotation, timeEven(specOrName));
392
+ export function rotateTensor(tensor, rotation, spec, options) {
393
+ return tensors.rotateTensor(tensor, rotation, timeEven(spec), options);
363
394
  }
364
395
  /**
365
396
  * True if the crystal class allows the named property, e.g. `allowsProperty('-6m2',
366
397
  * 'piezoelectric')`: the tensor that describes it (`TENSOR_PROPERTIES`) has a non-zero form under
367
398
  * the class. Symmetry only allows a property; whether a crystal shows it is a question of the
368
- * material. It does not depend on setting or convention. Throws a RangeError for an unknown key or
399
+ * material. It does not depend on the setting. Throws a RangeError for an unknown key or
369
400
  * name.
370
401
  */
371
402
  export function allowsProperty(key, name) {
@@ -373,19 +404,27 @@ export function allowsProperty(key, name) {
373
404
  }
374
405
  /** The named properties the crystal class allows, in the order of `TENSOR_PROPERTIES`. */
375
406
  export function allowedProperties(key) {
376
- return TENSOR_PROPERTY_NAMES.filter((name) => allowsProperty(key, name));
407
+ return deepFreeze(TENSOR_PROPERTY_NAMES.filter((name) => allowsProperty(key, name)));
377
408
  }
378
409
  /**
379
410
  * True if the group generated by `operations` allows the named property, e.g. for the site
380
- * symmetry of a surface normal or the operations of a distorted crystal. The matrices must be
381
- * Cartesian and orthogonal; a list that is not closed is closed first. Throws a RangeError for a matrix that is not orthogonal.
411
+ * symmetry of a surface normal or the operations of a distorted crystal. The operations are read
412
+ * and closed as `tensorFormOf` reads them, within the tolerance, and it throws a RangeError as
413
+ * `tensorFormOf` does.
382
414
  */
383
- export function allowsPropertyOf(operations, name) {
384
- return tensors.tensorFormOf(unitary(operations), propertyName(name)).basis.length > 0;
385
- }
386
- /** The named properties the group generated by `operations` allows. Checks the operations as `allowsPropertyOf`. */
387
- export function allowedPropertiesOf(operations) {
388
- const ops = unitary(operations);
389
- return TENSOR_PROPERTY_NAMES.filter((name) => tensors.tensorFormOf(ops, name).basis.length > 0);
415
+ export function allowsPropertyOf(operations, name, options) {
416
+ checkOptions(options, TOLERANCE_KEYS, 'allowsPropertyOf');
417
+ const checked = propertyName(name);
418
+ const { spec, perms } = tensors.checkedSpec(checked);
419
+ return tensors.formOfGroup(tensors.callerGroup(unitary(operations), options), spec, perms).basis.length > 0;
420
+ }
421
+ /** The named properties the group generated by `operations` allows. Reads the operations as `allowsPropertyOf`. */
422
+ export function allowedPropertiesOf(operations, options) {
423
+ checkOptions(options, TOLERANCE_KEYS, 'allowedPropertiesOf');
424
+ const group = tensors.callerGroup(unitary(operations), options);
425
+ return deepFreeze(TENSOR_PROPERTY_NAMES.filter((name) => {
426
+ const { spec, perms } = tensors.checkedSpec(name);
427
+ return tensors.formOfGroup(group, spec, perms).basis.length > 0;
428
+ }));
390
429
  }
391
430
  //# sourceMappingURL=crystalClasses.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"crystalClasses.js","sourceRoot":"","sources":["../src/crystalClasses.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAKH,OAAO,KAAK,QAAQ,MAAM,2BAA2B,CAAC;AACtD,OAAO,KAAK,MAAM,MAAM,8BAA8B,CAAC;AAEvD,OAAO,KAAK,UAAU,MAAM,6BAA6B,CAAC;AAC1D,OAAO,KAAK,KAAK,MAAM,+BAA+B,CAAC;AACvD,OAAO,KAAK,QAAQ,MAAM,2BAA2B,CAAC;AACtD,OAAO,KAAK,MAAM,MAAM,yBAAyB,CAAC;AAClD,OAAO,KAAK,OAAO,MAAM,0BAA0B,CAAC;AAEpD,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,KAAK,IAAI,MAAM,mBAAmB,CAAC;AAE1C,OAAO,EAAE,iBAAiB,IAAI,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAExF,OAAO,KAAK,OAAO,MAAM,yBAAyB,CAAC;AAGnD,MAAM,YAAY,GAChB,sHAAsH,CAAC;AAkFzH;;;;GAIG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,MAAM,CAAC,MAAM,CAC5C,MAAM,CAAC,WAAW,CAChB,MAAM,CAAC,OAAO,CAAC,qBAAqB,CA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 /**
2
+ * Freezing of results: every result of the API is frozen, nested arrays and objects included
3
+ * (#137 C4), so that a caller who wants to change one copies it. Internal.
4
+ */
5
+ /** `value`, frozen with everything it holds (plain arrays and objects). */
6
+ export declare function deepFreeze<T>(value: T): T;
7
+ //# sourceMappingURL=freeze.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"freeze.d.ts","sourceRoot":"","sources":["../src/freeze.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,2EAA2E;AAC3E,wBAAgB,UAAU,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,CAOzC"}
package/dist/freeze.js ADDED
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Freezing of results: every result of the API is frozen, nested arrays and objects included
3
+ * (#137 C4), so that a caller who wants to change one copies it. Internal.
4
+ */
5
+ /** `value`, frozen with everything it holds (plain arrays and objects). */
6
+ export function deepFreeze(value) {
7
+ if (value !== null && typeof value === 'object') {
8
+ // Also into a container that is frozen already: its children need not be.
9
+ for (const v of Object.values(value))
10
+ deepFreeze(v);
11
+ Object.freeze(value);
12
+ }
13
+ return value;
14
+ }
15
+ //# sourceMappingURL=freeze.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"freeze.js","sourceRoot":"","sources":["../src/freeze.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,2EAA2E;AAC3E,MAAM,UAAU,UAAU,CAAI,KAAQ;IACpC,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAChD,0EAA0E;QAC1E,KAAK,MAAM,CAAC,IAAI,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC;YAAE,UAAU,CAAC,CAAC,CAAC,CAAC;QACpD,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACvB,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}