@danxbot/ui 15.15.0 → 15.15.1
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 +15 -0
- package/dist/index.js +5212 -5160
- package/dist/index.js.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/lib/component-guidance.d.ts +15 -0
- package/package.json +2 -2
- package/dist/types/components/LineDiff.d.ts +0 -18
package/README.md
CHANGED
|
@@ -101,6 +101,21 @@ Props are plain data and components are addressed by name, so a transcript stays
|
|
|
101
101
|
serialisable — a component reference in the message would make it impossible to
|
|
102
102
|
persist or replay.
|
|
103
103
|
|
|
104
|
+
### The library names its own richer alternatives
|
|
105
|
+
|
|
106
|
+
`COMPONENT_GUIDANCE` (exported from the package root) is a data table, not a
|
|
107
|
+
doc page: for each basic primitive — and each native-HTML/ARIA shape this
|
|
108
|
+
library replaces outright — it names the richer component that usually fits
|
|
109
|
+
better and why (`Textarea` → `InlineMarkdownEdit`/`MarkdownEditor` for prose,
|
|
110
|
+
a `<pre>` → `Markdown`, a ghost text `Button` → `IconButton`, and so on). A
|
|
111
|
+
consuming repo's own source scan reads this table instead of hard-coding the
|
|
112
|
+
same list, so a new richer component added here extends every consumer's
|
|
113
|
+
enforcement with no edit on their side. The rule of thumb it encodes: for
|
|
114
|
+
each piece of data, use the most capable component that fits it, with inline
|
|
115
|
+
editing in place as the default interaction — a plainer primitive is
|
|
116
|
+
sometimes still correct, and that is what a consumer's own escape-hatch
|
|
117
|
+
comment is for, not a reason to leave the table incomplete.
|
|
118
|
+
|
|
104
119
|
## Setup
|
|
105
120
|
|
|
106
121
|
Two stylesheets, and you want both. In your application's Tailwind entry:
|