Skip to content

Commit

Permalink
Merge pull request #93 from gaelj/release
Browse files Browse the repository at this point in the history
Release 0.3.1
  • Loading branch information
gaelj authored Feb 5, 2024
2 parents 6ac1983 + 8a07bd6 commit 39f3fa3
Show file tree
Hide file tree
Showing 10 changed files with 28 additions and 15 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

## 0.3.1 - 2024-02-06

### 🐛 Fix a bug

- Fix shift-tab in csv not working on last cell

### 🥅 Catch errors

- Silence errors when DOM elements are no longer available in Diagrams (SVG) and file upload (main div)

## 0.3.0 - 2024-02-06

### ✨ Introduce new features
Expand Down
2 changes: 1 addition & 1 deletion CodeMirror6/CodeMirror6.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<AssemblyName>GaelJ.BlazorCodeMirror6</AssemblyName>
<IsPackable>true</IsPackable>
<PackageId>GaelJ.BlazorCodeMirror6</PackageId>
<Version>0.3.0</Version>
<Version>0.3.1</Version>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
Expand Down
4 changes: 3 additions & 1 deletion CodeMirror6/NodeLib/src/CmColumns.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ function getRelativeColumnOffset(text: string, separator: string, position: numb
offset++
}
}
return offset
if (previous)
return previousColumnOffset - position
else return offset
}

export function columnStylingPlugin(separator: string): Extension {
Expand Down
2 changes: 2 additions & 0 deletions CodeMirror6/NodeLib/src/CmDiagrams.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ function readSvgDimensions(svgContent: string): { width: number, height: number
const parser = new DOMParser()
const svg = parser.parseFromString(svgContent, "image/svg+xml")
const svgElement = svg.getElementsByTagName("svg")[0]
if (!svgElement)
return { width: 0, height: 0 }
const width = svgElement.getAttribute("width")
const height = svgElement.getAttribute("height")
return { width: parseInt(width), height: parseInt(height) }
Expand Down
7 changes: 4 additions & 3 deletions CodeMirror6/NodeLib/src/CmFileUpload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { CMInstances } from "./CmInstance"
export function getFileUploadExtensions(id: string, setup: CmSetup)
{
const overlayId = `${id}-file-upload`
// check if the document already contains the overlay
if (document.getElementById(overlayId)) return []

const overlay = document.createElement("div")
Expand All @@ -30,8 +29,10 @@ export function getFileUploadExtensions(id: string, setup: CmSetup)
`
let depth = 0

// Append the overlay to your CodeMirror container
const editorContainer = document.getElementById(id) // Replace with your actual container ID
const editorContainer = document.getElementById(id)
if (!editorContainer) {
return []
}
editorContainer.style.position = 'relative'
editorContainer.appendChild(overlay)

Expand Down
2 changes: 1 addition & 1 deletion Examples.BlazorServer/Examples.BlazorServer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
<ImplicitUsings>enable</ImplicitUsings>
<Version>0.3.0</Version>
<Version>0.3.1</Version>
</PropertyGroup>
<ItemGroup>
<SupportedPlatform Include="browser" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<IsPackable>false</IsPackable>
<Version>0.3.0</Version>
<Version>0.3.1</Version>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Sentry.AspNetCore" Version="3.41.4" />
Expand Down
2 changes: 1 addition & 1 deletion Examples.BlazorWasm/Examples.BlazorWasm.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<IsPackable>false</IsPackable>
<Version>0.3.0</Version>
<Version>0.3.1</Version>
</PropertyGroup>
<ItemGroup>
<SupportedPlatform Include="browser-wasm" />
Expand Down
2 changes: 1 addition & 1 deletion Examples.Common/Examples.Common.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
<Version>0.3.0</Version>
<Version>0.3.1</Version>
</PropertyGroup>
<ItemGroup>
<SupportedPlatform Include="browser" />
Expand Down
10 changes: 4 additions & 6 deletions NEW_CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
### ✨ Introduce new features
### 🐛 Fix a bug

- Add commands to insert markdown table and horizontal rule
- Implement csv and tsv with padded column widths (Does not support multiline cells)
- Add Tab and Shift-Tab keymaps to csv mode, to navigate columns
- Fix shift-tab in csv not working on last cell

### 🎨 Improve structure / format of the code
### 🥅 Catch errors

- Improve eq() of emojiWidget
- Silence errors when DOM elements are no longer available in Diagrams (SVG) and file upload (main div)

0 comments on commit 39f3fa3

Please sign in to comment.