@djangocfg/ui-tools 2.1.464 → 2.1.466
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/audio-player/index.d.cts +1 -2
- package/dist/audio-player/index.d.ts +1 -2
- package/dist/file-icon/index.d.cts +2 -3
- package/dist/file-icon/index.d.ts +2 -3
- package/dist/tree/index.cjs +8 -6
- package/dist/tree/index.cjs.map +1 -1
- package/dist/tree/index.d.cts +16 -17
- package/dist/tree/index.d.ts +16 -17
- package/dist/tree/index.mjs +8 -6
- package/dist/tree/index.mjs.map +1 -1
- package/package.json +50 -50
- package/src/tools/chat/README.md +5 -1
- package/src/tools/chat/shell/SuggestedPrompts.tsx +26 -33
- package/src/tools/chat/shell/__tests__/SuggestedPrompts.test.tsx +51 -0
- package/src/tools/data/Tree/README.md +3 -0
- package/src/tools/data/Tree/TreeRoot.tsx +13 -6
- package/src/tools/data/Tree/__tests__/TreeRoot.accessibility.test.tsx +36 -0
- package/src/tools/data/Tree/components/TreeEmpty.tsx +1 -0
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
3
|
|
|
5
4
|
type WaveformMode = 'peaks' | 'live' | 'bars' | 'progress' | 'none';
|
|
6
5
|
type WaveformConfig = {
|
|
@@ -142,7 +141,7 @@ type PlayerProviderProps = {
|
|
|
142
141
|
onError?: (reason: PlayerErrorReason, e: unknown) => void;
|
|
143
142
|
children: ReactNode;
|
|
144
143
|
};
|
|
145
|
-
declare function PlayerProvider(props: PlayerProviderProps):
|
|
144
|
+
declare function PlayerProvider(props: PlayerProviderProps): react.JSX.Element;
|
|
146
145
|
|
|
147
146
|
declare const usePlayerState: () => PlayerState;
|
|
148
147
|
declare const usePlayerControls: () => PlayerControls;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
3
|
|
|
5
4
|
type WaveformMode = 'peaks' | 'live' | 'bars' | 'progress' | 'none';
|
|
6
5
|
type WaveformConfig = {
|
|
@@ -142,7 +141,7 @@ type PlayerProviderProps = {
|
|
|
142
141
|
onError?: (reason: PlayerErrorReason, e: unknown) => void;
|
|
143
142
|
children: ReactNode;
|
|
144
143
|
};
|
|
145
|
-
declare function PlayerProvider(props: PlayerProviderProps):
|
|
144
|
+
declare function PlayerProvider(props: PlayerProviderProps): react.JSX.Element;
|
|
146
145
|
|
|
147
146
|
declare const usePlayerState: () => PlayerState;
|
|
148
147
|
declare const usePlayerControls: () => PlayerControls;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react from 'react';
|
|
2
2
|
import { LucideIcon } from 'lucide-react';
|
|
3
3
|
import { T as TreeNode, b as TreeRowSlot } from '../slots-ClRpIzoh.cjs';
|
|
4
|
-
import 'react';
|
|
5
4
|
|
|
6
5
|
interface ResolveFolderIconOptions {
|
|
7
6
|
/** Folder display name (no path). */
|
|
@@ -54,7 +53,7 @@ interface FileIconProps {
|
|
|
54
53
|
* The icon SVG data is a static module, so it bundles into the `FileIcon`
|
|
55
54
|
* chunk and is only fetched by consumers that actually mount this component.
|
|
56
55
|
*/
|
|
57
|
-
declare function FileIcon({ name, isFolder, isExpanded, size, folderOverrides, label, className, }: FileIconProps):
|
|
56
|
+
declare function FileIcon({ name, isFolder, isExpanded, size, folderOverrides, label, className, }: FileIconProps): react.JSX.Element;
|
|
58
57
|
|
|
59
58
|
interface CreateFileIconSlotOptions<T> {
|
|
60
59
|
/**
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react from 'react';
|
|
2
2
|
import { LucideIcon } from 'lucide-react';
|
|
3
3
|
import { T as TreeNode, b as TreeRowSlot } from '../slots-ClRpIzoh.js';
|
|
4
|
-
import 'react';
|
|
5
4
|
|
|
6
5
|
interface ResolveFolderIconOptions {
|
|
7
6
|
/** Folder display name (no path). */
|
|
@@ -54,7 +53,7 @@ interface FileIconProps {
|
|
|
54
53
|
* The icon SVG data is a static module, so it bundles into the `FileIcon`
|
|
55
54
|
* chunk and is only fetched by consumers that actually mount this component.
|
|
56
55
|
*/
|
|
57
|
-
declare function FileIcon({ name, isFolder, isExpanded, size, folderOverrides, label, className, }: FileIconProps):
|
|
56
|
+
declare function FileIcon({ name, isFolder, isExpanded, size, folderOverrides, label, className, }: FileIconProps): react.JSX.Element;
|
|
58
57
|
|
|
59
58
|
interface CreateFileIconSlotOptions<T> {
|
|
60
59
|
/**
|
package/dist/tree/index.cjs
CHANGED
|
@@ -2115,6 +2115,7 @@ function TreeEmpty({ children, className }) {
|
|
|
2115
2115
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2116
2116
|
"div",
|
|
2117
2117
|
{
|
|
2118
|
+
role: "status",
|
|
2118
2119
|
className: lib.cn(
|
|
2119
2120
|
"flex h-full min-h-32 items-center justify-center px-4 py-6 text-sm text-muted-foreground",
|
|
2120
2121
|
className
|
|
@@ -3048,6 +3049,7 @@ function TreeRootShell({
|
|
|
3048
3049
|
[keyboardRef, finderHotkeysRef]
|
|
3049
3050
|
);
|
|
3050
3051
|
const focusedId = ctx.focused;
|
|
3052
|
+
const isEmpty = ctx.flatRows.length === 0;
|
|
3051
3053
|
React.useEffect(() => {
|
|
3052
3054
|
if (!focusedId) return;
|
|
3053
3055
|
const el = containerRef.current?.querySelector(
|
|
@@ -3072,11 +3074,11 @@ function TreeRootShell({
|
|
|
3072
3074
|
"div",
|
|
3073
3075
|
{
|
|
3074
3076
|
ref: setContainerRef,
|
|
3075
|
-
tabIndex: 0,
|
|
3076
|
-
role: "tree",
|
|
3077
|
-
"aria-label": ctx.labels.ariaLabel,
|
|
3078
|
-
"aria-multiselectable": ctx.selectionMode === "multiple"
|
|
3079
|
-
"aria-activedescendant": focusedId ? treeRowDomId(focusedId) : void 0,
|
|
3077
|
+
tabIndex: isEmpty ? void 0 : 0,
|
|
3078
|
+
role: isEmpty ? void 0 : "tree",
|
|
3079
|
+
"aria-label": isEmpty ? void 0 : ctx.labels.ariaLabel,
|
|
3080
|
+
"aria-multiselectable": !isEmpty && ctx.selectionMode === "multiple" ? true : void 0,
|
|
3081
|
+
"aria-activedescendant": !isEmpty && focusedId ? treeRowDomId(focusedId) : void 0,
|
|
3080
3082
|
className: lib.cn(
|
|
3081
3083
|
"group/tree flex h-full w-full flex-col gap-2 rounded-sm outline-none",
|
|
3082
3084
|
"focus-visible:ring-1 focus-visible:ring-ring/50",
|
|
@@ -3087,7 +3089,7 @@ function TreeRootShell({
|
|
|
3087
3089
|
children: [
|
|
3088
3090
|
enableSearch ? /* @__PURE__ */ jsxRuntime.jsx(TreeSearchInput, { className: "mx-2 mt-2" }) : null,
|
|
3089
3091
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-h-0 flex-1 flex-col overflow-auto px-1", children: [
|
|
3090
|
-
/* @__PURE__ */ jsxRuntime.jsx(TreeContent, { role: "group", children: renderRow }),
|
|
3092
|
+
/* @__PURE__ */ jsxRuntime.jsx(TreeContent, { role: isEmpty ? "presentation" : "group", children: renderRow }),
|
|
3091
3093
|
/* @__PURE__ */ jsxRuntime.jsx(TreeEmptyArea, {})
|
|
3092
3094
|
] })
|
|
3093
3095
|
]
|