@tristan2828/ui-foundation 4.136.1 → 4.137.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/README.md +7 -6
- package/bin/ui-foundation.mjs +1 -1
- package/conventions/agents/spec-tester.md +3 -3
- package/conventions/docs/add-an-entity.md +722 -714
- package/conventions/docs/cell-patterns.md +206 -378
- package/conventions/docs/column-options.md +6 -12
- package/conventions/docs/design-language.md +293 -515
- package/conventions/docs/entity-plan-template.md +9 -7
- package/conventions/docs/reminders.md +12 -17
- package/conventions/docs/timed-screens.md +17 -20
- package/dist/components/app/action-error.js +1 -1
- package/dist/components/app/action-hint.js +1 -1
- package/dist/components/app/app-shell-bottom-bar.js +4 -4
- package/dist/components/app/app-shell-nav.d.ts +1 -1
- package/dist/components/app/app-shell-nav.js +1 -1
- package/dist/components/app/app-shell.d.ts +1 -1
- package/dist/components/app/app-shell.js +9 -9
- package/dist/components/app/board.d.ts +13 -13
- package/dist/components/app/board.js +3 -3
- package/dist/components/app/choice-buttons.d.ts +1 -1
- package/dist/components/app/data-table-tools.d.ts +3 -3
- package/dist/components/app/data-table.d.ts +11 -13
- package/dist/components/app/data-table.js +5 -5
- package/dist/components/app/date-field.js +1 -1
- package/dist/components/app/delete-action.d.ts +1 -1
- package/dist/components/app/delete-action.js +4 -4
- package/dist/components/app/edit-caret.js +1 -1
- package/dist/components/app/edit-in-place-presets.d.ts +4 -4
- package/dist/components/app/edit-in-place-store.d.ts +3 -3
- package/dist/components/app/edit-in-place-store.js +7 -7
- package/dist/components/app/editable-list.js +2 -3
- package/dist/components/app/editable-value.d.ts +2 -2
- package/dist/components/app/editable-value.js +20 -20
- package/dist/components/app/entity-form.js +2 -2
- package/dist/components/app/entity-view-facts.d.ts +12 -12
- package/dist/components/app/entity-view-facts.js +1 -1
- package/dist/components/app/entity-view.d.ts +16 -16
- package/dist/components/app/entity-view.js +28 -33
- package/dist/components/app/equal-items.js +4 -4
- package/dist/components/app/fact-extras.js +5 -5
- package/dist/components/app/field-rows.js +5 -5
- package/dist/components/app/fill-in-queue.js +2 -3
- package/dist/components/app/filter-bar.d.ts +1 -1
- package/dist/components/app/filter-date.js +1 -1
- package/dist/components/app/filter-name.js +1 -1
- package/dist/components/app/form-dialog.js +2 -2
- package/dist/components/app/form-leave-guard.js +2 -2
- package/dist/components/app/form-section.js +1 -1
- package/dist/components/app/icon-action.d.ts +1 -1
- package/dist/components/app/icon-action.js +2 -2
- package/dist/components/app/image-field.js +0 -1
- package/dist/components/app/keep-pencil-room.js +1 -1
- package/dist/components/app/key-stats.d.ts +3 -3
- package/dist/components/app/line-chart.d.ts +1 -1
- package/dist/components/app/line-chart.js +3 -3
- package/dist/components/app/list-editor-rows.js +1 -1
- package/dist/components/app/list-editor.js +1 -1
- package/dist/components/app/list-header.d.ts +6 -6
- package/dist/components/app/list-header.js +8 -8
- package/dist/components/app/markdown.js +30 -37
- package/dist/components/app/milkdown-editor.js +37 -62
- package/dist/components/app/module-card.js +6 -7
- package/dist/components/app/month-calendar.d.ts +46 -0
- package/dist/components/app/month-calendar.js +160 -0
- package/dist/components/app/month-day-field.js +0 -1
- package/dist/components/app/multi-choice.d.ts +1 -1
- package/dist/components/app/multi-choice.js +3 -3
- package/dist/components/app/multi-line-chart.js +1 -1
- package/dist/components/app/multi-pick.js +9 -10
- package/dist/components/app/multi-reference.js +2 -2
- package/dist/components/app/notes-outline.js +0 -1
- package/dist/components/app/notify.js +2 -2
- package/dist/components/app/offline-notice.js +1 -1
- package/dist/components/app/option-icon.js +1 -1
- package/dist/components/app/option-select.d.ts +1 -1
- package/dist/components/app/overview-page.d.ts +2 -2
- package/dist/components/app/overview-page.js +1 -1
- package/dist/components/app/page-trail-context.js +1 -1
- package/dist/components/app/pill-filter.d.ts +2 -2
- package/dist/components/app/prose-look.js +1 -1
- package/dist/components/app/rating-input.js +1 -1
- package/dist/components/app/rating-score.js +1 -1
- package/dist/components/app/record-dialog.js +25 -40
- package/dist/components/app/recurrence-field.js +6 -6
- package/dist/components/app/reference-combobox.js +1 -2
- package/dist/components/app/rich-text-box-anchor.js +0 -1
- package/dist/components/app/rich-text-edges.js +2 -2
- package/dist/components/app/rich-text-editor.d.ts +2 -3
- package/dist/components/app/rich-text-editor.js +19 -32
- package/dist/components/app/rich-text-empty-paragraph.d.ts +6 -7
- package/dist/components/app/rich-text-empty-paragraph.js +6 -7
- package/dist/components/app/rich-text-floating-toolbar.js +0 -1
- package/dist/components/app/rich-text-formats.js +2 -2
- package/dist/components/app/rich-text-input-rules.js +1 -2
- package/dist/components/app/rich-text-keyboard-bar.js +6 -7
- package/dist/components/app/rich-text-node-views.js +1 -2
- package/dist/components/app/rich-text-shortcuts.js +8 -8
- package/dist/components/app/rich-text-slash-menu.js +4 -6
- package/dist/components/app/rich-text-slash.d.ts +2 -2
- package/dist/components/app/rich-text-slash.js +2 -2
- package/dist/components/app/rich-text-table-grips.d.ts +1 -1
- package/dist/components/app/rich-text-table-grips.js +1 -2
- package/dist/components/app/rich-text-tasks.d.ts +1 -1
- package/dist/components/app/rich-text-tasks.js +1 -1
- package/dist/components/app/rich-text-touch.js +1 -1
- package/dist/components/app/search-palette.js +1 -2
- package/dist/components/app/secondary-filters.js +2 -3
- package/dist/components/app/session-view.js +1 -1
- package/dist/components/app/stacked-area-chart.js +1 -1
- package/dist/components/app/step-track.d.ts +1 -1
- package/dist/components/app/step-track.js +3 -3
- package/dist/components/app/widget-card.js +26 -30
- package/dist/components/app/widget-layout-sheet.js +1 -1
- package/dist/components/ui/calendar.js +2 -2
- package/dist/components/ui/combobox.d.ts +1 -1
- package/dist/components/ui/combobox.js +2 -2
- package/dist/components/ui/field.d.ts +1 -1
- package/dist/components/ui/field.js +6 -6
- package/dist/components/ui/skeleton.js +1 -1
- package/dist/components/ui/sonner.js +1 -1
- package/dist/components/ui/tabs.js +1 -1
- package/dist/error-reporting/reporter.d.ts +1 -1
- package/dist/error-reporting/reporter.js +1 -1
- package/dist/hooks/table-url-changes.d.ts +2 -2
- package/dist/hooks/table-url-changes.js +5 -6
- package/dist/hooks/use-action.js +1 -1
- package/dist/hooks/use-record-update.js +1 -1
- package/dist/hooks/use-table-url-state.d.ts +1 -1
- package/dist/hooks/use-table-url-state.js +2 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +3 -2
- package/dist/lib/audio-cues.js +2 -2
- package/dist/lib/connection.js +1 -1
- package/dist/lib/date-filter.js +1 -1
- package/dist/lib/entity-view-tab.js +1 -1
- package/dist/lib/field-rows.js +2 -2
- package/dist/lib/form-errors.d.ts +1 -1
- package/dist/lib/form-errors.js +1 -1
- package/dist/lib/keep-audio-alive.js +1 -1
- package/dist/lib/line-chart-layout.js +3 -3
- package/dist/lib/markdown-inline.js +0 -2
- package/dist/lib/markdown-merge.js +2 -2
- package/dist/lib/markdown-table-widths.js +1 -1
- package/dist/lib/markdown-table.js +1 -2
- package/dist/lib/markdown-toggle.js +1 -1
- package/dist/lib/page-leaving.js +1 -1
- package/dist/lib/recurrence-format.d.ts +2 -2
- package/dist/lib/recurrence-format.js +1 -1
- package/dist/lib/recurrence-phrase.d.ts +1 -1
- package/dist/lib/recurrence-phrase.js +2 -2
- package/dist/lib/recurrence.d.ts +1 -1
- package/dist/lib/recurrence.js +2 -2
- package/dist/lib/stale-chunk-reload.js +1 -1
- package/dist/lib/status-kinds.d.ts +1 -1
- package/dist/lib/status-kinds.js +2 -2
- package/dist/mocks/start-worker.js +2 -2
- package/dist/routes/login.js +1 -1
- package/dist/testing/index.d.ts +7 -4
- package/dist/testing/index.js +10 -13
- package/package.json +1 -1
- package/styles/index.css +3 -3
- package/styles/theme.css +14 -20
- package/vite/pwa.js +1 -1
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
// What a GFM table holds beyond its cells, read from the Markdown it
|
|
2
|
-
// already has, so nothing new is written into the text
|
|
3
|
-
// choice A, 2026-11-04):
|
|
2
|
+
// already has, so nothing new is written into the text :
|
|
4
3
|
//
|
|
5
4
|
// - A column's alignment: GFM's own (`:---:`, `---:`).
|
|
6
5
|
// - A cell's colour: its whole text in one highlight, `=={green}$4.99==`
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Toggle headings (Notion's): the only headings that fold. A plain
|
|
2
2
|
// heading never folds and never shows a fold button; a toggle heading
|
|
3
|
-
// folds its section
|
|
3
|
+
// folds its section.
|
|
4
4
|
//
|
|
5
5
|
// In Markdown a toggle heading is a heading whose line ends in Notion's
|
|
6
6
|
// own attribute, so a chat that writes Notion's Markdown writes it, and a
|
package/dist/lib/page-leaving.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// The page is going away (closing the tab, hidden on a phone): requests
|
|
2
2
|
// started now ask the browser to finish them after the page is gone
|
|
3
|
-
// (`keepalive`), so the last autosave still arrives
|
|
3
|
+
// (`keepalive`), so the last autosave still arrives. LeaveGuard
|
|
4
4
|
// marks it; the transport reads it. Only a body that fits the browser's
|
|
5
5
|
// keepalive budget (64 KB across the page's keepalive requests) goes
|
|
6
6
|
// that way: a longer note's save goes as an ordinary request, which the
|
|
@@ -4,7 +4,7 @@ export type RecurrenceFormatOptions = {
|
|
|
4
4
|
/** Leave the times out ("Every 2nd Tue"), for a cell beside a separate time. */
|
|
5
5
|
times?: boolean;
|
|
6
6
|
/**
|
|
7
|
-
* The app's week start (
|
|
7
|
+
* The app's week start (Monday when left out). An every-N-weeks
|
|
8
8
|
* rule whose WKST differs says so: "Every other week on Sun and Wed,
|
|
9
9
|
* weeks start Sun".
|
|
10
10
|
*/
|
|
@@ -23,7 +23,7 @@ export type OccurrenceFormatOptions = {
|
|
|
23
23
|
locale?: string;
|
|
24
24
|
/** What "now" is, for leaving out this year. Defaults to the clock. */
|
|
25
25
|
now?: Date;
|
|
26
|
-
/** Leave the time out ("Tue, Dec 8"), for a record whose times are its own
|
|
26
|
+
/** Leave the time out ("Tue, Dec 8"), for a record whose times are its own. */
|
|
27
27
|
time?: boolean;
|
|
28
28
|
};
|
|
29
29
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// A repeat in words
|
|
1
|
+
// A repeat in words: its label for a list's Repeats cell and the
|
|
2
2
|
// field's preview ("Every 2nd Tue at 9:00 AM"), and an occurrence's
|
|
3
3
|
// date and time for a Next cell ("Tue, Dec 8, 9:00 AM"), both read in the
|
|
4
4
|
// rule's own zone. Day and month names and times come from Intl, in the
|
|
@@ -9,7 +9,7 @@ export type PhraseOptions = {
|
|
|
9
9
|
/** The start when the phrase has no "starting". Defaults to `today`. */
|
|
10
10
|
start?: string;
|
|
11
11
|
/**
|
|
12
|
-
* The day weeks start on
|
|
12
|
+
* The day weeks start on: a weekly rule read with no "weeks
|
|
13
13
|
* start" gets it as its WKST (`'SU'` adds `WKST=SU`). Defaults to
|
|
14
14
|
* Monday, which is no WKST.
|
|
15
15
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// How a repeat is typed
|
|
1
|
+
// How a repeat is typed: a task app's phrases ("every 2nd tue at
|
|
2
2
|
// 9am", "every! 3 days", "every jan 1 until mar 1") read into a Recurrence
|
|
3
3
|
// as you type, with a clear refusal for what can't be read, and the way
|
|
4
4
|
// back, a Recurrence written as a phrase the reader takes again.
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
//
|
|
15
15
|
// then, in any order: `at 9am, 5:30pm` (`noon`, `17:00`), `starting dec 1`
|
|
16
16
|
// (`from`), `until mar 1` (`ending`), `for 10 times`, `weeks start sun`
|
|
17
|
-
// (WKST
|
|
17
|
+
// (WKST). A day with no year is the next one: from today for
|
|
18
18
|
// `starting`, from the start for `until`.
|
|
19
19
|
import { formatRule, normalizeRecurrence, parseRule, RecurrenceError, WEEKDAY_CODES, weekStartMatters, } from './recurrence.js';
|
|
20
20
|
const WEEKDAY_WORDS = [
|
package/dist/lib/recurrence.d.ts
CHANGED
|
@@ -23,7 +23,7 @@ export type RuleParts = {
|
|
|
23
23
|
/**
|
|
24
24
|
* WKST: the day weeks start on (Monday 0 to Sunday 6), or null for
|
|
25
25
|
* Monday, RFC 5545's default. `WKST=MO` reads as null, so it isn't stored.
|
|
26
|
-
* Optional
|
|
26
|
+
* Optional, so parts an app builds without it still are parts.
|
|
27
27
|
*/
|
|
28
28
|
weekStart?: number | null;
|
|
29
29
|
};
|
package/dist/lib/recurrence.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Repeating schedules
|
|
1
|
+
// Repeating schedules: one rule, stored RRULE-shaped (RFC 5545), and
|
|
2
2
|
// when it falls next. The backend's `foundation_backend.recurrence` is the
|
|
3
3
|
// same rules in Python; both read tests/fixtures/recurrence-cases.json, so
|
|
4
4
|
// a screen and the server agree on every next occurrence.
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
// days, Feb 29 only in leap years, and -1 is every month's last day. COUNT
|
|
18
18
|
// counts occurrences, each time of each day.
|
|
19
19
|
//
|
|
20
|
-
// WKST
|
|
20
|
+
// WKST says which day a week starts on, for the weeks an
|
|
21
21
|
// every-N-weeks rule counts: `FREQ=WEEKLY;INTERVAL=2;BYDAY=SU,WE;WKST=SU`
|
|
22
22
|
// from Wednesday 2026-11-04 next falls on Sunday the 15th (with weeks from
|
|
23
23
|
// Monday, the default, on the 8th). It changes nothing else here; a rule
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// After a deploy, a tab opened on the build before it still runs that
|
|
2
2
|
// build, and its content-hashed chunks are gone from the server: the next
|
|
3
3
|
// lazy import (the rich-text editor's, say) fails with "Failed to fetch
|
|
4
|
-
// dynamically imported module"
|
|
4
|
+
// dynamically imported module". Vite's preload helper announces it
|
|
5
5
|
// first as a cancelable `vite:preloadError` on `window`, for the package's
|
|
6
6
|
// own lazy chunks too once the app's build bundles them. On it, the page
|
|
7
7
|
// reloads once onto the new build, and the failure is not reported.
|
|
@@ -8,7 +8,7 @@ export declare const STATUS_KIND_ICONS: Record<StatusKind, IconComponent>;
|
|
|
8
8
|
export declare const STATUS_KIND_LABELS: Record<StatusKind, string>;
|
|
9
9
|
/**
|
|
10
10
|
* Each kind's colour, for the icon and the word: *-text tokens only. Done
|
|
11
|
-
* is a teal and ended a soft rose (
|
|
11
|
+
* is a teal and ended a soft rose (--status-done-text and
|
|
12
12
|
* --status-ended-text), so a finished or stopped record no longer reads as
|
|
13
13
|
* a grey, disabled one.
|
|
14
14
|
*/
|
package/dist/lib/status-kinds.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// The six status kinds (
|
|
1
|
+
// The six status kinds (record standard 5B) and how each is drawn:
|
|
2
2
|
// StatusMark (components/app/status-mark.tsx) reads these. The icons are
|
|
3
3
|
// one map, STATUS_KIND_ICONS: changing one here changes it everywhere.
|
|
4
4
|
import { CircleCheckIcon, CircleDashedIcon, CircleDotIcon, CirclePauseIcon, CircleSlash2Icon, TriangleAlertIcon, } from 'lucide-react';
|
|
@@ -24,7 +24,7 @@ export const STATUS_KIND_LABELS = {
|
|
|
24
24
|
};
|
|
25
25
|
/**
|
|
26
26
|
* Each kind's colour, for the icon and the word: *-text tokens only. Done
|
|
27
|
-
* is a teal and ended a soft rose (
|
|
27
|
+
* is a teal and ended a soft rose (--status-done-text and
|
|
28
28
|
* --status-ended-text), so a finished or stopped record no longer reads as
|
|
29
29
|
* a grey, disabled one.
|
|
30
30
|
*/
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
// only a runtime handler answers is made first; until it comes back
|
|
17
17
|
// mocked, the page joins the list again.
|
|
18
18
|
//
|
|
19
|
-
// After boot the same restart can happen mid-session (
|
|
20
|
-
// booted page
|
|
19
|
+
// After boot the same restart can happen mid-session (requests from a
|
|
20
|
+
// booted page go to the network). Nothing in
|
|
21
21
|
// the page hears it: a restarted worker is the same `controller`, so no
|
|
22
22
|
// `controllerchange` fires. What the page can see is a request the worker
|
|
23
23
|
// never handed it: MSW's client emits `request:start` for every request the
|
package/dist/routes/login.js
CHANGED
|
@@ -6,7 +6,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
6
6
|
// destination — so this uses the same mandated FieldGroup/Field primitives
|
|
7
7
|
// directly (AGENTS.md "Correct Patterns").
|
|
8
8
|
//
|
|
9
|
-
// Two steps when the account has TOTP
|
|
9
|
+
// Two steps when the account has TOTP: the password, then a code
|
|
10
10
|
// from an authenticator app or a recovery code. No session exists between
|
|
11
11
|
// them; the server keeps a pending sign-in for a few minutes, and when it
|
|
12
12
|
// has gone (expired, out of tries) the screen goes back to the password
|
package/dist/testing/index.d.ts
CHANGED
|
@@ -7,9 +7,12 @@ export { expect };
|
|
|
7
7
|
/**
|
|
8
8
|
* Makes the page's `goto()` and `reload()` wait first until none of the
|
|
9
9
|
* page's own `/api/` requests has been in flight for 150 ms (at most 3 s,
|
|
10
|
-
* and reaching that never fails the test)
|
|
11
|
-
*
|
|
12
|
-
*
|
|
10
|
+
* and reaching that never fails the test). Why: a save's answer comes from
|
|
11
|
+
* the mocks, but its follow-up refresh is sent by the page as it unloads,
|
|
12
|
+
* after MSW's client has told the worker the page is gone, so the worker
|
|
13
|
+
* passes it to the network and the bypass check fails the test (about 1 run
|
|
14
|
+
* in 20 in one app). Waiting lets the page that sent the refresh get its
|
|
15
|
+
* answer on the mocks. They then return once the app has
|
|
13
16
|
* booted (its first render into `#root`), not at the load event, and load
|
|
14
17
|
* the page once more when one of the app's own files is refused before
|
|
15
18
|
* then; a second refusal fails naming the file. The wait is bounded by
|
|
@@ -39,7 +42,7 @@ export type MswBypassWatch = {
|
|
|
39
42
|
* the mock service worker (`response.fromServiceWorker()` false), which
|
|
40
43
|
* means the request went to the network: to the preview server's proxy,
|
|
41
44
|
* and from there to whatever listens on its port. A test that passed on
|
|
42
|
-
* data from there didn't test the mocks
|
|
45
|
+
* data from there didn't test the mocks.
|
|
43
46
|
*
|
|
44
47
|
* A bypass the app healed doesn't count: since the rejoin in
|
|
45
48
|
* `startMockWorker`, a page whose worker forgot it makes the request again
|
package/dist/testing/index.js
CHANGED
|
@@ -57,15 +57,9 @@ async function boot(page, load, again) {
|
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
|
-
//
|
|
61
|
-
//
|
|
62
|
-
//
|
|
63
|
-
// worker passes it to the network and the bypass check fails the test
|
|
64
|
-
// (about 1 run in 20 in one app). So before the page navigates, wait
|
|
65
|
-
// until none of its own /api/ requests has been in flight for SETTLE_QUIET_MS,
|
|
66
|
-
// at most SETTLE_CAP_MS: the refresh then lands on the page that sent it.
|
|
67
|
-
// The cap only bounds the wait (a request that never ends, a stream);
|
|
68
|
-
// reaching it never fails the test.
|
|
60
|
+
// The settle wait before a navigation (why: `withBootWait`'s JSDoc). Quiet for
|
|
61
|
+
// SETTLE_QUIET_MS, at most SETTLE_CAP_MS; the cap only bounds the wait (a
|
|
62
|
+
// request that never ends, a stream) and never fails the test.
|
|
69
63
|
const SETTLE_QUIET_MS = 150;
|
|
70
64
|
const SETTLE_CAP_MS = 3000;
|
|
71
65
|
const SETTLE_POLL_MS = 25;
|
|
@@ -114,9 +108,12 @@ function trackApi(page) {
|
|
|
114
108
|
/**
|
|
115
109
|
* Makes the page's `goto()` and `reload()` wait first until none of the
|
|
116
110
|
* page's own `/api/` requests has been in flight for 150 ms (at most 3 s,
|
|
117
|
-
* and reaching that never fails the test)
|
|
118
|
-
*
|
|
119
|
-
*
|
|
111
|
+
* and reaching that never fails the test). Why: a save's answer comes from
|
|
112
|
+
* the mocks, but its follow-up refresh is sent by the page as it unloads,
|
|
113
|
+
* after MSW's client has told the worker the page is gone, so the worker
|
|
114
|
+
* passes it to the network and the bypass check fails the test (about 1 run
|
|
115
|
+
* in 20 in one app). Waiting lets the page that sent the refresh get its
|
|
116
|
+
* answer on the mocks. They then return once the app has
|
|
120
117
|
* booted (its first render into `#root`), not at the load event, and load
|
|
121
118
|
* the page once more when one of the app's own files is refused before
|
|
122
119
|
* then; a second refusal fails naming the file. The wait is bounded by
|
|
@@ -143,7 +140,7 @@ export function withBootWait(page) {
|
|
|
143
140
|
* the mock service worker (`response.fromServiceWorker()` false), which
|
|
144
141
|
* means the request went to the network: to the preview server's proxy,
|
|
145
142
|
* and from there to whatever listens on its port. A test that passed on
|
|
146
|
-
* data from there didn't test the mocks
|
|
143
|
+
* data from there didn't test the mocks.
|
|
147
144
|
*
|
|
148
145
|
* A bypass the app healed doesn't count: since the rejoin in
|
|
149
146
|
* `startMockWorker`, a page whose worker forgot it makes the request again
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tristan2828/ui-foundation",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.137.0",
|
|
4
4
|
"description": "Shared UI foundation for contract-first, database-backed React apps: shadcn primitives, DataTable/EntityForm composites, auth, the gateway error seam, design tokens, lint rules and the AI playbook.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
package/styles/index.css
CHANGED
|
@@ -636,7 +636,7 @@
|
|
|
636
636
|
margin-inline: 0;
|
|
637
637
|
}
|
|
638
638
|
|
|
639
|
-
/* Forms (
|
|
639
|
+
/* Forms (the form standard; field.tsx and entity-form.tsx).
|
|
640
640
|
Compact: controls inside a FieldGroup and on a form's bar read
|
|
641
641
|
--control-height (Input, SelectTrigger, InputGroup, the combobox's chips
|
|
642
642
|
box and a default Button), 32px, or 40px under 48rem or on a touch
|
|
@@ -680,7 +680,7 @@
|
|
|
680
680
|
[data-slot="field-group"] > [data-field-row][data-phone-pair] {
|
|
681
681
|
width: calc((100% - var(--spacing) * 3) / 2 - 0.05px);
|
|
682
682
|
}
|
|
683
|
-
/* Two choices (
|
|
683
|
+
/* Two choices (9C): each starts as wide as its buttons on one
|
|
684
684
|
line (up to the row), so two that fit share the row, growing into
|
|
685
685
|
what's left, and when they don't the second wraps under the first
|
|
686
686
|
and each grows to the row. */
|
|
@@ -705,7 +705,7 @@
|
|
|
705
705
|
}
|
|
706
706
|
}
|
|
707
707
|
|
|
708
|
-
/* Toasts on a phone sit at the bottom (
|
|
708
|
+
/* Toasts on a phone sit at the bottom (ui/sonner.tsx), above
|
|
709
709
|
whatever is pinned there: EntityForm's stuck bar sets
|
|
710
710
|
--toast-bottom-offset itself; failing that, the shell's bottom bar is
|
|
711
711
|
the room to clear, or the phone's safe area. */
|
package/styles/theme.css
CHANGED
|
@@ -7,9 +7,7 @@
|
|
|
7
7
|
* text-muted-foreground, ...). Remapped per theme/mode; primitives are not.
|
|
8
8
|
*
|
|
9
9
|
* The values below are shadcn's generated defaults (Nova preset),
|
|
10
|
-
* reorganized into the two-layer shape.
|
|
11
|
-
* exist; Phase 5 is where the primitive palette itself is deliberately
|
|
12
|
-
* chosen and this file's diff should be small.
|
|
10
|
+
* reorganized into the two-layer shape.
|
|
13
11
|
*/
|
|
14
12
|
|
|
15
13
|
:root {
|
|
@@ -42,7 +40,7 @@
|
|
|
42
40
|
* Reusing a fill shade as text is the classic failure: it was chosen to
|
|
43
41
|
* contrast with white, not with the page behind it. Every ratio below is
|
|
44
42
|
* measured (WCAG 2.x, sRGB), and axe re-checks them against the rendered
|
|
45
|
-
* DOM in both themes — see e2e/
|
|
43
|
+
* DOM in both themes — see e2e/fixtures-visual.spec.ts.
|
|
46
44
|
*/
|
|
47
45
|
--red-500: oklch(0.577 0.245 27.325); /* white on it: 4.76 */
|
|
48
46
|
--red-700: oklch(0.5 0.21 27.325); /* on white: 6.57 */
|
|
@@ -56,7 +54,7 @@
|
|
|
56
54
|
--blue-700: oklch(0.52 0.17 255); /* white on it: 5.59 */
|
|
57
55
|
--blue-800: oklch(0.45 0.15 255); /* on white: 7.54 */
|
|
58
56
|
--blue-400: oklch(0.75 0.12 255); /* on near-black: 8.90 */
|
|
59
|
-
/* The two status kinds that have stopped (
|
|
57
|
+
/* The two status kinds that have stopped (StatusMark's done and
|
|
60
58
|
ended): text shades only, nothing fills with them. A teal for done,
|
|
61
59
|
a hue away from success's green, and a soft rose for ended, a hue
|
|
62
60
|
away from destructive's red. On white / gray-100 / gray-200, and on
|
|
@@ -75,7 +73,7 @@
|
|
|
75
73
|
* to a slot in its own columns file, so a new enum value costs a line
|
|
76
74
|
* there rather than three tokens here.
|
|
77
75
|
*
|
|
78
|
-
* Chosen to be told apart
|
|
76
|
+
* Chosen to be told apart, not spaced by hue: twelve colours a
|
|
79
77
|
* person names differently, from the whole hue circle, with lightness and
|
|
80
78
|
* chroma varied per slot as well as hue. Red, orange, brown and green are
|
|
81
79
|
* in: a category is a tinted glyph beside its name, never a status badge,
|
|
@@ -91,8 +89,7 @@
|
|
|
91
89
|
*
|
|
92
90
|
* Ratios are against the page, measured (WCAG 2.x, sRGB): all clear the
|
|
93
91
|
* 3:1 non-text minimum in both themes (3.75:1 at the least, orange and
|
|
94
|
-
* teal on white). axe does NOT check icon contrast; the
|
|
95
|
-
* check re-measures every slot on the page and on a card
|
|
92
|
+
* teal on white). axe does NOT check icon contrast; the glyph check in e2e/fixtures-visual.spec.ts re-measures every slot on the page and on a card
|
|
96
93
|
* (patterns/CategoricalColour).
|
|
97
94
|
*/
|
|
98
95
|
--category-1-700: oklch(0.44 0.11 245); /* blue */
|
|
@@ -160,10 +157,7 @@
|
|
|
160
157
|
* One hue per slot, the slot's own (its --category-N hue), across all five
|
|
161
158
|
* steps in both themes; only lightness and chroma change. Depth is
|
|
162
159
|
* contrast with the page, so a higher step is darker in light and
|
|
163
|
-
* brighter in dark, and the order survives in greyscale.
|
|
164
|
-
* was bent a little to push neighbours apart, which read as drift, orange
|
|
165
|
-
* to pink and purple to magenta, and dark ran the wrong way, a higher
|
|
166
|
-
* step darker, ending in a step almost grey.) Chroma follows what the
|
|
160
|
+
* brighter in dark, and the order survives in greyscale. Chroma follows what the
|
|
167
161
|
* gamut allows at each lightness, so each ramp reads as one tint, and no
|
|
168
162
|
* step falls under oklch chroma 0.03. Every dark palette takes dark's;
|
|
169
163
|
* Palm LCD, the light one, has its own on the same rule (its primitives).
|
|
@@ -395,7 +389,7 @@
|
|
|
395
389
|
--palette-success: #66d69a;
|
|
396
390
|
--palette-warning: #e0b152;
|
|
397
391
|
--palette-danger: #df7a72;
|
|
398
|
-
/* Done (a teal) and ended (a soft rose), the stopped status kinds
|
|
392
|
+
/* Done (a teal) and ended (a soft rose), the stopped status kinds.
|
|
399
393
|
On bg / card / raised, the lowest palette: done 8.86 / 7.86 / 6.80,
|
|
400
394
|
ended 7.37 / 6.54 / 5.66. */
|
|
401
395
|
--palette-done: #56c6cf;
|
|
@@ -658,14 +652,14 @@
|
|
|
658
652
|
--success-text: var(--green-800);
|
|
659
653
|
--warning-text: var(--amber-800);
|
|
660
654
|
--info-text: var(--blue-800);
|
|
661
|
-
/* The status kinds that have stopped
|
|
655
|
+
/* The status kinds that have stopped: done and ended, for
|
|
662
656
|
StatusMark's icon and word (lib/status-kinds.ts). */
|
|
663
657
|
--status-done-text: var(--teal-800);
|
|
664
658
|
--status-ended-text: var(--rose-700);
|
|
665
659
|
/* A link in written text: coloured as well as underlined, so it reads
|
|
666
660
|
as a link at a glance (on white: 5.59). */
|
|
667
661
|
--link: var(--blue-700);
|
|
668
|
-
/* The theme colour as text
|
|
662
|
+
/* The theme colour as text: what's picked or open, such as the
|
|
669
663
|
open tab's name and a picked choice, in the primary's own colour where
|
|
670
664
|
it reads as text. Here it's the primary (near-black, 17.7 on white). */
|
|
671
665
|
--primary-text: var(--primary);
|
|
@@ -682,8 +676,8 @@
|
|
|
682
676
|
/* The band behind a `#` heading in written text: one step stronger than
|
|
683
677
|
--muted, which `##`'s band takes. Its foot is a 2px --rule. */
|
|
684
678
|
--heading-band: var(--gray-200);
|
|
685
|
-
/*
|
|
686
|
-
|
|
679
|
+
/* A heading bar colour; nothing in the package uses it. Kept for an app
|
|
680
|
+
that does (on white: 5.59). */
|
|
687
681
|
--heading-bar: var(--blue-700);
|
|
688
682
|
/* Categorical slots — a glyph tint, never a fill behind text. */
|
|
689
683
|
--category-1: var(--category-1-700);
|
|
@@ -835,14 +829,14 @@
|
|
|
835
829
|
matches the row without letting scrolled columns show through. Mixed
|
|
836
830
|
in sRGB, as the browser composites the translucent stripe. */
|
|
837
831
|
--table-stripe: color-mix(in srgb, var(--muted) 40%, var(--background));
|
|
838
|
-
/* A highlighted row (DataTable's highlightRow
|
|
832
|
+
/* A highlighted row (DataTable's highlightRow): info's wash
|
|
839
833
|
pre-mixed onto the page, opaque so pinned cells can wear it. Muted
|
|
840
834
|
text measures 4.09:1 on it (below 4.5 at 12px; no lighter tint gets
|
|
841
835
|
there: 4.47 at 4%), so inside the row muted text takes a darker grey:
|
|
842
836
|
6.75:1. In dark the usual muted already clears it (6.61:1). */
|
|
843
837
|
--table-highlight: color-mix(in srgb, var(--info) 10%, var(--background));
|
|
844
838
|
--table-highlight-muted-foreground: var(--gray-600);
|
|
845
|
-
/* A body row under the pointer (DataTable
|
|
839
|
+
/* A body row under the pointer (DataTable): the muted fill, solid
|
|
846
840
|
so pinned cells can wear it. Muted text measures 4.34:1 on it, so the
|
|
847
841
|
row takes --table-highlight-muted-foreground's darker grey (7.0:1).
|
|
848
842
|
In dark the usual muted clears it (5.9:1); a palette's dim, 5.8. */
|
|
@@ -879,7 +873,7 @@
|
|
|
879
873
|
/*
|
|
880
874
|
* Regular rows, a device's pick in the shell's look menu (lib/rows.ts,
|
|
881
875
|
* FoundationProviders' rowsPicker): RowsProvider puts data-rows on <html>.
|
|
882
|
-
* The
|
|
876
|
+
* The compact row size. A data-density on a nearer
|
|
883
877
|
* ancestor still wins, since it is declared closer to the cells.
|
|
884
878
|
*/
|
|
885
879
|
[data-rows="regular"] {
|
package/vite/pwa.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// `pwa()` from `@tristan2828/ui-foundation/vite`: the app installable (a web
|
|
2
2
|
// manifest and icons) and the service worker reminders arrive through
|
|
3
|
-
|
|
3
|
+
//. An app's vite.config.ts:
|
|
4
4
|
//
|
|
5
5
|
// import buildInfo, { pwa } from '@tristan2828/ui-foundation/vite'
|
|
6
6
|
// plugins: [react(), tailwindcss(), buildInfo(), pwa({ name: 'Morning Routines', shortName: 'Routines' })]
|