@pie-element/multi-trait-rubric 8.1.2-next.1 → 8.1.2-next.3

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-CdgSBeUZ.js";
1
+ import { C as e, E as t, Et as n, H as r, P as i, T as a, _ as o, _t as s, bt as c, ft as l, ht as u, i as d, it as f, kt as p, lt as m, n as h, ot as g, r as _, t as v, tt as y, vt as b, x, yt as S } from "../Typography-Boz3OA7y.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__ */ p(n(), 1), A = g("td")({
41
+ color: f.primaryDark(),
42
42
  verticalAlign: "middle"
43
- }), j = h("div")({
44
- color: d.secondaryBackground(),
43
+ }), j = g("div")({
44
+ color: f.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: f.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: f.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,19 +151,19 @@ 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: c, maxPoints: l, traitLabel: u, traits: d, scorePointsLabels: p } = n || {}, m = [], 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 = l; +(e >= c); --e) m.push(e);
157
+ let { traitStandards: e, traitDescriptions: t } = d.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
+ g = i && t.length, v = a && p.length, y = o && e.length;
165
165
  } catch {
166
- _ = !1, v = !1, y = !1;
166
+ g = !1, v = !1, y = !1;
167
167
  }
168
168
  return /* @__PURE__ */ D(N, { children: [
169
169
  /* @__PURE__ */ E(z, {
@@ -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, ${f.background()})`
175
175
  },
176
- children: /* @__PURE__ */ E(g, {})
176
+ children: /* @__PURE__ */ E(_, {})
177
177
  }),
178
178
  /* @__PURE__ */ D(P, {
179
179
  ref: (e) => {
@@ -188,23 +188,23 @@ var B = class extends w.Component {
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
189
  /* @__PURE__ */ E("th", { children: /* @__PURE__ */ E("div", { dangerouslySetInnerHTML: { __html: u } }) }),
190
190
  y ? /* @__PURE__ */ E("th", { children: /* @__PURE__ */ E("div", { children: "Standard(s)" }) }) : null,
191
- _ ? /* @__PURE__ */ E("th", { children: /* @__PURE__ */ E("div", { children: "Description" }) }) : null,
192
- h && h.map((e, t) => {
191
+ g ? /* @__PURE__ */ E("th", { children: /* @__PURE__ */ E("div", { children: "Description" }) }) : null,
192
+ m && m.map((e, t) => {
193
193
  let n = "";
194
194
  try {
195
- n = p[h.length - t - 1] || "";
195
+ n = p[m.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: d && d.map((e, t) => /* @__PURE__ */ E(M, {
202
202
  trait: e,
203
203
  traitIndex: t,
204
- showDescription: !!_,
204
+ showDescription: !!g,
205
205
  showStandards: !!y,
206
206
  scaleIndex: r,
207
- scorePointsValues: h,
207
+ scorePointsValues: m,
208
208
  excludeZero: c
209
209
  }, `trait_${r}_${t}`)) })] }, `scale-${r}`)]
210
210
  }),
@@ -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, ${f.background()})`
217
217
  },
218
- children: /* @__PURE__ */ E(m, {})
218
+ children: /* @__PURE__ */ E(h, {})
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 b("MuiLink", e);
246
246
  }
247
- var H = o("MuiLink", [
247
+ var H = s("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 = c(e, `palette.${n}.main`) || c(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 = c(e, `palette.${n}.main`, !1) || c(e, `palette.${n}`, !1) || t.color, i = c(e, `palette.${n}.mainChannel`) || c(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 l({ 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(v, {
281
281
  name: "MuiLink",
282
282
  slot: "Root",
283
283
  overridesResolver: (e, t) => {
@@ -364,10 +364,10 @@ var H = o("MuiLink", [
364
364
  }
365
365
  }
366
366
  ] }))), q = /*#__PURE__*/ C.forwardRef(function(t, n) {
367
- let r = v({
367
+ let r = y({
368
368
  props: t,
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) => {
370
+ }), i = m(), { className: a, color: o = "primary", component: s = "a", onBlur: c, onFocus: l, TypographyClasses: u, underline: d = "always", variant: f = "inherit", sx: p, ...h } = r, [g, _] = C.useState(!1), v = (t) => {
371
371
  e(t.target) || _(!1), c && c(t);
372
372
  }, b = (t) => {
373
373
  e(t.target) && _(!0), l && l(t);
@@ -384,13 +384,13 @@ var H = o("MuiLink", [
384
384
  className: S(G(x).root, a),
385
385
  classes: u,
386
386
  component: s,
387
- onBlur: y,
387
+ onBlur: v,
388
388
  onFocus: b,
389
389
  ref: n,
390
390
  ownerState: x,
391
391
  variant: f,
392
392
  ...h,
393
- sx: [...W[o] === void 0 ? [{ color: o }] : [], ...Array.isArray(m) ? m : [m]],
393
+ sx: [...W[o] === void 0 ? [{ color: o }] : [], ...Array.isArray(p) ? p : [p]],
394
394
  style: {
395
395
  ...h.style,
396
396
  ...d === "always" && o !== "inherit" && !W[o] && { "--Link-underlineColor": U({
@@ -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(o, "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,
@@ -421,12 +421,12 @@ var X = Y(a, "UiLayout") || Y(ee.UiLayout, "UiLayout"), Z = u, Q = Z.default, ee
421
421
  render() {
422
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
423
  if (n ||= e.animationsDisabled, !a || !o) return null;
424
- let f = /* @__PURE__ */ D(X, {
424
+ let d = /* @__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: f.text(),
429
+ backgroundColor: f.background()
430
430
  },
431
431
  children: [i ? /* @__PURE__ */ E("div", {
432
432
  style: { marginBottom: "16px" },
@@ -440,14 +440,14 @@ var X = Y(a, "UiLayout") || Y(ee.UiLayout, "UiLayout"), Z = u, Q = Z.default, ee
440
440
  arrowsDisabled: u
441
441
  }, `scale_${t}`))]
442
442
  });
443
- return n ? f : /* @__PURE__ */ D(X, {
443
+ return n ? d : /* @__PURE__ */ D(X, {
444
444
  extraCSSRules: r,
445
445
  style: {
446
- color: d.text(),
447
- backgroundColor: d.background()
446
+ color: f.text(),
447
+ backgroundColor: f.background()
448
448
  },
449
449
  children: [/* @__PURE__ */ D(q, {
450
- style: { backgroundColor: d.background() },
450
+ style: { backgroundColor: f.background() },
451
451
  href: this.dudUrl,
452
452
  onClick: this.toggleRubric,
453
453
  children: [this.state.linkPrefix, " Rubric"]
@@ -458,7 +458,7 @@ var X = Y(a, "UiLayout") || Y(ee.UiLayout, "UiLayout"), Z = u, Q = Z.default, ee
458
458
  enter: 225,
459
459
  exit: 195
460
460
  },
461
- children: f
461
+ children: d
462
462
  })]
463
463
  });
464
464
  }
@@ -510,7 +510,7 @@ var te = class extends HTMLElement {
510
510
  session: this._session
511
511
  });
512
512
  this._root ||= T(this), this._root.render(e), queueMicrotask(() => {
513
- b(this);
513
+ a(this);
514
514
  });
515
515
  }
516
516
  disconnectedCallback() {