@doenet/doenetml-iframe 0.7.17-dev.20260525173957.ca00a1f → 0.7.17-dev.20260526044006.374a4c1

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.
Files changed (3) hide show
  1. package/index.js +471 -1
  2. package/index.js.map +1 -1
  3. package/package.json +1 -1
package/index.js CHANGED
@@ -25342,6 +25342,241 @@ function requireGetContrast$1() {
25342
25342
  }
25343
25343
  requireGetContrast$1();
25344
25344
  requireRgb$1();
25345
+ let styleAttributes$1 = {
25346
+ lineColor: {
25347
+ componentType: "text",
25348
+ description: "Color used for line strokes (light mode)."
25349
+ },
25350
+ lineColorWord: {
25351
+ componentType: "text",
25352
+ description: "Human-readable name of the line color (light mode)."
25353
+ },
25354
+ lineColorDarkMode: {
25355
+ componentType: "text",
25356
+ description: "Color used for line strokes (dark mode)."
25357
+ },
25358
+ lineColorWordDarkMode: {
25359
+ componentType: "text",
25360
+ description: "Human-readable name of the line color (dark mode)."
25361
+ },
25362
+ lineOpacity: {
25363
+ componentType: "number",
25364
+ description: "Opacity of line strokes, 0 to 1."
25365
+ },
25366
+ lineWidth: {
25367
+ componentType: "number",
25368
+ description: "Stroke width for lines, in pixels."
25369
+ },
25370
+ lineWidthWord: {
25371
+ componentType: "text",
25372
+ description: "Human-readable name of the line width."
25373
+ },
25374
+ lineStyle: {
25375
+ componentType: "text",
25376
+ description: "Stroke style for lines.",
25377
+ toLowerCase: true,
25378
+ validValues: [
25379
+ { value: "solid", description: "Continuous, unbroken stroke." },
25380
+ {
25381
+ value: "dashed",
25382
+ description: "Stroke composed of evenly-spaced dashes."
25383
+ },
25384
+ {
25385
+ value: "dotted",
25386
+ description: "Stroke composed of evenly-spaced dots."
25387
+ }
25388
+ ]
25389
+ },
25390
+ lineStyleWord: {
25391
+ componentType: "text",
25392
+ description: "Human-readable name of the line style."
25393
+ },
25394
+ markerColor: {
25395
+ componentType: "text",
25396
+ description: "Color used for markers/points (light mode)."
25397
+ },
25398
+ markerColorWord: {
25399
+ componentType: "text",
25400
+ description: "Human-readable name of the marker color (light mode)."
25401
+ },
25402
+ markerColorDarkMode: {
25403
+ componentType: "text",
25404
+ description: "Color used for markers/points (dark mode)."
25405
+ },
25406
+ markerColorWordDarkMode: {
25407
+ componentType: "text",
25408
+ description: "Human-readable name of the marker color (dark mode)."
25409
+ },
25410
+ markerOpacity: {
25411
+ componentType: "number",
25412
+ description: "Opacity of markers/points, 0 to 1."
25413
+ },
25414
+ markerStyle: {
25415
+ componentType: "text",
25416
+ description: "Marker shape.",
25417
+ toLowerCase: true,
25418
+ validValues: [
25419
+ { value: "circle", description: "Circular marker." },
25420
+ { value: "square", description: "Square marker." },
25421
+ {
25422
+ value: "triangle",
25423
+ description: 'Triangular marker pointing up (alias for "triangleUp").'
25424
+ },
25425
+ {
25426
+ value: "triangleUp",
25427
+ description: "Triangular marker pointing up."
25428
+ },
25429
+ {
25430
+ value: "triangleDown",
25431
+ description: "Triangular marker pointing down."
25432
+ },
25433
+ {
25434
+ value: "triangleLeft",
25435
+ description: "Triangular marker pointing left."
25436
+ },
25437
+ {
25438
+ value: "triangleRight",
25439
+ description: "Triangular marker pointing right."
25440
+ },
25441
+ { value: "diamond", description: "Diamond-shaped marker." },
25442
+ { value: "cross", description: "Cross-shaped marker (×)." },
25443
+ { value: "plus", description: "Plus-shaped marker (+)." }
25444
+ ]
25445
+ },
25446
+ markerStyleWord: {
25447
+ componentType: "text",
25448
+ description: "Human-readable name of the marker style."
25449
+ },
25450
+ markerSize: {
25451
+ componentType: "number",
25452
+ description: "Marker size in pixels."
25453
+ },
25454
+ markerFilled: {
25455
+ componentType: "boolean",
25456
+ description: "Whether the marker is rendered filled (true) or open (false). Has no effect when markerStyle is cross or plus, which have no interior."
25457
+ },
25458
+ fillColor: {
25459
+ componentType: "text",
25460
+ description: "Fill color used inside closed shapes (light mode)."
25461
+ },
25462
+ fillColorWord: {
25463
+ componentType: "text",
25464
+ description: "Human-readable name of the fill color (light mode)."
25465
+ },
25466
+ fillColorDarkMode: {
25467
+ componentType: "text",
25468
+ description: "Fill color used inside closed shapes (dark mode)."
25469
+ },
25470
+ fillColorWordDarkMode: {
25471
+ componentType: "text",
25472
+ description: "Human-readable name of the fill color (dark mode)."
25473
+ },
25474
+ fillOpacity: {
25475
+ componentType: "number",
25476
+ description: "Opacity of fills, 0 to 1."
25477
+ },
25478
+ textColor: {
25479
+ componentType: "text",
25480
+ description: "Text color (light mode)."
25481
+ },
25482
+ textColorWord: {
25483
+ componentType: "text",
25484
+ description: "Human-readable name of the text color (light mode)."
25485
+ },
25486
+ textColorDarkMode: {
25487
+ componentType: "text",
25488
+ description: "Text color (dark mode)."
25489
+ },
25490
+ textColorWordDarkMode: {
25491
+ componentType: "text",
25492
+ description: "Human-readable name of the text color (dark mode)."
25493
+ },
25494
+ highContrastColor: {
25495
+ componentType: "text",
25496
+ description: "High-contrast accent color (light mode)."
25497
+ },
25498
+ highContrastColorWord: {
25499
+ componentType: "text",
25500
+ description: "Human-readable name of the high-contrast accent color (light mode)."
25501
+ },
25502
+ highContrastColorDarkMode: {
25503
+ componentType: "text",
25504
+ description: "High-contrast accent color (dark mode)."
25505
+ },
25506
+ highContrastColorWordDarkMode: {
25507
+ componentType: "text",
25508
+ description: "Human-readable name of the high-contrast accent color (dark mode)."
25509
+ },
25510
+ backgroundColor: {
25511
+ componentType: "text",
25512
+ description: "Background color (light mode)."
25513
+ },
25514
+ backgroundColorWord: {
25515
+ componentType: "text",
25516
+ description: "Human-readable name of the background color (light mode)."
25517
+ },
25518
+ backgroundColorDarkMode: {
25519
+ componentType: "text",
25520
+ description: "Background color (dark mode)."
25521
+ },
25522
+ backgroundColorWordDarkMode: {
25523
+ componentType: "text",
25524
+ description: "Human-readable name of the background color (dark mode)."
25525
+ }
25526
+ };
25527
+ styleAttributes$1.markerStyle.validValues.filter(
25528
+ (entry) => entry.value !== "cross" && entry.value !== "plus"
25529
+ );
25530
+ const MARKER_OVERRIDE_KEYS$1 = [
25531
+ "markerStyle",
25532
+ "markerSize",
25533
+ "markerFilled"
25534
+ ];
25535
+ const LINE_OVERRIDE_KEYS$1 = [
25536
+ "lineStyle",
25537
+ "lineWidth"
25538
+ ];
25539
+ const FILL_OVERRIDE_KEYS$1 = [
25540
+ "fillOpacity"
25541
+ ];
25542
+ const markerOverrideAttributes$1 = Object.fromEntries(
25543
+ MARKER_OVERRIDE_KEYS$1.map((key) => [key, styleAttributes$1[key]])
25544
+ );
25545
+ const lineOverrideAttributes$1 = Object.fromEntries(
25546
+ LINE_OVERRIDE_KEYS$1.map((key) => [key, styleAttributes$1[key]])
25547
+ );
25548
+ const fillOverrideAttributes$1 = Object.fromEntries(
25549
+ FILL_OVERRIDE_KEYS$1.map((key) => [key, styleAttributes$1[key]])
25550
+ );
25551
+ ({
25552
+ ...markerOverrideAttributes$1,
25553
+ ...lineOverrideAttributes$1,
25554
+ ...fillOverrideAttributes$1
25555
+ });
25556
+ const STYLE_OVERRIDE_CATEGORIES$1 = {
25557
+ marker: markerOverrideAttributes$1,
25558
+ line: lineOverrideAttributes$1,
25559
+ fill: fillOverrideAttributes$1
25560
+ };
25561
+ for (const [category, group2] of Object.entries(STYLE_OVERRIDE_CATEGORIES$1)) {
25562
+ for (const [key, spec] of Object.entries(group2)) {
25563
+ if (key.toLowerCase().includes("color")) {
25564
+ throw new Error(
25565
+ `Style override category "${category}" contains color-related key "${key}"; colors stay <styleDefinition>-only so per-styleNumber WCAG contrast diagnostics remain authoritative. If this is intentional, also reconcile the lowercase asymmetry in returnSelectedStyleStateVariableDefinition.`
25566
+ );
25567
+ }
25568
+ if (key.endsWith("Opacity") && key !== "fillOpacity") {
25569
+ throw new Error(
25570
+ `Style override category "${category}" contains contrast-feeding opacity key "${key}"; lineOpacity and markerOpacity feed the WCAG contrast diagnostic as an opacityMultiplier on the foreground alpha, so they stay <styleDefinition>-only alongside colors. Only fillOpacity is contrast-irrelevant and overridable.`
25571
+ );
25572
+ }
25573
+ if (spec.componentType === "text" && !spec.toLowerCase) {
25574
+ throw new Error(
25575
+ `Style override key "${key}" in category "${category}" is text-typed but missing toLowerCase: true. Add toLowerCase: true to its styleAttributes entry, or move it out of the override surface.`
25576
+ );
25577
+ }
25578
+ }
25579
+ }
25345
25580
  var cssesc_1$1;
25346
25581
  var hasRequiredCssesc$1;
25347
25582
  function requireCssesc$1() {
@@ -62065,6 +62300,241 @@ function requireGetContrast() {
62065
62300
  }
62066
62301
  requireGetContrast();
62067
62302
  requireRgb();
62303
+ let styleAttributes = {
62304
+ lineColor: {
62305
+ componentType: "text",
62306
+ description: "Color used for line strokes (light mode)."
62307
+ },
62308
+ lineColorWord: {
62309
+ componentType: "text",
62310
+ description: "Human-readable name of the line color (light mode)."
62311
+ },
62312
+ lineColorDarkMode: {
62313
+ componentType: "text",
62314
+ description: "Color used for line strokes (dark mode)."
62315
+ },
62316
+ lineColorWordDarkMode: {
62317
+ componentType: "text",
62318
+ description: "Human-readable name of the line color (dark mode)."
62319
+ },
62320
+ lineOpacity: {
62321
+ componentType: "number",
62322
+ description: "Opacity of line strokes, 0 to 1."
62323
+ },
62324
+ lineWidth: {
62325
+ componentType: "number",
62326
+ description: "Stroke width for lines, in pixels."
62327
+ },
62328
+ lineWidthWord: {
62329
+ componentType: "text",
62330
+ description: "Human-readable name of the line width."
62331
+ },
62332
+ lineStyle: {
62333
+ componentType: "text",
62334
+ description: "Stroke style for lines.",
62335
+ toLowerCase: true,
62336
+ validValues: [
62337
+ { value: "solid", description: "Continuous, unbroken stroke." },
62338
+ {
62339
+ value: "dashed",
62340
+ description: "Stroke composed of evenly-spaced dashes."
62341
+ },
62342
+ {
62343
+ value: "dotted",
62344
+ description: "Stroke composed of evenly-spaced dots."
62345
+ }
62346
+ ]
62347
+ },
62348
+ lineStyleWord: {
62349
+ componentType: "text",
62350
+ description: "Human-readable name of the line style."
62351
+ },
62352
+ markerColor: {
62353
+ componentType: "text",
62354
+ description: "Color used for markers/points (light mode)."
62355
+ },
62356
+ markerColorWord: {
62357
+ componentType: "text",
62358
+ description: "Human-readable name of the marker color (light mode)."
62359
+ },
62360
+ markerColorDarkMode: {
62361
+ componentType: "text",
62362
+ description: "Color used for markers/points (dark mode)."
62363
+ },
62364
+ markerColorWordDarkMode: {
62365
+ componentType: "text",
62366
+ description: "Human-readable name of the marker color (dark mode)."
62367
+ },
62368
+ markerOpacity: {
62369
+ componentType: "number",
62370
+ description: "Opacity of markers/points, 0 to 1."
62371
+ },
62372
+ markerStyle: {
62373
+ componentType: "text",
62374
+ description: "Marker shape.",
62375
+ toLowerCase: true,
62376
+ validValues: [
62377
+ { value: "circle", description: "Circular marker." },
62378
+ { value: "square", description: "Square marker." },
62379
+ {
62380
+ value: "triangle",
62381
+ description: 'Triangular marker pointing up (alias for "triangleUp").'
62382
+ },
62383
+ {
62384
+ value: "triangleUp",
62385
+ description: "Triangular marker pointing up."
62386
+ },
62387
+ {
62388
+ value: "triangleDown",
62389
+ description: "Triangular marker pointing down."
62390
+ },
62391
+ {
62392
+ value: "triangleLeft",
62393
+ description: "Triangular marker pointing left."
62394
+ },
62395
+ {
62396
+ value: "triangleRight",
62397
+ description: "Triangular marker pointing right."
62398
+ },
62399
+ { value: "diamond", description: "Diamond-shaped marker." },
62400
+ { value: "cross", description: "Cross-shaped marker (×)." },
62401
+ { value: "plus", description: "Plus-shaped marker (+)." }
62402
+ ]
62403
+ },
62404
+ markerStyleWord: {
62405
+ componentType: "text",
62406
+ description: "Human-readable name of the marker style."
62407
+ },
62408
+ markerSize: {
62409
+ componentType: "number",
62410
+ description: "Marker size in pixels."
62411
+ },
62412
+ markerFilled: {
62413
+ componentType: "boolean",
62414
+ description: "Whether the marker is rendered filled (true) or open (false). Has no effect when markerStyle is cross or plus, which have no interior."
62415
+ },
62416
+ fillColor: {
62417
+ componentType: "text",
62418
+ description: "Fill color used inside closed shapes (light mode)."
62419
+ },
62420
+ fillColorWord: {
62421
+ componentType: "text",
62422
+ description: "Human-readable name of the fill color (light mode)."
62423
+ },
62424
+ fillColorDarkMode: {
62425
+ componentType: "text",
62426
+ description: "Fill color used inside closed shapes (dark mode)."
62427
+ },
62428
+ fillColorWordDarkMode: {
62429
+ componentType: "text",
62430
+ description: "Human-readable name of the fill color (dark mode)."
62431
+ },
62432
+ fillOpacity: {
62433
+ componentType: "number",
62434
+ description: "Opacity of fills, 0 to 1."
62435
+ },
62436
+ textColor: {
62437
+ componentType: "text",
62438
+ description: "Text color (light mode)."
62439
+ },
62440
+ textColorWord: {
62441
+ componentType: "text",
62442
+ description: "Human-readable name of the text color (light mode)."
62443
+ },
62444
+ textColorDarkMode: {
62445
+ componentType: "text",
62446
+ description: "Text color (dark mode)."
62447
+ },
62448
+ textColorWordDarkMode: {
62449
+ componentType: "text",
62450
+ description: "Human-readable name of the text color (dark mode)."
62451
+ },
62452
+ highContrastColor: {
62453
+ componentType: "text",
62454
+ description: "High-contrast accent color (light mode)."
62455
+ },
62456
+ highContrastColorWord: {
62457
+ componentType: "text",
62458
+ description: "Human-readable name of the high-contrast accent color (light mode)."
62459
+ },
62460
+ highContrastColorDarkMode: {
62461
+ componentType: "text",
62462
+ description: "High-contrast accent color (dark mode)."
62463
+ },
62464
+ highContrastColorWordDarkMode: {
62465
+ componentType: "text",
62466
+ description: "Human-readable name of the high-contrast accent color (dark mode)."
62467
+ },
62468
+ backgroundColor: {
62469
+ componentType: "text",
62470
+ description: "Background color (light mode)."
62471
+ },
62472
+ backgroundColorWord: {
62473
+ componentType: "text",
62474
+ description: "Human-readable name of the background color (light mode)."
62475
+ },
62476
+ backgroundColorDarkMode: {
62477
+ componentType: "text",
62478
+ description: "Background color (dark mode)."
62479
+ },
62480
+ backgroundColorWordDarkMode: {
62481
+ componentType: "text",
62482
+ description: "Human-readable name of the background color (dark mode)."
62483
+ }
62484
+ };
62485
+ styleAttributes.markerStyle.validValues.filter(
62486
+ (entry) => entry.value !== "cross" && entry.value !== "plus"
62487
+ );
62488
+ const MARKER_OVERRIDE_KEYS = [
62489
+ "markerStyle",
62490
+ "markerSize",
62491
+ "markerFilled"
62492
+ ];
62493
+ const LINE_OVERRIDE_KEYS = [
62494
+ "lineStyle",
62495
+ "lineWidth"
62496
+ ];
62497
+ const FILL_OVERRIDE_KEYS = [
62498
+ "fillOpacity"
62499
+ ];
62500
+ const markerOverrideAttributes = Object.fromEntries(
62501
+ MARKER_OVERRIDE_KEYS.map((key) => [key, styleAttributes[key]])
62502
+ );
62503
+ const lineOverrideAttributes = Object.fromEntries(
62504
+ LINE_OVERRIDE_KEYS.map((key) => [key, styleAttributes[key]])
62505
+ );
62506
+ const fillOverrideAttributes = Object.fromEntries(
62507
+ FILL_OVERRIDE_KEYS.map((key) => [key, styleAttributes[key]])
62508
+ );
62509
+ ({
62510
+ ...markerOverrideAttributes,
62511
+ ...lineOverrideAttributes,
62512
+ ...fillOverrideAttributes
62513
+ });
62514
+ const STYLE_OVERRIDE_CATEGORIES = {
62515
+ marker: markerOverrideAttributes,
62516
+ line: lineOverrideAttributes,
62517
+ fill: fillOverrideAttributes
62518
+ };
62519
+ for (const [category, group2] of Object.entries(STYLE_OVERRIDE_CATEGORIES)) {
62520
+ for (const [key, spec] of Object.entries(group2)) {
62521
+ if (key.toLowerCase().includes("color")) {
62522
+ throw new Error(
62523
+ `Style override category "${category}" contains color-related key "${key}"; colors stay <styleDefinition>-only so per-styleNumber WCAG contrast diagnostics remain authoritative. If this is intentional, also reconcile the lowercase asymmetry in returnSelectedStyleStateVariableDefinition.`
62524
+ );
62525
+ }
62526
+ if (key.endsWith("Opacity") && key !== "fillOpacity") {
62527
+ throw new Error(
62528
+ `Style override category "${category}" contains contrast-feeding opacity key "${key}"; lineOpacity and markerOpacity feed the WCAG contrast diagnostic as an opacityMultiplier on the foreground alpha, so they stay <styleDefinition>-only alongside colors. Only fillOpacity is contrast-irrelevant and overridable.`
62529
+ );
62530
+ }
62531
+ if (spec.componentType === "text" && !spec.toLowerCase) {
62532
+ throw new Error(
62533
+ `Style override key "${key}" in category "${category}" is text-typed but missing toLowerCase: true. Add toLowerCase: true to its styleAttributes entry, or move it out of the override surface.`
62534
+ );
62535
+ }
62536
+ }
62537
+ }
62068
62538
  var cssesc_1;
62069
62539
  var hasRequiredCssesc;
62070
62540
  function requireCssesc() {
@@ -62224,7 +62694,7 @@ function ExternalVirtualKeyboard() {
62224
62694
  }
62225
62695
  );
62226
62696
  }
62227
- const version = "0.7.17-dev.20260525173957.ca00a1f";
62697
+ const version = "0.7.17-dev.20260526044006.374a4c1";
62228
62698
  const latestDoenetmlVersion = version;
62229
62699
  function DoenetViewer({
62230
62700
  doenetML,