# @gram-lang/modules ## 1.2.1 ### Patch Changes - Updated dependencies [c8c4d49] - @gram-lang/i18n@1.2.1 - @gram-lang/analyzer@1.2.1 - @gram-lang/kitchen@1.2.1 - @gram-lang/parser@1.2.1 ## 1.2.0 ### Minor Changes - 2bab3cd: **Parser & Kitchen**: Introduced modular recipes and multi-file imports via the `@use` directive: - Import external base recipes directly into a recipe using `@use "./bases/shortcrust-pastry.gram" as &shortcrust`. - Imported steps seamlessly interleave into the global ALAP scheduling timeline, preserving resting times and dependencies. - Automatically scales imported base quantities when referenced with specific yields (e.g. `&shortcrust{250g}` halves a 500 g base recipe). - Supports destructured multi-yield imports (e.g. `@use "./bases/tart-elements.gram" as { &crust, &frangipane }`) scaling each component independently. - Supports multi-word bindings using bracket notation (e.g. `@use "..." as &pastry dough{}`). - Resolves project-root paths (`@/bases/...`) and custom path aliases defined under `paths:` in `.gram/config.yaml`. - Added `--stock` CLI flag to treat pre-made base imports as stock items (zero timeline overhead, single shopping list line, retaining full nutritional totals). - Supports retro-planning timeline offsets directly on `@use` import lines (e.g. `@use "./bases/levain-starter.gram" as &starter ~{-2d}`). - Spliced sections in HTML, Markdown, and print outputs display origin badges crediting their source module. - `gram diff` and `gram watch` now track import additions, removals, rebinding, rescaling, and dependency file changes. - Language Server and VS Code extension support live dependency composition, Go to Definition into base files, path auto-completion, and quick-fix diagnostics for missing exports. - Exported `createMemoryHost` from `@gram-lang/modules` for browser and in-memory module graph resolution. - Corrected whole-recipe mass and nutrition totals to accurately include spliced intermediate (`-> &`) masses. - Normalized rescaled ingredient quantities to one decimal place for display consistency across all outputs. ### Patch Changes - f617b4c: **Parser & Kitchen**: Improved clarity and tone for diagnostic messages and revised severity tiers: - Reworded compiler and module diagnostic messages to provide actionable guidance and avoid alarmist phrasing for standard culinary approximations. - Reclassified non-critical notices (`MISSING_MACROS`, `UNKNOWN_MASS`, `TRACK_CONTENTION`) to `info` severity so they do not clutter warning counters. - Enhanced Playground and editor diagnostic styling with dedicated color schemes for errors (red), warnings (amber), and notices (blue). - Updated dependencies [9331a4b] - Updated dependencies [c31a583] - Updated dependencies [f617b4c] - Updated dependencies [2bab3cd] - Updated dependencies [8a4056b] - Updated dependencies [aaf8cee] - @gram-lang/kitchen@1.2.0 - @gram-lang/i18n@1.2.0 - @gram-lang/parser@1.2.0 - @gram-lang/analyzer@1.2.0