docs: add the libmuslim Dart API section - #27
Conversation
Documents libmuslim_dart alongside the existing C and Rust sections, with the same overview / quick start / API reference shape. Every example and every printed value was run against the package at commit aee9055 rather than written from the source: the Jakarta quick start output matches the Rust page's figures for the same inputs, and the ArgumentError and PrayerTimesUnavailable messages are the real ones. Records what the Dart binding does not have. It does not wrap timezone.h, so utcOffset is a fixed Duration with no DST handling and the overview points at the timezone package instead. The package is not on pub.dev yet, so installation is a git dependency. HighLatMethod, MidnightMode and the astronomical constants are not exposed, and the reference says why for each.
Rewrites the 21 prose occurrences across the Dart pages and both _category_.json descriptions. A few needed rephrasing rather than a straight swap, since a comma alone would have produced a run-on. Code blocks are untouched. The semicolons there are Dart syntax.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
prism-react-renderer bundles a fixed language set. It covers c, rust, json, yaml and css, which is why those blocks highlight, but it has no bash, dart or powershell, and nothing was requesting them. The visible symptom was the new Dart pages rendering as plain monospace, but bash was the bigger miss: 66 blocks across the install, configuration and CLI docs, unhighlighted since the site was set up. Measured in the built HTML before and after. bash, dart and powershell go from zero non-plain Prism token types to 20, 14 and 3. jsonc is still plain. Prism ships no jsonc grammar and no alias for it, so the two blocks using it need retagging to json5 or json, which is a content change and not part of this fix.
|
Pushed The bugThe new Dart pages rendered as plain monospace. The cause is not in the pages: Measured in the built HTML by counting distinct non-
Left alone deliberately
|
Adds a Dart section to the libmuslim docs, alongside the existing C and Rust ones, documenting the libmuslim_dart package.
Content only, five new files under
docs/libmuslim/dart/. Nothing outsidedocs/is touched.Structure and voice follow the Rust section, so the three language sections stay parallel.
Verification
npm run typecheckandnpm run buildboth pass, with no broken links and no broken-anchor warnings.Every example and every printed value in these pages was executed against the package, not written from reading the source:
ArgumentErrorandPrayerTimesUnavailablemessages are the real strings, copied from a run.prayersrather than assume a fixed list.CalculationMethod.kemenag.displayNameand.keywere read back from the C method table at runtime.METHOD_TABLEinprayertimes.h.What the pages say the Dart binding does not do
The Rust section next door documents a
timezonemodule and a published crate, so the differences are stated explicitly rather than left for a reader to infer:timezone.hwrapper.utcOffsetis a fixedDurationwith no DST handling. The overview says so and points at thetimezonepub package meanwhile.dart pub add.HighLatMethod,MidnightModeand the astronomical constants are not exposed. The reference gives the reason for each, for exampleMethodParamshas no high-latitude field, so exposingHighLatMethodwould be a lever wired to nothing.AI disclosure
Per AI_POLICY.md: these pages were drafted with Claude Code, and the AI assistance was substantial rather than incidental.
That is also why the verification above is written out in detail. Rather than trusting generated prose, every runnable claim was executed against the real package and the output pasted back in, and the "what it does not do" section exists because the first draft's plausible-sounding parity with the Rust binding was wrong on several points.
Review is still warranted on the prose and on whether the Dart section belongs at position 3.