You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Registration: enable every package through UseArc(...) #151
UseArc(arc => ...) is meant to be the one place an app enables Arc packages. Several packages are enabled some other way, or register themselves slightly differently:
Package
How it is enabled
Themes.Corners, Themes.Pixel
UsePackage("TKCode.Arc.Themes.Corners", ...) / UsePackage("TKCode.Arc.Themes.Pixel", ...) with hand-written IDs (ArcCornersBuilderExtensions.cs:11, ArcPixelBuilderExtensions.cs:12); the other packages use the generated ArcGeneratedAssets.PackageId
So ArcRuntime.Packages does not tell an app (or a diagnostics page) what is set up. Order and dependency rules (DependsOn) do not apply to these packages. Users have to learn a different call for each one.
Proposal
Generated IDs everywhere. Corners and Pixel use the generated ArcGeneratedAssets.PackageId (or a constant next to it) instead of string literals.
Builder entry points for the rest. Add ArcBuilder methods where they are missing, e.g. arc.UseArcFonts(), arc.UseArcVideo(v => v.Native()) (with Audio, Video, Pdf: one backend model (naming, change notification, disposal, builder registration) #149) and arc.UseArcAudio(...). Existing entry points stay and forward (or stay as the low-level API). Module initializers and the iOS delegate can stay where they are required, but should show up in ArcRuntime.Packages.
Document the rule. Write in design/architecture/foundation.md and AGENTS.md that every package has a UseArcXxx() builder entry, and list the allowed exceptions.
How to check it
An app enabling every package through UseArc(...) sees all of them in ArcRuntime.Packages.
Fonts.UseArcFonts() and UseArcPixelFonts() register Arc's fonts from UseArc(...). WithArcFonts() stays, and calling both is harmless: each font collection is added once per font manager.
Package ids. Corners and Pixel use a PackageId constant instead of a string literal.
Tests:
PackageEntryTests checks that every src package has a public UseArcXxx(this ArcBuilder) entry and that no package id is a string literal. The exceptions are listed with their reasons: Foundation, the generators, Icons.Lucide (module initializer), Audio (abstraction only), Mobile.iOS (app delegate) and Terminal (Terminal: TerminalView ignores the Arc theme (no token, own namespace, hard-coded font and palette) #150).
Activity
feat(Fonts, Themes, Terminal): enable every package through UseArc(..…
build: track every package's public API with PublicApiAnalyzers (#146)
build: track every package's public API with PublicApiAnalyzers (#146)
239573049 commentedon Nov 17, 2026
Done in d07870b (#159), together with the backend entries of #149 (a311242).
UseArcFonts()andUseArcPixelFonts()register Arc's fonts fromUseArc(...).WithArcFonts()stays, and calling both is harmless: each font collection is added once per font manager.PackageIdconstant instead of a string literal.PackageEntryTestschecks that everysrcpackage has a publicUseArcXxx(this ArcBuilder)entry and that no package id is a string literal. The exceptions are listed with their reasons: Foundation, the generators, Icons.Lucide (module initializer), Audio (abstraction only), Mobile.iOS (app delegate) and Terminal (Terminal: TerminalView ignores the Arc theme (no token, own namespace, hard-coded font and palette) #150).PackageRegistrationTestschecksArcRuntime.Packages.