@pie-element/multi-trait-rubric 8.1.2-next.29 → 8.1.2-next.30

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.
@@ -1,4 +1,4 @@
1
- import { C as e, E as t, Et as n, H as r, P as i, _ as a, _t as o, bt as s, ft as c, ht as l, i as u, it as d, kt as f, lt as p, n as m, ot as h, r as g, t as _, tt as v, vt as y, w as b, x, yt as S } from "../Typography-f7AYth_Y.js";
1
+ import { At as e, C as t, D as n, Dt as r, F as i, T as a, U as o, _ as s, at as c, bt as l, gt as u, i as d, n as f, nt as p, pt as m, r as h, st as g, t as _, ut as v, vt as y, x as b, xt as x, yt as S } from "../Typography-B5wfbADL.js";
2
2
  import * as C from "react";
3
3
  import w from "react";
4
4
  import { createRoot as T } from "react-dom/client";
@@ -37,11 +37,11 @@ var O = class e extends CustomEvent {
37
37
  });
38
38
  //#endregion
39
39
  //#region src/delivery/trait.tsx
40
- var k = /* @__PURE__ */ f(n(), 1), A = h("td")({
41
- color: d.primaryDark(),
40
+ var k = /* @__PURE__ */ e(r(), 1), A = g("td")({
41
+ color: c.primaryDark(),
42
42
  verticalAlign: "middle"
43
- }), j = h("div")({
44
- color: d.secondaryBackground(),
43
+ }), j = g("div")({
44
+ color: c.secondaryBackground(),
45
45
  textAlign: "center"
46
46
  }), M = (e) => {
47
47
  let { trait: t, traitIndex: n, scaleIndex: r, showStandards: i, showDescription: a, scorePointsValues: o } = e, { name: s, standards: c, scorePointsDescriptors: l, description: u } = t || {};
@@ -75,17 +75,17 @@ M.propTypes = {
75
75
  };
76
76
  //#endregion
77
77
  //#region src/delivery/scale.tsx
78
- var N = h("div")({
78
+ var N = g("div")({
79
79
  display: "flex",
80
80
  position: "relative"
81
- }), P = h("div")({
81
+ }), P = g("div")({
82
82
  width: "100%",
83
83
  overflow: "auto"
84
- }), F = h("table")(({ theme: e }) => ({
84
+ }), F = g("table")(({ theme: e }) => ({
85
85
  borderSpacing: 0,
86
86
  marginBottom: e.spacing(2),
87
87
  borderRadius: "4px",
88
- color: d.text(),
88
+ color: c.text(),
89
89
  fontSize: e.typography.fontSize,
90
90
  lineHeight: "16px",
91
91
  overflow: "unset",
@@ -96,7 +96,7 @@ var N = h("div")({
96
96
  "& th": {
97
97
  padding: e.spacing(2),
98
98
  textAlign: "left",
99
- backgroundColor: d.secondaryBackground(),
99
+ backgroundColor: c.secondaryBackground(),
100
100
  verticalAlign: "bottom"
101
101
  },
102
102
  "& th div": { width: "200px" },
@@ -105,12 +105,12 @@ var N = h("div")({
105
105
  padding: `${e.spacing(2)} ${e.spacing(1)}`,
106
106
  verticalAlign: "top"
107
107
  }
108
- })), I = h("table")({ "& td": {
108
+ })), I = g("table")({ "& td": {
109
109
  border: 0,
110
110
  padding: 0,
111
111
  textAlign: "center",
112
112
  minWidth: "200px"
113
- } }), L = h("div")({ marginBottom: "4px" }), R = h("td")({ fontWeight: "normal" }), z = ({ show: e, onClick: t, extraStyles: n, children: r }) => /* @__PURE__ */ E("div", {
113
+ } }), L = g("div")({ marginBottom: "4px" }), R = g("td")({ fontWeight: "normal" }), z = ({ show: e, onClick: t, extraStyles: n, children: r }) => /* @__PURE__ */ E("div", {
114
114
  style: {
115
115
  height: "calc(100% - 1px)",
116
116
  top: "1px",
@@ -151,17 +151,17 @@ var B = class extends w.Component {
151
151
  });
152
152
  };
153
153
  render() {
154
- let { showRight: e, showLeft: t } = this.state, { scale: n, scaleIndex: r, showDescription: i, showPointsLabels: a, showStandards: o, arrowsDisabled: s } = this.props, { excludeZero: c, maxPoints: l, traitLabel: u, traits: f, scorePointsLabels: p } = n || {}, h = [], _, v, y;
154
+ let { showRight: e, showLeft: t } = this.state, { scale: n, scaleIndex: r, showDescription: i, showPointsLabels: a, showStandards: o, arrowsDisabled: s } = this.props, { excludeZero: l, maxPoints: u, traitLabel: d, traits: p, scorePointsLabels: m } = n || {}, g = [], _, v, y;
155
155
  try {
156
- for (let e = l; +(e >= c); --e) h.push(e);
157
- let { traitStandards: e, traitDescriptions: t } = f.reduce((e, t) => ({
156
+ for (let e = u; +(e >= l); --e) g.push(e);
157
+ let { traitStandards: e, traitDescriptions: t } = p.reduce((e, t) => ({
158
158
  traitStandards: [...e.traitStandards, ...t.standards || []],
159
159
  traitDescriptions: [...e.traitDescriptions, ...t.description || []]
160
160
  }), {
161
161
  traitStandards: [],
162
162
  traitDescriptions: []
163
163
  });
164
- _ = i && t.length, v = a && p.length, y = o && e.length;
164
+ _ = i && t.length, v = a && m.length, y = o && e.length;
165
165
  } catch {
166
166
  _ = !1, v = !1, y = !1;
167
167
  }
@@ -171,9 +171,9 @@ var B = class extends w.Component {
171
171
  onClick: this.scrollLeft,
172
172
  extraStyles: {
173
173
  left: 0,
174
- background: `linear-gradient(to right, white, ${d.background()})`
174
+ background: `linear-gradient(to right, white, ${c.background()})`
175
175
  },
176
- children: /* @__PURE__ */ E(g, {})
176
+ children: /* @__PURE__ */ E(h, {})
177
177
  }),
178
178
  /* @__PURE__ */ D(P, {
179
179
  ref: (e) => {
@@ -186,26 +186,26 @@ var B = class extends w.Component {
186
186
  });
187
187
  },
188
188
  children: [s && (e || t) ? /* @__PURE__ */ E("div", { children: "The item is too large to fit in print mode." }) : null, /* @__PURE__ */ D(F, { children: [/* @__PURE__ */ E("thead", { children: /* @__PURE__ */ D("tr", { children: [
189
- /* @__PURE__ */ E("th", { children: /* @__PURE__ */ E("div", { dangerouslySetInnerHTML: { __html: u } }) }),
189
+ /* @__PURE__ */ E("th", { children: /* @__PURE__ */ E("div", { dangerouslySetInnerHTML: { __html: d } }) }),
190
190
  y ? /* @__PURE__ */ E("th", { children: /* @__PURE__ */ E("div", { children: "Standard(s)" }) }) : null,
191
191
  _ ? /* @__PURE__ */ E("th", { children: /* @__PURE__ */ E("div", { children: "Description" }) }) : null,
192
- h && h.map((e, t) => {
192
+ g && g.map((e, t) => {
193
193
  let n = "";
194
194
  try {
195
- n = p[h.length - t - 1] || "";
195
+ n = m[g.length - t - 1] || "";
196
196
  } catch {
197
197
  n = "";
198
198
  }
199
199
  return /* @__PURE__ */ E("th", { children: /* @__PURE__ */ E(I, { children: /* @__PURE__ */ D("thead", { children: [v ? /* @__PURE__ */ E("tr", { children: /* @__PURE__ */ E("td", { children: /* @__PURE__ */ E(L, { dangerouslySetInnerHTML: { __html: n } }) }) }) : null, /* @__PURE__ */ E("tr", { children: /* @__PURE__ */ E(R, { children: e === 1 ? `${e} point` : `${e} points` }) })] }) }) }, `table-header-${t}`);
200
200
  })
201
- ] }) }), /* @__PURE__ */ E("tbody", { children: f && f.map((e, t) => /* @__PURE__ */ E(M, {
201
+ ] }) }), /* @__PURE__ */ E("tbody", { children: p && p.map((e, t) => /* @__PURE__ */ E(M, {
202
202
  trait: e,
203
203
  traitIndex: t,
204
204
  showDescription: !!_,
205
205
  showStandards: !!y,
206
206
  scaleIndex: r,
207
- scorePointsValues: h,
208
- excludeZero: c
207
+ scorePointsValues: g,
208
+ excludeZero: l
209
209
  }, `trait_${r}_${t}`)) })] }, `scale-${r}`)]
210
210
  }),
211
211
  /* @__PURE__ */ E(z, {
@@ -213,9 +213,9 @@ var B = class extends w.Component {
213
213
  onClick: this.scrollRight,
214
214
  extraStyles: {
215
215
  right: 0,
216
- background: `linear-gradient(to left, white, ${d.background()})`
216
+ background: `linear-gradient(to left, white, ${c.background()})`
217
217
  },
218
- children: /* @__PURE__ */ E(m, {})
218
+ children: /* @__PURE__ */ E(f, {})
219
219
  })
220
220
  ] });
221
221
  }
@@ -242,9 +242,9 @@ B.propTypes = {
242
242
  //#endregion
243
243
  //#region ../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/Link/linkClasses.js
244
244
  function V(e) {
245
- return y("MuiLink", e);
245
+ return S("MuiLink", e);
246
246
  }
247
- var H = o("MuiLink", [
247
+ var H = y("MuiLink", [
248
248
  "root",
249
249
  "underlineNone",
250
250
  "underlineHover",
@@ -254,11 +254,11 @@ var H = o("MuiLink", [
254
254
  ]), U = ({ theme: e, ownerState: t }) => {
255
255
  let n = t.color;
256
256
  if ("colorSpace" in e && e.colorSpace) {
257
- let r = s(e, `palette.${n}.main`) || s(e, `palette.${n}`) || t.color;
257
+ let r = x(e, `palette.${n}.main`) || x(e, `palette.${n}`) || t.color;
258
258
  return e.alpha(r, .4);
259
259
  }
260
- let r = s(e, `palette.${n}.main`, !1) || s(e, `palette.${n}`, !1) || t.color, i = s(e, `palette.${n}.mainChannel`) || s(e, `palette.${n}Channel`);
261
- return "vars" in e && i ? `rgba(${i} / 0.4)` : l(r, .4);
260
+ let r = x(e, `palette.${n}.main`, !1) || x(e, `palette.${n}`, !1) || t.color, i = x(e, `palette.${n}.mainChannel`) || x(e, `palette.${n}Channel`);
261
+ return "vars" in e && i ? `rgba(${i} / 0.4)` : u(r, .4);
262
262
  }, W = {
263
263
  primary: !0,
264
264
  secondary: !0,
@@ -271,13 +271,13 @@ var H = o("MuiLink", [
271
271
  textDisabled: !0
272
272
  }, G = (e) => {
273
273
  let { classes: t, component: n, focusVisible: r, underline: a } = e;
274
- return c({ root: [
274
+ return m({ root: [
275
275
  "root",
276
276
  `underline${i(a)}`,
277
277
  n === "button" && "button",
278
278
  r && "focusVisible"
279
279
  ] }, V, t);
280
- }, K = h(_, {
280
+ }, K = g(_, {
281
281
  name: "MuiLink",
282
282
  slot: "Root",
283
283
  overridesResolver: (e, t) => {
@@ -288,7 +288,7 @@ var H = o("MuiLink", [
288
288
  n.component === "button" && t.button
289
289
  ];
290
290
  }
291
- })(r(({ theme: e }) => ({ variants: [
291
+ })(o(({ theme: e }) => ({ variants: [
292
292
  {
293
293
  props: { underline: "none" },
294
294
  style: { textDecoration: "none" }
@@ -315,7 +315,7 @@ var H = o("MuiLink", [
315
315
  props: ({ underline: e, ownerState: t }) => e === "always" && t.color === "inherit",
316
316
  style: e.colorSpace ? { textDecorationColor: e.alpha("currentColor", .4) } : null
317
317
  },
318
- ...Object.entries(e.palette).filter(x()).map(([t]) => ({
318
+ ...Object.entries(e.palette).filter(b()).map(([t]) => ({
319
319
  props: {
320
320
  underline: "always",
321
321
  color: t
@@ -363,39 +363,39 @@ var H = o("MuiLink", [
363
363
  [`&.${H.focusVisible}`]: { outline: "auto" }
364
364
  }
365
365
  }
366
- ] }))), q = /*#__PURE__*/ C.forwardRef(function(t, n) {
367
- let r = v({
368
- props: t,
366
+ ] }))), q = /*#__PURE__*/ C.forwardRef(function(e, n) {
367
+ let r = p({
368
+ props: e,
369
369
  name: "MuiLink"
370
- }), i = p(), { className: a, color: o = "primary", component: s = "a", onBlur: c, onFocus: l, TypographyClasses: u, underline: d = "always", variant: f = "inherit", sx: m, ...h } = r, [g, _] = C.useState(!1), y = (t) => {
371
- e(t.target) || _(!1), c && c(t);
372
- }, b = (t) => {
373
- e(t.target) && _(!0), l && l(t);
374
- }, x = {
370
+ }), i = v(), { className: a, color: o = "primary", component: s = "a", onBlur: c, onFocus: u, TypographyClasses: d, underline: f = "always", variant: m = "inherit", sx: h, ...g } = r, [_, y] = C.useState(!1), b = (e) => {
371
+ t(e.target) || y(!1), c && c(e);
372
+ }, x = (e) => {
373
+ t(e.target) && y(!0), u && u(e);
374
+ }, S = {
375
375
  ...r,
376
376
  color: o,
377
377
  component: s,
378
- focusVisible: g,
379
- underline: d,
380
- variant: f
378
+ focusVisible: _,
379
+ underline: f,
380
+ variant: m
381
381
  };
382
382
  return /*#__PURE__*/ E(K, {
383
383
  color: o,
384
- className: S(G(x).root, a),
385
- classes: u,
384
+ className: l(G(S).root, a),
385
+ classes: d,
386
386
  component: s,
387
- onBlur: y,
388
- onFocus: b,
387
+ onBlur: b,
388
+ onFocus: x,
389
389
  ref: n,
390
- ownerState: x,
391
- variant: f,
392
- ...h,
393
- sx: [...W[o] === void 0 ? [{ color: o }] : [], ...Array.isArray(m) ? m : [m]],
390
+ ownerState: S,
391
+ variant: m,
392
+ ...g,
393
+ sx: [...W[o] === void 0 ? [{ color: o }] : [], ...Array.isArray(h) ? h : [h]],
394
394
  style: {
395
- ...h.style,
396
- ...d === "always" && o !== "inherit" && !W[o] && { "--Link-underlineColor": U({
395
+ ...g.style,
396
+ ...f === "always" && o !== "inherit" && !W[o] && { "--Link-underlineColor": U({
397
397
  theme: i,
398
- ownerState: x
398
+ ownerState: S
399
399
  }) }
400
400
  }
401
401
  });
@@ -408,7 +408,7 @@ function J(e) {
408
408
  function Y(e, t) {
409
409
  return !e || J(e) ? e : J(e.default) ? e.default : t && J(e[t]) ? e[t] : t && J(e[t]?.default) ? e[t].default : e;
410
410
  }
411
- var X = Y(a, "UiLayout") || Y(ee.UiLayout, "UiLayout"), Z = u, Q = Z.default, ee = Q && typeof Q == "object" ? Q : Z, $ = class extends w.Component {
411
+ var X = Y(s, "UiLayout") || Y(ee.UiLayout, "UiLayout"), Z = d, Q = Z.default, ee = Q && typeof Q == "object" ? Q : Z, $ = class extends w.Component {
412
412
  constructor(e) {
413
413
  super(e), this.state = {
414
414
  rubricOpen: !1,
@@ -419,14 +419,14 @@ var X = Y(a, "UiLayout") || Y(ee.UiLayout, "UiLayout"), Z = u, Q = Z.default, ee
419
419
  this.setState({ rubricOpen: !this.state.rubricOpen }), this.setState({ linkPrefix: this.state.rubricOpen ? "Show" : "Hide" });
420
420
  }
421
421
  render() {
422
- let { model: e } = this.props, { animationsDisabled: n } = this.props, { extraCSSRules: r, halfScoring: i, scales: a, visible: o, pointLabels: s, description: c, standards: l, arrowsDisabled: u } = e || {};
423
- if (n ||= e.animationsDisabled, !a || !o) return null;
422
+ let { model: e } = this.props, { animationsDisabled: t } = this.props, { extraCSSRules: r, halfScoring: i, scales: a, visible: o, pointLabels: s, description: l, standards: u, arrowsDisabled: d } = e || {};
423
+ if (t ||= e.animationsDisabled, !a || !o) return null;
424
424
  let f = /* @__PURE__ */ D(X, {
425
425
  extraCSSRules: r,
426
426
  style: {
427
427
  fontFamily: "Cerebri Sans",
428
- color: d.text(),
429
- backgroundColor: d.background()
428
+ color: c.text(),
429
+ backgroundColor: c.background()
430
430
  },
431
431
  children: [i ? /* @__PURE__ */ E("div", {
432
432
  style: { marginBottom: "16px" },
@@ -435,23 +435,23 @@ var X = Y(a, "UiLayout") || Y(ee.UiLayout, "UiLayout"), Z = u, Q = Z.default, ee
435
435
  scale: e,
436
436
  scaleIndex: t,
437
437
  showPointsLabels: s,
438
- showDescription: c,
439
- showStandards: l,
440
- arrowsDisabled: u
438
+ showDescription: l,
439
+ showStandards: u,
440
+ arrowsDisabled: d
441
441
  }, `scale_${t}`))]
442
442
  });
443
- return n ? f : /* @__PURE__ */ D(X, {
443
+ return t ? f : /* @__PURE__ */ D(X, {
444
444
  extraCSSRules: r,
445
445
  style: {
446
- color: d.text(),
447
- backgroundColor: d.background()
446
+ color: c.text(),
447
+ backgroundColor: c.background()
448
448
  },
449
449
  children: [/* @__PURE__ */ D(q, {
450
- style: { backgroundColor: d.background() },
450
+ style: { backgroundColor: c.background() },
451
451
  href: this.dudUrl,
452
452
  onClick: this.toggleRubric,
453
453
  children: [this.state.linkPrefix, " Rubric"]
454
- }), /* @__PURE__ */ E(t, {
454
+ }), /* @__PURE__ */ E(n, {
455
455
  style: { marginTop: "16px" },
456
456
  in: this.state.rubricOpen,
457
457
  timeout: {
@@ -494,7 +494,7 @@ var te = class extends HTMLElement {
494
494
  }
495
495
  _scheduleMathRender = () => {
496
496
  this._mathRenderPending || (this._mathRenderPending = !0, requestAnimationFrame(() => {
497
- this._mathObserver && this._mathObserver.disconnect(), b(this), this._mathRenderPending = !1, setTimeout(() => {
497
+ this._mathObserver && this._mathObserver.disconnect(), a(this), this._mathRenderPending = !1, setTimeout(() => {
498
498
  this._mathObserver && this._mathObserver.observe(this, {
499
499
  childList: !0,
500
500
  subtree: !0