@longsightgroup/qti3-player 0.5.1 → 0.5.4
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/content/content-dom.d.ts +11 -0
- package/dist/content/content-dom.d.ts.map +1 -0
- package/dist/content/content-dom.js +262 -0
- package/dist/content/content-dom.js.map +1 -0
- package/dist/content/content-renderer.d.ts +17 -0
- package/dist/content/content-renderer.d.ts.map +1 -0
- package/dist/content/content-renderer.js +82 -0
- package/dist/content/content-renderer.js.map +1 -0
- package/dist/controls/remove-button.d.ts +3 -0
- package/dist/controls/remove-button.d.ts.map +1 -0
- package/dist/controls/remove-button.js +12 -0
- package/dist/controls/remove-button.js.map +1 -0
- package/dist/interactions/choice-interaction.d.ts +4 -0
- package/dist/interactions/choice-interaction.d.ts.map +1 -0
- package/dist/interactions/choice-interaction.js +81 -0
- package/dist/interactions/choice-interaction.js.map +1 -0
- package/dist/interactions/drawing-interaction.d.ts +6 -0
- package/dist/interactions/drawing-interaction.d.ts.map +1 -0
- package/dist/interactions/drawing-interaction.js +401 -0
- package/dist/interactions/drawing-interaction.js.map +1 -0
- package/dist/interactions/end-attempt-interaction.d.ts +4 -0
- package/dist/interactions/end-attempt-interaction.d.ts.map +1 -0
- package/dist/interactions/end-attempt-interaction.js +13 -0
- package/dist/interactions/end-attempt-interaction.js.map +1 -0
- package/dist/interactions/gap-match-interaction.d.ts +4 -0
- package/dist/interactions/gap-match-interaction.d.ts.map +1 -0
- package/dist/interactions/gap-match-interaction.js +277 -0
- package/dist/interactions/gap-match-interaction.js.map +1 -0
- package/dist/interactions/graphic-associate-interaction.d.ts +4 -0
- package/dist/interactions/graphic-associate-interaction.d.ts.map +1 -0
- package/dist/interactions/graphic-associate-interaction.js +297 -0
- package/dist/interactions/graphic-associate-interaction.js.map +1 -0
- package/dist/interactions/graphic-context.d.ts +3 -0
- package/dist/interactions/graphic-context.d.ts.map +1 -0
- package/dist/interactions/graphic-context.js +35 -0
- package/dist/interactions/graphic-context.js.map +1 -0
- package/dist/interactions/hotspot-interaction.d.ts +4 -0
- package/dist/interactions/hotspot-interaction.d.ts.map +1 -0
- package/dist/interactions/hotspot-interaction.js +68 -0
- package/dist/interactions/hotspot-interaction.js.map +1 -0
- package/dist/interactions/hottext-interaction.d.ts +3 -0
- package/dist/interactions/hottext-interaction.d.ts.map +1 -0
- package/dist/interactions/hottext-interaction.js +66 -0
- package/dist/interactions/hottext-interaction.js.map +1 -0
- package/dist/interactions/inline-choice-interaction.d.ts +4 -0
- package/dist/interactions/inline-choice-interaction.d.ts.map +1 -0
- package/dist/interactions/inline-choice-interaction.js +31 -0
- package/dist/interactions/inline-choice-interaction.js.map +1 -0
- package/dist/interactions/inline-controls.d.ts +6 -0
- package/dist/interactions/inline-controls.d.ts.map +1 -0
- package/dist/interactions/inline-controls.js +15 -0
- package/dist/interactions/inline-controls.js.map +1 -0
- package/dist/interactions/interaction-diagnostics.d.ts +7 -0
- package/dist/interactions/interaction-diagnostics.d.ts.map +1 -0
- package/dist/interactions/interaction-diagnostics.js +137 -0
- package/dist/interactions/interaction-diagnostics.js.map +1 -0
- package/dist/interactions/interaction-dispatch.d.ts +2 -0
- package/dist/interactions/interaction-dispatch.d.ts.map +1 -0
- package/dist/interactions/interaction-dispatch.js +2 -0
- package/dist/interactions/interaction-dispatch.js.map +1 -0
- package/dist/interactions/interaction-label.d.ts +4 -0
- package/dist/interactions/interaction-label.d.ts.map +1 -0
- package/dist/interactions/interaction-label.js +8 -0
- package/dist/interactions/interaction-label.js.map +1 -0
- package/dist/interactions/interaction-registry.d.ts +24 -0
- package/dist/interactions/interaction-registry.d.ts.map +1 -0
- package/dist/interactions/interaction-registry.js +138 -0
- package/dist/interactions/interaction-registry.js.map +1 -0
- package/dist/interactions/match-interaction.d.ts +4 -0
- package/dist/interactions/match-interaction.d.ts.map +1 -0
- package/dist/interactions/match-interaction.js +188 -0
- package/dist/interactions/match-interaction.js.map +1 -0
- package/dist/interactions/object-asset.d.ts +8 -0
- package/dist/interactions/object-asset.d.ts.map +1 -0
- package/dist/interactions/object-asset.js +182 -0
- package/dist/interactions/object-asset.js.map +1 -0
- package/dist/interactions/pair-interaction.d.ts +4 -0
- package/dist/interactions/pair-interaction.d.ts.map +1 -0
- package/dist/interactions/pair-interaction.js +125 -0
- package/dist/interactions/pair-interaction.js.map +1 -0
- package/dist/interactions/point-value.d.ts +16 -0
- package/dist/interactions/point-value.d.ts.map +1 -0
- package/dist/interactions/point-value.js +37 -0
- package/dist/interactions/point-value.js.map +1 -0
- package/dist/interactions/portable-custom-interaction.d.ts +16 -0
- package/dist/interactions/portable-custom-interaction.d.ts.map +1 -0
- package/dist/interactions/portable-custom-interaction.js +97 -0
- package/dist/interactions/portable-custom-interaction.js.map +1 -0
- package/dist/interactions/position-object-interaction.d.ts +4 -0
- package/dist/interactions/position-object-interaction.d.ts.map +1 -0
- package/dist/interactions/position-object-interaction.js +177 -0
- package/dist/interactions/position-object-interaction.js.map +1 -0
- package/dist/interactions/routing.d.ts +5 -0
- package/dist/interactions/routing.d.ts.map +1 -0
- package/dist/interactions/routing.js +24 -0
- package/dist/interactions/routing.js.map +1 -0
- package/dist/interactions/select-point-interaction.d.ts +4 -0
- package/dist/interactions/select-point-interaction.d.ts.map +1 -0
- package/dist/interactions/select-point-interaction.js +166 -0
- package/dist/interactions/select-point-interaction.js.map +1 -0
- package/dist/interactions/shared.d.ts +12 -0
- package/dist/interactions/shared.d.ts.map +1 -0
- package/dist/interactions/shared.js +65 -0
- package/dist/interactions/shared.js.map +1 -0
- package/dist/interactions/text-interaction.d.ts +6 -0
- package/dist/interactions/text-interaction.d.ts.map +1 -0
- package/dist/interactions/text-interaction.js +110 -0
- package/dist/interactions/text-interaction.js.map +1 -0
- package/dist/interactions/unsupported-interaction.d.ts +4 -0
- package/dist/interactions/unsupported-interaction.d.ts.map +1 -0
- package/dist/interactions/unsupported-interaction.js +23 -0
- package/dist/interactions/unsupported-interaction.js.map +1 -0
- package/dist/interactions/upload-interaction.d.ts +4 -0
- package/dist/interactions/upload-interaction.d.ts.map +1 -0
- package/dist/interactions/upload-interaction.js +10 -0
- package/dist/interactions/upload-interaction.js.map +1 -0
- package/dist/player/attempt-availability.d.ts +6 -0
- package/dist/player/attempt-availability.d.ts.map +1 -0
- package/dist/player/attempt-availability.js +27 -0
- package/dist/player/attempt-availability.js.map +1 -0
- package/dist/player/content-state.d.ts +19 -0
- package/dist/player/content-state.d.ts.map +1 -0
- package/dist/player/content-state.js +39 -0
- package/dist/player/content-state.js.map +1 -0
- package/dist/player/dynamic-body.d.ts +7 -0
- package/dist/player/dynamic-body.d.ts.map +1 -0
- package/dist/player/dynamic-body.js +28 -0
- package/dist/player/dynamic-body.js.map +1 -0
- package/dist/player/feedback-panel.d.ts +3 -0
- package/dist/player/feedback-panel.d.ts.map +1 -0
- package/dist/player/feedback-panel.js +14 -0
- package/dist/player/feedback-panel.js.map +1 -0
- package/dist/player/fetch-xml.d.ts +2 -0
- package/dist/player/fetch-xml.d.ts.map +1 -0
- package/dist/player/fetch-xml.js +10 -0
- package/dist/player/fetch-xml.js.map +1 -0
- package/dist/player/interaction-render.d.ts +14 -0
- package/dist/player/interaction-render.d.ts.map +1 -0
- package/dist/player/interaction-render.js +51 -0
- package/dist/player/interaction-render.js.map +1 -0
- package/dist/player/render-shell.d.ts +8 -0
- package/dist/player/render-shell.d.ts.map +1 -0
- package/dist/player/render-shell.js +37 -0
- package/dist/player/render-shell.js.map +1 -0
- package/dist/player/resolve-assets.d.ts +3 -0
- package/dist/player/resolve-assets.d.ts.map +1 -0
- package/dist/player/resolve-assets.js +12 -0
- package/dist/player/resolve-assets.js.map +1 -0
- package/dist/player/validation-messages.d.ts +17 -0
- package/dist/player/validation-messages.d.ts.map +1 -0
- package/dist/player/validation-messages.js +33 -0
- package/dist/player/validation-messages.js.map +1 -0
- package/dist/reorder/a11y.d.ts +7 -0
- package/dist/reorder/a11y.d.ts.map +1 -0
- package/dist/reorder/a11y.js +34 -0
- package/dist/reorder/a11y.js.map +1 -0
- package/dist/reorder/graphic-order-interaction.d.ts +4 -0
- package/dist/reorder/graphic-order-interaction.d.ts.map +1 -0
- package/dist/reorder/graphic-order-interaction.js +205 -0
- package/dist/reorder/graphic-order-interaction.js.map +1 -0
- package/dist/reorder/list-controls.d.ts +22 -0
- package/dist/reorder/list-controls.d.ts.map +1 -0
- package/dist/reorder/list-controls.js +75 -0
- package/dist/reorder/list-controls.js.map +1 -0
- package/dist/reorder/order-interaction.d.ts +4 -0
- package/dist/reorder/order-interaction.d.ts.map +1 -0
- package/dist/reorder/order-interaction.js +54 -0
- package/dist/reorder/order-interaction.js.map +1 -0
- package/dist/styles/base-styles.d.ts +2 -0
- package/dist/styles/base-styles.d.ts.map +1 -0
- package/dist/styles/base-styles.js +133 -0
- package/dist/styles/base-styles.js.map +1 -0
- package/dist/styles/choice-hottext-styles.d.ts +2 -0
- package/dist/styles/choice-hottext-styles.d.ts.map +1 -0
- package/dist/styles/choice-hottext-styles.js +76 -0
- package/dist/styles/choice-hottext-styles.js.map +1 -0
- package/dist/styles/control-styles.d.ts +2 -0
- package/dist/styles/control-styles.d.ts.map +1 -0
- package/dist/styles/control-styles.js +114 -0
- package/dist/styles/control-styles.js.map +1 -0
- package/dist/styles/drawing-styles.d.ts +2 -0
- package/dist/styles/drawing-styles.d.ts.map +1 -0
- package/dist/styles/drawing-styles.js +30 -0
- package/dist/styles/drawing-styles.js.map +1 -0
- package/dist/styles/gap-match-styles.d.ts +2 -0
- package/dist/styles/gap-match-styles.d.ts.map +1 -0
- package/dist/styles/gap-match-styles.js +33 -0
- package/dist/styles/gap-match-styles.js.map +1 -0
- package/dist/styles/graphic-styles.d.ts +2 -0
- package/dist/styles/graphic-styles.d.ts.map +1 -0
- package/dist/styles/graphic-styles.js +289 -0
- package/dist/styles/graphic-styles.js.map +1 -0
- package/dist/styles/match-pair-styles.d.ts +2 -0
- package/dist/styles/match-pair-styles.d.ts.map +1 -0
- package/dist/styles/match-pair-styles.js +62 -0
- package/dist/styles/match-pair-styles.js.map +1 -0
- package/dist/styles/text-slider-styles.d.ts +2 -0
- package/dist/styles/text-slider-styles.d.ts.map +1 -0
- package/dist/styles/text-slider-styles.js +35 -0
- package/dist/styles/text-slider-styles.js.map +1 -0
- package/package.json +8 -8
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { movementButton } from "../movement.js";
|
|
2
|
+
import { orderedItemAccessibleName } from "./a11y.js";
|
|
3
|
+
export function createReorderHandleControls(options) {
|
|
4
|
+
const { identifier, label, index, total, handleClassName, visibleText, messages, onMoveBy } = options;
|
|
5
|
+
const handle = document.createElement("button");
|
|
6
|
+
handle.type = "button";
|
|
7
|
+
handle.className = handleClassName;
|
|
8
|
+
handle.dataset.choiceIdentifier = identifier;
|
|
9
|
+
handle.setAttribute("aria-label", orderedItemAccessibleName(messages, label, index, total));
|
|
10
|
+
handle.textContent = visibleText;
|
|
11
|
+
handle.addEventListener("keydown", (event) => {
|
|
12
|
+
if (event.key === "ArrowUp" || event.key === "ArrowLeft") {
|
|
13
|
+
event.preventDefault();
|
|
14
|
+
onMoveBy(-1);
|
|
15
|
+
}
|
|
16
|
+
else if (event.key === "ArrowDown" || event.key === "ArrowRight") {
|
|
17
|
+
event.preventDefault();
|
|
18
|
+
onMoveBy(1);
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
const up = movementButton("up", messages.message("moveChoice", { label, direction: "up" }), () => onMoveBy(-1));
|
|
22
|
+
up.disabled = index === 0;
|
|
23
|
+
const down = movementButton("down", messages.message("moveChoice", { label, direction: "down" }), () => onMoveBy(1));
|
|
24
|
+
down.disabled = index === total - 1;
|
|
25
|
+
return { handle, up, down };
|
|
26
|
+
}
|
|
27
|
+
export function bindOrderListItemDrag(item, choiceIdentifier, index, dragState, moveChoice, findIndex) {
|
|
28
|
+
item.draggable = true;
|
|
29
|
+
item.dataset.choiceIdentifier = choiceIdentifier;
|
|
30
|
+
item.addEventListener("pointerdown", (event) => {
|
|
31
|
+
if (event.button !== 0 || event.target.closest("button"))
|
|
32
|
+
return;
|
|
33
|
+
dragState.pointerDraggedIdentifier = choiceIdentifier;
|
|
34
|
+
try {
|
|
35
|
+
item.setPointerCapture(event.pointerId);
|
|
36
|
+
}
|
|
37
|
+
catch {
|
|
38
|
+
// Synthetic pointer events and some browser drag paths do not create a capturable pointer.
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
item.addEventListener("pointerup", (event) => {
|
|
42
|
+
if (!dragState.pointerDraggedIdentifier)
|
|
43
|
+
return;
|
|
44
|
+
const target = document
|
|
45
|
+
.elementFromPoint(event.clientX, event.clientY)
|
|
46
|
+
?.closest(".qti3-reorder-item");
|
|
47
|
+
const targetIdentifier = target?.dataset.choiceIdentifier;
|
|
48
|
+
delete dragState.pointerDraggedIdentifier;
|
|
49
|
+
if (!targetIdentifier)
|
|
50
|
+
return;
|
|
51
|
+
moveChoice(findIndex(choiceIdentifier), findIndex(targetIdentifier));
|
|
52
|
+
});
|
|
53
|
+
item.addEventListener("pointercancel", () => {
|
|
54
|
+
delete dragState.pointerDraggedIdentifier;
|
|
55
|
+
});
|
|
56
|
+
item.addEventListener("dragstart", (event) => {
|
|
57
|
+
dragState.draggedIdentifier = choiceIdentifier;
|
|
58
|
+
event.dataTransfer?.setData("text/plain", choiceIdentifier);
|
|
59
|
+
event.dataTransfer?.setDragImage(item, 12, 12);
|
|
60
|
+
});
|
|
61
|
+
item.addEventListener("dragover", (event) => {
|
|
62
|
+
event.preventDefault();
|
|
63
|
+
item.classList.add("qti3-drop-target");
|
|
64
|
+
});
|
|
65
|
+
item.addEventListener("dragleave", () => item.classList.remove("qti3-drop-target"));
|
|
66
|
+
item.addEventListener("drop", (event) => {
|
|
67
|
+
event.preventDefault();
|
|
68
|
+
item.classList.remove("qti3-drop-target");
|
|
69
|
+
const dragged = event.dataTransfer?.getData("text/plain") || dragState.draggedIdentifier;
|
|
70
|
+
if (!dragged)
|
|
71
|
+
return;
|
|
72
|
+
moveChoice(findIndex(dragged), index);
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
//# sourceMappingURL=list-controls.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-controls.js","sourceRoot":"","sources":["../../src/reorder/list-controls.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEhD,OAAO,EAAE,yBAAyB,EAAE,MAAM,WAAW,CAAC;AAatD,MAAM,UAAU,2BAA2B,CAAC,OAA6B;IAKvE,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,GACzF,OAAO,CAAC;IAEV,MAAM,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;IAChD,MAAM,CAAC,IAAI,GAAG,QAAQ,CAAC;IACvB,MAAM,CAAC,SAAS,GAAG,eAAe,CAAC;IACnC,MAAM,CAAC,OAAO,CAAC,gBAAgB,GAAG,UAAU,CAAC;IAC7C,MAAM,CAAC,YAAY,CAAC,YAAY,EAAE,yBAAyB,CAAC,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC;IAC5F,MAAM,CAAC,WAAW,GAAG,WAAW,CAAC;IACjC,MAAM,CAAC,gBAAgB,CAAC,SAAS,EAAE,CAAC,KAAK,EAAE,EAAE;QAC3C,IAAI,KAAK,CAAC,GAAG,KAAK,SAAS,IAAI,KAAK,CAAC,GAAG,KAAK,WAAW,EAAE,CAAC;YACzD,KAAK,CAAC,cAAc,EAAE,CAAC;YACvB,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;QACf,CAAC;aAAM,IAAI,KAAK,CAAC,GAAG,KAAK,WAAW,IAAI,KAAK,CAAC,GAAG,KAAK,YAAY,EAAE,CAAC;YACnE,KAAK,CAAC,cAAc,EAAE,CAAC;YACvB,QAAQ,C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AAS,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC,CAAC;IAEpF,IAAI,CAAC,gBAAgB,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,EAAE;QACtC,KAAK,CAAC,cAAc,EAAE,CAAC;QACvB,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC;QAC1C,MAAM,OAAO,GAAG,KAAK,CAAC,YAAY,EAAE,OAAO,CAAC,YAAY,CAAC,IAAI,SAAS,CAAC,iBAAiB,CAAC;QACzF,IAAI,CAAC,OAAO;YAAE,OAAO;QACrB,UAAU,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,KAAK,CAAC,CAAC;IACxC,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { QtiInteraction, QtiValue } from "@longsightgroup/qti3-core";
|
|
2
|
+
import type { PlayerMessageResolver } from "../player-message-resolver.js";
|
|
3
|
+
export declare function renderOrderedResponse(interaction: QtiInteraction, update: (value: QtiValue) => void, currentValue: QtiValue, messages: PlayerMessageResolver): HTMLElement;
|
|
4
|
+
//# sourceMappingURL=order-interaction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"order-interaction.d.ts","sourceRoot":"","sources":["../../src/reorder/order-interaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAC1E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAc3E,wBAAgB,qBAAqB,CACnC,WAAW,EAAE,cAAc,EAC3B,MAAM,EAAE,CAAC,KAAK,EAAE,QAAQ,KAAK,IAAI,EACjC,YAAY,EAAE,QAAQ,EACtB,QAAQ,EAAE,qBAAqB,GAC9B,WAAW,CAwDb"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { interactionChoices, missingChoicesMessage, orderChoicesFromValue, responseGroup, } from "../interaction-support.js";
|
|
2
|
+
import { announceOrderedItemMove, createSelectionSummary, focusReorderControl } from "./a11y.js";
|
|
3
|
+
import { bindOrderListItemDrag, createReorderHandleControls, } from "./list-controls.js";
|
|
4
|
+
export function renderOrderedResponse(interaction, update, currentValue, messages) {
|
|
5
|
+
const group = responseGroup();
|
|
6
|
+
const choices = interactionChoices(interaction).filter((choice) => choice.role !== "gap");
|
|
7
|
+
if (choices.length === 0) {
|
|
8
|
+
group.append(missingChoicesMessage(interaction));
|
|
9
|
+
return group;
|
|
10
|
+
}
|
|
11
|
+
const ordered = orderChoicesFromValue(choices, currentValue);
|
|
12
|
+
const list = document.createElement("ol");
|
|
13
|
+
list.className = "qti3-reorder-list";
|
|
14
|
+
list.setAttribute("aria-label", messages.message("interactionCurrentOrderList", { type: interaction.type }));
|
|
15
|
+
const summary = createSelectionSummary();
|
|
16
|
+
const dragState = {};
|
|
17
|
+
const commit = () => update(ordered.map((choice) => choice.identifier));
|
|
18
|
+
const findIndex = (identifier) => ordered.findIndex((entry) => entry.identifier === identifier);
|
|
19
|
+
const moveChoice = (from, to) => {
|
|
20
|
+
if (from === to || from < 0 || from >= ordered.length || to < 0 || to >= ordered.length)
|
|
21
|
+
return;
|
|
22
|
+
const [choice] = ordered.splice(from, 1);
|
|
23
|
+
if (!choice)
|
|
24
|
+
return;
|
|
25
|
+
ordered.splice(to, 0, choice);
|
|
26
|
+
renderList();
|
|
27
|
+
announceOrderedItemMove(summary, messages, choice.text, to, ordered.length, from);
|
|
28
|
+
commit();
|
|
29
|
+
focusReorderControl(list, choice.identifier);
|
|
30
|
+
};
|
|
31
|
+
const renderList = () => {
|
|
32
|
+
list.replaceChildren(...ordered.map((choice, index) => {
|
|
33
|
+
const item = document.createElement("li");
|
|
34
|
+
item.className = "qti3-reorder-item";
|
|
35
|
+
bindOrderListItemDrag(item, choice.identifier, index, dragState, moveChoice, findIndex);
|
|
36
|
+
const { handle, up, down } = createReorderHandleControls({
|
|
37
|
+
identifier: choice.identifier,
|
|
38
|
+
label: choice.text,
|
|
39
|
+
index,
|
|
40
|
+
total: ordered.length,
|
|
41
|
+
handleClassName: "qti3-token qti3-reorder-handle",
|
|
42
|
+
visibleText: choice.text,
|
|
43
|
+
messages,
|
|
44
|
+
onMoveBy: (delta) => moveChoice(index, index + delta),
|
|
45
|
+
});
|
|
46
|
+
item.append(handle, up, down);
|
|
47
|
+
return item;
|
|
48
|
+
}));
|
|
49
|
+
};
|
|
50
|
+
renderList();
|
|
51
|
+
group.append(list, summary);
|
|
52
|
+
return group;
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=order-interaction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"order-interaction.js","sourceRoot":"","sources":["../../src/reorder/order-interaction.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,kBAAkB,EAClB,qBAAqB,EACrB,qBAAqB,EACrB,aAAa,GACd,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,uBAAuB,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AACjG,OAAO,EACL,qBAAqB,EACrB,2BAA2B,GAE5B,MAAM,oBAAoB,CAAC;AAE5B,MAAM,UAAU,qBAAqB,CACnC,WAA2B,EAC3B,MAAiC,EACjC,YAAsB,EACtB,QAA+B;IAE/B,MAAM,KAAK,GAAG,aAAa,EAAE,CAAC;IAC9B,MAAM,OAAO,GAAG,kBAAkB,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,KAAK,KAAK,CAAC,CAAC;IAC1F,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACzB,KAAK,CAAC,MAAM,CAAC,qBAAqB,CAAC,WAAW,CAAC,CAAC,CAAC;QACjD,OAAO,KAAK,CAAC;IACf,CAAC;IACD,MAAM,OAAO,GAAG,qBAAqB,CAAC,OAAO,EAAE,YAAY,CAAC,CA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IvB,CAAC"}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
export const BASE_PLAYER_STYLES = `
|
|
2
|
+
.qti3-embedded-interaction-unsupported {
|
|
3
|
+
color: CanvasText;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.qti3-portable-custom-host {
|
|
7
|
+
border: 1px solid CanvasText;
|
|
8
|
+
padding: 0.5rem;
|
|
9
|
+
margin-block-end: 0.5rem;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.qti3-player {
|
|
13
|
+
--qti3-match-accent: #2f6fca;
|
|
14
|
+
--qti3-match-target-bg: #f5f6f7;
|
|
15
|
+
--qti3-match-target-border: #6f7782;
|
|
16
|
+
|
|
17
|
+
display: grid;
|
|
18
|
+
gap: 1rem;
|
|
19
|
+
max-inline-size: 72rem;
|
|
20
|
+
font: 16px/1.45 system-ui, sans-serif;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
@supports (color: light-dark(#000, #fff)) {
|
|
24
|
+
.qti3-player {
|
|
25
|
+
--qti3-match-accent: light-dark(#2f6fca, #8ab4f8);
|
|
26
|
+
--qti3-match-target-bg: light-dark(#f5f6f7, #202124);
|
|
27
|
+
--qti3-match-target-border: light-dark(#6f7782, #9aa0a6);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.qti3-interaction {
|
|
32
|
+
display: grid;
|
|
33
|
+
gap: 0.75rem;
|
|
34
|
+
min-inline-size: 0;
|
|
35
|
+
max-inline-size: 100%;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.qti3-item-body {
|
|
39
|
+
display: grid;
|
|
40
|
+
gap: 1rem;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.qti3-item-body > * {
|
|
44
|
+
margin-block: 0;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.qti3-player .qti-hidden {
|
|
48
|
+
display: none !important;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.qti3-player .qti-visually-hidden,
|
|
52
|
+
.qti3-player .qti3-selection-summary,
|
|
53
|
+
.qti3-player .qti3-coordinate-output {
|
|
54
|
+
position: absolute !important;
|
|
55
|
+
overflow: hidden !important;
|
|
56
|
+
clip: rect(1px, 1px, 1px, 1px) !important;
|
|
57
|
+
clip-path: inset(50%) !important;
|
|
58
|
+
inline-size: 1px !important;
|
|
59
|
+
block-size: 1px !important;
|
|
60
|
+
margin: -1px !important;
|
|
61
|
+
padding: 0 !important;
|
|
62
|
+
border: 0 !important;
|
|
63
|
+
white-space: nowrap !important;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
qti-assessment-item-player[data-show-live-regions] .qti3-selection-summary,
|
|
67
|
+
qti-assessment-item-player[data-show-live-regions] .qti3-coordinate-output {
|
|
68
|
+
position: static !important;
|
|
69
|
+
overflow: visible !important;
|
|
70
|
+
clip: auto !important;
|
|
71
|
+
clip-path: none !important;
|
|
72
|
+
inline-size: auto !important;
|
|
73
|
+
block-size: auto !important;
|
|
74
|
+
margin: 0 0 0.5rem !important;
|
|
75
|
+
padding: 0 !important;
|
|
76
|
+
border: 0 !important;
|
|
77
|
+
white-space: normal !important;
|
|
78
|
+
font-size: 0.875rem;
|
|
79
|
+
color: light-dark(#5f6368, #bdc1c6);
|
|
80
|
+
font-style: italic;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.qti3-embedded-interaction {
|
|
84
|
+
display: inline-flex;
|
|
85
|
+
gap: 0.35rem;
|
|
86
|
+
margin-inline: 0.18rem;
|
|
87
|
+
align-items: baseline;
|
|
88
|
+
vertical-align: baseline;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.qti3-inline-text-input {
|
|
92
|
+
inline-size: auto;
|
|
93
|
+
min-inline-size: 8ch;
|
|
94
|
+
max-inline-size: 18ch;
|
|
95
|
+
margin-inline: 0.25rem;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.qti3-printed-variable {
|
|
99
|
+
font-weight: 700;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.qti3-feedback-block {
|
|
103
|
+
padding: 0.75rem;
|
|
104
|
+
border-inline-start: 4px solid Highlight;
|
|
105
|
+
background: Canvas;
|
|
106
|
+
color: CanvasText;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.qti3-response-group {
|
|
110
|
+
min-inline-size: 0;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.qti3-response-group > * + * {
|
|
114
|
+
margin-block-start: 0.75rem;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.qti3-token:focus,
|
|
118
|
+
.qti3-hotspot-button:focus,
|
|
119
|
+
.qti3-player button:focus-visible,
|
|
120
|
+
.qti3-player select:focus-visible,
|
|
121
|
+
.qti3-player input:focus-visible,
|
|
122
|
+
.qti3-player textarea:focus-visible {
|
|
123
|
+
outline: 3px solid Highlight;
|
|
124
|
+
outline-offset: 2px;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
@media (prefers-reduced-motion: reduce) {
|
|
128
|
+
.qti3-player * {
|
|
129
|
+
scroll-behavior: auto;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
`.trim();
|
|
133
|
+
//# sourceMappingURL=base-styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base-styles.js","sourceRoot":"","sources":["../../src/styles/base-styles.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,kBAAkB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmIjC,CAAC,IAAI,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"choice-hottext-styles.d.ts","sourceRoot":"","sources":["../../src/styles/choice-hottext-styles.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,4BAA4B,QA0EjC,CAAC"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
export const CHOICE_HOTTEXT_PLAYER_STYLES = `
|
|
2
|
+
.qti3-choice-list {
|
|
3
|
+
display: grid;
|
|
4
|
+
gap: 0.5rem;
|
|
5
|
+
grid-template-columns: minmax(0, 42rem);
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.qti3-choice-option {
|
|
9
|
+
display: grid;
|
|
10
|
+
grid-template-columns: auto auto minmax(0, 1fr);
|
|
11
|
+
gap: 0.65rem;
|
|
12
|
+
align-items: center;
|
|
13
|
+
justify-content: start;
|
|
14
|
+
inline-size: 100%;
|
|
15
|
+
box-sizing: border-box;
|
|
16
|
+
min-block-size: 2.75rem;
|
|
17
|
+
padding: 0.65rem 0.8rem;
|
|
18
|
+
border: 1px solid CanvasText;
|
|
19
|
+
background: Canvas;
|
|
20
|
+
color: CanvasText;
|
|
21
|
+
cursor: pointer;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.qti3-choice-option input {
|
|
25
|
+
margin: 0;
|
|
26
|
+
inline-size: 1rem;
|
|
27
|
+
block-size: 1rem;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.qti3-choice-label {
|
|
31
|
+
min-inline-size: 1.75rem;
|
|
32
|
+
font-weight: 700;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.qti3-choice-text {
|
|
36
|
+
min-inline-size: 0;
|
|
37
|
+
overflow-wrap: anywhere;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.qti3-choice-option[data-selected="true"] {
|
|
41
|
+
background: Highlight;
|
|
42
|
+
color: HighlightText;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.qti3-hottext-group {
|
|
46
|
+
max-inline-size: 58rem;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.qti3-hottext-passage {
|
|
50
|
+
margin-block: 0;
|
|
51
|
+
font-size: 1.05rem;
|
|
52
|
+
line-height: 1.75;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.qti3-hottext-token {
|
|
56
|
+
display: inline;
|
|
57
|
+
margin-inline: 0.1rem;
|
|
58
|
+
padding: 0.12rem 0.28rem;
|
|
59
|
+
border: 1px solid CanvasText;
|
|
60
|
+
border-radius: 0.2rem;
|
|
61
|
+
background: Canvas;
|
|
62
|
+
color: LinkText;
|
|
63
|
+
font: inherit;
|
|
64
|
+
text-decoration: underline;
|
|
65
|
+
text-decoration-thickness: 0.08em;
|
|
66
|
+
text-underline-offset: 0.16em;
|
|
67
|
+
cursor: pointer;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.qti3-hottext-token[data-selected="true"] {
|
|
71
|
+
background: Highlight;
|
|
72
|
+
color: HighlightText;
|
|
73
|
+
text-decoration-color: HighlightText;
|
|
74
|
+
}
|
|
75
|
+
`.trim();
|
|
76
|
+
//# sourceMappingURL=choice-hottext-styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"choice-hottext-styles.js","sourceRoot":"","sources":["../../src/styles/choice-hottext-styles.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,4BAA4B,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0E3C,CAAC,IAAI,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"control-styles.d.ts","sourceRoot":"","sources":["../../src/styles/control-styles.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB,QAgH1B,CAAC"}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
export const CONTROL_PLAYER_STYLES = `
|
|
2
|
+
.qti3-reorder-item,
|
|
3
|
+
.qti3-token-region,
|
|
4
|
+
.qti3-pair-chip,
|
|
5
|
+
.qti3-gap-region,
|
|
6
|
+
.qti3-gap-target {
|
|
7
|
+
display: flex;
|
|
8
|
+
flex-wrap: wrap;
|
|
9
|
+
gap: 0.5rem;
|
|
10
|
+
align-items: center;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.qti3-reorder-list {
|
|
14
|
+
display: grid;
|
|
15
|
+
gap: 0.5rem;
|
|
16
|
+
padding-inline-start: 1.5rem;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.qti3-reorder-item {
|
|
20
|
+
padding: 0.5rem;
|
|
21
|
+
border: 1px solid CanvasText;
|
|
22
|
+
background: Canvas;
|
|
23
|
+
color: CanvasText;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.qti3-drop-target {
|
|
27
|
+
outline: 3px solid Highlight;
|
|
28
|
+
outline-offset: 2px;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.qti3-token,
|
|
32
|
+
.qti3-icon-button,
|
|
33
|
+
.qti3-player button,
|
|
34
|
+
.qti3-player select,
|
|
35
|
+
.qti3-player input,
|
|
36
|
+
.qti3-player textarea {
|
|
37
|
+
font: inherit;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.qti3-token {
|
|
41
|
+
min-inline-size: 2.5rem;
|
|
42
|
+
padding: 0.35rem 0.65rem;
|
|
43
|
+
border: 1px solid CanvasText;
|
|
44
|
+
background: Canvas;
|
|
45
|
+
color: CanvasText;
|
|
46
|
+
cursor: grab;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.qti3-icon-button {
|
|
50
|
+
display: inline-grid;
|
|
51
|
+
place-items: center;
|
|
52
|
+
inline-size: 2.25rem;
|
|
53
|
+
block-size: 2.25rem;
|
|
54
|
+
padding: 0;
|
|
55
|
+
line-height: 1;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.qti3-remove-button {
|
|
59
|
+
border: 1px solid currentColor;
|
|
60
|
+
background: transparent;
|
|
61
|
+
color: inherit;
|
|
62
|
+
cursor: pointer;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.qti3-remove-button:hover {
|
|
66
|
+
background: color-mix(in srgb, currentColor 14%, transparent);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.qti3-trash-icon {
|
|
70
|
+
inline-size: 1.125rem;
|
|
71
|
+
block-size: 1.125rem;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.qti3-movement-icon {
|
|
75
|
+
inline-size: 1rem;
|
|
76
|
+
block-size: 1rem;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.qti3-trash-icon path,
|
|
80
|
+
.qti3-movement-icon path {
|
|
81
|
+
fill: none;
|
|
82
|
+
stroke: currentColor;
|
|
83
|
+
stroke-width: 2;
|
|
84
|
+
stroke-linecap: round;
|
|
85
|
+
stroke-linejoin: round;
|
|
86
|
+
vector-effect: non-scaling-stroke;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.qti3-token[aria-pressed="true"],
|
|
90
|
+
.qti3-pair-chip {
|
|
91
|
+
background: Highlight;
|
|
92
|
+
color: HighlightText;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.qti3-pair-list {
|
|
96
|
+
display: grid;
|
|
97
|
+
gap: 0.5rem;
|
|
98
|
+
padding-inline-start: 1.5rem;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.qti3-pair-chip {
|
|
102
|
+
width: fit-content;
|
|
103
|
+
padding: 0.35rem 0.5rem;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.qti3-point-controls,
|
|
107
|
+
.qti3-drawing-tools {
|
|
108
|
+
display: flex;
|
|
109
|
+
flex-wrap: wrap;
|
|
110
|
+
gap: 0.5rem;
|
|
111
|
+
margin-block-start: 0.5rem;
|
|
112
|
+
}
|
|
113
|
+
`.trim();
|
|
114
|
+
//# sourceMappingURL=control-styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"control-styles.js","sourceRoot":"","sources":["../../src/styles/control-styles.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,qBAAqB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgHpC,CAAC,IAAI,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"drawing-styles.d.ts","sourceRoot":"","sources":["../../src/styles/drawing-styles.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB,QA4B1B,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export const DRAWING_PLAYER_STYLES = `
|
|
2
|
+
.qti3-drawing-surface {
|
|
3
|
+
color-scheme: light;
|
|
4
|
+
box-sizing: border-box;
|
|
5
|
+
border: 1px solid #000;
|
|
6
|
+
background: #fff;
|
|
7
|
+
color: #000;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.qti3-drawing-surface .qti3-drawing-stroke {
|
|
11
|
+
fill: none;
|
|
12
|
+
stroke: #000;
|
|
13
|
+
stroke-width: 3;
|
|
14
|
+
stroke-linecap: round;
|
|
15
|
+
stroke-linejoin: round;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
@media (forced-colors: active) {
|
|
19
|
+
.qti3-drawing-surface {
|
|
20
|
+
border-color: CanvasText;
|
|
21
|
+
background: Canvas;
|
|
22
|
+
color: #000;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.qti3-drawing-surface .qti3-drawing-stroke {
|
|
26
|
+
stroke: #000;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
`.trim();
|
|
30
|
+
//# sourceMappingURL=drawing-styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"drawing-styles.js","sourceRoot":"","sources":["../../src/styles/drawing-styles.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,qBAAqB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4BpC,CAAC,IAAI,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gap-match-styles.d.ts","sourceRoot":"","sources":["../../src/styles/gap-match-styles.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,uBAAuB,QA+B5B,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export const GAP_MATCH_PLAYER_STYLES = `
|
|
2
|
+
.qti3-gap-target {
|
|
3
|
+
min-block-size: 2.75rem;
|
|
4
|
+
padding: 0.5rem;
|
|
5
|
+
border: 1px dashed CanvasText;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.qti3-gap-region {
|
|
9
|
+
margin-block-start: 0.5rem;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.qti3-gap-passage {
|
|
13
|
+
display: block;
|
|
14
|
+
max-inline-size: 62rem;
|
|
15
|
+
line-height: 2.3;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.qti3-gap-passage .qti3-gap-target {
|
|
19
|
+
display: inline-flex;
|
|
20
|
+
padding: 0;
|
|
21
|
+
border: 0;
|
|
22
|
+
margin-inline: 0.15rem;
|
|
23
|
+
margin-block: 0.2rem;
|
|
24
|
+
vertical-align: middle;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.qti3-gap-button {
|
|
28
|
+
min-inline-size: 8rem;
|
|
29
|
+
min-block-size: 2.25rem;
|
|
30
|
+
text-align: start;
|
|
31
|
+
}
|
|
32
|
+
`.trim();
|
|
33
|
+
//# sourceMappingURL=gap-match-styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gap-match-styles.js","sourceRoot":"","sources":["../../src/styles/gap-match-styles.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,uBAAuB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+BtC,CAAC,IAAI,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graphic-styles.d.ts","sourceRoot":"","sources":["../../src/styles/graphic-styles.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB,QA+R1B,CAAC"}
|