@estiva-app/ui 0.14.0 → 0.16.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.
Files changed (56) hide show
  1. package/README.md +28 -0
  2. package/dist/Breadcrumb.d.ts.map +1 -1
  3. package/dist/ChipInput.d.ts +14 -1
  4. package/dist/ChipInput.d.ts.map +1 -1
  5. package/dist/CommandPalette.d.ts +114 -0
  6. package/dist/CommandPalette.d.ts.map +1 -0
  7. package/dist/Menu.d.ts +4 -0
  8. package/dist/Menu.d.ts.map +1 -1
  9. package/dist/Toast.d.ts.map +1 -1
  10. package/dist/eslint/escape.d.ts +61 -0
  11. package/dist/eslint/escape.d.ts.map +1 -0
  12. package/dist/eslint/has-a-page-and-a-story.d.ts +4 -0
  13. package/dist/eslint/has-a-page-and-a-story.d.ts.map +1 -0
  14. package/dist/eslint/index.d.ts +59 -0
  15. package/dist/eslint/index.d.ts.map +1 -0
  16. package/dist/eslint/index.js +286 -0
  17. package/dist/eslint/index.js.map +7 -0
  18. package/dist/eslint/no-hand-rolled-behaviour.d.ts +3 -0
  19. package/dist/eslint/no-hand-rolled-behaviour.d.ts.map +1 -0
  20. package/dist/eslint/no-raw-button.d.ts +11 -0
  21. package/dist/eslint/no-raw-button.d.ts.map +1 -0
  22. package/dist/eslint/raw-element-outside-a-wrapper.d.ts +29 -0
  23. package/dist/eslint/raw-element-outside-a-wrapper.d.ts.map +1 -0
  24. package/dist/index.d.ts +1 -0
  25. package/dist/index.d.ts.map +1 -1
  26. package/dist/index.js +614 -292
  27. package/dist/index.js.map +4 -4
  28. package/package.json +9 -1
  29. package/src/Avatar.tsx +1 -1
  30. package/src/AvatarGroup.tsx +1 -1
  31. package/src/Breadcrumb.tsx +6 -2
  32. package/src/ChipInput.mdx +9 -0
  33. package/src/ChipInput.stories.tsx +18 -0
  34. package/src/ChipInput.test.tsx +18 -0
  35. package/src/ChipInput.tsx +18 -4
  36. package/src/CommandPalette.mdx +133 -0
  37. package/src/CommandPalette.stories.tsx +416 -0
  38. package/src/CommandPalette.test.tsx +392 -0
  39. package/src/CommandPalette.tsx +643 -0
  40. package/src/Menu.tsx +4 -2
  41. package/src/Select.test.tsx +20 -3
  42. package/src/Toast.tsx +12 -24
  43. package/src/eslint/escape.ts +112 -0
  44. package/src/eslint/has-a-page-and-a-story.test.ts +57 -0
  45. package/src/eslint/has-a-page-and-a-story.ts +97 -0
  46. package/src/eslint/index.test.ts +114 -0
  47. package/src/eslint/index.ts +145 -0
  48. package/src/eslint/no-hand-rolled-behaviour.test.ts +70 -0
  49. package/src/eslint/no-hand-rolled-behaviour.ts +116 -0
  50. package/src/eslint/no-raw-button.test.ts +118 -0
  51. package/src/eslint/no-raw-button.ts +39 -0
  52. package/src/eslint/raw-element-outside-a-wrapper.test.ts +82 -0
  53. package/src/eslint/raw-element-outside-a-wrapper.ts +85 -0
  54. package/src/index.ts +17 -0
  55. package/stories/Choosing.mdx +1 -0
  56. package/stories/TokensPage.tsx +1 -1
package/README.md CHANGED
@@ -63,6 +63,34 @@ export default {
63
63
  }
64
64
  ```
65
65
 
66
+ ### The lint rules — `@estiva-app/ui/eslint`
67
+
68
+ The UI Guardrails' rules ship with the package, as an ESLint plugin, so an app
69
+ gets a new rule with a version bump. Each rule names the component to use
70
+ instead. Today there is one: `estiva/no-raw-button`.
71
+
72
+ ```js
73
+ // eslint.config.js — alongside your own rules
74
+ import estiva from '@estiva-app/ui/eslint'
75
+ export default [
76
+ // …your config, with a parser that reads TSX
77
+ { files: ['src/**/*.tsx'], ignores: ['**/*.test.tsx'], ...estiva.configs.recommended },
78
+ ]
79
+ ```
80
+
81
+ A place that keeps a raw element on purpose says why, on the line above:
82
+
83
+ ```tsx
84
+ // @estiva-escape: the reason, at least ten characters
85
+ <button …>
86
+ ```
87
+
88
+ or, as a JSX child, `{/* @estiva-escape: the reason */}`. Not `eslint-disable`:
89
+ it switches the rule off without saying why, and the gate counts it as a
90
+ failure. `countGates(results)` counts errors and escapes for
91
+ `.gates-count.json`; lint with `settings: { estiva: { reportEscapes: true } }`
92
+ for the escapes to be counted.
93
+
66
94
  ## The rules
67
95
 
68
96
  ### Forking is allowed
@@ -1 +1 @@
1
- {"version":3,"file":"Breadcrumb.d.ts","sourceRoot":"","sources":["../src/Breadcrumb.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA4D,KAAK,iBAAiB,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAIxH;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,WAAW,KAAK;IACpB,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,qFAAqF;IACrF,OAAO,CAAC,EAAE,iBAAiB,CAAC,iBAAiB,CAAC,CAAA;IAC9C,oDAAoD;IACpD,IAAI,CAAC,EAAE,OAAO,CAAA;IACd;;;;OAIG;IACH,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,6CAA6C;IAC7C,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB;AAED,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,KAAK,EAAE,CAAA;IACd,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,wBAAgB,UAAU,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,eAAe,+BAkF/D"}
1
+ {"version":3,"file":"Breadcrumb.d.ts","sourceRoot":"","sources":["../src/Breadcrumb.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA4D,KAAK,iBAAiB,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAKxH;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,WAAW,KAAK;IACpB,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,qFAAqF;IACrF,OAAO,CAAC,EAAE,iBAAiB,CAAC,iBAAiB,CAAC,CAAA;IAC9C,oDAAoD;IACpD,IAAI,CAAC,EAAE,OAAO,CAAA;IACd;;;;OAIG;IACH,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,6CAA6C;IAC7C,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB;AAED,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,KAAK,EAAE,CAAA;IACd,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,wBAAgB,UAAU,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,eAAe,+BAqF/D"}
@@ -16,9 +16,22 @@ export interface InputChipProps {
16
16
  leading?: ReactNode;
17
17
  /** Draws the ✕; absent, the chip is display-only. */
18
18
  onRemove?: () => void;
19
+ /**
20
+ * The ✕'s name for a screen reader. `Remove <label>` when not given. A chip
21
+ * whose ✕ does something other than remove it names what it does — a
22
+ * launcher's scope chip leaves the scope ("Leave Ship").
23
+ */
24
+ removeLabel?: string;
25
+ /**
26
+ * Cut a long label with an ellipsis once the chip is capped, by a
27
+ * `max-w-*` on `className`. Off unless asked: cutting clips up to 4px of a
28
+ * letter's soft edge at 1x even when the label fits (measured 2026-09-15),
29
+ * so a chip that is never capped keeps every pixel.
30
+ */
31
+ truncate?: boolean;
19
32
  className?: string;
20
33
  }
21
- export declare function InputChip({ label, leading, onRemove, className }: InputChipProps): import("react").JSX.Element;
34
+ export declare function InputChip({ label, leading, onRemove, removeLabel, truncate, className }: InputChipProps): import("react").JSX.Element;
22
35
  /**
23
36
  * A multi-select input: chips for the chosen, a typeahead for the rest —
24
37
  * Peek's PersonChipInput (2026-09-01), generalised on the way in, and on Base
@@ -1 +1 @@
1
- {"version":3,"file":"ChipInput.d.ts","sourceRoot":"","sources":["../src/ChipInput.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAyC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAuB7E;;;;;;;;;;GAUG;AACH,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAA;IACb,mDAAmD;IACnD,OAAO,CAAC,EAAE,SAAS,CAAA;IACnB,qDAAqD;IACrD,QAAQ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AAA;IACtC,6CAA6C;IAC7C,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,SAAS,CAAA;IACrC,0EAA0E;IAC1E,eAAe,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAA;IAC5C;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,yEAAyE;IACzE,iBAAiB,CAAC,EAAE,MAAM,CAAA;CAC3B;AAED,wBAAgB,SAAS,CAAC,CAAC,SAAS,eAAe,GAAG,eAAe,EAAE,EACrE,KAAK,EACL,QAAQ,EACR,OAAO,EACP,WAAuB,EACvB,SAAS,EACT,UAAe,EACf,WAAW,EACX,UAAU,EACV,GAAG,IAAI,EACR,EAAE,cAAc,CAAC,CAAC,CAAC,+BAkJnB"}
@@ -0,0 +1,114 @@
1
+ import { type ReactNode } from 'react';
2
+ export interface CommandPaletteProps {
3
+ open: boolean;
4
+ onOpenChange: (open: boolean) => void;
5
+ /** The window's name for a screen reader — there is no title on screen. */
6
+ label: string;
7
+ /** The footer's left side: where the palette was opened from. */
8
+ where?: string;
9
+ /**
10
+ * How the footer spells the modifier in `Ctrl+Backspace` and `Ctrl+Enter` —
11
+ * `Cmd` on a Mac. The keys answer to Ctrl and Cmd either way; the package
12
+ * does not guess the platform, the app says it.
13
+ */
14
+ modKey?: string;
15
+ /** One level: a `CommandPaletteSearch` or a `CommandPaletteForm`. */
16
+ children: ReactNode;
17
+ }
18
+ export declare function CommandPalette({ open, onOpenChange, label, where, modKey, children }: CommandPaletteProps): import("react").JSX.Element;
19
+ /**
20
+ * The level you are in, drawn as a chip before the field. Removing it goes
21
+ * back, and so does Backspace at the start of the field — one meaning for the
22
+ * chip, whichever way you reach it.
23
+ */
24
+ export interface CommandPaletteChip {
25
+ label: string;
26
+ /** Before the label, 16px — an icon, a mark. */
27
+ leading?: ReactNode;
28
+ onBack: () => void;
29
+ }
30
+ export interface CommandPaletteRow {
31
+ /** Unique in the level. The footer follows the lit row by it. */
32
+ id: string;
33
+ label: string;
34
+ /** The second line — where it is, who said it, when. */
35
+ description?: string;
36
+ /** A 16px icon, drawn on the row's 32px tile. */
37
+ icon?: ReactNode;
38
+ /** Instead of `icon`: something with a look of its own — a face, a status mark — in the same 32px space, with no tile. */
39
+ leading?: ReactNode;
40
+ /** Enter, or a click. */
41
+ onSelect: () => void;
42
+ /** The row leads to more rows: Tab, or → at the end of the text, goes in, and the row shows a chevron. */
43
+ onGoIn?: () => void;
44
+ /** The row is the person's own history: Ctrl+Backspace forgets it. */
45
+ onForget?: () => void;
46
+ }
47
+ export interface CommandPaletteGroup {
48
+ /** The heading over the rows. A group with no rows is not drawn. */
49
+ label: string;
50
+ rows: CommandPaletteRow[];
51
+ }
52
+ export interface CommandPaletteSearchProps {
53
+ query: string;
54
+ onQueryChange: (query: string) => void;
55
+ placeholder: string;
56
+ groups: CommandPaletteGroup[];
57
+ /** The level you are in. Without one, this is the first level and there is nowhere to go back to. */
58
+ chip?: CommandPaletteChip;
59
+ /** A line under the rows while more are on their way — "Searching…". */
60
+ pending?: string;
61
+ /** The line when there are no rows. Leave it out while rows are still on their way. */
62
+ empty?: string;
63
+ /** Above the rows: a `CommandPaletteWorking`, `CommandPaletteAnswer` or `CommandPaletteQuote`. */
64
+ children?: ReactNode;
65
+ }
66
+ export declare function CommandPaletteSearch({ query, onQueryChange, placeholder, groups, chip, pending, empty, children }: CommandPaletteSearchProps): import("react").JSX.Element;
67
+ export interface CommandPaletteFormProps {
68
+ /** Names what the form makes, and goes back when removed. */
69
+ chip: CommandPaletteChip;
70
+ /** Before the chip, 16px — the mark of whatever the form writes to. */
71
+ icon?: ReactNode;
72
+ /** The button's word, and the footer's beside Ctrl+Enter. */
73
+ submitLabel: string;
74
+ onSubmit: () => void;
75
+ /** Why submitting has to wait — nothing changed yet. The button says it on hover, and Ctrl+Enter does nothing. */
76
+ submitWaits?: string;
77
+ /** While the thing is being made: the fields lock, the button reads `button`, and `line` says what is happening. */
78
+ working?: {
79
+ button: string;
80
+ line: string;
81
+ };
82
+ /** What went wrong, beside the button. */
83
+ error?: string;
84
+ /** The fields, each in a `Field`. */
85
+ children: ReactNode;
86
+ }
87
+ export declare function CommandPaletteForm({ chip, icon, submitLabel, onSubmit, submitWaits, working, error, children }: CommandPaletteFormProps): import("react").JSX.Element;
88
+ export interface CommandPaletteWorkingProps {
89
+ /** What is happening — "Reading 12 messages…". */
90
+ children: ReactNode;
91
+ /** Grey bars under the line, where the result will be. Default 2. */
92
+ bars?: 0 | 1 | 2 | 3;
93
+ }
94
+ /** A line saying what is being worked on, with grey bars where the result will land. */
95
+ export declare function CommandPaletteWorking({ children, bars }: CommandPaletteWorkingProps): import("react").JSX.Element;
96
+ export interface CommandPaletteAnswerProps {
97
+ /**
98
+ * The answer's text. A blank line starts a new paragraph, and a number in
99
+ * square brackets — `[1]` — is drawn as a small mark pointing at the row of
100
+ * the same number below.
101
+ */
102
+ children: string;
103
+ /** A quiet line under the answer — what a key will do now. */
104
+ note?: string;
105
+ }
106
+ /** A written answer, with marks that point at the rows it came from. */
107
+ export declare function CommandPaletteAnswer({ children, note }: CommandPaletteAnswerProps): import("react").JSX.Element;
108
+ export interface CommandPaletteQuoteProps {
109
+ /** Text written for someone to use — shown as it will be used, line breaks kept. */
110
+ children: string;
111
+ }
112
+ /** Text written to be used elsewhere, set off by a rule at its left edge. */
113
+ export declare function CommandPaletteQuote({ children }: CommandPaletteQuoteProps): import("react").JSX.Element;
114
+ //# sourceMappingURL=CommandPalette.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CommandPalette.d.ts","sourceRoot":"","sources":["../src/CommandPalette.tsx"],"names":[],"mappings":"AAAA,OAAO,EASL,KAAK,SAAS,EAEf,MAAM,OAAO,CAAA;AAuDd,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,OAAO,CAAA;IACb,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;IACrC,2EAA2E;IAC3E,KAAK,EAAE,M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;;;;OAIG;IACH,QAAQ,EAAE,MAAM,CAAA;IAChB,8DAA8D;IAC9D,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED,wEAAwE;AACxE,wBAAgB,oBAAoB,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,yBAAyB,+BAsBjF;AAED,MAAM,WAAW,wBAAwB;IACvC,oFAAoF;IACpF,QAAQ,EAAE,MAAM,CAAA;CACjB;AAED,6EAA6E;AAC7E,wBAAgB,mBAAmB,CAAC,EAAE,QAAQ,EAAE,EAAE,wBAAwB,+BAEzE"}
package/dist/Menu.d.ts CHANGED
@@ -151,6 +151,10 @@ export declare function menuItemClassName({ size, selected, className }: {
151
151
  selected?: boolean;
152
152
  className?: string;
153
153
  }): string;
154
+ /** Everything inside the row — written once, for the same reason. Shared
155
+ * inside the package like `menuItemClassName`: `CommandPalette` draws it
156
+ * inside Base UI's `Autocomplete.Item`. Not exported from the index. */
157
+ export declare function MenuItemBody({ label, children, size, description, leading, trailing, hint, shortcut, submenu, destructive, selected }: Pick<MenuItemProps, 'label' | 'children' | 'size' | 'description' | 'leading' | 'trailing' | 'hint' | 'shortcut' | 'submenu' | 'destructive' | 'selected'>): import("react").JSX.Element;
154
158
  export declare function MenuItem({ label, children, size, description, leading, trailing, hint, shortcut, submenu, destructive, selected, className, ...props }: MenuItemProps): import("react").JSX.Element;
155
159
  /**
156
160
  * The keyboard hint a picker row shows while highlighted — hand-rolled in
@@ -1 +1 @@
1
- {"version":3,"file":"Menu.d.ts","sourceRoot":"","sources":["../src/Menu.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA6B,KAAK,qBAAqB,EAAE,KAAK,YAAY,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AA+DhI;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,WAAW,cAAe,SAAQ,IAAI,CAAC,qBAAqB,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC;IACpF;;gBAEY;IAC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CAAA;IACb,sGAAsG;IACtG,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;IACrB,sFAAsF;IACtF,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,4EAA4E;IAC5E,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAED,UAAU,UAAU;IAClB,4DAA4D;IAC5D,SAAS,EAAE,CAAC,IAAI,EAAE,YAAY,KAAK,MAAM,CAAA;IACzC,+EAA+E;IAC/E,YAAY,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;CACpC;AAcD,wBAAgB,aAAa,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,+BAgClE;AA0CD,wBAAgB,QAAQ,IAAI,UAAU,CAIrC"}
@@ -0,0 +1,61 @@
1
+ import type { AST, Rule } from 'eslint';
2
+ /**
3
+ * The escape marker (UIG-3, seam S4 in docs/GATES.md §16): one written reason
4
+ * why one element stays as it is.
5
+ *
6
+ * A line comment directly above the element,
7
+ *
8
+ * // @estiva-escape: <reason>
9
+ *
10
+ * or, where the element is a JSX child, the JSX comment on the line above,
11
+ *
12
+ * {/* @estiva-escape: <reason> *\/}
13
+ *
14
+ * with at least ten characters of reason, spaces not counted.
15
+ *
16
+ * Not `eslint-disable`. A directive switches a rule off without saying it was
17
+ * meant, and the count of escapes (`.gates-count.json`) could not see it. A
18
+ * marker written inside a directive that switches one of these rules off is
19
+ * reported for that reason.
20
+ *
21
+ * The token lint's older notes (`eslint-disable-next-line <rule> -- @estiva-escape:
22
+ * <reason>`, Katerina's ruling A2 of 15 September) are not read here: they
23
+ * escape the token lint's rules, which are not this plugin's, and they stay as
24
+ * they are (Katerina, 15 September).
25
+ */
26
+ export declare const ESCAPE_MARKER = "@estiva-escape";
27
+ /** Characters of reason, spaces not counted. */
28
+ export declare const MIN_REASON = 10;
29
+ /** The key under ESLint's `settings` this plugin reads. */
30
+ export declare const SETTINGS_KEY = "estiva";
31
+ /**
32
+ * Every rule spreads these into its `meta.messages`, because `isEscaped`
33
+ * reports through the rule that called it.
34
+ */
35
+ export declare const ESCAPE_MESSAGES: {
36
+ readonly escapeWithoutReason: "An escape needs its reason, at least 10 characters: `// @estiva-escape: <why this stays>`. An escape with no reason hides nothing.";
37
+ readonly escapeInDirective: "Write the escape as its own comment on the line above: `// @estiva-escape: <reason>`. Inside an eslint-disable comment it switches the rule off instead of recording why.";
38
+ readonly escaped: "Escaped: {{reason}}";
39
+ };
40
+ export interface EstivaSettings {
41
+ /**
42
+ * Report every sanctioned escape as a message with the id `escaped`, so a
43
+ * count can read them. Off in the lint anyone runs; on only in the count.
44
+ */
45
+ reportEscapes?: boolean;
46
+ }
47
+ interface Located {
48
+ loc?: AST.SourceLocation | null;
49
+ range?: [number, number];
50
+ }
51
+ /**
52
+ * Whether the element at `node` carries a valid escape on the line above.
53
+ *
54
+ * Every rule of this plugin calls it before it reports. It reports, through
55
+ * that rule, a marker with too short a reason and a marker inside an
56
+ * eslint-disable directive for this rule; either way the element is not
57
+ * escaped, so the rule reports it too.
58
+ */
59
+ export declare function isEscaped(context: Rule.RuleContext, node: Located): boolean;
60
+ export {};
61
+ //# sourceMappingURL=escape.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"escape.d.ts","sourceRoot":"","sources":["../../src/eslint/escape.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAEvC;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,aAAa,mBAAmB,CAAA;AAE7C,gDAAgD;AAChD,eAAO,MAAM,UAAU,KAAK,CAAA;AAE5B,2DAA2D;AAC3D,eAAO,MAAM,YAAY,WAAW,CAAA;AAEpC;;;GAGG;AACH,eAAO,MAAM,eAAe;;;;CAIlB,CAAA;AAEV,MAAM,WAAW,cAAc;IAC7B;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB;AAED,UAAU,OAAO;IACf,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,GAAG,IAAI,CAAA;IAC/B,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CACzB;AAaD;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,IAAI,CAAC,WAAW,EAAE,IAAI,EAAE,OAAO,GAAG,OAAO,CAmC3E"}
@@ -0,0 +1,4 @@
1
+ import type { Rule } from 'eslint';
2
+ export declare const componentHasAPage: Rule.RuleModule;
3
+ export declare const componentHasAStory: Rule.RuleModule;
4
+ //# sourceMappingURL=has-a-page-and-a-story.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"has-a-page-and-a-story.d.ts","sourceRoot":"","sources":["../../src/eslint/has-a-page-and-a-story.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAiDlC,eAAO,MAAM,iBAAiB,EAAE,IAAI,CAAC,UAsBpC,CAAA;AAED,eAAO,MAAM,kBAAkB,EAAE,IAAI,CAAC,UAsBrC,CAAA"}
@@ -0,0 +1,59 @@
1
+ import type { ESLint, Linter } from 'eslint';
2
+ export { ESCAPE_MARKER, MIN_REASON, SETTINGS_KEY, isEscaped, type EstivaSettings } from './escape';
3
+ /** The name the configs register the plugin under, so every rule id is `estiva/<rule>`. */
4
+ export declare const PLUGIN_KEY = "estiva";
5
+ declare const plugin: {
6
+ meta: {
7
+ name: string;
8
+ version: string;
9
+ };
10
+ rules: {
11
+ 'raw-element-outside-a-wrapper': import("eslint").Rule.RuleModule;
12
+ 'no-hand-rolled-behaviour': import("eslint").Rule.RuleModule;
13
+ 'component-has-a-page': import("eslint").Rule.RuleModule;
14
+ 'component-has-a-story': import("eslint").Rule.RuleModule;
15
+ 'no-raw-button': import("eslint").Rule.RuleModule;
16
+ };
17
+ configs: {
18
+ recommended: Linter.Config;
19
+ strict: Linter.Config;
20
+ package: Linter.Config;
21
+ };
22
+ };
23
+ /** The ids `recommended` and `strict` carry — what an app's gate runs and counts. */
24
+ export declare const APP_RULE_IDS: string[];
25
+ /** The ids `package` carries — what this package's own gate runs and counts (UIG-5). */
26
+ export declare const PACKAGE_RULE_IDS: string[];
27
+ export default plugin;
28
+ export interface GateRuleCount {
29
+ errors: number;
30
+ warnings: number;
31
+ escapes: number;
32
+ }
33
+ export interface GateCount {
34
+ /** Per rule id, including rules with nothing to report. */
35
+ rules: Record<string, GateRuleCount>;
36
+ /**
37
+ * Reports of these rules that an `eslint-disable` directive silenced. Not
38
+ * an escape: a gate fails on any of these (docs/GATES.md §16, S4).
39
+ */
40
+ disabled: {
41
+ filePath: string;
42
+ line: number;
43
+ ruleId: string;
44
+ }[];
45
+ }
46
+ /**
47
+ * Count what a lint of these rules found, for `.gates-count.json` (seam S3).
48
+ *
49
+ * Run the lint with `settings: { estiva: { reportEscapes: true } }` for the
50
+ * escapes to be counted; without it they are silent and count 0. A marker
51
+ * with no reason, or inside a directive, counts as an error of its rule.
52
+ *
53
+ * `seed` is which rules the count lists when they found nothing, and it is the
54
+ * app rules unless a caller says otherwise: an app's count file must not gain
55
+ * rows for the inward rules (UIG-5) that its gate does not run. This package's
56
+ * own count script passes `PACKAGE_RULE_IDS`.
57
+ */
58
+ export declare function countGates(results: ESLint.LintResult[], seed?: readonly string[]): GateCount;
59
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/eslint/index.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAM5C,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,YAAY,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,UAAU,CAAA;AAIlG,2FAA2F;AAC3F,eAAO,MAAM,UAAU,WAAW,CAAA;AA8BlC,QAAA,MAAM,MAAM;;;;;;;;;;;;aAGK;QAAE,WAAW,EAAE,MAAM,CAAC,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC,MAAM,CAAA;KAAE;CACrE,CAAA;AAEzB,qFAAqF;AACrF,eAAO,MAAM,YAAY,UAA+D,CAAA;AACxF,wFAAwF;AACxF,eAAO,MAAM,gBAAgB,UAAmE,CAAA;AA0BhG,eAAe,MAAM,CAAA;AAErB,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,WAAW,SAAS;IACxB,2DAA2D;IAC3D,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAA;IACpC;;;OAGG;IACH,QAAQ,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;CAC/D;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,CAAC,UAAU,EAAE,EAAE,IAAI,GAAE,SAAS,MAAM,EAAiB,GAAG,SAAS,CAmB1G"}