@longsightgroup/qti3-player 0.2.1 → 0.3.0
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/icons.d.ts +8 -0
- package/dist/icons.d.ts.map +1 -0
- package/dist/icons.js +45 -0
- package/dist/icons.js.map +1 -0
- package/dist/index.d.ts +3 -134
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -4712
- package/dist/index.js.map +1 -1
- package/dist/interaction-support.d.ts +34 -0
- package/dist/interaction-support.d.ts.map +1 -0
- package/dist/interaction-support.js +189 -0
- package/dist/interaction-support.js.map +1 -0
- package/dist/movement.d.ts +3 -0
- package/dist/movement.d.ts.map +1 -0
- package/dist/movement.js +21 -0
- package/dist/movement.js.map +1 -0
- package/dist/player-element.d.ts +60 -0
- package/dist/player-element.d.ts.map +1 -0
- package/dist/player-element.js +367 -0
- package/dist/player-element.js.map +1 -0
- package/dist/player-locale.d.ts +6 -0
- package/dist/player-locale.d.ts.map +1 -0
- package/dist/player-locale.js +205 -0
- package/dist/player-locale.js.map +1 -0
- package/dist/player-messages.d.ts +40 -0
- package/dist/player-messages.d.ts.map +1 -0
- package/dist/player-messages.js +2 -0
- package/dist/player-messages.js.map +1 -0
- package/dist/player-styles.d.ts +3 -0
- package/dist/player-styles.d.ts.map +1 -0
- package/dist/player-styles.js +24 -0
- package/dist/player-styles.js.map +1 -0
- package/dist/player-types.d.ts +71 -0
- package/dist/player-types.d.ts.map +1 -0
- package/dist/player-types.js +2 -0
- package/dist/player-types.js.map +1 -0
- package/dist/player-validation-dom.d.ts +3 -0
- package/dist/player-validation-dom.d.ts.map +1 -0
- package/dist/player-validation-dom.js +28 -0
- package/dist/player-validation-dom.js.map +1 -0
- package/dist/player-validation.d.ts +13 -0
- package/dist/player-validation.d.ts.map +1 -0
- package/dist/player-validation.js +123 -0
- package/dist/player-validation.js.map +1 -0
- package/dist/portable-custom-support.d.ts +11 -0
- package/dist/portable-custom-support.d.ts.map +1 -0
- package/dist/portable-custom-support.js +70 -0
- package/dist/portable-custom-support.js.map +1 -0
- package/dist/response-limits.d.ts +9 -0
- package/dist/response-limits.d.ts.map +1 -0
- package/dist/response-limits.js +44 -0
- package/dist/response-limits.js.map +1 -0
- package/package.json +4 -4
- package/src/content/content-dom.ts +274 -0
- package/src/content/content-renderer.ts +114 -0
- package/src/controls/remove-button.ts +13 -0
- package/src/icons.ts +47 -0
- package/src/index.ts +26 -5307
- package/src/interaction-support.ts +263 -0
- package/src/interactions/choice-interaction.ts +92 -0
- package/src/interactions/drawing-interaction.ts +447 -0
- package/src/interactions/end-attempt-interaction.ts +19 -0
- package/src/interactions/gap-match-interaction.ts +337 -0
- package/src/interactions/graphic-associate-interaction.ts +324 -0
- package/src/interactions/graphic-context.ts +33 -0
- package/src/interactions/hotspot-interaction.ts +87 -0
- package/src/interactions/hottext-interaction.ts +81 -0
- package/src/interactions/inline-choice-interaction.ts +45 -0
- package/src/interactions/inline-controls.ts +21 -0
- package/src/interactions/interaction-diagnostics.ts +159 -0
- package/src/interactions/interaction-dispatch.ts +9 -0
- package/src/interactions/interaction-label.ts +10 -0
- package/src/interactions/interaction-registry.ts +209 -0
- package/src/interactions/match-interaction.ts +199 -0
- package/src/interactions/object-asset.ts +212 -0
- package/src/interactions/pair-interaction.ts +147 -0
- package/src/interactions/point-value.ts +41 -0
- package/src/interactions/portable-custom-interaction.ts +139 -0
- package/src/interactions/position-object-interaction.ts +210 -0
- package/src/interactions/routing.ts +27 -0
- package/src/interactions/select-point-interaction.ts +185 -0
- package/src/interactions/shared.ts +56 -0
- package/src/interactions/text-interaction.ts +127 -0
- package/src/interactions/unsupported-interaction.ts +25 -0
- package/src/interactions/upload-interaction.ts +16 -0
- package/src/movement.ts +29 -0
- package/src/player/attempt-availability.ts +36 -0
- package/src/player/content-state.ts +63 -0
- package/src/player/dynamic-body.ts +40 -0
- package/src/player/feedback-panel.ts +23 -0
- package/src/player/fetch-xml.ts +8 -0
- package/src/player/interaction-render.ts +89 -0
- package/src/player/render-shell.ts +44 -0
- package/src/player/resolve-assets.ts +12 -0
- package/src/player/validation-messages.ts +42 -0
- package/src/player-element.ts +493 -0
- package/src/player-locale.ts +232 -0
- package/src/player-messages.ts +31 -0
- package/src/player-styles.ts +25 -0
- package/src/player-types.ts +99 -0
- package/src/player-validation-dom.ts +31 -0
- package/src/player-validation.ts +158 -0
- package/src/portable-custom-support.ts +74 -0
- package/src/reorder/a11y.ts +40 -0
- package/src/reorder/graphic-order-interaction.ts +260 -0
- package/src/reorder/list-controls.ts +114 -0
- package/src/reorder/order-interaction.ts +75 -0
- package/src/response-limits.ts +47 -0
- package/src/styles/base-styles.ts +117 -0
- package/src/styles/choice-hottext-styles.ts +75 -0
- package/src/styles/control-styles.ts +113 -0
- package/src/styles/drawing-styles.ts +29 -0
- package/src/styles/gap-match-styles.ts +32 -0
- package/src/styles/graphic-styles.ts +294 -0
- package/src/styles/match-pair-styles.ts +61 -0
- package/src/styles/text-slider-styles.ts +34 -0
|
@@ -0,0 +1,75 @@
|
|
|
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();
|
|
@@ -0,0 +1,113 @@
|
|
|
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();
|
|
@@ -0,0 +1,29 @@
|
|
|
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();
|
|
@@ -0,0 +1,32 @@
|
|
|
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();
|
|
@@ -0,0 +1,294 @@
|
|
|
1
|
+
export const GRAPHIC_PLAYER_STYLES = `
|
|
2
|
+
.qti3-coordinate-output {
|
|
3
|
+
display: block;
|
|
4
|
+
margin-block-start: 0.4rem;
|
|
5
|
+
font-size: 0.9rem;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.qti3-hotspot-button[data-selected="true"] {
|
|
9
|
+
background: Highlight !important;
|
|
10
|
+
color: HighlightText !important;
|
|
11
|
+
outline: 3px solid Highlight;
|
|
12
|
+
outline-offset: 2px;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.qti3-hotspot-button {
|
|
16
|
+
position: absolute;
|
|
17
|
+
inset-inline-start: var(--qti3-graphic-region-inline-start, 0);
|
|
18
|
+
inset-block-start: var(--qti3-graphic-region-block-start, 0);
|
|
19
|
+
inline-size: var(--qti3-graphic-region-inline-size, auto);
|
|
20
|
+
block-size: var(--qti3-graphic-region-block-size, auto);
|
|
21
|
+
display: grid;
|
|
22
|
+
place-items: start;
|
|
23
|
+
padding: 0.25rem;
|
|
24
|
+
border: 2px solid CanvasText;
|
|
25
|
+
background: color-mix(in srgb, Canvas 65%, transparent);
|
|
26
|
+
color: CanvasText;
|
|
27
|
+
font-size: 0.8rem;
|
|
28
|
+
font-weight: 700;
|
|
29
|
+
line-height: 1;
|
|
30
|
+
cursor: pointer;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.qti3-hotspot-button[data-shape="circle"] {
|
|
34
|
+
border-radius: 50%;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.qti3-graphic-associate-hotspot,
|
|
38
|
+
.qti3-graphic-gap-hotspot,
|
|
39
|
+
.qti3-graphic-order-hotspot {
|
|
40
|
+
position: absolute;
|
|
41
|
+
inset-inline-start: var(--qti3-graphic-region-inline-start, 0);
|
|
42
|
+
inset-block-start: var(--qti3-graphic-region-block-start, 0);
|
|
43
|
+
inline-size: var(--qti3-graphic-region-inline-size, auto);
|
|
44
|
+
block-size: var(--qti3-graphic-region-block-size, auto);
|
|
45
|
+
z-index: 2;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.qti3-graphic-associate-hotspot[data-shape="circle"],
|
|
49
|
+
.qti3-graphic-gap-hotspot[data-shape="circle"],
|
|
50
|
+
.qti3-graphic-order-hotspot[data-shape="circle"] {
|
|
51
|
+
border-radius: 50%;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.qti3-hotspot.qti-selections-light .qti3-hotspot-button {
|
|
55
|
+
border-color: white;
|
|
56
|
+
color: white;
|
|
57
|
+
background: rgb(0 0 0 / 0.45);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.qti3-hotspot.qti-selections-dark .qti3-hotspot-button {
|
|
61
|
+
border-color: black;
|
|
62
|
+
color: black;
|
|
63
|
+
background: rgb(255 255 255 / 0.65);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.qti3-hotspot.qti-unselected-hidden
|
|
67
|
+
.qti3-hotspot-button:not([data-selected="true"]):not(:focus):not(:focus-visible) {
|
|
68
|
+
opacity: 0;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
@supports not (background: color-mix(in srgb, Canvas 65%, transparent)) {
|
|
72
|
+
.qti3-hotspot-button {
|
|
73
|
+
background: Canvas;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
@media (forced-colors: active) {
|
|
78
|
+
.qti3-hotspot.qti-selections-light .qti3-hotspot-button,
|
|
79
|
+
.qti3-hotspot.qti-selections-dark .qti3-hotspot-button {
|
|
80
|
+
border-color: CanvasText;
|
|
81
|
+
color: CanvasText;
|
|
82
|
+
background: Canvas;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.qti3-graphic-surface,
|
|
87
|
+
.qti3-hotspot-surface,
|
|
88
|
+
.qti3-point-surface,
|
|
89
|
+
.qti3-position-object-stage,
|
|
90
|
+
.qti3-graphic-associate-surface,
|
|
91
|
+
.qti3-graphic-gap-match-surface,
|
|
92
|
+
.qti3-graphic-order-surface {
|
|
93
|
+
position: relative;
|
|
94
|
+
border: 1px solid CanvasText;
|
|
95
|
+
background: Canvas;
|
|
96
|
+
overflow: hidden;
|
|
97
|
+
max-inline-size: 100%;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.qti3-graphic-associate-surface,
|
|
101
|
+
.qti3-graphic-gap-match-surface,
|
|
102
|
+
.qti3-graphic-order-surface {
|
|
103
|
+
touch-action: manipulation;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.qti3-graphic-associate-lines,
|
|
107
|
+
.qti3-graphic-sequence-lines {
|
|
108
|
+
position: absolute;
|
|
109
|
+
inset: 0;
|
|
110
|
+
inline-size: 100%;
|
|
111
|
+
block-size: 100%;
|
|
112
|
+
pointer-events: none;
|
|
113
|
+
z-index: 1;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.qti3-graphic-associate-lines line,
|
|
117
|
+
.qti3-graphic-sequence-lines line {
|
|
118
|
+
stroke: Highlight;
|
|
119
|
+
stroke-width: 4;
|
|
120
|
+
stroke-linecap: round;
|
|
121
|
+
vector-effect: non-scaling-stroke;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.qti3-graphic-sequence-lines marker path {
|
|
125
|
+
fill: Highlight;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.qti3-graphic-associate-hotspot,
|
|
129
|
+
.qti3-graphic-gap-hotspot,
|
|
130
|
+
.qti3-graphic-order-hotspot {
|
|
131
|
+
touch-action: none;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.qti3-graphic-gap-match-surface {
|
|
135
|
+
overflow: visible;
|
|
136
|
+
margin-block-end: calc(var(--qti3-graphic-gap-label-block-size, 2rem) + 0.75rem);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.qti3-point-surface {
|
|
140
|
+
display: block;
|
|
141
|
+
box-sizing: border-box;
|
|
142
|
+
cursor: crosshair;
|
|
143
|
+
color: CanvasText;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.qti3-position-object-stage {
|
|
147
|
+
box-sizing: border-box;
|
|
148
|
+
color: CanvasText;
|
|
149
|
+
touch-action: none;
|
|
150
|
+
overflow: visible;
|
|
151
|
+
margin-block-end: calc(var(--qti3-position-object-marker-block-size, 2rem) + 12px);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.qti3-graphic-object-image {
|
|
155
|
+
position: absolute;
|
|
156
|
+
inset: 0;
|
|
157
|
+
inline-size: 100%;
|
|
158
|
+
block-size: 100%;
|
|
159
|
+
object-fit: contain;
|
|
160
|
+
pointer-events: none;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.qti3-position-object-marker {
|
|
164
|
+
position: absolute;
|
|
165
|
+
inline-size: var(--qti3-position-object-marker-inline-size, 2rem);
|
|
166
|
+
block-size: var(--qti3-position-object-marker-block-size, 2rem);
|
|
167
|
+
transform: translate(-50%, -50%);
|
|
168
|
+
border: 2px solid CanvasText;
|
|
169
|
+
background: Canvas;
|
|
170
|
+
color: CanvasText;
|
|
171
|
+
padding: 0;
|
|
172
|
+
cursor: grab;
|
|
173
|
+
touch-action: none;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.qti3-position-object-marker[data-placed="true"] {
|
|
177
|
+
inset-inline-start: var(--qti3-position-object-marker-inline-start);
|
|
178
|
+
inset-block-start: var(--qti3-position-object-marker-block-start);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.qti3-position-object-marker[data-dragging="true"] {
|
|
182
|
+
cursor: grabbing;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.qti3-position-object-marker[data-placed="false"] {
|
|
186
|
+
inset-inline-start: var(--qti3-position-object-unplaced-inline-start, 50%);
|
|
187
|
+
inset-block-start: var(--qti3-position-object-unplaced-block-start, calc(100% + 1rem));
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.qti3-position-object-marker img {
|
|
191
|
+
inline-size: 100%;
|
|
192
|
+
block-size: 100%;
|
|
193
|
+
object-fit: contain;
|
|
194
|
+
pointer-events: none;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.qti3-point-marker {
|
|
198
|
+
position: absolute;
|
|
199
|
+
inset-inline-start: var(--qti3-point-marker-inline-start);
|
|
200
|
+
inset-block-start: var(--qti3-point-marker-block-start);
|
|
201
|
+
inline-size: 8px;
|
|
202
|
+
block-size: 8px;
|
|
203
|
+
border: 2px solid CanvasText;
|
|
204
|
+
border-radius: 50%;
|
|
205
|
+
transform: translate(-50%, -50%);
|
|
206
|
+
pointer-events: none;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.qti3-point-marker[data-active="true"] {
|
|
210
|
+
outline: 2px solid Highlight;
|
|
211
|
+
outline-offset: 1px;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.qti3-graphic-gap-hotspot {
|
|
215
|
+
display: grid;
|
|
216
|
+
place-items: center;
|
|
217
|
+
padding: 0;
|
|
218
|
+
overflow: visible;
|
|
219
|
+
border-style: dashed;
|
|
220
|
+
background: rgb(255 255 255 / 0.08);
|
|
221
|
+
color: CanvasText;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
.qti3-graphic-gap-hotspot[data-selected="true"] {
|
|
225
|
+
border-style: solid;
|
|
226
|
+
background: color-mix(in srgb, Highlight 18%, Canvas);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.qti3-graphic-gap-label {
|
|
230
|
+
position: absolute;
|
|
231
|
+
inset-block-start: calc(100% + 0.2rem);
|
|
232
|
+
inset-inline-start: 50%;
|
|
233
|
+
transform: translateX(-50%);
|
|
234
|
+
box-sizing: border-box;
|
|
235
|
+
inline-size: max-content;
|
|
236
|
+
max-inline-size: min(12rem, calc(100vw - 2rem));
|
|
237
|
+
min-inline-size: 0;
|
|
238
|
+
padding: 0.25rem 0.4rem;
|
|
239
|
+
border: 1px solid CanvasText;
|
|
240
|
+
border-radius: 0.25rem;
|
|
241
|
+
background: Canvas;
|
|
242
|
+
color: CanvasText;
|
|
243
|
+
font-size: 0.75rem;
|
|
244
|
+
font-weight: 700;
|
|
245
|
+
line-height: 1.15;
|
|
246
|
+
overflow-wrap: anywhere;
|
|
247
|
+
pointer-events: none;
|
|
248
|
+
box-shadow: 0 1px 2px rgb(0 0 0 / 0.16);
|
|
249
|
+
text-align: center;
|
|
250
|
+
white-space: normal;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
@supports not (background: color-mix(in srgb, Highlight 18%, Canvas)) {
|
|
254
|
+
.qti3-graphic-gap-hotspot[data-selected="true"] {
|
|
255
|
+
background: Canvas;
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
.qti3-graphic-order-hotspot {
|
|
260
|
+
display: grid;
|
|
261
|
+
place-items: center;
|
|
262
|
+
gap: 0.15rem;
|
|
263
|
+
text-align: center;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
.qti3-graphic-order-number {
|
|
267
|
+
display: grid;
|
|
268
|
+
place-items: center;
|
|
269
|
+
min-inline-size: 1.45rem;
|
|
270
|
+
min-block-size: 1.45rem;
|
|
271
|
+
border-radius: 999px;
|
|
272
|
+
background: Highlight;
|
|
273
|
+
color: HighlightText;
|
|
274
|
+
font-weight: 700;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
.qti3-graphic-order-number:empty {
|
|
278
|
+
display: none;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
.qti3-graphic-order-list {
|
|
282
|
+
display: grid;
|
|
283
|
+
gap: 0.5rem;
|
|
284
|
+
padding-inline-start: 1.5rem;
|
|
285
|
+
margin-block: 0.5rem 0;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
.qti3-graphic-order-item {
|
|
289
|
+
display: flex;
|
|
290
|
+
flex-wrap: wrap;
|
|
291
|
+
gap: 0.4rem;
|
|
292
|
+
align-items: center;
|
|
293
|
+
}
|
|
294
|
+
`.trim();
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
export const MATCH_PAIR_PLAYER_STYLES = `
|
|
2
|
+
.qti3-pair-selector {
|
|
3
|
+
display: grid;
|
|
4
|
+
gap: 0.75rem;
|
|
5
|
+
grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
|
|
6
|
+
align-items: start;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.qti3-match-selector {
|
|
10
|
+
display: grid;
|
|
11
|
+
gap: 1.5rem;
|
|
12
|
+
inline-size: 100%;
|
|
13
|
+
max-inline-size: 72rem;
|
|
14
|
+
box-sizing: border-box;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.qti3-match-source-bank,
|
|
18
|
+
.qti3-match-target-bank {
|
|
19
|
+
align-items: stretch;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.qti3-token.qti3-match-source {
|
|
23
|
+
border-color: var(--qti3-match-accent);
|
|
24
|
+
background: Canvas;
|
|
25
|
+
color: var(--qti3-match-accent);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.qti3-token.qti3-match-target {
|
|
29
|
+
flex: 1 1 9rem;
|
|
30
|
+
min-inline-size: 0;
|
|
31
|
+
max-inline-size: 100%;
|
|
32
|
+
min-block-size: 5rem;
|
|
33
|
+
box-sizing: border-box;
|
|
34
|
+
border-color: var(--qti3-match-target-border);
|
|
35
|
+
background: var(--qti3-match-target-bg);
|
|
36
|
+
color: CanvasText;
|
|
37
|
+
font-weight: 700;
|
|
38
|
+
white-space: normal;
|
|
39
|
+
overflow-wrap: anywhere;
|
|
40
|
+
text-align: center;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
@media (forced-colors: active) {
|
|
44
|
+
.qti3-token.qti3-match-source {
|
|
45
|
+
border-color: LinkText;
|
|
46
|
+
color: LinkText;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.qti3-token.qti3-match-target {
|
|
50
|
+
border-color: GrayText;
|
|
51
|
+
background: ButtonFace;
|
|
52
|
+
color: ButtonText;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.qti3-region-label {
|
|
57
|
+
flex-basis: 100%;
|
|
58
|
+
font-size: 0.9rem;
|
|
59
|
+
font-weight: 700;
|
|
60
|
+
}
|
|
61
|
+
`.trim();
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export const TEXT_SLIDER_PLAYER_STYLES = `
|
|
2
|
+
.qti3-text-response,
|
|
3
|
+
.qti3-slider-response {
|
|
4
|
+
display: grid;
|
|
5
|
+
gap: 0.4rem;
|
|
6
|
+
max-inline-size: 42rem;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.qti3-text-input,
|
|
10
|
+
.qti3-textarea {
|
|
11
|
+
inline-size: 100%;
|
|
12
|
+
box-sizing: border-box;
|
|
13
|
+
padding: 0.55rem 0.65rem;
|
|
14
|
+
border: 1px solid CanvasText;
|
|
15
|
+
background: Canvas;
|
|
16
|
+
color: CanvasText;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.qti3-textarea {
|
|
20
|
+
min-block-size: 8rem;
|
|
21
|
+
resize: vertical;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.qti3-counter,
|
|
25
|
+
.qti3-slider-output {
|
|
26
|
+
margin: 0;
|
|
27
|
+
font-size: 0.9rem;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.qti3-slider-response {
|
|
31
|
+
grid-template-columns: minmax(8rem, 1fr) auto;
|
|
32
|
+
align-items: center;
|
|
33
|
+
}
|
|
34
|
+
`.trim();
|