@danxbot/ui 15.7.1 → 15.8.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/dist/index.js +5084 -5057
- package/dist/index.js.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/lib/clipboard.d.ts +12 -0
- package/package.json +1 -1
package/dist/types/index.d.ts
CHANGED
|
@@ -111,6 +111,7 @@ export { EffortControl, DEFAULT_EFFORT_LEVELS, type EffortControlProps, type Eff
|
|
|
111
111
|
export { ContextMeter, ChatStatus, type ContextMeterProps, type ContextSegment, type UsageLimit, type ChatStatusProps, } from "./components/chat/ContextMeter";
|
|
112
112
|
export { cn } from "./lib/cn";
|
|
113
113
|
export { formatBytes, formatTokens, formatCompactNumber } from "./lib/format";
|
|
114
|
+
export { copyText } from "./lib/clipboard";
|
|
114
115
|
export { formatDate, parseDate, formatDateTime, parseDateTime, type FormatDateTimeOptions, type ParseDateTimeOptions, formatCurrency, parseCurrency, formatNumber, parseNumber, type FormatNumberOptions, formatBoolean, parseBoolean, type FormatBooleanOptions, } from "./lib/values";
|
|
115
116
|
export { useFillHeight } from "./lib/use-fill-height";
|
|
116
117
|
export { useTheme, useUiScale, useContrast, useMotionPreference, type Theme, type UiScale, type ContrastPreference, type MotionPreference, } from "./lib/preferences";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copy `text` to the OS clipboard.
|
|
3
|
+
*
|
|
4
|
+
* Tries `navigator.clipboard.writeText` first. If that API is unavailable or
|
|
5
|
+
* rejects (e.g. permission denied, as in the Claude Code desktop in-app
|
|
6
|
+
* browser — DX-3661), falls back to selecting a hidden `<textarea>` and
|
|
7
|
+
* running `document.execCommand('copy')`, restoring the document's prior
|
|
8
|
+
* selection and focused element afterward.
|
|
9
|
+
*
|
|
10
|
+
* Rejects only when both the async API and the fallback fail.
|
|
11
|
+
*/
|
|
12
|
+
export declare function copyText(text: string): Promise<void>;
|