Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
12 changes: 12 additions & 0 deletions .github/linters/.jscpd.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,20 @@
"threshold": 0,
"reporters": ["consoleFull"],
"ignore": [
"**/src/Cropper.Blazor/Client/**",
"**/src/Cropper.Blazor/Client.V1/**",
"**/src/Cropper.Blazor/Client.V2/**",
"**/src/Cropper.Blazor/.vs/**",
"**/.idea/**",
"**/src/Cropper.Blazor/Cropper.Blazor.Tests/**",
"**/src/Cropper.Blazor/Cropper.Blazor.UnitTests/**",
"**/src/Cropper.Blazor/Cropper.Blazor.Codecov/**",
"**/src/Cropper.Blazor/Cropper.Blazor.SuperLinter/**",
"**/*.coverage.test.ts",
"**/examples/**",
"**/src/Cropper.Blazor/**/coverage/**",
"**/src/Cropper.Blazor/cropperjs/**",
"**/wwwroot/**",
"**/*.md",
"**/*excubowebcompiler.json",
"**/bin/**",
Expand Down
15 changes: 15 additions & 0 deletions src/Cropper.Blazor/.github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Copilot Instructions

## Project Guidelines
- For Cropper.Blazor Cropper.js v2 migration: use the existing Cropper.Blazor architecture, add unit-related tests, update examples, and keep separate v1 and v2 example URLs (/v1 and /v2).
- For the docs site, use Cropper.Blazor v1 from NuGet with the same v1 docs, create separate pages (including home) for v2, and keep the releases page shared between both versions. Ensure that the documentation versioning is handled within one application using different routes, rather than separate client apps.
- Inspect the Blazorise.Cropper project locally when comparing Cropper viewer behavior to ensure consistency and functionality.
- Split large god-object option classes into understandable, element-specific option classes for Cropper.Blazor configuration. Prefer enum-backed option APIs instead of plain strings for related Cropper.js option values.
- Verify that event correlation IDs are used correctly.
- For selection snapshots in the Cropper demo, use Cropper preview/viewer elements instead of saved canvas data URLs and avoid redundant snapshot save logic.

## Development Practices
- Run the Super-Linter pipeline configuration locally before completion to ensure code quality and adherence to standards.
- Use conventional Arrange-Act-Assert naming/structure patterns for tests where applicable.
- Place all TypeScript tests in the Vitest project. The default move handle action should be select, allowing for a selection count of zero.
- All TypeScript tests in this repository should be placed in the Vitest project.
9 changes: 9 additions & 0 deletions src/Cropper.Blazor/Blazorise.Cropper/Blazorise.Cropper.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<IsPackable>false</IsPackable>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
<EnableDefaultEmbeddedResourceItems>false</EnableDefaultEmbeddedResourceItems>
<EnableDefaultNoneItems>false</EnableDefaultNoneItems>
</PropertyGroup>
</Project>
3 changes: 3 additions & 0 deletions src/Cropper.Blazor/Blazorise.Cropper/Cropper.razor
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@namespace Blazorise.Cropper
@inherits BaseComponent
<div @ref="@ElementRef" id="@ElementId" class="@ClassNames" style="@StyleNames" @attributes="@Attributes" />
Loading
Loading