@morphemeris/armilla-core 0.1.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 (54) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +75 -0
  3. package/dist/armilla.d.ts +41 -0
  4. package/dist/armilla.js +98 -0
  5. package/dist/armilla.test.d.ts +1 -0
  6. package/dist/armilla.test.js +160 -0
  7. package/dist/basemap.generated.d.ts +8 -0
  8. package/dist/basemap.generated.js +9 -0
  9. package/dist/basemap.test.d.ts +1 -0
  10. package/dist/basemap.test.js +21 -0
  11. package/dist/index.d.ts +11 -0
  12. package/dist/index.js +11 -0
  13. package/dist/index.test.d.ts +1 -0
  14. package/dist/index.test.js +14 -0
  15. package/dist/index.web.d.ts +3 -0
  16. package/dist/index.web.js +24 -0
  17. package/dist/runtime.d.ts +13 -0
  18. package/dist/runtime.js +20 -0
  19. package/dist/surface.d.ts +10 -0
  20. package/dist/surface.js +9 -0
  21. package/dist/types.d.ts +55 -0
  22. package/dist/types.generated.d.ts +1274 -0
  23. package/dist/types.generated.js +4 -0
  24. package/dist/types.js +24 -0
  25. package/dist/vocabulary.generated.d.ts +8 -0
  26. package/dist/vocabulary.generated.js +9 -0
  27. package/dist/vocabulary.test.d.ts +1 -0
  28. package/dist/vocabulary.test.js +36 -0
  29. package/dist/wasm-types.d.ts +19 -0
  30. package/dist/wasm-types.js +1 -0
  31. package/dist/wasm.d.ts +2 -0
  32. package/dist/wasm.js +16 -0
  33. package/dist/web.test.d.ts +1 -0
  34. package/dist/web.test.js +34 -0
  35. package/dist/workspace.test.d.ts +1 -0
  36. package/dist/workspace.test.js +43 -0
  37. package/docs/changelog.md +37 -0
  38. package/docs/coordinates.md +52 -0
  39. package/docs/themes.md +111 -0
  40. package/docs/vocabulary.json +1501 -0
  41. package/docs/vocabulary.md +86 -0
  42. package/package.json +73 -0
  43. package/wasm/README.md +21 -0
  44. package/wasm/armilla_wasm.d.ts +104 -0
  45. package/wasm/armilla_wasm.js +497 -0
  46. package/wasm/armilla_wasm_bg.wasm +0 -0
  47. package/wasm/armilla_wasm_bg.wasm.d.ts +21 -0
  48. package/wasm/package.json +23 -0
  49. package/wasm-web/README.md +21 -0
  50. package/wasm-web/armilla_wasm.d.ts +150 -0
  51. package/wasm-web/armilla_wasm.js +583 -0
  52. package/wasm-web/armilla_wasm_bg.wasm +0 -0
  53. package/wasm-web/armilla_wasm_bg.wasm.d.ts +21 -0
  54. package/wasm-web/package.json +27 -0
@@ -0,0 +1,86 @@
1
+ # Tag vocabulary
2
+
3
+ Generated from the code by `UPDATE_DOCS=1 cargo test -p armilla-core --test docs`;
4
+ do not edit by hand. Spec §7 defines the model; §9.1 the predicate language.
5
+
6
+ Every mark carries `key=value` tags. A predicate naming a key outside this
7
+ table fails validation. Open-valued keys accept any identifier (`[a-z0-9_]+`).
8
+
9
+ ## Tag keys
10
+
11
+ | key | values | carried by |
12
+ | --- | --- | --- |
13
+ | `role` | any §7.2 role | every role |
14
+ | `chart` | open (identifier) | cusp\_line, cusp\_label, angle\_line, quadrant\_sector, angle\_label, body\_glyph, motion\_mark, position\_label, sign\_label, pointer, relation\_line, relation\_glyph, orb\_label, pattern\_fill, event\_bar, event\_exact, event\_station, event\_glyph, event\_label, divider, edge, table\_row, period\_block, period\_glyph, period\_label, ref\_line, acg\_line, acg\_glyph, acg\_label, legend |
15
+ | `body` | open (identifier) | division\_sector, division\_glyph, division\_label, tick, tick\_label, body\_glyph, motion\_mark, position\_label, sign\_label, pointer, relation\_line, relation\_glyph, orb\_label, pattern\_fill, event\_bar, event\_exact, event\_station, event\_glyph, event\_label, divider, edge, table\_row, almanac\_glyph, almanac\_label, almanac\_bar, period\_block, period\_glyph, period\_label, curve, curve\_fill, curve\_marker, ref\_line, acg\_line, acg\_glyph, acg\_label, legend |
16
+ | `class` | open (identifier) | body\_glyph, motion\_mark, position\_label, sign\_label, pointer, divider, table\_row, curve, curve\_fill, curve\_marker, ref\_line, acg\_line, acg\_glyph, acg\_label, legend |
17
+ | `sign` | aries, taurus, gemini, cancer, leo, virgo, libra, scorpio, sagittarius, capricorn, aquarius, pisces | division\_sector, division\_glyph, division\_label, tick, tick\_label, cusp\_line, cusp\_label, angle\_line, quadrant\_sector, angle\_label, body\_glyph, motion\_mark, position\_label, sign\_label, pointer, divider, edge, table\_row, almanac\_glyph, almanac\_label, almanac\_bar, period\_block, period\_glyph, period\_label, ref\_line |
18
+ | `element` | fire, earth, air, water | division\_sector, division\_glyph, division\_label, tick, tick\_label, body\_glyph, motion\_mark, position\_label, sign\_label, pointer, divider, table\_row, ref\_line |
19
+ | `modality` | cardinal, fixed, mutable | division\_sector, division\_glyph, division\_label, tick, tick\_label, body\_glyph, motion\_mark, position\_label, sign\_label, pointer, divider, table\_row, ref\_line |
20
+ | `house` | 1–12 | cusp\_line, cusp\_label, angle\_line, quadrant\_sector, angle\_label, body\_glyph, motion\_mark, position\_label, sign\_label, pointer, divider, table\_row, period\_block, period\_glyph, period\_label, ref\_line, acg\_line, acg\_glyph, acg\_label |
21
+ | `hemisphere` | north, south, eastern, western | body\_glyph, motion\_mark, position\_label, sign\_label, pointer, divider, table\_row, ref\_line |
22
+ | `motion` | retrograde, direct, stationary | body\_glyph, motion\_mark, position\_label, sign\_label, pointer, event\_bar, event\_station, divider, table\_row, almanac\_glyph, almanac\_label, almanac\_bar, ref\_line |
23
+ | `bounds` | in, out | division\_sector, division\_glyph, division\_label, tick, tick\_label, body\_glyph, motion\_mark, position\_label, sign\_label, pointer, divider, table\_row, ref\_line |
24
+ | `dignity` | open (identifier) | body\_glyph, motion\_mark, position\_label, sign\_label, pointer, divider, table\_row, ref\_line |
25
+ | `derived` | midpoint, lot, antiscion, contra\_antiscion | body\_glyph, motion\_mark, position\_label, sign\_label, pointer, divider, table\_row, ref\_line |
26
+ | `frame` | longitude, declination, separation, index, orb | frame\_box, relation\_line, relation\_glyph, orb\_label, event\_bar, event\_exact, event\_station, event\_glyph, event\_label, table\_row |
27
+ | `aspect` | conjunction, opposition, trine, square, sextile, semi\_sextile, quincunx, semi\_square, sesquiquadrate, quintile, bi\_quintile, septile, bi\_septile, tri\_septile, quindecile, parallel, contraparallel | relation\_line, relation\_glyph, orb\_label, event\_bar, event\_exact, event\_station, event\_glyph, event\_label, table\_row |
28
+ | `harmonic` | 1–12 | relation\_line, relation\_glyph, orb\_label, event\_bar, event\_exact, event\_station, event\_glyph, event\_label, table\_row |
29
+ | `aspect_class` | hard, soft, adjusting, creative, major, minor | relation\_line, relation\_glyph, orb\_label, event\_bar, event\_exact, event\_station, event\_glyph, event\_label, table\_row |
30
+ | `phase` | applying, separating | relation\_line, relation\_glyph, orb\_label, event\_bar, event\_exact, event\_station, table\_row |
31
+ | `exact` | true, false | relation\_line, relation\_glyph, orb\_label, event\_bar, event\_exact, event\_station, table\_row |
32
+ | `from` | open (identifier) | relation\_line, relation\_glyph, orb\_label, event\_bar, event\_exact, event\_station, event\_glyph, event\_label, edge |
33
+ | `to` | open (identifier) | relation\_line, relation\_glyph, orb\_label, event\_bar, event\_exact, event\_station, event\_glyph, event\_label, edge |
34
+ | `scope` | intra, inter, event | relation\_line, relation\_glyph, orb\_label, event\_bar, event\_exact, event\_station, event\_glyph, event\_label, table\_row |
35
+ | `angle` | asc, mc, dsc, ic | cusp\_line, cusp\_label, angle\_line, quadrant\_sector, angle\_label, table\_row, acg\_line, acg\_glyph, acg\_label |
36
+ | `pattern` | t\_square, grand\_trine, grand\_cross, yod, kite, stellium, mystic\_rectangle | pattern\_fill |
37
+ | `step` | 1, 5, 10, 30, half, quarter, day, week, month, year, decade | division\_sector, division\_glyph, division\_label, tick, tick\_label |
38
+ | `part` | name, degree, vertical, horizontal, diagonal, moving, target, enter, exact, leave, loop, curve, ref, bound, index, extreme, mirror, north, south, station, peak, bond, branch, open, current, convergent, now, group, readout, scale, lane, age, house, meridian, parallel, land, border | band\_boundary, grid\_line, division\_sector, division\_glyph, division\_label, tick, tick\_label, angle\_label, body\_glyph, motion\_mark, position\_label, sign\_label, pointer, event\_glyph, event\_label, divider, edge, period\_block, period\_glyph, period\_label, curve, curve\_fill, curve\_marker, ref\_line, basemap, indicator |
39
+ | `month` | open (identifier) | division\_sector, division\_glyph, division\_label, tick, tick\_label, title |
40
+ | `week` | open (identifier) | division\_sector, division\_glyph, division\_label, tick, tick\_label |
41
+ | `day` | open (identifier) | division\_sector, division\_glyph, division\_label, tick, tick\_label, almanac\_glyph, almanac\_label, almanac\_bar |
42
+ | `year` | open (identifier) | division\_sector, division\_glyph, division\_label, tick, tick\_label |
43
+ | `weekday` | monday, tuesday, wednesday, thursday, friday, saturday, sunday | division\_sector, division\_glyph, division\_label, tick, tick\_label, almanac\_glyph, almanac\_label, almanac\_bar |
44
+ | `almanac` | lunation, ingress, station, void | almanac\_glyph, almanac\_label, almanac\_bar |
45
+ | `lunation` | new, first\_quarter, full, last\_quarter | almanac\_glyph, almanac\_label, almanac\_bar |
46
+ | `eclipse` | solar, lunar | almanac\_glyph, almanac\_label, almanac\_bar |
47
+ | `technique` | profections, firdaria, releasing | period\_block, period\_glyph, period\_label |
48
+ | `level` | 1, 2, 3, 4 | period\_block, period\_glyph, period\_label |
49
+ | `mode` | zodiacal, mundane | acg\_line, acg\_glyph, acg\_label |
50
+ | `band` | open (identifier) | every role |
51
+ | `lane` | open (identifier) | every role |
52
+ | `medium` | screen, print, export | every role |
53
+ | `scheme` | light, dark | every role |
54
+ | `contrast` | normal, high | every role |
55
+ | `density` | normal, compact | every role |
56
+ | `kind` | wheel, dial, strip, declination, grid, tally, timeline, midpoints, dispositors, calendar, ephemeris, cycles, periods, map, table | every role |
57
+ | `modulus` | 360, 90, 45, 30, 72, 22.5 | every role |
58
+ | `id` | open (identifier) | every role |
59
+
60
+ ## Measures
61
+
62
+ Continuous per-mark quantities for `<` / `>` terms (spec §5.3, §9.1):
63
+
64
+ - `longitude`
65
+ - `speed`
66
+ - `latitude`
67
+ - `declination`
68
+ - `orb`
69
+ - `orb_ratio`
70
+ - `displacement`
71
+
72
+ ## Style properties
73
+
74
+ The rule-settable §10.5 properties a theme rule's `style` block may name:
75
+
76
+ - `stroke`
77
+ - `fill`
78
+ - `width`
79
+ - `dash`
80
+ - `opacity`
81
+ - `font_size`
82
+ - `font_weight`
83
+ - `glyph_variant`
84
+ - `decoration`
85
+ - `min_width`
86
+ - `template`
package/package.json ADDED
@@ -0,0 +1,73 @@
1
+ {
2
+ "name": "@morphemeris/armilla-core",
3
+ "version": "0.1.0",
4
+ "description": "TypeScript binding for the armilla layout core (WASM): generated types and typed wrappers, no logic.",
5
+ "type": "module",
6
+ "license": "MIT",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/morphatic/armilla.git",
10
+ "directory": "packages/core"
11
+ },
12
+ "keywords": [
13
+ "astrology",
14
+ "chart",
15
+ "horoscope",
16
+ "ephemeris",
17
+ "astrocartography",
18
+ "svg",
19
+ "wasm",
20
+ "visualization"
21
+ ],
22
+ "sideEffects": false,
23
+ "publishConfig": {
24
+ "access": "public"
25
+ },
26
+ "main": "./dist/index.js",
27
+ "types": "./dist/index.d.ts",
28
+ "exports": {
29
+ ".": {
30
+ "types": "./dist/index.d.ts",
31
+ "node": "./dist/index.js",
32
+ "default": "./dist/index.web.js"
33
+ },
34
+ "./armilla_wasm_bg.wasm": "./wasm-web/armilla_wasm_bg.wasm"
35
+ },
36
+ "files": [
37
+ "dist",
38
+ "docs",
39
+ "wasm",
40
+ "wasm-web"
41
+ ],
42
+ "scripts": {
43
+ "build": "tsc",
44
+ "typecheck": "tsc --noEmit",
45
+ "lint": "eslint .",
46
+ "lint:fix": "eslint . --fix",
47
+ "format": "prettier --write .",
48
+ "format:check": "prettier --check .",
49
+ "test:unit": "vitest run --exclude dist",
50
+ "test:bdd": "node --import tsx ./node_modules/@cucumber/cucumber/bin/cucumber.js",
51
+ "test": "pnpm test:unit && pnpm test:bdd",
52
+ "bench": "node --import tsx bench/perf.ts",
53
+ "build:wasm": "node scripts/build-wasm.mjs nodejs",
54
+ "build:wasm:web": "node scripts/build-wasm.mjs web",
55
+ "build:wasm:all": "node scripts/build-wasm.mjs all"
56
+ },
57
+ "devDependencies": {
58
+ "@cucumber/cucumber": "^13.2.1",
59
+ "@eslint/js": "^10.0.1",
60
+ "@tsconfig/node-lts": "^24.0.1",
61
+ "@tsconfig/strictest": "^2.0.8",
62
+ "@types/node": "^26.2.0",
63
+ "eslint": "^10.9.0",
64
+ "eslint-config-prettier": "^10.1.8",
65
+ "eslint-import-resolver-typescript": "^4.4.5",
66
+ "eslint-plugin-import-x": "^4.17.1",
67
+ "tsx": "^4.23.12",
68
+ "typescript": "^6.0.3",
69
+ "typescript-eslint": "^8.67.0",
70
+ "vitest": "^4.1.11",
71
+ "wasm-pack": "^0.15.0"
72
+ }
73
+ }
package/wasm/README.md ADDED
@@ -0,0 +1,21 @@
1
+ # armilla
2
+
3
+ Astrological chart visualization: layout core, themes, glyph packs, and a chart designer.
4
+
5
+ Part of the swephrs / astrologica / morphemeris / astrologyjs / heliotrek family.
6
+
7
+ **Provisional name.** `armilla` is Latin for *ring* and the root of *armillary sphere*. The
8
+ alternate candidate is `volvelle`, the historical term for a rotating paper astronomical disc.
9
+ Not settled.
10
+
11
+ ## Status: pre-spec
12
+
13
+ There is no implementation and no chosen language. The current phase is research.
14
+
15
+ - [`plinth/planning/open-decisions.md`](plinth/planning/open-decisions.md) — the scope split and the
16
+ eight open decisions, four of which block spec work.
17
+ - [`plinth/research/prior-art-survey.md`](plinth/research/prior-art-survey.md) — round 1 of the prior
18
+ art survey.
19
+
20
+ The NLSpec files in `plinth/specs/` are empty templates and stay that way until the blocking
21
+ decisions close.
@@ -0,0 +1,104 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+
4
+ /**
5
+ * Encode a view state as a URL-safe bookmark string (spec §11.5).
6
+ *
7
+ * # Errors
8
+ *
9
+ * The §15 `Error` record as a JSON string when the view state is invalid.
10
+ */
11
+ export function bookmark(view_state: string): string;
12
+
13
+ /**
14
+ * The compiled-in default theme as JSON (spec §10.2).
15
+ */
16
+ export function default_theme(): string;
17
+
18
+ /**
19
+ * Report which rule set a resolved property (spec §13.4).
20
+ *
21
+ * # Errors
22
+ *
23
+ * The §15 `Error` record as a JSON string.
24
+ */
25
+ export function explain(scene: string, theme_chain: string, mark_id: string, property: string): string;
26
+
27
+ /**
28
+ * Lay out a chart input under a theme chain, view state, environment, and
29
+ * panel options; returns the scene as JSON (spec §13.5 `layout`).
30
+ *
31
+ * # Errors
32
+ *
33
+ * The §15 `Error` record as a JSON string.
34
+ */
35
+ export function layout(chart_input: string, theme_chain: string, view_state: string, environment: string, options: string): string;
36
+
37
+ /**
38
+ * Lint a theme chain; returns the findings as a JSON array (spec §10.7).
39
+ *
40
+ * # Errors
41
+ *
42
+ * The §15 `Error` record as a JSON string when the chain does not parse.
43
+ */
44
+ export function lint(theme_chain: string): string;
45
+
46
+ /**
47
+ * Build the map panels' line model (spec §12.2).
48
+ *
49
+ * # Errors
50
+ *
51
+ * The §15 `Error` record as a JSON string.
52
+ */
53
+ export function map_lines(chart_input: string, view_state: string, environment: string): string;
54
+
55
+ /**
56
+ * Migrate a document forward to the current schema version (spec §4.2).
57
+ *
58
+ * # Errors
59
+ *
60
+ * The §15 `Error` record as a JSON string.
61
+ */
62
+ export function migrate(kind: string, doc: string): string;
63
+
64
+ /**
65
+ * Paint a scene as an SVG document string (spec §14).
66
+ *
67
+ * # Errors
68
+ *
69
+ * The §15 `Error` record as a JSON string.
70
+ */
71
+ export function paint_svg(scene: string, pack_manifests: string): string;
72
+
73
+ /**
74
+ * Build a table panel's row model (spec §12.1).
75
+ *
76
+ * # Errors
77
+ *
78
+ * The §15 `Error` record as a JSON string.
79
+ */
80
+ export function table_rows(chart_input: string, view_state: string, environment: string, options: string): string;
81
+
82
+ /**
83
+ * Decode a bookmark back into a view state as JSON (spec §11.5).
84
+ *
85
+ * # Errors
86
+ *
87
+ * The §15 `Error` record as a JSON string.
88
+ */
89
+ export function unbookmark(s: string): string;
90
+
91
+ /**
92
+ * Parse and validate a workspace document, returning it normalized
93
+ * (spec §12): hosts consume workspaces; the core only checks them.
94
+ *
95
+ * # Errors
96
+ *
97
+ * The §15 `Error` record as a JSON string.
98
+ */
99
+ export function validate_workspace(workspace: string): string;
100
+
101
+ /**
102
+ * The core version, for provenance and binding checks.
103
+ */
104
+ export function version(): string;