Skip to content

Commit dd1183c

Browse files
committed
v14.3.1
1 parent 9915e14 commit dd1183c

6 files changed

Lines changed: 19 additions & 21 deletions

File tree

build/cjs/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/esm/index.mjs

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "gleap",
3-
"version": "14.3.0",
3+
"version": "14.3.1",
44
"main": "build/cjs/index.js",
55
"module": "build/esm/index.mjs",
66
"exports": {

published/14.3.1/index.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

published/latest/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/GleapCopilotTours.js

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,6 @@ const localStorageKey = "gleap-tour-data";
55
const pointerContainerId = "copilot-pointer-container";
66
const styleId = "copilot-tour-styles";
77
const copilotJoinedContainerId = "copilot-joined-container";
8-
const copilotInfoBubbleId = "copilot-info-bubble";
9-
10-
const arrowRightIcon = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512">
11-
<path fill="currentColor" d="M438.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-160-160c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L338.8 224 32 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l306.7 0L233.4 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l160-160z"/>
12-
</svg>`;
138

149
function estimateReadTime(text) {
1510
if (typeof window === "undefined") return;
@@ -380,7 +375,7 @@ export default class GleapCopilotTours {
380375
cursor: pointer;
381376
pointer-events: all !important;
382377
}
383-
.${pointerContainerId}-clickmode #${copilotInfoBubbleId}-content {
378+
.${pointerContainerId}-clickmode #copilot-info-bubble-content {
384379
display: flex !important;
385380
}
386381
.${pointerContainerId}-clickmode svg {
@@ -391,10 +386,10 @@ export default class GleapCopilotTours {
391386
height: auto;
392387
fill: none;
393388
}
394-
#${copilotInfoBubbleId} {
389+
#copilot-info-bubble {
395390
position: relative;
396391
}
397-
#${copilotInfoBubbleId}-content-container {
392+
#copilot-info-bubble-content-container {
398393
position: absolute;
399394
top: 0px;
400395
left: 0px;
@@ -403,7 +398,7 @@ export default class GleapCopilotTours {
403398
flex-direction: column;
404399
align-items: flex-start;
405400
}
406-
.${pointerContainerId}-right #${copilotInfoBubbleId}-content-container {
401+
.${pointerContainerId}-right #copilot-info-bubble-content-container {
407402
left: auto !important;
408403
right: 0px !important;
409404
align-items: flex-end;
@@ -414,13 +409,13 @@ export default class GleapCopilotTours {
414409
.${pointerContainerId}-right svg {
415410
transform: scaleX(-1);
416411
}
417-
#${copilotInfoBubbleId}-content svg {
412+
#copilot-info-bubble-content svg {
418413
width: 16px;
419414
height: 16px;
420415
display: inline-block !important;
421416
margin-left: 5px;
422417
}
423-
#${copilotInfoBubbleId}-content {
418+
#copilot-info-bubble-content {
424419
margin-top: 18px;
425420
margin-left: 5px;
426421
padding: 10px 15px;
@@ -436,7 +431,7 @@ export default class GleapCopilotTours {
436431
word-break: normal;
437432
hyphens: none;
438433
}
439-
.${pointerContainerId}-right #${copilotInfoBubbleId}-content {
434+
.${pointerContainerId}-right #copilot-info-bubble-content {
440435
margin-top: 30px;
441436
margin-left: 0px;
442437
margin-right: 5px;
@@ -635,8 +630,8 @@ export default class GleapCopilotTours {
635630
'<path d="M352.595 268.315L352.581 268.302L352.566 268.29L78.6092 24.7278C71.6245 18.433 62.5487 15 53.2 15C32.1157 15 15 32.1157 15 53.2V424C15 444.34 31.4714 461 52 461C62.6797 461 72.8089 456.467 79.8863 448.38C79.8871 448.379 79.8879 448.378 79.8886 448.378L180.804 333.1H327.9C348.384 333.1 365 316.484 365 296C365 285.404 360.46 275.344 352.595 268.315Z" fill="black" stroke="white" stroke-width="30"/>';
636631

637632
const infoBubble = document.createElement("div");
638-
infoBubble.id = copilotInfoBubbleId;
639-
infoBubble.innerHTML = `<div id='${copilotInfoBubbleId}-content-container'><div id='${copilotInfoBubbleId}-content'></div></div>`;
633+
infoBubble.id = "copilot-info-bubble";
634+
infoBubble.innerHTML = `<div id='copilot-info-bubble-content-container'><div id='copilot-info-bubble-content'></div></div>`;
640635

641636
const copilotInfoContainer = document.createElement("div");
642637
copilotInfoContainer.id = copilotJoinedContainerId;
@@ -743,12 +738,14 @@ export default class GleapCopilotTours {
743738
function handleInputEvent(e) {
744739
if (e.target.value.length === 0) return;
745740
const cursor = document.getElementById(
746-
`${copilotInfoBubbleId}-content`
741+
`copilot-info-bubble-content`
747742
);
748743
if (!cursor) return;
749744
cursor.innerHTML = `${GleapTranslationManager.translateText(
750745
"next"
751-
)} ${arrowRightIcon}`;
746+
)} <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512">
747+
<path fill="currentColor" d="M438.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-160-160c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L338.8 224 32 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l306.7 0L233.4 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l160-160z"/>
748+
</svg>`;
752749
cursor.addEventListener("click", proceedClickmode, {
753750
once: true,
754751
});
@@ -806,7 +803,7 @@ export default class GleapCopilotTours {
806803
const message = currentStep?.message
807804
? htmlToPlainText(currentStep.message)
808805
: "🤔";
809-
document.getElementById(`${copilotInfoBubbleId}-content`).textContent =
806+
document.getElementById(`copilot-info-bubble-content`).textContent =
810807
message;
811808
this._pointerContainer.style.opacity = 1;
812809
const readTime = estimateReadTime(message);

0 commit comments

Comments
 (0)