// The MATLAB implementation, loaded from ../matlab at build time. The app // keeps an editable in-memory copy of these sources (see App.tsx); edits feed // straight into the render worker and are deliberately not persisted, so a // reload restores the shipped code. export type { MFile } from './mfilesCore'; export { hashMFiles } from './mfilesCore'; import type { MFile } from './mfilesCore'; const modules = import.meta.glob('../../matlab/*.m', { eager: true, query: '?raw', import: 'default', }) as Record; export const DEFAULT_MFILES: MFile[] = Object.entries(modules) .map(([path, source]) => ({ name: path.split('/').pop()!, source })) .sort((a, b) => a.name.localeCompare(b.name)); // Files the app itself executes. The others are entry points for running the // model from the numbl CLI, and editing them changes nothing in the browser. export const EXECUTED_BY_APP = new Set([ 'recorder_geometry.m', 'recorder_bore.m', 'recorder_basis.m', 'recorder_notes.m', 'recorder_jet.m', 'recorder_rng.m', 'recorder_radiate.m', 'recorder_output.m', ]);