@nadicodeai/ui 12.1.125 → 12.1.127
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/account-menu.d.ts +5 -4
- package/dist/components/account-menu.d.ts.map +1 -1
- package/dist/components/account-menu.js +4 -4
- package/dist/components/action-menu.d.ts +1 -1
- package/dist/components/action-menu.js +3 -3
- package/dist/components/agent-list-row.d.ts +2 -2
- package/dist/components/agent-list-row.d.ts.map +1 -1
- package/dist/components/agent-list-row.js +2 -2
- package/dist/components/page-header.d.ts +4 -4
- package/dist/components/page-header.js +4 -4
- package/dist/components/reading-column.d.ts +5 -4
- package/dist/components/reading-column.d.ts.map +1 -1
- package/dist/components/reading-column.js +5 -4
- package/dist/components/record-identity.d.ts +3 -2
- package/dist/components/record-identity.d.ts.map +1 -1
- package/dist/components/record-identity.js +1 -1
- package/dist/components/record-list.d.ts +4 -4
- package/dist/components/record-list.d.ts.map +1 -1
- package/dist/components/record-list.js +1 -1
- package/dist/components/settings-page.d.ts +5 -8
- package/dist/components/settings-page.d.ts.map +1 -1
- package/dist/components/settings-page.js +6 -7
- package/dist/components/settings-section.d.ts +6 -24
- package/dist/components/settings-section.d.ts.map +1 -1
- package/dist/components/settings-section.js +5 -5
- package/dist/components/switch.d.ts +4 -5
- package/dist/components/switch.d.ts.map +1 -1
- package/dist/components/switch.js +4 -5
- package/dist/components/theme-mode-switcher.d.ts +1 -1
- package/dist/components/theme-mode-switcher.js +1 -1
- package/dist/eslint/index.js +2 -0
- package/dist/eslint/rules/no-stock-error-words.js +1 -1
- package/dist/eslint/rules/test-files-from-one-definition.js +67 -0
- package/dist/internal/record-menu-items.d.ts.map +1 -1
- package/dist/internal/record-menu-items.js +1 -1
- package/dist/showcase/specimens/compositions.js +1 -1
- package/dist/showcase/usage.generated.d.ts.map +1 -1
- package/dist/showcase/usage.generated.js +17 -17
- package/dist/standalone/index.js +1 -1
- package/package.json +2 -2
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { type SettingsSave } from "../internal/settings-save.js";
|
|
3
3
|
import { Field } from "./field.js";
|
|
4
|
-
import { Switch } from "./switch.js";
|
|
5
4
|
export type { SettingsSave, SettingsSaveFailure } from "../internal/settings-save.js";
|
|
6
5
|
export type SettingsFieldControlProps = {
|
|
7
6
|
id: string;
|
|
@@ -12,7 +11,6 @@ export type SettingsFieldControlProps = {
|
|
|
12
11
|
required?: boolean;
|
|
13
12
|
};
|
|
14
13
|
export type SettingsSectionTone = "error" | "warning";
|
|
15
|
-
export type SettingsHeaderSwitch = Pick<React.ComponentProps<typeof Switch>, "checked" | "defaultChecked" | "onCheckedChange" | "disabled" | "name">;
|
|
16
14
|
type SettingsInfo = {
|
|
17
15
|
/** Names the (i) button: "About build command". */
|
|
18
16
|
label: string;
|
|
@@ -35,7 +33,6 @@ type SavingSection = Titled & {
|
|
|
35
33
|
tone?: never;
|
|
36
34
|
lockedReason?: never;
|
|
37
35
|
unlock?: never;
|
|
38
|
-
headerSwitch?: never;
|
|
39
36
|
/** A control on the section's own header: an avatar's upload. */
|
|
40
37
|
actions?: React.ReactNode;
|
|
41
38
|
};
|
|
@@ -49,22 +46,9 @@ type FooterSection = Titled & {
|
|
|
49
46
|
tone?: SettingsSectionTone;
|
|
50
47
|
lockedReason?: never;
|
|
51
48
|
unlock?: never;
|
|
52
|
-
|
|
53
|
-
/** A button or a badge on the section's own header. A switch is `headerSwitch`. */
|
|
49
|
+
/** A button or a badge on the section's own header. */
|
|
54
50
|
actions?: React.ReactNode;
|
|
55
51
|
};
|
|
56
|
-
type SwitchedSection = Titled & {
|
|
57
|
-
save?: never;
|
|
58
|
-
footer?: never;
|
|
59
|
-
/** What is specific to this card, on the footer's left: a limit, what a value is for, a plan it needs, a link. Absent: nothing. */
|
|
60
|
-
footerHint?: React.ReactNode;
|
|
61
|
-
tone?: never;
|
|
62
|
-
lockedReason?: never;
|
|
63
|
-
unlock?: never;
|
|
64
|
-
actions?: never;
|
|
65
|
-
/** The switch that is the whole card, at the title's right, named by the title; it applies at once. */
|
|
66
|
-
headerSwitch: SettingsHeaderSwitch;
|
|
67
|
-
};
|
|
68
52
|
type LockedSection = Titled & {
|
|
69
53
|
save?: never;
|
|
70
54
|
footer?: never;
|
|
@@ -74,7 +58,6 @@ type LockedSection = Titled & {
|
|
|
74
58
|
lockedReason: string | React.ReactElement;
|
|
75
59
|
/** The way to get access: an Upgrade button, a Contact sales link. Left out when nothing the person does unlocks it. */
|
|
76
60
|
unlock?: React.ReactNode;
|
|
77
|
-
headerSwitch?: never;
|
|
78
61
|
actions?: never;
|
|
79
62
|
};
|
|
80
63
|
type UntitledSection = {
|
|
@@ -88,10 +71,9 @@ type UntitledSection = {
|
|
|
88
71
|
tone?: never;
|
|
89
72
|
lockedReason?: never;
|
|
90
73
|
unlock?: never;
|
|
91
|
-
headerSwitch?: never;
|
|
92
74
|
actions?: never;
|
|
93
75
|
};
|
|
94
|
-
export type SettingsSectionProps = SettingsSectionBase & (SavingSection | FooterSection |
|
|
76
|
+
export type SettingsSectionProps = SettingsSectionBase & (SavingSection | FooterSection | LockedSection | UntitledSection);
|
|
95
77
|
export type SavingSettingsSectionProps = SettingsSectionBase & SavingSection;
|
|
96
78
|
/**
|
|
97
79
|
* A card of one setting that says what changing it does and ends in a footer.
|
|
@@ -99,11 +81,11 @@ export type SavingSettingsSectionProps = SettingsSectionBase & SavingSection;
|
|
|
99
81
|
* @family Compositions
|
|
100
82
|
* @when One setting a person changes on a SettingsPage or as a section of an ObjectPage: Personal details, Company identity, Notifications. A typed value takes `save`; a switch or a short reversible choice applies at once through its own control's change, with no Save. Also a plan-gated feature, a delete card, one read-only value (an ID in a read-only mono InputGroup with its copy button, no Save), and a paid quantity (its stepper field, the price as the description, a two-fact summary under it).
|
|
101
83
|
* @instead Read-only facts of an object are a SettingsFactsSection; a table or a list of records is a TableCard; Theme and Language live in the account menu; a record's edit in a list is a RowEditForm.
|
|
102
|
-
* @behaviour "Groups related form controls inside a bordered card with optional footer actions." (https://vercel.com/geist/fieldset) Ours: one setting per card: a single SettingsField, the description its only help. A typed value (a name, a URL, a server, a port, a key) gets its own card. A semantic subgroup of related controls inside a field, such as radios or checkboxes, is a `FieldSet` with a `FieldLegend`. One more shape exists, declared by a part and never by classes at the call site. A card of several settings holds SettingsRows, label left and control right, only when every row is a switch or every row is a select. "Use Toggle for a single boolean setting where ON takes effect immediately, like `Password Protection` or `Auto-Cancel Builds`." (https://vercel.com/geist/toggle) "Pair with a form footer only when the setting needs an explicit `Save` step." (https://vercel.com/geist/toggle) "Disable Toggle only when the action is impossible (missing plan, locked policy); pair with helper text or a `Tooltip` that names the resolver." (https://vercel.com/geist/toggle) Ours:
|
|
84
|
+
* @behaviour "Groups related form controls inside a bordered card with optional footer actions." (https://vercel.com/geist/fieldset) Ours: one setting per card: a single SettingsField, the description its only help. A typed value (a name, a URL, a server, a port, a key) gets its own card. A semantic subgroup of related controls inside a field, such as radios or checkboxes, is a `FieldSet` with a `FieldLegend`. One more shape exists, declared by a part and never by classes at the call site. A card of several settings holds SettingsRows, label left and control right, only when every row is a switch or every row is a select. "Use Toggle for a single boolean setting where ON takes effect immediately, like `Password Protection` or `Auto-Cancel Builds`." (https://vercel.com/geist/toggle) "Pair with a form footer only when the setting needs an explicit `Save` step." (https://vercel.com/geist/toggle) "Disable Toggle only when the action is impossible (missing plan, locked policy); pair with helper text or a `Tooltip` that names the resolver." (https://vercel.com/geist/toggle) Ours: a switch never applies on change; it is a row of the card, a draft until the footer's Save, as Vercel's settings cards are. A switch blocked from above is shown off and disabled, the footer saying why and never a tooltip. Required: the title and the description. The header's actions stand at the title's right; on a card narrower than 28 rem they keep the title's row and the description runs under both, as Vercel's cards read on a phone. The footer's left line (`footerHint`, `save.hint`) is optional and specific to the card, never a generic line repeated on every card: a limit, what a value is for, a plan it needs, a link; absent, it is nothing, and a card with neither a line nor a button has no footer. Ours: `save`: a typed value, one card with its own Save in the footer, always visible. The section owns the changed state: Save stays disabled until a field differs from what is saved and says `pendingLabel` while saving with Cancel beside it; a completed save calls `saved`, and the product raises one toast from its catalogue ("Completion toasts follow `{Noun} {past-participle}`: `Blob deleted`, `Domain added`, `Environment variable saved`. Never include `successfully`; the action name implies it." https://vercel.com/geist/toast), and Save returns to disabled, with no saved state in the footer. Ours: the section never raises a toast itself. A failed save keeps every value and shows under its field, or above the footer when no field owns it. `tone` marks a state with a command (a failed payment, a trial ending): a 1px border and a footer tinted in the hue with its line in it, the line saying the condition in words; title, line, fields and buttons stay neutral, an outline secondary then a default primary. A button takes the hue of its command, not of the card: `destructive` (red) for a permanent loss (Delete), `warning` (amber) for a disruptive command that can be undone (Pause, Archive). A delete card is `tone="error"` with the object's summary as its body; an archive card is neutral with a `warning` button in the footer. "Use a Note for inline contextual feedback next to the field, card, or section it describes: a region change warning above a region picker, a rate-limit notice next to a usage gauge." (https://vercel.com/geist/note) "One Note per concept." (https://vercel.com/geist/note) Ours: a message about the fields inside is a MessageNotice in the body, the card staying neutral. "Disabled checkboxes still need a Tooltip naming the reason; a greyed box with no explanation reads as a bug." (https://vercel.com/geist/checkbox) Ours: `lockedReason` (Geist's disabled wall) is the reason, written as the footer's line, not in a tooltip; it keeps the fields in view, inert with muted text, under a not-allowed cursor, the title and line unchanged; `unlock` is the way to get access, left out when nothing the person does unlocks it. A locked section has no `save` and no header `actions`.
|
|
103
85
|
* @words "Helper text is sentence case, one sentence with a trailing period, on a sibling element wired through `aria-describedby`." (https://vercel.com/geist/input) Ours: the description is that helper text for the whole card, and no field has its own. "Render an optional one-sentence description as a sibling under the label that explains ON only. Don’t describe OFF; it’s the negation." (https://vercel.com/geist/toggle) Ours: a header-switch card's description says what turning it on does. The title names the values ("Personal details"); the description says what changing them does, in one line; the footer line is a Learn more link, a limit ("Use 32 characters at most."), what stays unaffected, or what is blocked and why ("Ask an owner to change this."); Save and Saving come from the product's catalogue, and so does the toast a `saved` callback raises; a delete card's description opens "Permanently delete".
|
|
104
86
|
* @access "Provide an accessible name through `children`, `aria-label`, or `aria-labelledby`." (https://vercel.com/geist/toggle) Ours: the title is the section's h2 and names the form that saves it, and the header switch. The footer's line is one status, announced politely; a failure under a field marks the control invalid and describes it. Locked fields are inert, so the section's title, description and reason are what a screen reader meets.
|
|
105
87
|
*/
|
|
106
|
-
declare function SettingsSection({ title, description, actions,
|
|
88
|
+
declare function SettingsSection({ title, description, actions, tone, children, className, save, footer, footerHint, lockedReason, unlock, ...props }: SettingsSectionProps): React.JSX.Element;
|
|
107
89
|
type SettingsFieldBase = Omit<React.ComponentProps<typeof Field>, "children" | "orientation"> & {
|
|
108
90
|
id: string;
|
|
109
91
|
label: NonNullable<React.ReactNode>;
|
|
@@ -183,8 +165,8 @@ type SettingsRowsProps = {
|
|
|
183
165
|
*
|
|
184
166
|
* @family Inputs
|
|
185
167
|
* @when A card of settings of one kind, all switches or all selects, that the card's one description covers: a project's Git switches, a team's notification channels, a set of defaults.
|
|
186
|
-
* @instead One setting is a SettingsField. Fields of different kinds, text boxes among them, are one card each.
|
|
187
|
-
* @behaviour Declares `kind` once; every row is that kind, so a card cannot mix a switch with a select. Required on every row: the label and its `info` (an (i) with its sentence in a tooltip and on the control); no help line sits under a row. A switch row shows its state word beside the switch (`stateLabels`) and is controlled, so the word always follows the switch. Rows stand 16 px apart; below 28rem a row stacks its control under its label. "Pair with a form footer only when the setting needs an explicit `Save` step." (https://vercel.com/geist/toggle) Ours: a switch
|
|
168
|
+
* @instead One setting is a SettingsField. Fields of different kinds, text boxes among them, are one card each.
|
|
169
|
+
* @behaviour Declares `kind` once; every row is that kind, so a card cannot mix a switch with a select. Required on every row: the label and its `info` (an (i) with its sentence in a tooltip and on the control); no help line sits under a row. A switch row shows its state word beside the switch (`stateLabels`) and is controlled, so the word always follows the switch. Rows stand 16 px apart; below 28rem a row stacks its control under its label. "Pair with a form footer only when the setting needs an explicit `Save` step." (https://vercel.com/geist/toggle) Ours: a switch is a draft the card's Save applies.
|
|
188
170
|
* @words "Title Case noun phrase, 1–4 words, naming what is true when ON: `Password Protection`, not `Enable Password Protection`." (https://vercel.com/geist/toggle) Ours: sentence case, a noun for what it controls ("Pull request comments"), the same for a switch as for a select. "Render an optional one-sentence description as a sibling under the label that explains ON only. Don’t describe OFF; it’s the negation." (https://vercel.com/geist/toggle) Ours: that sentence is `info.text`. "Options are Title Case when short and match canonical branding (`Next.js`, not `NextJS`); keep the same register across the list." (https://vercel.com/geist/select) Ours: a select's options are sentence case.
|
|
189
171
|
* @access Each row's control is named by the row's label and described by its info and its error. The info button has its own name and opens on focus.
|
|
190
172
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings-section.d.ts","sourceRoot":"","sources":["../../src/components/settings-section.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EACL,KAAK,YAAY,EAGlB,MAAM,0BAA0B,CAAC;AAGlC,OAAO,EAAE,KAAK,EAAoD,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"settings-section.d.ts","sourceRoot":"","sources":["../../src/components/settings-section.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EACL,KAAK,YAAY,EAGlB,MAAM,0BAA0B,CAAC;AAGlC,OAAO,EAAE,KAAK,EAAoD,MAAM,oBAAoB,CAAC;AAK7F,YAAY,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAElF,MAAM,MAAM,yBAAyB,GAAG;IACtC,EAAE,EAAE,MAAM,CAAC;IACX,iBAAiB,EAAE,MAAM,CAAC;IAC1B,cAAc,CAAC,EAAE,IAAI,CAAC;IACtB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,OAAO,GAAG,SAA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ACxB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,KAAK,iBAAiB,GAAG,eAAe,GAAG;IACzC,OAAO,EAAE,OAAO,CAAC;IACjB,eAAe,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;CAC7C,CAAC;AAEF,KAAK,iBAAiB,GAAG,eAAe,GAAG;IACzC,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,OAAO,EAAE,SAAS;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CACtD,CAAC;AAEF,KAAK,iBAAiB,GAClB;IACE,IAAI,EAAE,QAAQ,CAAC;IACf,2EAA2E;IAC3E,WAAW,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC;IACzC,IAAI,EAAE,SAAS,iBAAiB,EAAE,CAAC;CACpC,GACD;IACE,IAAI,EAAE,QAAQ,CAAC;IACf,WAAW,CAAC,EAAE,KAAK,CAAC;IACpB,IAAI,EAAE,SAAS,iBAAiB,EAAE,CAAC;CACpC,CAAC;AAsCN;;;;;;;;;GASG;AACH,iBAAS,YAAY,CAAC,KAAK,EAAE,iBAAiB,qBAU7C;AA0CD,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -22,15 +22,15 @@ const ACTIONS_ON_TITLE_ROW_WHEN_NARROW = "@max-md/settings-section:[&>[data-slot
|
|
|
22
22
|
* @family Compositions
|
|
23
23
|
* @when One setting a person changes on a SettingsPage or as a section of an ObjectPage: Personal details, Company identity, Notifications. A typed value takes `save`; a switch or a short reversible choice applies at once through its own control's change, with no Save. Also a plan-gated feature, a delete card, one read-only value (an ID in a read-only mono InputGroup with its copy button, no Save), and a paid quantity (its stepper field, the price as the description, a two-fact summary under it).
|
|
24
24
|
* @instead Read-only facts of an object are a SettingsFactsSection; a table or a list of records is a TableCard; Theme and Language live in the account menu; a record's edit in a list is a RowEditForm.
|
|
25
|
-
* @behaviour "Groups related form controls inside a bordered card with optional footer actions." (https://vercel.com/geist/fieldset) Ours: one setting per card: a single SettingsField, the description its only help. A typed value (a name, a URL, a server, a port, a key) gets its own card. A semantic subgroup of related controls inside a field, such as radios or checkboxes, is a `FieldSet` with a `FieldLegend`. One more shape exists, declared by a part and never by classes at the call site. A card of several settings holds SettingsRows, label left and control right, only when every row is a switch or every row is a select. "Use Toggle for a single boolean setting where ON takes effect immediately, like `Password Protection` or `Auto-Cancel Builds`." (https://vercel.com/geist/toggle) "Pair with a form footer only when the setting needs an explicit `Save` step." (https://vercel.com/geist/toggle) "Disable Toggle only when the action is impossible (missing plan, locked policy); pair with helper text or a `Tooltip` that names the resolver." (https://vercel.com/geist/toggle) Ours:
|
|
25
|
+
* @behaviour "Groups related form controls inside a bordered card with optional footer actions." (https://vercel.com/geist/fieldset) Ours: one setting per card: a single SettingsField, the description its only help. A typed value (a name, a URL, a server, a port, a key) gets its own card. A semantic subgroup of related controls inside a field, such as radios or checkboxes, is a `FieldSet` with a `FieldLegend`. One more shape exists, declared by a part and never by classes at the call site. A card of several settings holds SettingsRows, label left and control right, only when every row is a switch or every row is a select. "Use Toggle for a single boolean setting where ON takes effect immediately, like `Password Protection` or `Auto-Cancel Builds`." (https://vercel.com/geist/toggle) "Pair with a form footer only when the setting needs an explicit `Save` step." (https://vercel.com/geist/toggle) "Disable Toggle only when the action is impossible (missing plan, locked policy); pair with helper text or a `Tooltip` that names the resolver." (https://vercel.com/geist/toggle) Ours: a switch never applies on change; it is a row of the card, a draft until the footer's Save, as Vercel's settings cards are. A switch blocked from above is shown off and disabled, the footer saying why and never a tooltip. Required: the title and the description. The header's actions stand at the title's right; on a card narrower than 28 rem they keep the title's row and the description runs under both, as Vercel's cards read on a phone. The footer's left line (`footerHint`, `save.hint`) is optional and specific to the card, never a generic line repeated on every card: a limit, what a value is for, a plan it needs, a link; absent, it is nothing, and a card with neither a line nor a button has no footer. Ours: `save`: a typed value, one card with its own Save in the footer, always visible. The section owns the changed state: Save stays disabled until a field differs from what is saved and says `pendingLabel` while saving with Cancel beside it; a completed save calls `saved`, and the product raises one toast from its catalogue ("Completion toasts follow `{Noun} {past-participle}`: `Blob deleted`, `Domain added`, `Environment variable saved`. Never include `successfully`; the action name implies it." https://vercel.com/geist/toast), and Save returns to disabled, with no saved state in the footer. Ours: the section never raises a toast itself. A failed save keeps every value and shows under its field, or above the footer when no field owns it. `tone` marks a state with a command (a failed payment, a trial ending): a 1px border and a footer tinted in the hue with its line in it, the line saying the condition in words; title, line, fields and buttons stay neutral, an outline secondary then a default primary. A button takes the hue of its command, not of the card: `destructive` (red) for a permanent loss (Delete), `warning` (amber) for a disruptive command that can be undone (Pause, Archive). A delete card is `tone="error"` with the object's summary as its body; an archive card is neutral with a `warning` button in the footer. "Use a Note for inline contextual feedback next to the field, card, or section it describes: a region change warning above a region picker, a rate-limit notice next to a usage gauge." (https://vercel.com/geist/note) "One Note per concept." (https://vercel.com/geist/note) Ours: a message about the fields inside is a MessageNotice in the body, the card staying neutral. "Disabled checkboxes still need a Tooltip naming the reason; a greyed box with no explanation reads as a bug." (https://vercel.com/geist/checkbox) Ours: `lockedReason` (Geist's disabled wall) is the reason, written as the footer's line, not in a tooltip; it keeps the fields in view, inert with muted text, under a not-allowed cursor, the title and line unchanged; `unlock` is the way to get access, left out when nothing the person does unlocks it. A locked section has no `save` and no header `actions`.
|
|
26
26
|
* @words "Helper text is sentence case, one sentence with a trailing period, on a sibling element wired through `aria-describedby`." (https://vercel.com/geist/input) Ours: the description is that helper text for the whole card, and no field has its own. "Render an optional one-sentence description as a sibling under the label that explains ON only. Don’t describe OFF; it’s the negation." (https://vercel.com/geist/toggle) Ours: a header-switch card's description says what turning it on does. The title names the values ("Personal details"); the description says what changing them does, in one line; the footer line is a Learn more link, a limit ("Use 32 characters at most."), what stays unaffected, or what is blocked and why ("Ask an owner to change this."); Save and Saving come from the product's catalogue, and so does the toast a `saved` callback raises; a delete card's description opens "Permanently delete".
|
|
27
27
|
* @access "Provide an accessible name through `children`, `aria-label`, or `aria-labelledby`." (https://vercel.com/geist/toggle) Ours: the title is the section's h2 and names the form that saves it, and the header switch. The footer's line is one status, announced politely; a failure under a field marks the control invalid and describes it. Locked fields are inert, so the section's title, description and reason are what a screen reader meets.
|
|
28
28
|
*/
|
|
29
|
-
function SettingsSection({ title, description, actions,
|
|
29
|
+
function SettingsSection({ title, description, actions, tone, children, className, save, footer, footerHint, lockedReason, unlock, ...props }) {
|
|
30
30
|
const titleId = React.useId();
|
|
31
31
|
const locked = lockedReason !== undefined;
|
|
32
32
|
const fields = children != null ? (_jsx(CardContent, { children: _jsx(FieldGroup, { "data-slot": "settings-section-fields", inert: locked, className: cn(locked && "**:text-muted-foreground"), children: children }) })) : null;
|
|
33
|
-
return (_jsxs(Card, { render: _jsx("section", { ...props, "data-slot": "settings-section", "data-tone": tone, "data-locked": locked || undefined }), className: cn("@container/settings-section min-w-0", tone && toneClassNames[tone], locked && "cursor-not-allowed *:data-[slot=card-footer]:cursor-default", className), children: [_jsxs(CardHeader, { className: cn(ACTIONS_ON_TITLE_ROW_WHEN_NARROW, !title && "has-data-[slot=card-description]:grid-rows-none"), children: [title ? (_jsx(CardTitle, { children: _jsx("h2", { id: titleId, children: title }) })) : null, _jsx(CardDescription, { children: description }), actions ? _jsx(CardAction, { children: actions }) : null
|
|
33
|
+
return (_jsxs(Card, { render: _jsx("section", { ...props, "data-slot": "settings-section", "data-tone": tone, "data-locked": locked || undefined }), className: cn("@container/settings-section min-w-0", tone && toneClassNames[tone], locked && "cursor-not-allowed *:data-[slot=card-footer]:cursor-default", className), children: [_jsxs(CardHeader, { className: cn(ACTIONS_ON_TITLE_ROW_WHEN_NARROW, !title && "has-data-[slot=card-description]:grid-rows-none"), children: [title ? (_jsx(CardTitle, { children: _jsx("h2", { id: titleId, children: title }) })) : null, _jsx(CardDescription, { children: description }), actions ? _jsx(CardAction, { children: actions }) : null] }), save ? (_jsx(SettingsSaveForm, { save: save, titleId: titleId, children: fields })) : (_jsxs(_Fragment, { children: [fields, _jsx(FooterStrip, { hint: locked ? lockedReason : footerHint, hintSlot: "settings-section-hint", children: locked ? unlock : footer })] }))] }));
|
|
34
34
|
}
|
|
35
35
|
function controlPropsOf({ id, info, error, invalid, disabled, required, }) {
|
|
36
36
|
return {
|
|
@@ -92,8 +92,8 @@ function SettingsRow({ id, label, info, error, disabled, children, }) {
|
|
|
92
92
|
*
|
|
93
93
|
* @family Inputs
|
|
94
94
|
* @when A card of settings of one kind, all switches or all selects, that the card's one description covers: a project's Git switches, a team's notification channels, a set of defaults.
|
|
95
|
-
* @instead One setting is a SettingsField. Fields of different kinds, text boxes among them, are one card each.
|
|
96
|
-
* @behaviour Declares `kind` once; every row is that kind, so a card cannot mix a switch with a select. Required on every row: the label and its `info` (an (i) with its sentence in a tooltip and on the control); no help line sits under a row. A switch row shows its state word beside the switch (`stateLabels`) and is controlled, so the word always follows the switch. Rows stand 16 px apart; below 28rem a row stacks its control under its label. "Pair with a form footer only when the setting needs an explicit `Save` step." (https://vercel.com/geist/toggle) Ours: a switch
|
|
95
|
+
* @instead One setting is a SettingsField. Fields of different kinds, text boxes among them, are one card each.
|
|
96
|
+
* @behaviour Declares `kind` once; every row is that kind, so a card cannot mix a switch with a select. Required on every row: the label and its `info` (an (i) with its sentence in a tooltip and on the control); no help line sits under a row. A switch row shows its state word beside the switch (`stateLabels`) and is controlled, so the word always follows the switch. Rows stand 16 px apart; below 28rem a row stacks its control under its label. "Pair with a form footer only when the setting needs an explicit `Save` step." (https://vercel.com/geist/toggle) Ours: a switch is a draft the card's Save applies.
|
|
97
97
|
* @words "Title Case noun phrase, 1–4 words, naming what is true when ON: `Password Protection`, not `Enable Password Protection`." (https://vercel.com/geist/toggle) Ours: sentence case, a noun for what it controls ("Pull request comments"), the same for a switch as for a select. "Render an optional one-sentence description as a sibling under the label that explains ON only. Don’t describe OFF; it’s the negation." (https://vercel.com/geist/toggle) Ours: that sentence is `info.text`. "Options are Title Case when short and match canonical branding (`Next.js`, not `NextJS`); keep the same register across the list." (https://vercel.com/geist/select) Ours: a select's options are sentence case.
|
|
98
98
|
* @access Each row's control is named by the row's label and described by its info and its error. The info button has its own name and opens on focus.
|
|
99
99
|
*/
|
|
@@ -24,11 +24,10 @@ import { type ControlName } from "../internal/control-name.js";
|
|
|
24
24
|
* and a switch with none of them does not compile. A bare `Switch` is the 28 by 14 px track with an
|
|
25
25
|
* 11 px thumb; `md` is 36 by 20 px and `lg` 40 by 24 px. Colour: off is the input grey, on is
|
|
26
26
|
* ink, and a disabled switch turns grey, on or off, with a greyer thumb and no shadow. Space flips
|
|
27
|
-
* it. On a settings page it
|
|
28
|
-
* places: in the card's body under its label, its state word after
|
|
29
|
-
* `control="switch"`);
|
|
30
|
-
*
|
|
31
|
-
* its left. A failed change leaves the switch showing the true state.
|
|
27
|
+
* it. On a settings page it is a draft its card's footer Save applies, and the product's toast
|
|
28
|
+
* confirms the save, in one of two places: in the card's body under its label, its state word after
|
|
29
|
+
* it (`SettingsField`'s `control="switch"`); or at the end of a row of a card of several settings,
|
|
30
|
+
* the label to its left. A failed save keeps the draft and says so under the card.
|
|
32
31
|
* @words "The label is `children`, not a `label` prop. Title Case noun phrase, 1–4 words, naming
|
|
33
32
|
* what is true when ON: `Password Protection`, not `Enable Password Protection`."
|
|
34
33
|
* (https://vercel.com/geist/toggle) "Render an optional one-sentence description as a sibling under
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"switch.d.ts","sourceRoot":"","sources":["../../src/components/switch.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAGlE,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE3D
|
|
1
|
+
{"version":3,"file":"switch.d.ts","sourceRoot":"","sources":["../../src/components/switch.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAGlE,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE3D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,iBAAS,MAAM,CAAC,EACd,SAAS,EACT,IAAW,EACX,GAAG,KAAK,EACT,EAAE,eAAe,CAAC,IAAI,CAAC,KAAK,GAC3B,WAAW,GAAG;IACZ,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;CAC3B,+BAiBF;AAED,OAAO,EAAE,MAAM,EAAE,CAAC"}
|
|
@@ -25,11 +25,10 @@ import { cn } from "../lib/utils.js";
|
|
|
25
25
|
* and a switch with none of them does not compile. A bare `Switch` is the 28 by 14 px track with an
|
|
26
26
|
* 11 px thumb; `md` is 36 by 20 px and `lg` 40 by 24 px. Colour: off is the input grey, on is
|
|
27
27
|
* ink, and a disabled switch turns grey, on or off, with a greyer thumb and no shadow. Space flips
|
|
28
|
-
* it. On a settings page it
|
|
29
|
-
* places: in the card's body under its label, its state word after
|
|
30
|
-
* `control="switch"`);
|
|
31
|
-
*
|
|
32
|
-
* its left. A failed change leaves the switch showing the true state.
|
|
28
|
+
* it. On a settings page it is a draft its card's footer Save applies, and the product's toast
|
|
29
|
+
* confirms the save, in one of two places: in the card's body under its label, its state word after
|
|
30
|
+
* it (`SettingsField`'s `control="switch"`); or at the end of a row of a card of several settings,
|
|
31
|
+
* the label to its left. A failed save keeps the draft and says so under the card.
|
|
33
32
|
* @words "The label is `children`, not a `label` prop. Title Case noun phrase, 1–4 words, naming
|
|
34
33
|
* what is true when ON: `Password Protection`, not `Enable Password Protection`."
|
|
35
34
|
* (https://vercel.com/geist/toggle) "Render an optional one-sentence description as a sibling under
|
|
@@ -25,7 +25,7 @@ export type ThemeModeSwitcherProps = Omit<React.ComponentProps<typeof RadioGroup
|
|
|
25
25
|
* @family Choices
|
|
26
26
|
* @when An Appearance setting on a settings page, where the choice has room to show its names.
|
|
27
27
|
* @instead Inside a menu, the same choice is ThemeModeMenu; a choice that is not the appearance is a RadioGroup or a ToggleGroup.
|
|
28
|
-
* @behaviour Exclusive: one mode is selected
|
|
28
|
+
* @behaviour Exclusive: one mode is selected; on a settings card the choice is a draft the card's Save applies. The order is System, Light, Dark everywhere.
|
|
29
29
|
* @words The setting's name, then each mode's name from the product's catalogue: "System", "Light", "Dark".
|
|
30
30
|
* @access A radio group named by `aria-label`; each mode is a radio with its name, moved through with the arrow keys.
|
|
31
31
|
*/
|
|
@@ -19,7 +19,7 @@ const themeModeIcons = {
|
|
|
19
19
|
* @family Choices
|
|
20
20
|
* @when An Appearance setting on a settings page, where the choice has room to show its names.
|
|
21
21
|
* @instead Inside a menu, the same choice is ThemeModeMenu; a choice that is not the appearance is a RadioGroup or a ToggleGroup.
|
|
22
|
-
* @behaviour Exclusive: one mode is selected
|
|
22
|
+
* @behaviour Exclusive: one mode is selected; on a settings card the choice is a draft the card's Save applies. The order is System, Light, Dark everywhere.
|
|
23
23
|
* @words The setting's name, then each mode's name from the product's catalogue: "System", "Light", "Dark".
|
|
24
24
|
* @access A radio group named by `aria-label`; each mode is a radio with its name, moved through with the arrow keys.
|
|
25
25
|
*/
|
package/dist/eslint/index.js
CHANGED
|
@@ -57,6 +57,7 @@ import { skeletonInRegion } from "./rules/skeleton-in-region.js";
|
|
|
57
57
|
import { sortableHeadingUsesSort } from "./rules/sortable-heading-uses-sort.js";
|
|
58
58
|
import { tableCellInsetOwner } from "./rules/table-cell-inset-owner.js";
|
|
59
59
|
import { tabsSelectionIsControlled } from "./rules/tabs-selection-is-controlled.js";
|
|
60
|
+
import { testFilesFromOneDefinition } from "./rules/test-files-from-one-definition.js";
|
|
60
61
|
import { tooltipOnlyArrow } from "./rules/tooltip-only-arrow.js";
|
|
61
62
|
import { tooltipTriggerAccessibleName } from "./rules/tooltip-trigger-accessible-name.js";
|
|
62
63
|
import { workspaceDeclaresImports } from "./rules/workspace-declares-imports.js";
|
|
@@ -203,6 +204,7 @@ const plugin = {
|
|
|
203
204
|
"sortable-heading-uses-sort": sortableHeadingUsesSort,
|
|
204
205
|
"table-cell-inset-owner": tableCellInsetOwner,
|
|
205
206
|
"tabs-selection-is-controlled": tabsSelectionIsControlled,
|
|
207
|
+
"test-files-from-one-definition": testFilesFromOneDefinition,
|
|
206
208
|
"tooltip-only-arrow": tooltipOnlyArrow,
|
|
207
209
|
"tooltip-trigger-accessible-name": tooltipTriggerAccessibleName,
|
|
208
210
|
"workspace-declares-imports": workspaceDeclaresImports,
|
|
@@ -15,7 +15,7 @@ const PHRASES = [
|
|
|
15
15
|
];
|
|
16
16
|
|
|
17
17
|
const CATALOGUE_FILE = /(?:^|\/)(?:copy|i18n)\/|(?:^|\/)(?:words|messages)\.[jt]s$/;
|
|
18
|
-
const TEST_FILE = /\.test
|
|
18
|
+
const TEST_FILE = /\.test(?:-[^./]+)?\.[jt]sx?$/;
|
|
19
19
|
|
|
20
20
|
export const noStockErrorWords = {
|
|
21
21
|
meta: {
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
const EVERY_TEST =
|
|
2
|
+
/(?:^|\/)\*\.test(?:-\*)?\.|(?:^|\/)tests\/\*\*(?:\/\*[^/]*)?$|(?:^|\/)\*\.e2e\.ts$/;
|
|
3
|
+
|
|
4
|
+
const textOf = (node) => {
|
|
5
|
+
// oxlint-disable-next-line anti-slop/no-runtime-typeof -- ESTree types Literal.value as string | number | boolean | RegExp | bigint | null; only typeof picks the string.
|
|
6
|
+
if (node.type === "Literal" && typeof node.value === "string") return node.value;
|
|
7
|
+
if (node.type === "TemplateLiteral")
|
|
8
|
+
return node.quasis.map((quasi) => quasi.value.cooked).join("*");
|
|
9
|
+
return null;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
const variableNamed = (scope, name) => {
|
|
13
|
+
for (let current = scope; current; current = current.upper) {
|
|
14
|
+
const variable = current.set.get(name);
|
|
15
|
+
if (variable) return variable;
|
|
16
|
+
}
|
|
17
|
+
return undefined;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
const keyName = (property) =>
|
|
21
|
+
property.key.type === "Identifier" ? property.key.name : textOf(property.key);
|
|
22
|
+
|
|
23
|
+
export const testFilesFromOneDefinition = {
|
|
24
|
+
meta: {
|
|
25
|
+
type: "problem",
|
|
26
|
+
docs: {
|
|
27
|
+
description:
|
|
28
|
+
"A config block skips tests with TEST_FILES from @nadicodeai/test-support/test-files, never a glob of its own.",
|
|
29
|
+
},
|
|
30
|
+
schema: [],
|
|
31
|
+
messages: {
|
|
32
|
+
handWritten:
|
|
33
|
+
"Skip tests with TEST_FILES from @nadicodeai/test-support/test-files: a test glob written here misses the next kind of test.",
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
create(context) {
|
|
37
|
+
const constantOf = (node) => {
|
|
38
|
+
if (node.type !== "Identifier") return null;
|
|
39
|
+
const definition = variableNamed(context.sourceCode.getScope(node), node.name)?.defs[0];
|
|
40
|
+
return definition?.type === "Variable" ? definition.node.init : null;
|
|
41
|
+
};
|
|
42
|
+
const checkGlobs = (node) => {
|
|
43
|
+
if (node.type === "Identifier") {
|
|
44
|
+
const init = constantOf(node);
|
|
45
|
+
if (init?.type === "ArrayExpression") checkGlobs(init);
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
if (node.type !== "ArrayExpression") return;
|
|
49
|
+
for (const element of node.elements) {
|
|
50
|
+
if (!element) continue;
|
|
51
|
+
if (element.type === "SpreadElement") {
|
|
52
|
+
checkGlobs(element.argument);
|
|
53
|
+
continue;
|
|
54
|
+
}
|
|
55
|
+
const glob = textOf(constantOf(element) ?? element);
|
|
56
|
+
if (glob !== null && EVERY_TEST.test(glob)) {
|
|
57
|
+
context.report({ node: element, messageId: "handWritten" });
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
return {
|
|
62
|
+
Property(node) {
|
|
63
|
+
if (keyName(node) === "ignores") checkGlobs(node.value);
|
|
64
|
+
},
|
|
65
|
+
};
|
|
66
|
+
},
|
|
67
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"record-menu-items.d.ts","sourceRoot":"","sources":["../../src/internal/record-menu-items.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAQxE,OAAO,KAAK,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAEhF,wBAAgB,cAAc,CAAC,MAAM,EAAE,iBAAiB;;;;;;;;EAMvD;AAYD,wBAAgB,cAAc,CAAC,EAC7B,OAAO,EACP,OAAe,EACf,KAAK,GACN,EAAE;IACD,OAAO,EAAE,WAAW,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB,+BAuBA;AAED,wBAAgB,cAAc,CAAC,QAAQ,EAAE,SAAS,WAAW,EAAE,GAAG,WAAW,GAAG,SAAS,CAKxF;AAED,wBAAgB,eAAe,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,IAAI,CAAC,UAAU,EAAE,OAAO,CAAC,+
|
|
1
|
+
{"version":3,"file":"record-menu-items.d.ts","sourceRoot":"","sources":["../../src/internal/record-menu-items.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAQxE,OAAO,KAAK,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAEhF,wBAAgB,cAAc,CAAC,MAAM,EAAE,iBAAiB;;;;;;;;EAMvD;AAYD,wBAAgB,cAAc,CAAC,EAC7B,OAAO,EACP,OAAe,EACf,KAAK,GACN,EAAE;IACD,OAAO,EAAE,WAAW,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB,+BAuBA;AAED,wBAAgB,cAAc,CAAC,QAAQ,EAAE,SAAS,WAAW,EAAE,GAAG,WAAW,GAAG,SAAS,CAKxF;AAED,wBAAgB,eAAe,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,IAAI,CAAC,UAAU,EAAE,OAAO,CAAC,+BAiB9E"}
|
|
@@ -31,5 +31,5 @@ export function soleMenuButton(commands) {
|
|
|
31
31
|
export function RecordMenuItems({ record, commands }) {
|
|
32
32
|
const kept = commands.filter((command) => !command.destructive);
|
|
33
33
|
const destructive = commands.filter((command) => command.destructive);
|
|
34
|
-
return (_jsxs(DropdownMenuGroup, { children: [_jsx(DropdownMenuLabel, { children: record }), kept.map((command) => (_jsx(MenuCommandRow, { command: command }, command.label))), kept.length > 0 && destructive.length > 0 ? _jsx(DropdownMenuSeparator, {}) : null, destructive.map((command) => (_jsx(MenuCommandRow, { command: command }, command.label)))] }));
|
|
34
|
+
return (_jsxs(DropdownMenuGroup, { children: [_jsx(DropdownMenuLabel, { className: "truncate", title: record, children: record }), kept.map((command) => (_jsx(MenuCommandRow, { command: command }, command.label))), kept.length > 0 && destructive.length > 0 ? _jsx(DropdownMenuSeparator, {}) : null, destructive.map((command) => (_jsx(MenuCommandRow, { command: command }, command.label)))] }));
|
|
35
35
|
}
|
|
@@ -378,6 +378,6 @@ export const COMPOSITIONS = {
|
|
|
378
378
|
}), records: MAILBOXES }), _jsx(SelectableRecordListSpecimen, {})] })),
|
|
379
379
|
RecordSheet: RecordSheetSpecimen,
|
|
380
380
|
RowEditForm: RowEditFormSpecimen,
|
|
381
|
-
SettingsPage: () => (_jsx(SettingsPage, {
|
|
381
|
+
SettingsPage: () => (_jsx(SettingsPage, { children: _jsx(SenderSection, {}) })),
|
|
382
382
|
SettingsSection: SettingsSectionSpecimen,
|
|
383
383
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usage.generated.d.ts","sourceRoot":"","sources":["../../src/showcase/usage.generated.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,SAAS,GACjB,cAAc,GACd,kBAAkB,GAClB,eAAe,GACf,mBAAmB,GACnB,gBAAgB,GAChB,mBAAmB,GACnB,eAAe,GACf,YAAY,GACZ,YAAY,GACZ,YAAY,GACZ,cAAc,GACd,YAAY,GACZ,eAAe,GACf,cAAc,GACd,YAAY,GACZ,YAAY,GACZ,aAAa,GACb,aAAa,GACb,cAAc,GACd,iBAAiB,GACjB,QAAQ,GACR,aAAa,GACb,YAAY,GACZ,YAAY,GACZ,gBAAgB,GAChB,aAAa,GACb,UAAU,GACV,gBAAgB,GAChB,kBAAkB,GAClB,OAAO,GACP,OAAO,GACP,YAAY,GACZ,UAAU,GACV,OAAO,GACP,cAAc,GACd,eAAe,GACf,cAAc,GACd,QAAQ,GACR,UAAU,GACV,UAAU,GACV,gBAAgB,GAChB,gBAAgB,GAChB,UAAU,GACV,aAAa,GACb,aAAa,GACb,YAAY,GACZ,iBAAiB,GACjB,kBAAkB,GAClB,QAAQ,GACR,QAAQ,GACR,mBAAmB,GACnB,mBAAmB,GACnB,QAAQ,GACR,aAAa,GACb,cAAc,GACd,UAAU,GACV,SAAS,GACT,UAAU,GACV,QAAQ,GACR,OAAO,GACP,eAAe,GACf,aAAa,GACb,cAAc,GACd,cAAc,GACd,eAAe,GACf,WAAW,GACX,iBAAiB,GACjB,cAAc,GACd,mBAAmB,GACnB,gBAAgB,GAChB,aAAa,GACb,KAAK,GACL,cAAc,GACd,YAAY,GACZ,eAAe,GACf,QAAQ,GACR,oBAAoB,GACpB,eAAe,GACf,SAAS,GACT,cAAc,GACd,aAAa,GACb,cAAc,GACd,oBAAoB,GACpB,iB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AE,MAAM,CAAC;IACf,MAAM,EAAE,WAAW,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,SAAS,WAAW,EAYhD,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,SAAS,cAAc,
|
|
1
|
+
{"version":3,"file":"usage.generated.d.ts","sourceRoot":"","sources":["../../src/showcase/usage.generated.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,SAAS,GACjB,cAAc,GACd,kBAAkB,GAClB,eAAe,GACf,mBAAmB,GACnB,gBAAgB,GAChB,mBAAmB,GACnB,eAAe,GACf,YAAY,GACZ,YAAY,GACZ,YAAY,GACZ,cAAc,GACd,YAAY,GACZ,eAAe,GACf,cAAc,GACd,YAAY,GACZ,YAAY,GACZ,aAAa,GACb,aAAa,GACb,cAAc,GACd,iBAAiB,GACjB,QAAQ,GACR,aAAa,GACb,YAAY,GACZ,YAAY,GACZ,gBAAgB,GAChB,aAAa,GACb,UAAU,GACV,gBAAgB,GAChB,kBAAkB,GAClB,OAAO,GACP,OAAO,GACP,YAAY,GACZ,UAAU,GACV,OAAO,GACP,cAAc,GACd,eAAe,GACf,cAAc,GACd,QAAQ,GACR,UAAU,GACV,UAAU,GACV,gBAAgB,GAChB,gBAAgB,GAChB,UAAU,GACV,aAAa,GACb,aAAa,GACb,YAAY,GACZ,iBAAiB,GACjB,kBAAkB,GAClB,QAAQ,GACR,QAAQ,GACR,mBAAmB,GACnB,mBAAmB,GACnB,QAAQ,GACR,aAAa,GACb,cAAc,GACd,UAAU,GACV,SAAS,GACT,UAAU,GACV,QAAQ,GACR,OAAO,GACP,eAAe,GACf,aAAa,GACb,cAAc,GACd,cAAc,GACd,eAAe,GACf,WAAW,G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