@oprt/manifest 0.4.0 → 0.6.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/dist/components.json +1 -1
- package/dist/guidance.json +1 -1
- package/dist/manifest.json +17 -16
- package/package.json +1 -1
package/dist/guidance.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"setup":{"tailwind":"Tailwind CSS 4.3.3 or a later 4.x release. Tailwind 4 has no presets and no tailwind.config for this: OPERATOR is added to the stylesheet as a plugin (`@plugin`).","packages":[{"name":"tailwindcss","dev":true,"why":"Tailwind CSS 4, set up the way the framework does (`@tailwindcss/vite`, `@tailwindcss/postcss` or the Tailwind CLI)."},{"name":"@oprt/tailwind","dev":true,"why":"The plugin that turns the tokens into utilities such as `bg-oprt-surface-1`."},{"name":"@oprt/tokens","dev":false,"why":"The CSS custom properties, the Bone theme and the fonts. The utilities only point at them."},{"name":"react-dom","dev":false,"why":"A peer of every OPERATOR source; `react` is listed with the dependencies."}],"stylesheet":[{"line":"@plugin \"@oprt/tailwind\";","why":"Turns OPERATOR's tokens into utilities. Without it the utilities do not exist, and the build does not say so."}],"package_source":{"when":"@oprt/react","line":"@source \"../node_modules/@oprt/react/dist\";","why":"A recipe imports @oprt/react, whose compiled components Tailwind does not scan on its own: without this line they render unstyled and the build does not say so. The path is relative to the stylesheet. Source copied into the project is scanned without it."},"root_import":"import \"@oprt/tokens\";","root_import_note":"Once, at the application root, before the stylesheet; from JavaScript or a `<link>`, not with an `@import` inside the Tailwind stylesheet (the Tailwind CLI inlines an imported file without rewriting its font URLs).","not_needed":[{"name":"@oprt/tokens-operational","why":"Opt-in MIL-STD-2525 affiliation colors. No component or recipe reads them; add them only for your own symbology."}]},"rules":[{"id":"look-it-up","rule":"Look a component up before using it (`oprt component <Name>`). A prop or value that is not in its contract does not exist; do not guess from other libraries.","wrong":"<Button isLoading leftIcon={<Spinner />} color=\"green\">Save</Button>","right":"<Button disabled={saving}>Save</Button>"},{"id":"components-before-markup","rule":"Use an OPERATOR component before writing markup. A native button, input, select, table or dialog, or a styled div standing in for one, is an escape hatch: search first (`oprt search <need>`).","wrong":"<button className=\"border px-3u\">Deploy</button>","right":"<Button>Deploy</Button>"},{"id":"start-from-a-recipe","rule":"For a whole screen, start from a recipe and adapt it (`oprt search <need>`, then `oprt add <recipe>`). Composing a screen from nothing is the last resort."},{"id":"one-primary-action","rule":"One primary Button in view at a time. It is the only button with a cut corner at rest, so two of them say there are two main actions. Use secondary or tertiary for the rest.","wrong":"<Button>Save</Button> <Button>Export</Button> <Button>Share</Button>","right":"<Button>Save</Button> <Button variant=\"secondary\">Export</Button> <Button variant=\"tertiary\">Share</Button>"},{"id":"no-invented-variants","rule":"When the option you want is missing, the answer is another component, not a new value. A green button is not a Button variant: status is a Badge.","wrong":"<Button variant=\"success\">Online</Button>","right":"<Badge variant=\"success\">Online</Badge>"},{"id":"status-in-words","rule":"Status is never color alone. Say it in words with a Badge or an Alert.","wrong":"<span className=\"text-oprt-error\">●</span>","right":"<Badge variant=\"error\">Link lost</Badge>"},{"id":"fields-wrap-controls","rule":"Wrap every form control in a Field. The Field wires the label, help text and error to the control; do not set id or aria attributes for that yourself.","wrong":"<label htmlFor=\"callsign\">Call sign</label> <Input id=\"callsign\" />","right":"<Field label=\"Call sign\"><Input /></Field>"},{"id":"parts-inside-parents","rule":"A part goes inside its parent, and only what a parent allows goes inside it: CardHeader in Card, TabsTrigger in TabsList, SelectOption in Select. Nothing you can click goes inside a Button or a Badge."},{"id":"tokens-only","rule":"Color, spacing and type come from OPERATOR tokens. No hex or rgb colors, no arbitrary pixel values, and no rounded corners: the radius is 0 everywhere.","wrong":"className=\"bg-[#1a1a1a] p-[13px] rounded-md\"","right":"className=\"bg-oprt-surface-1 p-2u\""},{"id":"write-labels-plainly","rule":"Write labels in normal case. Buttons, tabs, badges and headings uppercase themselves; names, IDs, values and body text keep the case you give them. Never uppercase a string in code.","wrong":"<Button>{label.toUpperCase()}</Button>","right":"<Button>Deploy</Button>"},{"id":"dark-only","rule":"There is one theme and it is dark. Do not add a light theme, a theme switch, or dark: variants."},{"id":"unknown-is-a-state","rule":"Unknown, stale and unavailable are states to show, never values to fill in. Keep the UTC label on a time, and keep data quality separate from the condition of the thing measured."},{"id":"let-components-own-behavior","rule":"Pass data and settings as props. Sorting, focus, keyboard handling and announcements belong to the component; do not rebuild them around it."},{"id":"check-before-done","rule":"Before you call the work done, run `oprt check <paths>` and fix what it reports."}],"components":{"ActionStatus":{"use_for":["show the outcome of an action the user just took, with a way to retry"],"not_for":[{"need":"a long-running job with progress","use":"JobStatus"},{"need":"a brief confirmation that needs no follow-up","use":"Toast"}]},"Alert":{"use_for":["an inline message that needs attention: error, warning, info or success","a callout"],"not_for":[{"need":"a brief confirmation that goes away","use":"Toast"},{"need":"a decision the user must make before going on","use":"ConfirmDialog"},{"need":"a short status label in a row or header","use":"Badge"}]},"AppShell":{"use_for":["the frame of an app or workspace: its name, mode, data connection and UTC time","hold the app's Sidebar, as its navigation"],"values":{"connection":{"connected":"The data link is up.","connecting":"The first attempt is in progress.","reconnecting":"The link dropped and is being retried.","offline":"There is no link; what is on screen is not updating.","unknown":"The application has not reported a state. The default: never assume connected."}}},"AttachmentPreview":{"use_for":["show an attached file: its name, type, size and a safe preview"]},"Avatar":{"use_for":["show a person or unit by initials"],"not_for":[{"need":"show a status","use":"Badge"}],"values":{"size":{"sm":"Dense rows and lists.","md":"The default.","lg":"The header of a profile or detail page."}}},"Badge":{"use_for":["show a status label","a category or count that is read, not clicked"],"not_for":[{"need":"something the user clicks","use":"Button"},{"need":"toggle filters","use":"FilterBar"},{"need":"removable tags","use":"TagGroup"}],"values":{"variant":{"success":"Nominal, healthy or completed.","warning":"Degraded, or needs attention soon.","error":"Failed, in alarm or blocked.","info":"A neutral notice, or in progress.","neutral":"A category or count with no severity. The default."}}},"Breadcrumb":{"use_for":["show where a page sits in the hierarchy"]},"BulkActionBar":{"use_for":["act on several selected rows at once"]},"BulkResults":{"use_for":["show what happened to each item after a bulk action"]},"ButtonGroup":{"use_for":["a row of related buttons","a segmented set of actions"],"not_for":[{"need":"toggle filters above a list","use":"FilterBar"},{"need":"switch between views","use":"Tabs"}],"values":{"orientation":{"horizontal":"The default: a row.","vertical":"Stacked, in a narrow column."}}},"Button":{"use_for":["trigger an action","submit a form"],"not_for":[{"need":"go to another page","use":"Link"},{"need":"show a status","use":"Badge"},{"need":"copy a value to the clipboard","use":"CopyButton"}],"values":{"variant":{"primary":"The one main action of a view or dialog. At most one in view: it carries the cut corner.","secondary":"Other important actions beside the primary.","tertiary":"Low-emphasis actions: toolbars, and actions repeated on every row.","danger":"A destructive or irreversible action. Pair it with ConfirmDialog.","ghost":"The least emphasis: an inline action inside dense content."},"size":{"sm":"Dense tables, toolbars and the inside of cards.","md":"The default.","lg":"The main call to action on a page, and touch-first screens."}}},"Calendar":{"use_for":["pick a day from a month grid that is always visible"],"not_for":[{"need":"a date field that opens a calendar","use":"DatePicker"}]},"Card":{"use_for":["group related content in a bordered panel"],"not_for":[{"need":"one headline metric","use":"StatCard"},{"need":"label and value facts","use":"DescriptionList"}]},"CardHeader":{"part_of":"Card"},"CardBody":{"part_of":"Card"},"CardFooter":{"part_of":"Card"},"Chart":{"use_for":["plot data as a line, area, bar, scatter, histogram or heatmap"],"not_for":[{"need":"a tiny trend inside a row or card","use":"Sparkline"},{"need":"one number with its trend","use":"StatCard"}],"values":{"variant":{"line":"Change over time.","area":"Change over time, where the volume matters.","bar":"Compare categories.","scatter":"The relationship between two measures.","histogram":"The distribution of one measure.","heatmap":"Intensity across two dimensions, such as hour by day."}}},"Checkbox":{"use_for":["a yes or no choice in a form","select rows","a parent whose children are partly selected"],"not_for":[{"need":"a setting that takes effect at once","use":"Toggle"},{"need":"several options from a list","use":"MultiSelect"}],"values":{"defaultChecked":{"true":"Starts checked.","false":"Starts unchecked.","indeterminate":"A parent whose children are partly selected."},"size":{"sm":"Dense rows, toolbars and filter bars.","md":"The default, for forms.","lg":"Touch-first screens, or a control that stands alone."}}},"Collapsible":{"use_for":["sections that expand and collapse (an accordion)"],"values":{"type":{"single":"One section open at a time.","multiple":"Several sections may be open."}}},"CollapsibleItem":{"part_of":"Collapsible"},"CollectionState":{"use_for":["the empty, error, access-denied or no-results state of a list or table"],"not_for":[{"need":"a placeholder in the shape of the content while it loads","use":"Skeleton"}]},"ComboBox":{"use_for":["pick one from a long or searchable list","autocomplete with results fetched as you type"],"not_for":[{"need":"pick one from a short list","use":"Select"}],"values":{"size":{"sm":"Dense rows, toolbars and filter bars.","md":"The default, for forms.","lg":"Touch-first screens, or a control that stands alone."}}},"CommandPalette":{"use_for":["a keyboard command launcher: search and run an action"]},"ConfirmDialog":{"use_for":["confirm a destructive or high-consequence action"],"not_for":[{"need":"a form or a task in a modal","use":"Dialog"}],"values":{"confirmVariant":{"primary":"A consequential action that can be recovered from.","danger":"A destructive or irreversible action."},"size":{"sm":"A short question or a single field.","md":"The default: a form or a few paragraphs.","lg":"Wide content, such as a table or fields side by side."}}},"ContextMenu":{"use_for":["right-click actions on an item, with a visible menu button as well"],"not_for":[{"need":"a menu opened from a button","use":"DropdownMenu"}]},"CoordinateInput":{"use_for":["enter a latitude and longitude"]},"CopyButton":{"use_for":["copy an exact value (an ID, a coordinate, a command) to the clipboard"],"values":{"size":{"sm":"Dense rows, toolbars and filter bars.","md":"The default, for forms.","lg":"Touch-first screens, or a control that stands alone."}}},"DataGrid":{"use_for":["a large or interactive table: selection, sorting, column sizing, paging, thousands of rows"],"not_for":[{"need":"a small read-only table","use":"DataTable"},{"need":"label and value facts about one thing","use":"DescriptionList"}],"values":{"mode":{"client":"All rows are in memory; the grid sorts and pages them.","server":"The application fetches each page and sort; pass rowCount."}}},"DataTable":{"use_for":["a simple table of rows, with optional sorting"],"not_for":[{"need":"selection, paging, column sizing or very many rows","use":"DataGrid"}]},"DatePicker":{"use_for":["pick one date"],"not_for":[{"need":"a start and an end date","use":"DateRangePicker"},{"need":"a date and a time","use":"DateTimePicker"},{"need":"a UTC time window","use":"TimeRange"}],"values":{"motion":{"auto":"The default. Opens and closes with motion, and none when the system asks for less.","none":"No motion, for a dense tool where it would distract."}}},"DateRangePicker":{"use_for":["pick a start and an end date"]},"DateTimePicker":{"use_for":["pick a date and a time in a named time zone"]},"DescriptionList":{"use_for":["label and value facts about one thing","metadata or measurements"],"not_for":[{"need":"the identity, condition and key facts of a record","use":"EntityPreview"},{"need":"data quality, source and last update time","use":"OperationalStatus"},{"need":"many records in rows","use":"DataTable"}]},"Dialog":{"use_for":["a modal for a focused task or form"],"not_for":[{"need":"confirm a destructive action","use":"ConfirmDialog"},{"need":"details beside the page, which stays usable","use":"Inspector"},{"need":"a small panel anchored to a button","use":"Popover"}],"values":{"size":{"sm":"A short question or a single field.","md":"The default: a form or a few paragraphs.","lg":"Wide content, such as a table or fields side by side."}}},"Divider":{"use_for":["separate content with a rule, with an optional label"]},"DropdownMenu":{"use_for":["a menu of actions opened from a button"],"not_for":[{"need":"choose a value in a form","use":"Select"},{"need":"right-click actions","use":"ContextMenu"}],"values":{"align":{"start":"Lines up with the start edge of the trigger.","center":"Centered on the trigger.","end":"Lines up with the end edge; use for a trigger at the right of a row."},"side":{"top":"Opens above the trigger.","right":"Opens to the right of the trigger.","bottom":"Opens below the trigger.","left":"Opens to the left of the trigger."}}},"DropdownMenuItem":{"part_of":"DropdownMenu"},"DropdownMenuSeparator":{"part_of":"DropdownMenu"},"DropdownMenuLabel":{"part_of":"DropdownMenu"},"EntityPreview":{"use_for":["summarize one record: its identity, condition, key facts and report quality"]},"EventTimeline":{"use_for":["events and durations on a time axis, in lanes"]},"Field":{"use_for":["give a form control its label, help text and error"]},"FileUpload":{"use_for":["choose, drop or paste files"],"not_for":[{"need":"show files as they upload","use":"UploadQueue"}]},"FilterBar":{"use_for":["quick toggle filters above a list or table"],"not_for":[{"need":"filters built from property, operator and value","use":"PropertyFilter"}]},"FormErrorSummary":{"use_for":["list a form's errors at the top, each leading to its field"]},"FormSection":{"use_for":["group related form fields under a heading"]},"InlineEdit":{"use_for":["edit one value in place, with save and cancel"]},"Input":{"use_for":["a single line of text","a search box"],"not_for":[{"need":"a number with a unit","use":"NumberInput"},{"need":"several lines of text","use":"Textarea"},{"need":"a latitude and longitude","use":"CoordinateInput"},{"need":"a date","use":"DatePicker"}],"values":{"size":{"sm":"Dense rows, toolbars and filter bars.","md":"The default, for forms.","lg":"Touch-first screens, or a control that stands alone."}}},"Inspector":{"use_for":["a side panel of details that leaves the page usable"],"not_for":[{"need":"a task that must be finished or dismissed first","use":"Dialog"}]},"JobStatus":{"use_for":["the state and progress of a long-running job, with cancel and retry"],"values":{"state":{"queued":"Accepted, not started.","running":"In progress.","cancel-requested":"A cancel was asked for and is not yet confirmed.","canceled":"Stopped by request.","complete":"Every item succeeded.","partial":"Finished, with some items failed.","failed":"Did not complete."}}},"LayerControl":{"use_for":["turn map layers on and off, and set their opacity and order"]},"Link":{"use_for":["go to another page or place"],"not_for":[{"need":"trigger an action","use":"Button"}]},"MapControls":{"use_for":["zoom and reset-north buttons for a map"]},"MapLegend":{"use_for":["explain a map's symbols"]},"MapScale":{"use_for":["a distance scale bar for a map"]},"MediaFrame":{"use_for":["show a camera image or video frame with its freshness and capture time"]},"MultiSelect":{"use_for":["choose several options from a short list"],"not_for":[{"need":"choose exactly one","use":"RadioGroup"}]},"NumberInput":{"use_for":["enter a number with a unit, a range and steps"],"values":{"size":{"sm":"Dense rows, toolbars and filter bars.","md":"The default, for forms.","lg":"Touch-first screens, or a control that stands alone."}}},"OperationalStatus":{"use_for":["show the data quality, source and last update time of a reading"]},"PlaybackControls":{"use_for":["play, pause and scrub through recorded time"]},"Popover":{"use_for":["details or controls in a small panel anchored to a button"],"not_for":[{"need":"a short hint of plain text","use":"Tooltip"},{"need":"a task that must be finished or dismissed first","use":"Dialog"},{"need":"a menu of actions","use":"DropdownMenu"}],"values":{"side":{"top":"Opens above the trigger.","right":"Opens to the right of the trigger.","bottom":"Opens below the trigger.","left":"Opens to the left of the trigger."},"align":{"start":"Lines up with the start edge of the trigger.","center":"Centered on the trigger.","end":"Lines up with the end edge; use for a trigger at the right of a row."},"motion":{"auto":"The default. Opens and closes with motion, and none when the system asks for less.","none":"No motion, for a dense tool where it would distract."}}},"Progress":{"use_for":["show how far along a task is, or that it is working"],"not_for":[{"need":"a job with states, cancel and retry","use":"JobStatus"},{"need":"a placeholder while content loads","use":"Skeleton"}],"values":{"variant":{"bar":"The default: a continuous bar.","blocks":"Block glyphs, for a compact row of text."},"size":{"sm":"Inline, in a row.","md":"The default."}}},"PropertyFilter":{"use_for":["build a filter from property, operator and value clauses"]},"RadioGroup":{"use_for":["choose exactly one of a few visible options"],"not_for":[{"need":"choose one from many options","use":"Select"},{"need":"switch something on or off","use":"Toggle"}],"values":{"orientation":{"horizontal":"Two or three short options in a row.","vertical":"The default; suits longer labels."},"size":{"sm":"Dense rows, toolbars and filter bars.","md":"The default, for forms.","lg":"Touch-first screens, or a control that stands alone."}}},"Radio":{"part_of":"RadioGroup"},"Select":{"use_for":["choose one option from a dropdown"],"not_for":[{"need":"a long or searchable list","use":"ComboBox"},{"need":"several choices","use":"MultiSelect"},{"need":"two to five options worth showing at once","use":"RadioGroup"}],"values":{"size":{"sm":"Dense rows, toolbars and filter bars.","md":"The default, for forms.","lg":"Touch-first screens, or a control that stands alone."}}},"SelectOption":{"part_of":"Select"},"Sidebar":{"use_for":["app navigation in a vertical rail"],"not_for":[{"need":"the frame around it: the workspace's name, the data connection, the time","use":"AppShell"}]},"SidebarLogo":{"part_of":"Sidebar"},"SidebarSection":{"part_of":"Sidebar"},"SidebarItem":{"part_of":"Sidebar"},"SidebarFooter":{"part_of":"Sidebar"},"Skeleton":{"use_for":["a silent placeholder in the shape of the content while it loads (the loading area says \"Loading\" once)"],"not_for":[{"need":"an empty or error state","use":"CollectionState"}],"values":{"variant":{"block":"An area: a card, an image, a chart.","text":"Lines of text."}}},"Slider":{"use_for":["pick a value or a range along a track"],"not_for":[{"need":"an exact number","use":"NumberInput"}],"values":{"orientation":{"horizontal":"The default.","vertical":"A level, such as volume or altitude."},"size":{"sm":"Dense rows, toolbars and filter bars.","md":"The default, for forms.","lg":"Touch-first screens, or a control that stands alone."}}},"Sparkline":{"use_for":["a tiny trend line inside a row or card"],"not_for":[{"need":"a chart with axes and a legend","use":"Chart"}],"values":{"variant":{"line":"The trend only.","area":"The trend, with weight on its size."}}},"SplitPane":{"use_for":["two resizable panels, side by side or stacked"]},"StatCard":{"use_for":["one headline metric with its trend"],"not_for":[{"need":"several facts about one thing","use":"DescriptionList"}]},"Tabs":{"use_for":["switch between views of the same subject"],"not_for":[{"need":"navigate between pages of the app","use":"Sidebar"}],"values":{"orientation":{"horizontal":"The default.","vertical":"Many tabs, or a list of sections down the side."}}},"TabsList":{"part_of":"Tabs"},"TabsTrigger":{"part_of":"Tabs"},"TabsContent":{"part_of":"Tabs"},"TagGroup":{"use_for":["a set of tags, which can be removable"]},"Textarea":{"use_for":["several lines of text"]},"TimeField":{"use_for":["enter a time of day on the 24-hour clock"]},"TimeRange":{"use_for":["pick a UTC time window, with presets"]},"ToastProvider":{"use_for":["the host for Toast notifications, once at the root of the app"]},"Toast":{"use_for":["a brief notification that something happened"],"not_for":[{"need":"an error the user must read or act on","use":"Alert"}]},"Toggle":{"use_for":["switch a setting on or off, taking effect at once"],"not_for":[{"need":"a choice submitted with a form","use":"Checkbox"}],"values":{"size":{"sm":"Dense rows, toolbars and filter bars.","md":"The default, for forms.","lg":"Touch-first screens, or a control that stands alone."}}},"Toolbar":{"use_for":["a bar of actions for a view or a selection"],"values":{"orientation":{"horizontal":"The default.","vertical":"A tool rail beside a canvas or map."}}},"ToolbarSeparator":{"part_of":"Toolbar"},"Tooltip":{"use_for":["a short hint on hover or keyboard focus"],"not_for":[{"need":"anything to click or read at length","use":"Popover"}],"values":{"side":{"top":"Opens above the trigger.","right":"Opens to the right of the trigger.","bottom":"Opens below the trigger.","left":"Opens to the left of the trigger."},"align":{"start":"Lines up with the start edge of the trigger.","center":"Centered on the trigger.","end":"Lines up with the end edge; use for a trigger at the right of a row."}}},"TreeView":{"use_for":["browse a hierarchy: folders, units, asset trees"]},"UploadQueue":{"use_for":["show files as they upload, with progress and recovery"]}}}
|
|
1
|
+
{"setup":{"tailwind":"Tailwind CSS 4.3.3 or a later 4.x release. Tailwind 4 has no presets and no tailwind.config for this: OPERATOR is added to the stylesheet as a plugin (`@plugin`).","packages":[{"name":"tailwindcss","dev":true,"why":"Tailwind CSS 4, set up the way the framework does (`@tailwindcss/vite`, `@tailwindcss/postcss` or the Tailwind CLI)."},{"name":"@oprt/tailwind","dev":true,"why":"The plugin that turns the tokens into utilities such as `bg-oprt-surface-1`."},{"name":"@oprt/tokens","dev":false,"why":"The CSS custom properties, the Bone theme and the fonts. The utilities only point at them."},{"name":"react-dom","dev":false,"why":"A peer of every OPERATOR source; `react` is listed with the dependencies."}],"stylesheet":[{"line":"@plugin \"@oprt/tailwind\";","why":"Turns OPERATOR's tokens into utilities. Without it the utilities do not exist, and the build does not say so."}],"package_source":{"when":"@oprt/react","line":"@source \"../node_modules/@oprt/react/dist\";","why":"A recipe imports @oprt/react, whose compiled components Tailwind does not scan on its own: without this line they render unstyled and the build does not say so. The path is relative to the stylesheet. Source copied into the project is scanned without it."},"root_import":"import \"@oprt/tokens\";","root_import_note":"Once, at the application root, before the stylesheet; from JavaScript or a `<link>`, not with an `@import` inside the Tailwind stylesheet (the Tailwind CLI inlines an imported file without rewriting its font URLs).","not_needed":[{"name":"@oprt/tokens-operational","why":"Opt-in MIL-STD-2525 affiliation colors. No component or recipe reads them; add them only for your own symbology."}]},"rules":[{"id":"look-it-up","rule":"Look a component up before using it (`oprt component <Name>`). A prop or value that is not in its contract does not exist; do not guess from other libraries.","wrong":"<Button isLoading leftIcon={<Spinner />} color=\"green\">Save</Button>","right":"<Button disabled={saving}>Save</Button>"},{"id":"components-before-markup","rule":"Use an OPERATOR component before writing markup. A native button, input, select, table or dialog, or a styled div standing in for one, is an escape hatch: search first (`oprt search <need>`).","wrong":"<button className=\"border px-3u\">Deploy</button>","right":"<Button>Deploy</Button>"},{"id":"start-from-a-recipe","rule":"For a whole screen, start from a recipe and adapt it (`oprt search <need>`, then `oprt add <recipe>`). Composing a screen from nothing is the last resort."},{"id":"one-primary-action","rule":"One primary Button in view at a time. It is the only button with a cut corner at rest, so two of them say there are two main actions. Use secondary or tertiary for the rest.","wrong":"<Button>Save</Button> <Button>Export</Button> <Button>Share</Button>","right":"<Button>Save</Button> <Button variant=\"secondary\">Export</Button> <Button variant=\"tertiary\">Share</Button>"},{"id":"no-invented-variants","rule":"When the option you want is missing, the answer is another component, not a new value. A green button is not a Button variant: status is a Badge.","wrong":"<Button variant=\"success\">Online</Button>","right":"<Badge variant=\"success\">Online</Badge>"},{"id":"status-in-words","rule":"Status is never color alone. Say it in words with a Badge or an Alert.","wrong":"<span className=\"text-oprt-error\">●</span>","right":"<Badge variant=\"error\">Link lost</Badge>"},{"id":"fields-wrap-controls","rule":"Wrap every form control in a Field. The Field wires the label, help text and error to the control; do not set id or aria attributes for that yourself.","wrong":"<label htmlFor=\"callsign\">Call sign</label> <Input id=\"callsign\" />","right":"<Field label=\"Call sign\"><Input /></Field>"},{"id":"parts-inside-parents","rule":"A part goes inside its parent, and only what a parent allows goes inside it: CardHeader in Card, TabsTrigger in TabsList, SelectOption in Select. Nothing you can click goes inside a Button or a Badge."},{"id":"tokens-only","rule":"Color, spacing and type come from OPERATOR tokens. No hex or rgb colors, no arbitrary pixel values, and no rounded corners: the radius is 0 everywhere.","wrong":"className=\"bg-[#1a1a1a] p-[13px] rounded-md\"","right":"className=\"bg-oprt-surface-1 p-2u\""},{"id":"write-labels-plainly","rule":"Write labels in normal case. Buttons, tabs, badges and headings uppercase themselves; names, IDs, values and body text keep the case you give them. Never uppercase a string in code.","wrong":"<Button>{label.toUpperCase()}</Button>","right":"<Button>Deploy</Button>"},{"id":"dark-only","rule":"There is one theme and it is dark. Do not add a light theme, a theme switch, or dark: variants."},{"id":"unknown-is-a-state","rule":"Unknown, stale and unavailable are states to show, never values to fill in. Keep the UTC label on a time, and keep data quality separate from the condition of the thing measured."},{"id":"let-components-own-behavior","rule":"Pass data and settings as props. Sorting, focus, keyboard handling and announcements belong to the component; do not rebuild them around it."},{"id":"check-before-done","rule":"Before you call the work done, run `oprt check <paths>` and fix what it reports."}],"components":{"ActionStatus":{"use_for":["show the outcome of an action the user just took, with a way to retry"],"not_for":[{"need":"a long-running job with progress","use":"JobStatus"},{"need":"a brief confirmation that needs no follow-up","use":"Toast"}]},"Alert":{"use_for":["an inline message that needs attention: error, warning, info or success","a callout"],"not_for":[{"need":"a brief confirmation that goes away","use":"Toast"},{"need":"a decision the user must make before going on","use":"ConfirmDialog"},{"need":"a short status label in a row or header","use":"Badge"}]},"AppShell":{"use_for":["the frame of an app or workspace: its name, mode, data connection and UTC time","hold the app's Sidebar, as its navigation"],"values":{"connection":{"connected":"The data link is up.","connecting":"The first attempt is in progress.","reconnecting":"The link dropped and is being retried.","offline":"There is no link; what is on screen is not updating.","unknown":"The application has not reported a state. The default: never assume connected."}}},"AttachmentPreview":{"use_for":["show an attached file: its name, type, size and a safe preview"]},"Avatar":{"use_for":["show a person or unit by initials"],"not_for":[{"need":"show a status","use":"Badge"}],"values":{"size":{"sm":"Dense rows and lists.","md":"The default.","lg":"The header of a profile or detail page."}}},"Badge":{"use_for":["show a status label","a category or count that is read, not clicked"],"not_for":[{"need":"something the user clicks","use":"Button"},{"need":"toggle filters","use":"FilterBar"},{"need":"removable tags","use":"TagGroup"}],"values":{"variant":{"success":"Nominal, healthy or completed.","warning":"Degraded, or needs attention soon.","error":"Failed, in alarm or blocked.","info":"A neutral notice, or in progress.","neutral":"A category or count with no severity. The default."}}},"Breadcrumb":{"use_for":["show where a page sits in the hierarchy"]},"BulkActionBar":{"use_for":["act on several selected rows at once"]},"BulkResults":{"use_for":["show what happened to each item after a bulk action"]},"ButtonGroup":{"use_for":["a row of related buttons","a segmented set of actions"],"not_for":[{"need":"toggle filters above a list","use":"FilterBar"},{"need":"switch between views","use":"Tabs"}],"values":{"orientation":{"horizontal":"The default: a row.","vertical":"Stacked, in a narrow column."}}},"Button":{"use_for":["trigger an action","submit a form"],"not_for":[{"need":"go to another page","use":"Link"},{"need":"show a status","use":"Badge"},{"need":"copy a value to the clipboard","use":"CopyButton"}],"values":{"variant":{"primary":"The one main action of a view or dialog. At most one in view: it carries the cut corner.","secondary":"Other important actions beside the primary.","tertiary":"Low-emphasis actions: toolbars, and actions repeated on every row.","danger":"A destructive or irreversible action. Pair it with ConfirmDialog.","ghost":"The least emphasis: an inline action inside dense content."},"size":{"sm":"Dense tables, toolbars and the inside of cards.","md":"The default.","lg":"The main call to action on a page, and touch-first screens."}}},"Calendar":{"use_for":["pick a day from a month grid that is always visible"],"not_for":[{"need":"a date field that opens a calendar","use":"DatePicker"}]},"Card":{"use_for":["group related content in a bordered panel"],"not_for":[{"need":"one headline metric","use":"StatCard"},{"need":"label and value facts","use":"DescriptionList"},{"need":"a section of form fields or settings under a heading","use":"FormSection"}]},"CardHeader":{"part_of":"Card"},"CardBody":{"part_of":"Card"},"CardFooter":{"part_of":"Card"},"Chart":{"use_for":["plot data as a line, area, bar, scatter, histogram or heatmap"],"not_for":[{"need":"a tiny trend inside a row or card","use":"Sparkline"},{"need":"one number with its trend","use":"StatCard"}],"values":{"variant":{"line":"Change over time.","area":"Change over time, where the volume matters.","bar":"Compare categories.","scatter":"The relationship between two measures.","histogram":"The distribution of one measure.","heatmap":"Intensity across two dimensions, such as hour by day."}}},"Checkbox":{"use_for":["agree to or confirm something in a form","select rows","a parent whose children are partly selected"],"not_for":[{"need":"switch a setting or an option on or off, in a form too","use":"Toggle"},{"need":"several options from a list","use":"MultiSelect"}],"values":{"defaultChecked":{"true":"Starts checked.","false":"Starts unchecked.","indeterminate":"A parent whose children are partly selected."},"size":{"sm":"Dense rows, toolbars and filter bars.","md":"The default, for forms.","lg":"Touch-first screens, or a control that stands alone."}}},"Collapsible":{"use_for":["sections that expand and collapse (an accordion)"],"values":{"type":{"single":"One section open at a time.","multiple":"Several sections may be open."}}},"CollapsibleItem":{"part_of":"Collapsible"},"CollectionState":{"use_for":["the empty, error, access-denied or no-results state of a list or table"],"not_for":[{"need":"a placeholder in the shape of the content while it loads","use":"Skeleton"}]},"ComboBox":{"use_for":["pick one from a long or searchable list","autocomplete with results fetched as you type"],"not_for":[{"need":"pick one from a short list","use":"Select"}],"values":{"size":{"sm":"Dense rows, toolbars and filter bars.","md":"The default, for forms.","lg":"Touch-first screens, or a control that stands alone."}}},"CommandPalette":{"use_for":["a keyboard command launcher: search and run an action"]},"ConfirmDialog":{"use_for":["confirm a destructive or high-consequence action"],"not_for":[{"need":"a form or a task in a modal","use":"Dialog"}],"values":{"confirmVariant":{"primary":"A consequential action that can be recovered from.","danger":"A destructive or irreversible action."},"size":{"sm":"A short question or a single field.","md":"The default: a form or a few paragraphs.","lg":"Wide content, such as a table or fields side by side."}}},"ContextMenu":{"use_for":["right-click actions on an item, with a visible menu button as well"],"not_for":[{"need":"a menu opened from a button","use":"DropdownMenu"}]},"CoordinateInput":{"use_for":["enter a latitude and longitude"]},"CopyButton":{"use_for":["copy an exact value (an ID, a coordinate, a command) to the clipboard"],"values":{"size":{"sm":"Dense rows, toolbars and filter bars.","md":"The default, for forms.","lg":"Touch-first screens, or a control that stands alone."}}},"DataGrid":{"use_for":["a large or interactive table: selection, sorting, column sizing, paging, thousands of rows"],"not_for":[{"need":"a small read-only table","use":"DataTable"},{"need":"label and value facts about one thing","use":"DescriptionList"}],"values":{"mode":{"client":"All rows are in memory; the grid sorts and pages them.","server":"The application fetches each page and sort; pass rowCount."}}},"DataTable":{"use_for":["a simple table of rows, with optional sorting"],"not_for":[{"need":"selection, paging, column sizing or very many rows","use":"DataGrid"}]},"DatePicker":{"use_for":["pick one date"],"not_for":[{"need":"a start and an end date","use":"DateRangePicker"},{"need":"a date and a time","use":"DateTimePicker"},{"need":"a UTC time window","use":"TimeRange"}],"values":{"motion":{"auto":"The default. Opens and closes with motion, and none when the system asks for less.","none":"No motion, for a dense tool where it would distract."}}},"DateRangePicker":{"use_for":["pick a start and an end date"]},"DateTimePicker":{"use_for":["pick a date and a time in a named time zone"]},"DescriptionList":{"use_for":["label and value facts about one thing","metadata or measurements"],"not_for":[{"need":"the identity, condition and key facts of a record","use":"EntityPreview"},{"need":"data quality, source and last update time","use":"OperationalStatus"},{"need":"many records in rows","use":"DataTable"}]},"Dialog":{"use_for":["a modal for a focused task or form"],"not_for":[{"need":"confirm a destructive action","use":"ConfirmDialog"},{"need":"details beside the page, which stays usable","use":"Inspector"},{"need":"a small panel anchored to a button","use":"Popover"}],"values":{"size":{"sm":"A short question or a single field.","md":"The default: a form or a few paragraphs.","lg":"Wide content, such as a table or fields side by side."}}},"Divider":{"use_for":["separate content with a rule, with an optional label"]},"DropdownMenu":{"use_for":["a menu of actions opened from a button"],"not_for":[{"need":"choose a value in a form","use":"Select"},{"need":"right-click actions","use":"ContextMenu"}],"values":{"align":{"start":"Lines up with the start edge of the trigger.","center":"Centered on the trigger.","end":"Lines up with the end edge; use for a trigger at the right of a row."},"side":{"top":"Opens above the trigger.","right":"Opens to the right of the trigger.","bottom":"Opens below the trigger.","left":"Opens to the left of the trigger."}}},"DropdownMenuItem":{"part_of":"DropdownMenu"},"DropdownMenuSeparator":{"part_of":"DropdownMenu"},"DropdownMenuLabel":{"part_of":"DropdownMenu"},"EntityPreview":{"use_for":["summarize one record: its identity, condition, key facts and report quality"]},"EventTimeline":{"use_for":["events and durations on a time axis, in lanes"]},"Field":{"use_for":["give a form control its label, help text and error"]},"FileUpload":{"use_for":["choose, drop or paste files"],"not_for":[{"need":"show files as they upload","use":"UploadQueue"}]},"FilterBar":{"use_for":["quick toggle filters above a list or table"],"not_for":[{"need":"filters built from property, operator and value","use":"PropertyFilter"}]},"FormErrorSummary":{"use_for":["list a form's errors at the top, each leading to its field"]},"FormSection":{"use_for":["group related form fields under a heading","one section of a settings page"]},"InlineEdit":{"use_for":["edit one value in place, with save and cancel"]},"Input":{"use_for":["a single line of text","a search box"],"not_for":[{"need":"a number with a unit","use":"NumberInput"},{"need":"several lines of text","use":"Textarea"},{"need":"a latitude and longitude","use":"CoordinateInput"},{"need":"a date","use":"DatePicker"}],"values":{"size":{"sm":"Dense rows, toolbars and filter bars.","md":"The default, for forms.","lg":"Touch-first screens, or a control that stands alone."}}},"Inspector":{"use_for":["a side panel of details that leaves the page usable"],"not_for":[{"need":"a task that must be finished or dismissed first","use":"Dialog"}]},"JobStatus":{"use_for":["the state and progress of a long-running job, with cancel and retry"],"values":{"state":{"queued":"Accepted, not started.","running":"In progress.","cancel-requested":"A cancel was asked for and is not yet confirmed.","canceled":"Stopped by request.","complete":"Every item succeeded.","partial":"Finished, with some items failed.","failed":"Did not complete."}}},"LayerControl":{"use_for":["turn map layers on and off, and set their opacity and order"]},"Link":{"use_for":["go to another page or place"],"not_for":[{"need":"trigger an action","use":"Button"}]},"MapControls":{"use_for":["zoom and reset-north buttons for a map"]},"MapLegend":{"use_for":["explain a map's symbols"]},"MapScale":{"use_for":["a distance scale bar for a map"]},"MediaFrame":{"use_for":["show a camera image or video frame with its freshness and capture time"]},"MultiSelect":{"use_for":["choose several options from a short list"],"not_for":[{"need":"choose exactly one","use":"RadioGroup"}]},"NumberInput":{"use_for":["enter a number with a unit, a range and steps"],"values":{"size":{"sm":"Dense rows, toolbars and filter bars.","md":"The default, for forms.","lg":"Touch-first screens, or a control that stands alone."}}},"OperationalStatus":{"use_for":["show the data quality, source and last update time of a reading"]},"PlaybackControls":{"use_for":["play, pause and scrub through recorded time"]},"Popover":{"use_for":["details or controls in a small panel anchored to a button"],"not_for":[{"need":"a short hint of plain text","use":"Tooltip"},{"need":"a task that must be finished or dismissed first","use":"Dialog"},{"need":"a menu of actions","use":"DropdownMenu"}],"values":{"side":{"top":"Opens above the trigger.","right":"Opens to the right of the trigger.","bottom":"Opens below the trigger.","left":"Opens to the left of the trigger."},"align":{"start":"Lines up with the start edge of the trigger.","center":"Centered on the trigger.","end":"Lines up with the end edge; use for a trigger at the right of a row."},"motion":{"auto":"The default. Opens and closes with motion, and none when the system asks for less.","none":"No motion, for a dense tool where it would distract."}}},"Progress":{"use_for":["show how far along a task is, or that it is working"],"not_for":[{"need":"a job with states, cancel and retry","use":"JobStatus"},{"need":"a placeholder while content loads","use":"Skeleton"}],"values":{"variant":{"bar":"The default: a continuous bar.","blocks":"Block glyphs, for a compact row of text."},"size":{"sm":"Inline, in a row.","md":"The default."}}},"PropertyFilter":{"use_for":["build a filter from property, operator and value clauses"]},"RadioGroup":{"use_for":["choose exactly one of a few visible options"],"not_for":[{"need":"choose one from many options","use":"Select"},{"need":"switch something on or off","use":"Toggle"}],"values":{"orientation":{"horizontal":"Two or three short options in a row.","vertical":"The default; suits longer labels."},"size":{"sm":"Dense rows, toolbars and filter bars.","md":"The default, for forms.","lg":"Touch-first screens, or a control that stands alone."}}},"Radio":{"part_of":"RadioGroup"},"Select":{"use_for":["choose one option from a dropdown"],"not_for":[{"need":"a long or searchable list","use":"ComboBox"},{"need":"several choices","use":"MultiSelect"},{"need":"two to five options worth showing at once","use":"RadioGroup"}],"values":{"size":{"sm":"Dense rows, toolbars and filter bars.","md":"The default, for forms.","lg":"Touch-first screens, or a control that stands alone."}}},"SelectOption":{"part_of":"Select"},"Sidebar":{"use_for":["app navigation in a vertical rail"],"not_for":[{"need":"the frame around it: the workspace's name, the data connection, the time","use":"AppShell"}]},"SidebarLogo":{"part_of":"Sidebar"},"SidebarSection":{"part_of":"Sidebar"},"SidebarItem":{"part_of":"Sidebar"},"SidebarFooter":{"part_of":"Sidebar"},"Skeleton":{"use_for":["a silent placeholder in the shape of the content while it loads (the loading area says \"Loading\" once)"],"not_for":[{"need":"an empty or error state","use":"CollectionState"}],"values":{"variant":{"block":"An area: a card, an image, a chart.","text":"Lines of text."}}},"Slider":{"use_for":["pick a value or a range along a track"],"not_for":[{"need":"an exact number","use":"NumberInput"}],"values":{"orientation":{"horizontal":"The default.","vertical":"A level, such as volume or altitude."},"size":{"sm":"Dense rows, toolbars and filter bars.","md":"The default, for forms.","lg":"Touch-first screens, or a control that stands alone."}}},"Sparkline":{"use_for":["a tiny trend line inside a row or card"],"not_for":[{"need":"a chart with axes and a legend","use":"Chart"}],"values":{"variant":{"line":"The trend only.","area":"The trend, with weight on its size."}}},"SplitPane":{"use_for":["two resizable panels, side by side or stacked"]},"StatCard":{"use_for":["one headline metric with its trend"],"not_for":[{"need":"several facts about one thing","use":"DescriptionList"}]},"Tabs":{"use_for":["switch between views of the same subject"],"not_for":[{"need":"navigate between pages of the app","use":"Sidebar"}],"values":{"orientation":{"horizontal":"The default.","vertical":"Many tabs, or a list of sections down the side."}}},"TabsList":{"part_of":"Tabs"},"TabsTrigger":{"part_of":"Tabs"},"TabsContent":{"part_of":"Tabs"},"TagGroup":{"use_for":["a set of tags, which can be removable"]},"Textarea":{"use_for":["several lines of text"]},"TimeField":{"use_for":["enter a time of day on the 24-hour clock"]},"TimeRange":{"use_for":["pick a UTC time window, with presets"]},"ToastProvider":{"use_for":["the host for Toast notifications, once at the root of the app"]},"Toast":{"use_for":["a brief notification that something happened"],"not_for":[{"need":"an error the user must read or act on","use":"Alert"}]},"Toggle":{"use_for":["switch a setting or an option on or off, at once or when its form is submitted"],"not_for":[{"need":"agree to or confirm something, such as terms","use":"Checkbox"}],"values":{"size":{"sm":"Dense rows, toolbars and filter bars.","md":"The default, for forms.","lg":"Touch-first screens, or a control that stands alone."}}},"Toolbar":{"use_for":["a bar of actions for a view or a selection"],"values":{"orientation":{"horizontal":"The default.","vertical":"A tool rail beside a canvas or map."}}},"ToolbarSeparator":{"part_of":"Toolbar"},"Tooltip":{"use_for":["a short hint on hover or keyboard focus"],"not_for":[{"need":"anything to click or read at length","use":"Popover"}],"values":{"side":{"top":"Opens above the trigger.","right":"Opens to the right of the trigger.","bottom":"Opens below the trigger.","left":"Opens to the left of the trigger."},"align":{"start":"Lines up with the start edge of the trigger.","center":"Centered on the trigger.","end":"Lines up with the end edge; use for a trigger at the right of a row."}}},"TreeView":{"use_for":["browse a hierarchy: folders, units, asset trees"]},"UploadQueue":{"use_for":["show files as they upload, with progress and recovery"]}}}
|
package/dist/manifest.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.
|
|
2
|
+
"version": "0.6.0",
|
|
3
3
|
"components": {
|
|
4
4
|
"ActionStatus": {
|
|
5
5
|
"description": "Stateless authoritative action outcome display with optional application-supported recovery callbacks. When the focused recovery is withdrawn or disabled, focus moves to the result, a group named by its label. Long text wraps.",
|
|
@@ -430,7 +430,7 @@
|
|
|
430
430
|
},
|
|
431
431
|
"onRetryRequest": {
|
|
432
432
|
"type": "function",
|
|
433
|
-
"description": "(id) => void. Offered
|
|
433
|
+
"description": "(id) => void. Offered for items marked retryable, whatever their state: set retryable from what your service allows. Calling it does not change supplied outcomes."
|
|
434
434
|
},
|
|
435
435
|
"disabled": {
|
|
436
436
|
"type": "boolean",
|
|
@@ -598,7 +598,7 @@
|
|
|
598
598
|
"example": "<Calendar label=\"Inspection date\" value={date} onValueChange={setDate} min=\"2026-01-01\" max=\"2026-12-31\" />"
|
|
599
599
|
},
|
|
600
600
|
"Card": {
|
|
601
|
-
"description": "Bordered surface container. Use with CardHeader, CardBody, CardFooter.",
|
|
601
|
+
"description": "Bordered surface container. Use with CardHeader, CardBody, CardFooter. A section of form controls under a heading, in a form or on a settings page, is a FormSection, not a Card: put the FormSection inside a CardBody when the section needs the panel.",
|
|
602
602
|
"props": {},
|
|
603
603
|
"slots": {
|
|
604
604
|
"children": {
|
|
@@ -798,7 +798,7 @@
|
|
|
798
798
|
"example": "<Chart label=\"Link latency\" unit=\"ms\" xLabel=\"Elapsed\" xUnit=\"s\" series={[{ id: \"alpha\", label: \"Alpha\", data: [{ x: 0, y: 22 }, { x: 1, y: null }, { x: 2, y: 25 }] }]} />"
|
|
799
799
|
},
|
|
800
800
|
"Checkbox": {
|
|
801
|
-
"description": "Binary or tri-state checkbox. Shared OPERATOR Check icon when checked and Minus icon when indeterminate, inside an accent outline.",
|
|
801
|
+
"description": "Binary or tri-state checkbox, for agreeing to or confirming something, selecting rows, and a parent whose children are partly selected. A setting or an option that is on or off is a Toggle, in a form too. Shared OPERATOR Check icon when checked and Minus icon when indeterminate, inside an accent outline.",
|
|
802
802
|
"props": {
|
|
803
803
|
"motion": {
|
|
804
804
|
"type": "enum",
|
|
@@ -2341,7 +2341,7 @@
|
|
|
2341
2341
|
"example": "<FormErrorSummary ref={summaryRef} errors={errors} onErrorSelect={revealAndFocus} />"
|
|
2342
2342
|
},
|
|
2343
2343
|
"FormSection": {
|
|
2344
|
-
"description": "Native fieldset with a legend, optional description and supplied form controls.",
|
|
2344
|
+
"description": "Native fieldset with a legend, optional description and supplied form controls. Use one for each section of a form or a settings page: the legend names the section's group of controls for a screen reader, which a heading on a Card does not. A section that needs a bordered panel goes inside a CardBody.",
|
|
2345
2345
|
"props": {
|
|
2346
2346
|
"legend": {
|
|
2347
2347
|
"type": "string",
|
|
@@ -2371,7 +2371,8 @@
|
|
|
2371
2371
|
"Field",
|
|
2372
2372
|
"Input",
|
|
2373
2373
|
"Checkbox",
|
|
2374
|
-
"FormErrorSummary"
|
|
2374
|
+
"FormErrorSummary",
|
|
2375
|
+
"Card"
|
|
2375
2376
|
],
|
|
2376
2377
|
"never_inside": [
|
|
2377
2378
|
"Button"
|
|
@@ -2524,7 +2525,7 @@
|
|
|
2524
2525
|
"example": "<Inspector open={open} title={asset.name} onClose={closeAndRestoreFocus}><OperationalStatus state={asset.status} source={source} updatedAt={asset.updatedAt} /></Inspector>"
|
|
2525
2526
|
},
|
|
2526
2527
|
"JobStatus": {
|
|
2527
|
-
"description": "Application-supplied job state and validated item progress with explicit cancellation/retry requests. Requests never establish a job outcome. A pending request is announced through a live region that is always present; native attributes reach the job region; long text wraps.",
|
|
2528
|
+
"description": "Application-supplied job state and validated item progress with explicit cancellation/retry requests. The application decides when a job can be canceled or retried: each request is offered whenever its handler is supplied, in any state. Requests never establish a job outcome. A pending request is announced through a live region that is always present; native attributes reach the job region; long text wraps.",
|
|
2528
2529
|
"props": {
|
|
2529
2530
|
"jobId": {
|
|
2530
2531
|
"type": "string",
|
|
@@ -2568,11 +2569,11 @@
|
|
|
2568
2569
|
},
|
|
2569
2570
|
"onCancelRequest": {
|
|
2570
2571
|
"type": "function",
|
|
2571
|
-
"description": "(jobId) => void.
|
|
2572
|
+
"description": "(jobId) => void. Request cancellation is offered whenever this is supplied, in any state: pass it only while your service can cancel the job (typically queued or running). Does not establish cancellation."
|
|
2572
2573
|
},
|
|
2573
2574
|
"onRetryRequest": {
|
|
2574
2575
|
"type": "function",
|
|
2575
|
-
"description": "(jobId) => void.
|
|
2576
|
+
"description": "(jobId) => void. Request retry is offered whenever this is supplied, in any state: pass it only while your service can retry the job (typically failed, partial or canceled). The application chooses eligible work and request identity."
|
|
2576
2577
|
},
|
|
2577
2578
|
"disabled": {
|
|
2578
2579
|
"type": "boolean",
|
|
@@ -3887,7 +3888,7 @@
|
|
|
3887
3888
|
"example": "<SplitPane primary={<section>Telemetry</section>} secondary={<section>Inspector</section>} defaultSize={60} label=\"Resize telemetry and inspector\" />"
|
|
3888
3889
|
},
|
|
3889
3890
|
"StatCard": {
|
|
3890
|
-
"description": "Single-metric display: label, mono numeric value, and an optional trend indicator paired with an arrow glyph (non-color cue per WCAG 1.4.1). It keeps a minimum footprint (169 px tall, up to 180 px wide, narrower inside a narrower container) and its text wraps. It measures its own width, so a large number steps down in size to fit it (never below the
|
|
3891
|
+
"description": "Single-metric display: label, mono numeric value, and an optional trend indicator paired with an arrow glyph (non-color cue per WCAG 1.4.1). It keeps a minimum footprint (169 px tall, up to 180 px wide, narrower inside a narrower container) and its text wraps. It measures its own width, so a large number steps down in size to fit it (never below the smallest type size), and in a row that sizes its items to their content it is 180 px wide.",
|
|
3891
3892
|
"props": {
|
|
3892
3893
|
"label": {
|
|
3893
3894
|
"type": "string",
|
|
@@ -3901,11 +3902,11 @@
|
|
|
3901
3902
|
"number"
|
|
3902
3903
|
],
|
|
3903
3904
|
"required": true,
|
|
3904
|
-
"description": "The metric value (string or number). Rendered in mono for digit alignment. A number is never split between its digits: one with digit groups (1,234,567.890) wraps only after a group separator, and its last group stays with the unit. When they do not fit the card the value steps down in size, never below the
|
|
3905
|
+
"description": "The metric value (string or number). Rendered in mono for digit alignment. A number is never split between its digits: one with digit groups (1,234,567.890) wraps only after a group separator, and its last group stays with the unit. When they do not fit the card the value steps down in size, never below the smallest type size (--oprt-type-base); at that size, if they still do not fit together, the unit moves to its own line under the value. Any other text breaks anywhere. Nothing is truncated or abbreviated."
|
|
3905
3906
|
},
|
|
3906
3907
|
"unit": {
|
|
3907
3908
|
"type": "string",
|
|
3908
|
-
"description": "Unit suffix shown beside the value, e.g. 'ms'. Its first word stays beside the last digits at every size above the
|
|
3909
|
+
"description": "Unit suffix shown beside the value, e.g. 'ms'. Its first word stays beside the last digits at every size above the smallest type size; only when they cannot fit together even at that size does the unit move to its own line under the value. The rest of a long unit wraps."
|
|
3909
3910
|
},
|
|
3910
3911
|
"delta": {
|
|
3911
3912
|
"type": "number",
|
|
@@ -4350,7 +4351,7 @@
|
|
|
4350
4351
|
"example": "<Toast variant=\"error\" title=\"LINK LOST\" description=\"No telemetry for 12s.\" open={open} onOpenChange={setOpen} />"
|
|
4351
4352
|
},
|
|
4352
4353
|
"Toggle": {
|
|
4353
|
-
"description": "Binary on/off switch. Square thumb sliding inside a square track. Accent fill when on; an invalid switch draws its track in the error color. In forced-colors mode the on state, the thumb and keyboard focus use system colors.",
|
|
4354
|
+
"description": "Binary on/off switch for a setting or an option, whether it applies at once or when its form is submitted. Square thumb sliding inside a square track. Accent fill when on; an invalid switch draws its track in the error color. In forced-colors mode the on state, the thumb and keyboard focus use system colors.",
|
|
4354
4355
|
"props": {
|
|
4355
4356
|
"motion": {
|
|
4356
4357
|
"type": "enum",
|
|
@@ -4615,7 +4616,7 @@
|
|
|
4615
4616
|
"items": {
|
|
4616
4617
|
"type": "array",
|
|
4617
4618
|
"required": true,
|
|
4618
|
-
"description": "Readonly UploadQueueItem[] with unique id, name, sizeBytes, state (ready/queued/uploading/cancel-requested/uploaded/failed/canceled), optional loadedBytes/totalBytes/message and explicit cancelable/retryable/removable capabilities. Ready means local selection; uploaded requires a supplied transport outcome. Any other state shows as Unknown state."
|
|
4619
|
+
"description": "Readonly UploadQueueItem[] with unique id, name, sizeBytes, state (ready/queued/uploading/cancel-requested/uploaded/failed/canceled), optional loadedBytes/totalBytes/message and explicit cancelable/retryable/removable capabilities. The capabilities alone decide an item's actions, in any state: set them from what your transport allows. Ready means local selection; uploaded requires a supplied transport outcome. Any other state shows as Unknown state."
|
|
4619
4620
|
},
|
|
4620
4621
|
"disabled": {
|
|
4621
4622
|
"type": "boolean",
|
|
@@ -4623,11 +4624,11 @@
|
|
|
4623
4624
|
},
|
|
4624
4625
|
"onCancel": {
|
|
4625
4626
|
"type": "function",
|
|
4626
|
-
"description": "Requests cancellation by stable ID
|
|
4627
|
+
"description": "Requests cancellation by stable ID for items marked cancelable, whatever their state. Does not change supplied state."
|
|
4627
4628
|
},
|
|
4628
4629
|
"onRetry": {
|
|
4629
4630
|
"type": "function",
|
|
4630
|
-
"description": "Requests retry by stable ID
|
|
4631
|
+
"description": "Requests retry by stable ID for items marked retryable, whatever their state."
|
|
4631
4632
|
},
|
|
4632
4633
|
"onRemove": {
|
|
4633
4634
|
"type": "function",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oprt/manifest",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "OPERATOR's machine-readable contract for coding agents and tools: every component's props, option values and nesting rules, usage guidance and six complete recipes, with Zod schemas to validate it.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"design-system",
|