@holoscript/radio-astronomy-plugin 2.0.2

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 (38) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/LICENSE +21 -0
  3. package/__tests__/SpectralCubeViewer.test.ts +129 -0
  4. package/__tests__/plugin.test.ts +21 -0
  5. package/dist/bridge/python-runner.d.ts +24 -0
  6. package/dist/bridge/python-runner.d.ts.map +1 -0
  7. package/dist/bridge/python-runner.js +43 -0
  8. package/dist/bridge/python-runner.js.map +1 -0
  9. package/dist/components/SpectralCubeViewer.d.ts +45 -0
  10. package/dist/components/SpectralCubeViewer.d.ts.map +1 -0
  11. package/dist/components/SpectralCubeViewer.js +196 -0
  12. package/dist/components/SpectralCubeViewer.js.map +1 -0
  13. package/dist/constants/astronomy-traits.d.ts +6 -0
  14. package/dist/constants/astronomy-traits.d.ts.map +1 -0
  15. package/dist/constants/astronomy-traits.js +12 -0
  16. package/dist/constants/astronomy-traits.js.map +1 -0
  17. package/dist/fits/FITSParser.d.ts +60 -0
  18. package/dist/fits/FITSParser.d.ts.map +1 -0
  19. package/dist/fits/FITSParser.js +230 -0
  20. package/dist/fits/FITSParser.js.map +1 -0
  21. package/dist/fits/FITSToGrid.d.ts +27 -0
  22. package/dist/fits/FITSToGrid.d.ts.map +1 -0
  23. package/dist/fits/FITSToGrid.js +85 -0
  24. package/dist/fits/FITSToGrid.js.map +1 -0
  25. package/dist/index.d.ts +25 -0
  26. package/dist/index.d.ts.map +1 -0
  27. package/dist/index.js +28 -0
  28. package/dist/index.js.map +1 -0
  29. package/package.json +33 -0
  30. package/python/astropy_bridge.py +45 -0
  31. package/src/bridge/python-runner.ts +62 -0
  32. package/src/components/SpectralCubeViewer.tsx +310 -0
  33. package/src/constants/astronomy-traits.ts +13 -0
  34. package/src/fits/FITSParser.ts +289 -0
  35. package/src/fits/FITSToGrid.ts +95 -0
  36. package/src/index.ts +32 -0
  37. package/tsconfig.json +26 -0
  38. package/vitest.config.ts +10 -0
package/src/index.ts ADDED
@@ -0,0 +1,32 @@
1
+ import { RADIO_ASTRONOMY_TRAITS, RadioAstronomyTraitName } from './constants/astronomy-traits';
2
+ import { PythonAstropyBridge, AstropyResult } from './bridge/python-runner';
3
+
4
+ /**
5
+ * @holoscript/radio-astronomy-plugin
6
+ *
7
+ * Domain plugin bridging Radio Astrophysics simulation concepts into the HoloScript Universal pipeline.
8
+ * Extends standard traits without bloating core. Provides an astropy python bridge for logic evaluation.
9
+ */
10
+
11
+ // Export vocabulary
12
+ export { RADIO_ASTRONOMY_TRAITS, type RadioAstronomyTraitName };
13
+
14
+ // Export Bridges
15
+ export { PythonAstropyBridge, type AstropyResult };
16
+
17
+ // Export FITS parsing and visualization
18
+ export { parseFITS, buildFITS, type FITSFile, type WCSInfo } from './fits/FITSParser';
19
+ export { fitsToGrid3D, extractChannel, fitsDataRange } from './fits/FITSToGrid';
20
+ export { SpectralCubeViewer, FITSViewerPanel, type SpectralCubeViewerProps, type FITSViewerPanelProps } from './components/SpectralCubeViewer';
21
+
22
+ /**
23
+ * Metadata exposing domain capabilities to the Studio / Schema Mapper.
24
+ */
25
+ export const DOMAIN_MANIFEST = {
26
+ id: 'domain.science.astronomy.radio',
27
+ name: 'Radio Astronomy Plugin',
28
+ version: '1.0.0',
29
+ description: 'Extends HoloScript spatial environments with radio astrophysics primitives.',
30
+ keywords: ['interferometer', 'radio emitting', 'synchrotron radiation', 'pulsar'],
31
+ traits: RADIO_ASTRONOMY_TRAITS,
32
+ };
package/tsconfig.json ADDED
@@ -0,0 +1,26 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2020",
4
+ "module": "ESNext",
5
+ "moduleResolution": "bundler",
6
+ "lib": ["ES2020", "DOM"],
7
+ "declaration": true,
8
+ "declarationMap": true,
9
+ "sourceMap": true,
10
+ "strict": true,
11
+ "noImplicitAny": true,
12
+ "strictNullChecks": true,
13
+ "noUnusedLocals": false,
14
+ "noUnusedParameters": false,
15
+ "resolveJsonModule": true,
16
+ "esModuleInterop": true,
17
+ "skipLibCheck": true,
18
+ "forceConsistentCasingInFileNames": true,
19
+ "outDir": "./dist",
20
+ "rootDir": "./src",
21
+ "experimentalDecorators": true,
22
+ "jsx": "react-jsx"
23
+ },
24
+ "include": ["src/**/*"],
25
+ "exclude": ["node_modules", "dist", "src/**/*.test.ts", "src/**/*.bench.ts", "src/__tests__/**/*"]
26
+ }
@@ -0,0 +1,10 @@
1
+ import { defineConfig } from 'vitest/config';
2
+
3
+ export default defineConfig({
4
+ test: {
5
+ globals: true,
6
+ environment: 'node',
7
+ include: ['src/**/*.test.ts'],
8
+ passWithNoTests: true,
9
+ },
10
+ });