symcrys 0.0.0-stage → 0.0.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Thomas Lottermoser
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,94 @@
1
- # Temporary Holding Version
1
+ # symcrys
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Crystallographic symmetry calculations in TypeScript: point groups, both crystallographic and
4
+ magnetic, with their settings, symbols and properties, and the property tensors they allow. A
5
+ library without runtime dependencies that runs unbundled in browsers and in Node.
6
+
7
+ > **Status: pre-release.** The repository holds the scaffold only; the only export is `VERSION`.
8
+ > The API will change without notice until 1.0.0.
9
+
10
+ ## Scope
11
+
12
+ symcrys holds calculations, not presentation. Planned, in this order:
13
+
14
+ 1. Point groups: the 32 crystallographic and the 122 magnetic point groups as data (generators),
15
+ group generation, settings, Hermann–Mauguin, Schoenflies and Shubnikov symbols, derived
16
+ properties (centrosymmetric, polar, chiral, magnetoelectric …), subgroups.
17
+ 2. Plane groups.
18
+ 3. Space groups.
19
+
20
+ The tensor calculations of birss-app (tensor forms, projections) move here as well; their place in
21
+ this order is not yet fixed. Rendering (LaTeX, SVG, view models) and translated
22
+ display names stay in the applications that use symcrys.
23
+
24
+ **Conventions.** Point groups follow the _International Tables for Crystallography_ by default
25
+ (Vol. A for the crystal classes, Vol. D Ch. 1.5 for the magnetic point groups). The convention of
26
+ Birss, _Symmetry and Magnetism_ (1966), is available as an option. Where the two differ is
27
+ documented in `docs/` as the point groups arrive.
28
+
29
+ symcrys is the computational core of the crystallography teaching apps
30
+ ([stereography](https://github.com/manganite/stereography),
31
+ [plane-groups](https://github.com/manganite/plane-groups)) and of
32
+ [birss-app](https://github.com/manganite/birss-app); its calculations start from those of
33
+ birss-app.
34
+
35
+ ## Use
36
+
37
+ Not yet on npm. Each release on GitHub carries the package as `symcrys-X.Y.Z.tgz`:
38
+
39
+ ```bash
40
+ npm install https://github.com/manganite/symcrys/releases/download/vX.Y.Z/symcrys-X.Y.Z.tgz
41
+ ```
42
+
43
+ ```ts
44
+ import { VERSION } from 'symcrys';
45
+ ```
46
+
47
+ Without a build step, copy `dist/` (from the tarball, or built with `npm run build`) next to your
48
+ code and import `dist/index.js` directly: every module in `dist/` imports only relative `.js`
49
+ paths.
50
+
51
+ ## Development
52
+
53
+ Development requires Node 22 (22.13 or later) or 24; CI runs on both. The library itself needs only
54
+ an ES2022 runtime with ES modules.
55
+
56
+ ```bash
57
+ npm install
58
+ npm run typecheck # TypeScript 6: tests and scripts with Node types, library code without
59
+ npm run typecheck:ts7 # the same with TypeScript 7
60
+ npm run lint # ESLint
61
+ npm run format:check # Prettier (npm run format fixes)
62
+ npm test # vitest
63
+ npm run build # dist/: JavaScript, .d.ts, source maps
64
+ npm run check:dist # dist/ loads, imports only relative .js paths, has no test-only code
65
+ ```
66
+
67
+ Audits under `audit/` compare the code bases symcrys draws on. They are run by hand, with
68
+ [birss-app](https://github.com/manganite/birss-app) and
69
+ [stereography](https://github.com/manganite/stereography) checked out next to this repository:
70
+ `npm run audit:point-groups` writes `audit/point-groups/report.md`.
71
+
72
+ CI runs these seven gates on every pull request, on Node 22 and 24. Tests sit next to their
73
+ module (`foo.ts`, `foo.test.ts`). Working rules for contributors, human or agent: `CLAUDE.md`.
74
+
75
+ ## Releases
76
+
77
+ 1. Release PR: version in `package.json`, `package-lock.json` (`npm install --package-lock-only`)
78
+ and `src/version.ts`; move the `Unreleased` entries of `CHANGELOG.md` under
79
+ `## [X.Y.Z] - YYYY-MM-DD` and update the link definitions at the bottom (`[Unreleased]` compares
80
+ `vX.Y.Z...HEAD`, `[X.Y.Z]` points to the release).
81
+ 2. After the merge, on the merge commit of the release PR:
82
+ `git tag -a vX.Y.Z -m "symcrys X.Y.Z" && git push origin vX.Y.Z`.
83
+ 3. The tag runs `.github/workflows/release.yml`: it checks that the tag matches `package.json`,
84
+ runs all gates, and creates the GitHub release with the `CHANGELOG.md` section as notes and the
85
+ `npm pack` tarball attached.
86
+
87
+ **npm** (not yet set up). The first version is published by hand from a clean checkout of the
88
+ tag: `npm login` (account with two-factor authentication), then `npm publish`. After that,
89
+ "Trusted Publishing" for `manganite/symcrys` and `release.yml` can be configured on npmjs.com, so
90
+ that later tags publish without a token.
91
+
92
+ ## Licence
93
+
94
+ [MIT](LICENSE) © 2026 Thomas Lottermoser
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Public API of symcrys. Everything exported here is covered by SemVer (see CLAUDE.md);
3
+ * everything else is internal.
4
+ */
5
+ export { VERSION } from './version.js';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Public API of symcrys. Everything exported here is covered by SemVer (see CLAUDE.md);
3
+ * everything else is internal.
4
+ */
5
+ export { VERSION } from './version.js';
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC"}
@@ -0,0 +1,3 @@
1
+ /** Version of symcrys. Kept equal to `version` in package.json (checked by version.test.ts). */
2
+ export declare const VERSION = "0.0.0";
3
+ //# sourceMappingURL=version.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA,gGAAgG;AAChG,eAAO,MAAM,OAAO,UAAU,CAAC"}
@@ -0,0 +1,3 @@
1
+ /** Version of symcrys. Kept equal to `version` in package.json (checked by version.test.ts). */
2
+ export const VERSION = '0.0.0';
3
+ //# sourceMappingURL=version.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA,gGAAgG;AAChG,MAAM,CAAC,MAAM,OAAO,GAAG,OAAO,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,63 @@
1
1
  {
2
2
  "name": "symcrys",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.0.0",
4
+ "description": "Crystallographic symmetry calculations: point groups (crystallographic and magnetic), their settings, symbols and properties, and property tensors. TypeScript library without dependencies.",
5
+ "keywords": [
6
+ "crystallography",
7
+ "symmetry",
8
+ "point-groups",
9
+ "magnetic-point-groups",
10
+ "tensors"
11
+ ],
12
+ "author": "Thomas Lottermoser",
13
+ "license": "MIT",
14
+ "repository": {
15
+ "type": "git",
16
+ "url": "git+https://github.com/manganite/symcrys.git"
17
+ },
18
+ "bugs": "https://github.com/manganite/symcrys/issues",
19
+ "homepage": "https://github.com/manganite/symcrys#readme",
20
+ "type": "module",
21
+ "exports": {
22
+ ".": {
23
+ "types": "./dist/index.d.ts",
24
+ "default": "./dist/index.js"
25
+ },
26
+ "./package.json": "./package.json"
27
+ },
28
+ "main": "./dist/index.js",
29
+ "types": "./dist/index.d.ts",
30
+ "files": [
31
+ "dist",
32
+ "src",
33
+ "!src/**/*.test.ts",
34
+ "!src/**/*.fixtures.ts",
35
+ "!src/**/testUtils/**"
36
+ ],
37
+ "sideEffects": false,
38
+ "scripts": {
39
+ "typecheck": "node node_modules/typescript/bin/tsc -p tsconfig.json && node node_modules/typescript/bin/tsc -p tsconfig.build.json --noEmit",
40
+ "typecheck:ts7": "node node_modules/typescript7/bin/tsc -p tsconfig.json && node node_modules/typescript7/bin/tsc -p tsconfig.build.json --noEmit",
41
+ "lint": "eslint .",
42
+ "format": "prettier --write .",
43
+ "format:check": "prettier --check .",
44
+ "test": "vitest run",
45
+ "test:watch": "vitest",
46
+ "prebuild": "node -e \"require('node:fs').rmSync('dist', { recursive: true, force: true })\"",
47
+ "build": "node node_modules/typescript/bin/tsc -p tsconfig.build.json",
48
+ "check:dist": "node scripts/check-dist.mjs",
49
+ "prepack": "npm run build",
50
+ "audit:point-groups": "vitest run --config audit/point-groups/vitest.config.ts"
51
+ },
52
+ "devDependencies": {
53
+ "@eslint/js": "^9.39.5",
54
+ "@types/node": "22.20.5",
55
+ "eslint": "^9.39.5",
56
+ "globals": "17.14.0",
57
+ "prettier": "3.9.10",
58
+ "typescript": "6.0.3",
59
+ "typescript-eslint": "^8.36.0",
60
+ "typescript7": "npm:typescript@7.0.2",
61
+ "vitest": "5.1.0"
62
+ }
63
+ }
package/src/index.ts ADDED
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Public API of symcrys. Everything exported here is covered by SemVer (see CLAUDE.md);
3
+ * everything else is internal.
4
+ */
5
+ export { VERSION } from './version.js';
package/src/version.ts ADDED
@@ -0,0 +1,2 @@
1
+ /** Version of symcrys. Kept equal to `version` in package.json (checked by version.test.ts). */
2
+ export const VERSION = '0.0.0';