reactionview 0.2.2 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +4 -1
- data/app/assets/javascripts/reactionview-dev-tools.esm.js +10 -3
- data/app/assets/javascripts/reactionview-dev-tools.esm.js.map +1 -1
- data/app/assets/javascripts/reactionview-dev-tools.umd.js +10 -3
- data/app/assets/javascripts/reactionview-dev-tools.umd.js.map +1 -1
- data/lib/generators/reactionview/install_generator.rb +3 -0
- data/lib/reactionview/config.rb +7 -0
- data/lib/reactionview/template/handlers/herb/herb.rb +16 -20
- data/lib/reactionview/template/handlers/herb.rb +20 -8
- data/lib/reactionview/version.rb +1 -1
- data/reactionview.gemspec +1 -1
- metadata +6 -6
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
const htmlTemplates = document.querySelectorAll('template[data-herb-parser-error]');
|
|
86
86
|
htmlTemplates.forEach((template, _index) => {
|
|
87
87
|
try {
|
|
88
|
-
|
|
88
|
+
const htmlContent = template.innerHTML?.trim() || template.textContent?.trim();
|
|
89
89
|
if (htmlContent) {
|
|
90
90
|
this.displayParserErrorOverlay(htmlContent);
|
|
91
91
|
templatesToRemove.push(template);
|
|
@@ -497,11 +497,18 @@
|
|
|
497
497
|
<div class="herb-dismiss-hint" style="padding-left: 24px; padding-right: 24px; padding-bottom: 12px;">
|
|
498
498
|
Click outside, press <kbd style="display: inline-block; padding: 2px 6px; font-family: monospace; font-size: 0.9em; color: #333; background: #f7f7f7; border: 1px solid #ccc; border-radius: 4px; box-shadow: 0 2px 0 #ccc, 0 2px 3px rgba(0,0,0,0.2) inset;">Esc</kbd> key, or fix the code to dismiss.<br>
|
|
499
499
|
|
|
500
|
-
|
|
500
|
+
${this.getDismissHint()}
|
|
501
501
|
</div>
|
|
502
502
|
</div>
|
|
503
503
|
`;
|
|
504
504
|
}
|
|
505
|
+
getDismissHint() {
|
|
506
|
+
const template = document.querySelector('template[data-herb-dismiss-hint]');
|
|
507
|
+
if (template) {
|
|
508
|
+
return template.innerHTML.trim();
|
|
509
|
+
}
|
|
510
|
+
return `You can also disable this overlay by passing <code style="color: #ffeb3b; font-family: monospace; font-size: 12pt;">validation_mode: :none</code> to <code style="color: #ffeb3b; font-family: monospace; font-size: 12pt;">Herb::Engine</code>.`;
|
|
511
|
+
}
|
|
505
512
|
getValidationOverlayStyles() {
|
|
506
513
|
return `
|
|
507
514
|
.herb-validation-overlay {
|
|
@@ -1695,7 +1702,7 @@
|
|
|
1695
1702
|
try {
|
|
1696
1703
|
window.open(url, '_self');
|
|
1697
1704
|
}
|
|
1698
|
-
catch (
|
|
1705
|
+
catch (_error) {
|
|
1699
1706
|
console.log(`Open in editor: ${absolutePath}:${line}:${column}`);
|
|
1700
1707
|
}
|
|
1701
1708
|
}
|