@doenet/v06-to-v07 0.7.24-dev.477 → 0.7.24-dev.482
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-B6XSSTr-.js → index-DlfTZGFl.js} +142 -48
- package/{index-B6XSSTr-.js.map → index-DlfTZGFl.js.map} +1 -1
- package/index.js +1 -1
- package/package.json +1 -1
- package/{sha256-DT5xJ2Hv-DF9EMVpM-Co0rpFKO.js → sha256-DT5xJ2Hv-BPQuorEo-lKjpPVin.js} +2 -2
- package/{sha256-DT5xJ2Hv-DF9EMVpM-Co0rpFKO.js.map → sha256-DT5xJ2Hv-BPQuorEo-lKjpPVin.js.map} +1 -1
|
@@ -11211,7 +11211,13 @@ const DEPRECATION_REGISTRY = {
|
|
|
11211
11211
|
"isLatex",
|
|
11212
11212
|
"anchor",
|
|
11213
11213
|
"positionFromAnchor"
|
|
11214
|
-
])
|
|
11214
|
+
]),
|
|
11215
|
+
// `align` was the only mode an ODE system could ever be rendered in:
|
|
11216
|
+
// its LaTeX carries `&` alignment markers and its own `\tag`/`\notag`
|
|
11217
|
+
// (equation numbering is controlled by `number`), none of which are
|
|
11218
|
+
// legal in the delimiters the other modes of the math renderer supply.
|
|
11219
|
+
// The mode is now fixed by the component, so the attribute is dropped.
|
|
11220
|
+
odeSystem: ignoredAttributes("odeSystem", ["renderMode"])
|
|
11215
11221
|
},
|
|
11216
11222
|
attributeValueRenames: {
|
|
11217
11223
|
// The label sits beside the input in DOM order, which mirrors with the
|
|
@@ -45851,7 +45857,7 @@ async function cidFromArrayBuffer(data) {
|
|
|
45851
45857
|
await crypto.subtle.digest("SHA-256", new Uint8Array());
|
|
45852
45858
|
digest = (data2) => crypto.subtle.digest("SHA-256", data2);
|
|
45853
45859
|
} catch (e22) {
|
|
45854
|
-
const sha256 = (await import("./sha256-DT5xJ2Hv-
|
|
45860
|
+
const sha256 = (await import("./sha256-DT5xJ2Hv-BPQuorEo-lKjpPVin.js").then((n2) => n2.s)).default;
|
|
45855
45861
|
digest = (data2) => sha256(data2, {
|
|
45856
45862
|
asBytes: true
|
|
45857
45863
|
});
|
|
@@ -54553,9 +54559,9 @@ function preprocessAttributesObject(attributesObject) {
|
|
|
54553
54559
|
}
|
|
54554
54560
|
if (attrSpec.toLowerCase === true) {
|
|
54555
54561
|
if (attrSpec.defaultValue !== void 0 && attrSpec.defaultValue !== null) {
|
|
54556
|
-
attrSpec.defaultValue =
|
|
54557
|
-
|
|
54558
|
-
).toLowerCase();
|
|
54562
|
+
attrSpec.defaultValue = Array.isArray(attrSpec.defaultValue) ? attrSpec.defaultValue.map(
|
|
54563
|
+
(entry) => typeof entry === "string" ? entry.toLowerCase() : entry
|
|
54564
|
+
) : String(attrSpec.defaultValue).toLowerCase();
|
|
54559
54565
|
}
|
|
54560
54566
|
if (Array.isArray(attrSpec.validValues)) {
|
|
54561
54567
|
attrSpec.validValues = attrSpec.validValues.map((entry) => ({
|
|
@@ -78496,10 +78502,28 @@ class MathComponent extends InlineComponent {
|
|
|
78496
78502
|
Object.assign(attributes, returnNumberDisplayAttributes());
|
|
78497
78503
|
attributes.displayDigits.highlighted = true;
|
|
78498
78504
|
attributes.renderMode = {
|
|
78499
|
-
description:
|
|
78505
|
+
description: "How the math is rendered.",
|
|
78500
78506
|
createComponentOfType: "text",
|
|
78501
78507
|
createStateVariable: "renderMode",
|
|
78502
78508
|
defaultValue: "inline",
|
|
78509
|
+
toLowerCase: true,
|
|
78510
|
+
// The math renderer understands two further modes, neither of
|
|
78511
|
+
// which `<math>` can reach. `numbered` needs an `equationTag` state
|
|
78512
|
+
// variable to fill its `\tag{}`, and only the equation components
|
|
78513
|
+
// (`<me>`, `<men>`, `<odeSystem>`) define one. `align` needs `&`
|
|
78514
|
+
// alignment markers in the LaTeX, which the math-expressions
|
|
78515
|
+
// expression underlying `<math>` cannot carry — that mode is
|
|
78516
|
+
// reached through components like `<md>` instead.
|
|
78517
|
+
validValues: [
|
|
78518
|
+
{
|
|
78519
|
+
value: "inline",
|
|
78520
|
+
description: "Render inline with the surrounding text."
|
|
78521
|
+
},
|
|
78522
|
+
{
|
|
78523
|
+
value: "display",
|
|
78524
|
+
description: "Render as a centered equation on its own line."
|
|
78525
|
+
}
|
|
78526
|
+
],
|
|
78503
78527
|
public: true,
|
|
78504
78528
|
forRenderer: true
|
|
78505
78529
|
};
|
|
@@ -97393,10 +97417,6 @@ class SectioningComponent extends BlockComponent {
|
|
|
97393
97417
|
dependencyType: "stateVariable",
|
|
97394
97418
|
variableName: "childIndicesToRender"
|
|
97395
97419
|
},
|
|
97396
|
-
hideChildren: {
|
|
97397
|
-
dependencyType: "stateVariable",
|
|
97398
|
-
variableName: "hideChildren"
|
|
97399
|
-
},
|
|
97400
97420
|
childrenToHide: {
|
|
97401
97421
|
dependencyType: "stateVariable",
|
|
97402
97422
|
variableName: "childrenToHide"
|
|
@@ -97405,7 +97425,7 @@ class SectioningComponent extends BlockComponent {
|
|
|
97405
97425
|
},
|
|
97406
97426
|
definition({ dependencyValues, componentInfoObjects: componentInfoObjects2 }) {
|
|
97407
97427
|
let firstVisibleChild = null;
|
|
97408
|
-
if (dependencyValues.childIndicesToRender
|
|
97428
|
+
if (dependencyValues.childIndicesToRender) {
|
|
97409
97429
|
for (const ind of dependencyValues.childIndicesToRender) {
|
|
97410
97430
|
const child = dependencyValues.allChildren[ind];
|
|
97411
97431
|
if (!dependencyValues.childrenToHide.includes(
|
|
@@ -98685,6 +98705,24 @@ const Sectioning = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePr
|
|
|
98685
98705
|
Theorem,
|
|
98686
98706
|
externalContent
|
|
98687
98707
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
98708
|
+
const NUMBERED_MARKER_VALUES = [
|
|
98709
|
+
{ value: "1", description: "Arabic numerals: 1, 2, 3, …" },
|
|
98710
|
+
{ value: "a", description: "Lowercase letters: a, b, c, …" },
|
|
98711
|
+
{ value: "A", description: "Uppercase letters: A, B, C, …" },
|
|
98712
|
+
{
|
|
98713
|
+
value: "i",
|
|
98714
|
+
description: "Lowercase roman numerals: i, ii, iii, …"
|
|
98715
|
+
},
|
|
98716
|
+
{
|
|
98717
|
+
value: "I",
|
|
98718
|
+
description: "Uppercase roman numerals: I, II, III, …"
|
|
98719
|
+
}
|
|
98720
|
+
];
|
|
98721
|
+
const UNNUMBERED_MARKER_VALUES = [
|
|
98722
|
+
{ value: "disc", description: "A filled circle." },
|
|
98723
|
+
{ value: "circle", description: "A hollow circle." },
|
|
98724
|
+
{ value: "square", description: "A filled square." }
|
|
98725
|
+
];
|
|
98688
98726
|
class Ol extends BlockComponent {
|
|
98689
98727
|
constructor(args) {
|
|
98690
98728
|
super(args);
|
|
@@ -98720,7 +98758,8 @@ class Ol extends BlockComponent {
|
|
|
98720
98758
|
createStateVariable: "marker",
|
|
98721
98759
|
defaultValue: null,
|
|
98722
98760
|
forRenderer: true,
|
|
98723
|
-
|
|
98761
|
+
suggestedValues: NUMBERED_MARKER_VALUES,
|
|
98762
|
+
description: "Marker style for the list items: `1`, `a`, `A`, `i`, or `I`. The value is matched on its first character, so a decorated form such as `1.` or `a)` selects the same style. Defaults to a style chosen by the list's nesting level."
|
|
98724
98763
|
};
|
|
98725
98764
|
let scoredSectionAttributes = returnScoredSectionAttributes();
|
|
98726
98765
|
Object.assign(attributes, scoredSectionAttributes);
|
|
@@ -98817,6 +98856,17 @@ class Ul extends Ol {
|
|
|
98817
98856
|
summary: "An unordered list"
|
|
98818
98857
|
};
|
|
98819
98858
|
static rendererType = "list";
|
|
98859
|
+
static createAttributesObject() {
|
|
98860
|
+
let attributes = super.createAttributesObject();
|
|
98861
|
+
const { suggestedValues: _numberedMarkers, ...inheritedMarker } = attributes.marker;
|
|
98862
|
+
attributes.marker = {
|
|
98863
|
+
...inheritedMarker,
|
|
98864
|
+
toLowerCase: true,
|
|
98865
|
+
validValues: UNNUMBERED_MARKER_VALUES,
|
|
98866
|
+
description: "Marker style for the list items: `disc`, `circle`, or `square`. Defaults to a style chosen by the list's nesting level."
|
|
98867
|
+
};
|
|
98868
|
+
return attributes;
|
|
98869
|
+
}
|
|
98820
98870
|
static returnStateVariableDefinitions() {
|
|
98821
98871
|
let stateVariableDefinitions = super.returnStateVariableDefinitions();
|
|
98822
98872
|
stateVariableDefinitions.numbered = {
|
|
@@ -98996,14 +99046,6 @@ class ODESystem extends InlineComponent {
|
|
|
98996
99046
|
description: "The value of the independent variable at which the initial conditions are specified."
|
|
98997
99047
|
};
|
|
98998
99048
|
Object.assign(attributes, returnNumberDisplayAttributes());
|
|
98999
|
-
attributes.renderMode = {
|
|
99000
|
-
createComponentOfType: "text",
|
|
99001
|
-
createStateVariable: "renderMode",
|
|
99002
|
-
defaultValue: "align",
|
|
99003
|
-
public: true,
|
|
99004
|
-
forRenderer: true,
|
|
99005
|
-
description: 'How to format the rendered system of equations (e.g. "align").'
|
|
99006
|
-
};
|
|
99007
99049
|
attributes.chunkSize = {
|
|
99008
99050
|
createComponentOfType: "number",
|
|
99009
99051
|
createStateVariable: "chunkSize",
|
|
@@ -99301,6 +99343,11 @@ class ODESystem extends InlineComponent {
|
|
|
99301
99343
|
targetVariableName: "initialCondition1",
|
|
99302
99344
|
description: "The initial value of the first dependent variable at the initial independent-variable value."
|
|
99303
99345
|
};
|
|
99346
|
+
stateVariableDefinitions.renderMode = {
|
|
99347
|
+
forRenderer: true,
|
|
99348
|
+
returnDependencies: () => ({}),
|
|
99349
|
+
definition: () => ({ setValue: { renderMode: "align" } })
|
|
99350
|
+
};
|
|
99304
99351
|
stateVariableDefinitions.equationTag = {
|
|
99305
99352
|
description: "The displayed equation number tag (when equation numbering is enabled).",
|
|
99306
99353
|
public: true,
|
|
@@ -155591,6 +155638,29 @@ let Graph$1 = class Graph extends BlockComponent {
|
|
|
155591
155638
|
attributes.grid = {
|
|
155592
155639
|
createComponentOfType: "text",
|
|
155593
155640
|
valueForTrue: "medium",
|
|
155641
|
+
suggestedValues: [
|
|
155642
|
+
{ value: "none", description: "Draw no grid lines." },
|
|
155643
|
+
{
|
|
155644
|
+
value: "medium",
|
|
155645
|
+
description: "Draw grid lines at the major tick marks. Used when `grid` is given with no value."
|
|
155646
|
+
},
|
|
155647
|
+
{
|
|
155648
|
+
value: "dense",
|
|
155649
|
+
description: "Draw grid lines at the major and minor tick marks."
|
|
155650
|
+
},
|
|
155651
|
+
// Two examples of the numeric form, which the named spacings
|
|
155652
|
+
// would otherwise hide: an author scanning a list of three
|
|
155653
|
+
// words has no reason to guess that spacings can be given
|
|
155654
|
+
// explicitly.
|
|
155655
|
+
{
|
|
155656
|
+
value: "1 1",
|
|
155657
|
+
description: "Draw grid lines every 1 unit in x and every 1 unit in y. Any two positive numbers can be given this way."
|
|
155658
|
+
},
|
|
155659
|
+
{
|
|
155660
|
+
value: "2 2",
|
|
155661
|
+
description: "Draw grid lines every 2 units in x and every 2 units in y."
|
|
155662
|
+
}
|
|
155663
|
+
],
|
|
155594
155664
|
description: 'Grid line spacing on the graph: none, medium, dense, or two positive numbers giving the x and y spacing, such as grid="1 0.5".'
|
|
155595
155665
|
};
|
|
155596
155666
|
Object.assign(attributes, returnNumberDisplayAttributes());
|
|
@@ -225554,6 +225624,36 @@ class DataFrame extends BaseComponent {
|
|
|
225554
225624
|
}
|
|
225555
225625
|
}
|
|
225556
225626
|
const { mean, std, variance, median, quantileSeq } = Context.math;
|
|
225627
|
+
const STATISTIC_VALUES = [
|
|
225628
|
+
{ value: "mean", description: "The arithmetic mean." },
|
|
225629
|
+
{ value: "stdev", description: "The standard deviation." },
|
|
225630
|
+
{ value: "variance", description: "The variance." },
|
|
225631
|
+
{ value: "stderr", description: "The standard error." },
|
|
225632
|
+
{
|
|
225633
|
+
value: "count",
|
|
225634
|
+
description: "The number of non-missing values."
|
|
225635
|
+
},
|
|
225636
|
+
{ value: "minimum", description: "The smallest value." },
|
|
225637
|
+
{ value: "quartile1", description: "The first quartile." },
|
|
225638
|
+
{ value: "median", description: "The median." },
|
|
225639
|
+
{ value: "quartile3", description: "The third quartile." },
|
|
225640
|
+
{ value: "maximum", description: "The largest value." },
|
|
225641
|
+
{
|
|
225642
|
+
value: "range",
|
|
225643
|
+
description: "The maximum minus the minimum."
|
|
225644
|
+
},
|
|
225645
|
+
{ value: "sum", description: "The sum of the values." }
|
|
225646
|
+
];
|
|
225647
|
+
const DEFAULT_STATISTICS = [
|
|
225648
|
+
"mean",
|
|
225649
|
+
"stdev",
|
|
225650
|
+
"count",
|
|
225651
|
+
"minimum",
|
|
225652
|
+
"quartile1",
|
|
225653
|
+
"median",
|
|
225654
|
+
"quartile3",
|
|
225655
|
+
"maximum"
|
|
225656
|
+
];
|
|
225557
225657
|
class SummaryStatistics extends BlockComponent {
|
|
225558
225658
|
constructor(args) {
|
|
225559
225659
|
super(args);
|
|
@@ -225584,6 +225684,24 @@ class SummaryStatistics extends BlockComponent {
|
|
|
225584
225684
|
createComponentOfType: "textList",
|
|
225585
225685
|
createStateVariable: "statisticsToDisplayPrelim",
|
|
225586
225686
|
defaultValue: ["default"],
|
|
225687
|
+
toLowerCase: true,
|
|
225688
|
+
// `default` and `all` are selections over the statistics rather
|
|
225689
|
+
// than statistics of their own, so they are listed here rather
|
|
225690
|
+
// than in `STATISTIC_VALUES`.
|
|
225691
|
+
//
|
|
225692
|
+
// The component sets `excludeFromSchema`, so these values do not
|
|
225693
|
+
// yet reach autocomplete or the reference docs; what they buy
|
|
225694
|
+
// today is the runtime validation — an unrecognized statistic is
|
|
225695
|
+
// dropped with an info diagnostic instead of being ignored in
|
|
225696
|
+
// silence.
|
|
225697
|
+
validValues: [
|
|
225698
|
+
{
|
|
225699
|
+
value: "default",
|
|
225700
|
+
description: `The default selection: ${DEFAULT_STATISTICS.join(", ")}.`
|
|
225701
|
+
},
|
|
225702
|
+
{ value: "all", description: "Every statistic listed here." },
|
|
225703
|
+
...STATISTIC_VALUES
|
|
225704
|
+
],
|
|
225587
225705
|
description: 'Which summary statistics to display (or "default" / "all").'
|
|
225588
225706
|
};
|
|
225589
225707
|
attributes.byCategoryColumn = {
|
|
@@ -225615,35 +225733,11 @@ class SummaryStatistics extends BlockComponent {
|
|
|
225615
225733
|
}
|
|
225616
225734
|
}),
|
|
225617
225735
|
definition: function({ dependencyValues }) {
|
|
225618
|
-
|
|
225619
|
-
"mean",
|
|
225620
|
-
"stdev",
|
|
225621
|
-
"variance",
|
|
225622
|
-
"stderr",
|
|
225623
|
-
"count",
|
|
225624
|
-
"minimum",
|
|
225625
|
-
"quartile1",
|
|
225626
|
-
"median",
|
|
225627
|
-
"quartile3",
|
|
225628
|
-
"maximum",
|
|
225629
|
-
"range",
|
|
225630
|
-
"sum"
|
|
225631
|
-
];
|
|
225736
|
+
const options = STATISTIC_VALUES.map((entry) => entry.value);
|
|
225632
225737
|
let statisticsToDisplay = [];
|
|
225633
|
-
let desiredStats = dependencyValues.statisticsToDisplayPrelim
|
|
225634
|
-
(x2) => x2.toLowerCase()
|
|
225635
|
-
);
|
|
225738
|
+
let desiredStats = dependencyValues.statisticsToDisplayPrelim;
|
|
225636
225739
|
if (desiredStats.includes("default")) {
|
|
225637
|
-
statisticsToDisplay = [
|
|
225638
|
-
"mean",
|
|
225639
|
-
"stdev",
|
|
225640
|
-
"count",
|
|
225641
|
-
"minimum",
|
|
225642
|
-
"quartile1",
|
|
225643
|
-
"median",
|
|
225644
|
-
"quartile3",
|
|
225645
|
-
"maximum"
|
|
225646
|
-
];
|
|
225740
|
+
statisticsToDisplay = [...DEFAULT_STATISTICS];
|
|
225647
225741
|
} else if (desiredStats.includes("all")) {
|
|
225648
225742
|
statisticsToDisplay = [...options];
|
|
225649
225743
|
} else {
|
|
@@ -237192,4 +237286,4 @@ export {
|
|
|
237192
237286
|
getDefaultExportFromCjs$1 as g,
|
|
237193
237287
|
updateSyntaxFromV06toV07 as u
|
|
237194
237288
|
};
|
|
237195
|
-
//# sourceMappingURL=index-
|
|
237289
|
+
//# sourceMappingURL=index-DlfTZGFl.js.map
|