@yuzuwoeser/astr3 0.0.0-stage → 0.1.1
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/AGENTS.md +105 -0
- package/CHANGELOG.md +108 -0
- package/CONTRIBUTING.md +104 -0
- package/LICENSE +21 -0
- package/NOTICE +38 -0
- package/README.md +165 -2
- package/SECURITY.md +32 -0
- package/chart-template.schema.json +440 -0
- package/dist/body-visibility.d.ts +3 -0
- package/dist/body-visibility.js +12 -0
- package/dist/body-visibility.js.map +1 -0
- package/dist/chart-export.d.ts +11 -0
- package/dist/chart-export.js +142 -0
- package/dist/chart-export.js.map +1 -0
- package/dist/chart-template.d.ts +28 -0
- package/dist/chart-template.js +139 -0
- package/dist/chart-template.js.map +1 -0
- package/dist/chart-text.d.ts +29 -0
- package/dist/chart-text.js +77 -0
- package/dist/chart-text.js.map +1 -0
- package/dist/ephemeris/houses.d.ts +14 -0
- package/dist/ephemeris/houses.js +104 -0
- package/dist/ephemeris/houses.js.map +1 -0
- package/dist/ephemeris/index.d.ts +17 -0
- package/dist/ephemeris/index.js +135 -0
- package/dist/ephemeris/index.js.map +1 -0
- package/dist/ephemeris/nodes.d.ts +2 -0
- package/dist/ephemeris/nodes.js +27 -0
- package/dist/ephemeris/nodes.js.map +1 -0
- package/dist/export-font-data.d.ts +1 -0
- package/dist/export-font-data.js +1653 -0
- package/dist/export-font-data.js.map +1 -0
- package/dist/export-fonts-OFL.txt +98 -0
- package/dist/export-options.d.ts +1 -0
- package/dist/export-options.js +8 -0
- package/dist/export-options.js.map +1 -0
- package/dist/export-text.d.ts +16 -0
- package/dist/export-text.js +82 -0
- package/dist/export-text.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -0
- package/dist/label-packing.d.ts +23 -0
- package/dist/label-packing.js +264 -0
- package/dist/label-packing.js.map +1 -0
- package/dist/layout.d.ts +66 -0
- package/dist/layout.js +233 -0
- package/dist/layout.js.map +1 -0
- package/dist/model/aspects.d.ts +27 -0
- package/dist/model/aspects.js +48 -0
- package/dist/model/aspects.js.map +1 -0
- package/dist/model/errors.d.ts +4 -0
- package/dist/model/errors.js +8 -0
- package/dist/model/errors.js.map +1 -0
- package/dist/model/index.d.ts +5 -0
- package/dist/model/index.js +6 -0
- package/dist/model/index.js.map +1 -0
- package/dist/model/math.d.ts +12 -0
- package/dist/model/math.js +61 -0
- package/dist/model/math.js.map +1 -0
- package/dist/model/model.d.ts +9 -0
- package/dist/model/model.js +246 -0
- package/dist/model/model.js.map +1 -0
- package/dist/model/transits.d.ts +82 -0
- package/dist/model/transits.js +151 -0
- package/dist/model/transits.js.map +1 -0
- package/dist/model/types.d.ts +122 -0
- package/dist/model/types.js +2 -0
- package/dist/model/types.js.map +1 -0
- package/dist/picking.d.ts +27 -0
- package/dist/picking.js +43 -0
- package/dist/picking.js.map +1 -0
- package/dist/renderer.d.ts +10 -0
- package/dist/renderer.js +1036 -0
- package/dist/renderer.js.map +1 -0
- package/dist/transit-animation.d.ts +46 -0
- package/dist/transit-animation.js +306 -0
- package/dist/transit-animation.js.map +1 -0
- package/dist/transit-renderer.d.ts +45 -0
- package/dist/transit-renderer.js +269 -0
- package/dist/transit-renderer.js.map +1 -0
- package/dist/transit-sampling.d.ts +16 -0
- package/dist/transit-sampling.js +83 -0
- package/dist/transit-sampling.js.map +1 -0
- package/dist/types.d.ts +112 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/dist/wheel-drawing.d.ts +96 -0
- package/dist/wheel-drawing.js +527 -0
- package/dist/wheel-drawing.js.map +1 -0
- package/dist/wheel-geometry.d.ts +49 -0
- package/dist/wheel-geometry.js +79 -0
- package/dist/wheel-geometry.js.map +1 -0
- package/docs/agent-integration.md +240 -0
- package/docs/api.md +513 -0
- package/docs/architecture.md +205 -0
- package/docs/calculations.md +64 -0
- package/docs/github-pages.md +96 -0
- package/docs/installation.md +64 -0
- package/docs/integration-roadmap.md +24 -0
- package/docs/integrations.md +116 -0
- package/docs/release-notes.md +19 -0
- package/docs/releasing.md +164 -0
- package/docs/transits.md +277 -0
- package/llms.txt +30 -0
- package/package.json +118 -4
package/AGENTS.md
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
# Working on ASTR3
|
|
2
|
+
|
|
3
|
+
These instructions apply to the entire repository. For agents integrating the
|
|
4
|
+
library into another application, start with [docs/agent-integration.md](docs/agent-integration.md).
|
|
5
|
+
|
|
6
|
+
Use **ASTR3** for the display name and project-name prose. The npm package and
|
|
7
|
+
its imports use `@yuzuwoeser/astr3`. Other technical identifiers such as URLs, CSS
|
|
8
|
+
classes and JavaScript globals use `astr3`.
|
|
9
|
+
The website wordmark is live text in Righteous Regular (400), with mint, sky blue,
|
|
10
|
+
lavender, coral and gold characters on a dark background. Match the palette in
|
|
11
|
+
`site/public/brand/palette.json`; keep the locally bundled font and its SIL OFL
|
|
12
|
+
copyright/license notices together.
|
|
13
|
+
|
|
14
|
+
## Setup and checks
|
|
15
|
+
|
|
16
|
+
Use Node.js 24 LTS (supported minimum: 22.12.0) and npm. From the repository root:
|
|
17
|
+
|
|
18
|
+
```sh
|
|
19
|
+
npm ci
|
|
20
|
+
npm exec playwright -- install chromium
|
|
21
|
+
npm run dev
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
The website URL is printed by Vite. Development-browser tests use port 4173; Pages
|
|
25
|
+
production smoke tests use port 4174. Stop unrelated servers on those ports before
|
|
26
|
+
running the corresponding suite. In Linux CI, install Chromium with
|
|
27
|
+
`npm exec playwright -- install --with-deps chromium`.
|
|
28
|
+
|
|
29
|
+
```sh
|
|
30
|
+
npm run typecheck # TypeScript, including website, playground and tests
|
|
31
|
+
npm test # Unit tests and independent numerical reference fixtures
|
|
32
|
+
npm run check # Types, unit/reference tests, both builds, packed consumer
|
|
33
|
+
npm run test:browser # Chromium desktop and mobile touch emulation
|
|
34
|
+
npm run test:pages # Build and smoke-test the production website beneath /astr3/
|
|
35
|
+
npm run format:check
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Run focused checks while editing. Before completing a change, run the checks
|
|
39
|
+
appropriate to it. Public API, calculation, layout, picking, accessibility, and
|
|
40
|
+
lifecycle changes need their relevant tests. Renderer or website/example changes
|
|
41
|
+
also need browser validation. A release needs the full sequence in
|
|
42
|
+
[docs/releasing.md](docs/releasing.md). Browser tests do not run inside `npm run check`.
|
|
43
|
+
|
|
44
|
+
## Where to work
|
|
45
|
+
|
|
46
|
+
| Path | Responsibility |
|
|
47
|
+
| ------------------------------------------------------------ | ------------------------------------------------------------------------------- |
|
|
48
|
+
| `src/model/` | Headless types, validation, aspects, houses, relationships, transit composition |
|
|
49
|
+
| `src/ephemeris/` | Optional Astronomy Engine adapter, node and house calculations |
|
|
50
|
+
| `src/renderer.ts` | Three.js wheel, HTML labels/accessibility, events, DOM/GPU lifecycle |
|
|
51
|
+
| `src/transit-renderer.ts` | Source-qualified transit API over the shared renderer |
|
|
52
|
+
| `src/transit-animation.ts`, `src/transit-sampling.ts` | Transit animation lifecycle, sampling and cancellation |
|
|
53
|
+
| `src/wheel-drawing.ts`, `src/chart-export.ts` | Shared drawing description and browser SVG/PNG export |
|
|
54
|
+
| `src/wheel-geometry.ts` | Default/alternative ring geometry, source bands and annular house sectors |
|
|
55
|
+
| `src/layout.ts`, `src/label-packing.ts`, `src/chart-text.ts` | Exact projection, bounded label placement, zoom-aware typography |
|
|
56
|
+
| `src/picking.ts` | Screen-space targets and overlapping selection candidates |
|
|
57
|
+
| `site/` | Project website, generated navigation, branding and Pages configuration |
|
|
58
|
+
| `examples/` | Runnable playground, framework examples and backend integration recipes |
|
|
59
|
+
| `tests/unit/`, `tests/browser/`, `tests/fixtures/` | Behavioral tests and public/synthetic reference data |
|
|
60
|
+
| `scripts/` | Builds and package consumer validation |
|
|
61
|
+
| `docs/` | Public contracts, integration and calculation explanations |
|
|
62
|
+
|
|
63
|
+
## Contracts to preserve
|
|
64
|
+
|
|
65
|
+
- `@yuzuwoeser/astr3/model` must import no DOM, Three.js, or ephemeris code. Importing the
|
|
66
|
+
main entry must remain SSR-safe; mounting needs a browser and WebGL 2.
|
|
67
|
+
- Use degrees for positions and orbs. Keep exact astronomical positions separate
|
|
68
|
+
from displaced labels. Never move a longitude to solve a visual collision.
|
|
69
|
+
- Preserve stable IDs. Transit selections require `chart: 'natal' | 'transit'`,
|
|
70
|
+
or `chart: 'cross'` for cross aspects. Never expose internal scoped renderer IDs.
|
|
71
|
+
- Unknown birth time must not invent houses or axes. Actual cusps may be unequal.
|
|
72
|
+
AC/MC bodies and independently supplied angles must agree when both are used.
|
|
73
|
+
- Omitted aspects calculate; supplied `[]` means none. Supplied aspects remain
|
|
74
|
+
authoritative across orb changes, but disabled types are filtered. Keep
|
|
75
|
+
enablement separate from layer visibility, and retain original inputs for re-enabling.
|
|
76
|
+
- Validation failures must leave the previous chart intact. Models must not
|
|
77
|
+
mutate caller data. Metadata stays opaque and is retained by reference.
|
|
78
|
+
- Dispose owned DOM/GPU resources, observers, listeners and queued frames. Preserve
|
|
79
|
+
accessible selection when WebGL is unavailable. Do not add network requests,
|
|
80
|
+
storage, telemetry or global listeners without a concrete requirement.
|
|
81
|
+
- Do not replace the bounded circular packing solver with greedy placement or
|
|
82
|
+
unbounded leader lines. Dense views must retain selectable dots/list entries.
|
|
83
|
+
|
|
84
|
+
Read [docs/api.md](docs/api.md), [docs/transits.md](docs/transits.md), and
|
|
85
|
+
[docs/calculations.md](docs/calculations.md) before changing their contracts.
|
|
86
|
+
Keep application explanations and framework-specific wrappers outside the core.
|
|
87
|
+
|
|
88
|
+
## Data, documentation and commits
|
|
89
|
+
|
|
90
|
+
Use invented positions or documented public reference dates/locations in examples,
|
|
91
|
+
tests, screenshots and issues. Do not copy a user's birth data, local paths,
|
|
92
|
+
credentials, logs or agent conversations into tracked files. Numerical reference
|
|
93
|
+
fixtures have independent provenance; do not relabel their input while retaining
|
|
94
|
+
old expected results. Optional Python regeneration is not part of normal setup.
|
|
95
|
+
|
|
96
|
+
Update affected docs and examples with API/behavior changes. Add an Unreleased
|
|
97
|
+
changelog entry for user-facing changes. Keep `llms.txt` links current. The packed
|
|
98
|
+
consumer check validates exports and declarations; extend it for new entry points.
|
|
99
|
+
Do not hand-edit `dist/`, `site-dist/` or `node_modules/`.
|
|
100
|
+
|
|
101
|
+
When implementation is authorized, include a local Git commit. Review the final
|
|
102
|
+
diff, run appropriate checks, commit only task changes, preserve unrelated work,
|
|
103
|
+
and use a descriptive message. Report the commit hash and validation results.
|
|
104
|
+
If blocked, explain why and explicitly state that changes remain uncommitted.
|
|
105
|
+
Do not push or publish unless the user asks.
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
User-visible changes are recorded here. The API is experimental until 1.0.
|
|
4
|
+
|
|
5
|
+
## Unreleased
|
|
6
|
+
|
|
7
|
+
## 0.1.1
|
|
8
|
+
|
|
9
|
+
- Wait for npm registry indexing after publication before completing the GitHub
|
|
10
|
+
Release. Retry transient registry/network failures for up to five minutes,
|
|
11
|
+
retaining strict package identity and tarball integrity checks.
|
|
12
|
+
- Publish versioned browser, WordPress, and starter bundles through the automated
|
|
13
|
+
release workflow, alongside the scoped npm package.
|
|
14
|
+
|
|
15
|
+
## 0.1.0
|
|
16
|
+
|
|
17
|
+
- Publish the library as `@yuzuwoeser/astr3`, with matching scoped imports and
|
|
18
|
+
workspace/consumer validation. Keep browser filenames and release asset URLs
|
|
19
|
+
stable, and default scoped npm publication to public access.
|
|
20
|
+
|
|
21
|
+
- Add shared release packaging for npm tarballs, versioned browser and WordPress
|
|
22
|
+
ZIPs, complete framework/server starters, checksums and a source manifest.
|
|
23
|
+
Add tag-triggered GitHub/npm publishing with exact-artifact rerun guards.
|
|
24
|
+
- Add an installable WordPress chart block and same-post shortcode with natal/
|
|
25
|
+
transit JSON, local presets, validation feedback and accessible fallback.
|
|
26
|
+
- Lead integration pages with prebuilt installation, minimal usage and cleanup;
|
|
27
|
+
add a three-route installation chooser and a phased stack coverage roadmap.
|
|
28
|
+
|
|
29
|
+
- Add syntax highlighting to website source tabs, setup snippets, and JSON
|
|
30
|
+
previews, with colors for light and dark code panels and locally bundled grammars.
|
|
31
|
+
|
|
32
|
+
- Add versioned JSON appearance templates for natal and transit charts, synchronous
|
|
33
|
+
SSR-safe resolvers with field-path errors and independent option copies, and the
|
|
34
|
+
packaged `@yuzuwoeser/astr3/chart-template.schema.json` schema. Add homepage comparisons,
|
|
35
|
+
a runnable template example with JSON downloads, and browser/PHP loading guidance.
|
|
36
|
+
|
|
37
|
+
- Fix GitHub Pages builds on Linux when dependencies ship lowercase license
|
|
38
|
+
filenames, preserving their actual casing when collecting notices.
|
|
39
|
+
|
|
40
|
+
- Expand GitHub Pages into the ASTR3 project website with a dedicated playground,
|
|
41
|
+
generated examples and integration guides for JavaScript, TypeScript, React,
|
|
42
|
+
Vue.js, Svelte, Angular, PHP, WordPress, and Ruby on Rails.
|
|
43
|
+
- Add a self-hostable browser-module download with optional calculations and
|
|
44
|
+
SVG/PNG exports. Example code and instructions live in `examples/`; website
|
|
45
|
+
assets/build configuration move from `demo/` to `site/`.
|
|
46
|
+
|
|
47
|
+
- Add a GitHub Pages demo build at `/astr3/`, production desktop/mobile smoke
|
|
48
|
+
tests, and automatic deployment from `main` after checks and history scanning
|
|
49
|
+
pass. Support manual redeployment while keeping local development at `/`.
|
|
50
|
+
|
|
51
|
+
- Simplify getting started and complete public API coverage for models, helpers,
|
|
52
|
+
events, calculation, and transit animation. Separate rendering internals from
|
|
53
|
+
reference docs and update repository, reporting, and asset-link guidance.
|
|
54
|
+
|
|
55
|
+
- Adjust demo downloads to 800 × 800 for standard SVG and 1600 × 1600 for large
|
|
56
|
+
SVG and PNG. Library export defaults remain unchanged.
|
|
57
|
+
|
|
58
|
+
- Add **Download large SVG** to the demo to retain
|
|
59
|
+
more labels and degree/retrograde captions in crowded natal and transit charts.
|
|
60
|
+
|
|
61
|
+
- Add browser SVG and PNG export to natal and transit charts, with outlined text,
|
|
62
|
+
full/current-view options, transparent backgrounds and demo download actions.
|
|
63
|
+
Share wheel construction with the interactive renderer and load export fonts
|
|
64
|
+
only on demand; unsupported custom text reports its missing characters.
|
|
65
|
+
|
|
66
|
+
- Match the supplied five-color logo palette in the header and footer, with a
|
|
67
|
+
dark background for contrast. Add reusable outlined SVG logos and palette
|
|
68
|
+
assets, and display the logo in the README.
|
|
69
|
+
|
|
70
|
+
- Adopt ASTR3 as the display name and a live-text Righteous Regular (400)
|
|
71
|
+
wordmark. Bundle the original font locally with its SIL OFL license and retain
|
|
72
|
+
lowercase `astr3` technical identifiers.
|
|
73
|
+
|
|
74
|
+
- Add individual celestial-body visibility controls, with separate natal/transit
|
|
75
|
+
settings, All/None presets, and a `bodyVisibility` API. Hidden bodies and their
|
|
76
|
+
connectors leave the wheel while their data and accessible selections remain.
|
|
77
|
+
|
|
78
|
+
- Add opt-in transit time-step animation with direct astronomical samples,
|
|
79
|
+
adaptive retrograde trajectory resolution, Pause/Resume, reduced-motion support,
|
|
80
|
+
and a reusable `createTransitAnimation` controller. The demo adds Year stepping
|
|
81
|
+
with leap-day clamping. Batch wheel drawing to keep animated updates responsive.
|
|
82
|
+
|
|
83
|
+
- Add `layout: 'default' | 'alternative'` for natal and transit wheels. The
|
|
84
|
+
alternative places houses outermost, zodiac second and celestial symbols
|
|
85
|
+
inside, with separate inner aspect anchors and a shared demo selector.
|
|
86
|
+
|
|
87
|
+
- Validate the packed consumer using local peer archives and an empty npm cache,
|
|
88
|
+
so fresh CI installations pass without cached registry metadata.
|
|
89
|
+
|
|
90
|
+
- Prepared the open source repository with public/synthetic fixtures, contributor
|
|
91
|
+
guidance, agent integration examples and reproducible release privacy checks.
|
|
92
|
+
|
|
93
|
+
Initial implementation:
|
|
94
|
+
|
|
95
|
+
- Render Western natal wheels with Three.js and precomputed or locally calculated
|
|
96
|
+
positions, actual house cusps, AC/MC axes, true lunar nodes and unknown-house support.
|
|
97
|
+
- Select planets, points, houses, aspects and supplied groups directly, with
|
|
98
|
+
relationship highlighting, details/events and programmatic selection.
|
|
99
|
+
- Explore natal + transit bi-wheels with source-qualified selections and separate
|
|
100
|
+
natal, cross-chart and transit aspect settings.
|
|
101
|
+
- Configure eleven aspect types, independent enablement and orbs, chart weight,
|
|
102
|
+
themes, glyphs, layers and line styles.
|
|
103
|
+
- Keep markers at exact longitudes while fitting crowded symbols locally with
|
|
104
|
+
bounded circular packing, zoom-aware text and selectable cluster badges.
|
|
105
|
+
- Use deterministic conjunction bows, touch/keyboard navigation, an accessible
|
|
106
|
+
HTML object list and graceful WebGL failure handling.
|
|
107
|
+
- Consume typed ESM entry points for browser rendering, headless models and the
|
|
108
|
+
optional Astronomy Engine adapter, with lifecycle cleanup and packed-consumer checks.
|
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# Contributing to ASTR3
|
|
2
|
+
|
|
3
|
+
ASTR3 is an MIT-licensed TypeScript library. Issues and pull requests are welcome.
|
|
4
|
+
The 0.x API may change; discuss a substantial public API change in an issue first.
|
|
5
|
+
Do not include private birth information in reports, screenshots or fixtures.
|
|
6
|
+
|
|
7
|
+
## Start locally
|
|
8
|
+
|
|
9
|
+
Use **Node.js 24 LTS**, matching CI. Node 22.12.0 or newer is supported by the
|
|
10
|
+
package. npm and Git are required; `tar`, `zip`, and `unzip` are needed for website
|
|
11
|
+
builds/tests (included on typical macOS/Linux setups). Python and an ephemeris service are not required.
|
|
12
|
+
|
|
13
|
+
```sh
|
|
14
|
+
git clone https://github.com/yuzuwoeser/astr3.git
|
|
15
|
+
cd astr3
|
|
16
|
+
npm ci
|
|
17
|
+
npm exec playwright -- install chromium
|
|
18
|
+
npm run dev
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Open the Vite URL and select **Playground**. Choose a synthetic or public
|
|
22
|
+
calculated preset, then try selecting a body, aspect, house or supplied group. The example application owns
|
|
23
|
+
forms, tooltip text and time controls; the library owns rendering and selection.
|
|
24
|
+
|
|
25
|
+
## Make and verify a change
|
|
26
|
+
|
|
27
|
+
Create a branch from `main`. Keep a change focused and preserve existing local
|
|
28
|
+
work. Read [AGENTS.md](AGENTS.md) for source boundaries and invariants, whether you
|
|
29
|
+
work manually or with a coding agent.
|
|
30
|
+
|
|
31
|
+
```sh
|
|
32
|
+
npm run typecheck
|
|
33
|
+
npm test
|
|
34
|
+
npm run build:site
|
|
35
|
+
npm run typecheck:examples
|
|
36
|
+
npm run test:recipes
|
|
37
|
+
npm run test:package
|
|
38
|
+
npm run test:browser
|
|
39
|
+
npm run format:check
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
`npm run check` combines types, unit tests, the site/library builds, framework
|
|
43
|
+
checks, recipe syntax checks, and the packed consumer check. The package check
|
|
44
|
+
installs the actual tarball into an isolated consumer and checks ESM imports, SSR-safe imports
|
|
45
|
+
and TypeScript declarations. It packs the installed peers alongside ASTR3 and
|
|
46
|
+
installs those local archives offline with an isolated empty npm cache. It does
|
|
47
|
+
not depend on cached registry metadata. Run `npm ci` first to install the peers.
|
|
48
|
+
|
|
49
|
+
Browser tests start Vite on **127.0.0.1:4173**, exercising Chromium desktop and
|
|
50
|
+
mobile touch emulation with software WebGL. Stop an unrelated server on that port
|
|
51
|
+
first: local runs may reuse an existing server. Linux needs browser OS packages:
|
|
52
|
+
`npm exec playwright -- install --with-deps chromium`. A desktop-only pinch test
|
|
53
|
+
is intentionally skipped; physical devices, Firefox and Safari are not covered.
|
|
54
|
+
Screenshots and failure traces stay in ignored `test-results/`.
|
|
55
|
+
|
|
56
|
+
For a focused run, use `npm test -- tests/unit/layout.test.ts` or
|
|
57
|
+
`npm run test:browser -- tests/browser/transits.spec.ts --project=chromium`.
|
|
58
|
+
`npm run format` applies Prettier; review its diff before committing.
|
|
59
|
+
|
|
60
|
+
Add tests for changed behavior and regressions rather than duplicating the
|
|
61
|
+
implementation. Keep calculation reference tests independent of the algorithm
|
|
62
|
+
under test. Fixtures and optional regeneration provenance are documented in
|
|
63
|
+
[calculations](docs/calculations.md).
|
|
64
|
+
|
|
65
|
+
The website lives in `site/`; runnable examples and the explorer live in
|
|
66
|
+
`examples/`. See [the examples contributor guide](https://github.com/yuzuwoeser/astr3/blob/main/examples/README.md)
|
|
67
|
+
for the registry and build flow. Framework previews compile against a local npm
|
|
68
|
+
package and load on demand in isolated iframes. Restart `dev` after editing an
|
|
69
|
+
example to rebuild previews. `build:demo` remains an alias for `build:site`.
|
|
70
|
+
Run `npm run test:pages` separately for production routes and examples under
|
|
71
|
+
`/astr3/`; these tests do not run inside `check`.
|
|
72
|
+
|
|
73
|
+
## Submit a pull request
|
|
74
|
+
|
|
75
|
+
- Explain the observable problem and resulting behavior. Include a small public
|
|
76
|
+
or synthetic reproduction for fixes.
|
|
77
|
+
- Document public options, event/data changes, calculation conventions and limits.
|
|
78
|
+
- List validation results, including anything skipped or still unverified.
|
|
79
|
+
- Include screenshots for visible changes using synthetic/public chart data.
|
|
80
|
+
- Keep generated builds, local settings, credentials and personal data out of Git.
|
|
81
|
+
|
|
82
|
+
Use descriptive commits. Implementation work should include a local commit after
|
|
83
|
+
checks and diff review. A push or publication still needs the repository owner's
|
|
84
|
+
authorization. GitHub workflows run formatting, types, tests, builds, consumer
|
|
85
|
+
validation and a full-history secret scan.
|
|
86
|
+
|
|
87
|
+
## Documentation and assets
|
|
88
|
+
|
|
89
|
+
Keep examples runnable with invented positions or documented public reference
|
|
90
|
+
dates/locations. Describe public behavior in the [API reference](docs/api.md)
|
|
91
|
+
and implementation detail in [architecture](docs/architecture.md). Update
|
|
92
|
+
`llms.txt` when navigation changes. Check relative links in the packed docs as
|
|
93
|
+
well as the checkout: website/example assets and development scripts are not packaged.
|
|
94
|
+
|
|
95
|
+
The [brand notes](https://github.com/yuzuwoeser/astr3/blob/main/site/public/brand/README.txt)
|
|
96
|
+
record wordmark colors, SVG assets, and font attribution. The
|
|
97
|
+
[export font guide](https://github.com/yuzuwoeser/astr3/blob/main/scripts/export-fonts/README.md)
|
|
98
|
+
describes optional outline regeneration and provenance. Keep copyright/license
|
|
99
|
+
notices with redistributed fonts and outlines; do not regenerate them for a
|
|
100
|
+
prose-only change.
|
|
101
|
+
|
|
102
|
+
Report vulnerabilities using [SECURITY.md](SECURITY.md), not a public issue with
|
|
103
|
+
an exploit or secret. See [the release checklist](docs/releasing.md) for artifact
|
|
104
|
+
and privacy checks before a public release.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 ASTR3 contributors
|
|
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/NOTICE
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
ASTR3 source code is MIT licensed. The library build does not bundle dependency code.
|
|
2
|
+
|
|
3
|
+
The library includes ASTR3 export outline data derived from Noto Sans Regular,
|
|
4
|
+
Noto Sans Symbols Regular and Noto Sans Symbols 2 Regular under the SIL Open Font
|
|
5
|
+
License 1.1. The font copyright notices and full license are in
|
|
6
|
+
export-fonts-OFL.txt alongside the installed JavaScript (dist/ in the tarball),
|
|
7
|
+
and scripts/export-fonts/OFL.txt in source. Source revisions and SHA-256 hashes
|
|
8
|
+
are recorded in scripts/export-fonts/sources.json. The derived outline data
|
|
9
|
+
remains OFL-licensed. Generated chart documents do not inherit that license.
|
|
10
|
+
The website's THIRD_PARTY_LICENSES.txt also contains these notices.
|
|
11
|
+
|
|
12
|
+
The website bundles the unmodified Righteous Regular (400) font by Brian J.
|
|
13
|
+
Bonislawsky DBA Astigmatic (AOETI), under the SIL Open Font License 1.1.
|
|
14
|
+
Its copyright notice and full license accompany the font in site/public/fonts/OFL.txt
|
|
15
|
+
and are included in the website's THIRD_PARTY_LICENSES.txt. The font is a website asset,
|
|
16
|
+
not part of the library build, and remains under its original license.
|
|
17
|
+
|
|
18
|
+
Three.js — https://github.com/mrdoob/three.js
|
|
19
|
+
MIT License. Used as an external peer dependency.
|
|
20
|
+
|
|
21
|
+
Astronomy Engine — https://github.com/cosinekitty/astronomy
|
|
22
|
+
MIT License. Used only by the optional ephemeris entry.
|
|
23
|
+
|
|
24
|
+
Each dependency's full license remains in its installed distribution. Retain its
|
|
25
|
+
license notices when distributing applications that bundle these dependencies.
|
|
26
|
+
|
|
27
|
+
Independent fixtures record numerical results from a separately installed Swiss
|
|
28
|
+
Ephemeris 2.10.03. No implementation source or runtime is included or required by
|
|
29
|
+
the library or tests.
|
|
30
|
+
|
|
31
|
+
The optional website previews also bundle React, Vue, Svelte, Angular, and
|
|
32
|
+
Hotwire dependencies, with their licenses included in the generated website
|
|
33
|
+
THIRD_PARTY_LICENSES.txt. Turbo 8.0.23 omits a standalone license in its npm
|
|
34
|
+
archive; the website retains its upstream MIT-LICENSE from
|
|
35
|
+
https://github.com/hotwired/turbo/blob/v8.0.23/MIT-LICENSE.
|
|
36
|
+
|
|
37
|
+
The website's syntax highlighting bundles Highlight.js under BSD-3-Clause.
|
|
38
|
+
Its full license is included in the generated THIRD_PARTY_LICENSES.txt.
|
package/README.md
CHANGED
|
@@ -1,3 +1,166 @@
|
|
|
1
|
-
#
|
|
1
|
+
# ASTR3
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[Project website and playground](https://yuzuwoeser.github.io/astr3/) · [Deployment and preview](docs/github-pages.md)
|
|
4
|
+
|
|
5
|
+
<img src="https://raw.githubusercontent.com/yuzuwoeser/astr3/main/site/public/brand/astr3-logo-preview.svg" alt="ASTR3" width="320" />
|
|
6
|
+
|
|
7
|
+
Explorable astrology wheels for the browser. A framework-neutral TypeScript library built with Three.js, released under MIT.
|
|
8
|
+
|
|
9
|
+
Select a planet, point, house, aspect, or supplied configuration. Highlight its relationships and connect the selection to your own explanations, tables, tooltips, or panels. Rendering works with precomputed data; the optional browser adapter calculates a natal chart without a backend.
|
|
10
|
+
|
|
11
|
+
## Use the library
|
|
12
|
+
|
|
13
|
+
Choose an installation route in the [installation guide](docs/installation.md):
|
|
14
|
+
npm package, a browser ZIP without build tools, or an installable WordPress
|
|
15
|
+
plugin. Use Node.js 24 LTS (minimum 22.12.0) for bundled applications:
|
|
16
|
+
|
|
17
|
+
```sh
|
|
18
|
+
npm install @yuzuwoeser/astr3 three
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
The npm package is `@yuzuwoeser/astr3`. Browser downloads keep the `astr3.js`
|
|
22
|
+
filename. For unpublished local changes, run `npm ci && npm pack` in a checkout
|
|
23
|
+
and install the generated `yuzuwoeser-astr3-0.1.1.tgz` tarball. Framework starter
|
|
24
|
+
ZIPs include a local tarball and their own application files.
|
|
25
|
+
|
|
26
|
+
Mount after the host element exists. For example, add this HTML to a page served
|
|
27
|
+
by your application's bundler:
|
|
28
|
+
|
|
29
|
+
```html
|
|
30
|
+
<div id="wheel" style="width: min(100%, 640px)"></div>
|
|
31
|
+
<pre id="details"></pre>
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
```ts
|
|
35
|
+
import { createChart } from '@yuzuwoeser/astr3';
|
|
36
|
+
|
|
37
|
+
const host = document.querySelector<HTMLElement>('#wheel');
|
|
38
|
+
const panel = document.querySelector<HTMLElement>('#details');
|
|
39
|
+
if (!host || !panel) throw new Error('Mount #wheel and #details first.');
|
|
40
|
+
|
|
41
|
+
const chart = createChart(host, {
|
|
42
|
+
data: {
|
|
43
|
+
bodies: [
|
|
44
|
+
{ id: 'sun', name: 'Sun', longitude: 0 },
|
|
45
|
+
{ id: 'moon', name: 'Moon', longitude: 120 },
|
|
46
|
+
{ id: 'jupiter', name: 'Jupiter', longitude: 240 },
|
|
47
|
+
],
|
|
48
|
+
// Omit aspects to calculate enabled types with configurable orbs.
|
|
49
|
+
// Supply [] to deliberately display none.
|
|
50
|
+
},
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
const unsubscribe = chart.on('selection', ({ details }) => {
|
|
54
|
+
panel.textContent = details ? JSON.stringify(details, null, 2) : 'Select an object';
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
chart.select({ kind: 'body', id: 'sun' });
|
|
58
|
+
// Call from your application's unmount handler.
|
|
59
|
+
function unmount() {
|
|
60
|
+
unsubscribe();
|
|
61
|
+
chart.dispose();
|
|
62
|
+
}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
The wheel resizes as a square; the accessible object list stays below it in document
|
|
66
|
+
flow. Importing `@yuzuwoeser/astr3` is SSR-safe; interactive graphics need a browser and WebGL 2.
|
|
67
|
+
If WebGL is unavailable, the HTML object list remains usable and `chart.error`
|
|
68
|
+
explains the failure. For data-only use in Node or workers, import `@yuzuwoeser/astr3/model`.
|
|
69
|
+
|
|
70
|
+
## Optional browser calculation
|
|
71
|
+
|
|
72
|
+
```sh
|
|
73
|
+
npm install astronomy-engine
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
```ts
|
|
77
|
+
import { createAstronomyProvider } from '@yuzuwoeser/astr3/ephemeris';
|
|
78
|
+
|
|
79
|
+
const provider = createAstronomyProvider();
|
|
80
|
+
const data = await provider.calculate({
|
|
81
|
+
utc: '2000-01-01T12:00:00Z',
|
|
82
|
+
latitude: 51.5074,
|
|
83
|
+
longitude: -0.1278, // east positive
|
|
84
|
+
houseSystem: 'placidus',
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
// Reuse the mounted chart from the previous example.
|
|
88
|
+
chart.update(data);
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
`@yuzuwoeser/astr3/model` is a headless entry with no DOM, Three.js, or ephemeris imports. `@yuzuwoeser/astr3/ephemeris` imports Astronomy Engine but not Three.js. Renderers and selections never request new calculation data automatically. Any provider implementing `EphemerisProvider` can replace the example adapter.
|
|
92
|
+
|
|
93
|
+
## Capabilities
|
|
94
|
+
|
|
95
|
+
- Natal and transit wheels with arbitrary supplied planets/points, unequal house
|
|
96
|
+
cusps, independent AC/MC axes, and unknown-house support.
|
|
97
|
+
- Eleven aspect types with independent enablement and orbs; supplied aspects and
|
|
98
|
+
configuration groups remain under the caller's control.
|
|
99
|
+
- Exact longitude markers, bounded label placement, overlap choosers, touch/keyboard
|
|
100
|
+
selection, and an accessible HTML object list.
|
|
101
|
+
- Two layouts, themes, chart weights, custom glyphs, layers, and per-body visibility.
|
|
102
|
+
- Reusable [JSON appearance templates](docs/api.md#json-templates) with synchronous
|
|
103
|
+
validation, copied options, and a packaged JSON Schema for natal/transit charts.
|
|
104
|
+
- Browser [SVG/PNG export](docs/api.md#svg-and-png-export) and opt-in
|
|
105
|
+
[transit animation](docs/transits.md#animated-time-steps) with reduced-motion support.
|
|
106
|
+
|
|
107
|
+
The initial API is versioned 0.x and may change before 1.0. Automatic patterns, synastry, standalone transit houses, multi-selection, continuous time playback, 3D presentation, and framework wrappers are deferred.
|
|
108
|
+
|
|
109
|
+
## Natal + transit bi-wheels
|
|
110
|
+
|
|
111
|
+
Use `createTransitChart` with `{ data: { natal, transit } }`. Both sides accept
|
|
112
|
+
`ChartInput`; IDs remain local to their chart. Selections include `chart: 'natal'`
|
|
113
|
+
or `'transit'`, and cross-aspect selections use `'cross'`. Houses and axes come
|
|
114
|
+
from the natal chart. See the [working example and transit API](docs/transits.md).
|
|
115
|
+
|
|
116
|
+
## Website, playground, and integrations
|
|
117
|
+
|
|
118
|
+
From a checkout, run `npm ci` and `npm run dev`, then open the Vite URL and choose **Playground**. The initial
|
|
119
|
+
wheel uses synthetic teaching data with a supplied grand trine. Choose a preset or
|
|
120
|
+
enter UTC time and coordinates to calculate locally with Astronomy Engine.
|
|
121
|
+
|
|
122
|
+
Choose **Natal + transits** for time stepping and optional animation. **Aspects**
|
|
123
|
+
sets enablement and orbs; **Celestial bodies** controls individual visibility.
|
|
124
|
+
Layout, theme, and chart weight affect presentation. Birth information is never
|
|
125
|
+
sent to a calculation service. See [demo time controls](docs/transits.md#demo-controls)
|
|
126
|
+
for transit-specific behavior.
|
|
127
|
+
|
|
128
|
+
The website includes runnable JavaScript/TypeScript, React, Vue.js, Svelte, and
|
|
129
|
+
Angular examples, plus HTML, PHP, WordPress, and Ruby on Rails integration guides.
|
|
130
|
+
[Integration overview](docs/integrations.md) explains the browser download and
|
|
131
|
+
canonical examples. `site/` owns the website; `examples/` owns the source shown
|
|
132
|
+
in its guides. `npm run dev` builds previews before starting Vite; restart it
|
|
133
|
+
after changing an example.
|
|
134
|
+
|
|
135
|
+
Choose [JSON templates](https://yuzuwoeser.github.io/astr3/examples/json-templates/)
|
|
136
|
+
for a live preview and downloadable appearance presets. Import a JSON file and
|
|
137
|
+
spread `resolveChartTemplate(template)` into `createChart` options, followed by
|
|
138
|
+
your own `data` and `ariaLabel`. Transit charts use `resolveTransitChartTemplate`.
|
|
139
|
+
See the [template API](docs/api.md#json-templates) for validation and overrides.
|
|
140
|
+
|
|
141
|
+
## Documentation and validation
|
|
142
|
+
|
|
143
|
+
- [Installation and release downloads](docs/installation.md)
|
|
144
|
+
- [Framework, CMS, and server-rendered integrations](docs/integrations.md)
|
|
145
|
+
- [Integration coverage roadmap](docs/integration-roadmap.md)
|
|
146
|
+
- [Agent integration: headless data and browser lifecycle](docs/agent-integration.md)
|
|
147
|
+
- [API, exported helpers, events, and data contracts](docs/api.md)
|
|
148
|
+
- [Transit bi-wheel API](docs/transits.md)
|
|
149
|
+
- [Calculation conventions and tested accuracy](docs/calculations.md)
|
|
150
|
+
- [Architecture and integration](docs/architecture.md)
|
|
151
|
+
- [Contributing and local setup](CONTRIBUTING.md)
|
|
152
|
+
- [Instructions for repository coding agents](AGENTS.md)
|
|
153
|
+
- [Documentation index for LLMs](llms.txt)
|
|
154
|
+
- [Release and privacy checklist](docs/releasing.md)
|
|
155
|
+
- [Security reporting](SECURITY.md) and [changelog](CHANGELOG.md)
|
|
156
|
+
|
|
157
|
+
Run `npm run check` and `npm run format:check` for local validation. Browser tests
|
|
158
|
+
run separately with `npm run test:browser`; setup and coverage limits are in
|
|
159
|
+
[Contributing](CONTRIBUTING.md).
|
|
160
|
+
|
|
161
|
+
## License and assets
|
|
162
|
+
|
|
163
|
+
ASTR3 source is MIT licensed. Dependency and bundled font attribution is in
|
|
164
|
+
[NOTICE](NOTICE). The Righteous wordmark font and Noto export outlines retain
|
|
165
|
+
their SIL OFL licenses. Reusable logos and palette specifications are in the
|
|
166
|
+
[brand asset notes](https://github.com/yuzuwoeser/astr3/blob/main/site/public/brand/README.txt).
|
package/SECURITY.md
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Security policy
|
|
2
|
+
|
|
3
|
+
Only the latest 0.1.x release is maintained for security fixes. There is no
|
|
4
|
+
guaranteed response time. The API is experimental and versions before 1.0 may
|
|
5
|
+
change.
|
|
6
|
+
|
|
7
|
+
## Report privately
|
|
8
|
+
|
|
9
|
+
Private vulnerability reporting is not currently enabled for this repository.
|
|
10
|
+
Open an [issue](https://github.com/yuzuwoeser/astr3/issues) asking for a private
|
|
11
|
+
reporting channel **without disclosing the vulnerability, exploit, credentials,
|
|
12
|
+
or personal chart data**. Wait for a private channel before sharing sensitive
|
|
13
|
+
details. If maintainers enable **Security → Report a vulnerability**, use that
|
|
14
|
+
private channel instead. Public issues are suitable for ordinary bugs reproduced
|
|
15
|
+
with synthetic data.
|
|
16
|
+
|
|
17
|
+
Include the affected version, runtime/browser, impact and a minimal reproduction.
|
|
18
|
+
Use invented chart data. Share secrets only to identify a leak through the agreed
|
|
19
|
+
private channel, and rotate exposed credentials promptly.
|
|
20
|
+
|
|
21
|
+
## Scope and privacy
|
|
22
|
+
|
|
23
|
+
The library renders caller-supplied data; the optional Astronomy Engine adapter
|
|
24
|
+
calculates locally. First-party code includes no account service, telemetry or
|
|
25
|
+
chart storage. Host applications control persistence, network access and custom
|
|
26
|
+
HTML. Treat names, metadata and interpretation text as untrusted application data;
|
|
27
|
+
use `textContent` for plain text rather than interpolating it into HTML.
|
|
28
|
+
|
|
29
|
+
Release checks scan Git history and distributable contents for secrets and review
|
|
30
|
+
fixtures for personal information. Automated secret detection cannot establish
|
|
31
|
+
that arbitrary chart coordinates or screenshots are safe to publish. Review
|
|
32
|
+
those manually and keep private datasets outside the repository.
|