@adriansteffan/reactive 0.2.0 → 0.2.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/dist/{mod-C-XUCKhQ.js → mod-CWKvMS7s.js} +547 -546
- package/dist/reactive.es.js +1 -1
- package/dist/reactive.umd.js +110 -110
- package/dist/{web-Dpb5MAUc.js → web-DDyOXSFH.js} +1 -1
- package/dist/{web-Dv2PC8fG.js → web-DR-HR3ib.js} +1 -1
- package/package.json +1 -1
- package/src/components/experimentrunner.tsx +2 -1
- package/src/utils/common.ts +3 -3
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
2
|
|
|
3
3
|
import '../index.css';
|
|
4
|
-
import { ExperimentConfig, Store, Param, now, getParam } from '../utils/common';
|
|
4
|
+
import { ExperimentConfig, Store, Param, now, getParam, registerExperimentParams } from '../utils/common';
|
|
5
5
|
import { useCallback, useEffect, useMemo, useRef, useState, ComponentType } from 'react';
|
|
6
6
|
import {
|
|
7
7
|
compileTimeline,
|
|
@@ -110,6 +110,7 @@ export default function ExperimentRunner({
|
|
|
110
110
|
/** Simulation config — not used at runtime, extracted by simulate.ts via createElement. */
|
|
111
111
|
simulationConfig?: any;
|
|
112
112
|
}) {
|
|
113
|
+
registerExperimentParams(timeline);
|
|
113
114
|
const disableHybridSimulation = useHybridSimulationDisabled();
|
|
114
115
|
const trialByteCode = useMemo(() => {
|
|
115
116
|
return compileTimeline(timeline);
|
package/src/utils/common.ts
CHANGED
|
@@ -197,7 +197,9 @@ export function registerExperimentParams(experiment: any[]) {
|
|
|
197
197
|
if (params) {
|
|
198
198
|
for (const param of params) {
|
|
199
199
|
if(!item.hideSettings || (item.hideSettings !== true && !item.hideSettings.includes(param.name))){
|
|
200
|
-
sharedRegistry.
|
|
200
|
+
if (!sharedRegistry.some((p) => p.name === param.name)) {
|
|
201
|
+
sharedRegistry.push(param);
|
|
202
|
+
}
|
|
201
203
|
}
|
|
202
204
|
}
|
|
203
205
|
}
|
|
@@ -212,8 +214,6 @@ export function registerComponentParams(
|
|
|
212
214
|
}
|
|
213
215
|
|
|
214
216
|
export function subsetExperimentByParam(experiment: any[]) {
|
|
215
|
-
registerExperimentParams(experiment);
|
|
216
|
-
|
|
217
217
|
timelineRepresentation.length = 0;
|
|
218
218
|
|
|
219
219
|
experiment.forEach((item) => {
|