cognikit 0.2.0 → 1.0.1
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/README.md +309 -237
- package/dist/client.js +194 -117
- package/dist/client.js.map +3 -3
- package/dist/index.js +225 -148
- package/dist/index.js.map +3 -3
- package/dist/interactions/shared/classification-implementation/grader.d.ts +1 -1
- package/dist/shell/simple-shell/script.d.ts +2 -1
- package/package.json +1 -1
- package/public/app.js +165 -110
- package/public/app.js.map +2 -2
- package/public/assets/DEMONSTRATION-1.jpeg +0 -0
- package/public/index.html +68 -16
package/public/app.js
CHANGED
|
@@ -3829,6 +3829,7 @@ var styles_default = `/* ==================== BASE STYLES ==================== *
|
|
|
3829
3829
|
|
|
3830
3830
|
:host {
|
|
3831
3831
|
display: inline-block;
|
|
3832
|
+
container-type: size;
|
|
3832
3833
|
--chip-color: rgb(var(--edu-first-accent));
|
|
3833
3834
|
--chip-colored-color: #d1d1d1;
|
|
3834
3835
|
}
|
|
@@ -3836,20 +3837,36 @@ var styles_default = `/* ==================== BASE STYLES ==================== *
|
|
|
3836
3837
|
:host([colored]) {
|
|
3837
3838
|
& .chip-container { position: relative; }
|
|
3838
3839
|
|
|
3840
|
+
& .content-zone {
|
|
3841
|
+
border-color: color-mix(in srgb, var(--chip-colored-color) 55%, rgb(var(--edu-border)));
|
|
3842
|
+
background:
|
|
3843
|
+
linear-gradient(
|
|
3844
|
+
180deg,
|
|
3845
|
+
color-mix(in srgb, var(--chip-colored-color) 18%, rgb(var(--edu-card))) 0%,
|
|
3846
|
+
rgb(var(--edu-card)) 44%
|
|
3847
|
+
);
|
|
3848
|
+
box-shadow:
|
|
3849
|
+
inset 0 4px 0 color-mix(in srgb, var(--chip-colored-color) 85%, white 15%),
|
|
3850
|
+
0 0 0 1px color-mix(in srgb, var(--chip-colored-color) 22%, transparent);
|
|
3851
|
+
}
|
|
3852
|
+
|
|
3839
3853
|
& .chip-container::after {
|
|
3840
3854
|
content: '';
|
|
3841
3855
|
position: absolute;
|
|
3842
|
-
top:
|
|
3843
|
-
left:
|
|
3844
|
-
right:
|
|
3845
|
-
|
|
3856
|
+
top: 0.25rem;
|
|
3857
|
+
left: 0.25rem;
|
|
3858
|
+
right: 0.25rem;
|
|
3859
|
+
height: 0.4rem;
|
|
3846
3860
|
border-radius: 10px;
|
|
3847
|
-
background: var(--chip-colored-color);
|
|
3848
|
-
opacity: 0.
|
|
3849
|
-
mix-blend-mode: multiply;
|
|
3861
|
+
background: color-mix(in srgb, var(--chip-colored-color) 90%, white 10%);
|
|
3862
|
+
opacity: 0.95;
|
|
3850
3863
|
z-index: 2;
|
|
3851
3864
|
pointer-events: none;
|
|
3852
3865
|
}
|
|
3866
|
+
|
|
3867
|
+
& .prefix {
|
|
3868
|
+
color: color-mix(in srgb, var(--chip-colored-color) 82%, rgb(var(--edu-ink)));
|
|
3869
|
+
}
|
|
3853
3870
|
}
|
|
3854
3871
|
|
|
3855
3872
|
:host([aria-disabled]) {
|
|
@@ -3862,7 +3879,8 @@ var styles_default = `/* ==================== BASE STYLES ==================== *
|
|
|
3862
3879
|
flex-direction: column;
|
|
3863
3880
|
align-items: center;
|
|
3864
3881
|
position: relative;
|
|
3865
|
-
width: 100%;
|
|
3882
|
+
width: 100%;
|
|
3883
|
+
height: 100%;
|
|
3866
3884
|
}
|
|
3867
3885
|
|
|
3868
3886
|
::slotted(img.chip-image) {
|
|
@@ -3896,8 +3914,9 @@ var styles_default = `/* ==================== BASE STYLES ==================== *
|
|
|
3896
3914
|
border: 1px solid rgb(var(--edu-border));
|
|
3897
3915
|
padding: 0.5rem 1rem;
|
|
3898
3916
|
cursor: pointer;
|
|
3899
|
-
font-size:
|
|
3917
|
+
font-size: clamp(0.95rem, min(12cqi, 24cqb), 2.35rem);
|
|
3900
3918
|
font-weight: 500;
|
|
3919
|
+
line-height: 1.2;
|
|
3901
3920
|
text-align: center;
|
|
3902
3921
|
transition: all 0.2s ease;
|
|
3903
3922
|
user-select: none;
|
|
@@ -3935,6 +3954,7 @@ var styles_default = `/* ==================== BASE STYLES ==================== *
|
|
|
3935
3954
|
align-items: center;
|
|
3936
3955
|
justify-content: center;
|
|
3937
3956
|
min-width: 0;
|
|
3957
|
+
overflow-wrap: anywhere;
|
|
3938
3958
|
}
|
|
3939
3959
|
|
|
3940
3960
|
/* ==================== MODALITY ACTION BUTTON ==================== */
|
|
@@ -4122,38 +4142,45 @@ var styles_default = `/* ==================== BASE STYLES ==================== *
|
|
|
4122
4142
|
/* ==================== VARIANT: PLAYFUL ==================== */
|
|
4123
4143
|
|
|
4124
4144
|
:host([variant="playful"]) .content-zone {
|
|
4125
|
-
background:
|
|
4126
|
-
|
|
4127
|
-
|
|
4128
|
-
border:
|
|
4129
|
-
|
|
4145
|
+
background:
|
|
4146
|
+
linear-gradient(135deg, rgb(var(--edu-card)), rgb(var(--edu-muted) / 0.9));
|
|
4147
|
+
color: rgb(var(--edu-ink));
|
|
4148
|
+
border-radius: 14px;
|
|
4149
|
+
border: 2px solid rgb(var(--edu-border));
|
|
4150
|
+
box-shadow: 0 6px 14px rgb(var(--edu-shadow-color) / 0.12);
|
|
4130
4151
|
font-weight: 600;
|
|
4131
4152
|
}
|
|
4132
4153
|
|
|
4133
4154
|
:host([variant="playful"]) .content-zone:hover:not([aria-disabled="true"]) {
|
|
4134
|
-
|
|
4155
|
+
transform: translateY(-2px) rotate(-1deg);
|
|
4156
|
+
border-color: rgb(var(--edu-first-accent) / 0.5);
|
|
4157
|
+
box-shadow: 0 10px 22px rgb(var(--edu-shadow-color) / 0.18);
|
|
4135
4158
|
}
|
|
4136
4159
|
|
|
4137
4160
|
:host([variant="playful"]) .content-zone:active:not([aria-disabled="true"]) {
|
|
4161
|
+
transform: translateY(0) rotate(0deg);
|
|
4138
4162
|
}
|
|
4139
4163
|
|
|
4140
4164
|
:host([variant="playful"]) .prefix {
|
|
4141
|
-
color:
|
|
4142
|
-
opacity:
|
|
4165
|
+
color: var(--chip-color);
|
|
4166
|
+
opacity: 1;
|
|
4143
4167
|
}
|
|
4144
4168
|
|
|
4145
4169
|
:host([variant="playful"]) .modality-action {
|
|
4146
|
-
background:
|
|
4147
|
-
color: var(--
|
|
4170
|
+
background: var(--chip-color);
|
|
4171
|
+
color: rgb(var(--edu-inverted-ink));
|
|
4148
4172
|
}
|
|
4149
4173
|
|
|
4150
4174
|
:host([variant="playful"][selected]) .content-zone {
|
|
4151
|
-
|
|
4175
|
+
background:
|
|
4176
|
+
linear-gradient(135deg, rgb(var(--edu-card)), rgb(var(--edu-muted)));
|
|
4177
|
+
border-color: var(--chip-color);
|
|
4178
|
+
box-shadow: 0 0 0 3px rgb(var(--chip-color) / 0.22), 0 10px 22px rgb(var(--edu-shadow-color) / 0.16);
|
|
4152
4179
|
}
|
|
4153
4180
|
|
|
4154
4181
|
:host([variant="playful"]) ::slotted(img.chip-image) {
|
|
4155
|
-
border:
|
|
4156
|
-
border-radius:
|
|
4182
|
+
border: 3px solid rgb(var(--edu-border) / 0.6);
|
|
4183
|
+
border-radius: 8px;
|
|
4157
4184
|
}
|
|
4158
4185
|
|
|
4159
4186
|
|
|
@@ -4218,7 +4245,6 @@ var styles_default = `/* ==================== BASE STYLES ==================== *
|
|
|
4218
4245
|
border-radius: 2px;
|
|
4219
4246
|
background: rgb(var(--edu-card));
|
|
4220
4247
|
color: rgb(var(--edu-ink));
|
|
4221
|
-
font-size: 0.95rem;
|
|
4222
4248
|
letter-spacing: 0.5px;
|
|
4223
4249
|
}
|
|
4224
4250
|
|
|
@@ -4246,82 +4272,88 @@ var styles_default = `/* ==================== BASE STYLES ==================== *
|
|
|
4246
4272
|
/* ==================== VARIANT: MINIMAL ==================== */
|
|
4247
4273
|
|
|
4248
4274
|
:host([variant="minimal"]) .content-zone {
|
|
4249
|
-
background:
|
|
4275
|
+
background: transparent;
|
|
4250
4276
|
border: 1px solid rgb(var(--edu-border));
|
|
4251
|
-
border-radius:
|
|
4252
|
-
color: rgb(var(--edu-ink));
|
|
4253
|
-
padding: 0.
|
|
4254
|
-
font-size: 0.9rem;
|
|
4277
|
+
border-radius: 10px;
|
|
4278
|
+
color: rgb(var(--edu-second-ink));
|
|
4279
|
+
padding: 0.45rem 0.85rem;
|
|
4255
4280
|
}
|
|
4256
4281
|
|
|
4257
4282
|
:host([variant="minimal"]) .content-zone:hover:not([aria-disabled="true"]) {
|
|
4258
|
-
|
|
4259
|
-
|
|
4283
|
+
background: rgb(var(--edu-card) / 0.8);
|
|
4284
|
+
color: rgb(var(--edu-ink));
|
|
4285
|
+
border-color: rgb(var(--edu-first-accent) / 0.35);
|
|
4286
|
+
box-shadow: 0 4px 12px rgba(var(--edu-shadow-color), 0.08);
|
|
4260
4287
|
}
|
|
4261
4288
|
|
|
4262
4289
|
:host([variant="minimal"][selected]) .content-zone {
|
|
4263
4290
|
border-color: var(--chip-color);
|
|
4264
4291
|
background: rgba(var(--chip-color), 0.08);
|
|
4292
|
+
color: rgb(var(--edu-ink));
|
|
4265
4293
|
}
|
|
4266
4294
|
|
|
4267
4295
|
/* ==================== VARIANT: GLASS ==================== */
|
|
4268
4296
|
|
|
4269
4297
|
:host([variant="glass"]) .content-zone {
|
|
4270
|
-
background: rgb(var(--edu-card));
|
|
4271
|
-
|
|
4272
|
-
border
|
|
4298
|
+
background: rgb(var(--edu-card) / 0.65);
|
|
4299
|
+
backdrop-filter: blur(10px);
|
|
4300
|
+
border: 1px solid rgb(var(--edu-border) / 0.6);
|
|
4301
|
+
border-radius: 14px;
|
|
4273
4302
|
color: rgb(var(--edu-ink));
|
|
4274
|
-
padding: 0.5rem
|
|
4275
|
-
font-weight:
|
|
4276
|
-
letter-spacing:
|
|
4277
|
-
|
|
4303
|
+
padding: 0.5rem 1rem;
|
|
4304
|
+
font-weight: 600;
|
|
4305
|
+
letter-spacing: 0.03em;
|
|
4306
|
+
box-shadow: inset 0 1px 0 rgb(var(--edu-card) / 0.8), 0 8px 20px rgb(var(--edu-shadow-color) / 0.12);
|
|
4278
4307
|
}
|
|
4279
4308
|
|
|
4280
4309
|
:host([variant="glass"]) .content-zone:hover:not([aria-disabled="true"]) {
|
|
4281
|
-
background: var(--
|
|
4282
|
-
color: rgb(var(--edu-
|
|
4283
|
-
|
|
4310
|
+
background: rgb(var(--edu-card) / 0.78);
|
|
4311
|
+
border-color: rgb(var(--edu-first-accent) / 0.45);
|
|
4312
|
+
box-shadow: inset 0 1px 0 rgb(var(--edu-card) / 0.9), 0 12px 24px rgb(var(--edu-shadow-color) / 0.16);
|
|
4284
4313
|
}
|
|
4285
4314
|
|
|
4286
4315
|
:host([variant="glass"]) .content-zone:active:not([aria-disabled="true"]) {
|
|
4287
|
-
background:
|
|
4316
|
+
background: rgb(var(--edu-card) / 0.88);
|
|
4288
4317
|
}
|
|
4289
4318
|
|
|
4290
4319
|
:host([variant="glass"]) .prefix {
|
|
4291
|
-
font-weight:
|
|
4320
|
+
font-weight: 700;
|
|
4321
|
+
color: rgb(var(--edu-first-accent));
|
|
4292
4322
|
}
|
|
4293
4323
|
|
|
4294
4324
|
:host([variant="glass"][selected]) .content-zone {
|
|
4295
4325
|
background: rgba(var(--chip-color), 0.15);
|
|
4296
4326
|
border-color: var(--chip-color);
|
|
4297
|
-
box-shadow: 0 0 0 2px rgba(var(--chip-color), 0.
|
|
4327
|
+
box-shadow: 0 0 0 2px rgba(var(--chip-color), 0.24), inset 0 1px 0 rgb(var(--edu-card) / 0.85);
|
|
4298
4328
|
}
|
|
4299
4329
|
|
|
4300
4330
|
/* ==================== VARIANT: CARD ==================== */
|
|
4301
4331
|
|
|
4302
4332
|
:host([variant="card"]) .content-zone {
|
|
4303
|
-
background:
|
|
4304
|
-
border:
|
|
4305
|
-
border-radius:
|
|
4333
|
+
background: rgb(var(--edu-card));
|
|
4334
|
+
border: 1px solid rgb(var(--edu-border));
|
|
4335
|
+
border-radius: 12px;
|
|
4306
4336
|
color: rgb(var(--edu-ink));
|
|
4337
|
+
box-shadow: 0 8px 18px rgb(var(--edu-shadow-color) / 0.1);
|
|
4307
4338
|
}
|
|
4308
4339
|
|
|
4309
4340
|
:host([variant="card"]) .content-zone:hover:not([aria-disabled="true"]) {
|
|
4310
|
-
background: rgb(var(--edu-muted));
|
|
4311
|
-
border-color: var(--
|
|
4341
|
+
background: linear-gradient(180deg, rgb(var(--edu-card)), rgb(var(--edu-muted) / 0.8));
|
|
4342
|
+
border-color: rgb(var(--edu-first-accent) / 0.35);
|
|
4343
|
+
box-shadow: 0 12px 24px rgb(var(--edu-shadow-color) / 0.14);
|
|
4312
4344
|
}
|
|
4313
4345
|
|
|
4314
4346
|
:host([variant="card"]) .content-zone:active:not([aria-disabled="true"]) {
|
|
4315
|
-
|
|
4347
|
+
transform: translateY(1px);
|
|
4316
4348
|
}
|
|
4317
4349
|
|
|
4318
4350
|
:host([variant="card"]) .prefix {
|
|
4319
|
-
color: var(--
|
|
4351
|
+
color: rgb(var(--edu-third-ink));
|
|
4320
4352
|
}
|
|
4321
4353
|
|
|
4322
4354
|
:host([variant="card"][selected]) .content-zone {
|
|
4323
4355
|
border-color: var(--chip-color);
|
|
4324
|
-
box-shadow: 0 0 0 3px rgba(var(--chip-color), 0.
|
|
4356
|
+
box-shadow: 0 0 0 3px rgba(var(--chip-color), 0.18), 0 12px 24px rgb(var(--edu-shadow-color) / 0.12);
|
|
4325
4357
|
}
|
|
4326
4358
|
|
|
4327
4359
|
/* ==================== VARIANT: SIGN ==================== */
|
|
@@ -4331,9 +4363,8 @@ var styles_default = `/* ==================== BASE STYLES ==================== *
|
|
|
4331
4363
|
border-radius: 0;
|
|
4332
4364
|
color: rgb(var(--edu-ink));
|
|
4333
4365
|
padding: 0.5rem 1.2rem;
|
|
4334
|
-
font-size: 0.9rem;
|
|
4335
4366
|
font-weight: bold;
|
|
4336
|
-
transform: skewX(-
|
|
4367
|
+
transform: skewX(-3deg);
|
|
4337
4368
|
text-transform: uppercase;
|
|
4338
4369
|
letter-spacing: 0.2rem;
|
|
4339
4370
|
}
|
|
@@ -4859,16 +4890,17 @@ var HTML2 = `
|
|
|
4859
4890
|
}
|
|
4860
4891
|
|
|
4861
4892
|
.block[variant="playful"] {
|
|
4862
|
-
background: var(--
|
|
4863
|
-
border:
|
|
4864
|
-
color: rgb(var(--edu-
|
|
4893
|
+
background: linear-gradient(135deg, rgb(var(--edu-card)), rgb(var(--edu-muted) / 0.92));
|
|
4894
|
+
border: 2px solid rgb(var(--edu-border));
|
|
4895
|
+
color: rgb(var(--edu-ink));
|
|
4865
4896
|
border-radius: 16px;
|
|
4866
|
-
box-shadow:
|
|
4897
|
+
box-shadow: 0 6px 14px rgb(var(--edu-shadow-color) / 0.12);
|
|
4867
4898
|
}
|
|
4868
4899
|
|
|
4869
4900
|
.block[variant="playful"]:hover {
|
|
4870
|
-
transform: translateY(-2px) rotate(-
|
|
4871
|
-
|
|
4901
|
+
transform: translateY(-2px) rotate(-1deg);
|
|
4902
|
+
border-color: color-mix(in srgb, var(--accent-color) 38%, rgb(var(--edu-border)));
|
|
4903
|
+
box-shadow: 0 10px 22px rgb(var(--edu-shadow-color) / 0.18);
|
|
4872
4904
|
}
|
|
4873
4905
|
|
|
4874
4906
|
.block[variant="outline"] {
|
|
@@ -4899,40 +4931,45 @@ var HTML2 = `
|
|
|
4899
4931
|
}
|
|
4900
4932
|
|
|
4901
4933
|
.block[variant="minimal"] {
|
|
4902
|
-
background:
|
|
4903
|
-
color: rgb(var(--edu-ink));
|
|
4934
|
+
background: transparent;
|
|
4935
|
+
color: rgb(var(--edu-second-ink));
|
|
4904
4936
|
border: 1px solid rgb(var(--edu-border));
|
|
4905
|
-
border-radius:
|
|
4937
|
+
border-radius: 10px;
|
|
4906
4938
|
padding: 0.75rem;
|
|
4907
4939
|
}
|
|
4908
4940
|
|
|
4909
4941
|
.block[variant="minimal"]:hover {
|
|
4910
|
-
|
|
4911
|
-
|
|
4942
|
+
background: rgb(var(--edu-card) / 0.8);
|
|
4943
|
+
color: rgb(var(--edu-ink));
|
|
4944
|
+
border-color: rgb(var(--edu-first-accent) / 0.35);
|
|
4945
|
+
box-shadow: 0 4px 12px rgba(var(--edu-shadow-color), 0.08);
|
|
4912
4946
|
}
|
|
4913
4947
|
|
|
4914
4948
|
.block[variant="glass"] {
|
|
4915
4949
|
background: rgba(var(--edu-card), 0.7);
|
|
4916
4950
|
backdrop-filter: blur(10px);
|
|
4917
|
-
border:
|
|
4918
|
-
border-radius:
|
|
4951
|
+
border: 1px solid rgba(var(--edu-border), 0.45);
|
|
4952
|
+
border-radius: 14px;
|
|
4953
|
+
box-shadow: inset 0 1px 0 rgb(var(--edu-card) / 0.85), 0 8px 20px rgba(var(--edu-shadow-color), 0.12);
|
|
4919
4954
|
}
|
|
4920
4955
|
|
|
4921
4956
|
.block[variant="glass"]:hover {
|
|
4922
|
-
background: rgba(var(--edu-card), 0.
|
|
4923
|
-
border-color: rgba(var(--edu-first-accent), 0.
|
|
4957
|
+
background: rgba(var(--edu-card), 0.82);
|
|
4958
|
+
border-color: rgba(var(--edu-first-accent), 0.4);
|
|
4959
|
+
box-shadow: inset 0 1px 0 rgb(var(--edu-card) / 0.95), 0 12px 24px rgba(var(--edu-shadow-color), 0.16);
|
|
4924
4960
|
}
|
|
4925
4961
|
|
|
4926
4962
|
.block[variant="card"] {
|
|
4927
4963
|
background: rgb(var(--edu-card));
|
|
4928
|
-
border:
|
|
4929
|
-
border-radius:
|
|
4930
|
-
box-shadow: 0
|
|
4964
|
+
border: 1px solid rgb(var(--edu-border));
|
|
4965
|
+
border-radius: 12px;
|
|
4966
|
+
box-shadow: 0 8px 18px rgba(var(--edu-shadow-color), 0.1);
|
|
4931
4967
|
}
|
|
4932
4968
|
|
|
4933
4969
|
.block[variant="card"]:hover {
|
|
4934
|
-
|
|
4935
|
-
|
|
4970
|
+
background: linear-gradient(180deg, rgb(var(--edu-card)), rgb(var(--edu-muted) / 0.8));
|
|
4971
|
+
border-color: rgb(var(--edu-first-accent) / 0.35);
|
|
4972
|
+
box-shadow: 0 12px 24px rgba(var(--edu-shadow-color), 0.14);
|
|
4936
4973
|
}
|
|
4937
4974
|
|
|
4938
4975
|
.block[variant="sign"] {
|
|
@@ -4948,7 +4985,7 @@ var HTML2 = `
|
|
|
4948
4985
|
|
|
4949
4986
|
.block[variant="sign"]:hover {
|
|
4950
4987
|
border-color: var(--accent-color);
|
|
4951
|
-
background: var(
|
|
4988
|
+
background: rgb(var(--edu-muted));
|
|
4952
4989
|
}
|
|
4953
4990
|
|
|
4954
4991
|
.block[variant="empty"] {
|
|
@@ -5012,7 +5049,7 @@ var EduBlock = class extends HTMLElement {
|
|
|
5012
5049
|
if (!customElements.get("edu-block")) customElements.define("edu-block", EduBlock);
|
|
5013
5050
|
|
|
5014
5051
|
// src/interactions/shared/classification-implementation/grader.ts
|
|
5015
|
-
function classificationGrader(correctData, userData, els) {
|
|
5052
|
+
function classificationGrader(correctData, userData, els, distractors) {
|
|
5016
5053
|
let correctCount = 0;
|
|
5017
5054
|
let totalCount = 0;
|
|
5018
5055
|
correctData.forEach((category) => {
|
|
@@ -5026,6 +5063,17 @@ function classificationGrader(correctData, userData, els) {
|
|
|
5026
5063
|
} else el.chipState = "wrong";
|
|
5027
5064
|
});
|
|
5028
5065
|
});
|
|
5066
|
+
if (distractors) {
|
|
5067
|
+
distractors.forEach((distractor) => {
|
|
5068
|
+
totalCount++;
|
|
5069
|
+
const userCategory = userData.get(distractor);
|
|
5070
|
+
const el = els.querySelector(`[data-label="${distractor}"]`);
|
|
5071
|
+
if (userCategory === "Invalid") {
|
|
5072
|
+
correctCount++;
|
|
5073
|
+
el.chipState = "correct";
|
|
5074
|
+
} else el.chipState = "wrong";
|
|
5075
|
+
});
|
|
5076
|
+
}
|
|
5029
5077
|
const score = totalCount > 0 ? Math.round(correctCount / totalCount * 100) : 0;
|
|
5030
5078
|
return { score, correct: correctCount, total: totalCount };
|
|
5031
5079
|
}
|
|
@@ -5035,10 +5083,10 @@ var OpenClassification = class extends BaseInteraction {
|
|
|
5035
5083
|
constructor(data, config, assets) {
|
|
5036
5084
|
super(data, config, assets);
|
|
5037
5085
|
this.interactionMechanic = "static";
|
|
5038
|
-
this.categories = [
|
|
5086
|
+
this.categories = [];
|
|
5039
5087
|
this.allItems = [];
|
|
5040
5088
|
this.categoryColors = [
|
|
5041
|
-
"#
|
|
5089
|
+
"#6366f1",
|
|
5042
5090
|
"#3b82f6",
|
|
5043
5091
|
"#10b981",
|
|
5044
5092
|
"#f59e0b",
|
|
@@ -5047,7 +5095,7 @@ var OpenClassification = class extends BaseInteraction {
|
|
|
5047
5095
|
"#ec4899",
|
|
5048
5096
|
"#14b8a6",
|
|
5049
5097
|
"#f97316",
|
|
5050
|
-
"#
|
|
5098
|
+
"#94a3b8"
|
|
5051
5099
|
];
|
|
5052
5100
|
this.currentColor = this.categoryColors[0];
|
|
5053
5101
|
this.data.categories.forEach(({ label, items }) => {
|
|
@@ -5057,6 +5105,7 @@ var OpenClassification = class extends BaseInteraction {
|
|
|
5057
5105
|
this.currentCategory = this.categories[0];
|
|
5058
5106
|
if (this.data.distractors) {
|
|
5059
5107
|
this.allItems.push(...this.data.distractors);
|
|
5108
|
+
this.categories.push("Invalid");
|
|
5060
5109
|
}
|
|
5061
5110
|
this.allItems = shuffle(this.allItems);
|
|
5062
5111
|
this.categorized = /* @__PURE__ */ new Map();
|
|
@@ -5078,7 +5127,7 @@ var OpenClassification = class extends BaseInteraction {
|
|
|
5078
5127
|
this.innerHTML = `
|
|
5079
5128
|
<style>
|
|
5080
5129
|
open-classification {
|
|
5081
|
-
--current-color: #
|
|
5130
|
+
--current-color: #aa94b8;
|
|
5082
5131
|
display: flex;
|
|
5083
5132
|
width: 100%;
|
|
5084
5133
|
height: 100%;
|
|
@@ -5123,7 +5172,7 @@ var OpenClassification = class extends BaseInteraction {
|
|
|
5123
5172
|
.items-container {
|
|
5124
5173
|
display: grid;
|
|
5125
5174
|
grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr));
|
|
5126
|
-
grid-auto-rows: minmax(
|
|
5175
|
+
grid-auto-rows: minmax(clamp(56px, 12cqh, 88px), 1fr);
|
|
5127
5176
|
gap: clamp(0.5rem, min(1.6cqw, 1.6cqh), 1rem);
|
|
5128
5177
|
padding: clamp(0.5rem, min(1.6cqw, 1.6cqh), 1.25rem);
|
|
5129
5178
|
background: rgb(var(--edu-muted));
|
|
@@ -5324,14 +5373,13 @@ var OpenClassification = class extends BaseInteraction {
|
|
|
5324
5373
|
// ==================== GRADING ====================
|
|
5325
5374
|
submit() {
|
|
5326
5375
|
super.submit();
|
|
5327
|
-
const result = classificationGrader(this.data.categories, this.categorized, this);
|
|
5376
|
+
const result = classificationGrader(this.data.categories, this.categorized, this, this.data.distractors);
|
|
5328
5377
|
console.log(`Classification Score: ${result.score.toFixed(1)}% (${result.correct}/${result.total} correct)`);
|
|
5329
5378
|
this.dispatchEvent(new CustomEvent("interaction:graded", {
|
|
5330
5379
|
detail: { result },
|
|
5331
5380
|
bubbles: true,
|
|
5332
5381
|
composed: true
|
|
5333
5382
|
}));
|
|
5334
|
-
this.setAttribute("inert", "");
|
|
5335
5383
|
}
|
|
5336
5384
|
// ==================== RESET ====================
|
|
5337
5385
|
reset() {
|
|
@@ -5476,6 +5524,7 @@ var SequentialClassification = class extends BaseInteraction {
|
|
|
5476
5524
|
gap: clamp(0.5rem, min(1.5cqw, 1.5cqh), 1rem);
|
|
5477
5525
|
overflow-y: auto;
|
|
5478
5526
|
overflow-x: hidden;
|
|
5527
|
+
scrollbar-gutter: stable;
|
|
5479
5528
|
align-content: stretch;
|
|
5480
5529
|
padding: clamp(0.25rem, min(1cqw, 1cqh), 0.5rem);
|
|
5481
5530
|
min-height: 0;
|
|
@@ -5519,11 +5568,17 @@ var SequentialClassification = class extends BaseInteraction {
|
|
|
5519
5568
|
|
|
5520
5569
|
edu-chip {
|
|
5521
5570
|
position: absolute;
|
|
5571
|
+
width: clamp(160px, 20cqw, 280px);
|
|
5572
|
+
max-width: calc(100% - 0.5rem);
|
|
5522
5573
|
user-select: none;
|
|
5523
5574
|
touch-action: none;
|
|
5524
5575
|
transition: transform 0.2s ease;
|
|
5525
5576
|
}
|
|
5526
5577
|
|
|
5578
|
+
edu-chip::part(content-zone) {
|
|
5579
|
+
min-height: clamp(56px, 10cqh, 88px);
|
|
5580
|
+
}
|
|
5581
|
+
|
|
5527
5582
|
edu-chip:hover {
|
|
5528
5583
|
transform: scale(1.05);
|
|
5529
5584
|
}
|
|
@@ -6314,9 +6369,9 @@ var MCQ = class extends BaseInteraction {
|
|
|
6314
6369
|
this.data.data.forEach((q) => {
|
|
6315
6370
|
this.userAnswers[q.question] = [];
|
|
6316
6371
|
if (this.config.shuffle) {
|
|
6317
|
-
this.shuffledOptions.set(q.question, shuffle([...q.options]));
|
|
6372
|
+
this.shuffledOptions.set(q.question, shuffle([...q.options, ...q.correctOptions]));
|
|
6318
6373
|
} else {
|
|
6319
|
-
this.shuffledOptions.set(q.question, [...q.options]);
|
|
6374
|
+
this.shuffledOptions.set(q.question, [...q.options, ...q.correctOptions]);
|
|
6320
6375
|
}
|
|
6321
6376
|
});
|
|
6322
6377
|
this.variant = this.config.variant;
|
|
@@ -6389,17 +6444,17 @@ var MCQ = class extends BaseInteraction {
|
|
|
6389
6444
|
flex-shrink: 0;
|
|
6390
6445
|
display: flex;
|
|
6391
6446
|
flex-direction: column;
|
|
6392
|
-
min-height: clamp(
|
|
6393
|
-
max-height: clamp(
|
|
6447
|
+
min-height: clamp(88px, 16cqh, 160px);
|
|
6448
|
+
max-height: clamp(132px, 32cqh, 280px);
|
|
6394
6449
|
overflow: hidden;
|
|
6395
6450
|
}
|
|
6396
6451
|
|
|
6397
6452
|
.question-text {
|
|
6398
6453
|
padding: 0;
|
|
6399
|
-
font-size: clamp(
|
|
6454
|
+
font-size: clamp(1.05rem, 2.6cqh, 1.45rem);
|
|
6400
6455
|
font-weight: 600;
|
|
6401
6456
|
color: rgb(var(--edu-ink));
|
|
6402
|
-
line-height: 1.
|
|
6457
|
+
line-height: 1.35;
|
|
6403
6458
|
}
|
|
6404
6459
|
|
|
6405
6460
|
.divider {
|
|
@@ -6463,7 +6518,7 @@ var MCQ = class extends BaseInteraction {
|
|
|
6463
6518
|
border: none;
|
|
6464
6519
|
padding: clamp(0.5rem, min(1.6cqw, 1.6cqh), 1rem);
|
|
6465
6520
|
height: 100%;
|
|
6466
|
-
max-height: clamp(
|
|
6521
|
+
max-height: clamp(132px, 32cqh, 280px);
|
|
6467
6522
|
overflow: auto;
|
|
6468
6523
|
align-items: center;
|
|
6469
6524
|
justify-content: flex-start;
|
|
@@ -6835,7 +6890,7 @@ var SimultaneousAssociation = class extends BaseInteraction {
|
|
|
6835
6890
|
.items-list {
|
|
6836
6891
|
display: grid;
|
|
6837
6892
|
grid-template-columns: 1fr;
|
|
6838
|
-
grid-auto-rows: minmax(
|
|
6893
|
+
grid-auto-rows: minmax(clamp(56px, 12cqh, 88px), 1fr);
|
|
6839
6894
|
gap: clamp(0.35rem, min(1.2cqw, 1.2cqh), 0.75rem);
|
|
6840
6895
|
min-height: 0;
|
|
6841
6896
|
height: 100%;
|
|
@@ -7057,8 +7112,8 @@ var ListRecall = class extends BaseInteraction {
|
|
|
7057
7112
|
.chips-container {
|
|
7058
7113
|
flex: 1;
|
|
7059
7114
|
display: grid;
|
|
7060
|
-
grid-template-columns:
|
|
7061
|
-
grid-auto-rows: minmax(
|
|
7115
|
+
grid-template-columns: 1fr 1fr;
|
|
7116
|
+
grid-auto-rows: minmax(56px, auto);
|
|
7062
7117
|
gap: clamp(0.4rem, min(1.4cqw, 1.4cqh), 0.75rem);
|
|
7063
7118
|
padding: clamp(0.5rem, min(1.6cqw, 1.6cqh), 1rem);
|
|
7064
7119
|
border: 2px dashed rgb(var(--edu-border));
|
|
@@ -12509,7 +12564,7 @@ var RankOrder = class extends BaseInteraction {
|
|
|
12509
12564
|
// Scalability constants
|
|
12510
12565
|
this.MAX_ITEMS = 10;
|
|
12511
12566
|
// Cognitive Ceiling
|
|
12512
|
-
this.MIN_ITEM_HEIGHT =
|
|
12567
|
+
this.MIN_ITEM_HEIGHT = 56;
|
|
12513
12568
|
if (!this.isValid || !this.data || !this.config) return;
|
|
12514
12569
|
const items = this.data.items;
|
|
12515
12570
|
this.data.items = items;
|
|
@@ -13263,6 +13318,12 @@ registerBuiltInInteractions();
|
|
|
13263
13318
|
// src/shell/simple-shell/index.html
|
|
13264
13319
|
var simple_shell_default = `<header part='header'>
|
|
13265
13320
|
<div class="prompt-container">
|
|
13321
|
+
<button class="close-btn btn" title="Close Fullscreen" part="close-part" style="display: none;">
|
|
13322
|
+
<svg viewBox="0 0 24 24" width="20" height="20" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
|
|
13323
|
+
<path d="M18 6 6 18" />
|
|
13324
|
+
<path d="m6 6 12 12" />
|
|
13325
|
+
</svg>
|
|
13326
|
+
</button>
|
|
13266
13327
|
<button class="prompt-btn btn" title="See Prompt Data" part="see-prompt">
|
|
13267
13328
|
<svg viewBox="0 0 24 24" width="20" height="20" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
|
|
13268
13329
|
<path d="M12 3c4.97 0 9 1.79 9 4s-4.03 4-9 4-9-1.79-9-4 4.03-4 9-4Z"/>
|
|
@@ -13323,13 +13384,6 @@ var simple_shell_default = `<header part='header'>
|
|
|
13323
13384
|
<div class="radio-nav" part="radio-nav"></div>
|
|
13324
13385
|
<div class="action-buttons">
|
|
13325
13386
|
<button class="check-btn" type="button" part="check">Check</button>
|
|
13326
|
-
|
|
13327
|
-
<button class="see-answers-btn btn" title="See answers" part="see-answers">
|
|
13328
|
-
<svg viewBox="0 0 24 24" width="20" height="20" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
|
|
13329
|
-
<path d="M2 12s3.5-6 10-6 10 6 10 6-3.5 6-10 6-10-6-10-6Z"/>
|
|
13330
|
-
<circle cx="12" cy="12" r="3"/>
|
|
13331
|
-
</svg>
|
|
13332
|
-
</button>
|
|
13333
13387
|
<button class="retry-btn btn" title="Retry" part="retry">
|
|
13334
13388
|
<svg viewBox="0 0 24 24" width="20" height="20" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
|
|
13335
13389
|
<path d="M17 2v4h-4"/>
|
|
@@ -13351,7 +13405,7 @@ var simple_shell_default = `<header part='header'>
|
|
|
13351
13405
|
`;
|
|
13352
13406
|
|
|
13353
13407
|
// src/shell/simple-shell/styles.css
|
|
13354
|
-
var styles_default4 = ':host {\n display: flex;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n container-type: size;\n}\n\n.edu-hidden { display: none !important; }\n\n.wrap {\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n color: rgb(var(--edu-ink));\n background: rgb(var(--edu-bg));\n overflow: hidden;\n box-sizing: border-box;\n}\n\nheader {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: clamp(0.2rem, 0.7cqh, 0.4rem);\n border-bottom: 1px solid rgb(var(--edu-border));\n flex-shrink: 0;\n gap: clamp(0.25rem, 1cqw, 0.5rem);\n height: clamp(38px, 7cqh, 46px);\n min-height: clamp(38px, 7cqh, 46px);\n}\n\n.prompt-container {\n display: flex;\n min-width: 0;\n gap: clamp(0.25rem, 1cqw, 0.5rem);\n align-items: center;\n flex: 1;\n}\n\n.title {\n flex: 1;\n min-width: 0;\n padding: 0;\n font-size: clamp(0.85rem, 2cqh, 1.05rem);\n font-weight: 700;\n line-height: 1.2;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.timer {\n padding: 0;\n font-size: clamp(0.75rem, 1.6cqh, 0.9rem);\n font-weight: 600;\n color: rgb(var(--edu-second-ink));\n font-variant-numeric: tabular-nums;\n cursor: pointer;\n}\n\n.timer[data-warning="true"] {\n color: rgb(var(--edu-warning));\n}\n\n.timer[data-danger="true"] {\n color: rgb(var(--edu-error));\n}\n\n.content {\n flex: 1;\n overflow: hidden;\n min-height: 0;\n padding: clamp(0.5rem, min(2cqw, 2cqh), 1rem);\n box-sizing: border-box;\n position: relative;\n display: flex;\n}\n\n.screen {\n display: flex;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n animation: fadeIn 1s ease;\n flex: 1;\n min-height: 0;\n}\n\n.screen[data-screen="interaction"] {\n justify-content: stretch;\n align-items: stretch;\n}\n\n.screen:not([data-screen="interaction"]) {\n justify-content: center;\n align-items: center;\n}\n\n.screen[data-screen="interaction"] ::slotted(*) {\n width: 100%;\n height: 100%;\n min-height: 0;\n display: block;\n}\n\n@keyframes fadeIn {\n from {\n opacity: 0;\n transform: translateY(10px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n}\n\n.error-content,\n.attempts-message,\n.score-display,\n.timer-display {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n text-align: center;\n height: 100%;\n color: rgb(var(--edu-ink));\n}\n\n.timer-display .timer {\n font-size: 10rem !important;\n color: rgb(var(--edu-ink)) !important;\n}\n\n.error-content {\n color: rgb(var(--edu-error));\n}\n\n.attempts-message {\n font-weight: 600;\n font-size: 1.25rem;\n}\n\nfooter {\n position: relative;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n /* padding: clamp(0.3rem, 0.8cqh, 0.6rem);*/ \n gap: clamp(0.25rem, 0.8cqh, 0.5rem);\n flex-shrink: 0;\n height: clamp(20px, 9cqh, 62px);\n min-height: clamp(50px, 9cqh, 62px);\n}\n\n.progress-container {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: clamp(0.25rem, 1cqw, 0.6rem);\n width: 100%;\n}\n\n.progress-bar {\n flex: 1;\n height: clamp(8px, 1.6cqh, 12px);\n appearance: none;\n -webkit-appearance: none;\n border: none;\n}\n\n.progress-bar::-webkit-progress-bar {\n background-color: rgb(var(--edu-muted));\n border-radius: 10px;\n}\n\n.progress-bar::-webkit-progress-value {\n background: rgb(var(--edu-first-accent));\n border-radius: 10px;\n transition: width 0.3s ease, background 0.3s ease;\n}\n\n.progress-bar::-moz-progress-bar {\n background: rgb(var(--edu-first-accent));\n border-radius: 10px;\n transition: width 0.3s ease, background 0.3s ease;\n}\n\n/* Score-based progress bar coloring */\n.progress-bar.score-fail::-webkit-progress-value {\n background: rgb(var(--edu-error)) !important;\n}\n\n.progress-bar.score-fail::-moz-progress-bar {\n background: rgb(var(--edu-error)) !important;\n}\n\n.progress-bar.score-low::-webkit-progress-value {\n background: rgb(var(--edu-warning)) !important;\n}\n\n.progress-bar.score-low::-moz-progress-bar {\n background: rgb(var(--edu-warning)) !important;\n}\n\n.progress-bar.score-mid::-webkit-progress-value {\n background: rgb(139, 195, 74) !important; /* Light green */\n}\n\n.progress-bar.score-mid::-moz-progress-bar {\n background: rgb(139, 195, 74) !important;\n}\n\n.progress-bar.score-high::-webkit-progress-value {\n background: rgb(var(--edu-success)) !important;\n}\n\n.progress-bar.score-high::-moz-progress-bar {\n background: rgb(var(--edu-success)) !important;\n}\n\n.progress-icon-wrapper {\n display: flex;\n align-items: center;\n justify-content: center;\n max-width: 24px;\n max-height: 24px;\n position: absolute;\n left: 0;\n top: 50%;\n transform: translateY(-50%);\n pointer-events: none;\n transition: left 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;\n background-color: rgb(var(--edu-first-accent));\n border-radius: 50px;\n box-shadow: 0 0 10px 5px rgb(var(--edu-first-accent));\n padding: 0;\n}\n\n/* Score-based icon coloring */\n.progress-icon-wrapper.score-fail {\n background-color: rgb(var(--edu-error));\n box-shadow: 0 0 10px 5px rgb(var(--edu-error));\n}\n\n.progress-icon-wrapper.score-low {\n background-color: rgb(var(--edu-warning));\n box-shadow: 0 0 10px 5px rgb(var(--edu-warning));\n}\n\n.progress-icon-wrapper.score-mid {\n background-color: rgba(139, 195, 74, 0.8);\n box-shadow: 0 0 10px 5px rgba(139, 195, 74, 0.8);\n}\n\n.progress-icon-wrapper.score-high {\n background-color: rgb(var(--edu-success));\n box-shadow: 0 0 10px 5px rgb(var(--edu-success));\n}\n\n.progress-icon {\n width: clamp(20px, 3.2cqh, 30px);\n height: clamp(20px, 3.2cqh, 30px);\n}\n\n.progress-counter {\n font-size: clamp(0.7rem, 1.4cqh, 0.85rem);\n font-weight: 600;\n color: rgb(var(--edu-second-ink));\n min-width: 3rem;\n text-align: right;\n flex-shrink: 0;\n}\n\n.action-buttons {\n display: flex;\n gap: 0.5rem;\n align-items: center;\n justify-content: center;\n flex-wrap: wrap;\n}\n\n.check-btn {\n padding: clamp(0.35rem, 1cqh, 0.6rem) clamp(1rem, 2.6cqw, 1.6rem);\n font-size: clamp(0.8rem, 1.6cqh, 0.95rem);\n font-weight: 600;\n cursor: pointer;\n border: none;\n border-radius: var(--edu-radius);\n background: rgb(var(--edu-first-accent));\n color: rgb(var(--edu-inverted-ink));\n transition: all 0.2s ease;\n}\n\n.check-btn:hover:not(:disabled) {\n background: rgb(var(--edu-first-accent) / 0.9);\n transform: translateY(-2px) scale(1.02);\n box-shadow: 0 4px 12px rgb(var(--edu-first-accent) / 0.3);\n}\n\n.check-btn:active:not(:disabled) {\n transform: translateY(0) scale(0.98);\n box-shadow: 0 2px 4px rgb(var(--edu-first-accent) / 0.2);\n}\n\n.check-btn:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.btn {\n padding: clamp(0.25rem, 0.8cqh, 0.4rem);\n background: transparent;\n border: 2px solid rgb(var(--edu-border));\n border-radius: var(--edu-radius);\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: all 0.2s ease;\n}\n\n.btn:hover { \n background: rgb(var(--edu-muted));\n border-color: rgb(var(--edu-first-accent));\n transform: translateY(-2px) scale(1.05);\n box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);\n}\n\n.btn:active {\n transform: translateY(0) scale(0.95);\n box-shadow: none;\n}\n\n.radio-nav {\n display: none;\n flex-wrap: wrap;\n gap: 0.5rem;\n align-items: center;\n justify-content: center;\n}\n\n.radio-nav[data-active="true"] {\n display: flex;\n}\n\n@media (max-width: 640px) {\n .radio-nav {\n gap: 0.35rem;\n }\n\n .radio-nav label {\n padding: 0.4rem 0.75rem;\n font-size: 0.875rem;\n }\n}\n\n.radio-nav input { display: none; }\n\n.radio-nav label {\n cursor: pointer;\n transition: all 0.3s ease;\n padding: 0.5rem 1rem;\n border-radius: var(--edu-radius);\n border: 1px solid rgb(var(--edu-border));\n background: rgb(var(--edu-card));\n color: rgb(var(--edu-ink));\n font-weight: 500;\n}\n\n.radio-nav label:hover {\n border-color: rgb(var(--edu-first-accent));\n}\n\n.radio-nav input:checked + label {\n background: rgb(var(--edu-first-accent));\n color: rgb(var(--edu-inverted-ink));\n border-color: rgb(var(--edu-first-accent));\n}\n\n.actions {\n display: flex;\n gap: 0.5rem;\n}\n\n.utils-container {\n display: flex;\n justify-content: space-between;\n}\n\n:host([variant="empty"]) {\n & .wrap { background: transparent; border: none; }\n & header { border-bottom: none; }\n\n & .title {\n padding-bottom: 5px;\n max-width: fit-content;\n border-bottom: 5px solid rgb(var(--edu-ink));\n }\n\n & .timer { }\n\n & .check-btn {\n background: transparent;\n color: rgb(var(--edu-ink));\n border: 2px solid rgb(var(--edu-ink));\n border-radius: 0;\n }\n\n & .check-btn:hover:not(:disabled) {\n color: rgb(var(--edu-inverted-ink));\n background: rgb(var(--edu-ink));\n border-color: rgb(var(--edu-ink));\n }\n\n & .progress-bar::-webkit-progress-bar {background: transparent}\n & .progress-bar::-webkit-progress-value {background: rgb(var(--edu-ink))}\n\n & .radio-nav label {\n background: transparent;\n border: 2px solid rgb(var(--edu-ink));\n border-radius: 0;\n }\n\n & .radio-nav input:checked + label {\n background: rgb(var(--edu-ink));\n color: rgb(var(--edu-inverted-ink));\n }\n\n & .radio-nav label:hover { background-color: rgb(var(--edu-first-accent)) }\n}\n\n:host([variant="minimal"]) {\n & .wrap {\n border: 1px solid rgb(var(--edu-border));\n border-radius: 6px;\n }\n\n & .timer {\n font-size: 0.95rem;\n }\n\n & .check-btn {\n border-radius: 4px;\n }\n\n & footer {\n border-top: 1px solid rgb(var(--edu-border));\n }\n\n & .progress-bar {\n height: 1px;\n }\n\n & .progress-bar::-webkit-progress-bar {\n background-color: rgb(var(--edu-muted));\n }\n\n & .progress-bar::-webkit-progress-value {\n background-color: rgb(var(--edu-ink));\n }\n\n & .radio-nav label {\n border-radius: 4px;\n }\n}\n\n:host([variant="elegant"]) {\n & .wrap {\n border-radius: 10px;\n box-shadow: 0 10px 30px rgba(var(--edu-shadow-color), 0.15);\n }\n\n & .timer {\n font-family: georgia, serif;\n font-style: italic;\n font-size: 1.1rem;\n }\n\n & .check-btn {\n border-radius: 8px;\n font-size: 1rem;\n }\n\n & footer {\n border-top: 1px solid rgb(var(--edu-border) / 0.5);\n padding: 1.25rem;\n }\n\n & .progress-bar {\n height: 4px;\n }\n\n & .progress-bar::-webkit-progress-value {\n background: linear-gradient(90deg, rgb(var(--edu-first-accent)), rgb(var(--edu-first-accent) / 0.6));\n }\n\n & .radio-nav label {\n font-family: georgia, serif;\n border: none;\n border-bottom: 2px solid transparent;\n background: transparent;\n padding: 0.5rem 1rem;\n }\n\n & .radio-nav input:checked + label {\n color: rgb(var(--edu-first-accent));\n border-bottom: 2px solid rgb(var(--edu-first-accent));\n background: transparent;\n font-style: italic;\n }\n\n & label {\n font-family: georgia, serif;\n padding: 0.5rem 1rem;\n }\n}\n\n:host([variant="playful"]) {\n & .wrap {\n color: rgb(var(--edu-first-accent));\n border-radius: 14px;\n border: 2px dashed rgb(var(--edu-border));\n }\n\n & .timer {\n font-weight: 700;\n font-size: 1.2rem;\n }\n\n & .check-btn {\n border-radius: 12px;\n font-weight: 700;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n }\n\n & .check-btn:hover:not(:disabled) {\n transform: translateY(-2px) rotate(-1deg);\n }\n\n & footer {\n border-top: 2px dashed rgb(var(--edu-border));\n }\n\n & .progress-bar {\n height: 20px;\n }\n\n & .progress-bar::-webkit-progress-bar {\n background-color: rgb(var(--edu-warning) / 0.3);\n border-radius: 20px;\n }\n\n & .progress-bar::-webkit-progress-value {\n background: rgb(var(--edu-first-accent));\n border-radius: 20px;\n border: 3px solid rgb(var(--edu-warning) / 0.3);\n }\n\n & .radio-nav label {\n background: rgb(var(--edu-muted));\n border-radius: 50px;\n font-weight: 700;\n }\n\n & .radio-nav label:hover {\n transform: scale(1.1) rotate(-2deg);\n }\n\n & .radio-nav input:checked + label {\n background: rgb(var(--edu-first-accent));\n color: rgb(var(--edu-inverted-ink));\n box-shadow: 0 5px 15px rgb(var(--edu-first-accent) / 0.4);\n }\n}\n\n:host([variant="glass"]) {\n & .wrap {\n background: rgba(var(--edu-card), 0.7);\n backdrop-filter: blur(10px);\n border: 1px solid rgba(var(--edu-border), 0.35);\n border-radius: 12px;\n }\n\n & .check-btn {\n background: rgba(var(--edu-first-accent), 0.9);\n backdrop-filter: blur(5px);\n border-radius: 10px;\n }\n\n & .check-btn:hover:not(:disabled) {\n background: rgba(var(--edu-first-accent), 1);\n }\n\n & footer {\n border-top: 1px solid rgba(var(--edu-border), 0.35);\n }\n\n & .progress-bar::-webkit-progress-bar {\n background: rgba(var(--edu-card), 0.3);\n backdrop-filter: blur(5px);\n }\n\n & .progress-bar::-webkit-progress-value {\n background: rgba(var(--edu-first-accent), 0.7);\n }\n\n & .radio-nav label {\n background: rgba(var(--edu-card), 0.5);\n backdrop-filter: blur(5px);\n border: 1px solid rgba(var(--edu-border), 0.35);\n }\n\n & .radio-nav input:checked + label {\n background: rgba(var(--edu-first-accent), 0.8);\n border-color: rgb(var(--edu-first-accent));\n }\n}\n\n:host([variant="letter"]) {\n & .wrap {\n border: 1px solid rgb(var(--edu-border));\n font-family: georgia, serif;\n box-shadow: inset 0 0 0 1px rgba(var(--edu-shadow-color), 0.1);\n border-radius: 4px;\n }\n\n & .timer {\n font-family: georgia, serif;\n letter-spacing: 0.5px;\n }\n\n & .check-btn {\n font-family: georgia, serif;\n border-radius: 2px;\n font-size: 0.95rem;\n letter-spacing: 0.5px;\n }\n\n & footer {\n border-top: 1px solid rgb(var(--edu-border));\n padding: 1rem 1.5rem;\n }\n\n & .progress-bar::-webkit-progress-bar {\n background-color: rgb(var(--edu-muted));\n box-shadow: inset 0 0 0 1px rgba(var(--edu-shadow-color), 0.05);\n }\n\n & .radio-nav label {\n width: 40px;\n height: 40px;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0;\n background: rgb(var(--edu-third-ink));\n color: rgb(var(--edu-inverted-ink));\n font-weight: 900;\n border-radius: 4px;\n }\n\n & .radio-nav input:checked + label {\n background: rgb(var(--edu-first-accent));\n transform: translateY(-4px);\n }\n}\n\n:host([variant="sign"]) {\n & .wrap {\n border-radius: 6px;\n text-transform: uppercase;\n letter-spacing: 1px;\n border: 2px solid rgb(var(--edu-border));\n }\n\n & .timer {\n text-transform: uppercase;\n letter-spacing: 1.5px;\n font-weight: 800;\n font-size: 0.9rem;\n }\n\n & .check-btn {\n text-transform: uppercase;\n letter-spacing: 1.5px;\n font-weight: 800;\n font-size: 0.9rem;\n border-radius: 4px;\n margin: 0.85rem 2.5rem;\n }\n\n & footer {\n border-top: 2px solid rgb(var(--edu-border));\n }\n\n & .title {\n text-transform: uppercase;\n }\n\n & .progress-bar {\n height: 24px;\n }\n\n & .progress-bar::-webkit-progress-bar {\n background: rgb(var(--edu-third-ink));\n border: 2px solid rgb(var(--edu-third-ink));\n }\n\n & .progress-bar::-webkit-progress-value {\n background: rgb(var(--edu-second-accent));\n }\n\n & .radio-nav label {\n background: rgb(var(--edu-third-ink));\n color: rgb(var(--edu-second-accent));\n border-left: 4px solid rgb(var(--edu-second-accent));\n text-transform: uppercase;\n font-size: 0.8rem;\n font-weight: 700;\n }\n\n & .radio-nav input:checked + label {\n background: rgb(var(--edu-second-accent));\n color: rgb(var(--edu-third-ink));\n border-left-color: rgb(var(--edu-third-ink));\n }\n}\n\n:host([variant="outline"]) {\n & .wrap {\n color: rgb(var(--edu-inverted-ink));\n background: transparent;\n border-width: 0 1px 2px 1px;\n border-style: solid;\n border-color: rgb(var(--edu-first-accent));\n background: rgb(var(--edu-bg) / 0.1);\n }\n\n & header { background: rgb(var(--edu-first-accent)); color: rgb(var(--edu-inverted-ink)) }\n & .timer { color: rgb(var(--edu-inverted-ink)) }\n\n & footer {\n border-top: none;\n padding: 0;\n padding-left: 0.5rem;\n padding-right: 0.5rem;\n }\n\n & .check-btn {\n font-size: 100%;\n font-weight: 700;\n border: none;\n border-radius: 0;\n border-top-left-radius: 10px;\n border-top-right-radius: 10px;\n color: rgb(var(--edu-inverted-ink));\n background: rgb(var(--edu-first-accent));\n margin: 0;\n padding: 1rem;\n text-transform: uppercase;\n }\n\n & .check-btn:hover:not(:disabled) {\n background: rgb(var(--edu-first-accent) / 0.9);\n box-shadow: 0 4px 12px rgb(var(--edu-first-accent) / 0.3);\n transform: none;\n }\n\n & .radio-nav label {\n border: 2px solid rgb(var(--edu-first-accent));\n border-radius: 0;\n background: transparent;\n color: rgb(var(--edu-ink));\n }\n\n & .radio-nav label:hover {\n background: rgb(var(--edu-first-accent));\n color: rgb(var(--edu-inverted-ink));\n }\n\n & .radio-nav input:checked + label {\n background: rgb(var(--edu-first-accent));\n color: rgb(var(--edu-inverted-ink));\n }\n}\n\n:host([variant="card"]) {\n & .wrap {\n border-radius: 8px;\n box-shadow: 0 4px 12px rgba(var(--edu-shadow-color), 0.1), 0 2px 4px rgba(var(--edu-shadow-color), 0.05);\n }\n\n & .check-btn {\n border-radius: 6px;\n box-shadow: 0 2px 4px rgba(var(--edu-shadow-color), 0.1);\n }\n\n & .check-btn:hover:not(:disabled) {\n box-shadow: 0 4px 8px rgba(var(--edu-first-accent), 0.2);\n }\n\n & footer {\n border-top: 1px solid rgb(var(--edu-border));\n }\n\n & .radio-nav label {\n border-radius: 6px;\n box-shadow: 0 2px 4px rgba(var(--edu-shadow-color), 0.1);\n }\n\n & .radio-nav input:checked + label {\n box-shadow: 0 4px 8px rgba(var(--edu-first-accent), 0.2);\n }\n}\n';
|
|
13408
|
+
var styles_default4 = ':host {\n display: flex;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n container-type: size;\n}\n\n.edu-hidden { display: none !important; }\n\n.wrap {\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n color: rgb(var(--edu-ink));\n background: rgb(var(--edu-bg));\n overflow: hidden;\n box-sizing: border-box;\n}\n\nheader {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: clamp(0.2rem, 0.7cqh, 0.4rem);\n border-bottom: 1px solid rgb(var(--edu-border));\n flex-shrink: 0;\n gap: clamp(0.25rem, 1cqw, 0.5rem);\n height: clamp(38px, 7cqh, 46px);\n min-height: clamp(38px, 7cqh, 46px);\n}\n\n.prompt-container {\n display: flex;\n min-width: 0;\n gap: clamp(0.25rem, 1cqw, 0.5rem);\n align-items: center;\n flex: 1;\n}\n\n.title {\n flex: 1;\n min-width: 0;\n padding: 0;\n font-size: clamp(0.85rem, 2cqh, 1.05rem);\n font-weight: 700;\n line-height: 1.2;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.timer {\n padding: 0;\n font-size: clamp(0.75rem, 1.6cqh, 0.9rem);\n font-weight: 600;\n color: rgb(var(--edu-second-ink));\n font-variant-numeric: tabular-nums;\n cursor: pointer;\n}\n\n.timer[data-warning="true"] {\n color: rgb(var(--edu-warning));\n}\n\n.timer[data-danger="true"] {\n color: rgb(var(--edu-error));\n}\n\n.content {\n flex: 1;\n overflow: hidden;\n min-height: 0;\n padding: clamp(0.5rem, min(2cqw, 2cqh), 1rem);\n box-sizing: border-box;\n position: relative;\n display: flex;\n}\n\n.screen {\n display: flex;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n animation: fadeIn 1s ease;\n flex: 1;\n min-height: 0;\n}\n\n.screen[data-screen="interaction"] {\n justify-content: stretch;\n align-items: stretch;\n}\n\n.screen:not([data-screen="interaction"]) {\n justify-content: center;\n align-items: center;\n}\n\n.screen[data-screen="interaction"] ::slotted(*) {\n width: 100%;\n height: 100%;\n min-height: 0;\n display: block;\n}\n\n@keyframes fadeIn {\n from {\n opacity: 0;\n transform: translateY(10px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n}\n\n.error-content,\n.attempts-message,\n.score-display,\n.timer-display {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n text-align: center;\n height: 100%;\n color: rgb(var(--edu-ink));\n}\n\n.timer-display .timer {\n font-size: 10rem !important;\n color: rgb(var(--edu-ink)) !important;\n}\n\n.error-content {\n color: rgb(var(--edu-error));\n}\n\n.attempts-message {\n font-weight: 600;\n font-size: 1.25rem;\n}\n\nfooter {\n position: relative;\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n align-items: center;\n padding: clamp(0.35rem, 1cqh, 0.75rem) clamp(0.5rem, 1.5cqw, 1rem);\n gap: clamp(0.25rem, 0.8cqh, 0.5rem);\n flex-shrink: 0;\n height: auto;\n min-height: clamp(76px, 12cqh, 120px);\n box-sizing: border-box;\n overflow: visible;\n}\n\n.progress-container {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: clamp(0.25rem, 1cqw, 0.6rem);\n width: 100%;\n min-width: 0;\n}\n\n.progress-bar {\n flex: 1;\n height: clamp(8px, 1.6cqh, 12px);\n appearance: none;\n -webkit-appearance: none;\n border: none;\n}\n\n.progress-bar::-webkit-progress-bar {\n background-color: rgb(var(--edu-muted));\n border-radius: 10px;\n}\n\n.progress-bar::-webkit-progress-value {\n background: rgb(var(--edu-first-accent));\n border-radius: 10px;\n transition: width 0.3s ease, background 0.3s ease;\n}\n\n.progress-bar::-moz-progress-bar {\n background: rgb(var(--edu-first-accent));\n border-radius: 10px;\n transition: width 0.3s ease, background 0.3s ease;\n}\n\n/* Score-based progress bar coloring */\n.progress-bar.score-fail::-webkit-progress-value {\n background: rgb(var(--edu-error)) !important;\n}\n\n.progress-bar.score-fail::-moz-progress-bar {\n background: rgb(var(--edu-error)) !important;\n}\n\n.progress-bar.score-low::-webkit-progress-value {\n background: rgb(var(--edu-warning)) !important;\n}\n\n.progress-bar.score-low::-moz-progress-bar {\n background: rgb(var(--edu-warning)) !important;\n}\n\n.progress-bar.score-mid::-webkit-progress-value {\n background: rgb(139, 195, 74) !important; /* Light green */\n}\n\n.progress-bar.score-mid::-moz-progress-bar {\n background: rgb(139, 195, 74) !important;\n}\n\n.progress-bar.score-high::-webkit-progress-value {\n background: rgb(var(--edu-success)) !important;\n}\n\n.progress-bar.score-high::-moz-progress-bar {\n background: rgb(var(--edu-success)) !important;\n}\n\n.progress-icon-wrapper {\n display: flex;\n align-items: center;\n justify-content: center;\n max-width: 24px;\n max-height: 24px;\n position: absolute;\n left: 0;\n top: 50%;\n transform: translateY(-50%);\n pointer-events: none;\n transition: left 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;\n background-color: rgb(var(--edu-first-accent));\n border-radius: 50px;\n box-shadow: 0 0 10px 5px rgb(var(--edu-first-accent));\n padding: 0;\n}\n\n/* Score-based icon coloring */\n.progress-icon-wrapper.score-fail {\n background-color: rgb(var(--edu-error));\n box-shadow: 0 0 10px 5px rgb(var(--edu-error));\n}\n\n.progress-icon-wrapper.score-low {\n background-color: rgb(var(--edu-warning));\n box-shadow: 0 0 10px 5px rgb(var(--edu-warning));\n}\n\n.progress-icon-wrapper.score-mid {\n background-color: rgba(139, 195, 74, 0.8);\n box-shadow: 0 0 10px 5px rgba(139, 195, 74, 0.8);\n}\n\n.progress-icon-wrapper.score-high {\n background-color: rgb(var(--edu-success));\n box-shadow: 0 0 10px 5px rgb(var(--edu-success));\n}\n\n.progress-icon {\n width: clamp(20px, 3.2cqh, 30px);\n height: clamp(20px, 3.2cqh, 30px);\n}\n\n.progress-counter {\n font-size: clamp(0.7rem, 1.4cqh, 0.85rem);\n font-weight: 600;\n color: rgb(var(--edu-second-ink));\n min-width: 3rem;\n text-align: right;\n flex-shrink: 0;\n}\n\n.action-buttons {\n display: flex;\n gap: 0.5rem;\n align-items: center;\n justify-content: center;\n flex-wrap: wrap;\n width: 100%;\n min-width: 0;\n}\n\n.prompt-btn,\n.retry-btn,\n.scores-btn {\n color: rgb(var(--edu-ink));\n}\n\n.check-btn {\n padding: clamp(0.35rem, 1cqh, 0.6rem) clamp(1rem, 2.6cqw, 1.6rem);\n font-size: clamp(0.8rem, 1.6cqh, 0.95rem);\n font-weight: 600;\n cursor: pointer;\n border: none;\n border-radius: var(--edu-radius);\n background: rgb(var(--edu-first-accent));\n color: rgb(var(--edu-inverted-ink));\n transition: all 0.2s ease;\n}\n\n.check-btn:hover:not(:disabled) {\n background: rgb(var(--edu-first-accent) / 0.9);\n transform: translateY(-2px) scale(1.02);\n box-shadow: 0 4px 12px rgb(var(--edu-first-accent) / 0.3);\n}\n\n.check-btn:active:not(:disabled) {\n transform: translateY(0) scale(0.98);\n box-shadow: 0 2px 4px rgb(var(--edu-first-accent) / 0.2);\n}\n\n.check-btn:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.btn {\n padding: clamp(0.25rem, 0.8cqh, 0.4rem);\n background: transparent;\n border: 2px solid rgb(var(--edu-border));\n border-radius: var(--edu-radius);\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: all 0.2s ease;\n}\n\n.btn:hover { \n background: rgb(var(--edu-muted));\n border-color: rgb(var(--edu-first-accent));\n transform: translateY(-2px) scale(1.05);\n box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);\n}\n\n.btn:active {\n transform: translateY(0) scale(0.95);\n box-shadow: none;\n}\n\n.radio-nav {\n display: none;\n flex-wrap: wrap;\n gap: 0.5rem;\n align-items: center;\n justify-content: center;\n width: 100%;\n min-width: 0;\n}\n\n.radio-nav[data-active="true"] {\n display: flex;\n}\n\n@media (max-width: 640px) {\n .radio-nav {\n gap: 0.35rem;\n }\n\n .radio-nav label {\n padding: 0.4rem 0.75rem;\n font-size: 0.875rem;\n }\n}\n\n.radio-nav input { display: none; }\n\n.radio-nav label {\n cursor: pointer;\n transition: all 0.3s ease;\n padding: 0.5rem 1rem;\n border-radius: var(--edu-radius);\n border: 1px solid rgb(var(--edu-border));\n background: rgb(var(--edu-card));\n color: rgb(var(--edu-ink));\n font-weight: 500;\n}\n\n.radio-nav label:hover {\n border-color: rgb(var(--edu-first-accent));\n}\n\n.radio-nav input:checked + label {\n background: rgb(var(--edu-first-accent));\n color: rgb(var(--edu-inverted-ink));\n border-color: rgb(var(--edu-first-accent));\n}\n\n.actions {\n display: flex;\n gap: 0.5rem;\n}\n\n.utils-container {\n display: flex;\n justify-content: space-between;\n}\n\n:host([variant="empty"]) {\n & .wrap { background: transparent; border: none; }\n & header { border-bottom: none; }\n\n & .title {\n padding-bottom: 5px;\n max-width: fit-content;\n border-bottom: 5px solid rgb(var(--edu-ink));\n }\n\n & .timer { }\n\n & footer {\n color: rgb(var(--edu-inverted-ink));\n }\n\n & .check-btn {\n background: transparent;\n color: rgb(var(--edu-ink));\n border: 2px solid rgb(var(--edu-ink));\n border-radius: 0;\n }\n\n & .check-btn:hover:not(:disabled) {\n color: rgb(var(--edu-inverted-ink));\n background: rgb(var(--edu-ink));\n border-color: rgb(var(--edu-ink));\n }\n\n & .progress-bar::-webkit-progress-bar {background: transparent}\n & .progress-bar::-webkit-progress-value {background: rgb(var(--edu-ink))}\n\n & .radio-nav label {\n background: transparent;\n border: 2px solid rgb(var(--edu-ink));\n border-radius: 0;\n }\n\n & .radio-nav input:checked + label {\n background: rgb(var(--edu-ink));\n color: rgb(var(--edu-inverted-ink));\n }\n\n & .radio-nav label:hover { background-color: rgb(var(--edu-first-accent)) }\n}\n\n:host([variant="minimal"]) {\n & .wrap {\n border: 1px solid rgb(var(--edu-border));\n border-radius: 10px;\n background: rgb(var(--edu-card));\n }\n\n & .timer {\n font-size: 0.95rem;\n }\n\n & .check-btn {\n border-radius: 10px;\n box-shadow: none;\n }\n\n & footer {\n color: rgb(var(--edu-inverted-ink));\n border-top: 1px solid rgb(var(--edu-border));\n }\n\n & .progress-bar {\n height: 1px;\n }\n\n & .progress-bar::-webkit-progress-bar {\n background-color: rgb(var(--edu-muted));\n }\n\n & .progress-bar::-webkit-progress-value {\n background-color: rgb(var(--edu-ink));\n }\n\n & .radio-nav label {\n border-radius: 999px;\n background: transparent;\n }\n}\n\n:host([variant="elegant"]) {\n & .wrap {\n border-radius: 10px;\n box-shadow: 0 10px 30px rgba(var(--edu-shadow-color), 0.15);\n }\n\n & .timer {\n font-family: georgia, serif;\n font-style: italic;\n font-size: 1.1rem;\n }\n\n & .check-btn {\n border-radius: 8px;\n font-size: 1rem;\n }\n\n & footer {\n color: rgb(var(--edu-inverted-ink));\n border-top: 1px solid rgb(var(--edu-border) / 0.5);\n padding: 1.25rem;\n }\n\n & .progress-bar {\n height: 4px;\n }\n\n & .progress-bar::-webkit-progress-value {\n background: linear-gradient(90deg, rgb(var(--edu-first-accent)), rgb(var(--edu-first-accent) / 0.6));\n }\n\n & .radio-nav label {\n font-family: georgia, serif;\n border: none;\n border-bottom: 2px solid transparent;\n background: transparent;\n padding: 0.5rem 1rem;\n }\n\n & .radio-nav input:checked + label {\n color: rgb(var(--edu-first-accent));\n border-bottom: 2px solid rgb(var(--edu-first-accent));\n background: transparent;\n font-style: italic;\n }\n\n & label {\n font-family: georgia, serif;\n padding: 0.5rem 1rem;\n }\n}\n\n:host([variant="playful"]) {\n & .wrap {\n color: rgb(var(--edu-ink));\n border-radius: 14px;\n border: 2px dashed rgb(var(--edu-border));\n }\n\n & .timer {\n font-weight: 700;\n font-size: 1.2rem;\n }\n\n & .check-btn {\n background: linear-gradient(135deg, rgb(var(--edu-first-accent));\n color: rgb(var(--edu-inverted-ink));\n border-radius: 12px;\n font-weight: 700;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n box-shadow: 0 8px 18px rgb(var(--edu-shadow-color) / 0.16);\n }\n\n & .check-btn:hover:not(:disabled) {\n transform: translateY(-2px) rotate(-1deg);\n }\n\n & footer {\n color: rgb(var(--edu-inverted-ink));\n border-top: 2px dashed rgb(var(--edu-border));\n }\n\n & .progress-bar {\n height: 20px;\n }\n\n & .progress-bar::-webkit-progress-bar {\n background-color: rgb(var(--edu-warning) / 0.3);\n border-radius: 20px;\n }\n\n & .progress-bar::-webkit-progress-value {\n background: rgb(var(--edu-first-accent));\n border-radius: 20px;\n border: 3px solid rgb(var(--edu-warning) / 0.3);\n }\n\n & .radio-nav label {\n background: rgb(var(--edu-card));\n color: rgb(var(--edu-ink));\n border: 2px solid rgb(var(--edu-border));\n border-radius: 50px;\n font-weight: 700;\n }\n\n & .radio-nav label:hover {\n transform: scale(1.1) rotate(-2deg);\n }\n\n & .radio-nav input:checked + label {\n background: linear-gradient(135deg, rgb(var(--edu-first-accent));\n color: rgb(var(--edu-inverted-ink));\n border-color: transparent;\n box-shadow: 0 5px 15px rgb(var(--edu-shadow-color) / 0.18);\n }\n}\n\n:host([variant="glass"]) {\n & .wrap {\n background: rgba(var(--edu-card), 0.7);\n backdrop-filter: blur(10px);\n border: 1px solid rgba(var(--edu-border), 0.35);\n border-radius: 14px;\n box-shadow: 0 16px 32px rgba(var(--edu-shadow-color), 0.12);\n }\n\n & .check-btn {\n background: rgba(var(--edu-first-accent), 0.88);\n backdrop-filter: blur(5px);\n border-radius: 999px;\n }\n\n & .check-btn:hover:not(:disabled) {\n background: rgba(var(--edu-first-accent), 1);\n }\n\n & footer {\n border-top: 1px solid rgba(var(--edu-border), 0.35);\n }\n\n & .progress-bar::-webkit-progress-bar {\n background: rgba(var(--edu-card), 0.3);\n backdrop-filter: blur(5px);\n }\n\n & .progress-bar::-webkit-progress-value {\n background: rgba(var(--edu-first-accent), 0.7);\n }\n\n & .radio-nav label {\n background: rgba(var(--edu-card), 0.5);\n backdrop-filter: blur(5px);\n border: 1px solid rgba(var(--edu-border), 0.35);\n border-radius: 999px;\n }\n\n & .radio-nav input:checked + label {\n background: rgba(var(--edu-first-accent), 0.8);\n border-color: rgb(var(--edu-first-accent));\n }\n}\n\n:host([variant="letter"]) {\n & .wrap {\n border: 1px solid rgb(var(--edu-border));\n font-family: georgia, serif;\n box-shadow: inset 0 0 0 1px rgba(var(--edu-shadow-color), 0.1);\n border-radius: 4px;\n }\n\n & .timer {\n font-family: georgia, serif;\n letter-spacing: 0.5px;\n }\n\n & .check-btn {\n font-family: georgia, serif;\n border-radius: 2px;\n font-size: 0.95rem;\n letter-spacing: 0.5px;\n }\n\n & footer {\n color: rgb(var(--edu-inverted-ink));\n border-top: 1px solid rgb(var(--edu-border));\n padding: 1rem 1.5rem;\n }\n\n & .progress-bar::-webkit-progress-bar {\n background-color: rgb(var(--edu-muted));\n box-shadow: inset 0 0 0 1px rgba(var(--edu-shadow-color), 0.05);\n }\n\n & .radio-nav label {\n width: 40px;\n height: 40px;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0;\n background: rgb(var(--edu-third-ink));\n color: rgb(var(--edu-inverted-ink));\n font-weight: 900;\n border-radius: 4px;\n }\n\n & .radio-nav input:checked + label {\n background: rgb(var(--edu-first-accent));\n transform: translateY(-4px);\n }\n}\n\n:host([variant="sign"]) {\n & .wrap {\n border-radius: 6px;\n text-transform: uppercase;\n letter-spacing: 1px;\n border: 2px solid rgb(var(--edu-border));\n }\n\n & .timer {\n text-transform: uppercase;\n letter-spacing: 1.5px;\n font-weight: 800;\n font-size: 0.9rem;\n }\n\n & .check-btn {\n text-transform: uppercase;\n letter-spacing: 1.5px;\n font-weight: 800;\n font-size: 0.9rem;\n border-radius: 4px;\n margin: 0.85rem 2.5rem;\n }\n\n & footer {\n color: rgb(var(--edu-inverted-ink));\n border-top: 2px solid rgb(var(--edu-border));\n }\n\n & .title {\n text-transform: uppercase;\n }\n\n & .progress-bar {\n height: 24px;\n }\n\n & .progress-bar::-webkit-progress-bar {\n background: rgb(var(--edu-third-ink));\n border: 2px solid rgb(var(--edu-third-ink));\n }\n\n & .progress-bar::-webkit-progress-value {\n background: rgb(var(--edu-second-accent));\n }\n\n & .radio-nav label {\n background: rgb(var(--edu-third-ink));\n color: rgb(var(--edu-second-accent));\n border-left: 4px solid rgb(var(--edu-second-accent));\n text-transform: uppercase;\n font-size: 0.8rem;\n font-weight: 700;\n }\n\n & .radio-nav input:checked + label {\n background: rgb(var(--edu-second-accent));\n color: rgb(var(--edu-third-ink));\n border-left-color: rgb(var(--edu-third-ink));\n }\n}\n\n:host([variant="outline"]) {\n & .wrap {\n color: rgb(var(--edu-inverted-ink));\n background: transparent;\n border-width: 0 1px 2px 1px;\n border-style: solid;\n border-color: rgb(var(--edu-first-accent));\n background: rgb(var(--edu-bg) / 0.1);\n }\n\n & header { background: rgb(var(--edu-first-accent)); color: rgb(var(--edu-inverted-ink)) }\n & .timer { color: rgb(var(--edu-inverted-ink)) }\n\n & footer {\n border-top: none;\n padding: 0;\n padding-left: 0.5rem;\n padding-right: 0.5rem;\n }\n\n & .check-btn {\n font-size: 100%;\n font-weight: 700;\n border: none;\n border-radius: 0;\n border-top-left-radius: 10px;\n border-top-right-radius: 10px;\n color: rgb(var(--edu-inverted-ink));\n background: rgb(var(--edu-first-accent));\n margin: 0;\n padding: 1rem;\n text-transform: uppercase;\n }\n\n & .check-btn:hover:not(:disabled) {\n background: rgb(var(--edu-first-accent) / 0.9);\n box-shadow: 0 4px 12px rgb(var(--edu-first-accent) / 0.3);\n transform: none;\n }\n\n & .radio-nav label {\n border: 2px solid rgb(var(--edu-first-accent));\n border-radius: 0;\n background: transparent;\n color: rgb(var(--edu-ink));\n }\n\n & .radio-nav label:hover {\n background: rgb(var(--edu-first-accent));\n color: rgb(var(--edu-inverted-ink));\n }\n\n & .radio-nav input:checked + label {\n background: rgb(var(--edu-first-accent));\n color: rgb(var(--edu-inverted-ink));\n }\n}\n\n:host([variant="card"]) {\n & .wrap {\n border-radius: 14px;\n background: rgb(var(--edu-card));\n box-shadow: 0 10px 24px rgba(var(--edu-shadow-color), 0.12), 0 2px 4px rgba(var(--edu-shadow-color), 0.05);\n }\n\n & .check-btn {\n border-radius: 999px;\n box-shadow: 0 6px 14px rgba(var(--edu-shadow-color), 0.12);\n }\n\n & .check-btn:hover:not(:disabled) {\n box-shadow: 0 4px 8px rgba(var(--edu-first-accent), 0.2);\n }\n\n & footer {\n border-top: 1px solid rgb(var(--edu-border));\n }\n\n & .radio-nav label {\n border-radius: 999px;\n box-shadow: 0 4px 10px rgba(var(--edu-shadow-color), 0.08);\n }\n\n & .radio-nav input:checked + label {\n box-shadow: 0 4px 8px rgba(var(--edu-first-accent), 0.2);\n }\n}\n';
|
|
13355
13409
|
|
|
13356
13410
|
// src/shell/simple-shell/script.ts
|
|
13357
13411
|
var InteractionsBaseShell = class extends HTMLElement {
|
|
@@ -13378,11 +13432,11 @@ var InteractionsBaseShell = class extends HTMLElement {
|
|
|
13378
13432
|
this.$headerEl = wrap.querySelector("header");
|
|
13379
13433
|
this.$footerEl = wrap.querySelector("footer");
|
|
13380
13434
|
this.$titleEl = wrap.querySelector(".title");
|
|
13435
|
+
this.$closeBtn = wrap.querySelector(".close-btn");
|
|
13381
13436
|
this.$promptBtn = wrap.querySelector(".prompt-btn");
|
|
13382
13437
|
this.$timerEl = wrap.querySelector(".timer");
|
|
13383
13438
|
this.$checkBtn = wrap.querySelector(".check-btn");
|
|
13384
13439
|
this.$scoresBtn = wrap.querySelector(".scores-btn");
|
|
13385
|
-
this.$seeAnswersBtn = wrap.querySelector(".see-answers-btn");
|
|
13386
13440
|
this.$retryBtn = wrap.querySelector(".retry-btn");
|
|
13387
13441
|
this.$radioNav = wrap.querySelector(".radio-nav");
|
|
13388
13442
|
this.$progressContainer = wrap.querySelector(".progress-container");
|
|
@@ -13407,7 +13461,6 @@ var InteractionsBaseShell = class extends HTMLElement {
|
|
|
13407
13461
|
if (!this.hasAttribute("show-footer")) this.setAttribute("show-footer", "true");
|
|
13408
13462
|
this.updateVisibility();
|
|
13409
13463
|
this.animationsManager.animate(this.$progressIcon, "heartbeat");
|
|
13410
|
-
this.animationsManager.animate(this.$promptBtn, "wobble");
|
|
13411
13464
|
}
|
|
13412
13465
|
disconnectedCallback() {
|
|
13413
13466
|
this.stopTimer();
|
|
@@ -13481,6 +13534,15 @@ var InteractionsBaseShell = class extends HTMLElement {
|
|
|
13481
13534
|
this.interactionComplete = false;
|
|
13482
13535
|
}
|
|
13483
13536
|
}
|
|
13537
|
+
toggleCloseBtn(handler) {
|
|
13538
|
+
if (this.$closeBtn.style.display === "none") {
|
|
13539
|
+
this.$closeBtn.style.display = "block";
|
|
13540
|
+
this.$closeBtn.addEventListener("click", handler);
|
|
13541
|
+
return;
|
|
13542
|
+
}
|
|
13543
|
+
this.$closeBtn.removeEventListener("click", handler);
|
|
13544
|
+
this.$closeBtn.style.display = "none";
|
|
13545
|
+
}
|
|
13484
13546
|
// ==================== EVENT LISTENERS ====================
|
|
13485
13547
|
setupShellListeners() {
|
|
13486
13548
|
this.$checkBtn.addEventListener("click", () => {
|
|
@@ -13491,11 +13553,6 @@ var InteractionsBaseShell = class extends HTMLElement {
|
|
|
13491
13553
|
console.error("Submit failed:", error);
|
|
13492
13554
|
}
|
|
13493
13555
|
});
|
|
13494
|
-
this.$seeAnswersBtn.addEventListener("click", () => {
|
|
13495
|
-
this.soundManager.playSound("pop");
|
|
13496
|
-
if (this.currentScreen === "solution") this.switchScreen("interaction");
|
|
13497
|
-
else this.switchScreen("solution");
|
|
13498
|
-
});
|
|
13499
13556
|
this.$scoresBtn.addEventListener("click", () => {
|
|
13500
13557
|
this.soundManager.playSound("pop");
|
|
13501
13558
|
if (this.currentScreen === "score") this.switchScreen("interaction");
|
|
@@ -13584,7 +13641,6 @@ var InteractionsBaseShell = class extends HTMLElement {
|
|
|
13584
13641
|
}
|
|
13585
13642
|
handleGraded(result) {
|
|
13586
13643
|
this.$checkBtn.classList.add("edu-hidden");
|
|
13587
|
-
this.$seeAnswersBtn.classList.remove("edu-hidden");
|
|
13588
13644
|
this.$scoresBtn.classList.remove("edu-hidden");
|
|
13589
13645
|
this.$retryBtn.classList.remove("edu-hidden");
|
|
13590
13646
|
if (this.attemptLimit && this.attemptCount > this.attemptLimit) {
|
|
@@ -13617,7 +13673,6 @@ var InteractionsBaseShell = class extends HTMLElement {
|
|
|
13617
13673
|
if (!this.interaction.implementsProgress) {
|
|
13618
13674
|
this.$checkBtn.classList.remove("edu-hidden");
|
|
13619
13675
|
}
|
|
13620
|
-
this.$seeAnswersBtn.classList.add("edu-hidden");
|
|
13621
13676
|
this.$scoresBtn.classList.add("edu-hidden");
|
|
13622
13677
|
this.$retryBtn.classList.add("edu-hidden");
|
|
13623
13678
|
this.$progressIcon.classList.remove("score-fail", "score-low", "score-mid", "score-high");
|