@agent-native/toolkit 0.15.1 → 0.16.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/README.md +26 -0
- package/agent-native.eject.json +16 -0
- package/dist/composer/PromptComposer.d.ts +7 -1
- package/dist/composer/PromptComposer.d.ts.map +1 -1
- package/dist/composer/PromptComposer.js +2 -2
- package/dist/composer/PromptComposer.js.map +1 -1
- package/dist/composer/TiptapComposer.d.ts +19 -1
- package/dist/composer/TiptapComposer.d.ts.map +1 -1
- package/dist/composer/TiptapComposer.js +27 -4
- package/dist/composer/TiptapComposer.js.map +1 -1
- package/dist/data-grid/DataGrid.d.ts +92 -0
- package/dist/data-grid/DataGrid.d.ts.map +1 -0
- package/dist/data-grid/DataGrid.js +315 -0
- package/dist/data-grid/DataGrid.js.map +1 -0
- package/dist/data-grid/DataGrid.spec.d.ts +2 -0
- package/dist/data-grid/DataGrid.spec.d.ts.map +1 -0
- package/dist/data-grid/DataGrid.spec.js +134 -0
- package/dist/data-grid/DataGrid.spec.js.map +1 -0
- package/dist/data-grid/index.d.ts +2 -0
- package/dist/data-grid/index.d.ts.map +1 -0
- package/dist/data-grid/index.js +2 -0
- package/dist/data-grid/index.js.map +1 -0
- package/dist/sharing/SharePrimitives.d.ts +14 -3
- package/dist/sharing/SharePrimitives.d.ts.map +1 -1
- package/dist/sharing/SharePrimitives.js +11 -3
- package/dist/sharing/SharePrimitives.js.map +1 -1
- package/dist/sharing/index.d.ts +1 -1
- package/dist/sharing/index.d.ts.map +1 -1
- package/dist/sharing/index.js +1 -1
- package/dist/sharing/index.js.map +1 -1
- package/package.json +15 -1
- package/src/composer/PromptComposer.tsx +13 -0
- package/src/composer/TiptapComposer.tsx +107 -1
- package/src/data-grid/DataGrid.spec.tsx +243 -0
- package/src/data-grid/DataGrid.tsx +754 -0
- package/src/data-grid/index.ts +15 -0
- package/src/sharing/SharePrimitives.tsx +47 -8
- package/src/sharing/index.ts +4 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export {
|
|
2
|
+
DataGrid,
|
|
3
|
+
clampDataGridColumnWidth,
|
|
4
|
+
dataGridColumnTemplate,
|
|
5
|
+
type DataGridActiveCell,
|
|
6
|
+
type DataGridCellContext,
|
|
7
|
+
type DataGridColumn,
|
|
8
|
+
type DataGridCommitContext,
|
|
9
|
+
type DataGridDirection,
|
|
10
|
+
type DataGridEditorContext,
|
|
11
|
+
type DataGridProps,
|
|
12
|
+
type DataGridRowContext,
|
|
13
|
+
type DataGridSelectionMode,
|
|
14
|
+
type DataGridSlotContext,
|
|
15
|
+
} from "./DataGrid.js";
|
|
@@ -115,9 +115,10 @@ export function ShareCopyRow({
|
|
|
115
115
|
);
|
|
116
116
|
}
|
|
117
117
|
|
|
118
|
-
export interface
|
|
118
|
+
export interface ShareDisclosureSectionProps {
|
|
119
119
|
children: ReactNode;
|
|
120
|
-
label
|
|
120
|
+
label: ReactNode;
|
|
121
|
+
fallbackLabel?: string;
|
|
121
122
|
defaultOpen?: boolean;
|
|
122
123
|
open?: boolean;
|
|
123
124
|
onOpenChange?: (open: boolean) => void;
|
|
@@ -125,20 +126,20 @@ export interface ShareAgentsSectionProps {
|
|
|
125
126
|
contentClassName?: string;
|
|
126
127
|
}
|
|
127
128
|
|
|
128
|
-
/** Shared expandable boundary for
|
|
129
|
-
export function
|
|
129
|
+
/** Shared expandable boundary for optional share-access details. */
|
|
130
|
+
export function ShareDisclosureSection({
|
|
130
131
|
children,
|
|
131
|
-
label
|
|
132
|
+
label,
|
|
133
|
+
fallbackLabel = "Share details",
|
|
132
134
|
defaultOpen = false,
|
|
133
135
|
open,
|
|
134
136
|
onOpenChange,
|
|
135
137
|
className,
|
|
136
138
|
contentClassName,
|
|
137
|
-
}:
|
|
139
|
+
}: ShareDisclosureSectionProps) {
|
|
138
140
|
const [internalOpen, setInternalOpen] = useState(defaultOpen);
|
|
139
141
|
const isOpen = open ?? internalOpen;
|
|
140
|
-
const accessibleLabel =
|
|
141
|
-
typeof label === "string" ? label : "Share with agents";
|
|
142
|
+
const accessibleLabel = typeof label === "string" ? label : fallbackLabel;
|
|
142
143
|
const handleOpenChange = (nextOpen: boolean) => {
|
|
143
144
|
if (open === undefined) setInternalOpen(nextOpen);
|
|
144
145
|
onOpenChange?.(nextOpen);
|
|
@@ -183,3 +184,41 @@ export function ShareAgentsSection({
|
|
|
183
184
|
</Collapsible>
|
|
184
185
|
);
|
|
185
186
|
}
|
|
187
|
+
|
|
188
|
+
export type ShareAgentsSectionProps = Omit<
|
|
189
|
+
ShareDisclosureSectionProps,
|
|
190
|
+
"label" | "fallbackLabel"
|
|
191
|
+
> & { label?: ReactNode };
|
|
192
|
+
|
|
193
|
+
/** Shared expandable boundary for agent-readable sharing details. */
|
|
194
|
+
export function ShareAgentsSection({
|
|
195
|
+
label = "Share with agents",
|
|
196
|
+
...props
|
|
197
|
+
}: ShareAgentsSectionProps) {
|
|
198
|
+
return (
|
|
199
|
+
<ShareDisclosureSection
|
|
200
|
+
{...props}
|
|
201
|
+
label={label}
|
|
202
|
+
fallbackLabel="Share with agents"
|
|
203
|
+
/>
|
|
204
|
+
);
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
export type SharePeopleSectionProps = Omit<
|
|
208
|
+
ShareDisclosureSectionProps,
|
|
209
|
+
"label" | "fallbackLabel"
|
|
210
|
+
> & { label?: ReactNode };
|
|
211
|
+
|
|
212
|
+
/** Shared expandable boundary for individual people access. */
|
|
213
|
+
export function SharePeopleSection({
|
|
214
|
+
label = "People with access",
|
|
215
|
+
...props
|
|
216
|
+
}: SharePeopleSectionProps) {
|
|
217
|
+
return (
|
|
218
|
+
<ShareDisclosureSection
|
|
219
|
+
{...props}
|
|
220
|
+
label={label}
|
|
221
|
+
fallbackLabel="People with access"
|
|
222
|
+
/>
|
|
223
|
+
);
|
|
224
|
+
}
|
package/src/sharing/index.ts
CHANGED
|
@@ -3,6 +3,10 @@ export {
|
|
|
3
3
|
type ShareAgentsSectionProps,
|
|
4
4
|
ShareCopyRow,
|
|
5
5
|
type ShareCopyRowProps,
|
|
6
|
+
ShareDisclosureSection,
|
|
7
|
+
type ShareDisclosureSectionProps,
|
|
8
|
+
SharePeopleSection,
|
|
9
|
+
type SharePeopleSectionProps,
|
|
6
10
|
ShareTrigger,
|
|
7
11
|
type ShareTriggerProps,
|
|
8
12
|
} from "./SharePrimitives.js";
|