@estiva-app/ui 0.31.0 → 0.33.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 CHANGED
@@ -64,7 +64,7 @@ export default {
64
64
 
65
65
  The UI Guardrails' rules ship with the package, as an ESLint plugin, so an app
66
66
  gets a new rule with a version bump. Each rule names the component to use
67
- instead. There are four:
67
+ instead. There are six:
68
68
 
69
69
  - `estiva/no-raw-element` refuses a raw interactive element (`<a>`, `<input>`,
70
70
  `<form>`, `<dialog>`…) and names the part to use, or says the package has none yet.
@@ -83,6 +83,18 @@ instead. There are four:
83
83
  row first in a column, with its own side padding and a title, where the column
84
84
  fills its height or the row has a bar's height or hairline. It reads the
85
85
  shape, not the class names, and names `ContainerHeader`.
86
+ - `estiva/no-handmade-empty-state` refuses an empty state drawn by hand: a
87
+ line of words that shows where a list's rows would be, when the list is
88
+ empty. It reads where the line sits, not what it says, and names
89
+ `EmptyState`. It also refuses a `page`-scope `EmptyState` inside a
90
+ `ScrollArea` whose content is only as tall as what is in it, where it sits at
91
+ the top instead of the middle, following the app's own components into their
92
+ files to find one.
93
+ - `estiva/no-native-title` refuses a `title` attribute, the browser's own
94
+ tooltip, and names `WithTooltip`. It fires on a plain element and on a part
95
+ that hands `title` on to its element (`<Button title>`); a part whose
96
+ `title` is its own heading (`PARTS_WITH_A_TITLE`) and an `<svg>`'s `<title>`
97
+ element pass.
86
98
 
87
99
  ```js
88
100
  // eslint.config.js — alongside your own rules
@@ -2,6 +2,7 @@ import type { ESLint, Linter } from 'eslint';
2
2
  export { ESCAPE_MARKER, MIN_REASON, SETTINGS_KEY, isEscaped, type EstivaSettings } from './escape';
3
3
  export { OWNED_BEHAVIOURS, type OwnedBehaviour } from './no-rebuilt-behaviour';
4
4
  export { PART_LOOK_PROPS, PLACEMENT } from './no-restyled-part';
5
+ export { PARTS_WITH_A_TITLE } from './no-native-title';
5
6
  /** The name the configs register the plugin under, so every rule id is `estiva/<rule>`. */
6
7
  export declare const PLUGIN_KEY = "estiva";
7
8
  declare const plugin: {
@@ -16,6 +17,8 @@ declare const plugin: {
16
17
  'component-has-a-story': import("eslint").Rule.RuleModule;
17
18
  'no-restyled-part': import("eslint").Rule.RuleModule;
18
19
  'no-handmade-header': import("eslint").Rule.RuleModule;
20
+ 'no-handmade-empty-state': import("eslint").Rule.RuleModule;
21
+ 'no-native-title': import("eslint").Rule.RuleModule;
19
22
  'no-raw-element': import("eslint").Rule.RuleModule;
20
23
  'no-rebuilt-behaviour': import("eslint").Rule.RuleModule;
21
24
  };
@@ -1 +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;AAS5C,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,YAAY,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,UAAU,CAAA;AAClG,OAAO,EAAE,gBAAgB,EAAE,KAAK,cAAc,EAAE,MAAM,wBAAwB,CAAA;AAC9E,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAI/D,2FAA2F;AAC3F,eAAO,MAAM,UAAU,WAAW,CAAA;AAyClC,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;AA+BhG,eAAe,MAAM,CAAA;AAErB,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,M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