Skip to content
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/agents/test-platform.md
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ does not serve silently gets the newest one it does.
`feat(release): v-X.Y.Z` commit on `develop` has its tag: an untagged release is answered by the previous one,
without a word.
2. **What it does serve.** `mcp -McpVersion X.Y.Z` for each. The library tools (`Search*`, `Get*` and `Inspect*` of BlazorUI,
Brouter, Butil, Bswup, Bmotion and - from the first release that ships them - Bink, Balette, BbScanner, BlazeDb, Blow, Bonboarding, Bortable, Blex, Bmage and Bsqlite) and the source tools (`FindBitPlatformSymbols`, `GetBitPlatformSymbolSource`,
Brouter, Butil, Bswup, Bmotion and - from the first release that ships them - Bink, Balette, BbScanner, Bdnd, BlazeDb, Blow, Bonboarding, Bortable, Blex, Bmage and Bsqlite) and the source tools (`FindBitPlatformSymbols`, `GetBitPlatformSymbolSource`,
`SearchBitPlatformCode`) must all be there. Only the five shared ones (`AskGitHubRepository`,
`SendBitPlatformFeedback`, `microsoft_docs_*`) means no release is served at all, and the README's
*PlatformWebsite's MCP* section says why that happens. The server version it reports is the website's own build,
Expand All @@ -388,7 +388,7 @@ does not serve silently gets the newest one it does.
4. **The answers are good.** Put one real task to each library's `Search` tool, worded the way a developer would
describe it - BlazorUI "a dropdown the user can also type into", Butil "copy text to the clipboard", Bmotion "fade
a list item in", Brouter "a route parameter that must be a number", Bswup "show the download progress of the app's
update", Bink "a signature pad that exports a PNG", Balette "a command that asks for a name before it runs", BbScanner "scan a QR code from an uploaded photo", BlazeDb "a todo list that survives a page reload", Blow "a flow chart that lays itself out left to right", Bonboarding "a step that waits for a panel that loads later", Bortable "a kanban board whose cards move between columns", Blex "a counter whose value survives a page reload", Bmage "shrink an uploaded photo under 200 KB without its location", Bsqlite "keep the database when OPFS is not available" - follow up with the `Get` tool it points to, and ask `SearchBitPlatformCode` about the Boilerplate. An
update", Bink "a signature pad that exports a PNG", Balette "a command that asks for a name before it runs", BbScanner "scan a QR code from an uploaded photo", Bdnd "reorder a list by dragging its items", BlazeDb "a todo list that survives a page reload", Blow "a flow chart that lays itself out left to right", Bonboarding "a step that waits for a panel that loads later", Bortable "a kanban board whose cards move between columns", Blex "a counter whose value survives a page reload", Bmage "shrink an uploaded photo under 200 KB without its location", Bsqlite "keep the database when OPFS is not available" - follow up with the `Get` tool it points to, and ask `SearchBitPlatformCode` about the Boilerplate. An
answer must be on topic, specific and true to the version asked for; one that answers wrongly is a failure too.

Like an E2E failure, an MCP problem is fixed in `src/Websites/Platform` or in the library's own MCP server, and goes
Expand Down
4 changes: 2 additions & 2 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@
## Rules

**RULE 1:** If a task (question, code modification or review) involves the use of bit BlazorUI components (e.g., `BitButton`, `BitTooltip`, `BitTextField`),
or refers to `bitplatform`, `bit Bswup`, `bit Butil`, `bit Bmotion`, `bit Bink`, `bit Balette`, `bit BbScanner`, `bit BlazeDb`, `bit Blow`, `bit Bonboarding`, `bit Bortable`, `bit Blex`, `bit Bmage`, `bit Bsqlite`, `bit Brouter`, or `bit Boilerplate`, or involves UI components without explicitly specifying their UI toolkit,
you **MUST** use the `bitplatform` MCP server's tools - start with the matching `Search<Library>` tool (e.g. `SearchBitBlazorUI`, `SearchBswup`, `SearchButil`, `SearchBmotion`, `SearchBink`, `SearchBalette`, `SearchBbScanner`, `SearchBlazeDb`, `SearchBlow`, `SearchBonboarding`, `SearchBortable`, `SearchBlex`, `SearchBmage`, `SearchBsqlite`, `SearchBrouter`) and follow the calls it names - to find the correct implementation and usage patterns before writing or changing any code.
or refers to `bitplatform`, `bit Bswup`, `bit Butil`, `bit Bmotion`, `bit Bink`, `bit Balette`, `bit BbScanner`, `bit Bdnd`, `bit BlazeDb`, `bit Blow`, `bit Bonboarding`, `bit Bortable`, `bit Blex`, `bit Bmage`, `bit Bsqlite`, `bit Brouter`, or `bit Boilerplate`, or involves UI components without explicitly specifying their UI toolkit,
you **MUST** use the `bitplatform` MCP server's tools - start with the matching `Search<Library>` tool (e.g. `SearchBitBlazorUI`, `SearchBswup`, `SearchButil`, `SearchBmotion`, `SearchBink`, `SearchBalette`, `SearchBbScanner`, `SearchBdnd`, `SearchBlazeDb`, `SearchBlow`, `SearchBonboarding`, `SearchBortable`, `SearchBlex`, `SearchBmage`, `SearchBsqlite`, `SearchBrouter`) and follow the calls it names - to find the correct implementation and usage patterns before writing or changing any code.

**End of RULE 1**

Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/all.cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,12 @@ jobs:
uses: ./.github/workflows/bbscanner.demo.cd.yml
secrets: inherit

bdnd_demo:
name: bdnd demo
if: inputs.server
uses: ./.github/workflows/bdnd.demo.cd.yml
secrets: inherit

blazedb_demo:
name: blazedb demo
if: inputs.server
Expand Down
75 changes: 75 additions & 0 deletions .github/workflows/bdnd.demo.cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: Bdnd Demo CD

on:
workflow_dispatch:
workflow_call:

permissions:
contents: read

jobs:

build_blazor_wasm:
name: build blazor wasm
runs-on: ubuntu-24.04

steps:

- name: Checkout source code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- name: Setup .NET
uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
with:
global-json-file: src/global.json

- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: 24

- name: Install wasm
run: cd src && dotnet workload install wasm-tools

- name: Publish
run: dotnet publish src/Bdnd/Demo/Server/Bit.Bdnd.Demo.Server.csproj -c Release -o server -p:Version="${{ vars.APP_VERSION}}" -p:InvariantGlobalization=true

# Server-owned; C:\inetpub keeps its own copies.
- name: Strip server-owned files from bundle
run: rm -fv server/appsettings*.json server/AppCertificate.* server/AppleAuthKey.p8 server/*.pfx

- name: Upload artifact
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: BdndDemo
path: server
include-hidden-files: true

deploy_server:
name: deploy
needs: build_blazor_wasm
runs-on: [self-hosted, Windows, X64, bitplatform-iis]
environment:
name: production
url: 'https://bdnd.bitplatform.dev'

steps:

- name: Checkout deploy action
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
fetch-depth: 1
sparse-checkout: .github/actions

- name: Deploy
uses: ./.github/actions/deploy-to-server
with:
artifact-name: BdndDemo
app-pool: Bdnd
site-path: C:\inetpub\BdndDemo
sentinel-file: Bit.Bdnd.Demo.Server.dll
health-check-url: 'https://bdnd.bitplatform.dev/'
cloudflare-zone-id: ${{ secrets.CLOUDFLARE_ZONE_ID }}
cloudflare-token: ${{ secrets.CLOUDFLARE_TOKEN }}
63 changes: 63 additions & 0 deletions .github/workflows/bit.ci.Bdnd.e2e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: bit platform CI - Bdnd E2E

# The browser suite: the demo (prerendered, then running on WebAssembly) driven in Chromium with Playwright. It
# takes far longer than the build-and-unit pipeline (bit.ci.Bdnd.yml), so it runs only when started by hand. See
# src/Bdnd/Tests/Bit.Bdnd.Tests.E2E/README.md for what it proves and how to run it locally.

on:
workflow_dispatch:

env:
DOTNET_SYSTEM_CONSOLE_ALLOW_ANSI_COLOR_REDIRECTION: true

permissions:
contents: read

jobs:

e2e:
name: Bdnd E2E (Chromium)
runs-on: ubuntu-24.04
timeout-minutes: 60

steps:

- name: Checkout source code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- name: Setup .NET 10.0
uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
with:
global-json-file: src/global.json

- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: 24

- name: dotnet workload restore
run: cd src/Bdnd && dotnet workload restore

- name: Build the demo and the E2E suite
run: |
dotnet build src/Bdnd/Demo/Server/Bit.Bdnd.Demo.Server.csproj -c Release
dotnet build src/Bdnd/Tests/Bit.Bdnd.Tests.E2E/Bit.Bdnd.Tests.E2E.csproj -c Release

- name: Install Playwright Chromium
run: pwsh src/Bdnd/Tests/Bit.Bdnd.Tests.E2E/bin/Release/net10.0/playwright.ps1 install --with-deps chromium

- name: Run E2E tests
# Run from inside src so src/global.json's Microsoft.Testing.Platform runner setting applies.
run: >
cd src/Bdnd/Tests/Bit.Bdnd.Tests.E2E &&
dotnet test -c Release --no-build
--report-trx --report-trx-filename bdnd-e2e.trx

- name: Upload test results
if: always()
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: bdnd-e2e
path: '**/bdnd-e2e.trx'
if-no-files-found: ignore
62 changes: 62 additions & 0 deletions .github/workflows/bit.ci.Bdnd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: bit platform CI - Bdnd

# Build, unit tests and MCP server tests. The browser suite lives in bit.ci.Bdnd.e2e.yml and runs on demand only.

on:
workflow_dispatch:
workflow_call:
pull_request:
paths:
- 'src/Bdnd/**'

env:
DOTNET_SYSTEM_CONSOLE_ALLOW_ANSI_COLOR_REDIRECTION: true

permissions:
contents: read

jobs:
build-Bdnd:
if: startsWith(github.event.pull_request.title, 'Prerelease') != true && startsWith(github.event.pull_request.title, 'Release') != true && startsWith(github.event.pull_request.title, 'Version') != true
name: build Bit.Bdnd
runs-on: ubuntu-24.04

steps:

- name: Checkout source code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- name: Setup .NET 10.0
uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
with:
global-json-file: src/global.json

- name: Setup .NET 9.0
uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
with:
dotnet-version: 9.0.x

- name: Setup .NET 8.0
uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
with:
dotnet-version: 8.0.x

- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: 24

- name: dotnet workload restore
run: cd src/Bdnd && dotnet workload restore

- name: dotnet build
run: dotnet build src/Bdnd/Bit.Bdnd.slnx

- name: dotnet test
# Run from inside src so src/global.json's "test" runner setting applies
# (from the repo root the SDK falls back to the unsupported VSTest path).
run: cd src/Bdnd/Tests/Bit.Bdnd.Tests && dotnet test --no-build

- name: dotnet test (MCP server)
run: cd src/Bdnd/Tests/Bit.Bdnd.Tests.Mcp && dotnet test --no-build
6 changes: 6 additions & 0 deletions .github/workflows/nuget.org.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
paths:
- 'src/Balette/**'
- 'src/BbScanner/**'
- 'src/Bdnd/**'
- 'src/BlazorUI/**'
- 'src/Bink/**'
- 'src/BlazeDb/**'
Expand Down Expand Up @@ -216,6 +217,11 @@ jobs:
- name: dotnet pack BbScanner
run: dotnet pack src/BbScanner/Bit.BbScanner/Bit.BbScanner.csproj --output . --configuration Release

- name: dotnet build Bdnd
run: dotnet build src/Bdnd/Bit.Bdnd/Bit.Bdnd.csproj -c Release -p:GeneratePackageOnBuild=false -p:WarningLevel=0 -p:RunCodeAnalysis=false
- name: dotnet pack Bdnd
run: dotnet pack src/Bdnd/Bit.Bdnd/Bit.Bdnd.csproj --output . --configuration Release

- name: dotnet build BlazeDb
run: dotnet build src/BlazeDb/Bit.BlazeDb/Bit.BlazeDb.csproj -c Release -p:GeneratePackageOnBuild=false -p:WarningLevel=0 -p:RunCodeAnalysis=false
- name: dotnet pack BlazeDb
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/prerelease.nuget.org.yml
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,11 @@ jobs:
- name: dotnet pack BbScanner
run: dotnet pack src/BbScanner/Bit.BbScanner/Bit.BbScanner.csproj --output . --configuration Release

- name: dotnet build Bdnd
run: dotnet build src/Bdnd/Bit.Bdnd/Bit.Bdnd.csproj -c Release -p:GeneratePackageOnBuild=false -p:WarningLevel=0 -p:RunCodeAnalysis=false
- name: dotnet pack Bdnd
run: dotnet pack src/Bdnd/Bit.Bdnd/Bit.Bdnd.csproj --output . --configuration Release

- name: dotnet build BlazeDb
run: dotnet build src/BlazeDb/Bit.BlazeDb/Bit.BlazeDb.csproj -c Release -p:GeneratePackageOnBuild=false -p:WarningLevel=0 -p:RunCodeAnalysis=false
- name: dotnet pack BlazeDb
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,9 @@ _book
/src/BlazeDb/Bit.BlazeDb.Browser/Scripts/**/*.js
/src/BlazeDb/Bit.BlazeDb.Browser/wwwroot/**/*.js

/src/Bdnd/Bit.Bdnd/Scripts/**/*.js
/src/Bdnd/Bit.Bdnd/wwwroot/**/*.js

/src/Blow/Bit.Blow/Scripts/**/*.js
/src/Blow/Bit.Blow/wwwroot/**/*.js
/src/Blow/Bit.Blow/wwwroot/**/*.css
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ bit new MyApp

- [***bit BlazorUI***](https://blazorui.bitplatform.dev) (`Bit.BlazorUI`): 90+ high-performance, accessible components with Dark and Light themes and RTL support, split across `Bit.BlazorUI`, `Bit.BlazorUI.Extras` (DataGrid, Chart, PdfViewer, RichTextEditor, Map, FullCalendar, CountryPicker, TimeZonePicker, and more), `Bit.BlazorUI.Icons` and `Bit.BlazorUI.Assets`.
- [***BbScanner***](src/BbScanner/README.md) (`Bit.BbScanner`): A dependency-free barcode scanner for Blazor that reads QR Code, Data Matrix, Code 128, Code 39, EAN-13, EAN-8, UPC-A, UPC-E and ITF from the camera or from still images. The decoding is written from scratch in C#; the browser only opens the camera and copies pixels.
- [***Bdnd***](src/Bdnd/README.md) (`Bit.Bdnd`): A declarative drag-and-drop library for Blazor inspired by React DnD, with typed items matched to drop targets by type, custom drag previews, drag handles, sortable lists, nested sources and targets, and native file, text and link drops. The drag state lives in C#; the browser only configures the native drag and tracks hover.
- [***Bink***](src/Bink/README.md) (`Bit.Bink`): A Blazor-native drawing and ink library, with pressure- and tilt-aware strokes, brushes, erasers, shapes, annotations, selection, layers, undo/redo, real-time collaboration and SVG/PNG export. The document model and the drawing engine run in C#; the browser only captures input and paints.
- [***Balette***](src/Balette/README.md) (`Bit.Balette`): A Blazor-native, keyboard-first command palette (`Ctrl+K` / `⌘K`), with fzf-style fuzzy search, nested pages, prefix modes, async sources, recents and frecency, global shortcuts and sequences, prompts, multi-select and full theming. Matching and ranking run in C#; the browser only opens the dialog and listens for keys.
- [***Blow***](src/Blow/README.md) (`Bit.Blow`): A Blazor-native library for node-based UIs, editors, flow charts and diagrams - a Blazor counterpart to React Flow - with a pannable, zoomable canvas, draggable, resizable and connectable nodes, sub-flows, auto-layout, alignment guides, undo/redo, copy/paste and full keyboard accessibility. Interaction, layout and geometry run in C#; the browser only measures the DOM.
Expand Down
10 changes: 7 additions & 3 deletions src/Balette/Demo/Server/Services/BaletteXmlDocs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,10 @@ private static string Reference(XElement element)
var arguments = target.IndexOf('(', StringComparison.Ordinal);
if (arguments > 0) target = target[..arguments];

// Drop the arity marker of a generic type ("SomeGeneric`1").
var arity = target.IndexOf('`', StringComparison.Ordinal);
if (arity > 0) target = target[..arity];
// Drop the arity markers of generic types and methods ("SomeGeneric`1", "GetItem``1") wherever
// they sit: a member of a generic type has one in the middle of its cref, and cutting the text
// at the first one would drop the member and keep the namespace.
target = ArityRegex().Replace(target, string.Empty);

var parts = target.Split('.');

Expand All @@ -209,4 +210,7 @@ private static string Reference(XElement element)

[GeneratedRegex(@"[ \t]{2,}")]
private static partial Regex RepeatedSpaceRegex();

[GeneratedRegex(@"`+\d+")]
private static partial Regex ArityRegex();
}
10 changes: 7 additions & 3 deletions src/BbScanner/Demo/Server/Services/BbScannerXmlDocs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,10 @@ private static string Reference(XElement element)
var arguments = target.IndexOf('(', StringComparison.Ordinal);
if (arguments > 0) target = target[..arguments];

// Drop the arity marker of a generic type ("SomeGeneric`1").
var arity = target.IndexOf('`', StringComparison.Ordinal);
if (arity > 0) target = target[..arity];
// Drop the arity markers of generic types and methods ("SomeGeneric`1", "GetItem``1") wherever
// they sit: a member of a generic type has one in the middle of its cref, and cutting the text
// at the first one would drop the member and keep the namespace.
target = ArityRegex().Replace(target, string.Empty);

var parts = target.Split('.');

Expand All @@ -209,4 +210,7 @@ private static string Reference(XElement element)

[GeneratedRegex(@"[ \t]{2,}")]
private static partial Regex RepeatedSpaceRegex();

[GeneratedRegex(@"`+\d+")]
private static partial Regex ArityRegex();
}
19 changes: 19 additions & 0 deletions src/Bdnd/Bit.Bdnd.slnx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<Solution>
<Folder Name="/.Solution Items/">
<File Path="../../.gitignore" />
<File Path="../.editorconfig" />
<File Path="../Bit.Build.props" />
<File Path="../global.json" />
<File Path="README.md" />
</Folder>
<Folder Name="/Demo/">
<Project Path="Demo/Client/Bit.Bdnd.Demo.Client.csproj" />
<Project Path="Demo/Server/Bit.Bdnd.Demo.Server.csproj" />
</Folder>
<Folder Name="/Tests/">
<Project Path="Tests/Bit.Bdnd.Tests/Bit.Bdnd.Tests.csproj" />
<Project Path="Tests/Bit.Bdnd.Tests.Mcp/Bit.Bdnd.Tests.Mcp.csproj" />
<Project Path="Tests/Bit.Bdnd.Tests.E2E/Bit.Bdnd.Tests.E2E.csproj" />
</Folder>
<Project Path="Bit.Bdnd/Bit.Bdnd.csproj" />
</Solution>
Loading
Loading