@doenet/v06-to-v07 0.7.20-dev.330 → 0.7.20-dev.332
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/{index-JU3SUcVk.js → index-LkbHGDuM.js} +218 -100
- package/{index-JU3SUcVk.js.map → index-LkbHGDuM.js.map} +1 -1
- package/index.js +1 -1
- package/package.json +1 -1
- package/{sha256-C0vj3HDn-Cg26uPd_-CKeRbA2J.js → sha256-C0vj3HDn-DacUQVtr-D1w1icgH.js} +2 -2
- package/{sha256-C0vj3HDn-Cg26uPd_-CKeRbA2J.js.map → sha256-C0vj3HDn-DacUQVtr-D1w1icgH.js.map} +1 -1
|
@@ -40963,7 +40963,7 @@ async function cidFromArrayBuffer(data) {
|
|
|
40963
40963
|
await crypto.subtle.digest("SHA-256", new Uint8Array());
|
|
40964
40964
|
digest = (data2) => crypto.subtle.digest("SHA-256", data2);
|
|
40965
40965
|
} catch (e22) {
|
|
40966
|
-
const sha256 = (await import("./sha256-C0vj3HDn-
|
|
40966
|
+
const sha256 = (await import("./sha256-C0vj3HDn-DacUQVtr-D1w1icgH.js").then((n2) => n2.s)).default;
|
|
40967
40967
|
digest = (data2) => sha256(data2, {
|
|
40968
40968
|
asBytes: true
|
|
40969
40969
|
});
|
|
@@ -50415,8 +50415,11 @@ function normalizeArrayStateVariableDefaults(def, varName) {
|
|
|
50415
50415
|
if (!def.returnEntryDimensions) {
|
|
50416
50416
|
def.returnEntryDimensions = defaultReturnEntryDimensions;
|
|
50417
50417
|
}
|
|
50418
|
-
if (def.shadowingInstructions
|
|
50419
|
-
def.shadowingInstructions.returnWrappingComponents
|
|
50418
|
+
if (def.shadowingInstructions) {
|
|
50419
|
+
if (!def.shadowingInstructions.returnWrappingComponents) {
|
|
50420
|
+
def.shadowingInstructions.returnWrappingComponents = defaultReturnWrappingComponents;
|
|
50421
|
+
}
|
|
50422
|
+
def.wrappingComponents = def.shadowingInstructions.returnWrappingComponents();
|
|
50420
50423
|
}
|
|
50421
50424
|
}
|
|
50422
50425
|
function arraySizeDefinition({ dependencyValues }) {
|
|
@@ -50488,7 +50491,7 @@ async function initializeComponentStateVariables({
|
|
|
50488
50491
|
component.stateVarAliases[stateVariable] = component.state[stateVariable].targetVariableName;
|
|
50489
50492
|
delete component.state[stateVariable];
|
|
50490
50493
|
} else {
|
|
50491
|
-
|
|
50494
|
+
initializeStateVariablePlaceholder({
|
|
50492
50495
|
core: core2,
|
|
50493
50496
|
component,
|
|
50494
50497
|
stateVariable
|
|
@@ -50496,6 +50499,109 @@ async function initializeComponentStateVariables({
|
|
|
50496
50499
|
}
|
|
50497
50500
|
}
|
|
50498
50501
|
}
|
|
50502
|
+
function initializeStateVariablePlaceholder({
|
|
50503
|
+
core: core2,
|
|
50504
|
+
component,
|
|
50505
|
+
stateVariable
|
|
50506
|
+
}) {
|
|
50507
|
+
const stateVarObj = component.state[stateVariable];
|
|
50508
|
+
stateVarObj.svComponent = component;
|
|
50509
|
+
stateVarObj.svVarName = stateVariable;
|
|
50510
|
+
stateVarObj.isResolved = false;
|
|
50511
|
+
installStaleValueGetter(stateVarObj);
|
|
50512
|
+
if (stateVarObj.isArray) {
|
|
50513
|
+
if (!component.arrayEntryPrefixes) {
|
|
50514
|
+
component.arrayEntryPrefixes = {};
|
|
50515
|
+
}
|
|
50516
|
+
const entryPrefixes = stateVarObj.entryPrefixes ?? [stateVariable];
|
|
50517
|
+
for (const prefix of entryPrefixes) {
|
|
50518
|
+
component.arrayEntryPrefixes[prefix] = stateVariable;
|
|
50519
|
+
}
|
|
50520
|
+
}
|
|
50521
|
+
if (stateVarObj.triggerActionOnChange) {
|
|
50522
|
+
let componentTriggers = core2.stateVariableChangeTriggers[component.componentIdx];
|
|
50523
|
+
if (!componentTriggers) {
|
|
50524
|
+
componentTriggers = core2.stateVariableChangeTriggers[component.componentIdx] = {};
|
|
50525
|
+
}
|
|
50526
|
+
componentTriggers[stateVariable] = {
|
|
50527
|
+
action: stateVarObj.triggerActionOnChange
|
|
50528
|
+
};
|
|
50529
|
+
}
|
|
50530
|
+
}
|
|
50531
|
+
async function ensureStateVariableMaterialized({
|
|
50532
|
+
core: core2,
|
|
50533
|
+
component,
|
|
50534
|
+
stateVariable
|
|
50535
|
+
}) {
|
|
50536
|
+
const stateVarObj = component.state[stateVariable];
|
|
50537
|
+
if (!stateVarObj || stateVarObj.svMaterialized || stateVarObj.isArrayEntry) {
|
|
50538
|
+
return;
|
|
50539
|
+
}
|
|
50540
|
+
materializeNestedDefinitionFields(stateVarObj);
|
|
50541
|
+
applyPendingShadowModification(stateVarObj);
|
|
50542
|
+
const allStateVariablesAffected = [stateVariable];
|
|
50543
|
+
if (stateVarObj.additionalStateVariablesDefined) {
|
|
50544
|
+
allStateVariablesAffected.push(
|
|
50545
|
+
...stateVarObj.additionalStateVariablesDefined
|
|
50546
|
+
);
|
|
50547
|
+
}
|
|
50548
|
+
for (const varName of allStateVariablesAffected) {
|
|
50549
|
+
const obj = component.state[varName];
|
|
50550
|
+
if (obj) {
|
|
50551
|
+
obj.svMaterialized = true;
|
|
50552
|
+
}
|
|
50553
|
+
}
|
|
50554
|
+
core2.dependencies.numMaterializedStateVariables += allStateVariablesAffected.length;
|
|
50555
|
+
let workspace;
|
|
50556
|
+
for (const varName of allStateVariablesAffected) {
|
|
50557
|
+
const obj = component.state[varName];
|
|
50558
|
+
if (!obj) {
|
|
50559
|
+
continue;
|
|
50560
|
+
}
|
|
50561
|
+
if (varName !== stateVariable) {
|
|
50562
|
+
materializeNestedDefinitionFields(obj);
|
|
50563
|
+
applyPendingShadowModification(obj);
|
|
50564
|
+
}
|
|
50565
|
+
if (obj.createWorkspace) {
|
|
50566
|
+
if (!workspace) {
|
|
50567
|
+
workspace = {};
|
|
50568
|
+
}
|
|
50569
|
+
obj.workspace = workspace;
|
|
50570
|
+
}
|
|
50571
|
+
await initializeStateVariable({
|
|
50572
|
+
core: core2,
|
|
50573
|
+
component,
|
|
50574
|
+
stateVariable: varName
|
|
50575
|
+
});
|
|
50576
|
+
}
|
|
50577
|
+
}
|
|
50578
|
+
function materializeNestedDefinitionFields(stateVarObj) {
|
|
50579
|
+
if (stateVarObj.shadowingInstructions && !Object.prototype.hasOwnProperty.call(
|
|
50580
|
+
stateVarObj,
|
|
50581
|
+
"shadowingInstructions"
|
|
50582
|
+
)) {
|
|
50583
|
+
stateVarObj.shadowingInstructions = Object.assign(
|
|
50584
|
+
{},
|
|
50585
|
+
stateVarObj.shadowingInstructions
|
|
50586
|
+
);
|
|
50587
|
+
}
|
|
50588
|
+
if (stateVarObj.additionalStateVariablesDefined && !Object.prototype.hasOwnProperty.call(
|
|
50589
|
+
stateVarObj,
|
|
50590
|
+
"additionalStateVariablesDefined"
|
|
50591
|
+
)) {
|
|
50592
|
+
stateVarObj.additionalStateVariablesDefined = [
|
|
50593
|
+
...stateVarObj.additionalStateVariablesDefined
|
|
50594
|
+
];
|
|
50595
|
+
}
|
|
50596
|
+
if (stateVarObj.stateVariablesDeterminingDependencies && !Object.prototype.hasOwnProperty.call(
|
|
50597
|
+
stateVarObj,
|
|
50598
|
+
"stateVariablesDeterminingDependencies"
|
|
50599
|
+
)) {
|
|
50600
|
+
stateVarObj.stateVariablesDeterminingDependencies = [
|
|
50601
|
+
...stateVarObj.stateVariablesDeterminingDependencies
|
|
50602
|
+
];
|
|
50603
|
+
}
|
|
50604
|
+
}
|
|
50499
50605
|
async function initializeStateVariable({
|
|
50500
50606
|
core: core2,
|
|
50501
50607
|
component,
|
|
@@ -50510,6 +50616,7 @@ async function initializeStateVariable({
|
|
|
50510
50616
|
stateVarObj.svComponent = component;
|
|
50511
50617
|
stateVarObj.svVarName = stateVariable;
|
|
50512
50618
|
stateVarObj.isResolved = false;
|
|
50619
|
+
stateVarObj.svMaterialized = true;
|
|
50513
50620
|
installStaleValueGetter(stateVarObj);
|
|
50514
50621
|
if (arrayEntryPrefix !== void 0) {
|
|
50515
50622
|
await initializeArrayEntryStateVariable({
|
|
@@ -50532,9 +50639,11 @@ async function initializeStateVariable({
|
|
|
50532
50639
|
if (!componentTriggers) {
|
|
50533
50640
|
componentTriggers = core2.stateVariableChangeTriggers[component.componentIdx] = {};
|
|
50534
50641
|
}
|
|
50535
|
-
componentTriggers[stateVariable]
|
|
50536
|
-
|
|
50537
|
-
|
|
50642
|
+
if (!componentTriggers[stateVariable]) {
|
|
50643
|
+
componentTriggers[stateVariable] = {
|
|
50644
|
+
action: stateVarObj.triggerActionOnChange
|
|
50645
|
+
};
|
|
50646
|
+
}
|
|
50538
50647
|
}
|
|
50539
50648
|
}
|
|
50540
50649
|
async function initializeArrayEntryStateVariable({
|
|
@@ -50724,12 +50833,7 @@ async function initializeArrayStateVariable({
|
|
|
50724
50833
|
if (!stateVarObj.returnEntryDimensions) {
|
|
50725
50834
|
stateVarObj.returnEntryDimensions = defaultReturnEntryDimensions;
|
|
50726
50835
|
}
|
|
50727
|
-
if (stateVarObj.shadowingInstructions)
|
|
50728
|
-
if (!stateVarObj.shadowingInstructions.returnWrappingComponents) {
|
|
50729
|
-
stateVarObj.shadowingInstructions.returnWrappingComponents = defaultReturnWrappingComponents;
|
|
50730
|
-
}
|
|
50731
|
-
stateVarObj.wrappingComponents = stateVarObj.shadowingInstructions.returnWrappingComponents();
|
|
50732
|
-
}
|
|
50836
|
+
if (stateVarObj.shadowingInstructions) ;
|
|
50733
50837
|
stateVarObj.usedDefaultByArrayKey = {};
|
|
50734
50838
|
stateVarObj.arrayEntryNames = [];
|
|
50735
50839
|
stateVarObj.varNamesIncludingArrayKeys = {};
|
|
@@ -50902,25 +51006,8 @@ function getClassStateVariableDefinitions(core2, componentClass) {
|
|
|
50902
51006
|
}
|
|
50903
51007
|
return entry;
|
|
50904
51008
|
}
|
|
50905
|
-
function
|
|
50906
|
-
|
|
50907
|
-
if (clone2.shadowingInstructions) {
|
|
50908
|
-
clone2.shadowingInstructions = Object.assign(
|
|
50909
|
-
{},
|
|
50910
|
-
clone2.shadowingInstructions
|
|
50911
|
-
);
|
|
50912
|
-
}
|
|
50913
|
-
if (clone2.additionalStateVariablesDefined) {
|
|
50914
|
-
clone2.additionalStateVariablesDefined = [
|
|
50915
|
-
...clone2.additionalStateVariablesDefined
|
|
50916
|
-
];
|
|
50917
|
-
}
|
|
50918
|
-
if (clone2.stateVariablesDeterminingDependencies) {
|
|
50919
|
-
clone2.stateVariablesDeterminingDependencies = [
|
|
50920
|
-
...clone2.stateVariablesDeterminingDependencies
|
|
50921
|
-
];
|
|
50922
|
-
}
|
|
50923
|
-
return clone2;
|
|
51009
|
+
function wrapStateVariableDefinition(def) {
|
|
51010
|
+
return Object.create(def);
|
|
50924
51011
|
}
|
|
50925
51012
|
async function createStateVariableDefinitions({
|
|
50926
51013
|
core: core2,
|
|
@@ -50974,7 +51061,7 @@ async function createStateVariableDefinitions({
|
|
|
50974
51061
|
}
|
|
50975
51062
|
let stateVariableDefinitions = {};
|
|
50976
51063
|
for (const varName in classDefinitions.normalized) {
|
|
50977
|
-
stateVariableDefinitions[varName] =
|
|
51064
|
+
stateVariableDefinitions[varName] = wrapStateVariableDefinition(
|
|
50978
51065
|
classDefinitions.normalized[varName]
|
|
50979
51066
|
);
|
|
50980
51067
|
}
|
|
@@ -51594,34 +51681,52 @@ function modifyStateDefsToBeShadows({
|
|
|
51594
51681
|
}
|
|
51595
51682
|
}
|
|
51596
51683
|
}
|
|
51597
|
-
|
|
51598
|
-
|
|
51599
|
-
|
|
51600
|
-
|
|
51601
|
-
|
|
51602
|
-
|
|
51603
|
-
|
|
51604
|
-
|
|
51605
|
-
|
|
51606
|
-
|
|
51607
|
-
|
|
51608
|
-
|
|
51609
|
-
|
|
51684
|
+
stateDef.svShadowParams = {
|
|
51685
|
+
targetComponentIdx: targetComponent.componentIdx,
|
|
51686
|
+
overrideVarName: differentStateVariablesInTarget[varInd],
|
|
51687
|
+
keepOriginalDependencies: Boolean(foundReadyToExpandWhenResolved)
|
|
51688
|
+
};
|
|
51689
|
+
}
|
|
51690
|
+
for (let varName in deleteStateVariablesFromDefinition) {
|
|
51691
|
+
stateVariableDefinitions[varName].svShadowDeleteVars = deleteStateVariablesFromDefinition[varName];
|
|
51692
|
+
}
|
|
51693
|
+
}
|
|
51694
|
+
function applyPendingShadowModification(stateVarObj) {
|
|
51695
|
+
const params = stateVarObj.svShadowParams;
|
|
51696
|
+
if (params) {
|
|
51697
|
+
delete stateVarObj.svShadowParams;
|
|
51698
|
+
const varName = stateVarObj.svVarName;
|
|
51699
|
+
const originalReturnDependencies = stateVarObj.returnDependencies;
|
|
51700
|
+
stateVarObj.additionalStateVariablesDefined = void 0;
|
|
51701
|
+
if (!params.keepOriginalDependencies) {
|
|
51702
|
+
stateVarObj.stateVariablesDeterminingDependencies = void 0;
|
|
51703
|
+
}
|
|
51704
|
+
let copyComponentType = stateVarObj.public && stateVarObj.shadowingInstructions.hasVariableComponentType;
|
|
51705
|
+
stateVarObj.shadowOfComponentIdx = params.targetComponentIdx;
|
|
51706
|
+
stateVarObj.shadowVarName = varName;
|
|
51707
|
+
stateVarObj.shadowCopyComponentType = copyComponentType;
|
|
51708
|
+
if (stateVarObj.isArray) {
|
|
51709
|
+
stateVarObj.shadowOverrideVarName = params.overrideVarName;
|
|
51710
|
+
stateVarObj.returnArrayDependenciesByKey = shadowReturnArrayDependenciesByKey;
|
|
51711
|
+
stateVarObj.arrayDefinitionByKey = shadowArrayDefinitionByKey;
|
|
51712
|
+
stateVarObj.inverseArrayDefinitionByKey = shadowInverseArrayDefinitionByKey;
|
|
51610
51713
|
} else {
|
|
51611
|
-
if (
|
|
51612
|
-
|
|
51714
|
+
if (params.keepOriginalDependencies) {
|
|
51715
|
+
stateVarObj.shadowOriginalReturnDependencies = originalReturnDependencies.bind(stateVarObj);
|
|
51613
51716
|
}
|
|
51614
|
-
|
|
51615
|
-
|
|
51616
|
-
|
|
51617
|
-
|
|
51618
|
-
|
|
51717
|
+
stateVarObj.shadowVarNameInTarget = params.overrideVarName || varName;
|
|
51718
|
+
stateVarObj.returnDependencies = shadowReturnDependencies;
|
|
51719
|
+
stateVarObj.definition = shadowDefinition;
|
|
51720
|
+
stateVarObj.excludeDependencyValuesInInverseDefinition = true;
|
|
51721
|
+
stateVarObj.inverseDefinition = shadowInverseDefinition;
|
|
51619
51722
|
}
|
|
51620
51723
|
}
|
|
51621
|
-
|
|
51724
|
+
const deleteVars = stateVarObj.svShadowDeleteVars;
|
|
51725
|
+
if (deleteVars) {
|
|
51726
|
+
delete stateVarObj.svShadowDeleteVars;
|
|
51622
51727
|
modifyStateDefToDeleteVariableReferences({
|
|
51623
|
-
varNamesToDelete:
|
|
51624
|
-
stateDef:
|
|
51728
|
+
varNamesToDelete: deleteVars,
|
|
51729
|
+
stateDef: stateVarObj
|
|
51625
51730
|
});
|
|
51626
51731
|
}
|
|
51627
51732
|
}
|
|
@@ -53411,15 +53516,29 @@ const _Dependency = class _Dependency2 {
|
|
|
53411
53516
|
componentClass: downComponent.constructor
|
|
53412
53517
|
});
|
|
53413
53518
|
if (this.constructor.convertToArraySize) {
|
|
53414
|
-
|
|
53519
|
+
const convertedVarNames = [];
|
|
53520
|
+
for (const vName of mappedVarNames) {
|
|
53415
53521
|
let stateVarObj = downComponent.state[vName];
|
|
53416
53522
|
if (stateVarObj) {
|
|
53523
|
+
if (stateVarObj.isArray) {
|
|
53524
|
+
await ensureStateVariableMaterialized({
|
|
53525
|
+
core: this.dependencyHandler.core,
|
|
53526
|
+
component: downComponent,
|
|
53527
|
+
stateVariable: vName
|
|
53528
|
+
});
|
|
53529
|
+
}
|
|
53417
53530
|
if (stateVarObj.arraySizeStateVariable) {
|
|
53418
|
-
|
|
53531
|
+
convertedVarNames.push(
|
|
53532
|
+
stateVarObj.arraySizeStateVariable
|
|
53533
|
+
);
|
|
53419
53534
|
} else {
|
|
53420
|
-
|
|
53535
|
+
convertedVarNames.push(
|
|
53536
|
+
`__${vName}_is_not_an_array`
|
|
53537
|
+
);
|
|
53421
53538
|
}
|
|
53539
|
+
continue;
|
|
53422
53540
|
}
|
|
53541
|
+
let converted = `__${vName}_is_not_an_array`;
|
|
53423
53542
|
if (downComponent.arrayEntryPrefixes) {
|
|
53424
53543
|
let arrayEntryPrefixesLongestToShortest = Object.keys(
|
|
53425
53544
|
downComponent.arrayEntryPrefixes
|
|
@@ -53436,13 +53555,20 @@ const _Dependency = class _Dependency2 {
|
|
|
53436
53555
|
numDimensions: arrayStateVarObj.numDimensions
|
|
53437
53556
|
});
|
|
53438
53557
|
if (arrayKeys.length > 0) {
|
|
53439
|
-
|
|
53558
|
+
await ensureStateVariableMaterialized({
|
|
53559
|
+
core: this.dependencyHandler.core,
|
|
53560
|
+
component: downComponent,
|
|
53561
|
+
stateVariable: arrayVariableName
|
|
53562
|
+
});
|
|
53563
|
+
converted = downComponent.state[arrayVariableName].arraySizeStateVariable;
|
|
53564
|
+
break;
|
|
53440
53565
|
}
|
|
53441
53566
|
}
|
|
53442
53567
|
}
|
|
53443
53568
|
}
|
|
53444
|
-
|
|
53445
|
-
}
|
|
53569
|
+
convertedVarNames.push(converted);
|
|
53570
|
+
}
|
|
53571
|
+
mappedVarNames = convertedVarNames;
|
|
53446
53572
|
}
|
|
53447
53573
|
if (this.propIndex !== void 0) {
|
|
53448
53574
|
mappedVarNames = await arrayEntryNamesFromPropIndex({
|
|
@@ -58822,6 +58948,7 @@ class DependencyHandler {
|
|
|
58822
58948
|
resolveBlockedBy: {}
|
|
58823
58949
|
};
|
|
58824
58950
|
this.numDependencySetups = 0;
|
|
58951
|
+
this.numMaterializedStateVariables = 0;
|
|
58825
58952
|
this.attributeRefResolutionDependenciesByReferenced = {};
|
|
58826
58953
|
this._internedVariableNameLists = /* @__PURE__ */ new Map();
|
|
58827
58954
|
this._internedComponentIndexLists = /* @__PURE__ */ new Map();
|
|
@@ -59001,6 +59128,11 @@ class DependencyHandler {
|
|
|
59001
59128
|
if (!downDepsForComponent || downDepsForComponent[stateVariable] !== void 0) {
|
|
59002
59129
|
return;
|
|
59003
59130
|
}
|
|
59131
|
+
await ensureStateVariableMaterialized({
|
|
59132
|
+
core: this.core,
|
|
59133
|
+
component,
|
|
59134
|
+
stateVariable
|
|
59135
|
+
});
|
|
59004
59136
|
const allStateVariablesAffected = [stateVariable];
|
|
59005
59137
|
if (stateVarObj.additionalStateVariablesDefined) {
|
|
59006
59138
|
allStateVariablesAffected.push(
|
|
@@ -62546,6 +62678,13 @@ class EssentialValueWriter {
|
|
|
62546
62678
|
let newComponentStateVariables = newStateVariableValues[cIdx];
|
|
62547
62679
|
for (let vName in newComponentStateVariables) {
|
|
62548
62680
|
let compStateObj = comp.state[vName];
|
|
62681
|
+
if (compStateObj) {
|
|
62682
|
+
await ensureStateVariableMaterialized({
|
|
62683
|
+
core: this.core,
|
|
62684
|
+
component: comp,
|
|
62685
|
+
stateVariable: vName
|
|
62686
|
+
});
|
|
62687
|
+
}
|
|
62549
62688
|
if (compStateObj === void 0) {
|
|
62550
62689
|
let match2 = vName.match(/^__def_primitive_(\d+)$/);
|
|
62551
62690
|
if (!match2 && newComponent) {
|
|
@@ -62691,6 +62830,11 @@ class EssentialValueWriter {
|
|
|
62691
62830
|
}
|
|
62692
62831
|
let componentWorkspace = workspace[instruction.componentIdx];
|
|
62693
62832
|
let stateVarObj = component.state[stateVariable];
|
|
62833
|
+
await ensureStateVariableMaterialized({
|
|
62834
|
+
core: this.core,
|
|
62835
|
+
component,
|
|
62836
|
+
stateVariable
|
|
62837
|
+
});
|
|
62694
62838
|
let additionalStateVariablesDefined = stateVarObj.additionalStateVariablesDefined;
|
|
62695
62839
|
let allStateVariablesAffected = [stateVariable];
|
|
62696
62840
|
if (additionalStateVariablesDefined) {
|
|
@@ -64053,6 +64197,11 @@ class StalenessPropagator {
|
|
|
64053
64197
|
for (let arrayEntryPrefix of arrayEntryPrefixesLongestToShortest) {
|
|
64054
64198
|
if (stateVariable.substring(0, arrayEntryPrefix.length) === arrayEntryPrefix) {
|
|
64055
64199
|
let arrayVariableName = component.arrayEntryPrefixes[arrayEntryPrefix];
|
|
64200
|
+
await ensureStateVariableMaterialized({
|
|
64201
|
+
core: this.core,
|
|
64202
|
+
component,
|
|
64203
|
+
stateVariable: arrayVariableName
|
|
64204
|
+
});
|
|
64056
64205
|
let arrayStateVarObj = component.state[arrayVariableName];
|
|
64057
64206
|
let arrayKeys = arrayStateVarObj.getArrayKeysFromVarName({
|
|
64058
64207
|
arrayEntryPrefix,
|
|
@@ -64809,6 +64958,11 @@ class StateVariableEvaluator {
|
|
|
64809
64958
|
`Can't get value of ${stateVariable} of ${component.componentIdx} as it doesn't exist.`
|
|
64810
64959
|
);
|
|
64811
64960
|
}
|
|
64961
|
+
await ensureStateVariableMaterialized({
|
|
64962
|
+
core: this.core,
|
|
64963
|
+
component,
|
|
64964
|
+
stateVariable
|
|
64965
|
+
});
|
|
64812
64966
|
if (component.reprocessAfterEvaluate) {
|
|
64813
64967
|
let reprocessAfterEvaluate = component.reprocessAfterEvaluate;
|
|
64814
64968
|
delete component.reprocessAfterEvaluate;
|
|
@@ -69012,51 +69166,15 @@ class BaseComponent {
|
|
|
69012
69166
|
this.state = {};
|
|
69013
69167
|
if (stateVariableDefinitions[SHARED_STATE_VARIABLE_DEFINITIONS]) {
|
|
69014
69168
|
for (let stateVariable in stateVariableDefinitions) {
|
|
69015
|
-
|
|
69169
|
+
this.state[stateVariable] = Object.create(
|
|
69016
69170
|
stateVariableDefinitions[stateVariable]
|
|
69017
69171
|
);
|
|
69018
|
-
if (def.shadowingInstructions) {
|
|
69019
|
-
def.shadowingInstructions = Object.assign(
|
|
69020
|
-
{},
|
|
69021
|
-
def.shadowingInstructions
|
|
69022
|
-
);
|
|
69023
|
-
}
|
|
69024
|
-
if (def.additionalStateVariablesDefined) {
|
|
69025
|
-
def.additionalStateVariablesDefined = [
|
|
69026
|
-
...def.additionalStateVariablesDefined
|
|
69027
|
-
];
|
|
69028
|
-
}
|
|
69029
|
-
if (def.stateVariablesDeterminingDependencies) {
|
|
69030
|
-
def.stateVariablesDeterminingDependencies = [
|
|
69031
|
-
...def.stateVariablesDeterminingDependencies
|
|
69032
|
-
];
|
|
69033
|
-
}
|
|
69034
|
-
this.state[stateVariable] = def;
|
|
69035
69172
|
}
|
|
69036
69173
|
} else {
|
|
69037
69174
|
for (let stateVariable in stateVariableDefinitions) {
|
|
69038
69175
|
this.state[stateVariable] = stateVariableDefinitions[stateVariable];
|
|
69039
69176
|
}
|
|
69040
69177
|
}
|
|
69041
|
-
let workspaceAssigned = /* @__PURE__ */ new Set();
|
|
69042
|
-
for (let stateVariable in this.state) {
|
|
69043
|
-
let def = this.state[stateVariable];
|
|
69044
|
-
if (!def.createWorkspace || workspaceAssigned.has(stateVariable)) {
|
|
69045
|
-
continue;
|
|
69046
|
-
}
|
|
69047
|
-
let workspace = {};
|
|
69048
|
-
def.workspace = workspace;
|
|
69049
|
-
workspaceAssigned.add(stateVariable);
|
|
69050
|
-
if (def.additionalStateVariablesDefined) {
|
|
69051
|
-
for (let otherVar of def.additionalStateVariablesDefined) {
|
|
69052
|
-
let otherDef = this.state[otherVar];
|
|
69053
|
-
if (otherDef?.createWorkspace) {
|
|
69054
|
-
otherDef.workspace = workspace;
|
|
69055
|
-
workspaceAssigned.add(otherVar);
|
|
69056
|
-
}
|
|
69057
|
-
}
|
|
69058
|
-
}
|
|
69059
|
-
}
|
|
69060
69178
|
this.stateValues = new Proxy(this.state, createStateProxyHandler());
|
|
69061
69179
|
this.essentialState = {};
|
|
69062
69180
|
if (serializedComponent.state) {
|
|
@@ -229391,4 +229509,4 @@ export {
|
|
|
229391
229509
|
getDefaultExportFromCjs as g,
|
|
229392
229510
|
updateSyntaxFromV06toV07 as u
|
|
229393
229511
|
};
|
|
229394
|
-
//# sourceMappingURL=index-
|
|
229512
|
+
//# sourceMappingURL=index-LkbHGDuM.js.map
|