@doenet/doenetml-iframe 0.7.21-dev.348 → 0.7.21-dev.350

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 +333 -1
  2. package/index.js.map +1 -1
  3. package/package.json +1 -1
package/index.js CHANGED
@@ -857,6 +857,32 @@ nearestColor$3.from(matchColorHexByName$1);
857
857
  "transparent",
858
858
  "currentcolor"
859
859
  ]);
860
+ const DEFAULT_STYLE_VALUES$1 = {
861
+ lineOpacity: 0.7,
862
+ lineWidth: 4,
863
+ lineWidthWord: "thick",
864
+ lineStyle: "solid",
865
+ lineStyleWord: "",
866
+ markerOpacity: 0.7,
867
+ markerStyle: "circle",
868
+ markerStyleWord: "point",
869
+ markerSize: 5,
870
+ markerFilled: true,
871
+ fillOpacity: 0.3,
872
+ fillPatternOpacity: 1,
873
+ fillStyle: "solid",
874
+ fillStyleWord: "",
875
+ lineColor: "#1f5dff",
876
+ lineColorDarkMode: "#648FFF",
877
+ markerColor: "#1f5dff",
878
+ markerColorDarkMode: "#648FFF",
879
+ fillColor: "#1f5dff",
880
+ fillColorDarkMode: "#648FFF",
881
+ textColor: "black",
882
+ textColorDarkMode: "white",
883
+ highContrastColor: "#2963FF",
884
+ highContrastColorDarkMode: "#92B4FF"
885
+ };
860
886
  var r$1 = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, t$1$1 = function(r2) {
861
887
  return "string" == typeof r2 ? r2.length > 0 : "number" == typeof r2;
862
888
  }, n$1 = function(r2, t23, n2) {
@@ -1034,6 +1060,146 @@ function namesPlugin$1(e2, f2) {
1034
1060
  }, "name"]);
1035
1061
  }
1036
1062
  k$1([a11yPlugin$1, namesPlugin$1]);
1063
+ const defaultPalette$1 = {
1064
+ name: "default",
1065
+ description: "The standard Doenet styles: blue, red, brown, purple, black, and gray.",
1066
+ styles: {
1067
+ 1: { ...DEFAULT_STYLE_VALUES$1 },
1068
+ 2: {
1069
+ lineColor: "#D4042D",
1070
+ lineColorDarkMode: "#F1466A",
1071
+ lineOpacity: 0.7,
1072
+ lineWidth: 2,
1073
+ lineWidthWord: "",
1074
+ lineStyle: "solid",
1075
+ lineStyleWord: "",
1076
+ markerColor: "#D4042D",
1077
+ markerColorDarkMode: "#F1466A",
1078
+ markerOpacity: 0.7,
1079
+ markerStyle: "square",
1080
+ markerStyleWord: "square",
1081
+ markerSize: 5,
1082
+ fillColor: "#D4042D",
1083
+ fillColorDarkMode: "#F1466A",
1084
+ fillOpacity: 0.3,
1085
+ textColor: "#D4042D",
1086
+ textColorDarkMode: "#FF7A7A",
1087
+ highContrastColor: "#D4042D",
1088
+ highContrastColorDarkMode: "#FF7A7A"
1089
+ },
1090
+ 3: {
1091
+ lineColor: "#a6510c",
1092
+ lineColorDarkMode: "#F19143",
1093
+ lineOpacity: 0.7,
1094
+ lineWidth: 3,
1095
+ lineWidthWord: "",
1096
+ lineStyle: "solid",
1097
+ lineStyleWord: "",
1098
+ markerColor: "#a6510c",
1099
+ markerColorDarkMode: "#F19143",
1100
+ markerOpacity: 0.7,
1101
+ markerStyle: "triangle",
1102
+ markerStyleWord: "triangle",
1103
+ markerSize: 5,
1104
+ fillColor: "#a6510c",
1105
+ fillColorDarkMode: "#F19143",
1106
+ fillOpacity: 0.3,
1107
+ textColor: "#BE5A0E",
1108
+ textColorDarkMode: "#FFA94D",
1109
+ highContrastColor: "#BE5A0E",
1110
+ highContrastColorDarkMode: "#FFA94D"
1111
+ },
1112
+ 4: {
1113
+ lineColor: "#644CD6",
1114
+ lineColorDarkMode: "#9F8FE8",
1115
+ lineOpacity: 0.7,
1116
+ lineWidth: 2,
1117
+ lineWidthWord: "",
1118
+ lineStyle: "solid",
1119
+ lineStyleWord: "",
1120
+ markerColor: "#644CD6",
1121
+ markerColorDarkMode: "#9F8FE8",
1122
+ markerOpacity: 0.7,
1123
+ markerStyle: "diamond",
1124
+ markerStyleWord: "diamond",
1125
+ markerSize: 5,
1126
+ fillColor: "#644CD6",
1127
+ fillColorDarkMode: "#9F8FE8",
1128
+ fillOpacity: 0.3,
1129
+ textColor: "#644CD6",
1130
+ textColorDarkMode: "#B0A4EE",
1131
+ highContrastColor: "#644CD6",
1132
+ highContrastColorDarkMode: "#B0A4EE"
1133
+ },
1134
+ 5: {
1135
+ lineColor: "black",
1136
+ lineColorDarkMode: "white",
1137
+ lineOpacity: 1,
1138
+ lineWidth: 1,
1139
+ lineWidthWord: "thin",
1140
+ lineStyle: "solid",
1141
+ lineStyleWord: "",
1142
+ markerColor: "black",
1143
+ markerColorDarkMode: "white",
1144
+ markerOpacity: 1,
1145
+ markerStyle: "circle",
1146
+ markerStyleWord: "point",
1147
+ markerSize: 5,
1148
+ fillColor: "black",
1149
+ fillColorDarkMode: "white",
1150
+ fillOpacity: 0.7,
1151
+ textColor: "black",
1152
+ textColorDarkMode: "white",
1153
+ highContrastColor: "black",
1154
+ highContrastColorDarkMode: "white"
1155
+ },
1156
+ 6: {
1157
+ lineColor: "#636363",
1158
+ lineColorDarkMode: "#CCCCCC",
1159
+ lineOpacity: 0.7,
1160
+ lineWidth: 1,
1161
+ lineWidthWord: "thin",
1162
+ lineStyle: "dotted",
1163
+ lineStyleWord: "dotted",
1164
+ markerColor: "#636363",
1165
+ markerColorDarkMode: "#CCCCCC",
1166
+ markerOpacity: 0.7,
1167
+ markerStyle: "circle",
1168
+ markerStyleWord: "point",
1169
+ markerSize: 5,
1170
+ fillColor: "#636363",
1171
+ fillColorDarkMode: "#CCCCCC",
1172
+ fillOpacity: 0.3,
1173
+ textColor: "#757575",
1174
+ textColorDarkMode: "#B0B0B0",
1175
+ highContrastColor: "#757575",
1176
+ highContrastColorDarkMode: "#B0B0B0"
1177
+ }
1178
+ }
1179
+ };
1180
+ function deepFreezePalette$1(palette) {
1181
+ for (const styleDef of Object.values(palette.styles)) {
1182
+ for (const value of Object.values(styleDef)) {
1183
+ if (typeof value === "object" && value !== null) {
1184
+ Object.freeze(value);
1185
+ }
1186
+ }
1187
+ Object.freeze(styleDef);
1188
+ }
1189
+ Object.freeze(palette.styles);
1190
+ return Object.freeze(palette);
1191
+ }
1192
+ const STYLE_PALETTES$1 = Object.assign(
1193
+ /* @__PURE__ */ Object.create(null),
1194
+ {
1195
+ [defaultPalette$1.name]: deepFreezePalette$1(defaultPalette$1)
1196
+ }
1197
+ );
1198
+ Object.freeze(STYLE_PALETTES$1);
1199
+ defaultPalette$1.name;
1200
+ Object.freeze(
1201
+ Object.keys(STYLE_PALETTES$1)
1202
+ );
1037
1203
  let styleAttributes$1 = {
1038
1204
  lineColor: {
1039
1205
  componentType: "text",
@@ -38563,6 +38729,32 @@ nearestColor.from(matchColorHexByName);
38563
38729
  "transparent",
38564
38730
  "currentcolor"
38565
38731
  ]);
38732
+ const DEFAULT_STYLE_VALUES = {
38733
+ lineOpacity: 0.7,
38734
+ lineWidth: 4,
38735
+ lineWidthWord: "thick",
38736
+ lineStyle: "solid",
38737
+ lineStyleWord: "",
38738
+ markerOpacity: 0.7,
38739
+ markerStyle: "circle",
38740
+ markerStyleWord: "point",
38741
+ markerSize: 5,
38742
+ markerFilled: true,
38743
+ fillOpacity: 0.3,
38744
+ fillPatternOpacity: 1,
38745
+ fillStyle: "solid",
38746
+ fillStyleWord: "",
38747
+ lineColor: "#1f5dff",
38748
+ lineColorDarkMode: "#648FFF",
38749
+ markerColor: "#1f5dff",
38750
+ markerColorDarkMode: "#648FFF",
38751
+ fillColor: "#1f5dff",
38752
+ fillColorDarkMode: "#648FFF",
38753
+ textColor: "black",
38754
+ textColorDarkMode: "white",
38755
+ highContrastColor: "#2963FF",
38756
+ highContrastColorDarkMode: "#92B4FF"
38757
+ };
38566
38758
  var r = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, t$1 = function(r2) {
38567
38759
  return "string" == typeof r2 ? r2.length > 0 : "number" == typeof r2;
38568
38760
  }, n = function(r2, t222, n2) {
@@ -38740,6 +38932,146 @@ function namesPlugin(e2, f2) {
38740
38932
  }, "name"]);
38741
38933
  }
38742
38934
  k([a11yPlugin, namesPlugin]);
38935
+ const defaultPalette = {
38936
+ name: "default",
38937
+ description: "The standard Doenet styles: blue, red, brown, purple, black, and gray.",
38938
+ styles: {
38939
+ 1: { ...DEFAULT_STYLE_VALUES },
38940
+ 2: {
38941
+ lineColor: "#D4042D",
38942
+ lineColorDarkMode: "#F1466A",
38943
+ lineOpacity: 0.7,
38944
+ lineWidth: 2,
38945
+ lineWidthWord: "",
38946
+ lineStyle: "solid",
38947
+ lineStyleWord: "",
38948
+ markerColor: "#D4042D",
38949
+ markerColorDarkMode: "#F1466A",
38950
+ markerOpacity: 0.7,
38951
+ markerStyle: "square",
38952
+ markerStyleWord: "square",
38953
+ markerSize: 5,
38954
+ fillColor: "#D4042D",
38955
+ fillColorDarkMode: "#F1466A",
38956
+ fillOpacity: 0.3,
38957
+ textColor: "#D4042D",
38958
+ textColorDarkMode: "#FF7A7A",
38959
+ highContrastColor: "#D4042D",
38960
+ highContrastColorDarkMode: "#FF7A7A"
38961
+ },
38962
+ 3: {
38963
+ lineColor: "#a6510c",
38964
+ lineColorDarkMode: "#F19143",
38965
+ lineOpacity: 0.7,
38966
+ lineWidth: 3,
38967
+ lineWidthWord: "",
38968
+ lineStyle: "solid",
38969
+ lineStyleWord: "",
38970
+ markerColor: "#a6510c",
38971
+ markerColorDarkMode: "#F19143",
38972
+ markerOpacity: 0.7,
38973
+ markerStyle: "triangle",
38974
+ markerStyleWord: "triangle",
38975
+ markerSize: 5,
38976
+ fillColor: "#a6510c",
38977
+ fillColorDarkMode: "#F19143",
38978
+ fillOpacity: 0.3,
38979
+ textColor: "#BE5A0E",
38980
+ textColorDarkMode: "#FFA94D",
38981
+ highContrastColor: "#BE5A0E",
38982
+ highContrastColorDarkMode: "#FFA94D"
38983
+ },
38984
+ 4: {
38985
+ lineColor: "#644CD6",
38986
+ lineColorDarkMode: "#9F8FE8",
38987
+ lineOpacity: 0.7,
38988
+ lineWidth: 2,
38989
+ lineWidthWord: "",
38990
+ lineStyle: "solid",
38991
+ lineStyleWord: "",
38992
+ markerColor: "#644CD6",
38993
+ markerColorDarkMode: "#9F8FE8",
38994
+ markerOpacity: 0.7,
38995
+ markerStyle: "diamond",
38996
+ markerStyleWord: "diamond",
38997
+ markerSize: 5,
38998
+ fillColor: "#644CD6",
38999
+ fillColorDarkMode: "#9F8FE8",
39000
+ fillOpacity: 0.3,
39001
+ textColor: "#644CD6",
39002
+ textColorDarkMode: "#B0A4EE",
39003
+ highContrastColor: "#644CD6",
39004
+ highContrastColorDarkMode: "#B0A4EE"
39005
+ },
39006
+ 5: {
39007
+ lineColor: "black",
39008
+ lineColorDarkMode: "white",
39009
+ lineOpacity: 1,
39010
+ lineWidth: 1,
39011
+ lineWidthWord: "thin",
39012
+ lineStyle: "solid",
39013
+ lineStyleWord: "",
39014
+ markerColor: "black",
39015
+ markerColorDarkMode: "white",
39016
+ markerOpacity: 1,
39017
+ markerStyle: "circle",
39018
+ markerStyleWord: "point",
39019
+ markerSize: 5,
39020
+ fillColor: "black",
39021
+ fillColorDarkMode: "white",
39022
+ fillOpacity: 0.7,
39023
+ textColor: "black",
39024
+ textColorDarkMode: "white",
39025
+ highContrastColor: "black",
39026
+ highContrastColorDarkMode: "white"
39027
+ },
39028
+ 6: {
39029
+ lineColor: "#636363",
39030
+ lineColorDarkMode: "#CCCCCC",
39031
+ lineOpacity: 0.7,
39032
+ lineWidth: 1,
39033
+ lineWidthWord: "thin",
39034
+ lineStyle: "dotted",
39035
+ lineStyleWord: "dotted",
39036
+ markerColor: "#636363",
39037
+ markerColorDarkMode: "#CCCCCC",
39038
+ markerOpacity: 0.7,
39039
+ markerStyle: "circle",
39040
+ markerStyleWord: "point",
39041
+ markerSize: 5,
39042
+ fillColor: "#636363",
39043
+ fillColorDarkMode: "#CCCCCC",
39044
+ fillOpacity: 0.3,
39045
+ textColor: "#757575",
39046
+ textColorDarkMode: "#B0B0B0",
39047
+ highContrastColor: "#757575",
39048
+ highContrastColorDarkMode: "#B0B0B0"
39049
+ }
39050
+ }
39051
+ };
39052
+ function deepFreezePalette(palette) {
39053
+ for (const styleDef of Object.values(palette.styles)) {
39054
+ for (const value of Object.values(styleDef)) {
39055
+ if (typeof value === "object" && value !== null) {
39056
+ Object.freeze(value);
39057
+ }
39058
+ }
39059
+ Object.freeze(styleDef);
39060
+ }
39061
+ Object.freeze(palette.styles);
39062
+ return Object.freeze(palette);
39063
+ }
39064
+ const STYLE_PALETTES = Object.assign(
39065
+ /* @__PURE__ */ Object.create(null),
39066
+ {
39067
+ [defaultPalette.name]: deepFreezePalette(defaultPalette)
39068
+ }
39069
+ );
39070
+ Object.freeze(STYLE_PALETTES);
39071
+ defaultPalette.name;
39072
+ Object.freeze(
39073
+ Object.keys(STYLE_PALETTES)
39074
+ );
38743
39075
  let styleAttributes = {
38744
39076
  lineColor: {
38745
39077
  componentType: "text",
@@ -63411,7 +63743,7 @@ function ExternalVirtualKeyboard({
63411
63743
  }
63412
63744
  );
63413
63745
  }
63414
- const version = "0.7.21-dev.348";
63746
+ const version = "0.7.21-dev.350";
63415
63747
  const latestDoenetmlVersion = version;
63416
63748
  function subscribeToPinnedTheme() {
63417
63749
  return () => {