@danxbot/ui 15.14.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 +253 -160
- package/dist/index.js.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/lib/component-guidance.d.ts +15 -0
- package/package.json +2 -2
package/dist/types/index.d.ts
CHANGED
|
@@ -113,6 +113,7 @@ export { cn } from "./lib/cn";
|
|
|
113
113
|
export { formatBytes, formatTokens, formatCompactNumber } from "./lib/format";
|
|
114
114
|
export { copyText } from "./lib/clipboard";
|
|
115
115
|
export { formatDate, parseDate, formatDateTime, parseDateTime, type FormatDateTimeOptions, type ParseDateTimeOptions, formatCurrency, parseCurrency, formatNumber, parseNumber, type FormatNumberOptions, formatBoolean, parseBoolean, type FormatBooleanOptions, } from "./lib/values";
|
|
116
|
+
export { COMPONENT_GUIDANCE, type ComponentGuidanceRule } from "./lib/component-guidance";
|
|
116
117
|
export { useFillHeight } from "./lib/use-fill-height";
|
|
117
118
|
export { useTheme, useUiScale, useContrast, useMotionPreference, type Theme, type UiScale, type ContrastPreference, type MotionPreference, } from "./lib/preferences";
|
|
118
119
|
export { usePersistedState, readStored, writeStored, clearStored, storageKey, type PersistedStateOptions, } from "./lib/persist";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface ComponentGuidanceRule {
|
|
2
|
+
/** Stable id — used only for messages/tooling, never matched against. */
|
|
3
|
+
id: string;
|
|
4
|
+
/** Tested against a whole file's source text. Deliberately case-sensitive
|
|
5
|
+
* (see `raw-*` rules below) — a lowercase native tag is the violation; the
|
|
6
|
+
* identically-spelled PascalCase `@danxbot/ui` export is not. */
|
|
7
|
+
pattern: RegExp;
|
|
8
|
+
/** The component(s) that usually fit better than the matched shape. */
|
|
9
|
+
preferInstead: readonly string[];
|
|
10
|
+
/** Why the richer alternative usually fits — surfaced in a consumer's
|
|
11
|
+
* violation message, and what a `UI-LIBRARY-ALLOW: <reason>` comment is
|
|
12
|
+
* answering when the richer one genuinely does not apply here. */
|
|
13
|
+
reason: string;
|
|
14
|
+
}
|
|
15
|
+
export declare const COMPONENT_GUIDANCE: readonly ComponentGuidanceRule[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@danxbot/ui",
|
|
3
|
-
"version": "15.
|
|
3
|
+
"version": "15.15.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Danxbot — a domain-agnostic React design system with motion as a first-class primitive.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"gates": "npm run shoot && npm run a11y && node scripts/shoot-overlays.mjs && npm run probe",
|
|
75
75
|
"a11y": "node scripts/a11y-scan.mjs",
|
|
76
76
|
"shoot": "node scripts/shoot.mjs",
|
|
77
|
-
"probe": "node scripts/probe-scale.mjs && node scripts/probe-switch.mjs && node scripts/probe-slider.mjs && node scripts/probe-panel.mjs && node scripts/probe-popover-width.mjs && node scripts/probe-api.mjs && node scripts/probe-api-live.mjs && node scripts/probe-tabs-overflow.mjs && node scripts/probe-stat-row.mjs && node scripts/probe-packaging.mjs && node scripts/probe-containment.mjs && node scripts/probe-popover-containment.mjs && node scripts/probe-shell.mjs && node scripts/probe-nav-trigger-tap-target.mjs && node scripts/probe-card-header.mjs && node scripts/probe-inline-edit.mjs && node scripts/probe-read-more.mjs",
|
|
77
|
+
"probe": "node scripts/probe-scale.mjs && node scripts/probe-switch.mjs && node scripts/probe-slider.mjs && node scripts/probe-panel.mjs && node scripts/probe-popover-width.mjs && node scripts/probe-api.mjs && node scripts/probe-api-live.mjs && node scripts/probe-tabs-overflow.mjs && node scripts/probe-stat-row.mjs && node scripts/probe-packaging.mjs && node scripts/probe-containment.mjs && node scripts/probe-popover-containment.mjs && node scripts/probe-theme-menu-overflow.mjs && node scripts/probe-shell.mjs && node scripts/probe-nav-trigger-tap-target.mjs && node scripts/probe-card-header.mjs && node scripts/probe-inline-edit.mjs && node scripts/probe-read-more.mjs",
|
|
78
78
|
"sync": "node scripts/sync.mjs",
|
|
79
79
|
"visual": "node scripts/visual-docker.mjs",
|
|
80
80
|
"visual:update": "node scripts/visual-docker.mjs --update-snapshots",
|