@estiva-app/ui 0.21.0 → 0.22.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 (72) hide show
  1. package/dist/Avatar.d.ts +3 -0
  2. package/dist/Avatar.d.ts.map +1 -1
  3. package/dist/ChipInput.d.ts +3 -0
  4. package/dist/ChipInput.d.ts.map +1 -1
  5. package/dist/CommandPalette.d.ts +6 -0
  6. package/dist/CommandPalette.d.ts.map +1 -1
  7. package/dist/IdentityMenu.d.ts +3 -0
  8. package/dist/IdentityMenu.d.ts.map +1 -1
  9. package/dist/Menu.d.ts +7 -0
  10. package/dist/Menu.d.ts.map +1 -1
  11. package/dist/Skeleton.d.ts +2 -0
  12. package/dist/Skeleton.d.ts.map +1 -1
  13. package/dist/Toast.d.ts +5 -0
  14. package/dist/Toast.d.ts.map +1 -1
  15. package/dist/Toolbar.d.ts +4 -0
  16. package/dist/Toolbar.d.ts.map +1 -1
  17. package/dist/Tooltip.d.ts +4 -0
  18. package/dist/Tooltip.d.ts.map +1 -1
  19. package/dist/gates/app-checks.d.ts.map +1 -1
  20. package/dist/gates/{chunk-AWO7SZSA.js → chunk-AUXD4GCY.js} +10 -9
  21. package/dist/gates/chunk-AUXD4GCY.js.map +7 -0
  22. package/dist/gates/cli.js +2 -2
  23. package/dist/gates/cli.js.map +2 -2
  24. package/dist/gates/index.js +4 -2
  25. package/dist/gates/index.js.map +2 -2
  26. package/dist/gates/status.d.ts +5 -1
  27. package/dist/gates/status.d.ts.map +1 -1
  28. package/dist/index.js.map +2 -2
  29. package/dist/registry/build-GOVLABI6.js +13 -0
  30. package/dist/registry/build-GOVLABI6.js.map +7 -0
  31. package/dist/registry/build.d.ts +29 -0
  32. package/dist/registry/build.d.ts.map +1 -0
  33. package/dist/registry/chunk-IJNCYVH4.js +163 -0
  34. package/dist/registry/chunk-IJNCYVH4.js.map +7 -0
  35. package/dist/registry/chunk-MRSBS5OP.js +99 -0
  36. package/dist/registry/chunk-MRSBS5OP.js.map +7 -0
  37. package/dist/registry/chunk-QDYGB3QN.js +352 -0
  38. package/dist/registry/chunk-QDYGB3QN.js.map +7 -0
  39. package/dist/registry/cli.d.ts +2 -0
  40. package/dist/registry/cli.d.ts.map +1 -0
  41. package/dist/registry/cli.js +121 -0
  42. package/dist/registry/cli.js.map +7 -0
  43. package/dist/registry/find.d.ts +43 -0
  44. package/dist/registry/find.d.ts.map +1 -0
  45. package/dist/registry/index.d.ts +14 -0
  46. package/dist/registry/index.d.ts.map +1 -0
  47. package/dist/registry/index.js +26 -0
  48. package/dist/registry/index.js.map +7 -0
  49. package/dist/registry/schema.d.ts +147 -0
  50. package/dist/registry/schema.d.ts.map +1 -0
  51. package/package.json +15 -2
  52. package/registry.json +4470 -0
  53. package/src/Avatar.tsx +3 -0
  54. package/src/ChipInput.tsx +3 -0
  55. package/src/CommandPalette.tsx +6 -0
  56. package/src/IdentityMenu.tsx +3 -0
  57. package/src/Menu.tsx +7 -0
  58. package/src/Skeleton.tsx +2 -0
  59. package/src/Toast.tsx +5 -0
  60. package/src/Toolbar.tsx +4 -0
  61. package/src/Tooltip.tsx +4 -0
  62. package/src/gates/app-checks.ts +3 -1
  63. package/src/gates/cli.ts +8 -2
  64. package/src/gates/gates.test.ts +11 -0
  65. package/src/gates/status.ts +24 -11
  66. package/src/registry/build.ts +590 -0
  67. package/src/registry/cli.ts +141 -0
  68. package/src/registry/find.ts +195 -0
  69. package/src/registry/index.ts +24 -0
  70. package/src/registry/registry.test.ts +448 -0
  71. package/src/registry/schema.ts +268 -0
  72. package/dist/gates/chunk-AWO7SZSA.js.map +0 -7
@@ -0,0 +1 @@
1
+ {"version":3,"file":"find.d.ts","sourceRoot":"","sources":["../../src/registry/find.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAEvD,MAAM,WAAW,OAAO;IACtB,KAAK,EAAE,aAAa,CAAA;IACpB,4EAA4E;IAC5E,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;IACb,uDAAuD;IACvD,KAAK,EAAE,MAAM,EAAE,CAAA;IACf;;;;;OAKG;IACH,KAAK,EAAE,MAAM,EAAE,CAAA;CAChB;AAoDD;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,KAAS,EAAE,GAAE;IAAE,KAAK,CAAC,EAAE,MAAM,CAAA;CAAO,GAAG,OAAO,EAAE,CAiEnH;AAED,yGAAyG;AACzG,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,aAAa,GAAG,MAAM,GAAG,IAAI,CAGhF;AAED,gGAAgG;AAChG,wBAAgB,cAAc,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAiC7F"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * `@estiva-app/ui/registry` — the component catalogue (UIG-12, seam S2).
3
+ *
4
+ * The one copy, here, as every gate piece is (docs/GATES.md §23): the skill
5
+ * (UIG-20), the copy detector (UIG-25) and the merged search (UIG-19) read
6
+ * this, and no repo keeps a parser of its own.
7
+ *
8
+ * The data itself is `registry.json` at the package's root, committed and
9
+ * shipped. Read it with `estiva-ui find`, or import these to read it yourself.
10
+ */
11
+ export { buildRegistry, readIndexExports, serializeRegistry, type BuildOptions } from './build';
12
+ export { docsLink, findInRegistry, formatFindings, type Finding } from './find';
13
+ export { SCHEMA_VERSION, validateRegistry, type EntryBehaviour, type EntryKind, type EntryStatus, type EntryVariant, type PurposeSource, type Registry, type RegistryEntry, type RegistryExclusion, } from './schema';
14
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/registry/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,KAAK,YAAY,EAAE,MAAM,SAAS,CAAA;AAC/F,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,cAAc,EAAE,KAAK,OAAO,EAAE,MAAM,QAAQ,CAAA;AAC/E,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,KAAK,cAAc,EACnB,KAAK,SAAS,EACd,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,QAAQ,EACb,KAAK,aAAa,EAClB,KAAK,iBAAiB,GACvB,MAAM,UAAU,CAAA"}
@@ -0,0 +1,26 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ docsLink,
4
+ findInRegistry,
5
+ formatFindings
6
+ } from "./chunk-IJNCYVH4.js";
7
+ import {
8
+ buildRegistry,
9
+ readIndexExports,
10
+ serializeRegistry
11
+ } from "./chunk-QDYGB3QN.js";
12
+ import {
13
+ SCHEMA_VERSION,
14
+ validateRegistry
15
+ } from "./chunk-MRSBS5OP.js";
16
+ export {
17
+ SCHEMA_VERSION,
18
+ buildRegistry,
19
+ docsLink,
20
+ findInRegistry,
21
+ formatFindings,
22
+ readIndexExports,
23
+ serializeRegistry,
24
+ validateRegistry
25
+ };
26
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sourcesContent": [],
5
+ "mappings": "",
6
+ "names": []
7
+ }
@@ -0,0 +1,147 @@
1
+ /**
2
+ * The catalogue's shape (UIG-12, seam S2 in docs/GATES.md §16).
3
+ *
4
+ * A **data source read by machines first** and rendered second — not a
5
+ * documentation generator. The skill (UIG-20), the copy detector (UIG-25) and
6
+ * the merged search (UIG-19) all read this and nothing else, so the field
7
+ * names are the contract and `schemaVersion` is what makes a change to them
8
+ * detectable.
9
+ *
10
+ * Names are plain and ours. Open-sourcing is far off; when it comes, a
11
+ * renaming pass is one version bump, and guessing at a public vocabulary now
12
+ * would cost every reader between here and there.
13
+ */
14
+ /**
15
+ * Raise this whenever a field is added, removed or given a new meaning. A
16
+ * reader that knows version N and is handed N+1 must be able to say so rather
17
+ * than silently read a field that moved.
18
+ */
19
+ export declare const SCHEMA_VERSION = 1;
20
+ /** What a name is, which decides how a reader offers it. */
21
+ export type EntryKind =
22
+ /** Draws something. Used in JSX. */
23
+ 'component'
24
+ /** A React hook: `use…`, callable only inside a component. */
25
+ | 'hook'
26
+ /** A function or a constant. Neither of the above. */
27
+ | 'helper';
28
+ /** Where an entry's one-line purpose was read from. */
29
+ export type PurposeSource =
30
+ /** The `.mdx` page's opening paragraph — the name has a page of its own. */
31
+ 'page'
32
+ /** The doc comment above the export — the name is documented on a sibling's page. */
33
+ | 'comment';
34
+ export type EntryStatus = 'stable' | 'migrating' | 'deprecated';
35
+ /** A prop that takes one of a known set of words, and the set. */
36
+ export interface EntryVariant {
37
+ prop: string;
38
+ values: string[];
39
+ }
40
+ /**
41
+ * One prop a component declares itself.
42
+ *
43
+ * **Itself**, not what it inherits: a component that extends
44
+ * `ComponentPropsWithRef<'div'>` would otherwise drag in every DOM attribute,
45
+ * which is noise in a catalogue whose whole point is a short answer.
46
+ */
47
+ export interface EntryProp {
48
+ name: string;
49
+ /**
50
+ * What it takes, in a word a person reads: `true/false`, `number`, `text`,
51
+ * `anything`, `a handler`, the words themselves for a set (`left | right`),
52
+ * or the type as written where none of those fit.
53
+ */
54
+ takes: string;
55
+ required: boolean;
56
+ /** The first sentence of the prop's own comment, where it has one. */
57
+ note: string | null;
58
+ }
59
+ /** A behaviour this component owns, from UIG-8's enumeration. */
60
+ export interface EntryBehaviour {
61
+ /** `OwnedBehaviour.id` — `portal`, `walking`, `scroll`… */
62
+ id: string;
63
+ /** What a person notices it doing, in words. */
64
+ behaviour: string;
65
+ }
66
+ export interface RegistryEntry {
67
+ /** The exported name, exactly as `index.ts` exports it. */
68
+ name: string;
69
+ /** Which library it came from. One repo per registry until UIG-13 merges them. */
70
+ repo: string;
71
+ kind: EntryKind;
72
+ /** What a caller actually types. */
73
+ importPath: string;
74
+ /** The file the name is declared in, relative to the repo. Several names share one file. */
75
+ sourceFile: string;
76
+ /** One line: what it is for. Never empty — the build fails instead. */
77
+ purpose: string;
78
+ purposeFrom: PurposeSource;
79
+ /**
80
+ * Every prop it declares itself — what it can do. This is the field a reader
81
+ * asks "does it already do X?" of, before writing X by hand.
82
+ */
83
+ props: EntryProp[];
84
+ /**
85
+ * The subset of `props` that takes one of a known set of words, structured.
86
+ * Kept beside `props` because it is what a search ranks well on, and what a
87
+ * caller most often needs named back at them.
88
+ */
89
+ variants: EntryVariant[];
90
+ /** What it owns, so a caller never rebuilds it (UIG-8). Empty for most. */
91
+ ownsBehaviours: EntryBehaviour[];
92
+ status: EntryStatus;
93
+ /**
94
+ * Which migration stage plans to change it.
95
+ *
96
+ * Always `null` here. The migration's plan lives in `K:/Estiva/migration
97
+ * docs`, which is not in this repo and is not in CI — and a copy kept here by
98
+ * hand is the drifting list this whole project exists to remove. The field
99
+ * stays in the schema because a later ticket may have a source a build can
100
+ * read; until then a reader gets an honest `null` rather than a stale number.
101
+ */
102
+ migrationStage: number | null;
103
+ /** The `.mdx` page's Storybook id, or `null` where the name has no page of its own. */
104
+ docsId: string | null;
105
+ /** A story that shows it, by Storybook id. `null` where nothing renders it alone. */
106
+ storyId: string | null;
107
+ /** The `.mdx` path, relative to the repo, or `null`. */
108
+ docPage: string | null;
109
+ }
110
+ /** A name that is exported and deliberately not an entry. Empty today; the count still has to reconcile. */
111
+ export interface RegistryExclusion {
112
+ name: string;
113
+ reason: string;
114
+ }
115
+ export interface Registry {
116
+ schemaVersion: number;
117
+ builtFrom: {
118
+ repo: string;
119
+ /** The npm package the entries are imported from. */
120
+ package: string;
121
+ packageVersion: string;
122
+ /** Value exports counted in `index.ts`. `entries + excluded` must equal it. */
123
+ exports: number;
124
+ /** Type-only exports, which are not entries. Recorded so the count reconciles. */
125
+ typeExports: number;
126
+ };
127
+ /**
128
+ * How to turn an id into a link. There is no Storybook on the internet yet
129
+ * (UIG-19), so an absolute URL committed here would resolve nowhere: the
130
+ * reader joins its own base to these.
131
+ */
132
+ storybook: {
133
+ docsPath: string;
134
+ storyPath: string;
135
+ devUrl: string;
136
+ };
137
+ entries: RegistryEntry[];
138
+ excluded: RegistryExclusion[];
139
+ }
140
+ /**
141
+ * Check a registry against this schema. Returns every problem, not the first:
142
+ * a build that reports one missing purpose per run costs one run per entry.
143
+ *
144
+ * An empty list is the only pass. CI runs this on the committed file.
145
+ */
146
+ export declare function validateRegistry(value: unknown): string[];
147
+ //# sourceMappingURL=schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/registry/schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH;;;;GAIG;AACH,eAAO,MAAM,cAAc,IAAI,CAAA;AAE/B,4DAA4D;AAC5D,MAAM,MAAM,SAAS;AACnB,oCAAoC;AAClC,WAAW;AACb,8DAA8D;GAC5D,MAAM;AACR,sDAAsD;GACpD,QAAQ,CAAA;AAEZ,uDAAuD;AACvD,MAAM,MAAM,aAAa;AACvB,4EAA4E;AAC1E,MAAM;AACR,qFAAqF;GACnF,SAAS,CAAA;AAEb,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,WAAW,GAAG,YAAY,CAAA;AAE/D,kEAAkE;AAClE,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,EAAE,CAAA;CACjB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAA;IACZ;;;;OAIG;IACH,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,OAAO,CAAA;IACjB,sEAAsE;IACtE,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;CACpB;AAED,iEAAiE;AACjE,MAAM,WAA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H,SAAS,EAAE;QACT,QAAQ,EAAE,MAAM,CAAA;QAChB,SAAS,EAAE,MAAM,CAAA;QACjB,MAAM,EAAE,MAAM,CAAA;KACf,CAAA;IACD,OAAO,EAAE,aAAa,EAAE,CAAA;IACxB,QAAQ,EAAE,iBAAiB,EAAE,CAAA;CAC9B;AASD;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,EAAE,CAwGzD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@estiva-app/ui",
3
- "version": "0.21.0",
3
+ "version": "0.22.0",
4
4
  "description": "Estiva's design tokens (the contract) and a small set of primitives (a convenience) for every Estiva app.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -8,6 +8,7 @@
8
8
  "dist",
9
9
  "src",
10
10
  "stories",
11
+ "registry.json",
11
12
  "tailwind-preset.js",
12
13
  "tokens.css",
13
14
  "base.css",
@@ -27,6 +28,11 @@
27
28
  "types": "./dist/gates/index.d.ts",
28
29
  "default": "./dist/gates/index.js"
29
30
  },
31
+ "./registry": {
32
+ "types": "./dist/registry/index.d.ts",
33
+ "default": "./dist/registry/index.js"
34
+ },
35
+ "./registry.json": "./registry.json",
30
36
  "./tailwind-preset": "./tailwind-preset.js",
31
37
  "./tokens.css": "./tokens.css",
32
38
  "./package.json": "./package.json",
@@ -34,7 +40,8 @@
34
40
  },
35
41
  "bin": {
36
42
  "create-estiva-app": "dist/gates/create-app.js",
37
- "estiva-gates": "dist/gates/cli.js"
43
+ "estiva-gates": "dist/gates/cli.js",
44
+ "estiva-ui": "dist/registry/cli.js"
38
45
  },
39
46
  "scripts": {
40
47
  "build": "node build.mjs && tsc -p tsconfig.build.json",
@@ -54,6 +61,12 @@
54
61
  "gates:status": "node dist/gates/cli.js status",
55
62
  "pregates:compare": "node build.mjs",
56
63
  "gates:compare": "node scripts/gates-compare.mjs",
64
+ "preregistry": "node build.mjs",
65
+ "registry": "node dist/registry/cli.js build",
66
+ "preregistry:check": "node build.mjs",
67
+ "registry:check": "node dist/registry/cli.js check",
68
+ "preui:find": "node build.mjs",
69
+ "ui:find": "node dist/registry/cli.js find",
57
70
  "prepublishOnly": "npm run build"
58
71
  },
59
72
  "peerDependencies": {