From 6cda347bb1dbb765df08869358d4941932bcaca7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABl=20James?= Date: Tue, 6 Feb 2024 17:07:29 +0100 Subject: [PATCH 1/4] =?UTF-8?q?=F0=9F=90=9B=20Fix=20typo=20in=20readme=20(?= =?UTF-8?q?imports)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c801fc9c..e55c5fc2 100644 --- a/README.md +++ b/README.md @@ -86,7 +86,7 @@ Visit the [live demo](https://gaelj.github.io/BlazorCodeMirror6/) to see the com ## Quick Start - add the nuget package [GaelJ.BlazorCodeMirror6](https://www.nuget.org/packages/GaelJ.BlazorCodeMirror6/) -- Add `@using using GaelJ.BlazorCodeMirror6`, `@using GaelJ.BlazorCodeMirror6.Commands` and `@using GaelJ.BlazorCodeMirror6.Models.BlazorCodeMirror6` in your `_Imports.razor` or page/component +- Add `@using GaelJ.BlazorCodeMirror6`, `@using GaelJ.BlazorCodeMirror6.Commands` and `@using GaelJ.BlazorCodeMirror6.Models` in your `_Imports.razor` or page/component - Use the `` component as demonstrated in `Examples.Common/Example.razor` ## Examples From 91f5090cd53a1a1eac038366882e2670fbbc333f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABl=20James?= Date: Tue, 6 Feb 2024 17:16:41 +0100 Subject: [PATCH 2/4] =?UTF-8?q?=F0=9F=90=9B=20Fix=20crash=20when=20creatin?= =?UTF-8?q?g=20new=20diagram?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CodeMirror6/NodeLib/src/CmDiagrams.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/CodeMirror6/NodeLib/src/CmDiagrams.ts b/CodeMirror6/NodeLib/src/CmDiagrams.ts index 085bd1b1..d6710030 100644 --- a/CodeMirror6/NodeLib/src/CmDiagrams.ts +++ b/CodeMirror6/NodeLib/src/CmDiagrams.ts @@ -149,7 +149,7 @@ class DiagramWidget extends WidgetType { const container = document.createElement('div') container.setAttribute('aria-hidden', 'true') - if (this.svgContent === null) { + if (this.svgContent === null || this.svgContent === undefined) { container.innerHTML = `Loading ${this.language} diagram...` container.style.fontStyle = 'italic' container.style.color = 'gray' @@ -157,11 +157,13 @@ class DiagramWidget extends WidgetType { else { container.innerHTML = this.svgContent const svgElement = container.getElementsByTagName("svg")[0] - svgElement.setAttribute('aria-hidden', 'true') - svgElement.style.backgroundColor = 'white' - svgElement.style.maxHeight = '800px' - svgElement.style.maxWidth = 'calc(100% - 2em)' - svgElement.style.objectFit = 'scale-down' + if (svgElement !== null && svgElement !== undefined) { + svgElement.setAttribute('aria-hidden', 'true') + svgElement.style.backgroundColor = 'white' + svgElement.style.maxHeight = '800px' + svgElement.style.maxWidth = 'calc(100% - 2em)' + svgElement.style.objectFit = 'scale-down' + } container.style.fontStyle = '' container.style.color = '' container.style.backgroundColor = 'transparent' From eb726fc9172c4342be92ae56b9259a55d917864d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABl=20James?= Date: Tue, 6 Feb 2024 17:16:58 +0100 Subject: [PATCH 3/4] =?UTF-8?q?=F0=9F=93=9D=20Update=20changelog=20for=200?= =?UTF-8?q?.3.3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 7 +++++++ NEW_CHANGELOG.md | 16 ++-------------- 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c1d672f1..44c45039 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## 0.3.3 - 2024-02-06 + +### 🐛 Fix a bug + +- Fix crash when creating new diagram +- Fix typo in readme (imports) + ## 0.3.2 - 2024-02-06 ### ⚡️ Improve performance diff --git a/NEW_CHANGELOG.md b/NEW_CHANGELOG.md index 05361261..766f5657 100644 --- a/NEW_CHANGELOG.md +++ b/NEW_CHANGELOG.md @@ -1,16 +1,4 @@ -### ⚡️ Improve performance - -- Add "Visible" property to allow hiding the editor without destroying it - -### ✨ Introduce new features - -- Add linting that checks csv column count relative to first line -- Disable initial setting of line wrapping in csv mode - ### 🐛 Fix a bug -- Fix tabulating csv columns skipped the last / first ones - -### 📝 Add or update documentation - -- Update README +- Fix crash when creating new diagram +- Fix typo in readme (imports) From c0c6f6f96a8b09241a742eb69f19899dee27371c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABl=20James?= Date: Tue, 6 Feb 2024 17:16:58 +0100 Subject: [PATCH 4/4] =?UTF-8?q?=F0=9F=94=96=20Bump=20version=20to=200.3.3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CodeMirror6/CodeMirror6.csproj | 2 +- Examples.BlazorServer/Examples.BlazorServer.csproj | 2 +- .../Examples.BlazorServerInteractive.csproj | 2 +- Examples.BlazorWasm/Examples.BlazorWasm.csproj | 2 +- Examples.Common/Examples.Common.csproj | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CodeMirror6/CodeMirror6.csproj b/CodeMirror6/CodeMirror6.csproj index 3965b60b..ed6ef8d5 100644 --- a/CodeMirror6/CodeMirror6.csproj +++ b/CodeMirror6/CodeMirror6.csproj @@ -9,7 +9,7 @@ GaelJ.BlazorCodeMirror6 true GaelJ.BlazorCodeMirror6 - 0.3.2 + 0.3.3 true snupkg true diff --git a/Examples.BlazorServer/Examples.BlazorServer.csproj b/Examples.BlazorServer/Examples.BlazorServer.csproj index 2d69aa5a..59a3d2a0 100644 --- a/Examples.BlazorServer/Examples.BlazorServer.csproj +++ b/Examples.BlazorServer/Examples.BlazorServer.csproj @@ -4,7 +4,7 @@ enable false enable - 0.3.2 + 0.3.3 diff --git a/Examples.BlazorServerInteractive/Examples.BlazorServerInteractive.csproj b/Examples.BlazorServerInteractive/Examples.BlazorServerInteractive.csproj index 3a0b5eac..50ae27e1 100644 --- a/Examples.BlazorServerInteractive/Examples.BlazorServerInteractive.csproj +++ b/Examples.BlazorServerInteractive/Examples.BlazorServerInteractive.csproj @@ -4,7 +4,7 @@ enable enable false - 0.3.2 + 0.3.3 diff --git a/Examples.BlazorWasm/Examples.BlazorWasm.csproj b/Examples.BlazorWasm/Examples.BlazorWasm.csproj index c6c863cf..dd21547f 100644 --- a/Examples.BlazorWasm/Examples.BlazorWasm.csproj +++ b/Examples.BlazorWasm/Examples.BlazorWasm.csproj @@ -4,7 +4,7 @@ enable enable false - 0.3.2 + 0.3.3 diff --git a/Examples.Common/Examples.Common.csproj b/Examples.Common/Examples.Common.csproj index 10364307..33fbbe1d 100644 --- a/Examples.Common/Examples.Common.csproj +++ b/Examples.Common/Examples.Common.csproj @@ -5,7 +5,7 @@ enable enable false - 0.3.2 + 0.3.3