gctGenerator/site/.vuepress/components/codes/preview.js

32 lines
820 B
JavaScript
Raw Normal View History

import * as qft from './qft/codegen.js';
import * as qfst from './qfst/codegen.js';
import * as CustomizedDisplay from './CustomizedDisplay/codegen.js';
import * as PatternSelector from './PatternSelector/codegen.js';
import * as AttemptCounter from './AttemptCounter/codegen.js';
2023-02-06 04:35:42 +09:00
import * as controller from './controller/codegen.js';
2023-02-06 04:35:42 +09:00
export const previewIds = [
'CustomizedDisplay',
'AttemptCounter',
'PatternSelector',
'qft',
'qfst',
'controller',
];
/**
* Get code configs for preview
* @param {keyof typeof import('./addrs.js').ctxSpOff} version
*/
export const getConfigs = (version) =>
Object.fromEntries(
Object.entries({
qft,
qfst,
CustomizedDisplay,
PatternSelector,
AttemptCounter,
2023-02-06 04:35:42 +09:00
controller,
}).map(([k, v]) => [k, v.getConfig(version)]),
);