@krigsvold/theme 2.0.0 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/docs/layout.md ADDED
@@ -0,0 +1,20 @@
1
+ # Krigsvold layout extraction
2
+
3
+ Release candidate: core 2.1.0 and Astro 1.1.0. Existing color, font, and component contracts remain available.
4
+
5
+ ## Source observations
6
+
7
+ - Originating site: [krigsvold.org](https://github.com/basuhoward/krigsvold.org/tree/a3cf072c516c59ed35814e0fa153028cc91ceecd). Inspected files: `src/layouts/Page.astro`, `src/components/HomeContent.astro`, `src/components/HomeHero.astro`, `src/styles/site.css`.
8
+ - Demonstration site: [krigsvoldtheme.dev](https://github.com/krigsvoldtheme/krigsvoldtheme/tree/880bdd2bd8430bbdfd8d728faaae0c21199540b1). Inspected files: `site/src/pages/index.astro`, `site/src/styles/global.css`, `site/src/components/FoundationSpecimen.astro`.
9
+
10
+ The originating site uses broad section bands, paired geography and feature regions, three-column work/metric groups, a main article plus fellowship facts, and image/copy listings. The demonstration site adds a full-width landscape opening, a single workbench, a paired contrast/token laboratory, and a three-card foundation specimen.
11
+
12
+ ## Reusable contract
13
+
14
+ The core retains its original reading/content/archive widths. New layout variables normalize recurring gaps, a 20rem sidebar, a 30rem minimum main region, a 20rem card minimum, and a 22rem split-panel basis. These are documented defaults, not a claim that every source element used exactly the same values. Krigsvold's default split is `equal`.
15
+
16
+ Use `@krigsvold/theme/layout.css` with foundation variables for structural classes; it loads no fonts or palette. `full.css` includes it. `layout.json` and the ESM/CommonJS `layout` export describe defaults and provenance. No existing source value is silently replaced.
17
+
18
+ Intrinsic wrapping responds to the containing region. Grid `columns` is a maximum, not a promise to fit that many columns at every width. Sidebars use a separate main-content minimum; splits retain DOM order. There is no overflow-hiding workaround. Wide tables belong in a labelled `.krigsvold-scroll` region with `tabindex="0"` when keyboard scrolling is needed.
19
+
20
+ The Astro package supplies wrappers, site chrome, and complete article, landing, and documentation compositions. Identity, route generation, content rendering, analytics, and consent remain host-owned. Header links wrap naturally; this release does not implement dropdown or disclosure-menu behavior.
@@ -0,0 +1,37 @@
1
+ # Krigsvold: a validated form
2
+
3
+ Experimental pattern contract 0.3 · Application extension · React reference specimen
4
+
5
+ ## Purpose and composition
6
+
7
+ Use this pattern for a deliberate submission with multiple related fields and recoverable errors. The specimen is a publication request with title, summary, request type, response name/address and a notification preference. It is a controlled documentation example; it sends nothing and stores nothing beyond the mounted specimen.
8
+
9
+ Define a request region, a response region and a command region. Use shared edges within each region, and a restrained boundary only where the job changes. Short related fields may align in columns when space permits. Supporting guidance follows the work in source order and can sit beside it when each region retains useful width. The command row belongs to the form it commits.
10
+
11
+ Use the field relationship for label, control, hint and error; group spacing for sibling fields; and region spacing between different decisions. A native fieldset and legend identify a real group. Do not add a card per field. Keep the primary submit action after the editable groups. Secondary discard/reset actions describe their consequence and remain visually subordinate. The specimen uses comfortable density; it introduces no compact-density API.
12
+
13
+ ## Validation and state transitions
14
+
15
+ | Trigger | Result | Focus and retained work |
16
+ | --- | --- | --- |
17
+ | Submit invalid fields | Show a summary and field-linked errors; mark only invalid controls. | Focus the summary; its links focus the actual controls. Keep all input. |
18
+ | Edit after an error | Retain the error until revalidation on submission. | Keep focus in the edited field. Do not announce validation on every keystroke. |
19
+ | Submit valid data | Enter pending state and prevent another submission. | Keep the form visible; make inputs temporarily unavailable and announce saving. |
20
+ | Simulated save failure | Explain that work is retained and offer retry. | Focus the actionable failure summary; preserve every field and preference. |
21
+ | Retry successfully | Commit the submitted values to the local example state and announce success. | Keep the same form and orientation; do not clear fields or move focus merely for success. |
22
+ | Reset a changed specimen | Open a native confirmation dialog with Keep editing and Discard changes. | Escape and Keep editing preserve the draft and return focus to Reset specimen. Discard resets the specimen and returns focus to that trigger. |
23
+ | Reset an unchanged specimen | Reset immediately. | Preserve orientation; no unnecessary dialog. |
24
+
25
+ The pending operation is short and simulated. Unmounting invalidates its completion; a late timer cannot update another specimen. Reset is unavailable while saving. The draft guard covers the specimen's Reset action; documentation navigation is outside that guard and unmounts the example. This is an explicit hosting boundary, not a claim of full application navigation protection.
26
+
27
+ ## Semantics and responsive behavior
28
+
29
+ Use native form, label, input, select, textarea, checkbox, fieldset and button semantics. Required indicators appear in labels and requirements in hints. Read-only text remains inspectable and available to native form behavior; disabled controls are temporarily unavailable. Do not invent readOnly support for a native select or checkbox. Name the form, error summary and dialog, and expose meaningful pending/saved state without repeated announcements.
30
+
31
+ At narrow widths the groups and actions stack in source order. Long text and enlarged text wrap without clipping. The guidance region follows the fields; no visual reordering changes keyboard order. Reduced motion does not remove state text. For print, retain the current values and context; hide only documentation inspection controls.
32
+
33
+ ## Implementation and evidence boundaries
34
+
35
+ React composes Field, TextInput, Textarea, Select, Checkbox, Fieldset, Button, ErrorSummary and Dialog. These are existing exports; no new form-controller API is implied. Core supplies typography and spacing roles. Astro can express the same native HTML structure, but validation, transport, draft management and focus transitions remain host code; there is no Astro Form controller in this candidate.
36
+
37
+ The reference includes validation, pending, failed/retry, saved and discard-dialog examples. Browser assertions cover values, linked errors, focus restoration, reflow and automated accessibility. Real server errors, conflict resolution, authentication, uploads and manual assistive-technology review remain outside this specimen. New controls and full dark mode remain experimental.
@@ -0,0 +1,42 @@
1
+ # Krigsvold: query, results and selection
2
+
3
+ Experimental pattern contract 0.3 · Application extension · React reference specimen
4
+
5
+ ## Purpose and composition
6
+
7
+ Use a results table when the task benefits from comparing several attributes across records. The reference uses the existing component catalogue as its dataset. Search, group filter, sorting, paging and selection are host logic composed from existing primitives. The preparation dialog makes no remote request or actual review decision.
8
+
9
+ Give query, committed results and selection commands separate jobs. Align names, groups and purposes within the table so comparisons share common edges. Keep the applied scope and pending request distinguishable. Selected-item commands operate on the visible result page and stay beside its count. These regional rules apply whether the query sits above or beside the work.
10
+
11
+ Visible search and filter labels name their scope. Enter or Apply query submits the draft query. Changing an unapplied input does not relabel old results. Show the committed query, result count and page independently of what is being typed. Put a table caption on the table and a keyboard-accessible name on its scrolling region. Do not make every row simultaneously mean selection, navigation and editing.
12
+
13
+ ## Query and result contract
14
+
15
+ | Event | Required behavior |
16
+ | --- | --- |
17
+ | Apply a changed search, filter or sort | Start at page 1. Retain old results with their applied-scope label while pending. Disable selection commands during the transition. |
18
+ | Pending result request | Announce loading, mark the result region busy, and retain useful content. Do not label previous results as matches for the new request. |
19
+ | Request fails | Explain that the previous results are still shown; preserve the failed request for Retry. Keep its old selection, with commands unavailable until results are current. |
20
+ | Retry succeeds | Commit the new result scope and announce its count. Clear the old page selection. |
21
+ | Change page | Request the page within the committed query/filter/sort; clear selection when the new page commits. |
22
+ | Refresh unchanged results | Retain selected identities that are still on the committed page. Do not restore selection by row index. |
23
+ | No matches | Name the applied scope and offer Clear query; retain the dataset. |
24
+ | Empty source dataset | Explain that no source records exist; do not present it as a failed query. |
25
+
26
+ The reference simulates asynchronous completion and an optional one-shot failure. Each request carries a generation: an obsolete completion cannot replace newer state or update an unmounted specimen. The available sample data and sorting are deterministic. No remote retrieval, server pagination or durable selection is claimed.
27
+
28
+ ## Selection and dialog contract
29
+
30
+ Selection means the checked records on the currently committed result page. Native checkboxes name each record. There is no select-all control, cross-page selection, mixed checkbox state or implied edit permission in this contract. The count is textual; row color is supplementary. Query/filter/sort/page changes clear selection only when their new result set commits. A failed request retains previous selection and scope for recovery.
31
+
32
+ Review selection opens a native modal listing the exact selected component names. Prepare comparison is a simulated operation. Failure keeps the dialog and selection available for retry. Success closes the dialog, retains selection and announces completion. Cancel or Escape cancels an in-flight preparation, preserves selection and returns focus to Review selection. A late completion cannot announce success after dismissal. No action in this specimen promotes component maturity or records a real readiness review.
33
+
34
+ Native dialog semantics make the background inert and keep modal keyboard behavior conventional. Non-modal navigation popups and disclosures do not inherit that modal contract or require a backdrop.
35
+
36
+ ## Responsive behavior and implementation
37
+
38
+ Query controls wrap into one coherent sequence; status and commands wrap without clipping. A genuinely comparative table may scroll within its labelled region at narrow widths. Keep its caption, row-selection labels and all columns. Do not hide data or turn each row into a different task simply to remove horizontal scrolling. Surrounding prose and controls must still reflow.
39
+
40
+ React uses Field, TextInput, Select, Checkbox, DataTable, Pagination, Button and Dialog. A host owns querying, sorting, paging, selection and request cancellation. Core owns the existing family styles. Astro native HTML guidance shares these semantics, but an interactive results controller is not supplied by the Astro package. Both languages permit a table or a list when the task supports it; neither is compulsory for one family.
41
+
42
+ Tests exercise changed/unapplied scope, pending and failed retrieval, retry, no matches, paging, selection reset, modal failure/cancel/success, focus restoration, long text, narrow reflow and automated accessibility. Manual screen-reader review, localization/RTL, large datasets and real network races remain open consumer work.
@@ -0,0 +1,27 @@
1
+ # Automated npm releases
2
+
3
+ GitHub Actions publishes stable GitHub releases through npm trusted publishing (OIDC), using `.github/workflows/publish.yml`. It requires no npm token secret.
4
+
5
+ ## One-time npm setup
6
+
7
+ Open [package settings](https://www.npmjs.com/package/@krigsvold/theme/access), then Trusted publishing, Add trusted publisher, GitHub Actions. Enter these exact values:
8
+
9
+ | Setting | Value |
10
+ | --- | --- |
11
+ | Organization/user | `krigsvoldtheme` |
12
+ | Repository | `npm` |
13
+ | Workflow filename | `publish.yml` |
14
+ | Environment | Leave blank |
15
+ | Allowed action | Enable direct `npm publish` |
16
+
17
+ The workflow must be merged before use. New trusted publisher connections must complete their first publish within two days; otherwise recreate the connection. Existing package maintainers configure this on npm. No npm account settings are changed by this PR.
18
+
19
+ ## Release
20
+
21
+ 1. Merge reviewed version and changelog changes to `main`.
22
+ 2. Publish a stable GitHub release whose tag is exactly `v` plus `package.json`'s version.
23
+ 3. The workflow runs the full verification suite, checks tag/version/repository identity and ancestry in `main`, builds from a fresh install, and publishes to npm. Failed checks prevent publication.
24
+
25
+ Release core 2.1.0 before Astro 1.1.0, then migrate the demonstration sites to registry versions. Prereleases do not publish through this stable-release workflow. Re-running a successful release fails rather than overwriting an existing npm version. Public repositories produce provenance attestations; private repositories publish with provenance disabled because npm does not support those attestations from private source repositories. Repository visibility is unchanged.
26
+
27
+ Reference: https://docs.npmjs.com/trusted-publishers/
@@ -0,0 +1,51 @@
1
+ # Krigsvold source decisions
2
+
3
+ Origin reconciliation 0.2 · Consolidation candidate · Original palette and existing defaults retained
4
+
5
+ Use krigsvold.org as the authority for existing objects. This profile distinguishes restored source roles from application extensions. The full grammar remains experimental. Original source commit: `a3cf072c516c59ed35814e0fa153028cc91ceecd`, repository `basuhoward/krigsvold.org`. Review `src/styles/site.css`, `src/components/SiteHeader.astro`, `SiteFooter.astro`, `src/layouts/Page.astro` and active Material Kit styles. The audit and reconciliation ledger record evidence and remaining limits.
6
+
7
+ ## Existing source objects
8
+
9
+ | Role | Decision | Source / reason |
10
+ | --- | --- | --- |
11
+ | Canvas/type | Paper #fbfaf7, ink #17202a, Roboto 1rem/1.65. Editorial prose 1.06rem/1.65. | Host overrides and live origin. |
12
+ | Headings | Roboto Slab, weight 700, source scale/leading/tracking. | Source global/editorial/masthead roles. Medium-weight alternate docs headings were removed. |
13
+ | UI labels | Roboto; .76rem/.16em uppercase blue eyebrow where the source uses it. | Source eyebrow and navbar. Roboto Mono is for code and useful numerical work, not ordinary status/folder labels. |
14
+ | Reading | Bounded 760px editorial measure with source hierarchy. Supporting facts can have their own region. | Page layout and editorial CSS. An accent rail/mono label is not mandatory article anatomy. |
15
+ | Desktop navbar | Navy rgba(6,19,37,.84), .4rem radius, white 20% border, 14px blur, source navbar shadow. | Source site-navbar. Docs retains a contained in-flow variant because there is no photographic masthead. |
16
+ | Desktop popup | White surface, ink text, ice hover; 15rem min width; .55rem padding; .3rem radius; source rule and `0 18px 44px rgba(6,19,37,.18)` shadow; white 12px pointer. | Source dropdown and live observation. The light surface is independent of the dark parent and full-page mode. |
17
+ | Popup item | .9rem/1.65 Roboto; .62rem/.7rem padding; small item radius. | Source dropdown-item. Use source SVG chevron. |
18
+ | Mobile navigation | Collapsed Menu below 992px; submenu static/indented/transparent on navy; no popup pointer, border or shadow. | Source mobile overrides. Do not impose desktop popup styling here. |
19
+ | Navigation behavior | Native details retains click/Enter/Space and exclusive groups; Escape restores summary, blur closes; mobile Menu Escape restores trigger. | Explicit implementation translation of source dropdown capability. Hover is visual feedback, not the only access route. |
20
+ | Search | Source field material, label and underline retained. Docs uses an explicitly labelled live component filter rather than site-wide GET search. | Source site-search visual role; task-specific documentation extension. |
21
+ | Primary action | Navy with blue hover in light mode; .75rem bold uppercase UI type, .035em tracking, .625rem/1.5rem padding. | Observed source navy button and foundation dimensions. Dark mode uses semantic contrast roles. |
22
+ | Input | Native control and own small radius, theme/source padding; keep visible labels. | Source control vocabulary; site-search is not the default general form geometry. |
23
+ | Table | .95rem UI type, .85rem/.7rem cells, top alignment, source rule; no arbitrary compact-family default. | Editorial source table. Explicit compact density remains future task-specific work. |
24
+ | Quote | 4px blue leading rule, Slab quotation text. | Editorial blockquote. |
25
+ | Footer | Navy identity column spanning two tracks, four link groups, and a separate ownership/contact base line; 5rem/1.5rem vertical padding, 48px desktop gap. | SiteFooter/site.css. The adopting host owns identities, organizations and destinations. |
26
+
27
+ ## Explicit application extensions
28
+
29
+ AppShell is an application frame, not the entire origin website. Both languages support top, side and none. The existing Krigsvold default side frame is retained for compatibility with the workbench; it is not a grammar requirement. The hard-coded rail colophon is removed.
30
+
31
+ No origin object establishes a universal Krigsvold TOC. The experimental index/inline extension uses native fragment navigation, unnumbered depth-aware hierarchy and reading order before body. A persistent rail appears only when the available width supports it. No invented accent top rule or mono eyebrow is required. DefinitionList supports rows, stack and grid in either family; source fellow facts already demonstrate stacking.
32
+
33
+ Task dialogs, validation summaries, notices, badges, switches, tabs, file controls and controlled result paging are explicit new application objects. They preserve native semantics, visible focus, clear labels and recoverable operations. ErrorSummary uses a leading severity rule, consistent with its task rather than a forced opposite Martlet treatment. Tabs use a selected underline, not an invented filled institutional badge. Invalid styling means `aria-invalid="true"`, never mere attribute presence.
34
+
35
+ Field/group/region roles are .5/1.5/3rem source-scale values with experimental relational assignments. Local density serves comparison; generous source page section spacing remains a different role. A 3px selection edge explains the current note, while nonnumeric status/folder labels use Roboto. The results/detail composition is a task choice, not compulsory Krigsvold anatomy.
36
+
37
+ Dark mode keeps the source object hierarchy and existing semantic contrast roles. The source desktop navbar popup remains light; mobile remains transparent on navy. New status/error/switch surfaces are application extensions and need state/contrast evidence. Code keeps theme roles pending a matched origin code specimen review.
38
+
39
+ ## Boundary and evidence
40
+
41
+ The theme-site crystal is the existing system mark used by documentation. It does not replace an adopting application's own identity or the origin institution's snowflake badge. Docs preview, finder, copy/download controls, simulated failure and session-only notes are host tooling.
42
+
43
+ Polar imagery, title/arms, award content, legal policy and analytics remain host responsibilities. Origin masthead, evidence/fellow/card/figure/FAQ variants outside the current 22 exports remain named vocabulary gaps, not silently shipped components. Full accessibility, RTL/localization and sustained-use evidence remain open. Read this profile with the grammar/API references; catalogue hashes do not ratify design choices.
44
+
45
+ ## Framework consolidation
46
+
47
+ Core 2.2.0 and Astro 1.2.0 are unreleased candidates. The source profile is an opt-in import and class; existing core defaults and existing Astro slots remain compatible. New TableOfContents and grouped SiteFooter anatomy are available in the paired candidate packages. React 0.1.0 retains its existing theme 2.1.0 dependency and React-specific events and focus contracts. Framework support is recorded in language.json. These additions do not make the grammar stable.
48
+
49
+ ## Grammar review 0.3
50
+
51
+ Validated forms and queried results add explicit application contracts for grouping, action scope, committed versus draft queries, current-page selection and modal recovery. These are experimental extensions, with separate family composition choices and shared native behavior. No original palette, mark, header direction or existing component default changes. Read docs/coverage.md and docs/patterns/ for the bounded evidence and remaining vocabulary.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@krigsvold/theme",
3
- "version": "2.0.0",
3
+ "version": "2.2.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -46,7 +46,12 @@
46
46
  "./design.json": "./dist/design.json",
47
47
  "./capabilities.json": "./dist/capabilities.json",
48
48
  "./package.json": "./package.json",
49
- "./legacy.css": "./dist/legacy.css"
49
+ "./legacy.css": "./dist/legacy.css",
50
+ "./layout.css": "./dist/layout.css",
51
+ "./layout.json": "./dist/layout.json",
52
+ "./patterns.css": "./dist/patterns.css",
53
+ "./source-profile.css": "./dist/source-profile.css",
54
+ "./language.json": "./dist/language.json"
50
55
  },
51
56
  "publishConfig": {
52
57
  "access": "public"