@oprt/manifest 0.1.0 → 0.4.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 -7
- package/agent-prompt.md +3 -3
- package/dist/components.json +1 -1
- package/dist/guidance.json +1 -1
- package/dist/index.cjs +23 -0
- package/dist/index.d.cts +255 -1
- package/dist/index.d.ts +255 -1
- package/dist/index.js +22 -0
- package/dist/manifest.json +25 -17
- package/package.json +1 -1
package/dist/guidance.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"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, loading, error 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 placeholder in the shape of the content while it loads"],"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"}]},"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"]}}}
|
package/dist/index.cjs
CHANGED
|
@@ -30,6 +30,7 @@ __export(index_exports, {
|
|
|
30
30
|
PatternSchema: () => PatternSchema,
|
|
31
31
|
PatternSummarySchema: () => PatternSummarySchema,
|
|
32
32
|
PropSchema: () => PropSchema,
|
|
33
|
+
SetupSchema: () => SetupSchema,
|
|
33
34
|
SlotSchema: () => SlotSchema
|
|
34
35
|
});
|
|
35
36
|
module.exports = __toCommonJS(index_exports);
|
|
@@ -152,7 +153,28 @@ var ComponentGuidanceSchema = import_zod.z.object({
|
|
|
152
153
|
/** Per option prop: a note for each of its values. */
|
|
153
154
|
values: import_zod.z.record(import_zod.z.record(import_zod.z.string().min(1))).optional()
|
|
154
155
|
});
|
|
156
|
+
var SetupSchema = import_zod.z.object({
|
|
157
|
+
tailwind: import_zod.z.string().min(1),
|
|
158
|
+
packages: import_zod.z.array(
|
|
159
|
+
import_zod.z.object({
|
|
160
|
+
name: import_zod.z.string().min(1),
|
|
161
|
+
dev: import_zod.z.boolean(),
|
|
162
|
+
why: import_zod.z.string().min(1),
|
|
163
|
+
range: import_zod.z.string().min(1).optional()
|
|
164
|
+
})
|
|
165
|
+
).min(1),
|
|
166
|
+
stylesheet: import_zod.z.array(import_zod.z.object({ line: import_zod.z.string().min(1), why: import_zod.z.string().min(1) })),
|
|
167
|
+
package_source: import_zod.z.object({
|
|
168
|
+
when: import_zod.z.string().min(1),
|
|
169
|
+
line: import_zod.z.string().min(1),
|
|
170
|
+
why: import_zod.z.string().min(1)
|
|
171
|
+
}),
|
|
172
|
+
root_import: import_zod.z.string().min(1),
|
|
173
|
+
root_import_note: import_zod.z.string().min(1),
|
|
174
|
+
not_needed: import_zod.z.array(import_zod.z.object({ name: import_zod.z.string().min(1), why: import_zod.z.string().min(1) }))
|
|
175
|
+
});
|
|
155
176
|
var GuidanceSchema = import_zod.z.object({
|
|
177
|
+
setup: SetupSchema,
|
|
156
178
|
rules: import_zod.z.array(GuidanceRuleSchema),
|
|
157
179
|
components: import_zod.z.record(ComponentGuidanceSchema)
|
|
158
180
|
});
|
|
@@ -168,5 +190,6 @@ var GuidanceSchema = import_zod.z.object({
|
|
|
168
190
|
PatternSchema,
|
|
169
191
|
PatternSummarySchema,
|
|
170
192
|
PropSchema,
|
|
193
|
+
SetupSchema,
|
|
171
194
|
SlotSchema
|
|
172
195
|
});
|
package/dist/index.d.cts
CHANGED
|
@@ -1222,11 +1222,216 @@ declare const ComponentGuidanceSchema: z.ZodObject<{
|
|
|
1222
1222
|
use: string;
|
|
1223
1223
|
}[] | undefined;
|
|
1224
1224
|
}>;
|
|
1225
|
+
/**
|
|
1226
|
+
* What a project needs besides the source it copies or the package it imports: the packages, the
|
|
1227
|
+
* stylesheet lines and the root import. One source for `oprt add`'s output, the READMEs, the docs
|
|
1228
|
+
* and both agent guides. A package's `range` is added when the CLI is built.
|
|
1229
|
+
*/
|
|
1230
|
+
declare const SetupSchema: z.ZodObject<{
|
|
1231
|
+
tailwind: z.ZodString;
|
|
1232
|
+
packages: z.ZodArray<z.ZodObject<{
|
|
1233
|
+
name: z.ZodString;
|
|
1234
|
+
dev: z.ZodBoolean;
|
|
1235
|
+
why: z.ZodString;
|
|
1236
|
+
range: z.ZodOptional<z.ZodString>;
|
|
1237
|
+
}, "strip", z.ZodTypeAny, {
|
|
1238
|
+
name: string;
|
|
1239
|
+
dev: boolean;
|
|
1240
|
+
why: string;
|
|
1241
|
+
range?: string | undefined;
|
|
1242
|
+
}, {
|
|
1243
|
+
name: string;
|
|
1244
|
+
dev: boolean;
|
|
1245
|
+
why: string;
|
|
1246
|
+
range?: string | undefined;
|
|
1247
|
+
}>, "many">;
|
|
1248
|
+
stylesheet: z.ZodArray<z.ZodObject<{
|
|
1249
|
+
line: z.ZodString;
|
|
1250
|
+
why: z.ZodString;
|
|
1251
|
+
}, "strip", z.ZodTypeAny, {
|
|
1252
|
+
why: string;
|
|
1253
|
+
line: string;
|
|
1254
|
+
}, {
|
|
1255
|
+
why: string;
|
|
1256
|
+
line: string;
|
|
1257
|
+
}>, "many">;
|
|
1258
|
+
package_source: z.ZodObject<{
|
|
1259
|
+
when: z.ZodString;
|
|
1260
|
+
line: z.ZodString;
|
|
1261
|
+
why: z.ZodString;
|
|
1262
|
+
}, "strip", z.ZodTypeAny, {
|
|
1263
|
+
why: string;
|
|
1264
|
+
line: string;
|
|
1265
|
+
when: string;
|
|
1266
|
+
}, {
|
|
1267
|
+
why: string;
|
|
1268
|
+
line: string;
|
|
1269
|
+
when: string;
|
|
1270
|
+
}>;
|
|
1271
|
+
root_import: z.ZodString;
|
|
1272
|
+
root_import_note: z.ZodString;
|
|
1273
|
+
not_needed: z.ZodArray<z.ZodObject<{
|
|
1274
|
+
name: z.ZodString;
|
|
1275
|
+
why: z.ZodString;
|
|
1276
|
+
}, "strip", z.ZodTypeAny, {
|
|
1277
|
+
name: string;
|
|
1278
|
+
why: string;
|
|
1279
|
+
}, {
|
|
1280
|
+
name: string;
|
|
1281
|
+
why: string;
|
|
1282
|
+
}>, "many">;
|
|
1283
|
+
}, "strip", z.ZodTypeAny, {
|
|
1284
|
+
tailwind: string;
|
|
1285
|
+
packages: {
|
|
1286
|
+
name: string;
|
|
1287
|
+
dev: boolean;
|
|
1288
|
+
why: string;
|
|
1289
|
+
range?: string | undefined;
|
|
1290
|
+
}[];
|
|
1291
|
+
stylesheet: {
|
|
1292
|
+
why: string;
|
|
1293
|
+
line: string;
|
|
1294
|
+
}[];
|
|
1295
|
+
package_source: {
|
|
1296
|
+
why: string;
|
|
1297
|
+
line: string;
|
|
1298
|
+
when: string;
|
|
1299
|
+
};
|
|
1300
|
+
root_import: string;
|
|
1301
|
+
root_import_note: string;
|
|
1302
|
+
not_needed: {
|
|
1303
|
+
name: string;
|
|
1304
|
+
why: string;
|
|
1305
|
+
}[];
|
|
1306
|
+
}, {
|
|
1307
|
+
tailwind: string;
|
|
1308
|
+
packages: {
|
|
1309
|
+
name: string;
|
|
1310
|
+
dev: boolean;
|
|
1311
|
+
why: string;
|
|
1312
|
+
range?: string | undefined;
|
|
1313
|
+
}[];
|
|
1314
|
+
stylesheet: {
|
|
1315
|
+
why: string;
|
|
1316
|
+
line: string;
|
|
1317
|
+
}[];
|
|
1318
|
+
package_source: {
|
|
1319
|
+
why: string;
|
|
1320
|
+
line: string;
|
|
1321
|
+
when: string;
|
|
1322
|
+
};
|
|
1323
|
+
root_import: string;
|
|
1324
|
+
root_import_note: string;
|
|
1325
|
+
not_needed: {
|
|
1326
|
+
name: string;
|
|
1327
|
+
why: string;
|
|
1328
|
+
}[];
|
|
1329
|
+
}>;
|
|
1225
1330
|
/**
|
|
1226
1331
|
* `guidance.json`: the companion to the contract. The contract says what each component accepts;
|
|
1227
1332
|
* the guidance says which component, and which option, to choose.
|
|
1228
1333
|
*/
|
|
1229
1334
|
declare const GuidanceSchema: z.ZodObject<{
|
|
1335
|
+
setup: z.ZodObject<{
|
|
1336
|
+
tailwind: z.ZodString;
|
|
1337
|
+
packages: z.ZodArray<z.ZodObject<{
|
|
1338
|
+
name: z.ZodString;
|
|
1339
|
+
dev: z.ZodBoolean;
|
|
1340
|
+
why: z.ZodString;
|
|
1341
|
+
range: z.ZodOptional<z.ZodString>;
|
|
1342
|
+
}, "strip", z.ZodTypeAny, {
|
|
1343
|
+
name: string;
|
|
1344
|
+
dev: boolean;
|
|
1345
|
+
why: string;
|
|
1346
|
+
range?: string | undefined;
|
|
1347
|
+
}, {
|
|
1348
|
+
name: string;
|
|
1349
|
+
dev: boolean;
|
|
1350
|
+
why: string;
|
|
1351
|
+
range?: string | undefined;
|
|
1352
|
+
}>, "many">;
|
|
1353
|
+
stylesheet: z.ZodArray<z.ZodObject<{
|
|
1354
|
+
line: z.ZodString;
|
|
1355
|
+
why: z.ZodString;
|
|
1356
|
+
}, "strip", z.ZodTypeAny, {
|
|
1357
|
+
why: string;
|
|
1358
|
+
line: string;
|
|
1359
|
+
}, {
|
|
1360
|
+
why: string;
|
|
1361
|
+
line: string;
|
|
1362
|
+
}>, "many">;
|
|
1363
|
+
package_source: z.ZodObject<{
|
|
1364
|
+
when: z.ZodString;
|
|
1365
|
+
line: z.ZodString;
|
|
1366
|
+
why: z.ZodString;
|
|
1367
|
+
}, "strip", z.ZodTypeAny, {
|
|
1368
|
+
why: string;
|
|
1369
|
+
line: string;
|
|
1370
|
+
when: string;
|
|
1371
|
+
}, {
|
|
1372
|
+
why: string;
|
|
1373
|
+
line: string;
|
|
1374
|
+
when: string;
|
|
1375
|
+
}>;
|
|
1376
|
+
root_import: z.ZodString;
|
|
1377
|
+
root_import_note: z.ZodString;
|
|
1378
|
+
not_needed: z.ZodArray<z.ZodObject<{
|
|
1379
|
+
name: z.ZodString;
|
|
1380
|
+
why: z.ZodString;
|
|
1381
|
+
}, "strip", z.ZodTypeAny, {
|
|
1382
|
+
name: string;
|
|
1383
|
+
why: string;
|
|
1384
|
+
}, {
|
|
1385
|
+
name: string;
|
|
1386
|
+
why: string;
|
|
1387
|
+
}>, "many">;
|
|
1388
|
+
}, "strip", z.ZodTypeAny, {
|
|
1389
|
+
tailwind: string;
|
|
1390
|
+
packages: {
|
|
1391
|
+
name: string;
|
|
1392
|
+
dev: boolean;
|
|
1393
|
+
why: string;
|
|
1394
|
+
range?: string | undefined;
|
|
1395
|
+
}[];
|
|
1396
|
+
stylesheet: {
|
|
1397
|
+
why: string;
|
|
1398
|
+
line: string;
|
|
1399
|
+
}[];
|
|
1400
|
+
package_source: {
|
|
1401
|
+
why: string;
|
|
1402
|
+
line: string;
|
|
1403
|
+
when: string;
|
|
1404
|
+
};
|
|
1405
|
+
root_import: string;
|
|
1406
|
+
root_import_note: string;
|
|
1407
|
+
not_needed: {
|
|
1408
|
+
name: string;
|
|
1409
|
+
why: string;
|
|
1410
|
+
}[];
|
|
1411
|
+
}, {
|
|
1412
|
+
tailwind: string;
|
|
1413
|
+
packages: {
|
|
1414
|
+
name: string;
|
|
1415
|
+
dev: boolean;
|
|
1416
|
+
why: string;
|
|
1417
|
+
range?: string | undefined;
|
|
1418
|
+
}[];
|
|
1419
|
+
stylesheet: {
|
|
1420
|
+
why: string;
|
|
1421
|
+
line: string;
|
|
1422
|
+
}[];
|
|
1423
|
+
package_source: {
|
|
1424
|
+
why: string;
|
|
1425
|
+
line: string;
|
|
1426
|
+
when: string;
|
|
1427
|
+
};
|
|
1428
|
+
root_import: string;
|
|
1429
|
+
root_import_note: string;
|
|
1430
|
+
not_needed: {
|
|
1431
|
+
name: string;
|
|
1432
|
+
why: string;
|
|
1433
|
+
}[];
|
|
1434
|
+
}>;
|
|
1230
1435
|
rules: z.ZodArray<z.ZodObject<{
|
|
1231
1436
|
id: z.ZodString;
|
|
1232
1437
|
rule: z.ZodString;
|
|
@@ -1288,6 +1493,30 @@ declare const GuidanceSchema: z.ZodObject<{
|
|
|
1288
1493
|
use: string;
|
|
1289
1494
|
}[] | undefined;
|
|
1290
1495
|
}>;
|
|
1496
|
+
setup: {
|
|
1497
|
+
tailwind: string;
|
|
1498
|
+
packages: {
|
|
1499
|
+
name: string;
|
|
1500
|
+
dev: boolean;
|
|
1501
|
+
why: string;
|
|
1502
|
+
range?: string | undefined;
|
|
1503
|
+
}[];
|
|
1504
|
+
stylesheet: {
|
|
1505
|
+
why: string;
|
|
1506
|
+
line: string;
|
|
1507
|
+
}[];
|
|
1508
|
+
package_source: {
|
|
1509
|
+
why: string;
|
|
1510
|
+
line: string;
|
|
1511
|
+
when: string;
|
|
1512
|
+
};
|
|
1513
|
+
root_import: string;
|
|
1514
|
+
root_import_note: string;
|
|
1515
|
+
not_needed: {
|
|
1516
|
+
name: string;
|
|
1517
|
+
why: string;
|
|
1518
|
+
}[];
|
|
1519
|
+
};
|
|
1291
1520
|
rules: {
|
|
1292
1521
|
id: string;
|
|
1293
1522
|
rule: string;
|
|
@@ -1304,6 +1533,30 @@ declare const GuidanceSchema: z.ZodObject<{
|
|
|
1304
1533
|
use: string;
|
|
1305
1534
|
}[] | undefined;
|
|
1306
1535
|
}>;
|
|
1536
|
+
setup: {
|
|
1537
|
+
tailwind: string;
|
|
1538
|
+
packages: {
|
|
1539
|
+
name: string;
|
|
1540
|
+
dev: boolean;
|
|
1541
|
+
why: string;
|
|
1542
|
+
range?: string | undefined;
|
|
1543
|
+
}[];
|
|
1544
|
+
stylesheet: {
|
|
1545
|
+
why: string;
|
|
1546
|
+
line: string;
|
|
1547
|
+
}[];
|
|
1548
|
+
package_source: {
|
|
1549
|
+
why: string;
|
|
1550
|
+
line: string;
|
|
1551
|
+
when: string;
|
|
1552
|
+
};
|
|
1553
|
+
root_import: string;
|
|
1554
|
+
root_import_note: string;
|
|
1555
|
+
not_needed: {
|
|
1556
|
+
name: string;
|
|
1557
|
+
why: string;
|
|
1558
|
+
}[];
|
|
1559
|
+
};
|
|
1307
1560
|
rules: {
|
|
1308
1561
|
id: string;
|
|
1309
1562
|
rule: string;
|
|
@@ -1313,6 +1566,7 @@ declare const GuidanceSchema: z.ZodObject<{
|
|
|
1313
1566
|
}>;
|
|
1314
1567
|
type Component = z.infer<typeof ComponentSchema>;
|
|
1315
1568
|
type Guidance = z.infer<typeof GuidanceSchema>;
|
|
1569
|
+
type Setup = z.infer<typeof SetupSchema>;
|
|
1316
1570
|
type GuidanceRule = z.infer<typeof GuidanceRuleSchema>;
|
|
1317
1571
|
type ComponentGuidance = z.infer<typeof ComponentGuidanceSchema>;
|
|
1318
1572
|
type Manifest = z.infer<typeof ManifestSchema>;
|
|
@@ -1323,4 +1577,4 @@ type Prop = z.infer<typeof PropSchema>;
|
|
|
1323
1577
|
type Slot = z.infer<typeof SlotSchema>;
|
|
1324
1578
|
type CompositionRule = CompositionRuleNode;
|
|
1325
1579
|
|
|
1326
|
-
export { type Component, type ComponentGuidance, ComponentGuidanceSchema, ComponentSchema, type ComponentsManifest, ComponentsManifestSchema, type CompositionRule, type CompositionRuleNode, CompositionRuleSchema, type Guidance, type GuidanceRule, GuidanceRuleSchema, GuidanceSchema, type Manifest, ManifestSchema, type Pattern, PatternSchema, type PatternSummary, PatternSummarySchema, type Prop, PropSchema, type Slot, SlotSchema };
|
|
1580
|
+
export { type Component, type ComponentGuidance, ComponentGuidanceSchema, ComponentSchema, type ComponentsManifest, ComponentsManifestSchema, type CompositionRule, type CompositionRuleNode, CompositionRuleSchema, type Guidance, type GuidanceRule, GuidanceRuleSchema, GuidanceSchema, type Manifest, ManifestSchema, type Pattern, PatternSchema, type PatternSummary, PatternSummarySchema, type Prop, PropSchema, type Setup, SetupSchema, type Slot, SlotSchema };
|