@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/dist/types/index.d.ts
CHANGED
|
@@ -71,7 +71,6 @@ export { Stat, StatRow, Sparkline, type StatProps, type StatRowProps, type Spark
|
|
|
71
71
|
export { DataTable, TableEmptyState, CellStack, type DataTableProps, type TableDensity, } from "./components/Table";
|
|
72
72
|
export { CodeEditor, CodeEditorToolbar, CodeEditorCaption, CodeEditorCopyButton, CodeEditorWrapToggle, CodeEditorViewSwitch, type CodeEditorProps, type CodeEditorToolbarProps, type CodeEditorView, } from "./components/CodeEditor";
|
|
73
73
|
export { Markdown, CodeBlock, type MarkdownProps, type CodeBlockProps } from "./components/Markdown";
|
|
74
|
-
export { LineDiff, type LineDiffProps } from "./components/LineDiff";
|
|
75
74
|
export { MarkdownEditor, type MarkdownEditorProps, type MarkdownEditorHandle, } from "./components/MarkdownEditor";
|
|
76
75
|
export { ReadMore, type ReadMoreProps } from "./components/ReadMore";
|
|
77
76
|
export { MarkdownSurface, type SurfaceOptions, type Splice } from "./lib/markdown/surface";
|
|
@@ -114,6 +113,7 @@ export { cn } from "./lib/cn";
|
|
|
114
113
|
export { formatBytes, formatTokens, formatCompactNumber } from "./lib/format";
|
|
115
114
|
export { copyText } from "./lib/clipboard";
|
|
116
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";
|
|
117
117
|
export { useFillHeight } from "./lib/use-fill-height";
|
|
118
118
|
export { useTheme, useUiScale, useContrast, useMotionPreference, type Theme, type UiScale, type ContrastPreference, type MotionPreference, } from "./lib/preferences";
|
|
119
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.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",
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
export interface LineDiffProps {
|
|
2
|
-
/** The baseline/default text this compares `after` against. */
|
|
3
|
-
before: string;
|
|
4
|
-
/** The current text being compared against `before`. */
|
|
5
|
-
after: string;
|
|
6
|
-
/** The accessible name for the diff region. */
|
|
7
|
-
label: string;
|
|
8
|
-
className?: string;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Renders a line-based diff of `after` against `before`: lines common to both
|
|
12
|
-
* are shown once, plain; a line only in `before` is shown once, styled as a
|
|
13
|
-
* removal; a line only in `after` is shown once, styled as an addition. A
|
|
14
|
-
* line edited in place shows as its old form removed immediately followed by
|
|
15
|
-
* its new form added. Identical `before`/`after` renders every line
|
|
16
|
-
* unchanged, with no added/removed markers at all.
|
|
17
|
-
*/
|
|
18
|
-
export declare function LineDiff({ before, after, label, className }: LineDiffProps): import("react").JSX.Element;
|