docs: rewrite the reference in plain language and add framework guides - #572
hyanmandian wants to merge 6 commits into
Conversation
…n language Replace the inherited "utils library for Brazilian-specific businesses" tagline with "utilities for Brazilian data" everywhere (README, cover pages, site shells, context7.json, llms.txt), rewrite the getting started page in English and Portuguese without the translated-from-English phrasing, and cut the migration guide down to what a reader needs: the renamed exports, the removed helpers, the behaviour changes and the checklist. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TaoCETNz5XtvkmViLDDAqm
Every util section now opens with a one-sentence summary (the line llms.txt indexes), lists its options and return rules as short bullets, keeps its examples and cites its source in one line. A Conventions section at the top states once what every section used to repeat: nothing throws on bad input, validators accept masked values, formatters work as input masks, generators use Math.random() and getters return fresh copies. The five utils that sat under a bare ## heading are now ### sections under a family, the Portuguese file follows a fixed glossary and has no untranslated example comments left, and the convertDateToWords sentence that compared two identical strings is fixed in both languages. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TaoCETNz5XtvkmViLDDAqm
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TaoCETNz5XtvkmViLDDAqm
Each section keeps its one-line summary, its options, the main return rules and its examples; the exhaustive edge cases (exotic inputs, per-state footnotes, legal history, implementation notes) stay in the JSDoc. The prose of the reference goes from about 15,500 to 8,300 words in each language, with no section over 150 words. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TaoCETNz5XtvkmViLDDAqm
Three guide pages per language show the patterns most apps need: validation as the user types, input masks built from the format* functions, form schemas with zod and with valibot, and formatting for display. Every example is complete and runs in the page: docs/run.js, a docsify plugin, puts a Run button on the jsx, vue and html blocks of the guides and executes them in a sandboxed iframe, compiling JSX with sucrase and single-file components with @vue/compiler-sfc, both loaded from jsdelivr on demand, with an import map for react, vue, zod, valibot and the package itself. The Prism grammars for JSX, TypeScript and TSX are loaded next to docsify, and a vue fence highlights as HTML. The sidebars gain a Guides group, llms.txt links the guides, and the site shells and sitemap are regenerated for the new pages. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TaoCETNz5XtvkmViLDDAqm
…st release The Angular guide (English and Portuguese) shows the same patterns as the other guides as standalone components with signals on Angular 22, zoneless: validation as the user types, input masks, a reactive form with validators built from isValid*, and forms checked with zod and with valibot. The runner compiles a typescript block whose default export is an @component with Babel (TypeScript preset, legacy decorators), loads the Angular JIT compiler and bootstraps the component on <app-root>; Babel, like sucrase and the Vue compiler, is only fetched when a Run button is first clicked, and the iframe fetches the framework modules only then. The import map now pins every runtime to its latest release (React 19.3.0, Vue 3.5.43, Angular 22.1.7, rxjs 7.8.2, zod 4.6.5, valibot 1.5.0, sucrase 3.35.1, Babel 7.29.9), listed in one place at the top of run.js. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TaoCETNz5XtvkmViLDDAqm
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
Tree-shaking report✅ No bundle size impact. All 155 exports are the same size as on the base branch (full import 648.9 KB, gzip 166.2 KB). All exports (155)
How this is measuredEvery export is imported alone into an esbuild consumer bundle (minified, tree-shaken) built from the head and from the base of this pull request; the sizes are the resulting bundles, gzip is their gzipped size. 🔴 marks a regression: a pre-existing export that grew more than 20% and more than 256 B, or the bundle importing every pre-existing export growing more than 5%. 🟡 is growth under the threshold, 🟢 a decrease, ⚪ no change, 🆕 an export that does not exist on the base (never a regression), 🗑️ an export that was removed. An intentional increase is accepted with the |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #572 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 183 183
Lines 2069 2069
Branches 612 612
=========================================
Hits 2069 2069
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Closed in favor of #556: the rewrite of the getting started, migration and utilities reference (the four commits before the guides) now lives there, with the |
What
Six commits that rewrite the documentation site: the getting-started, README and migration pages in plain language, the utilities reference restructured into short per-utility sections, and new runnable guides for React, Vue, Angular and plain JavaScript with every example runtime pinned to its latest release.
CONTRIBUTING.mddescribes the new shape of a utilities section, andscripts/llms.tsfollows it.43 files, +7614 / -1661.
Merge order
This one goes last. It rewrites
docs/utilities.mdanddocs/pt-br/utilities.mdwholesale, and every open feature PR (#558 through #570) adds a section to those same files. Merging this first would force fourteen branches to rewrite their docs; merging it last means one rebase here, where the new sections get carried into the new format in a single pass.Review notes