@doenet/v06-to-v07 0.7.24-dev.480 → 0.7.24-dev.484
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-CoQ1l7jN.js → index-vHOJ5L6p.js} +98 -32
- package/{index-CoQ1l7jN.js.map → index-vHOJ5L6p.js.map} +1 -1
- package/index.js +1 -1
- package/package.json +1 -1
- package/{sha256-DT5xJ2Hv-COfUNpbs-D3zfFexD.js → sha256-DT5xJ2Hv-DBPjDuPu-CHV4SZss.js} +2 -2
- package/{sha256-DT5xJ2Hv-COfUNpbs-D3zfFexD.js.map → sha256-DT5xJ2Hv-DBPjDuPu-CHV4SZss.js.map} +1 -1
|
@@ -45857,7 +45857,7 @@ async function cidFromArrayBuffer(data) {
|
|
|
45857
45857
|
await crypto.subtle.digest("SHA-256", new Uint8Array());
|
|
45858
45858
|
digest = (data2) => crypto.subtle.digest("SHA-256", data2);
|
|
45859
45859
|
} catch (e22) {
|
|
45860
|
-
const sha256 = (await import("./sha256-DT5xJ2Hv-
|
|
45860
|
+
const sha256 = (await import("./sha256-DT5xJ2Hv-DBPjDuPu-CHV4SZss.js").then((n2) => n2.s)).default;
|
|
45861
45861
|
digest = (data2) => sha256(data2, {
|
|
45862
45862
|
asBytes: true
|
|
45863
45863
|
});
|
|
@@ -97343,6 +97343,36 @@ class SectioningComponent extends BlockComponent {
|
|
|
97343
97343
|
return { setValue: { hideChildren } };
|
|
97344
97344
|
}
|
|
97345
97345
|
};
|
|
97346
|
+
stateVariableDefinitions.hasCascadeMessageToShow = {
|
|
97347
|
+
returnDependencies: () => ({
|
|
97348
|
+
cascadeMessageChildren: {
|
|
97349
|
+
dependencyType: "child",
|
|
97350
|
+
childGroups: ["cascadeMessages"]
|
|
97351
|
+
}
|
|
97352
|
+
}),
|
|
97353
|
+
definition({ dependencyValues }) {
|
|
97354
|
+
return {
|
|
97355
|
+
setValue: {
|
|
97356
|
+
hasCascadeMessageToShow: dependencyValues.cascadeMessageChildren.length > 0
|
|
97357
|
+
}
|
|
97358
|
+
};
|
|
97359
|
+
}
|
|
97360
|
+
};
|
|
97361
|
+
stateVariableDefinitions.showCascadeMessage = {
|
|
97362
|
+
returnDependencies: () => ({
|
|
97363
|
+
parentSectionToShowCascadeMessage: {
|
|
97364
|
+
dependencyType: "parentStateVariable",
|
|
97365
|
+
variableName: "sectionToShowCascadeMessage"
|
|
97366
|
+
}
|
|
97367
|
+
}),
|
|
97368
|
+
definition({ dependencyValues, componentIdx }) {
|
|
97369
|
+
return {
|
|
97370
|
+
setValue: {
|
|
97371
|
+
showCascadeMessage: dependencyValues.parentSectionToShowCascadeMessage === componentIdx
|
|
97372
|
+
}
|
|
97373
|
+
};
|
|
97374
|
+
}
|
|
97375
|
+
};
|
|
97346
97376
|
stateVariableDefinitions.childIndicesToRender = {
|
|
97347
97377
|
returnDependencies: () => ({
|
|
97348
97378
|
titleChildren: {
|
|
@@ -97417,10 +97447,6 @@ class SectioningComponent extends BlockComponent {
|
|
|
97417
97447
|
dependencyType: "stateVariable",
|
|
97418
97448
|
variableName: "childIndicesToRender"
|
|
97419
97449
|
},
|
|
97420
|
-
hideChildren: {
|
|
97421
|
-
dependencyType: "stateVariable",
|
|
97422
|
-
variableName: "hideChildren"
|
|
97423
|
-
},
|
|
97424
97450
|
childrenToHide: {
|
|
97425
97451
|
dependencyType: "stateVariable",
|
|
97426
97452
|
variableName: "childrenToHide"
|
|
@@ -97429,7 +97455,7 @@ class SectioningComponent extends BlockComponent {
|
|
|
97429
97455
|
},
|
|
97430
97456
|
definition({ dependencyValues, componentInfoObjects: componentInfoObjects2 }) {
|
|
97431
97457
|
let firstVisibleChild = null;
|
|
97432
|
-
if (dependencyValues.childIndicesToRender
|
|
97458
|
+
if (dependencyValues.childIndicesToRender) {
|
|
97433
97459
|
for (const ind of dependencyValues.childIndicesToRender) {
|
|
97434
97460
|
const child = dependencyValues.allChildren[ind];
|
|
97435
97461
|
if (!dependencyValues.childrenToHide.includes(
|
|
@@ -97453,6 +97479,10 @@ class SectioningComponent extends BlockComponent {
|
|
|
97453
97479
|
hideChildren: {
|
|
97454
97480
|
dependencyType: "stateVariable",
|
|
97455
97481
|
variableName: "hideChildren"
|
|
97482
|
+
},
|
|
97483
|
+
showCascadeMessage: {
|
|
97484
|
+
dependencyType: "stateVariable",
|
|
97485
|
+
variableName: "showCascadeMessage"
|
|
97456
97486
|
}
|
|
97457
97487
|
}),
|
|
97458
97488
|
definition({ dependencyValues }) {
|
|
@@ -97461,10 +97491,10 @@ class SectioningComponent extends BlockComponent {
|
|
|
97461
97491
|
dependencyValues
|
|
97462
97492
|
)) {
|
|
97463
97493
|
if (child.componentType === "cascadeMessage") {
|
|
97464
|
-
if (!dependencyValues.
|
|
97494
|
+
if (!dependencyValues.showCascadeMessage) {
|
|
97465
97495
|
childrenToHide.push(child.componentIdx);
|
|
97466
97496
|
}
|
|
97467
|
-
} else if (dependencyValues.hideChildren && typeof child === "object" && child.componentIdx !== dependencyValues.titleChildName
|
|
97497
|
+
} else if (dependencyValues.hideChildren && typeof child === "object" && child.componentIdx !== dependencyValues.titleChildName) {
|
|
97468
97498
|
childrenToHide.push(child.componentIdx);
|
|
97469
97499
|
}
|
|
97470
97500
|
}
|
|
@@ -230333,7 +230363,10 @@ class Cascade extends SectioningComponent {
|
|
|
230333
230363
|
}
|
|
230334
230364
|
};
|
|
230335
230365
|
stateVariableDefinitions.childrenToHide = {
|
|
230336
|
-
additionalStateVariablesDefined: [
|
|
230366
|
+
additionalStateVariablesDefined: [
|
|
230367
|
+
"childrenToHideChildren",
|
|
230368
|
+
"sectionToShowCascadeMessage"
|
|
230369
|
+
],
|
|
230337
230370
|
returnDependencies: () => ({
|
|
230338
230371
|
hideFutureSections: {
|
|
230339
230372
|
dependencyType: "stateVariable",
|
|
@@ -230345,7 +230378,9 @@ class Cascade extends SectioningComponent {
|
|
|
230345
230378
|
},
|
|
230346
230379
|
children: {
|
|
230347
230380
|
dependencyType: "child",
|
|
230348
|
-
childGroups: ["anything"]
|
|
230381
|
+
childGroups: ["anything"],
|
|
230382
|
+
variableNames: ["hasCascadeMessageToShow"],
|
|
230383
|
+
variablesOptional: true
|
|
230349
230384
|
},
|
|
230350
230385
|
childrenWithCascadeMessages: {
|
|
230351
230386
|
dependencyType: "child",
|
|
@@ -230358,6 +230393,10 @@ class Cascade extends SectioningComponent {
|
|
|
230358
230393
|
hideChildren: {
|
|
230359
230394
|
dependencyType: "stateVariable",
|
|
230360
230395
|
variableName: "hideChildren"
|
|
230396
|
+
},
|
|
230397
|
+
showCascadeMessage: {
|
|
230398
|
+
dependencyType: "stateVariable",
|
|
230399
|
+
variableName: "showCascadeMessage"
|
|
230361
230400
|
}
|
|
230362
230401
|
}),
|
|
230363
230402
|
definition({ dependencyValues, componentInfoObjects: componentInfoObjects2 }) {
|
|
@@ -230368,7 +230407,8 @@ class Cascade extends SectioningComponent {
|
|
|
230368
230407
|
return {
|
|
230369
230408
|
setValue: {
|
|
230370
230409
|
childrenToHide: allContinuationComponentIndices,
|
|
230371
|
-
childrenToHideChildren: []
|
|
230410
|
+
childrenToHideChildren: [],
|
|
230411
|
+
sectionToShowCascadeMessage: null
|
|
230372
230412
|
}
|
|
230373
230413
|
};
|
|
230374
230414
|
}
|
|
@@ -230391,30 +230431,46 @@ class Cascade extends SectioningComponent {
|
|
|
230391
230431
|
childrenToHide.push(child.componentIdx);
|
|
230392
230432
|
}
|
|
230393
230433
|
}
|
|
230394
|
-
|
|
230395
|
-
|
|
230396
|
-
|
|
230397
|
-
|
|
230398
|
-
|
|
230399
|
-
|
|
230400
|
-
|
|
230401
|
-
|
|
230402
|
-
|
|
230403
|
-
|
|
230404
|
-
|
|
230405
|
-
|
|
230406
|
-
|
|
230407
|
-
);
|
|
230408
|
-
} else {
|
|
230409
|
-
childrenToHide.push(...allContinuationComponentIndices);
|
|
230434
|
+
const nextStep = dependencyValues.children[dependencyValues.numCompleted + 1];
|
|
230435
|
+
const sectionToShowCascadeMessage = nextStep && childrenToHideChildren.includes(nextStep.componentIdx) && nextStep.stateValues?.hasCascadeMessageToShow ? nextStep.componentIdx : null;
|
|
230436
|
+
const continuationToShow = sectionToShowCascadeMessage === null && (!dependencyValues.hideChildren || dependencyValues.showCascadeMessage) ? nextOwnCascadeMessage(dependencyValues) : null;
|
|
230437
|
+
childrenToHide.push(
|
|
230438
|
+
...allContinuationComponentIndices.filter(
|
|
230439
|
+
(cIdx) => cIdx !== continuationToShow
|
|
230440
|
+
)
|
|
230441
|
+
);
|
|
230442
|
+
return {
|
|
230443
|
+
setValue: {
|
|
230444
|
+
childrenToHide,
|
|
230445
|
+
childrenToHideChildren,
|
|
230446
|
+
sectionToShowCascadeMessage
|
|
230410
230447
|
}
|
|
230411
|
-
}
|
|
230412
|
-
|
|
230448
|
+
};
|
|
230449
|
+
}
|
|
230450
|
+
};
|
|
230451
|
+
stateVariableDefinitions.hasCascadeMessageToShow = {
|
|
230452
|
+
returnDependencies: () => ({
|
|
230453
|
+
numCompleted: {
|
|
230454
|
+
dependencyType: "stateVariable",
|
|
230455
|
+
variableName: "numCompleted"
|
|
230456
|
+
},
|
|
230457
|
+
children: {
|
|
230458
|
+
dependencyType: "child",
|
|
230459
|
+
childGroups: ["anything"]
|
|
230460
|
+
},
|
|
230461
|
+
childrenWithCascadeMessages: {
|
|
230462
|
+
dependencyType: "child",
|
|
230463
|
+
childGroups: ["anything", "cascadeMessages"]
|
|
230464
|
+
},
|
|
230465
|
+
revealAll: {
|
|
230466
|
+
dependencyType: "stateVariable",
|
|
230467
|
+
variableName: "revealAll"
|
|
230413
230468
|
}
|
|
230469
|
+
}),
|
|
230470
|
+
definition({ dependencyValues }) {
|
|
230414
230471
|
return {
|
|
230415
230472
|
setValue: {
|
|
230416
|
-
|
|
230417
|
-
childrenToHideChildren
|
|
230473
|
+
hasCascadeMessageToShow: nextOwnCascadeMessage(dependencyValues) !== null
|
|
230418
230474
|
}
|
|
230419
230475
|
};
|
|
230420
230476
|
}
|
|
@@ -230422,6 +230478,16 @@ class Cascade extends SectioningComponent {
|
|
|
230422
230478
|
return stateVariableDefinitions;
|
|
230423
230479
|
}
|
|
230424
230480
|
}
|
|
230481
|
+
function nextOwnCascadeMessage(dependencyValues) {
|
|
230482
|
+
if (dependencyValues.revealAll || dependencyValues.numCompleted > dependencyValues.children.length - 2) {
|
|
230483
|
+
return null;
|
|
230484
|
+
}
|
|
230485
|
+
const lastShownStep = dependencyValues.children[dependencyValues.numCompleted].componentIdx;
|
|
230486
|
+
const lastShownStepIdx = dependencyValues.childrenWithCascadeMessages.findIndex(
|
|
230487
|
+
(child) => child.componentIdx === lastShownStep
|
|
230488
|
+
);
|
|
230489
|
+
return dependencyValues.childrenWithCascadeMessages.slice(lastShownStepIdx + 1).find((child) => child.componentType === "cascadeMessage")?.componentIdx ?? null;
|
|
230490
|
+
}
|
|
230425
230491
|
class DynamicChildren extends CompositeComponent {
|
|
230426
230492
|
constructor(args) {
|
|
230427
230493
|
super(args);
|
|
@@ -237290,4 +237356,4 @@ export {
|
|
|
237290
237356
|
getDefaultExportFromCjs$1 as g,
|
|
237291
237357
|
updateSyntaxFromV06toV07 as u
|
|
237292
237358
|
};
|
|
237293
|
-
//# sourceMappingURL=index-
|
|
237359
|
+
//# sourceMappingURL=index-vHOJ5L6p.js.map
|