-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathpreview.js
31 lines (29 loc) · 820 Bytes
/
preview.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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';
import * as controller from './controller/codegen.js';
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,
controller,
}).map(([k, v]) => [k, v.getConfig(version)]),
);