eat-js-sdk 1.0.3 → 1.0.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/eat-prompt-builder.mjs +65 -7
- package/package.json +1 -1
|
@@ -5373,6 +5373,12 @@
|
|
|
5373
5373
|
function create_each_block_1(ctx) {
|
|
5374
5374
|
let div1;
|
|
5375
5375
|
let p;
|
|
5376
|
+
let t0_value = useIsEven(
|
|
5377
|
+
/*iterationIndex*/
|
|
5378
|
+
ctx[63]
|
|
5379
|
+
) ? `Student's` : "Correct";
|
|
5380
|
+
let t0;
|
|
5381
|
+
let t1;
|
|
5376
5382
|
let p_class_value;
|
|
5377
5383
|
let t2;
|
|
5378
5384
|
let div0;
|
|
@@ -5395,6 +5401,7 @@
|
|
|
5395
5401
|
/*iterationIndex*/
|
|
5396
5402
|
ctx[63]
|
|
5397
5403
|
);
|
|
5404
|
+
let div0_class_value;
|
|
5398
5405
|
let div1_class_value;
|
|
5399
5406
|
let current;
|
|
5400
5407
|
let mounted;
|
|
@@ -5404,10 +5411,8 @@
|
|
|
5404
5411
|
c() {
|
|
5405
5412
|
div1 = element("div");
|
|
5406
5413
|
p = element("p");
|
|
5407
|
-
|
|
5408
|
-
|
|
5409
|
-
ctx[63]
|
|
5410
|
-
) ? `Student's` : "Correct"} answers:`;
|
|
5414
|
+
t0 = text(t0_value);
|
|
5415
|
+
t1 = text(" answers:");
|
|
5411
5416
|
t2 = space();
|
|
5412
5417
|
div0 = element("div");
|
|
5413
5418
|
label = element("label");
|
|
@@ -5436,7 +5441,14 @@
|
|
|
5436
5441
|
ctx[60] === 0 ? "mt-2 md:mt-0" : (
|
|
5437
5442
|
/*itemIndex*/
|
|
5438
5443
|
ctx[60] === 0 ? "" : ""
|
|
5439
|
-
))
|
|
5444
|
+
)) + " " + (!useIsEven(
|
|
5445
|
+
/*iterationIndex*/
|
|
5446
|
+
ctx[63]
|
|
5447
|
+
) && /*inlineAnswerResult*/
|
|
5448
|
+
ctx[13][
|
|
5449
|
+
/*itemIndex*/
|
|
5450
|
+
ctx[60]
|
|
5451
|
+
] ? "hidden md:block" : ""));
|
|
5440
5452
|
attr(span0, "class", "absolute inset-0 bottom-[7px] bg-black opacity-5 rounded-l-lg w-8.5 top-1");
|
|
5441
5453
|
attr(span1, "class", "absolute font-semibold text-base leading-[19px] text-charcoal px-3 inline-block top-1/2 -translate-y-1/2 -mt-0.5");
|
|
5442
5454
|
attr(label, "for", label_for_value = `${/*iterationIndex*/
|
|
@@ -5529,7 +5541,14 @@
|
|
|
5529
5541
|
/*itemIndex*/
|
|
5530
5542
|
ctx[60]
|
|
5531
5543
|
] ? "-1" : "");
|
|
5532
|
-
attr(div0, "class", "h-fit relative"
|
|
5544
|
+
attr(div0, "class", div0_class_value = "h-fit relative " + (!useIsEven(
|
|
5545
|
+
/*iterationIndex*/
|
|
5546
|
+
ctx[63]
|
|
5547
|
+
) && /*inlineAnswerResult*/
|
|
5548
|
+
ctx[13][
|
|
5549
|
+
/*itemIndex*/
|
|
5550
|
+
ctx[60]
|
|
5551
|
+
] ? "hidden md:block" : ""));
|
|
5533
5552
|
attr(div1, "class", div1_class_value = "flex flex-col md:w-1/2 " + (useIsEven(
|
|
5534
5553
|
/*iterationIndex*/
|
|
5535
5554
|
ctx[63]
|
|
@@ -5538,6 +5557,8 @@
|
|
|
5538
5557
|
m(target, anchor) {
|
|
5539
5558
|
insert(target, div1, anchor);
|
|
5540
5559
|
append(div1, p);
|
|
5560
|
+
append(p, t0);
|
|
5561
|
+
append(p, t1);
|
|
5541
5562
|
append(div1, t2);
|
|
5542
5563
|
append(div1, div0);
|
|
5543
5564
|
append(div0, label);
|
|
@@ -5556,6 +5577,32 @@
|
|
|
5556
5577
|
}
|
|
5557
5578
|
},
|
|
5558
5579
|
p(ctx2, dirty) {
|
|
5580
|
+
if (!current || dirty[0] & /*inlineAnswerResult*/
|
|
5581
|
+
8192 && p_class_value !== (p_class_value = "text-base text-charcoal font-semibold " + (useIsEven(
|
|
5582
|
+
/*iterationIndex*/
|
|
5583
|
+
ctx2[63]
|
|
5584
|
+
) && /*itemIndex*/
|
|
5585
|
+
ctx2[60] !== 0 ? "hidden" : !useIsEven(
|
|
5586
|
+
/*iterationIndex*/
|
|
5587
|
+
ctx2[63]
|
|
5588
|
+
) && /*itemIndex*/
|
|
5589
|
+
ctx2[60] !== 0 ? "mt-2 md:mt-0 md:hidden" : !useIsEven(
|
|
5590
|
+
/*iterationIndex*/
|
|
5591
|
+
ctx2[63]
|
|
5592
|
+
) && /*itemIndex*/
|
|
5593
|
+
ctx2[60] === 0 ? "mt-2 md:mt-0" : (
|
|
5594
|
+
/*itemIndex*/
|
|
5595
|
+
ctx2[60] === 0 ? "" : ""
|
|
5596
|
+
)) + " " + (!useIsEven(
|
|
5597
|
+
/*iterationIndex*/
|
|
5598
|
+
ctx2[63]
|
|
5599
|
+
) && /*inlineAnswerResult*/
|
|
5600
|
+
ctx2[13][
|
|
5601
|
+
/*itemIndex*/
|
|
5602
|
+
ctx2[60]
|
|
5603
|
+
] ? "hidden md:block" : ""))) {
|
|
5604
|
+
attr(p, "class", p_class_value);
|
|
5605
|
+
}
|
|
5559
5606
|
if (!current || dirty[0] & /*sessionId*/
|
|
5560
5607
|
8 && label_for_value !== (label_for_value = `${/*iterationIndex*/
|
|
5561
5608
|
ctx2[63]}-${/*sessionId*/
|
|
@@ -5666,6 +5713,17 @@
|
|
|
5666
5713
|
}
|
|
5667
5714
|
if (show_if)
|
|
5668
5715
|
if_block.p(ctx2, dirty);
|
|
5716
|
+
if (!current || dirty[0] & /*inlineAnswerResult*/
|
|
5717
|
+
8192 && div0_class_value !== (div0_class_value = "h-fit relative " + (!useIsEven(
|
|
5718
|
+
/*iterationIndex*/
|
|
5719
|
+
ctx2[63]
|
|
5720
|
+
) && /*inlineAnswerResult*/
|
|
5721
|
+
ctx2[13][
|
|
5722
|
+
/*itemIndex*/
|
|
5723
|
+
ctx2[60]
|
|
5724
|
+
] ? "hidden md:block" : ""))) {
|
|
5725
|
+
attr(div0, "class", div0_class_value);
|
|
5726
|
+
}
|
|
5669
5727
|
},
|
|
5670
5728
|
i(local) {
|
|
5671
5729
|
if (current)
|
|
@@ -6084,7 +6142,7 @@
|
|
|
6084
6142
|
const eatRegex = /<eat-contentful>/g;
|
|
6085
6143
|
const inputCount = inlinePrompt.match(eatRegex)?.length || 0;
|
|
6086
6144
|
const isSingleInput = inputCount <= 1;
|
|
6087
|
-
const sessionString = sessionId.replace(/-/g, "");
|
|
6145
|
+
const sessionString = sessionId ? sessionId.replace(/-/g, "") : "preview";
|
|
6088
6146
|
const spacer = '<span class="inline-block w-2 h-4"></span>';
|
|
6089
6147
|
$$invalidate(11, inlinePromptString = inlinePrompt.replace(eatRegex, () => {
|
|
6090
6148
|
if (isInitialLoad) {
|