@pie-lib/rubric 2.0.4-next.30 → 2.0.4-next.32
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/dist/authoring.js +18 -18
- package/dist/node_modules/.bun/@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/extends.js +1 -1
- package/dist/node_modules/.bun/@hello-pangea_dnd@18.0.1_d0d44917b9a63a72/node_modules/@hello-pangea/dnd/dist/dnd.esm.js +38 -29
- package/dist/node_modules/.bun/css-box-model@1.2.1/node_modules/css-box-model/dist/css-box-model.esm.js +2 -2
- package/dist/node_modules/.bun/react-redux@9.3.0_9e2203c65d1d5fa1/node_modules/react-redux/dist/react-redux.js +7 -7
- package/dist/node_modules/.bun/redux@5.0.1/node_modules/redux/dist/redux.js +2 -2
- package/dist/node_modules/.bun/tiny-invariant@1.3.3/node_modules/tiny-invariant/dist/esm/tiny-invariant.js +1 -1
- package/dist/point-menu.js +1 -1
- package/package.json +11 -6
package/dist/authoring.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DragDropContext as e, Draggable as t, Droppable as n } from "./node_modules/.bun/@hello-pangea_dnd@18.0.1_d0d44917b9a63a72/node_modules/@hello-pangea/dnd/dist/dnd.esm.js";
|
|
2
2
|
import r from "./point-menu.js";
|
|
3
3
|
import i from "react";
|
|
4
4
|
import a from "prop-types";
|
|
@@ -234,33 +234,33 @@ var E = b("pie-lib:rubric:authoring"), D = (e, t, n) => {
|
|
|
234
234
|
autoWidthToolbar: !0
|
|
235
235
|
})
|
|
236
236
|
}),
|
|
237
|
-
/* @__PURE__ */ x("div", { children: o ? /* @__PURE__ */ x(V, {}) : /* @__PURE__ */ x(z, { children: /* @__PURE__ */ x(
|
|
237
|
+
/* @__PURE__ */ x("div", { children: o ? /* @__PURE__ */ x(V, {}) : /* @__PURE__ */ x(z, { children: /* @__PURE__ */ x(e, {
|
|
238
238
|
onDragEnd: this.dragEnd,
|
|
239
|
-
children: /* @__PURE__ */ x(
|
|
239
|
+
children: /* @__PURE__ */ x(n, {
|
|
240
240
|
droppableId: "droppable",
|
|
241
241
|
children: (e) => /* @__PURE__ */ S("div", {
|
|
242
242
|
...e.droppableProps,
|
|
243
243
|
ref: e.innerRef,
|
|
244
|
-
children: [r.points.map((e,
|
|
245
|
-
index:
|
|
246
|
-
draggableId:
|
|
247
|
-
children: (
|
|
248
|
-
ref:
|
|
249
|
-
...
|
|
250
|
-
...
|
|
244
|
+
children: [r.points.map((e, n) => this.shouldRenderPoint(n, r) && /* @__PURE__ */ x(t, {
|
|
245
|
+
index: n,
|
|
246
|
+
draggableId: n.toString(),
|
|
247
|
+
children: (t) => /* @__PURE__ */ x(H, {
|
|
248
|
+
ref: t.innerRef,
|
|
249
|
+
...t.draggableProps,
|
|
250
|
+
...t.dragHandleProps,
|
|
251
251
|
children: /* @__PURE__ */ x(R, {
|
|
252
|
-
points: this.getPointForIndex(
|
|
252
|
+
points: this.getPointForIndex(n, r),
|
|
253
253
|
content: e,
|
|
254
|
-
error: v && v[r.points.length - 1 -
|
|
255
|
-
sampleAnswer: r.sampleAnswers && r.sampleAnswers[
|
|
256
|
-
onChange: (e) => this.changeContent(
|
|
257
|
-
onSampleChange: (e) => this.changeContent(
|
|
258
|
-
onMenuChange: (e) => this.onPointMenuChange(
|
|
254
|
+
error: v && v[r.points.length - 1 - n],
|
|
255
|
+
sampleAnswer: r.sampleAnswers && r.sampleAnswers[n],
|
|
256
|
+
onChange: (e) => this.changeContent(n, e, "points"),
|
|
257
|
+
onSampleChange: (e) => this.changeContent(n, e, "sampleAnswers"),
|
|
258
|
+
onMenuChange: (e) => this.onPointMenuChange(n, e),
|
|
259
259
|
mathMlOptions: i,
|
|
260
260
|
pluginOpts: s
|
|
261
261
|
})
|
|
262
262
|
})
|
|
263
|
-
}, `${e.points}-${
|
|
263
|
+
}, `${e.points}-${n}`)), e.placeholder]
|
|
264
264
|
})
|
|
265
265
|
})
|
|
266
266
|
}) }) })
|
|
@@ -295,4 +295,4 @@ G.propTypes = {
|
|
|
295
295
|
onChange: a.func
|
|
296
296
|
};
|
|
297
297
|
//#endregion
|
|
298
|
-
export { G as default };
|
|
298
|
+
export { R as PointConfig, W as RawAuthoring, O as RubricType, G as default };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { applyMiddleware as e, bindActionCreators as t, compose as n, createStore as r } from "../../../../../redux@5.0.1/node_modules/redux/dist/redux.js";
|
|
2
|
-
import {
|
|
2
|
+
import { Provider as i, connect as a } from "../../../../../react-redux@9.3.0_9e2203c65d1d5fa1/node_modules/react-redux/dist/react-redux.js";
|
|
3
3
|
import { calculateBox as o, createBox as s, expand as c, getBox as l, getRect as u, offset as d, withScroll as f } from "../../../../../css-box-model@1.2.1/node_modules/css-box-model/dist/css-box-model.esm.js";
|
|
4
4
|
import p from "../../../../../raf-schd@4.0.3/node_modules/raf-schd/dist/raf-schd.esm.js";
|
|
5
|
-
import
|
|
5
|
+
import m from "../../../../../@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/extends.js";
|
|
6
6
|
import h, { useContext as g, useEffect as _, useLayoutEffect as v, useRef as y, useState as b } from "react";
|
|
7
7
|
import x, { flushSync as S } from "react-dom";
|
|
8
8
|
//#region ../../../node_modules/.bun/@hello-pangea+dnd@18.0.1+d0d44917b9a63a72/node_modules/@hello-pangea/dnd/dist/dnd.esm.js
|
|
@@ -358,7 +358,7 @@ var Le = B((e, t) => t.filter((t) => t.descriptor.id !== e.descriptor.id)), Re =
|
|
|
358
358
|
let { invisible: r, visible: i } = t;
|
|
359
359
|
if (r[e]) return !1;
|
|
360
360
|
let a = i[e];
|
|
361
|
-
return a
|
|
361
|
+
return !a || a.shouldAnimate;
|
|
362
362
|
};
|
|
363
363
|
function et(e, t) {
|
|
364
364
|
let n = e.page.marginBox;
|
|
@@ -1083,7 +1083,7 @@ var Yt = ({ pageBorderBoxWithDroppableScroll: e, draggable: t, destination: n, i
|
|
|
1083
1083
|
impact: m,
|
|
1084
1084
|
viewport: o,
|
|
1085
1085
|
scrollJumpRequest: a || null,
|
|
1086
|
-
forceShouldAnimate: a
|
|
1086
|
+
forceShouldAnimate: !a && null
|
|
1087
1087
|
};
|
|
1088
1088
|
};
|
|
1089
1089
|
function rn(e, t) {
|
|
@@ -1813,12 +1813,14 @@ var xr = (e, t) => {
|
|
|
1813
1813
|
flush: c,
|
|
1814
1814
|
drop: l,
|
|
1815
1815
|
abort: () => {
|
|
1816
|
-
r
|
|
1816
|
+
if (!r) return;
|
|
1817
|
+
let e = {
|
|
1817
1818
|
...yr(r.lastCritical, r.mode),
|
|
1818
1819
|
combine: null,
|
|
1819
1820
|
destination: null,
|
|
1820
1821
|
reason: "CANCEL"
|
|
1821
|
-
}
|
|
1822
|
+
};
|
|
1823
|
+
l(e);
|
|
1822
1824
|
}
|
|
1823
1825
|
};
|
|
1824
1826
|
}, Sr = (e, t) => {
|
|
@@ -3197,17 +3199,21 @@ function Ma(e) {
|
|
|
3197
3199
|
s
|
|
3198
3200
|
]), u = M(function() {
|
|
3199
3201
|
let e = r();
|
|
3200
|
-
e.type !== "PENDING" && (process.env.NODE_ENV === "production" ? A() : A(!1, `Cannot start dragging from phase ${e.type}`))
|
|
3202
|
+
e.type !== "PENDING" && (process.env.NODE_ENV === "production" ? A() : A(!1, `Cannot start dragging from phase ${e.type}`));
|
|
3203
|
+
let t = e.actions.fluidLift(e.point);
|
|
3204
|
+
i({
|
|
3201
3205
|
type: "DRAGGING",
|
|
3202
|
-
actions:
|
|
3206
|
+
actions: t,
|
|
3203
3207
|
hasMoved: !1
|
|
3204
3208
|
});
|
|
3205
3209
|
}, [r, i]), d = M(function(e, t) {
|
|
3206
|
-
r().type !== "IDLE" && (process.env.NODE_ENV === "production" ? A() : A(!1, "Expected to move from IDLE to PENDING drag"))
|
|
3210
|
+
r().type !== "IDLE" && (process.env.NODE_ENV === "production" ? A() : A(!1, "Expected to move from IDLE to PENDING drag"));
|
|
3211
|
+
let n = setTimeout(u, Oa);
|
|
3212
|
+
i({
|
|
3207
3213
|
type: "PENDING",
|
|
3208
3214
|
point: t,
|
|
3209
3215
|
actions: e,
|
|
3210
|
-
longPressTimerId:
|
|
3216
|
+
longPressTimerId: n
|
|
3211
3217
|
}), l();
|
|
3212
3218
|
}, [
|
|
3213
3219
|
l,
|
|
@@ -3258,7 +3264,7 @@ function Fa(e, t) {
|
|
|
3258
3264
|
if (t == null) return !1;
|
|
3259
3265
|
if (Pa.includes(t.tagName.toLowerCase())) return !0;
|
|
3260
3266
|
let n = t.getAttribute("contenteditable");
|
|
3261
|
-
return n === "true" || n === ""
|
|
3267
|
+
return n === "true" || n === "" || t !== e && Fa(e, t.parentElement);
|
|
3262
3268
|
}
|
|
3263
3269
|
function Ia(e, t) {
|
|
3264
3270
|
let n = t.target;
|
|
@@ -3563,7 +3569,7 @@ function to(e) {
|
|
|
3563
3569
|
e.getState().phase !== "IDLE" && e.dispatch(Ln());
|
|
3564
3570
|
}, []), E = M(() => {
|
|
3565
3571
|
let e = eo(c).getState();
|
|
3566
|
-
return e.phase === "DROP_ANIMATING"
|
|
3572
|
+
return e.phase === "DROP_ANIMATING" || e.phase !== "IDLE" && e.isDragging;
|
|
3567
3573
|
}, []);
|
|
3568
3574
|
r(j(() => ({
|
|
3569
3575
|
isDragging: E,
|
|
@@ -3770,16 +3776,19 @@ var bo = (e) => {
|
|
|
3770
3776
|
f
|
|
3771
3777
|
]), x = M((e) => {
|
|
3772
3778
|
_.type === "DRAGGING" && _.dropping && e.propertyName === "transform" && S(v);
|
|
3773
|
-
}, [v, _]), C = j(() =>
|
|
3774
|
-
|
|
3775
|
-
|
|
3776
|
-
|
|
3777
|
-
|
|
3778
|
-
|
|
3779
|
-
|
|
3780
|
-
|
|
3781
|
-
|
|
3782
|
-
|
|
3779
|
+
}, [v, _]), C = j(() => {
|
|
3780
|
+
let e = uo(_), t = _.type === "DRAGGING" && _.dropping ? x : void 0;
|
|
3781
|
+
return {
|
|
3782
|
+
innerRef: n,
|
|
3783
|
+
draggableProps: {
|
|
3784
|
+
"data-rfd-draggable-context-id": i,
|
|
3785
|
+
"data-rfd-draggable-id": d,
|
|
3786
|
+
style: e,
|
|
3787
|
+
onTransitionEnd: t
|
|
3788
|
+
},
|
|
3789
|
+
dragHandleProps: b
|
|
3790
|
+
};
|
|
3791
|
+
}, [
|
|
3783
3792
|
i,
|
|
3784
3793
|
b,
|
|
3785
3794
|
d,
|
|
@@ -3893,12 +3902,12 @@ function Oo() {
|
|
|
3893
3902
|
if (!s) {
|
|
3894
3903
|
if (!c) return r(u);
|
|
3895
3904
|
if (a.displaced.invisible[t]) return null;
|
|
3896
|
-
let i = L(o.displacedBy.point);
|
|
3897
|
-
return n(
|
|
3905
|
+
let i = L(o.displacedBy.point), s = e(i.x, i.y);
|
|
3906
|
+
return n(s, u, !0);
|
|
3898
3907
|
}
|
|
3899
3908
|
if (c) return r(u);
|
|
3900
|
-
let d = a.displacedBy.point;
|
|
3901
|
-
return n(
|
|
3909
|
+
let d = a.displacedBy.point, f = e(d.x, d.y);
|
|
3910
|
+
return n(f, u, s.shouldAnimate);
|
|
3902
3911
|
};
|
|
3903
3912
|
return (e, t) => {
|
|
3904
3913
|
if (ta(e)) return e.critical.draggable.id === t.draggableId ? null : i(t.draggableId, e.critical.draggable.id, e.impact, e.afterCritical);
|
|
@@ -3920,7 +3929,7 @@ function Ao(e) {
|
|
|
3920
3929
|
return vo(mo).isUsingCloneFor === e.draggableId && !e.isClone ? null : h.createElement(ko, e);
|
|
3921
3930
|
}
|
|
3922
3931
|
function jo(e) {
|
|
3923
|
-
let t = typeof e.isDragDisabled
|
|
3932
|
+
let t = typeof e.isDragDisabled != "boolean" || !e.isDragDisabled, n = !!e.disableInteractiveElementBlocking, r = !!e.shouldRespectForcePress;
|
|
3924
3933
|
return h.createElement(Ao, m({}, e, {
|
|
3925
3934
|
isClone: !1,
|
|
3926
3935
|
isEnabled: t,
|
|
@@ -3948,7 +3957,7 @@ var Mo = (e) => (t) => e === t, No = Mo("scroll"), Po = Mo("auto"), Fo = Mo("vis
|
|
|
3948
3957
|
}, Ho = (e) => ({
|
|
3949
3958
|
x: e.scrollLeft,
|
|
3950
3959
|
y: e.scrollTop
|
|
3951
|
-
}), Uo = (e) => e ? window.getComputedStyle(e).position === "fixed"
|
|
3960
|
+
}), Uo = (e) => e ? window.getComputedStyle(e).position === "fixed" || Uo(e.parentElement) : !1, Wo = (e) => ({
|
|
3952
3961
|
closestScrollable: Bo(e),
|
|
3953
3962
|
isFixedOnPage: Uo(e)
|
|
3954
3963
|
}), Go = ({ descriptor: e, isEnabled: t, isCombineEnabled: n, isFixedOnPage: r, direction: i, client: a, page: o, closest: s }) => {
|
|
@@ -4448,4 +4457,4 @@ var ps = {
|
|
|
4448
4457
|
areStatePropsEqual: xo
|
|
4449
4458
|
})(ds);
|
|
4450
4459
|
//#endregion
|
|
4451
|
-
export { _s as
|
|
4460
|
+
export { ro as DragDropContext, jo as Draggable, _s as Droppable, Ea as useKeyboardSensor, Sa as useMouseSensor, Ma as useTouchSensor };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e from "../../../../tiny-invariant@1.3.3/node_modules/tiny-invariant/dist/esm/tiny-invariant.js";
|
|
2
2
|
//#region ../../../node_modules/.bun/css-box-model@1.2.1/node_modules/css-box-model/dist/css-box-model.esm.js
|
|
3
3
|
var t = function(e) {
|
|
4
4
|
var t = e.top, n = e.right, r = e.bottom, i = e.left;
|
|
@@ -99,4 +99,4 @@ var t = function(e) {
|
|
|
99
99
|
return d(e.getBoundingClientRect(), window.getComputedStyle(e));
|
|
100
100
|
};
|
|
101
101
|
//#endregion
|
|
102
|
-
export { d as calculateBox, o as createBox, n as expand, f as getBox, t as getRect, l as offset, u as withScroll };
|
|
102
|
+
export { d as calculateBox, o as createBox, n as expand, f as getBox, t as getRect, l as offset, r as shrink, u as withScroll };
|
|
@@ -443,17 +443,17 @@ ${T.current.stack}
|
|
|
443
443
|
var be = ye;
|
|
444
444
|
function xe(e) {
|
|
445
445
|
let { children: n, context: r, serverState: i, store: a } = e, o = t.useMemo(() => {
|
|
446
|
-
let t = {
|
|
446
|
+
let t = R(a), n = {
|
|
447
447
|
store: a,
|
|
448
|
-
subscription:
|
|
448
|
+
subscription: t,
|
|
449
449
|
getServerState: i ? () => i : void 0
|
|
450
450
|
};
|
|
451
|
-
if (process.env.NODE_ENV === "production") return
|
|
451
|
+
if (process.env.NODE_ENV === "production") return n;
|
|
452
452
|
{
|
|
453
|
-
let { identityFunctionCheck:
|
|
454
|
-
return /* @__PURE__ */ Object.assign(
|
|
453
|
+
let { identityFunctionCheck: t = "once", stabilityCheck: r = "once" } = e;
|
|
454
|
+
return /* @__PURE__ */ Object.assign(n, {
|
|
455
455
|
stabilityCheck: r,
|
|
456
|
-
identityFunctionCheck:
|
|
456
|
+
identityFunctionCheck: t
|
|
457
457
|
});
|
|
458
458
|
}
|
|
459
459
|
}, [a, i]), s = t.useMemo(() => a.getState(), [a]);
|
|
@@ -468,4 +468,4 @@ function xe(e) {
|
|
|
468
468
|
}
|
|
469
469
|
var Se = xe;
|
|
470
470
|
//#endregion
|
|
471
|
-
export { Se as
|
|
471
|
+
export { Se as Provider, Z as ReactReduxContext, be as connect, V as shallowEqual };
|
|
@@ -45,7 +45,7 @@ function s(e) {
|
|
|
45
45
|
return e instanceof Error || typeof e.message == "string" && e.constructor && typeof e.constructor.stackTraceLimit == "number";
|
|
46
46
|
}
|
|
47
47
|
function c(e) {
|
|
48
|
-
return e instanceof Date
|
|
48
|
+
return e instanceof Date || typeof e.toDateString == "function" && typeof e.getDate == "function" && typeof e.setDate == "function";
|
|
49
49
|
}
|
|
50
50
|
function l(e) {
|
|
51
51
|
let t = typeof e;
|
|
@@ -156,4 +156,4 @@ function m(...t) {
|
|
|
156
156
|
};
|
|
157
157
|
}
|
|
158
158
|
//#endregion
|
|
159
|
-
export { m as applyMiddleware, f as bindActionCreators, p as compose, u as createStore };
|
|
159
|
+
export { r as __DO_NOT_USE__ActionTypes, m as applyMiddleware, f as bindActionCreators, p as compose, u as createStore, i as isPlainObject };
|
package/dist/point-menu.js
CHANGED
package/package.json
CHANGED
|
@@ -1,19 +1,24 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-lib/rubric",
|
|
3
|
-
"version": "2.0.4-next.
|
|
3
|
+
"version": "2.0.4-next.32",
|
|
4
4
|
"description": "React implementation of @pie-lib/rubric synced from pie-lib",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "git+https://github.com/pie-framework/pie-elements-ng.git",
|
|
8
|
+
"directory": "packages/lib-react/rubric"
|
|
9
|
+
},
|
|
5
10
|
"dependencies": {
|
|
6
11
|
"@emotion/react": "^11.14.0",
|
|
7
|
-
"@emotion/
|
|
12
|
+
"@emotion/styled": "^11.14.1",
|
|
8
13
|
"@hello-pangea/dnd": "^18.0.1",
|
|
9
14
|
"@mui/icons-material": "^7.3.4",
|
|
10
15
|
"@mui/material": "^7.3.4",
|
|
11
|
-
"@pie-lib/editable-html-tip-tap": "2.1.2-next.
|
|
16
|
+
"@pie-lib/editable-html-tip-tap": "2.1.2-next.32",
|
|
12
17
|
"debug": "^4.1.1",
|
|
13
18
|
"prop-types": "^15.7.2",
|
|
14
|
-
"@pie-element/shared-lodash": "0.1.1-next.
|
|
15
|
-
"@pie-lib/config-ui": "13.0.4-next.
|
|
16
|
-
"@pie-lib/render-ui": "6.1.1-next.
|
|
19
|
+
"@pie-element/shared-lodash": "0.1.1-next.1",
|
|
20
|
+
"@pie-lib/config-ui": "13.0.4-next.32",
|
|
21
|
+
"@pie-lib/render-ui": "6.1.1-next.39"
|
|
17
22
|
},
|
|
18
23
|
"type": "module",
|
|
19
24
|
"main": "./dist/index.js",
|