@contentstack/live-preview-utils 3.2.4 → 3.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/README.md +1 -1
- package/dist/legacy/index.d.cts +1 -1
- package/dist/legacy/index.d.ts +1 -1
- package/dist/legacy/light-sdk.cjs +1 -1
- package/dist/legacy/light-sdk.js +1 -1
- package/dist/legacy/livePreview/eventManager/postMessageEvent.hooks.cjs +1 -1
- package/dist/legacy/livePreview/eventManager/postMessageEvent.hooks.js +1 -1
- package/dist/legacy/livePreview/live-preview.cjs +6 -2
- package/dist/legacy/livePreview/live-preview.cjs.map +1 -1
- package/dist/legacy/livePreview/live-preview.js +6 -2
- package/dist/legacy/livePreview/live-preview.js.map +1 -1
- package/dist/legacy/preview/contentstack-live-preview-HOC.cjs +1 -1
- package/dist/legacy/preview/contentstack-live-preview-HOC.js +1 -1
- package/dist/legacy/utils/index.cjs +10 -0
- package/dist/legacy/utils/index.cjs.map +1 -1
- package/dist/legacy/utils/index.d.cts +2 -1
- package/dist/legacy/utils/index.d.ts +2 -1
- package/dist/legacy/utils/index.js +9 -0
- package/dist/legacy/utils/index.js.map +1 -1
- package/dist/legacy/visualBuilder/components/Tooltip.cjs +167 -0
- package/dist/legacy/visualBuilder/components/Tooltip.cjs.map +1 -0
- package/dist/legacy/visualBuilder/components/Tooltip.d.cts +26 -0
- package/dist/legacy/visualBuilder/components/Tooltip.d.ts +26 -0
- package/dist/legacy/visualBuilder/components/Tooltip.js +140 -0
- package/dist/legacy/visualBuilder/components/Tooltip.js.map +1 -0
- package/dist/legacy/visualBuilder/components/VisualBuilder.cjs +4 -0
- package/dist/legacy/visualBuilder/components/VisualBuilder.cjs.map +1 -1
- package/dist/legacy/visualBuilder/components/VisualBuilder.d.cts +1 -1
- package/dist/legacy/visualBuilder/components/VisualBuilder.d.ts +1 -1
- package/dist/legacy/visualBuilder/components/VisualBuilder.js +4 -0
- package/dist/legacy/visualBuilder/components/VisualBuilder.js.map +1 -1
- package/dist/legacy/visualBuilder/components/fieldLabelWrapper.cjs +115 -15
- package/dist/legacy/visualBuilder/components/fieldLabelWrapper.cjs.map +1 -1
- package/dist/legacy/visualBuilder/components/fieldLabelWrapper.js +117 -17
- package/dist/legacy/visualBuilder/components/fieldLabelWrapper.js.map +1 -1
- package/dist/legacy/visualBuilder/components/icons/index.cjs +44 -0
- package/dist/legacy/visualBuilder/components/icons/index.cjs.map +1 -1
- package/dist/legacy/visualBuilder/components/icons/index.d.cts +3 -1
- package/dist/legacy/visualBuilder/components/icons/index.d.ts +3 -1
- package/dist/legacy/visualBuilder/components/icons/index.js +32 -0
- package/dist/legacy/visualBuilder/components/icons/index.js.map +1 -1
- package/dist/legacy/visualBuilder/components/index.cjs +3 -1
- package/dist/legacy/visualBuilder/components/index.cjs.map +1 -1
- package/dist/legacy/visualBuilder/components/index.js +3 -1
- package/dist/legacy/visualBuilder/components/index.js.map +1 -1
- package/dist/legacy/visualBuilder/generators/generateOverlay.cjs +1 -0
- package/dist/legacy/visualBuilder/generators/generateOverlay.cjs.map +1 -1
- package/dist/legacy/visualBuilder/generators/generateOverlay.js +1 -0
- package/dist/legacy/visualBuilder/generators/generateOverlay.js.map +1 -1
- package/dist/legacy/visualBuilder/generators/generateStartEditingButton.cjs +10 -6
- package/dist/legacy/visualBuilder/generators/generateStartEditingButton.cjs.map +1 -1
- package/dist/legacy/visualBuilder/generators/generateStartEditingButton.d.cts +2 -3
- package/dist/legacy/visualBuilder/generators/generateStartEditingButton.d.ts +2 -3
- package/dist/legacy/visualBuilder/generators/generateStartEditingButton.js +10 -6
- package/dist/legacy/visualBuilder/generators/generateStartEditingButton.js.map +1 -1
- package/dist/legacy/visualBuilder/generators/generateToolbar.cjs +43 -10
- package/dist/legacy/visualBuilder/generators/generateToolbar.cjs.map +1 -1
- package/dist/legacy/visualBuilder/generators/generateToolbar.d.cts +11 -4
- package/dist/legacy/visualBuilder/generators/generateToolbar.d.ts +11 -4
- package/dist/legacy/visualBuilder/generators/generateToolbar.js +41 -9
- package/dist/legacy/visualBuilder/generators/generateToolbar.js.map +1 -1
- package/dist/legacy/visualBuilder/index.cjs +7 -3
- package/dist/legacy/visualBuilder/index.cjs.map +1 -1
- package/dist/legacy/visualBuilder/index.d.cts +2 -0
- package/dist/legacy/visualBuilder/index.d.ts +2 -0
- package/dist/legacy/visualBuilder/index.js +7 -3
- package/dist/legacy/visualBuilder/index.js.map +1 -1
- package/dist/legacy/visualBuilder/listeners/index.cjs +3 -1
- package/dist/legacy/visualBuilder/listeners/index.cjs.map +1 -1
- package/dist/legacy/visualBuilder/listeners/index.js +3 -1
- package/dist/legacy/visualBuilder/listeners/index.js.map +1 -1
- package/dist/legacy/visualBuilder/listeners/mouseClick.cjs +7 -3
- package/dist/legacy/visualBuilder/listeners/mouseClick.cjs.map +1 -1
- package/dist/legacy/visualBuilder/listeners/mouseClick.d.cts +4 -1
- package/dist/legacy/visualBuilder/listeners/mouseClick.d.ts +4 -1
- package/dist/legacy/visualBuilder/listeners/mouseClick.js +5 -2
- package/dist/legacy/visualBuilder/listeners/mouseClick.js.map +1 -1
- package/dist/legacy/visualBuilder/listeners/mouseHover.cjs +183 -133
- package/dist/legacy/visualBuilder/listeners/mouseHover.cjs.map +1 -1
- package/dist/legacy/visualBuilder/listeners/mouseHover.d.cts +5 -3
- package/dist/legacy/visualBuilder/listeners/mouseHover.d.ts +5 -3
- package/dist/legacy/visualBuilder/listeners/mouseHover.js +182 -133
- package/dist/legacy/visualBuilder/listeners/mouseHover.js.map +1 -1
- package/dist/legacy/visualBuilder/utils/getPsuedoEditableEssentialStyles.cjs +58 -0
- package/dist/legacy/visualBuilder/utils/getPsuedoEditableEssentialStyles.cjs.map +1 -0
- package/dist/legacy/visualBuilder/utils/getPsuedoEditableEssentialStyles.d.cts +18 -0
- package/dist/legacy/visualBuilder/utils/getPsuedoEditableEssentialStyles.d.ts +18 -0
- package/dist/legacy/visualBuilder/utils/getPsuedoEditableEssentialStyles.js +25 -0
- package/dist/legacy/visualBuilder/utils/getPsuedoEditableEssentialStyles.js.map +1 -0
- package/dist/legacy/visualBuilder/utils/getPsuedoEditableStylesElement.cjs +4 -8
- package/dist/legacy/visualBuilder/utils/getPsuedoEditableStylesElement.cjs.map +1 -1
- package/dist/legacy/visualBuilder/utils/getPsuedoEditableStylesElement.js +4 -8
- package/dist/legacy/visualBuilder/utils/getPsuedoEditableStylesElement.js.map +1 -1
- package/dist/legacy/visualBuilder/utils/handleIndividualFields.cjs +2 -23
- package/dist/legacy/visualBuilder/utils/handleIndividualFields.cjs.map +1 -1
- package/dist/legacy/visualBuilder/utils/handleIndividualFields.js +2 -13
- package/dist/legacy/visualBuilder/utils/handleIndividualFields.js.map +1 -1
- package/dist/legacy/visualBuilder/utils/types/postMessage.types.cjs +2 -0
- package/dist/legacy/visualBuilder/utils/types/postMessage.types.cjs.map +1 -1
- package/dist/legacy/visualBuilder/utils/types/postMessage.types.d.cts +2 -0
- package/dist/legacy/visualBuilder/utils/types/postMessage.types.d.ts +2 -0
- package/dist/legacy/visualBuilder/utils/types/postMessage.types.js +2 -0
- package/dist/legacy/visualBuilder/utils/types/postMessage.types.js.map +1 -1
- package/dist/legacy/visualBuilder/visualBuilder.style.cjs +66 -1
- package/dist/legacy/visualBuilder/visualBuilder.style.cjs.map +1 -1
- package/dist/legacy/visualBuilder/visualBuilder.style.d.cts +7 -0
- package/dist/legacy/visualBuilder/visualBuilder.style.d.ts +7 -0
- package/dist/legacy/visualBuilder/visualBuilder.style.js +66 -1
- package/dist/legacy/visualBuilder/visualBuilder.style.js.map +1 -1
- package/dist/modern/light-sdk.cjs +1 -1
- package/dist/modern/light-sdk.js +1 -1
- package/dist/modern/livePreview/eventManager/postMessageEvent.hooks.cjs +1 -1
- package/dist/modern/livePreview/eventManager/postMessageEvent.hooks.js +1 -1
- package/dist/modern/livePreview/live-preview.cjs +6 -2
- package/dist/modern/livePreview/live-preview.cjs.map +1 -1
- package/dist/modern/livePreview/live-preview.js +6 -2
- package/dist/modern/livePreview/live-preview.js.map +1 -1
- package/dist/modern/preview/contentstack-live-preview-HOC.cjs +1 -1
- package/dist/modern/preview/contentstack-live-preview-HOC.js +1 -1
- package/dist/modern/utils/index.cjs +10 -0
- package/dist/modern/utils/index.cjs.map +1 -1
- package/dist/modern/utils/index.d.cts +2 -1
- package/dist/modern/utils/index.d.ts +2 -1
- package/dist/modern/utils/index.js +9 -0
- package/dist/modern/utils/index.js.map +1 -1
- package/dist/modern/visualBuilder/components/Tooltip.cjs +167 -0
- package/dist/modern/visualBuilder/components/Tooltip.cjs.map +1 -0
- package/dist/modern/visualBuilder/components/Tooltip.d.cts +26 -0
- package/dist/modern/visualBuilder/components/Tooltip.d.ts +26 -0
- package/dist/modern/visualBuilder/components/Tooltip.js +140 -0
- package/dist/modern/visualBuilder/components/Tooltip.js.map +1 -0
- package/dist/modern/visualBuilder/components/VisualBuilder.cjs +4 -0
- package/dist/modern/visualBuilder/components/VisualBuilder.cjs.map +1 -1
- package/dist/modern/visualBuilder/components/VisualBuilder.d.cts +1 -1
- package/dist/modern/visualBuilder/components/VisualBuilder.d.ts +1 -1
- package/dist/modern/visualBuilder/components/VisualBuilder.js +4 -0
- package/dist/modern/visualBuilder/components/VisualBuilder.js.map +1 -1
- package/dist/modern/visualBuilder/components/fieldLabelWrapper.cjs +113 -15
- package/dist/modern/visualBuilder/components/fieldLabelWrapper.cjs.map +1 -1
- package/dist/modern/visualBuilder/components/fieldLabelWrapper.js +115 -17
- package/dist/modern/visualBuilder/components/fieldLabelWrapper.js.map +1 -1
- package/dist/modern/visualBuilder/components/icons/index.cjs +44 -0
- package/dist/modern/visualBuilder/components/icons/index.cjs.map +1 -1
- package/dist/modern/visualBuilder/components/icons/index.d.cts +3 -1
- package/dist/modern/visualBuilder/components/icons/index.d.ts +3 -1
- package/dist/modern/visualBuilder/components/icons/index.js +32 -0
- package/dist/modern/visualBuilder/components/icons/index.js.map +1 -1
- package/dist/modern/visualBuilder/components/index.cjs +3 -1
- package/dist/modern/visualBuilder/components/index.cjs.map +1 -1
- package/dist/modern/visualBuilder/components/index.js +3 -1
- package/dist/modern/visualBuilder/components/index.js.map +1 -1
- package/dist/modern/visualBuilder/generators/generateOverlay.cjs +1 -0
- package/dist/modern/visualBuilder/generators/generateOverlay.cjs.map +1 -1
- package/dist/modern/visualBuilder/generators/generateOverlay.js +1 -0
- package/dist/modern/visualBuilder/generators/generateOverlay.js.map +1 -1
- package/dist/modern/visualBuilder/generators/generateStartEditingButton.cjs +10 -6
- package/dist/modern/visualBuilder/generators/generateStartEditingButton.cjs.map +1 -1
- package/dist/modern/visualBuilder/generators/generateStartEditingButton.d.cts +2 -3
- package/dist/modern/visualBuilder/generators/generateStartEditingButton.d.ts +2 -3
- package/dist/modern/visualBuilder/generators/generateStartEditingButton.js +10 -6
- package/dist/modern/visualBuilder/generators/generateStartEditingButton.js.map +1 -1
- package/dist/modern/visualBuilder/generators/generateToolbar.cjs +42 -10
- package/dist/modern/visualBuilder/generators/generateToolbar.cjs.map +1 -1
- package/dist/modern/visualBuilder/generators/generateToolbar.d.cts +11 -4
- package/dist/modern/visualBuilder/generators/generateToolbar.d.ts +11 -4
- package/dist/modern/visualBuilder/generators/generateToolbar.js +40 -9
- package/dist/modern/visualBuilder/generators/generateToolbar.js.map +1 -1
- package/dist/modern/visualBuilder/index.cjs +7 -3
- package/dist/modern/visualBuilder/index.cjs.map +1 -1
- package/dist/modern/visualBuilder/index.d.cts +2 -0
- package/dist/modern/visualBuilder/index.d.ts +2 -0
- package/dist/modern/visualBuilder/index.js +7 -3
- package/dist/modern/visualBuilder/index.js.map +1 -1
- package/dist/modern/visualBuilder/listeners/index.cjs +3 -1
- package/dist/modern/visualBuilder/listeners/index.cjs.map +1 -1
- package/dist/modern/visualBuilder/listeners/index.js +3 -1
- package/dist/modern/visualBuilder/listeners/index.js.map +1 -1
- package/dist/modern/visualBuilder/listeners/mouseClick.cjs +7 -3
- package/dist/modern/visualBuilder/listeners/mouseClick.cjs.map +1 -1
- package/dist/modern/visualBuilder/listeners/mouseClick.d.cts +4 -1
- package/dist/modern/visualBuilder/listeners/mouseClick.d.ts +4 -1
- package/dist/modern/visualBuilder/listeners/mouseClick.js +5 -2
- package/dist/modern/visualBuilder/listeners/mouseClick.js.map +1 -1
- package/dist/modern/visualBuilder/listeners/mouseHover.cjs +183 -133
- package/dist/modern/visualBuilder/listeners/mouseHover.cjs.map +1 -1
- package/dist/modern/visualBuilder/listeners/mouseHover.d.cts +5 -3
- package/dist/modern/visualBuilder/listeners/mouseHover.d.ts +5 -3
- package/dist/modern/visualBuilder/listeners/mouseHover.js +182 -133
- package/dist/modern/visualBuilder/listeners/mouseHover.js.map +1 -1
- package/dist/modern/visualBuilder/utils/getPsuedoEditableEssentialStyles.cjs +58 -0
- package/dist/modern/visualBuilder/utils/getPsuedoEditableEssentialStyles.cjs.map +1 -0
- package/dist/modern/visualBuilder/utils/getPsuedoEditableEssentialStyles.d.cts +18 -0
- package/dist/modern/visualBuilder/utils/getPsuedoEditableEssentialStyles.d.ts +18 -0
- package/dist/modern/visualBuilder/utils/getPsuedoEditableEssentialStyles.js +25 -0
- package/dist/modern/visualBuilder/utils/getPsuedoEditableEssentialStyles.js.map +1 -0
- package/dist/modern/visualBuilder/utils/getPsuedoEditableStylesElement.cjs +4 -8
- package/dist/modern/visualBuilder/utils/getPsuedoEditableStylesElement.cjs.map +1 -1
- package/dist/modern/visualBuilder/utils/getPsuedoEditableStylesElement.js +4 -8
- package/dist/modern/visualBuilder/utils/getPsuedoEditableStylesElement.js.map +1 -1
- package/dist/modern/visualBuilder/utils/handleIndividualFields.cjs +2 -22
- package/dist/modern/visualBuilder/utils/handleIndividualFields.cjs.map +1 -1
- package/dist/modern/visualBuilder/utils/handleIndividualFields.js +2 -12
- package/dist/modern/visualBuilder/utils/handleIndividualFields.js.map +1 -1
- package/dist/modern/visualBuilder/utils/types/postMessage.types.cjs +2 -0
- package/dist/modern/visualBuilder/utils/types/postMessage.types.cjs.map +1 -1
- package/dist/modern/visualBuilder/utils/types/postMessage.types.d.cts +2 -0
- package/dist/modern/visualBuilder/utils/types/postMessage.types.d.ts +2 -0
- package/dist/modern/visualBuilder/utils/types/postMessage.types.js +2 -0
- package/dist/modern/visualBuilder/utils/types/postMessage.types.js.map +1 -1
- package/dist/modern/visualBuilder/visualBuilder.style.cjs +66 -1
- package/dist/modern/visualBuilder/visualBuilder.style.cjs.map +1 -1
- package/dist/modern/visualBuilder/visualBuilder.style.d.cts +7 -0
- package/dist/modern/visualBuilder/visualBuilder.style.d.ts +7 -0
- package/dist/modern/visualBuilder/visualBuilder.style.js +66 -1
- package/dist/modern/visualBuilder/visualBuilder.style.js.map +1 -1
- package/package.json +2 -1
|
@@ -65,6 +65,48 @@ function visualBuilderStyles() {
|
|
|
65
65
|
cursor: none;
|
|
66
66
|
}
|
|
67
67
|
`,
|
|
68
|
+
"tooltip-container": css`
|
|
69
|
+
position: absolute;
|
|
70
|
+
background-color: #767676;
|
|
71
|
+
color: white;
|
|
72
|
+
padding: 12px;
|
|
73
|
+
border-radius: 4px;
|
|
74
|
+
font-size: 12px;
|
|
75
|
+
line-height: 1.4;
|
|
76
|
+
z-index: 1000;
|
|
77
|
+
pointer-events: none;
|
|
78
|
+
max-width: 250px;
|
|
79
|
+
text-align: center;
|
|
80
|
+
`,
|
|
81
|
+
"tooltip-arrow": css`
|
|
82
|
+
position: absolute;
|
|
83
|
+
background: #767676;
|
|
84
|
+
width: 8px;
|
|
85
|
+
height: 8px;
|
|
86
|
+
transform: rotate(45deg);
|
|
87
|
+
`,
|
|
88
|
+
"toolbar-tooltip-content": css`
|
|
89
|
+
display: flex;
|
|
90
|
+
flex-direction: column;
|
|
91
|
+
gap: 4px;
|
|
92
|
+
`,
|
|
93
|
+
"toolbar-tooltip-content-item": css`
|
|
94
|
+
display: flex;
|
|
95
|
+
align-items: center;
|
|
96
|
+
justify-content: start;
|
|
97
|
+
gap: 4px;
|
|
98
|
+
white-space: nowrap;
|
|
99
|
+
overflow: hidden;
|
|
100
|
+
text-overflow: ellipsis;
|
|
101
|
+
|
|
102
|
+
p {
|
|
103
|
+
margin: 0;
|
|
104
|
+
color: #fff;
|
|
105
|
+
overflow: hidden;
|
|
106
|
+
text-overflow: ellipsis;
|
|
107
|
+
max-width: 100%;
|
|
108
|
+
}
|
|
109
|
+
`,
|
|
68
110
|
"visual-builder__overlay__wrapper": css`
|
|
69
111
|
position: absolute;
|
|
70
112
|
top: 0;
|
|
@@ -379,7 +421,30 @@ function visualBuilderStyles() {
|
|
|
379
421
|
svg {
|
|
380
422
|
height: 16px;
|
|
381
423
|
width: 16px;
|
|
382
|
-
margin-right:
|
|
424
|
+
margin-right: 3px;
|
|
425
|
+
}
|
|
426
|
+
`,
|
|
427
|
+
"visual-builder__content-type-icon": css`
|
|
428
|
+
svg {
|
|
429
|
+
height: 16px;
|
|
430
|
+
width: 16px;
|
|
431
|
+
margin-right: 3px;
|
|
432
|
+
}
|
|
433
|
+
`,
|
|
434
|
+
"visual-builder__caret-right-icon": css`
|
|
435
|
+
svg {
|
|
436
|
+
height: 16px;
|
|
437
|
+
width: 16px;
|
|
438
|
+
}
|
|
439
|
+
`,
|
|
440
|
+
"visual-builder__reference-icon-container": css`
|
|
441
|
+
display: flex;
|
|
442
|
+
align-items: center;
|
|
443
|
+
|
|
444
|
+
.visual-builder__field-icon {
|
|
445
|
+
svg {
|
|
446
|
+
margin-right: 0px;
|
|
447
|
+
}
|
|
383
448
|
}
|
|
384
449
|
`,
|
|
385
450
|
"visual-builder__focused-toolbar__button-group": css`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/visualBuilder/visualBuilder.style.ts"],"sourcesContent":["import { css } from \"goober\";\n\nconst tooltipBaseStyle = `\n pointer-events: all;\n svg {\n pointer-events: none;\n }\n &:before {\n content: attr(data-tooltip);\n position: absolute;\n bottom: 20px;\n margin-bottom: 24px;\n padding: 12px;\n border-radius: 4px;\n width: max-content;\n max-width: 200px;\n color: #fff;\n font-family: Inter;\n font-size: 0.75rem;\n font-style: normal;\n font-weight: 400;\n line-height: 132%; /* 0.99rem */\n letter-spacing: 0.015rem;\n background: #767676;\n }\n &:after {\n content: \"\";\n position: absolute;\n bottom: 28px;\n /* the arrow */\n border: 10px solid #000;\n border-color: #767676 transparent transparent transparent;\n }\n`;\n\nexport function visualBuilderStyles() {\n return {\n \"visual-builder__container\": css`\n --outline-transition: all 0.15s ease-in;\n font-family: \"Inter\", sans-serif;\n `,\n \"visual-builder__cursor\": css`\n visibility: hidden;\n height: 0;\n\n &.visible {\n visibility: visible;\n position: fixed;\n top: 0;\n left: 0;\n z-index: 2147483647 !important;\n\n color: #fff;\n\n height: auto;\n padding: 0 10px;\n\n display: flex;\n align-items: center;\n justify-content: center;\n\n pointer-events: none !important;\n position: fixed !important;\n cursor: none;\n }\n `,\n \"visual-builder__overlay__wrapper\": css`\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100vh;\n visibility: hidden;\n z-index: 99999;\n\n pointer-events: none;\n\n &.visible {\n visibility: visible;\n }\n `,\n \"visual-builder__overlay--outline\": css`\n position: absolute;\n outline: 4px solid #715cdd;\n transition: var(--outline-transition);\n `,\n \"visual-builder__overlay\": css`\n background: rgba(0, 0, 0, 0.3);\n box-sizing: content-box;\n pointer-events: all;\n position: absolute;\n transition: var(--outline-transition);\n `,\n \"visual-builder__add-button\": css`\n position: absolute;\n pointer-events: all;\n\n background: #ffffff;\n color: #475161;\n\n border-radius: 4px;\n border: 1px solid #6c5ce7;\n\n height: 32px;\n min-width: 32px;\n max-width: 180px;\n padding: 8px 6px;\n transform: translate(-50%, -50%);\n\n font-weight: 600;\n color: #6c5ce7;\n overflow: hidden;\n\n z-index: 2147483646 !important;\n\n display: grid;\n grid-template-columns: min-content 0fr;\n align-content: center;\n gap: 0;\n\n transition:\n grid-template-columns 0.25s,\n left 0.15s ease-in,\n top 0.15s ease-in,\n gap 0.15s ease-in;\n\n &:has(.visual-builder__add-button-label):hover {\n grid-template-columns: min-content 1fr;\n gap: 8px;\n padding: 8px 16px;\n }\n\n svg {\n fill: #6c5ce7;\n }\n\n &:disabled {\n border-color: #bbbec3;\n cursor: not-allowed;\n }\n\n &:disabled svg {\n fill: #bbbec3;\n }\n `,\n \"visual-builder__add-button-label\": css`\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n `,\n \"visual-builder__add-button--loading\": css`\n cursor: wait;\n /* we have not-allowed on disabled, so we need this */\n &:disabled {\n cursor: wait;\n }\n `,\n \"visual-builder__start-editing-btn\": css`\n z-index: 1000;\n text-decoration: none;\n position: fixed;\n box-shadow:\n 0px 4px 15px 0px rgba(108, 92, 231, 0.2),\n 0px 3px 14px 3px rgba(0, 0, 0, 0.12),\n 0px 8px 10px 1px rgba(0, 0, 0, 0.14);\n display: inline-flex;\n padding: 0.5rem 1rem;\n justify-content: center;\n align-items: center;\n gap: 0.5rem;\n\n border-radius: 4px;\n border: 1px solid transparent;\n background: #6c5ce7;\n transition:\n background-color 0.15s ease-in-out,\n border-color 0.15s ease-in-out,\n box-shadow 0.15s ease-in-out,\n -webkit-box-shadow 0.15s ease-in-out;\n\n &:hover {\n background-color: #5d50be;\n }\n &:focus {\n outline: none;\n box-shadow: 0 0 0 2px #ada4f4;\n }\n & > span {\n color: #fff;\n /* Body/P1 Bold */\n font-size: 1rem;\n font-family: Inter;\n font-weight: 600;\n line-height: 150%;\n letter-spacing: 0.01rem;\n text-transform: capitalize;\n }\n\n & > svg {\n color: #fff;\n font-size: 1rem;\n font-family: Inter;\n font-weight: 600;\n line-height: 150%;\n letter-spacing: 0.01rem;\n text-transform: capitalize;\n }\n `,\n \"visual-builder__start-editing-btn__bottom-right\": css`\n bottom: 30px;\n right: 30px;\n `,\n \"visual-builder__start-editing-btn__bottom-left\": css`\n bottom: 30px;\n left: 30px;\n `,\n \"visual-builder__start-editing-btn__top-right\": css`\n top: 30px;\n right: 30px;\n `,\n \"visual-builder__start-editing-btn__top-left\": css`\n top: 30px;\n left: 30px;\n `,\n \"visual-builder__cursor-icon\": css`\n height: 40px;\n width: 40px;\n display: flex;\n align-items: center;\n justify-content: center;\n background: #5d50be;\n border-radius: 50%;\n position: absolute;\n top: 0;\n left: 0;\n `,\n \"visual-builder__cursor-pointer\": css`\n position: absolute;\n top: -8px;\n left: -8px;\n `,\n \"visual-builder__cursor-icon--loader\": css`\n animation: visual-builder__spinner 1s linear infinite;\n `,\n \"visual-builder__focused-toolbar\": css`\n position: absolute;\n transform: translateY(-100%);\n z-index: 100000;\n gap: 8px;\n width: 0;\n display: flex;\n align-items: end;\n transition: var(--outline-transition);\n `,\n \"visual-builder__focused-toolbar__field-label-wrapper__current-field\": css`\n padding: 4px 8px !important;\n background: #6c5ce7;\n color: #fff;\n z-index: 1;\n border-radius: 2px !important;\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: fit-content;\n\n &:disabled {\n filter: contrast(0.7);\n }\n\n .visual-builder__focused-toolbar__text {\n padding-right: 3px;\n height: 16px;\n }\n `,\n \"visual-builder__focused-toolbar__field-label-wrapper__parent-field\": css`\n pointer-events: none;\n color: #5d50be;\n padding: 4px !important;\n margin-bottom: 3px;\n display: none;\n width: fit-content;\n position: absolute;\n z-index: 100000;\n `,\n \"field-label-dropdown-open\": css`\n .visual-builder__focused-toolbar__field-label-wrapper__parent-field {\n pointer-events: all;\n visibility: visible;\n display: initial;\n }\n\n .visual-builder__button--secondary:hover {\n background-color: #6c5ce7;\n color: #f9f8ff;\n }\n `,\n \"visual-builder__focused-toolbar__field-label-wrapper\": css`\n display: flex;\n flex-direction: column-reverse;\n position: relative;\n `,\n \"visual-builder__focused-toolbar__field-label-container\": css`\n display: flex;\n column-gap: 0.5rem;\n align-items: center;\n `,\n \"visual-builder__button\": css`\n background-color: transparent;\n border: 1px solid transparent;\n border-radius: 4px;\n font-size: 16px;\n font-weight: 600;\n line-height: 100%;\n padding: 8px 16px;\n text-align: center;\n z-index: 2147483647 !important;\n transition:\n color 0.15s ease-in-out,\n background-color 0.15s ease-in-out,\n border-color 0.15s ease-in-out,\n box-shadow 0.15s ease-in-out;\n // vertical-align: middle;\n &:disabled {\n cursor: not-allowed;\n svg {\n fill: #999;\n path {\n fill: #999;\n }\n }\n }\n `,\n \"visual-builder__button--primary\": css`\n background-color: #6c5ce7;\n color: #fff;\n\n &:hover {\n background-color: #5d50be;\n }\n `,\n \"visual-builder__button--secondary\": css`\n background-color: #f9f8ff;\n border: 1px solid #6c5ce7;\n color: #6c5ce7;\n `,\n \"visual-builder__button--edit\": css`\n svg {\n height: 16px;\n width: 16px;\n\n path {\n fill: #475161;\n }\n }\n `,\n \"visual-builder__button-loader\": css`\n svg.loader {\n height: 16px;\n width: 16px;\n\n path {\n fill: #ffffff;\n }\n }\n `,\n \"visual-builder__button--comment-loader\": css`\n cursor: wait !important;\n svg.loader {\n height: 16px;\n width: 16px;\n\n path {\n fill: #475161;\n }\n }\n `,\n \"visual-builder__field-icon\": css`\n svg {\n height: 16px;\n width: 16px;\n margin-right: 5px;\n }\n `,\n \"visual-builder__focused-toolbar__button-group\": css`\n display: flex;\n background: #fff;\n border-radius: 2px;\n height: 100%;\n padding: 4px !important;\n z-index: 2147483647 !important;\n\n &:has(.visual-builder__button) {\n padding: 2px;\n gap: 8px;\n }\n\n .visual-builder__button:enabled:hover {\n background-color: #f5f5f5;\n\n svg {\n color: #5d50be;\n }\n }\n\n .visual-builder__button {\n background-color: #fff;\n border-color: transparent;\n color: #475161;\n padding: 4px;\n min-width: 32px;\n min-height: 32px;\n }\n `,\n \"visual-builder__focused-toolbar__text\": css`\n font-family: Inter, \"sans-serif\";\n font-size: 0.75rem;\n font-style: normal;\n font-weight: 400;\n line-height: 150%;\n letter-spacing: 0.015rem;\n max-width: 150px;\n overflow: hidden;\n text-overflow: ellipsis;\n text-wrap: nowrap;\n `,\n \"visual-builder__focused-toolbar__multiple-field-toolbar\": css`\n height: 40px;\n z-index: 2147483647 !important;\n\n svg {\n height: 100%;\n width: 100%;\n }\n `,\n \"visual-builder__rotate--90\": css`\n transform: rotate(90deg);\n `,\n \"visual-builder__focused-toolbar--field-disabled\": css`\n pointer-events: none;\n cursor: not-allowed;\n .visual-builder__focused-toolbar__field-label-wrapper__current-field {\n background: #909090;\n }\n `,\n \"visual-builder__cursor-disabled\": css`\n .visual-builder__cursor-icon {\n background: #909090;\n }\n\n .visual-builder__cursor-pointer path {\n fill: #909090;\n }\n `,\n \"visual-builder__tooltip\": css`\n ${tooltipBaseStyle}\n\n &:before {\n display: none;\n }\n\n &:hover:before,\n &:hover:after {\n display: block;\n z-index: 2147483647 !important;\n }\n\n &:after {\n display: none;\n }\n `,\n \"visual-builder__tooltip--bottom\": css`\n &:before {\n bottom: -66px;\n }\n &:after {\n bottom: -6px;\n transform: rotate(180deg);\n }\n `,\n\n \"visual-builder__tooltip--persistent\": css`\n ${tooltipBaseStyle}\n\n &:before {\n display: block;\n }\n\n &:after {\n display: block;\n }\n `,\n \"visual-builder__empty-block\": css`\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-direction: column;\n gap: 1rem;\n min-height: 100px;\n `,\n \"visual-builder__empty-block-title\": css`\n font-size: 0.95rem;\n font-family: Inter;\n font-weight: 400;\n line-height: 100%;\n color: #647696;\n `,\n \"visual-builder__empty-block-add-button\": css`\n height: 32px;\n border-radius: 4px;\n background: #f9f8ff;\n border-color: #6c5ce7;\n border-width: 1px;\n padding: 8px 16px 8px 16px;\n font-size: 0.9rem;\n font-family: Inter;\n font-weight: 600;\n color: #6c5ce7;\n padding-block: 0px;\n letter-spacing: 0.01rem;\n `,\n \"visual-builder__hover-outline\": css`\n position: absolute;\n outline: 2px dashed #6c5ce7;\n transition: var(--outline-transition);\n z-index: 2147483646 !important;\n `,\n \"visual-builder__hover-outline--hidden\": css`\n visibility: hidden;\n `,\n \"visual-builder__hover-outline--unclickable\": css`\n pointer-events: none;\n `,\n \"visual-builder__hover-outline--disabled\": css`\n outline: 2px dashed #909090;\n `,\n \"visual-builder__default-cursor--disabled\": css`\n cursor: none;\n `,\n \"visual-builder__draft-field\": css`\n outline: 2px dashed #eb5646;\n `,\n \"visual-builder__variant-field\": css`\n outline: 2px solid #bd59fa;\n `,\n \"visual-builder__pseudo-editable-element\": css`\n z-index: 99999 !important;\n `,\n // cslp error styles\n \"visual-builder__button-error\": css`\n background-color: #ffeeeb;\n padding: 0px !important;\n &:hover {\n background-color: #ffeeeb;\n }\n `,\n \"visual-builder__focused-toolbar__error\": css`\n display: flex;\n justify-content: center;\n align-items: center;\n column-gap: 3px;\n padding: 4px 8px;\n `,\n \"visual-builder__focused-toolbar__error-text\": css`\n font-weight: 400;\n font-size: 12px;\n line-height: 18px;\n color: #a31b00;\n `,\n \"visual-builder__focused-toolbar__error-toolip\": css`\n position: absolute;\n width: 400px;\n background-color: red;\n left: 0;\n top: -7px;\n transform: translateY(-100%);\n background-color: #767676;\n border-radius: 4px;\n box-shadow:\n 0px 1px 10px 0px #6c5ce733,\n 0px 5px 5px 0px #0000001f,\n 0px 2px 4px 0px #00000024;\n padding: 12px;\n text-align: left;\n\n &:before {\n content: \"\";\n position: absolute;\n bottom: -3px;\n left: 4%;\n transform: translateX(-50%) rotate(45deg);\n width: 10px;\n height: 10px;\n background-color: #767676;\n }\n\n > p {\n margin: 0;\n color: #ffffff;\n font-size: 14px;\n font-weight: 600;\n line-height: 21px;\n margin-bottom: 4px;\n }\n\n > span {\n color: #ffffff;\n font-size: 12px;\n font-weight: 400;\n line-height: 18px;\n }\n `,\n \"variant-field-revert-component\": css`\n position: relative;\n display: inline-block;\n z-index: 2147483647 !important;\n `,\n \"variant-field-revert-component__dropdown-content\": css`\n position: absolute;\n top: -12px;\n left: -4px;\n background-color: #ffffff;\n min-width: max-content;\n box-shadow:\n 0 4px 15px 0 rgba(108, 92, 231, 0.2),\n 0 3px 14px 3px rgba(0, 0, 0, 0.12),\n 0 8px 10px 1px rgba(0, 0, 0, 0.14);\n z-index: 2147483647 !important;\n margin-top: 4px;\n padding: 4px 0px;\n border-radius: 2px;\n `,\n \"variant-field-revert-component__dropdown-content__list-item\": css`\n color: black;\n font-weight: 400;\n padding: 9.6px 16px;\n text-decoration: none;\n display: block;\n font-size: 0.75rem;\n height: 32px;\n line-height: 2rem;\n display: flex;\n align-items: center;\n z-index: 2147483647 !important;\n cursor: pointer;\n &:hover {\n background-color: #f1f1f1;\n }\n &:hover > span {\n color: #5d50be;\n }\n & > span {\n margin-top: 4px;\n margin-bottom: 4px;\n }\n `,\n \"visual-builder__no-cursor-style\": css`\n cursor: none !important;\n `,\n \"visual-builder__field-toolbar-container\": css`\n display: flex;\n flex-direction: column-reverse;\n z-index: 2147483647 !important;\n `,\n \"visual-builder__variant-button\": css`\n display: flex;\n min-width: 3rem !important;\n gap: 0.25rem;\n align-items: center;\n justify-content: center;\n display: flex;\n & svg path {\n fill: #475161;\n }\n `,\n };\n}\n\nexport const VisualBuilderGlobalStyles = `\n @import url(\"https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap\");\n\n [data-cslp] [contenteditable=\"true\"] {\n outline: none;\n }\n\n @keyframes visual-builder__spinner {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n }\n\n`;\n"],"mappings":";;;AAAA,SAAS,WAAW;AAEpB,IAAM,mBAAmB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAiClB,SAAS,sBAAsB;AAClC,SAAO;AAAA,IACH,6BAA6B;AAAA;AAAA;AAAA;AAAA,IAI7B,0BAA0B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;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A,IAI3C,gCAAgC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOhC,0CAA0C;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAO1C,+CAA+C;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAM/C,iDAAiD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IA2CjD,kCAAkC;AAAA;AAAA;AAAA;AAAA;AAAA,IAKlC,oDAAoD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAepD,+DAA+D;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAwB/D,mCAAmC;AAAA;AAAA;AAAA,IAGnC,2CAA2C;AAAA;AAAA;AAAA;AAAA;AAAA,IAK3C,kCAAkC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAWtC;AACJ;AAEO,IAAM,4BAA4B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../../src/visualBuilder/visualBuilder.style.ts"],"sourcesContent":["import { css } from \"goober\";\n\nconst tooltipBaseStyle = `\n pointer-events: all;\n svg {\n pointer-events: none;\n }\n &:before {\n content: attr(data-tooltip);\n position: absolute;\n bottom: 20px;\n margin-bottom: 24px;\n padding: 12px;\n border-radius: 4px;\n width: max-content;\n max-width: 200px;\n color: #fff;\n font-family: Inter;\n font-size: 0.75rem;\n font-style: normal;\n font-weight: 400;\n line-height: 132%; /* 0.99rem */\n letter-spacing: 0.015rem;\n background: #767676;\n }\n &:after {\n content: \"\";\n position: absolute;\n bottom: 28px;\n /* the arrow */\n border: 10px solid #000;\n border-color: #767676 transparent transparent transparent;\n }\n`;\n\nexport function visualBuilderStyles() {\n return {\n \"visual-builder__container\": css`\n --outline-transition: all 0.15s ease-in;\n font-family: \"Inter\", sans-serif;\n `,\n \"visual-builder__cursor\": css`\n visibility: hidden;\n height: 0;\n\n &.visible {\n visibility: visible;\n position: fixed;\n top: 0;\n left: 0;\n z-index: 2147483647 !important;\n\n color: #fff;\n\n height: auto;\n padding: 0 10px;\n\n display: flex;\n align-items: center;\n justify-content: center;\n\n pointer-events: none !important;\n position: fixed !important;\n cursor: none;\n }\n `,\n \"tooltip-container\": css`\n position: absolute;\n background-color: #767676;\n color: white;\n padding: 12px;\n border-radius: 4px;\n font-size: 12px;\n line-height: 1.4;\n z-index: 1000;\n pointer-events: none;\n max-width: 250px;\n text-align: center;\n `,\n \"tooltip-arrow\": css`\n position: absolute;\n background: #767676;\n width: 8px;\n height: 8px;\n transform: rotate(45deg);\n `,\n \"toolbar-tooltip-content\": css`\n display: flex;\n flex-direction: column;\n gap: 4px;\n `,\n \"toolbar-tooltip-content-item\": css`\n display: flex;\n align-items: center;\n justify-content: start;\n gap: 4px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n\n p {\n margin: 0;\n color: #fff;\n overflow: hidden;\n text-overflow: ellipsis;\n max-width: 100%;\n }\n `,\n \"visual-builder__overlay__wrapper\": css`\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100vh;\n visibility: hidden;\n z-index: 99999;\n\n pointer-events: none;\n\n &.visible {\n visibility: visible;\n }\n `,\n \"visual-builder__overlay--outline\": css`\n position: absolute;\n outline: 4px solid #715cdd;\n transition: var(--outline-transition);\n `,\n \"visual-builder__overlay\": css`\n background: rgba(0, 0, 0, 0.3);\n box-sizing: content-box;\n pointer-events: all;\n position: absolute;\n transition: var(--outline-transition);\n `,\n \"visual-builder__add-button\": css`\n position: absolute;\n pointer-events: all;\n\n background: #ffffff;\n color: #475161;\n\n border-radius: 4px;\n border: 1px solid #6c5ce7;\n\n height: 32px;\n min-width: 32px;\n max-width: 180px;\n padding: 8px 6px;\n transform: translate(-50%, -50%);\n\n font-weight: 600;\n color: #6c5ce7;\n overflow: hidden;\n\n z-index: 2147483646 !important;\n\n display: grid;\n grid-template-columns: min-content 0fr;\n align-content: center;\n gap: 0;\n\n transition:\n grid-template-columns 0.25s,\n left 0.15s ease-in,\n top 0.15s ease-in,\n gap 0.15s ease-in;\n\n &:has(.visual-builder__add-button-label):hover {\n grid-template-columns: min-content 1fr;\n gap: 8px;\n padding: 8px 16px;\n }\n\n svg {\n fill: #6c5ce7;\n }\n\n &:disabled {\n border-color: #bbbec3;\n cursor: not-allowed;\n }\n\n &:disabled svg {\n fill: #bbbec3;\n }\n `,\n \"visual-builder__add-button-label\": css`\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n `,\n \"visual-builder__add-button--loading\": css`\n cursor: wait;\n /* we have not-allowed on disabled, so we need this */\n &:disabled {\n cursor: wait;\n }\n `,\n \"visual-builder__start-editing-btn\": css`\n z-index: 1000;\n text-decoration: none;\n position: fixed;\n box-shadow:\n 0px 4px 15px 0px rgba(108, 92, 231, 0.2),\n 0px 3px 14px 3px rgba(0, 0, 0, 0.12),\n 0px 8px 10px 1px rgba(0, 0, 0, 0.14);\n display: inline-flex;\n padding: 0.5rem 1rem;\n justify-content: center;\n align-items: center;\n gap: 0.5rem;\n\n border-radius: 4px;\n border: 1px solid transparent;\n background: #6c5ce7;\n transition:\n background-color 0.15s ease-in-out,\n border-color 0.15s ease-in-out,\n box-shadow 0.15s ease-in-out,\n -webkit-box-shadow 0.15s ease-in-out;\n\n &:hover {\n background-color: #5d50be;\n }\n &:focus {\n outline: none;\n box-shadow: 0 0 0 2px #ada4f4;\n }\n & > span {\n color: #fff;\n /* Body/P1 Bold */\n font-size: 1rem;\n font-family: Inter;\n font-weight: 600;\n line-height: 150%;\n letter-spacing: 0.01rem;\n text-transform: capitalize;\n }\n\n & > svg {\n color: #fff;\n font-size: 1rem;\n font-family: Inter;\n font-weight: 600;\n line-height: 150%;\n letter-spacing: 0.01rem;\n text-transform: capitalize;\n }\n `,\n \"visual-builder__start-editing-btn__bottom-right\": css`\n bottom: 30px;\n right: 30px;\n `,\n \"visual-builder__start-editing-btn__bottom-left\": css`\n bottom: 30px;\n left: 30px;\n `,\n \"visual-builder__start-editing-btn__top-right\": css`\n top: 30px;\n right: 30px;\n `,\n \"visual-builder__start-editing-btn__top-left\": css`\n top: 30px;\n left: 30px;\n `,\n \"visual-builder__cursor-icon\": css`\n height: 40px;\n width: 40px;\n display: flex;\n align-items: center;\n justify-content: center;\n background: #5d50be;\n border-radius: 50%;\n position: absolute;\n top: 0;\n left: 0;\n `,\n \"visual-builder__cursor-pointer\": css`\n position: absolute;\n top: -8px;\n left: -8px;\n `,\n \"visual-builder__cursor-icon--loader\": css`\n animation: visual-builder__spinner 1s linear infinite;\n `,\n \"visual-builder__focused-toolbar\": css`\n position: absolute;\n transform: translateY(-100%);\n z-index: 100000;\n gap: 8px;\n width: 0;\n display: flex;\n align-items: end;\n transition: var(--outline-transition);\n `,\n \"visual-builder__focused-toolbar__field-label-wrapper__current-field\": css`\n padding: 4px 8px !important;\n background: #6c5ce7;\n color: #fff;\n z-index: 1;\n border-radius: 2px !important;\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: fit-content;\n\n &:disabled {\n filter: contrast(0.7);\n }\n\n .visual-builder__focused-toolbar__text {\n padding-right: 3px;\n height: 16px;\n }\n `,\n \"visual-builder__focused-toolbar__field-label-wrapper__parent-field\": css`\n pointer-events: none;\n color: #5d50be;\n padding: 4px !important;\n margin-bottom: 3px;\n display: none;\n width: fit-content;\n position: absolute;\n z-index: 100000;\n `,\n \"field-label-dropdown-open\": css`\n .visual-builder__focused-toolbar__field-label-wrapper__parent-field {\n pointer-events: all;\n visibility: visible;\n display: initial;\n }\n\n .visual-builder__button--secondary:hover {\n background-color: #6c5ce7;\n color: #f9f8ff;\n }\n `,\n \"visual-builder__focused-toolbar__field-label-wrapper\": css`\n display: flex;\n flex-direction: column-reverse;\n position: relative;\n `,\n \"visual-builder__focused-toolbar__field-label-container\": css`\n display: flex;\n column-gap: 0.5rem;\n align-items: center;\n `,\n \"visual-builder__button\": css`\n background-color: transparent;\n border: 1px solid transparent;\n border-radius: 4px;\n font-size: 16px;\n font-weight: 600;\n line-height: 100%;\n padding: 8px 16px;\n text-align: center;\n z-index: 2147483647 !important;\n transition:\n color 0.15s ease-in-out,\n background-color 0.15s ease-in-out,\n border-color 0.15s ease-in-out,\n box-shadow 0.15s ease-in-out;\n // vertical-align: middle;\n &:disabled {\n cursor: not-allowed;\n svg {\n fill: #999;\n path {\n fill: #999;\n }\n }\n }\n `,\n \"visual-builder__button--primary\": css`\n background-color: #6c5ce7;\n color: #fff;\n\n &:hover {\n background-color: #5d50be;\n }\n `,\n \"visual-builder__button--secondary\": css`\n background-color: #f9f8ff;\n border: 1px solid #6c5ce7;\n color: #6c5ce7;\n `,\n \"visual-builder__button--edit\": css`\n svg {\n height: 16px;\n width: 16px;\n\n path {\n fill: #475161;\n }\n }\n `,\n \"visual-builder__button-loader\": css`\n svg.loader {\n height: 16px;\n width: 16px;\n\n path {\n fill: #ffffff;\n }\n }\n `,\n \"visual-builder__button--comment-loader\": css`\n cursor: wait !important;\n svg.loader {\n height: 16px;\n width: 16px;\n\n path {\n fill: #475161;\n }\n }\n `,\n \"visual-builder__field-icon\": css`\n svg {\n height: 16px;\n width: 16px;\n margin-right: 3px;\n }\n `,\n \"visual-builder__content-type-icon\": css`\n svg {\n height: 16px;\n width: 16px;\n margin-right: 3px;\n }\n `,\n \"visual-builder__caret-right-icon\": css`\n svg {\n height: 16px;\n width: 16px;\n }\n `,\n \"visual-builder__reference-icon-container\": css`\n display: flex;\n align-items: center;\n\n .visual-builder__field-icon {\n svg {\n margin-right: 0px;\n } \n }\n `,\n \"visual-builder__focused-toolbar__button-group\": css`\n display: flex;\n background: #fff;\n border-radius: 2px;\n height: 100%;\n padding: 4px !important;\n z-index: 2147483647 !important;\n\n &:has(.visual-builder__button) {\n padding: 2px;\n gap: 8px;\n }\n\n .visual-builder__button:enabled:hover {\n background-color: #f5f5f5;\n\n svg {\n color: #5d50be;\n }\n }\n\n .visual-builder__button {\n background-color: #fff;\n border-color: transparent;\n color: #475161;\n padding: 4px;\n min-width: 32px;\n min-height: 32px;\n }\n `,\n \"visual-builder__focused-toolbar__text\": css`\n font-family: Inter, \"sans-serif\";\n font-size: 0.75rem;\n font-style: normal;\n font-weight: 400;\n line-height: 150%;\n letter-spacing: 0.015rem;\n max-width: 150px;\n overflow: hidden;\n text-overflow: ellipsis;\n text-wrap: nowrap;\n `,\n \"visual-builder__focused-toolbar__multiple-field-toolbar\": css`\n height: 40px;\n z-index: 2147483647 !important;\n\n svg {\n height: 100%;\n width: 100%;\n }\n `,\n \"visual-builder__rotate--90\": css`\n transform: rotate(90deg);\n `,\n \"visual-builder__focused-toolbar--field-disabled\": css`\n pointer-events: none;\n cursor: not-allowed;\n .visual-builder__focused-toolbar__field-label-wrapper__current-field {\n background: #909090;\n }\n `,\n \"visual-builder__cursor-disabled\": css`\n .visual-builder__cursor-icon {\n background: #909090;\n }\n\n .visual-builder__cursor-pointer path {\n fill: #909090;\n }\n `,\n \"visual-builder__tooltip\": css`\n ${tooltipBaseStyle}\n\n &:before {\n display: none;\n }\n\n &:hover:before,\n &:hover:after {\n display: block;\n z-index: 2147483647 !important;\n }\n\n &:after {\n display: none;\n }\n `,\n \"visual-builder__tooltip--bottom\": css`\n &:before {\n bottom: -66px;\n }\n &:after {\n bottom: -6px;\n transform: rotate(180deg);\n }\n `,\n\n \"visual-builder__tooltip--persistent\": css`\n ${tooltipBaseStyle}\n\n &:before {\n display: block;\n }\n\n &:after {\n display: block;\n }\n `,\n \"visual-builder__empty-block\": css`\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-direction: column;\n gap: 1rem;\n min-height: 100px;\n `,\n \"visual-builder__empty-block-title\": css`\n font-size: 0.95rem;\n font-family: Inter;\n font-weight: 400;\n line-height: 100%;\n color: #647696;\n `,\n \"visual-builder__empty-block-add-button\": css`\n height: 32px;\n border-radius: 4px;\n background: #f9f8ff;\n border-color: #6c5ce7;\n border-width: 1px;\n padding: 8px 16px 8px 16px;\n font-size: 0.9rem;\n font-family: Inter;\n font-weight: 600;\n color: #6c5ce7;\n padding-block: 0px;\n letter-spacing: 0.01rem;\n `,\n \"visual-builder__hover-outline\": css`\n position: absolute;\n outline: 2px dashed #6c5ce7;\n transition: var(--outline-transition);\n z-index: 2147483646 !important;\n `,\n \"visual-builder__hover-outline--hidden\": css`\n visibility: hidden;\n `,\n \"visual-builder__hover-outline--unclickable\": css`\n pointer-events: none;\n `,\n \"visual-builder__hover-outline--disabled\": css`\n outline: 2px dashed #909090;\n `,\n \"visual-builder__default-cursor--disabled\": css`\n cursor: none;\n `,\n \"visual-builder__draft-field\": css`\n outline: 2px dashed #eb5646;\n `,\n \"visual-builder__variant-field\": css`\n outline: 2px solid #bd59fa;\n `,\n \"visual-builder__pseudo-editable-element\": css`\n z-index: 99999 !important;\n `,\n // cslp error styles\n \"visual-builder__button-error\": css`\n background-color: #ffeeeb;\n padding: 0px !important;\n &:hover {\n background-color: #ffeeeb;\n }\n `,\n \"visual-builder__focused-toolbar__error\": css`\n display: flex;\n justify-content: center;\n align-items: center;\n column-gap: 3px;\n padding: 4px 8px;\n `,\n \"visual-builder__focused-toolbar__error-text\": css`\n font-weight: 400;\n font-size: 12px;\n line-height: 18px;\n color: #a31b00;\n `,\n \"visual-builder__focused-toolbar__error-toolip\": css`\n position: absolute;\n width: 400px;\n background-color: red;\n left: 0;\n top: -7px;\n transform: translateY(-100%);\n background-color: #767676;\n border-radius: 4px;\n box-shadow:\n 0px 1px 10px 0px #6c5ce733,\n 0px 5px 5px 0px #0000001f,\n 0px 2px 4px 0px #00000024;\n padding: 12px;\n text-align: left;\n\n &:before {\n content: \"\";\n position: absolute;\n bottom: -3px;\n left: 4%;\n transform: translateX(-50%) rotate(45deg);\n width: 10px;\n height: 10px;\n background-color: #767676;\n }\n\n > p {\n margin: 0;\n color: #ffffff;\n font-size: 14px;\n font-weight: 600;\n line-height: 21px;\n margin-bottom: 4px;\n }\n\n > span {\n color: #ffffff;\n font-size: 12px;\n font-weight: 400;\n line-height: 18px;\n }\n `,\n \"variant-field-revert-component\": css`\n position: relative;\n display: inline-block;\n z-index: 2147483647 !important;\n `,\n \"variant-field-revert-component__dropdown-content\": css`\n position: absolute;\n top: -12px;\n left: -4px;\n background-color: #ffffff;\n min-width: max-content;\n box-shadow:\n 0 4px 15px 0 rgba(108, 92, 231, 0.2),\n 0 3px 14px 3px rgba(0, 0, 0, 0.12),\n 0 8px 10px 1px rgba(0, 0, 0, 0.14);\n z-index: 2147483647 !important;\n margin-top: 4px;\n padding: 4px 0px;\n border-radius: 2px;\n `,\n \"variant-field-revert-component__dropdown-content__list-item\": css`\n color: black;\n font-weight: 400;\n padding: 9.6px 16px;\n text-decoration: none;\n display: block;\n font-size: 0.75rem;\n height: 32px;\n line-height: 2rem;\n display: flex;\n align-items: center;\n z-index: 2147483647 !important;\n cursor: pointer;\n &:hover {\n background-color: #f1f1f1;\n }\n &:hover > span {\n color: #5d50be;\n }\n & > span {\n margin-top: 4px;\n margin-bottom: 4px;\n }\n `,\n \"visual-builder__no-cursor-style\": css`\n cursor: none !important;\n `,\n \"visual-builder__field-toolbar-container\": css`\n display: flex;\n flex-direction: column-reverse;\n z-index: 2147483647 !important;\n `,\n \"visual-builder__variant-button\": css`\n display: flex;\n min-width: 3rem !important;\n gap: 0.25rem;\n align-items: center;\n justify-content: center;\n display: flex;\n & svg path {\n fill: #475161;\n }\n `,\n };\n}\n\nexport const VisualBuilderGlobalStyles = `\n @import url(\"https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap\");\n\n [data-cslp] [contenteditable=\"true\"] {\n outline: none;\n }\n\n @keyframes visual-builder__spinner {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n }\n\n`;\n"],"mappings":";;;AAAA,SAAS,WAAW;AAEpB,IAAM,mBAAmB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAiClB,SAAS,sBAAsB;AAClC,SAAO;AAAA,IACH,6BAA6B;AAAA;AAAA;AAAA;AAAA,IAI7B,0BAA0B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAyB1B,qBAAqB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAarB,iBAAiB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOjB,2BAA2B;AAAA;AAAA;AAAA;AAAA;AAAA,IAK3B,gCAAgC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAiBhC,oCAAoC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAepC,oCAAoC;AAAA;AAAA;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AA2C;AAAA;AAAA;AAAA;AAAA,IAI3C,gCAAgC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOhC,0CAA0C;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAO1C,+CAA+C;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAM/C,iDAAiD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IA2CjD,kCAAkC;AAAA;AAAA;AAAA;AAAA;AAAA,IAKlC,oDAAoD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAepD,+DAA+D;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAwB/D,mCAAmC;AAAA;AAAA;AAAA,IAGnC,2CAA2C;AAAA;AAAA;AAAA;AAAA;AAAA,IAK3C,kCAAkC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAWtC;AACJ;AAEO,IAAM,4BAA4B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;","names":[]}
|
package/dist/modern/light-sdk.js
CHANGED
|
@@ -86,7 +86,7 @@ function sendInitializeLivePreviewPostMessageEvent() {
|
|
|
86
86
|
config: {
|
|
87
87
|
shouldReload: import_configManager.default.get().ssr,
|
|
88
88
|
href: window.location.href,
|
|
89
|
-
sdkVersion: "3.
|
|
89
|
+
sdkVersion: "3.3.0",
|
|
90
90
|
mode: import_configManager.default.get().mode
|
|
91
91
|
}
|
|
92
92
|
}
|
|
@@ -59,8 +59,12 @@ var LivePreview = class {
|
|
|
59
59
|
);
|
|
60
60
|
}
|
|
61
61
|
if (config.enable) {
|
|
62
|
-
if (typeof document !== void 0
|
|
63
|
-
|
|
62
|
+
if (typeof document !== void 0) {
|
|
63
|
+
if (document.readyState === "interactive" || document.readyState === "complete") {
|
|
64
|
+
this.requestDataSync();
|
|
65
|
+
} else {
|
|
66
|
+
document.addEventListener("DOMContentLoaded", this.requestDataSync);
|
|
67
|
+
}
|
|
64
68
|
} else {
|
|
65
69
|
window.addEventListener("load", this.requestDataSync);
|
|
66
70
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/livePreview/live-preview.ts"],"sourcesContent":["import Config from \"../configManager/configManager\";\nimport { PublicLogger } from \"../logger/logger\";\nimport { ILivePreviewModeConfig } from \"../types/types\";\nimport { addLivePreviewQueryTags, isOpeningInTimeline } from \"../utils\";\nimport { LivePreviewEditButton } from \"./editButton/editButton\";\nimport { sendInitializeLivePreviewPostMessageEvent } from \"./eventManager/postMessageEvent.hooks\";\nimport { removeDataCslp } from \"./livePreviewProductionCleanup\";\nimport { removeFromOnChangeSubscribers } from \"./removeFromOnChangeSubscribers\";\nimport {\n OnEntryChangeCallback,\n OnEntryChangeCallbackSubscribers,\n OnEntryChangeCallbackUID,\n OnEntryChangeUnsubscribeParameters,\n} from \"./types/onEntryChangeCallback.type\";\n\nexport default class LivePreview {\n /**\n * @hideconstructor\n */\n\n private subscribers: OnEntryChangeCallbackSubscribers = {};\n\n constructor() {\n this.requestDataSync = this.requestDataSync.bind(this);\n this.subscribeToOnEntryChange =\n this.subscribeToOnEntryChange.bind(this);\n this.publish = this.publish.bind(this);\n this.unsubscribeOnEntryChange =\n this.unsubscribeOnEntryChange.bind(this);\n\n const config = Config.get();\n\n if (config.debug) {\n PublicLogger.debug(\n \"Contentstack Live Preview Debugging mode: config --\",\n Config.config\n );\n }\n\n if (config.enable) {\n if (\n typeof document !== undefined
|
|
1
|
+
{"version":3,"sources":["../../../src/livePreview/live-preview.ts"],"sourcesContent":["import Config from \"../configManager/configManager\";\nimport { PublicLogger } from \"../logger/logger\";\nimport { ILivePreviewModeConfig } from \"../types/types\";\nimport { addLivePreviewQueryTags, isOpeningInTimeline } from \"../utils\";\nimport { LivePreviewEditButton } from \"./editButton/editButton\";\nimport { sendInitializeLivePreviewPostMessageEvent } from \"./eventManager/postMessageEvent.hooks\";\nimport { removeDataCslp } from \"./livePreviewProductionCleanup\";\nimport { removeFromOnChangeSubscribers } from \"./removeFromOnChangeSubscribers\";\nimport {\n OnEntryChangeCallback,\n OnEntryChangeCallbackSubscribers,\n OnEntryChangeCallbackUID,\n OnEntryChangeUnsubscribeParameters,\n} from \"./types/onEntryChangeCallback.type\";\n\nexport default class LivePreview {\n /**\n * @hideconstructor\n */\n\n private subscribers: OnEntryChangeCallbackSubscribers = {};\n\n constructor() {\n this.requestDataSync = this.requestDataSync.bind(this);\n this.subscribeToOnEntryChange =\n this.subscribeToOnEntryChange.bind(this);\n this.publish = this.publish.bind(this);\n this.unsubscribeOnEntryChange =\n this.unsubscribeOnEntryChange.bind(this);\n\n const config = Config.get();\n\n if (config.debug) {\n PublicLogger.debug(\n \"Contentstack Live Preview Debugging mode: config --\",\n Config.config\n );\n }\n\n if (config.enable) {\n if (\n typeof document !== undefined\n ) {\n if(document.readyState === \"interactive\" || document.readyState === \"complete\"){\n this.requestDataSync();\n } else {\n document.addEventListener(\"DOMContentLoaded\", this.requestDataSync);\n }\n } else {\n window.addEventListener(\"load\", this.requestDataSync);\n }\n\n // TODO: capetown: add test cases for this condition.\n // TODO: mjrf: Check if we need the second condition here.\n // We are already handling the functions separately in the visual builder.\n // render the hover outline only when edit button enable\n\n if (\n !isOpeningInTimeline() && \n (config.editButton.enable ||\n config.mode >= ILivePreviewModeConfig.BUILDER)\n ) {\n LivePreviewEditButton.livePreviewEditButton =\n new LivePreviewEditButton();\n }\n\n } else if (config.cleanCslpOnProduction) {\n removeDataCslp();\n }\n }\n\n // Request parent for data sync when document loads\n private requestDataSync() {\n const config = Config.get();\n\n Config.set(\"onChange\", this.publish);\n\n //! TODO: we replaced the handleOnChange() with this.\n //! I don't think we need this. Confirm and remove it.\n config.onChange();\n\n sendInitializeLivePreviewPostMessageEvent();\n }\n\n subscribeToOnEntryChange(\n callback: OnEntryChangeCallback,\n callbackUid: OnEntryChangeCallbackUID\n ): string {\n this.subscribers[callbackUid] = callback;\n return callbackUid;\n }\n\n private publish(): void {\n Object.values<OnEntryChangeCallback>(this.subscribers).forEach(\n (func) => {\n func();\n }\n );\n }\n\n unsubscribeOnEntryChange(\n callback: OnEntryChangeUnsubscribeParameters\n ): void {\n removeFromOnChangeSubscribers(this.subscribers, callback);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,2BAAmB;AACnB,oBAA6B;AAC7B,mBAAuC;AACvC,mBAA6D;AAC7D,wBAAsC;AACtC,8BAA0D;AAC1D,0CAA+B;AAC/B,2CAA8C;AAQ9C,IAAqB,cAArB,MAAiC;AAAA,EAO7B,cAAc;AAFd;AAAA;AAAA;AAAA,SAAQ,cAAgD,CAAC;AAGrD,SAAK,kBAAkB,KAAK,gBAAgB,KAAK,IAAI;AACrD,SAAK,2BACD,KAAK,yBAAyB,KAAK,IAAI;AAC3C,SAAK,UAAU,KAAK,QAAQ,KAAK,IAAI;AACrC,SAAK,2BACD,KAAK,yBAAyB,KAAK,IAAI;AAE3C,UAAM,SAAS,qBAAAA,QAAO,IAAI;AAE1B,QAAI,OAAO,OAAO;AACd,iCAAa;AAAA,QACT;AAAA,QACA,qBAAAA,QAAO;AAAA,MACX;AAAA,IACJ;AAEA,QAAI,OAAO,QAAQ;AACf,UACI,OAAO,aAAa,QACtB;AACE,YAAG,SAAS,eAAe,iBAAiB,SAAS,eAAe,YAAW;AAC3E,eAAK,gBAAgB;AAAA,QACzB,OAAO;AACH,mBAAS,iBAAiB,oBAAoB,KAAK,eAAe;AAAA,QACtE;AAAA,MACJ,OAAO;AACH,eAAO,iBAAiB,QAAQ,KAAK,eAAe;AAAA,MACxD;AAOA,UACI,KAAC,kCAAoB,MACpB,OAAO,WAAW,UACnB,OAAO,QAAQ,oCAAuB,UACxC;AACE,gDAAsB,wBAClB,IAAI,wCAAsB;AAAA,MAClC;AAAA,IAEJ,WAAW,OAAO,uBAAuB;AACrC,8DAAe;AAAA,IACnB;AAAA,EACJ;AAAA;AAAA,EAGQ,kBAAkB;AACtB,UAAM,SAAS,qBAAAA,QAAO,IAAI;AAE1B,yBAAAA,QAAO,IAAI,YAAY,KAAK,OAAO;AAInC,WAAO,SAAS;AAEhB,2EAA0C;AAAA,EAC9C;AAAA,EAEA,yBACI,UACA,aACM;AACN,SAAK,YAAY,WAAW,IAAI;AAChC,WAAO;AAAA,EACX;AAAA,EAEQ,UAAgB;AACpB,WAAO,OAA8B,KAAK,WAAW,EAAE;AAAA,MACnD,CAAC,SAAS;AACN,aAAK;AAAA,MACT;AAAA,IACJ;AAAA,EACJ;AAAA,EAEA,yBACI,UACI;AACJ,4EAA8B,KAAK,aAAa,QAAQ;AAAA,EAC5D;AACJ;","names":["Config"]}
|
|
@@ -27,8 +27,12 @@ var LivePreview = class {
|
|
|
27
27
|
);
|
|
28
28
|
}
|
|
29
29
|
if (config.enable) {
|
|
30
|
-
if (typeof document !== void 0
|
|
31
|
-
|
|
30
|
+
if (typeof document !== void 0) {
|
|
31
|
+
if (document.readyState === "interactive" || document.readyState === "complete") {
|
|
32
|
+
this.requestDataSync();
|
|
33
|
+
} else {
|
|
34
|
+
document.addEventListener("DOMContentLoaded", this.requestDataSync);
|
|
35
|
+
}
|
|
32
36
|
} else {
|
|
33
37
|
window.addEventListener("load", this.requestDataSync);
|
|
34
38
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/livePreview/live-preview.ts"],"sourcesContent":["import Config from \"../configManager/configManager\";\nimport { PublicLogger } from \"../logger/logger\";\nimport { ILivePreviewModeConfig } from \"../types/types\";\nimport { addLivePreviewQueryTags, isOpeningInTimeline } from \"../utils\";\nimport { LivePreviewEditButton } from \"./editButton/editButton\";\nimport { sendInitializeLivePreviewPostMessageEvent } from \"./eventManager/postMessageEvent.hooks\";\nimport { removeDataCslp } from \"./livePreviewProductionCleanup\";\nimport { removeFromOnChangeSubscribers } from \"./removeFromOnChangeSubscribers\";\nimport {\n OnEntryChangeCallback,\n OnEntryChangeCallbackSubscribers,\n OnEntryChangeCallbackUID,\n OnEntryChangeUnsubscribeParameters,\n} from \"./types/onEntryChangeCallback.type\";\n\nexport default class LivePreview {\n /**\n * @hideconstructor\n */\n\n private subscribers: OnEntryChangeCallbackSubscribers = {};\n\n constructor() {\n this.requestDataSync = this.requestDataSync.bind(this);\n this.subscribeToOnEntryChange =\n this.subscribeToOnEntryChange.bind(this);\n this.publish = this.publish.bind(this);\n this.unsubscribeOnEntryChange =\n this.unsubscribeOnEntryChange.bind(this);\n\n const config = Config.get();\n\n if (config.debug) {\n PublicLogger.debug(\n \"Contentstack Live Preview Debugging mode: config --\",\n Config.config\n );\n }\n\n if (config.enable) {\n if (\n typeof document !== undefined
|
|
1
|
+
{"version":3,"sources":["../../../src/livePreview/live-preview.ts"],"sourcesContent":["import Config from \"../configManager/configManager\";\nimport { PublicLogger } from \"../logger/logger\";\nimport { ILivePreviewModeConfig } from \"../types/types\";\nimport { addLivePreviewQueryTags, isOpeningInTimeline } from \"../utils\";\nimport { LivePreviewEditButton } from \"./editButton/editButton\";\nimport { sendInitializeLivePreviewPostMessageEvent } from \"./eventManager/postMessageEvent.hooks\";\nimport { removeDataCslp } from \"./livePreviewProductionCleanup\";\nimport { removeFromOnChangeSubscribers } from \"./removeFromOnChangeSubscribers\";\nimport {\n OnEntryChangeCallback,\n OnEntryChangeCallbackSubscribers,\n OnEntryChangeCallbackUID,\n OnEntryChangeUnsubscribeParameters,\n} from \"./types/onEntryChangeCallback.type\";\n\nexport default class LivePreview {\n /**\n * @hideconstructor\n */\n\n private subscribers: OnEntryChangeCallbackSubscribers = {};\n\n constructor() {\n this.requestDataSync = this.requestDataSync.bind(this);\n this.subscribeToOnEntryChange =\n this.subscribeToOnEntryChange.bind(this);\n this.publish = this.publish.bind(this);\n this.unsubscribeOnEntryChange =\n this.unsubscribeOnEntryChange.bind(this);\n\n const config = Config.get();\n\n if (config.debug) {\n PublicLogger.debug(\n \"Contentstack Live Preview Debugging mode: config --\",\n Config.config\n );\n }\n\n if (config.enable) {\n if (\n typeof document !== undefined\n ) {\n if(document.readyState === \"interactive\" || document.readyState === \"complete\"){\n this.requestDataSync();\n } else {\n document.addEventListener(\"DOMContentLoaded\", this.requestDataSync);\n }\n } else {\n window.addEventListener(\"load\", this.requestDataSync);\n }\n\n // TODO: capetown: add test cases for this condition.\n // TODO: mjrf: Check if we need the second condition here.\n // We are already handling the functions separately in the visual builder.\n // render the hover outline only when edit button enable\n\n if (\n !isOpeningInTimeline() && \n (config.editButton.enable ||\n config.mode >= ILivePreviewModeConfig.BUILDER)\n ) {\n LivePreviewEditButton.livePreviewEditButton =\n new LivePreviewEditButton();\n }\n\n } else if (config.cleanCslpOnProduction) {\n removeDataCslp();\n }\n }\n\n // Request parent for data sync when document loads\n private requestDataSync() {\n const config = Config.get();\n\n Config.set(\"onChange\", this.publish);\n\n //! TODO: we replaced the handleOnChange() with this.\n //! I don't think we need this. Confirm and remove it.\n config.onChange();\n\n sendInitializeLivePreviewPostMessageEvent();\n }\n\n subscribeToOnEntryChange(\n callback: OnEntryChangeCallback,\n callbackUid: OnEntryChangeCallbackUID\n ): string {\n this.subscribers[callbackUid] = callback;\n return callbackUid;\n }\n\n private publish(): void {\n Object.values<OnEntryChangeCallback>(this.subscribers).forEach(\n (func) => {\n func();\n }\n );\n }\n\n unsubscribeOnEntryChange(\n callback: OnEntryChangeUnsubscribeParameters\n ): void {\n removeFromOnChangeSubscribers(this.subscribers, callback);\n }\n}\n"],"mappings":";;;AAAA,OAAO,YAAY;AACnB,SAAS,oBAAoB;AAC7B,SAAS,8BAA8B;AACvC,SAAkC,2BAA2B;AAC7D,SAAS,6BAA6B;AACtC,SAAS,iDAAiD;AAC1D,SAAS,sBAAsB;AAC/B,SAAS,qCAAqC;AAQ9C,IAAqB,cAArB,MAAiC;AAAA,EAO7B,cAAc;AAFd;AAAA;AAAA;AAAA,SAAQ,cAAgD,CAAC;AAGrD,SAAK,kBAAkB,KAAK,gBAAgB,KAAK,IAAI;AACrD,SAAK,2BACD,KAAK,yBAAyB,KAAK,IAAI;AAC3C,SAAK,UAAU,KAAK,QAAQ,KAAK,IAAI;AACrC,SAAK,2BACD,KAAK,yBAAyB,KAAK,IAAI;AAE3C,UAAM,SAAS,OAAO,IAAI;AAE1B,QAAI,OAAO,OAAO;AACd,mBAAa;AAAA,QACT;AAAA,QACA,OAAO;AAAA,MACX;AAAA,IACJ;AAEA,QAAI,OAAO,QAAQ;AACf,UACI,OAAO,aAAa,QACtB;AACE,YAAG,SAAS,eAAe,iBAAiB,SAAS,eAAe,YAAW;AAC3E,eAAK,gBAAgB;AAAA,QACzB,OAAO;AACH,mBAAS,iBAAiB,oBAAoB,KAAK,eAAe;AAAA,QACtE;AAAA,MACJ,OAAO;AACH,eAAO,iBAAiB,QAAQ,KAAK,eAAe;AAAA,MACxD;AAOA,UACI,CAAC,oBAAoB,MACpB,OAAO,WAAW,UACnB,OAAO,QAAQ,uBAAuB,UACxC;AACE,8BAAsB,wBAClB,IAAI,sBAAsB;AAAA,MAClC;AAAA,IAEJ,WAAW,OAAO,uBAAuB;AACrC,qBAAe;AAAA,IACnB;AAAA,EACJ;AAAA;AAAA,EAGQ,kBAAkB;AACtB,UAAM,SAAS,OAAO,IAAI;AAE1B,WAAO,IAAI,YAAY,KAAK,OAAO;AAInC,WAAO,SAAS;AAEhB,8CAA0C;AAAA,EAC9C;AAAA,EAEA,yBACI,UACA,aACM;AACN,SAAK,YAAY,WAAW,IAAI;AAChC,WAAO;AAAA,EACX;AAAA,EAEQ,UAAgB;AACpB,WAAO,OAA8B,KAAK,WAAW,EAAE;AAAA,MACnD,CAAC,SAAS;AACN,aAAK;AAAA,MACT;AAAA,IACJ;AAAA,EACJ;AAAA,EAEA,yBACI,UACI;AACJ,kCAA8B,KAAK,aAAa,QAAQ;AAAA,EAC5D;AACJ;","names":[]}
|
|
@@ -227,7 +227,7 @@ var _ContentstackLivePreview = class _ContentstackLivePreview {
|
|
|
227
227
|
* @returns The version of the SDK as a string.
|
|
228
228
|
*/
|
|
229
229
|
static getSdkVersion() {
|
|
230
|
-
return "3.
|
|
230
|
+
return "3.3.0";
|
|
231
231
|
}
|
|
232
232
|
};
|
|
233
233
|
_ContentstackLivePreview.previewConstructors = {};
|
|
@@ -195,7 +195,7 @@ var _ContentstackLivePreview = class _ContentstackLivePreview {
|
|
|
195
195
|
* @returns The version of the SDK as a string.
|
|
196
196
|
*/
|
|
197
197
|
static getSdkVersion() {
|
|
198
|
-
return "3.
|
|
198
|
+
return "3.3.0";
|
|
199
199
|
}
|
|
200
200
|
};
|
|
201
201
|
_ContentstackLivePreview.previewConstructors = {};
|
|
@@ -23,6 +23,7 @@ __export(utils_exports, {
|
|
|
23
23
|
addLivePreviewQueryTags: () => import_addLivePreviewQueryTags.addLivePreviewQueryTags,
|
|
24
24
|
addParamsToUrl: () => addParamsToUrl,
|
|
25
25
|
hasWindow: () => hasWindow,
|
|
26
|
+
isOpenInBuilder: () => isOpenInBuilder,
|
|
26
27
|
isOpeningInTimeline: () => isOpeningInTimeline
|
|
27
28
|
});
|
|
28
29
|
module.exports = __toCommonJS(utils_exports);
|
|
@@ -49,11 +50,20 @@ function isOpeningInTimeline() {
|
|
|
49
50
|
}
|
|
50
51
|
return false;
|
|
51
52
|
}
|
|
53
|
+
function isOpenInBuilder() {
|
|
54
|
+
if (hasWindow()) {
|
|
55
|
+
const urlParams = new URLSearchParams(window.location.search);
|
|
56
|
+
const builder = urlParams.get("builder");
|
|
57
|
+
return !!builder;
|
|
58
|
+
}
|
|
59
|
+
return false;
|
|
60
|
+
}
|
|
52
61
|
// Annotate the CommonJS export names for ESM import in node:
|
|
53
62
|
0 && (module.exports = {
|
|
54
63
|
addLivePreviewQueryTags,
|
|
55
64
|
addParamsToUrl,
|
|
56
65
|
hasWindow,
|
|
66
|
+
isOpenInBuilder,
|
|
57
67
|
isOpeningInTimeline
|
|
58
68
|
});
|
|
59
69
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/utils/index.ts"],"sourcesContent":["import { PublicLogger } from \"../logger/logger\";\nimport { addLivePreviewQueryTags } from \"./addLivePreviewQueryTags\";\nexport function hasWindow(): boolean {\n return typeof window !== \"undefined\";\n}\nexport { addLivePreviewQueryTags };\nexport function addParamsToUrl() {\n // Setting the query params to all the click events related to current domain\n window.addEventListener(\"click\", (event: any) => {\n const target: any = event.target;\n const targetHref: string | any = target.href;\n const docOrigin: string = document.location.origin;\n if (\n targetHref &&\n targetHref.includes(docOrigin) &&\n !targetHref.includes(\"live_preview\")\n ) {\n const newUrl = addLivePreviewQueryTags(target.href);\n event.target.href = newUrl || target.href;\n }\n });\n}\nexport function isOpeningInTimeline(): boolean {\n if (hasWindow()) {\n const urlParams = new URLSearchParams(window.location.search);\n const previewTimestamp = urlParams.get(\"preview_timestamp\");\n return !!previewTimestamp;\n }\n return false;\n}"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,qCAAwC;AACjC,SAAS,YAAqB;AACjC,SAAO,OAAO,WAAW;AAC7B;AAEO,SAAS,iBAAiB;AAE7B,SAAO,iBAAiB,SAAS,CAAC,UAAe;AAC7C,UAAM,SAAc,MAAM;AAC1B,UAAM,aAA2B,OAAO;AACxC,UAAM,YAAoB,SAAS,SAAS;AAC5C,QACI,cACA,WAAW,SAAS,SAAS,KAC7B,CAAC,WAAW,SAAS,cAAc,GACrC;AACE,YAAM,aAAS,wDAAwB,OAAO,IAAI;AAClD,YAAM,OAAO,OAAO,UAAU,OAAO;AAAA,IACzC;AAAA,EACJ,CAAC;AACL;AACO,SAAS,sBAA+B;AAC3C,MAAI,UAAU,GAAG;AACb,UAAM,YAAY,IAAI,gBAAgB,OAAO,SAAS,MAAM;AAC5D,UAAM,mBAAmB,UAAU,IAAI,mBAAmB;AAC1D,WAAO,CAAC,CAAC;AAAA,EACb;AACA,SAAO;AACX;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../../src/utils/index.ts"],"sourcesContent":["import { PublicLogger } from \"../logger/logger\";\nimport { addLivePreviewQueryTags } from \"./addLivePreviewQueryTags\";\nexport function hasWindow(): boolean {\n return typeof window !== \"undefined\";\n}\nexport { addLivePreviewQueryTags };\nexport function addParamsToUrl() {\n // Setting the query params to all the click events related to current domain\n window.addEventListener(\"click\", (event: any) => {\n const target: any = event.target;\n const targetHref: string | any = target.href;\n const docOrigin: string = document.location.origin;\n if (\n targetHref &&\n targetHref.includes(docOrigin) &&\n !targetHref.includes(\"live_preview\")\n ) {\n const newUrl = addLivePreviewQueryTags(target.href);\n event.target.href = newUrl || target.href;\n }\n });\n}\nexport function isOpeningInTimeline(): boolean {\n if (hasWindow()) {\n const urlParams = new URLSearchParams(window.location.search);\n const previewTimestamp = urlParams.get(\"preview_timestamp\");\n return !!previewTimestamp;\n }\n return false;\n}\n\nexport function isOpenInBuilder(): boolean {\n if (hasWindow()) {\n const urlParams = new URLSearchParams(window.location.search);\n const builder = urlParams.get(\"builder\");\n return !!builder;\n }\n return false;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,qCAAwC;AACjC,SAAS,YAAqB;AACjC,SAAO,OAAO,WAAW;AAC7B;AAEO,SAAS,iBAAiB;AAE7B,SAAO,iBAAiB,SAAS,CAAC,UAAe;AAC7C,UAAM,SAAc,MAAM;AAC1B,UAAM,aAA2B,OAAO;AACxC,UAAM,YAAoB,SAAS,SAAS;AAC5C,QACI,cACA,WAAW,SAAS,SAAS,KAC7B,CAAC,WAAW,SAAS,cAAc,GACrC;AACE,YAAM,aAAS,wDAAwB,OAAO,IAAI;AAClD,YAAM,OAAO,OAAO,UAAU,OAAO;AAAA,IACzC;AAAA,EACJ,CAAC;AACL;AACO,SAAS,sBAA+B;AAC3C,MAAI,UAAU,GAAG;AACb,UAAM,YAAY,IAAI,gBAAgB,OAAO,SAAS,MAAM;AAC5D,UAAM,mBAAmB,UAAU,IAAI,mBAAmB;AAC1D,WAAO,CAAC,CAAC;AAAA,EACb;AACA,SAAO;AACX;AAEO,SAAS,kBAA2B;AACvC,MAAI,UAAU,GAAG;AACb,UAAM,YAAY,IAAI,gBAAgB,OAAO,SAAS,MAAM;AAC5D,UAAM,UAAU,UAAU,IAAI,SAAS;AACvC,WAAO,CAAC,CAAC;AAAA,EACb;AACA,SAAO;AACX;","names":[]}
|
|
@@ -4,5 +4,6 @@ declare function hasWindow(): boolean;
|
|
|
4
4
|
|
|
5
5
|
declare function addParamsToUrl(): void;
|
|
6
6
|
declare function isOpeningInTimeline(): boolean;
|
|
7
|
+
declare function isOpenInBuilder(): boolean;
|
|
7
8
|
|
|
8
|
-
export { addParamsToUrl, hasWindow, isOpeningInTimeline };
|
|
9
|
+
export { addParamsToUrl, hasWindow, isOpenInBuilder, isOpeningInTimeline };
|
|
@@ -4,5 +4,6 @@ declare function hasWindow(): boolean;
|
|
|
4
4
|
|
|
5
5
|
declare function addParamsToUrl(): void;
|
|
6
6
|
declare function isOpeningInTimeline(): boolean;
|
|
7
|
+
declare function isOpenInBuilder(): boolean;
|
|
7
8
|
|
|
8
|
-
export { addParamsToUrl, hasWindow, isOpeningInTimeline };
|
|
9
|
+
export { addParamsToUrl, hasWindow, isOpenInBuilder, isOpeningInTimeline };
|
|
@@ -24,10 +24,19 @@ function isOpeningInTimeline() {
|
|
|
24
24
|
}
|
|
25
25
|
return false;
|
|
26
26
|
}
|
|
27
|
+
function isOpenInBuilder() {
|
|
28
|
+
if (hasWindow()) {
|
|
29
|
+
const urlParams = new URLSearchParams(window.location.search);
|
|
30
|
+
const builder = urlParams.get("builder");
|
|
31
|
+
return !!builder;
|
|
32
|
+
}
|
|
33
|
+
return false;
|
|
34
|
+
}
|
|
27
35
|
export {
|
|
28
36
|
addLivePreviewQueryTags,
|
|
29
37
|
addParamsToUrl,
|
|
30
38
|
hasWindow,
|
|
39
|
+
isOpenInBuilder,
|
|
31
40
|
isOpeningInTimeline
|
|
32
41
|
};
|
|
33
42
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/utils/index.ts"],"sourcesContent":["import { PublicLogger } from \"../logger/logger\";\nimport { addLivePreviewQueryTags } from \"./addLivePreviewQueryTags\";\nexport function hasWindow(): boolean {\n return typeof window !== \"undefined\";\n}\nexport { addLivePreviewQueryTags };\nexport function addParamsToUrl() {\n // Setting the query params to all the click events related to current domain\n window.addEventListener(\"click\", (event: any) => {\n const target: any = event.target;\n const targetHref: string | any = target.href;\n const docOrigin: string = document.location.origin;\n if (\n targetHref &&\n targetHref.includes(docOrigin) &&\n !targetHref.includes(\"live_preview\")\n ) {\n const newUrl = addLivePreviewQueryTags(target.href);\n event.target.href = newUrl || target.href;\n }\n });\n}\nexport function isOpeningInTimeline(): boolean {\n if (hasWindow()) {\n const urlParams = new URLSearchParams(window.location.search);\n const previewTimestamp = urlParams.get(\"preview_timestamp\");\n return !!previewTimestamp;\n }\n return false;\n}"],"mappings":";;;AACA,SAAS,+BAA+B;AACjC,SAAS,YAAqB;AACjC,SAAO,OAAO,WAAW;AAC7B;AAEO,SAAS,iBAAiB;AAE7B,SAAO,iBAAiB,SAAS,CAAC,UAAe;AAC7C,UAAM,SAAc,MAAM;AAC1B,UAAM,aAA2B,OAAO;AACxC,UAAM,YAAoB,SAAS,SAAS;AAC5C,QACI,cACA,WAAW,SAAS,SAAS,KAC7B,CAAC,WAAW,SAAS,cAAc,GACrC;AACE,YAAM,SAAS,wBAAwB,OAAO,IAAI;AAClD,YAAM,OAAO,OAAO,UAAU,OAAO;AAAA,IACzC;AAAA,EACJ,CAAC;AACL;AACO,SAAS,sBAA+B;AAC3C,MAAI,UAAU,GAAG;AACb,UAAM,YAAY,IAAI,gBAAgB,OAAO,SAAS,MAAM;AAC5D,UAAM,mBAAmB,UAAU,IAAI,mBAAmB;AAC1D,WAAO,CAAC,CAAC;AAAA,EACb;AACA,SAAO;AACX;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../../src/utils/index.ts"],"sourcesContent":["import { PublicLogger } from \"../logger/logger\";\nimport { addLivePreviewQueryTags } from \"./addLivePreviewQueryTags\";\nexport function hasWindow(): boolean {\n return typeof window !== \"undefined\";\n}\nexport { addLivePreviewQueryTags };\nexport function addParamsToUrl() {\n // Setting the query params to all the click events related to current domain\n window.addEventListener(\"click\", (event: any) => {\n const target: any = event.target;\n const targetHref: string | any = target.href;\n const docOrigin: string = document.location.origin;\n if (\n targetHref &&\n targetHref.includes(docOrigin) &&\n !targetHref.includes(\"live_preview\")\n ) {\n const newUrl = addLivePreviewQueryTags(target.href);\n event.target.href = newUrl || target.href;\n }\n });\n}\nexport function isOpeningInTimeline(): boolean {\n if (hasWindow()) {\n const urlParams = new URLSearchParams(window.location.search);\n const previewTimestamp = urlParams.get(\"preview_timestamp\");\n return !!previewTimestamp;\n }\n return false;\n}\n\nexport function isOpenInBuilder(): boolean {\n if (hasWindow()) {\n const urlParams = new URLSearchParams(window.location.search);\n const builder = urlParams.get(\"builder\");\n return !!builder;\n }\n return false;\n}\n"],"mappings":";;;AACA,SAAS,+BAA+B;AACjC,SAAS,YAAqB;AACjC,SAAO,OAAO,WAAW;AAC7B;AAEO,SAAS,iBAAiB;AAE7B,SAAO,iBAAiB,SAAS,CAAC,UAAe;AAC7C,UAAM,SAAc,MAAM;AAC1B,UAAM,aAA2B,OAAO;AACxC,UAAM,YAAoB,SAAS,SAAS;AAC5C,QACI,cACA,WAAW,SAAS,SAAS,KAC7B,CAAC,WAAW,SAAS,cAAc,GACrC;AACE,YAAM,SAAS,wBAAwB,OAAO,IAAI;AAClD,YAAM,OAAO,OAAO,UAAU,OAAO;AAAA,IACzC;AAAA,EACJ,CAAC;AACL;AACO,SAAS,sBAA+B;AAC3C,MAAI,UAAU,GAAG;AACb,UAAM,YAAY,IAAI,gBAAgB,OAAO,SAAS,MAAM;AAC5D,UAAM,mBAAmB,UAAU,IAAI,mBAAmB;AAC1D,WAAO,CAAC,CAAC;AAAA,EACb;AACA,SAAO;AACX;AAEO,SAAS,kBAA2B;AACvC,MAAI,UAAU,GAAG;AACb,UAAM,YAAY,IAAI,gBAAgB,OAAO,SAAS,MAAM;AAC5D,UAAM,UAAU,UAAU,IAAI,SAAS;AACvC,WAAO,CAAC,CAAC;AAAA,EACb;AACA,SAAO;AACX;","names":[]}
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
|
|
30
|
+
// src/visualBuilder/components/Tooltip.tsx
|
|
31
|
+
var Tooltip_exports = {};
|
|
32
|
+
__export(Tooltip_exports, {
|
|
33
|
+
ToolbarTooltip: () => ToolbarTooltip,
|
|
34
|
+
default: () => Tooltip_default
|
|
35
|
+
});
|
|
36
|
+
module.exports = __toCommonJS(Tooltip_exports);
|
|
37
|
+
var import_preact = require("preact");
|
|
38
|
+
var import_hooks = require("preact/hooks");
|
|
39
|
+
var import_dom = require("@floating-ui/dom");
|
|
40
|
+
var import_visualBuilder = require("../visualBuilder.style.cjs");
|
|
41
|
+
var import_classnames = __toESM(require("classnames"), 1);
|
|
42
|
+
var import_icons = require("./icons/index.cjs");
|
|
43
|
+
var import_generateCustomCursor = require("../generators/generateCustomCursor.cjs");
|
|
44
|
+
var import_jsx_runtime = require("preact/jsx-runtime");
|
|
45
|
+
var Tooltip = ({ children, content, placement = "top-start" }) => {
|
|
46
|
+
const [isVisible, setIsVisible] = (0, import_hooks.useState)(false);
|
|
47
|
+
const triggerRef = (0, import_hooks.useRef)(null);
|
|
48
|
+
const tooltipRef = (0, import_hooks.useRef)(null);
|
|
49
|
+
const arrowRef = (0, import_hooks.useRef)(null);
|
|
50
|
+
const showTooltip = () => setIsVisible(true);
|
|
51
|
+
const hideTooltip = () => setIsVisible(false);
|
|
52
|
+
(0, import_hooks.useEffect)(() => {
|
|
53
|
+
if (!isVisible || !triggerRef.current || !tooltipRef.current) {
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
const trigger = triggerRef.current;
|
|
57
|
+
const tooltip = tooltipRef.current;
|
|
58
|
+
(0, import_dom.computePosition)(trigger, tooltip, {
|
|
59
|
+
placement,
|
|
60
|
+
// Middleware runs in order to modify the position
|
|
61
|
+
middleware: [
|
|
62
|
+
(0, import_dom.offset)(8),
|
|
63
|
+
// Add 8px of space between the trigger and tooltip
|
|
64
|
+
(0, import_dom.flip)(),
|
|
65
|
+
// Flip to the opposite side if it overflows
|
|
66
|
+
(0, import_dom.shift)({ padding: 5 }),
|
|
67
|
+
// Shift to keep it in view
|
|
68
|
+
...arrowRef.current ? [(0, import_dom.arrow)({ element: arrowRef.current })] : []
|
|
69
|
+
// Handle arrow positioning
|
|
70
|
+
]
|
|
71
|
+
}).then(({ x, y, placement: placement2, middlewareData }) => {
|
|
72
|
+
Object.assign(tooltip.style, {
|
|
73
|
+
left: `${x}px`,
|
|
74
|
+
top: `${y}px`
|
|
75
|
+
});
|
|
76
|
+
if (middlewareData.arrow && arrowRef.current) {
|
|
77
|
+
const { x: arrowX, y: arrowY } = middlewareData.arrow;
|
|
78
|
+
const side = placement2.split("-")[0];
|
|
79
|
+
const staticSide = {
|
|
80
|
+
top: "bottom",
|
|
81
|
+
right: "left",
|
|
82
|
+
bottom: "top",
|
|
83
|
+
left: "right"
|
|
84
|
+
}[side];
|
|
85
|
+
const arrowElement = arrowRef.current;
|
|
86
|
+
Object.assign(arrowElement.style, {
|
|
87
|
+
left: "",
|
|
88
|
+
top: "",
|
|
89
|
+
right: "",
|
|
90
|
+
bottom: ""
|
|
91
|
+
});
|
|
92
|
+
if (placement2.includes("-start") || placement2.includes("-end")) {
|
|
93
|
+
const tooltipRect = tooltip.getBoundingClientRect();
|
|
94
|
+
if (side === "top" || side === "bottom") {
|
|
95
|
+
arrowElement.style.left = `${14}px`;
|
|
96
|
+
if (arrowY != null) {
|
|
97
|
+
arrowElement.style.top = `${arrowY}px`;
|
|
98
|
+
}
|
|
99
|
+
} else {
|
|
100
|
+
arrowElement.style.top = `${tooltipRect.height / 2 - 4}px`;
|
|
101
|
+
if (arrowX != null) {
|
|
102
|
+
arrowElement.style.left = `${arrowX}px`;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
} else {
|
|
106
|
+
if (arrowX != null) {
|
|
107
|
+
arrowElement.style.left = `${arrowX}px`;
|
|
108
|
+
}
|
|
109
|
+
if (arrowY != null) {
|
|
110
|
+
arrowElement.style.top = `${arrowY}px`;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
arrowElement.style[staticSide] = "-4px";
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
}, [isVisible, placement, content]);
|
|
117
|
+
const triggerWithListeners = (0, import_preact.cloneElement)(children, {
|
|
118
|
+
ref: triggerRef,
|
|
119
|
+
onMouseEnter: showTooltip,
|
|
120
|
+
onMouseLeave: hideTooltip,
|
|
121
|
+
onFocus: showTooltip,
|
|
122
|
+
onBlur: hideTooltip,
|
|
123
|
+
"aria-describedby": "lightweight-tooltip"
|
|
124
|
+
// for accessibility
|
|
125
|
+
});
|
|
126
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
127
|
+
triggerWithListeners,
|
|
128
|
+
isVisible && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
129
|
+
"div",
|
|
130
|
+
{
|
|
131
|
+
ref: tooltipRef,
|
|
132
|
+
role: "tooltip",
|
|
133
|
+
id: "lightweight-tooltip",
|
|
134
|
+
className: (0, import_classnames.default)("tooltip-container", (0, import_visualBuilder.visualBuilderStyles)()["tooltip-container"]),
|
|
135
|
+
children: [
|
|
136
|
+
content,
|
|
137
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { ref: arrowRef, className: (0, import_classnames.default)("tooltip-arrow", (0, import_visualBuilder.visualBuilderStyles)()["tooltip-arrow"]) })
|
|
138
|
+
]
|
|
139
|
+
}
|
|
140
|
+
)
|
|
141
|
+
] });
|
|
142
|
+
};
|
|
143
|
+
function ToolbarTooltipContent({ contentTypeName, referenceFieldName }) {
|
|
144
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: (0, import_classnames.default)("toolbar-tooltip-content", (0, import_visualBuilder.visualBuilderStyles)()["toolbar-tooltip-content"]), children: [
|
|
145
|
+
contentTypeName && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: (0, import_classnames.default)("toolbar-tooltip-content-item", (0, import_visualBuilder.visualBuilderStyles)()["toolbar-tooltip-content-item"]), children: [
|
|
146
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.ContentTypeIcon, {}),
|
|
147
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { children: contentTypeName })
|
|
148
|
+
] }),
|
|
149
|
+
referenceFieldName && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: (0, import_classnames.default)("toolbar-tooltip-content-item", (0, import_visualBuilder.visualBuilderStyles)()["toolbar-tooltip-content-item"]), children: [
|
|
150
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { dangerouslySetInnerHTML: { __html: import_generateCustomCursor.FieldTypeIconsMap.reference }, className: (0, import_classnames.default)("visual-builder__field-icon", (0, import_visualBuilder.visualBuilderStyles)()["visual-builder__field-icon"]) }),
|
|
151
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { children: referenceFieldName })
|
|
152
|
+
] })
|
|
153
|
+
] });
|
|
154
|
+
}
|
|
155
|
+
function ToolbarTooltip({ children, data, disabled = false }) {
|
|
156
|
+
if (disabled) {
|
|
157
|
+
return children;
|
|
158
|
+
}
|
|
159
|
+
const { contentTypeName, referenceFieldName } = data;
|
|
160
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Tooltip, { content: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToolbarTooltipContent, { contentTypeName, referenceFieldName }), children });
|
|
161
|
+
}
|
|
162
|
+
var Tooltip_default = Tooltip;
|
|
163
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
164
|
+
0 && (module.exports = {
|
|
165
|
+
ToolbarTooltip
|
|
166
|
+
});
|
|
167
|
+
//# sourceMappingURL=Tooltip.cjs.map
|