@manta-eu/react 0.1.4 → 0.1.6
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 +4 -8
- package/dist/components/audience-phase-badge/index.d.ts +1 -1
- package/dist/components/audience-phase-badge/index.d.ts.map +1 -1
- package/dist/components/audience-phase-badge/index.js +3 -0
- package/dist/components/authenticated-chat/index.d.ts.map +1 -1
- package/dist/components/authenticated-chat/index.js +0 -5
- package/dist/components/chat/chat-input/index.d.ts +1 -1
- package/dist/components/chat/chat-input/index.d.ts.map +1 -1
- package/dist/components/chat/chat-input/index.js +4 -5
- package/dist/components/chat-view/Chat.d.ts +6 -0
- package/dist/components/chat-view/Chat.d.ts.map +1 -1
- package/dist/components/chat-view/Chat.js +18 -8
- package/dist/components/chat-view/ChatHeaders.d.ts.map +1 -1
- package/dist/components/chat-view/ChatHeaders.js +3 -2
- package/dist/components/embedded-chat/EmbeddedDatastorePicker.d.ts +1 -0
- package/dist/components/embedded-chat/EmbeddedDatastorePicker.d.ts.map +1 -1
- package/dist/components/embedded-chat/EmbeddedDatastorePicker.js +9 -3
- package/dist/components/embedded-chat/index.d.ts.map +1 -1
- package/dist/components/embedded-chat/index.js +1 -8
- package/dist/components/layouts/Sidebar.d.ts.map +1 -1
- package/dist/components/layouts/Sidebar.js +25 -5
- package/dist/components/planning/ActioningView.d.ts.map +1 -1
- package/dist/components/planning/ActioningView.js +11 -6
- package/dist/components/planning/ExecutionSectionItem.d.ts +2 -3
- package/dist/components/planning/ExecutionSectionItem.d.ts.map +1 -1
- package/dist/components/planning/ExecutionSectionItem.js +3 -6
- package/dist/components/planning/ExecutionSections.d.ts +2 -3
- package/dist/components/planning/ExecutionSections.d.ts.map +1 -1
- package/dist/components/planning/ExecutionSections.js +2 -2
- package/dist/components/planning/ManualActionCard.d.ts +3 -4
- package/dist/components/planning/ManualActionCard.d.ts.map +1 -1
- package/dist/components/planning/ManualActionCard.js +24 -6
- package/dist/components/rdf-insights/CampaignChannelMix.js +1 -1
- package/dist/components/rdf-insights/CampaignGrid.d.ts.map +1 -1
- package/dist/components/rdf-insights/CampaignGrid.js +2 -2
- package/dist/components/rdf-insights/DailyPerformance.js +2 -2
- package/dist/components/rdf-insights/KpiDashboard.d.ts +2 -2
- package/dist/components/rdf-insights/KpiDashboard.d.ts.map +1 -1
- package/dist/components/rdf-insights/KpiDashboard.js +33 -53
- package/dist/components/rdf-insights/MetaDailyInsights.js +2 -2
- package/dist/components/rdf-insights/ProductCard.d.ts.map +1 -1
- package/dist/components/rdf-insights/ProductCard.js +1 -1
- package/dist/components/rdf-insights/ProductVariantsTable.js +1 -1
- package/dist/components/rdf-insights/useExtractedInsights.d.ts +1 -1
- package/dist/components/rdf-insights/useExtractedInsights.js +3 -3
- package/dist/components/sidebar/nav-menu.d.ts +2 -0
- package/dist/components/sidebar/nav-menu.d.ts.map +1 -1
- package/dist/components/sidebar/nav-menu.js +11 -6
- package/dist/components/table/index.d.ts +26 -0
- package/dist/components/table/index.d.ts.map +1 -1
- package/dist/components/table/index.js +31 -1
- package/dist/datastore-picker/datastore-picker-rows.d.ts +1 -0
- package/dist/datastore-picker/datastore-picker-rows.d.ts.map +1 -1
- package/dist/datastore-picker/datastore-picker-rows.js +6 -2
- package/dist/explain-fact/DatalogCode.d.ts.map +1 -1
- package/dist/explain-fact/DatalogCode.js +7 -2
- package/dist/explain-fact/FactValue.js +3 -3
- package/dist/explain-fact/proof-tree/ProofTreeFormulaFooter.d.ts.map +1 -1
- package/dist/explain-fact/proof-tree/ProofTreeFormulaFooter.js +2 -1
- package/dist/globals.css +10 -102
- package/dist/graph/createNodeRouter.d.ts.map +1 -1
- package/dist/graph/createNodeRouter.js +3 -0
- package/dist/graph/nodes/BrandFacetRuleView.d.ts.map +1 -1
- package/dist/graph/nodes/BrandFacetRuleView.js +6 -4
- package/dist/graph/nodes/BrandFontFamilyView.d.ts +3 -0
- package/dist/graph/nodes/BrandFontFamilyView.d.ts.map +1 -0
- package/dist/graph/nodes/BrandFontFamilyView.js +56 -0
- package/dist/graph/nodes/BrandFontUploadButton.d.ts +6 -0
- package/dist/graph/nodes/BrandFontUploadButton.d.ts.map +1 -0
- package/dist/graph/nodes/BrandFontUploadButton.js +65 -0
- package/dist/graph/nodes/BrandGuidelinesView.d.ts.map +1 -1
- package/dist/graph/nodes/BrandGuidelinesView.js +2 -6
- package/dist/graph/nodes/GoogleCampaignView.js +2 -2
- package/dist/graph/nodes/brand-font.d.ts +12 -0
- package/dist/graph/nodes/brand-font.d.ts.map +1 -0
- package/dist/graph/nodes/brand-font.js +12 -0
- package/dist/graph/nodes/brand-shared.d.ts +3 -2
- package/dist/graph/nodes/brand-shared.d.ts.map +1 -1
- package/dist/graph/nodes/brand-shared.js +3 -2
- package/dist/hooks/use-action-plans-list.js +1 -1
- package/dist/hooks/use-connection-problems.d.ts +15 -0
- package/dist/hooks/use-connection-problems.d.ts.map +1 -0
- package/dist/hooks/use-connection-problems.js +9 -0
- package/dist/hooks/use-font-face.d.ts +3 -0
- package/dist/hooks/use-font-face.d.ts.map +1 -0
- package/dist/hooks/use-font-face.js +33 -0
- package/dist/hooks/use-graph-refresh-after-turn.d.ts +2 -0
- package/dist/hooks/use-graph-refresh-after-turn.d.ts.map +1 -0
- package/dist/hooks/use-graph-refresh-after-turn.js +12 -0
- package/dist/hooks/use-manual-actions.d.ts +11 -1
- package/dist/hooks/use-manual-actions.d.ts.map +1 -1
- package/dist/hooks/use-manual-actions.js +47 -100
- package/dist/hooks/useAuth.d.ts +6 -1
- package/dist/hooks/useAuth.d.ts.map +1 -1
- package/dist/hooks/useAuth.js +36 -9
- package/dist/hooks/useValidateActionPlan.d.ts.map +1 -1
- package/dist/ldo-ui.d.ts +1 -1
- package/dist/ldo-ui.d.ts.map +1 -1
- package/dist/lib/activity-changeset.d.ts.map +1 -1
- package/dist/lib/activity-changeset.js +6 -3
- package/dist/lib/datastore-route-table.d.ts +1 -0
- package/dist/lib/datastore-route-table.d.ts.map +1 -1
- package/dist/lib/datastore-route-table.js +2 -0
- package/dist/lib/manual-actions.js +1 -1
- package/dist/lib/rdf/index.d.ts +4 -2
- package/dist/lib/rdf/index.d.ts.map +1 -1
- package/dist/lib/rdf/index.js +48 -18
- package/dist/lib/rdf/insights.d.ts +6 -1
- package/dist/lib/rdf/insights.d.ts.map +1 -1
- package/dist/lib/rdf/insights.js +15 -3
- package/dist/lib/rdf/types.d.ts +21 -8
- package/dist/lib/rdf/types.d.ts.map +1 -1
- package/dist/lib/tool-icons.d.ts.map +1 -1
- package/dist/lib/tool-icons.js +1 -5
- package/dist/providers/ActiveChatProvider.d.ts.map +1 -1
- package/dist/providers/ActiveChatProvider.js +2 -0
- package/dist/providers/AuthContext.d.ts +1 -1
- package/dist/providers/AuthContext.d.ts.map +1 -1
- package/dist/providers/KnowledgeGraphStateContext.d.ts +0 -1
- package/dist/providers/KnowledgeGraphStateContext.d.ts.map +1 -1
- package/dist/providers/KnowledgeGraphStateProvider.d.ts.map +1 -1
- package/dist/providers/KnowledgeGraphStateProvider.js +8 -19
- package/dist/providers/index.d.ts +4 -1
- package/dist/providers/index.d.ts.map +1 -1
- package/dist/providers/index.js +2 -1
- package/dist/routes/activity/change-display.js +1 -1
- package/dist/routes/data-explorer/components/record-detail/ActionFormDialog.d.ts.map +1 -1
- package/dist/routes/data-explorer/components/record-detail/ActionFormDialog.js +23 -9
- package/dist/routes/data-explorer/components/record-detail/action-properties.d.ts +2 -4
- package/dist/routes/data-explorer/components/record-detail/action-properties.d.ts.map +1 -1
- package/dist/routes/data-explorer/components/record-detail/action-properties.js +8 -50
- package/dist/routes/datastores/components/DatastoreFormDialog.d.ts +4 -2
- package/dist/routes/datastores/components/DatastoreFormDialog.d.ts.map +1 -1
- package/dist/routes/datastores/components/DatastoreFormDialog.js +7 -4
- package/dist/routes/datastores/components/DatastoresToolbar.d.ts +3 -1
- package/dist/routes/datastores/components/DatastoresToolbar.d.ts.map +1 -1
- package/dist/routes/datastores/components/DatastoresToolbar.js +18 -5
- package/dist/routes/datastores/components/LinkUnlinkedDatastoreDialog.d.ts.map +1 -1
- package/dist/routes/datastores/components/LinkUnlinkedDatastoreDialog.js +6 -2
- package/dist/routes/datastores/components/ProvisionDatastoreDialog.d.ts +7 -0
- package/dist/routes/datastores/components/ProvisionDatastoreDialog.d.ts.map +1 -0
- package/dist/routes/datastores/components/ProvisionDatastoreDialog.js +10 -0
- package/dist/routes/datastores/flatten.d.ts +4 -0
- package/dist/routes/datastores/flatten.d.ts.map +1 -1
- package/dist/routes/datastores/flatten.js +11 -0
- package/dist/routes/datastores/hooks/useDatastoreColumns.d.ts +4 -1
- package/dist/routes/datastores/hooks/useDatastoreColumns.d.ts.map +1 -1
- package/dist/routes/datastores/hooks/useDatastoreColumns.js +6 -2
- package/dist/routes/datastores/hooks/useTenantOrganizationCheck.d.ts +3 -0
- package/dist/routes/datastores/hooks/useTenantOrganizationCheck.d.ts.map +1 -0
- package/dist/routes/datastores/hooks/useTenantOrganizationCheck.js +21 -0
- package/dist/routes/datastores/index.d.ts.map +1 -1
- package/dist/routes/datastores/index.js +44 -6
- package/dist/routes/datastores/link-provider.d.ts +11 -0
- package/dist/routes/datastores/link-provider.d.ts.map +1 -0
- package/dist/routes/datastores/link-provider.js +34 -0
- package/dist/routes/integrations/components/connect-forms/types.d.ts +1 -0
- package/dist/routes/integrations/components/connect-forms/types.d.ts.map +1 -1
- package/dist/routes/integrations/connection-view.d.ts +4 -1
- package/dist/routes/integrations/connection-view.d.ts.map +1 -1
- package/dist/routes/integrations/connection-view.js +39 -6
- package/dist/routes/integrations/types.d.ts +3 -0
- package/dist/routes/integrations/types.d.ts.map +1 -1
- package/dist/routes/memories/components/ChangeScopeDialog.d.ts +1 -1
- package/dist/routes/memories/components/ChangeScopeDialog.d.ts.map +1 -1
- package/dist/routes/memories/components/ChangeScopeDialog.js +3 -3
- package/dist/routes/memories/components/EmptyStates.d.ts +1 -2
- package/dist/routes/memories/components/EmptyStates.d.ts.map +1 -1
- package/dist/routes/memories/components/EmptyStates.js +2 -2
- package/dist/routes/memories/components/MemoriesPanel.d.ts +1 -1
- package/dist/routes/memories/components/MemoriesPanel.d.ts.map +1 -1
- package/dist/routes/memories/components/MemoriesPanel.js +9 -9
- package/dist/routes/memories/components/MemoryActions.d.ts +1 -1
- package/dist/routes/memories/components/MemoryActions.d.ts.map +1 -1
- package/dist/routes/memories/components/MemoryActions.js +4 -4
- package/dist/routes/memories/components/MemoryFields.d.ts +1 -1
- package/dist/routes/memories/components/MemoryFields.d.ts.map +1 -1
- package/dist/routes/memories/components/MemoryFields.js +2 -2
- package/dist/routes/memories/components/MemoryFormDialog.d.ts +1 -1
- package/dist/routes/memories/components/MemoryFormDialog.d.ts.map +1 -1
- package/dist/routes/memories/components/MemoryFormDialog.js +2 -2
- package/dist/routes/memories/components/TeamPicker.d.ts +1 -1
- package/dist/routes/memories/components/TeamPicker.d.ts.map +1 -1
- package/dist/routes/memories/components/TeamPicker.js +2 -2
- package/dist/routes/memories/hooks/useMemoryColumns.d.ts +1 -1
- package/dist/routes/memories/hooks/useMemoryColumns.d.ts.map +1 -1
- package/dist/routes/memories/hooks/useMemoryColumns.js +3 -3
- package/dist/routes/memories/index.d.ts.map +1 -1
- package/dist/routes/memories/index.js +21 -21
- package/dist/shacl/shacl-form-types.d.ts +2 -3
- package/dist/shacl/shacl-form-types.d.ts.map +1 -1
- package/dist/shared/graph-derived-queries.d.ts +5 -0
- package/dist/shared/graph-derived-queries.d.ts.map +1 -0
- package/dist/shared/graph-derived-queries.js +28 -0
- package/package.json +8 -10
- package/dist/components/ai-elements/chain-of-thought.d.ts +0 -30
- package/dist/components/ai-elements/chain-of-thought.d.ts.map +0 -1
- package/dist/components/ai-elements/chain-of-thought.js +0 -57
- package/dist/components/context-menu.d.ts +0 -29
- package/dist/components/context-menu.d.ts.map +0 -1
- package/dist/components/context-menu.js +0 -67
- package/dist/components/hover-card.d.ts +0 -6
- package/dist/components/hover-card.d.ts.map +0 -1
- package/dist/components/hover-card.js +0 -15
- package/dist/components/layouts/ChatHistoryItem.d.ts +0 -9
- package/dist/components/layouts/ChatHistoryItem.d.ts.map +0 -1
- package/dist/components/layouts/ChatHistoryItem.js +0 -7
- package/dist/components/layouts/SectionHeader.d.ts +0 -8
- package/dist/components/layouts/SectionHeader.d.ts.map +0 -1
- package/dist/components/layouts/SectionHeader.js +0 -6
- package/dist/components/orbit-site/Block.d.ts +0 -8
- package/dist/components/orbit-site/Block.d.ts.map +0 -1
- package/dist/components/orbit-site/Block.js +0 -7
- package/dist/components/orbit-site/Inset.d.ts +0 -7
- package/dist/components/orbit-site/Inset.d.ts.map +0 -1
- package/dist/components/orbit-site/Inset.js +0 -6
- package/dist/components/orbit-site/Section.d.ts +0 -7
- package/dist/components/orbit-site/Section.d.ts.map +0 -1
- package/dist/components/orbit-site/Section.js +0 -6
- package/dist/components/orbit-site/ThemeSelector.d.ts +0 -3
- package/dist/components/orbit-site/ThemeSelector.d.ts.map +0 -1
- package/dist/components/orbit-site/ThemeSelector.js +0 -42
- package/dist/components/planning/SampleChanges.d.ts +0 -9
- package/dist/components/planning/SampleChanges.d.ts.map +0 -1
- package/dist/components/planning/SampleChanges.js +0 -117
- package/dist/components/tool-invocation-card/index.d.ts +0 -8
- package/dist/components/tool-invocation-card/index.d.ts.map +0 -1
- package/dist/components/tool-invocation-card/index.js +0 -7
- package/dist/lib/schema-fields.d.ts +0 -2
- package/dist/lib/schema-fields.d.ts.map +0 -1
- package/dist/lib/schema-fields.js +0 -3
- package/dist/routes/memories/components/ConflictTimeoutFooter.d.ts +0 -7
- package/dist/routes/memories/components/ConflictTimeoutFooter.d.ts.map +0 -1
- package/dist/routes/memories/components/ConflictTimeoutFooter.js +0 -6
|
@@ -7,7 +7,7 @@ export type MemoryFormDialogProps = {
|
|
|
7
7
|
initial?: GQLMemory;
|
|
8
8
|
onSave: (form: MemoryFormState, supersedesMemoryIris?: string[]) => Promise<void>;
|
|
9
9
|
isSaving: boolean;
|
|
10
|
-
|
|
10
|
+
canManageSharedMemories?: boolean;
|
|
11
11
|
schemas?: GQLMemorySchema[];
|
|
12
12
|
currentUserId?: string;
|
|
13
13
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MemoryFormDialog.d.ts","sourceRoot":"","sources":["../../../../src/routes/memories/components/MemoryFormDialog.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAA6B,KAAK,SAAS,EAAE,KAAK,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAUnH,OAAO,EAA4C,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAuBhG,MAAM,MAAM,qBAAqB,GAAG;IAClC,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,KAAK,EAAE,cAAc,CAAC;IACtB,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,MAAM,EAAE,CAAC,IAAI,EAAE,eAAe,EAAE,oBAAoB,CAAC,EAAE,MAAM,EAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAClF,QAAQ,EAAE,OAAO,CAAC;IAClB,
|
|
1
|
+
{"version":3,"file":"MemoryFormDialog.d.ts","sourceRoot":"","sources":["../../../../src/routes/memories/components/MemoryFormDialog.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAA6B,KAAK,SAAS,EAAE,KAAK,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAUnH,OAAO,EAA4C,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAuBhG,MAAM,MAAM,qBAAqB,GAAG;IAClC,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,KAAK,EAAE,cAAc,CAAC;IACtB,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,MAAM,EAAE,CAAC,IAAI,EAAE,eAAe,EAAE,oBAAoB,CAAC,EAAE,MAAM,EAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAClF,QAAQ,EAAE,OAAO,CAAC;IAClB,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,OAAO,CAAC,EAAE,eAAe,EAAE,CAAC;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAsGF,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,2CAkf5D"}
|
|
@@ -59,7 +59,7 @@ function MemoryDateField(props) {
|
|
|
59
59
|
return (_jsxs("div", { className: "flex flex-col gap-1.5", children: [_jsx("label", { htmlFor: id, className: "typography-small", children: label }), _jsxs("div", { className: "flex items-center gap-2", children: [_jsxs(Popover, { children: [_jsx(PopoverTrigger, { asChild: true, children: _jsxs("button", { type: "button", id: id, "aria-invalid": error ? true : undefined, "aria-describedby": error ? errorId : undefined, className: cn(createSelectClassName({ size: "base" }), "flex-1 min-w-0 gap-2"), children: [_jsx(CalendarIcon, { className: "size-4 shrink-0 text-muted-foreground" }), _jsx("span", { className: cn("flex-1 min-w-0 truncate text-left", !value && "text-placeholder-foreground"), children: selected ? format(selected, "MMM d, yyyy") : placeholder })] }) }), _jsx(PopoverContent, { align: "start", className: "w-auto border-0 bg-transparent p-0 shadow-none", children: _jsx(Calendar, { mode: "single", captionLayout: "dropdown", startMonth: new Date(), endMonth: latest ?? addYears(new Date(), 10), selected: selected, defaultMonth: selected, disabled: latest ? { before: startOfTomorrow(), after: latest } : { before: startOfTomorrow() }, onSelect: (date) => onChange(date ? endOfDay(date).toISOString() : null) }) })] }), value && (_jsxs(Button, { type: "button", variant: "tertiary", size: "base", onClick: () => onChange(null), className: "shrink-0", children: [_jsx(X, { className: "size-3.5" }), "Clear"] }))] }), _jsx("p", { className: "typography-small text-muted-foreground", children: hint }), error && (_jsx("p", { id: errorId, className: "typography-small text-error-foreground", children: error }))] }));
|
|
60
60
|
}
|
|
61
61
|
export function MemoryFormDialog(props) {
|
|
62
|
-
const { open, onOpenChange, scope, initial, onSave, isSaving,
|
|
62
|
+
const { open, onOpenChange, scope, initial, onSave, isSaving, canManageSharedMemories = false, schemas, currentUserId, } = props;
|
|
63
63
|
const isEdit = !!initial;
|
|
64
64
|
const isCompany = scope === GQLMemoryScope.Company;
|
|
65
65
|
const isTeam = scope === GQLMemoryScope.Team;
|
|
@@ -288,7 +288,7 @@ export function MemoryFormDialog(props) {
|
|
|
288
288
|
}));
|
|
289
289
|
}
|
|
290
290
|
return (_jsxs("div", { className: "flex flex-col gap-2 rounded-lg bg-faint p-3", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsxs("label", { htmlFor: hasLargeEnum || (!hasSmallEnum && !isBoolean) ? `prop-${localName}` : undefined, className: "typography-small-medium text-default-foreground flex-1", children: [prop.label, prop.required && _jsx("span", { className: "text-error-foreground ml-1", children: "*" })] }), _jsx("span", { className: "typography-tiny text-muted-foreground bg-card border border-muted-border rounded px-1.5 py-0.5 shrink-0", children: shortDatatype(prop.dataType) })] }), hasSmallEnum ? (_jsx("div", { className: "flex gap-1 flex-wrap", children: prop.allowedValues.map((v) => (_jsx(Button, { type: "button", variant: value === v ? "primary" : "tertiary", size: "sm", rounded: "md", onClick: () => setPropValue(v), children: v }, v))) })) : hasLargeEnum ? (_jsxs(Select, { value: value, onValueChange: setPropValue, children: [_jsx(SelectTrigger, { label: prop.label, id: `prop-${localName}`, hiddenLabel: true, children: _jsx(SelectValue, { placeholder: `Select ${prop.label.toLowerCase()}` }) }), _jsx(SelectContent, { children: prop.allowedValues.map((v) => (_jsx(SelectItem, { value: v, children: v }, v))) })] })) : isBoolean ? (_jsx("div", { className: "flex gap-1", children: ["true", "false"].map((v) => (_jsx(Button, { type: "button", variant: (value || "false") === v ? "primary" : "tertiary", size: "sm", rounded: "md", className: "flex-1", onClick: () => setPropValue(v), children: v === "true" ? "Yes" : "No" }, v))) })) : (_jsx(Input, { id: `prop-${localName}`, type: isNumeric ? "number" : "text", value: value, onChange: (e) => setPropValue(e.target.value), placeholder: `Enter ${prop.label.toLowerCase()}` }))] }, prop.path));
|
|
291
|
-
})) : (_jsxs(MemoryFields, { form: form, errors: errors, isTeam: isTeam,
|
|
291
|
+
})) : (_jsxs(MemoryFields, { form: form, errors: errors, isTeam: isTeam, canManageSharedMemories: canManageSharedMemories, schemas: schemas, onChange: (next) => setForm((prev) => ({ ...prev, ...next })), labelPlaceholder: isEdit ? "e.g. Target ROAS" : "Auto-generated from description", descriptionPlaceholder: getDescriptionPlaceholder(), autoFocus: !isEdit, onEditProperties: hasProperties ? () => setView("properties") : undefined, filledPropertyCount: filledPropertyCount, totalPropertyCount: schemaProperties.length, children: [_jsx(MemoryDateField, { id: "memory-expiry", label: "Valid until", hint: "No longer true after this date, so the agent stops using it. Nothing is deleted. Use it only for a real deadline.", placeholder: "Never expires", value: form.memoryValidUntil, onChange: (memoryValidUntil) => setForm((prev) => ({ ...prev, memoryValidUntil })) }), _jsx(MemoryDateField, { id: "memory-trust-horizon", label: "Trusted until", hint: "Stops pre-loading after this date but stays searchable. Use it for anything that drifts.", placeholder: "Trusted indefinitely", value: form.memoryTrustedUntil, notAfter: form.memoryValidUntil, error: errors.memoryTrustedUntil, onChange: (memoryTrustedUntil) => setForm((prev) => ({ ...prev, memoryTrustedUntil })) })] })) }), _jsx(DialogFooter, { children: view === "conflicts" ? (_jsxs(_Fragment, { children: [_jsx(Button, { variant: "secondary", onClick: handleSaveWithoutSuperseding, className: "sm:mr-auto", disabled: isSaving, children: "Save & keep both" }), _jsx(Button, { onClick: handleConflictConfirmInline, disabled: conflictChecked.size === 0 || isSaving, children: getReplaceLabel() })] })) : view === "properties" ? (_jsx(Button, { onClick: () => setView("main"), children: "Done" })) : showDiscardConfirm ? (_jsxs(_Fragment, { children: [_jsx("p", { className: "typography-small text-muted-foreground mr-auto", children: "Discard unsaved changes?" }), _jsx(Button, { variant: "tertiary", onClick: () => setShowDiscardConfirm(false), children: "Keep editing" }), _jsx(Button, { variant: "destructive", onClick: () => onOpenChange(false), children: "Discard" })] })) : conflictCheckTimedOut && pendingForm ? (_jsxs(_Fragment, { children: [_jsx("p", { className: "typography-small text-muted-foreground mr-auto", children: "Conflict check timed out. Save without checking?" }), _jsx(Button, { variant: "tertiary", onClick: () => {
|
|
292
292
|
setConflictCheckTimedOut(false);
|
|
293
293
|
setPendingForm(null);
|
|
294
294
|
}, disabled: isSaving, children: "Cancel" }), _jsx(Button, { onClick: () => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export type TeamPickerProps = {
|
|
2
2
|
selected: string[];
|
|
3
3
|
onChange: (teams: string[]) => void;
|
|
4
|
-
|
|
4
|
+
canManageSharedMemories: boolean;
|
|
5
5
|
error?: string;
|
|
6
6
|
};
|
|
7
7
|
export declare function TeamPicker(props: TeamPickerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TeamPicker.d.ts","sourceRoot":"","sources":["../../../../src/routes/memories/components/TeamPicker.tsx"],"names":[],"mappings":"AAeA,MAAM,MAAM,eAAe,GAAG;IAC5B,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACpC,
|
|
1
|
+
{"version":3,"file":"TeamPicker.d.ts","sourceRoot":"","sources":["../../../../src/routes/memories/components/TeamPicker.tsx"],"names":[],"mappings":"AAeA,MAAM,MAAM,eAAe,GAAG;IAC5B,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACpC,uBAAuB,EAAE,OAAO,CAAC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAMF,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,2CAoEhD"}
|
|
@@ -9,9 +9,9 @@ function getTeamName(path) {
|
|
|
9
9
|
return path.split("/").filter(Boolean).pop() ?? path;
|
|
10
10
|
}
|
|
11
11
|
export function TeamPicker(props) {
|
|
12
|
-
const { selected, onChange,
|
|
12
|
+
const { selected, onChange, canManageSharedMemories, error } = props;
|
|
13
13
|
const { mantaClient } = useMantaClient();
|
|
14
|
-
const { data } = useAvailableTeamsQuery(mantaClient, undefined, { enabled:
|
|
14
|
+
const { data } = useAvailableTeamsQuery(mantaClient, undefined, { enabled: canManageSharedMemories });
|
|
15
15
|
const availableTeams = data?.availableTeams.teams.map((g) => g.name) ?? [];
|
|
16
16
|
function toggle(path) {
|
|
17
17
|
onChange(selected.includes(path) ? selected.filter((t) => t !== path) : [...selected, path]);
|
|
@@ -18,7 +18,7 @@ export declare const memoryColumnLabels: {
|
|
|
18
18
|
};
|
|
19
19
|
export declare const defaultColumnOrder: string[];
|
|
20
20
|
type UseMemoryColumnsArgs = {
|
|
21
|
-
|
|
21
|
+
canManageSharedMemories?: boolean;
|
|
22
22
|
userId: string;
|
|
23
23
|
schemas?: GQLMemorySchema[];
|
|
24
24
|
onEdit: (memory: GQLMemory) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMemoryColumns.d.ts","sourceRoot":"","sources":["../../../../src/routes/memories/hooks/useMemoryColumns.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,oBAAoB,EAAE,KAAK,SAAS,EAAE,KAAK,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAInG,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AA2BvD,eAAO,MAAM,eAAe;;;;;;;CAOlB,CAAC;AAEX,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,OAAO,eAAe,CAAC,CAAC;AAGpF,eAAO,MAAM,kBAAkB;;;;;;CAMkB,CAAC;AAElD,eAAO,MAAM,kBAAkB,UAW9B,CAAC;AAyBF,KAAK,oBAAoB,GAAG;IAC1B,
|
|
1
|
+
{"version":3,"file":"useMemoryColumns.d.ts","sourceRoot":"","sources":["../../../../src/routes/memories/hooks/useMemoryColumns.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,oBAAoB,EAAE,KAAK,SAAS,EAAE,KAAK,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAInG,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AA2BvD,eAAO,MAAM,eAAe;;;;;;;CAOlB,CAAC;AAEX,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,OAAO,eAAe,CAAC,CAAC;AAGpF,eAAO,MAAM,kBAAkB;;;;;;CAMkB,CAAC;AAElD,eAAO,MAAM,kBAAkB,UAW9B,CAAC;AAyBF,KAAK,oBAAoB,GAAG;IAC1B,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,eAAe,EAAE,CAAC;IAC5B,MAAM,EAAE,CAAC,MAAM,EAAE,SAAS,KAAK,IAAI,CAAC;IACpC,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,SAAS,KAAK,IAAI,CAAC;IACrC,SAAS,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,WAAW,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,UAAU,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,oBAAoB,EAAE,CAAC,CAAC;CAClD,CAAC;AAEF,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,oBAAoB,GAAG,SAAS,CAAC,SAAS,CAAC,EAAE,CA+PnF"}
|
|
@@ -54,7 +54,7 @@ function MaybeTooltip(props) {
|
|
|
54
54
|
return (_jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: children }), _jsx(TooltipContent, { children: tooltip })] }));
|
|
55
55
|
}
|
|
56
56
|
export function useMemoryColumns(args) {
|
|
57
|
-
const {
|
|
57
|
+
const { canManageSharedMemories, userId, schemas, onEdit, onDelete, onMove, onRestore, onReconfirm, duplicates } = args;
|
|
58
58
|
return useMemo(() => {
|
|
59
59
|
const schemaByIri = new Map(schemas?.map((s) => [s.iri, s]) ?? []);
|
|
60
60
|
return [
|
|
@@ -181,8 +181,8 @@ export function useMemoryColumns(args) {
|
|
|
181
181
|
id: memoryColumnIds.actions,
|
|
182
182
|
enableHiding: false,
|
|
183
183
|
enableSorting: false,
|
|
184
|
-
cell: ({ row }) => (_jsx(MemoryActions, { memory: row.original,
|
|
184
|
+
cell: ({ row }) => (_jsx(MemoryActions, { memory: row.original, canManageSharedMemories: canManageSharedMemories, onEdit: onEdit, onDelete: onDelete, onMove: onMove, onRestore: onRestore, onReconfirm: onReconfirm })),
|
|
185
185
|
},
|
|
186
186
|
];
|
|
187
|
-
}, [
|
|
187
|
+
}, [canManageSharedMemories, userId, schemas, onEdit, onDelete, onMove, onRestore, onReconfirm, duplicates]);
|
|
188
188
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/routes/memories/index.tsx"],"names":[],"mappings":"AAuCA,OAAO,EAAkD,WAAW,EAAE,MAAM,yBAAyB,CAAC;AA8FtG,OAAO,EAAE,WAAW,EAAE,CAAC;AACvB,OAAO,EACL,SAAS,EACT,UAAU,EACV,mBAAmB,EACnB,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACrB,KAAK,eAAe,GACrB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,aAAa,EAAE,KAAK,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC7G,OAAO,EACL,cAAc,EACd,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,EACzB,KAAK,YAAY,GAClB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,uBAAuB,EACvB,kBAAkB,EAClB,KAAK,4BAA4B,EACjC,KAAK,uBAAuB,GAC7B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,KAAK,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAC7F,YAAY,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAiCjE,wBAAgB,aAAa,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/routes/memories/index.tsx"],"names":[],"mappings":"AAuCA,OAAO,EAAkD,WAAW,EAAE,MAAM,yBAAyB,CAAC;AA8FtG,OAAO,EAAE,WAAW,EAAE,CAAC;AACvB,OAAO,EACL,SAAS,EACT,UAAU,EACV,mBAAmB,EACnB,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACrB,KAAK,eAAe,GACrB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,aAAa,EAAE,KAAK,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC7G,OAAO,EACL,cAAc,EACd,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,EACzB,KAAK,YAAY,GAClB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,uBAAuB,EACvB,kBAAkB,EAClB,KAAK,4BAA4B,EACjC,KAAK,uBAAuB,GAC7B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,KAAK,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAC7F,YAAY,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAiCjE,wBAAgB,aAAa,4CA4lB5B"}
|
|
@@ -77,7 +77,7 @@ const tabLabels = {
|
|
|
77
77
|
"live-context": "Live Context",
|
|
78
78
|
};
|
|
79
79
|
export function MemoriesRoute() {
|
|
80
|
-
const { datastore, datastores, user, logout, isOperator, canSwitchDatastore } = useAuthContext();
|
|
80
|
+
const { datastore, datastores, user, logout, isOperator, canManageSharedMemories, canSwitchDatastore } = useAuthContext();
|
|
81
81
|
const { mantaClient } = useMantaClient();
|
|
82
82
|
const queryClient = useQueryClient();
|
|
83
83
|
const [showArchived, setShowArchived] = useState(false);
|
|
@@ -104,15 +104,15 @@ export function MemoriesRoute() {
|
|
|
104
104
|
const deleteMutation = useDeleteMemoryMutation(mantaClient);
|
|
105
105
|
const restoreMutation = useRestoreMemoryMutation(mantaClient);
|
|
106
106
|
const reconfirmMutation = useReconfirmMemoryMutation(mantaClient);
|
|
107
|
-
const { data: teamsData } = useAvailableTeamsQuery(mantaClient, undefined, { enabled: !!
|
|
107
|
+
const { data: teamsData } = useAvailableTeamsQuery(mantaClient, undefined, { enabled: !!canManageSharedMemories });
|
|
108
108
|
const hasTeams = isPresent(teamsData?.availableTeams.teams);
|
|
109
109
|
const availableTabs = useMemo(() => [
|
|
110
|
-
...(
|
|
111
|
-
...(
|
|
110
|
+
...(canManageSharedMemories ? ["company"] : []),
|
|
111
|
+
...(canManageSharedMemories && hasTeams ? ["team"] : []),
|
|
112
112
|
"personal",
|
|
113
|
-
...(
|
|
113
|
+
...(canManageSharedMemories ? ["schemas"] : []),
|
|
114
114
|
"live-context",
|
|
115
|
-
], [
|
|
115
|
+
], [canManageSharedMemories, hasTeams]);
|
|
116
116
|
const [searchParams, setSearchParams] = useSearchParams();
|
|
117
117
|
const tabParam = searchParams.get("tab");
|
|
118
118
|
const activeTab = useMemo(() => {
|
|
@@ -203,7 +203,7 @@ export function MemoriesRoute() {
|
|
|
203
203
|
const handleCreate = useCallback(async (form, supersedesMemoryIris) => {
|
|
204
204
|
if (!addDialog)
|
|
205
205
|
return;
|
|
206
|
-
if (!
|
|
206
|
+
if (!canManageSharedMemories && addDialog.scope !== GQLMemoryScope.User)
|
|
207
207
|
return;
|
|
208
208
|
try {
|
|
209
209
|
const result = await createMutation.mutateAsync({
|
|
@@ -219,11 +219,11 @@ export function MemoriesRoute() {
|
|
|
219
219
|
catch (e) {
|
|
220
220
|
reportMutationError(e, "Failed to add memory");
|
|
221
221
|
}
|
|
222
|
-
}, [addDialog, createMutation, invalidate,
|
|
222
|
+
}, [addDialog, createMutation, invalidate, canManageSharedMemories]);
|
|
223
223
|
const handleUpdate = useCallback(async (form, supersedesMemoryIris) => {
|
|
224
224
|
if (!editingMemory)
|
|
225
225
|
return;
|
|
226
|
-
if (!
|
|
226
|
+
if (!canManageSharedMemories && editingMemory.scope !== GQLMemoryScope.User)
|
|
227
227
|
return;
|
|
228
228
|
try {
|
|
229
229
|
const result = await updateMutation.mutateAsync({
|
|
@@ -239,10 +239,10 @@ export function MemoriesRoute() {
|
|
|
239
239
|
catch (e) {
|
|
240
240
|
reportMutationError(e, "Failed to update memory");
|
|
241
241
|
}
|
|
242
|
-
}, [editingMemory, updateMutation, invalidate,
|
|
242
|
+
}, [editingMemory, updateMutation, invalidate, canManageSharedMemories]);
|
|
243
243
|
const handleDelete = useCallback(async (iri) => {
|
|
244
244
|
const target = allMemories.find((m) => m.iri === iri);
|
|
245
|
-
if (!
|
|
245
|
+
if (!canManageSharedMemories && target && target.scope !== GQLMemoryScope.User)
|
|
246
246
|
return;
|
|
247
247
|
try {
|
|
248
248
|
await deleteMutation.mutateAsync({ memoryIri: iri });
|
|
@@ -252,7 +252,7 @@ export function MemoriesRoute() {
|
|
|
252
252
|
catch (e) {
|
|
253
253
|
reportMutationError(e, "Failed to delete memory");
|
|
254
254
|
}
|
|
255
|
-
}, [deleteMutation, invalidate,
|
|
255
|
+
}, [deleteMutation, invalidate, canManageSharedMemories, allMemories]);
|
|
256
256
|
const handleRestore = useCallback(async (iri) => {
|
|
257
257
|
try {
|
|
258
258
|
const result = await restoreMutation.mutateAsync({ memoryIri: iri });
|
|
@@ -308,7 +308,7 @@ export function MemoriesRoute() {
|
|
|
308
308
|
const handleMove = useCallback(async (newScope, newTeams, supersedesMemoryIris) => {
|
|
309
309
|
if (!movingMemory)
|
|
310
310
|
return;
|
|
311
|
-
if (!
|
|
311
|
+
if (!canManageSharedMemories)
|
|
312
312
|
return;
|
|
313
313
|
try {
|
|
314
314
|
const result = await updateMutation.mutateAsync({
|
|
@@ -335,17 +335,17 @@ export function MemoriesRoute() {
|
|
|
335
335
|
catch (e) {
|
|
336
336
|
reportMutationError(e, "Failed to move memory");
|
|
337
337
|
}
|
|
338
|
-
}, [movingMemory, updateMutation, invalidate,
|
|
338
|
+
}, [movingMemory, updateMutation, invalidate, canManageSharedMemories]);
|
|
339
339
|
const { duplicates } = useDuplicateDetection(unreviewedPersonalMemories, {
|
|
340
340
|
enabled: activeTab === "personal",
|
|
341
341
|
});
|
|
342
342
|
const columns = useMemoryColumns({
|
|
343
|
-
|
|
343
|
+
canManageSharedMemories,
|
|
344
344
|
userId: user.id,
|
|
345
345
|
schemas,
|
|
346
346
|
onEdit: setEditingMemory,
|
|
347
347
|
onDelete: handleDelete,
|
|
348
|
-
onMove:
|
|
348
|
+
onMove: canManageSharedMemories ? setMovingMemory : undefined,
|
|
349
349
|
onRestore: handleRestore,
|
|
350
350
|
onReconfirm: handleReconfirm,
|
|
351
351
|
duplicates,
|
|
@@ -371,7 +371,7 @@ export function MemoriesRoute() {
|
|
|
371
371
|
}));
|
|
372
372
|
const tabsList = _jsx(ScopeTabs, { tabs: scopeTabs, activeValue: activeTab, isLoading: isLoading });
|
|
373
373
|
const addMemoryButton = addMemoryButtonConfig(activeTab);
|
|
374
|
-
const canShowArchived = activeTab === "personal" || (
|
|
374
|
+
const canShowArchived = activeTab === "personal" || (canManageSharedMemories && (activeTab === "company" || activeTab === "team"));
|
|
375
375
|
const headerActions = [
|
|
376
376
|
{
|
|
377
377
|
key: "refresh",
|
|
@@ -458,14 +458,14 @@ export function MemoriesRoute() {
|
|
|
458
458
|
return (_jsxs(RouteLayout, { user: user, datastore: datastore, datastores: datastores, isOperator: isOperator, canSwitchDatastore: canSwitchDatastore, logout: logout, children: [_jsx(PageHeader, { title: "Memories", icon: Brain, actions: _jsx(PageHeaderActions, { actions: headerActions }) }), _jsxs(Tabs, { value: activeTab, onValueChange: handleTabChange, className: "flex flex-col flex-1 min-h-0 overflow-hidden", children: [_jsx(ScopeMemoriesTab, { value: "personal", tableState: personalTableState, memories: displayedPersonalMemories, tabs: tabsList, isLoading: isLoading, errorMessage: errorMessage, schemas: schemas, onRowClick: handleRowClick, visibleStatusFilters: [
|
|
459
459
|
...alwaysVisibleStatusFilters,
|
|
460
460
|
"autoCaptured",
|
|
461
|
-
...(
|
|
462
|
-
], emptyState: _jsx(MemoriesEmptyState, {
|
|
461
|
+
...(canManageSharedMemories ? ["promotion"] : []),
|
|
462
|
+
], emptyState: _jsx(MemoriesEmptyState, { onAdd: () => setAddDialog({ scope: GQLMemoryScope.User }) }) }), canManageSharedMemories && (_jsx(ScopeMemoriesTab, { value: "company", tableState: companyTableState, memories: companyMemories, tabs: tabsList, isLoading: isLoading, errorMessage: errorMessage, schemas: schemas, onRowClick: handleRowClick, emptyState: showCompanyOnboarding ? (_jsx("div", { className: "flex items-center justify-center h-full min-h-64 p-5", children: _jsx(MemoryOnboardingWizard, { scope: GQLMemoryScope.Company, onComplete: () => setShowOrgOnboarding(false), onSkip: () => setShowOrgOnboarding(false) }) })) : (_jsx(CompanyMemoriesEmptyState, { onAdd: () => setAddDialog({ scope: GQLMemoryScope.Company }), onSetUp: () => setShowOrgOnboarding(true) })) })), canManageSharedMemories && hasTeams && (_jsx(ScopeMemoriesTab, { value: "team", tableState: teamTableState, memories: teamMemories, tabs: tabsList, isLoading: isLoading, errorMessage: errorMessage, schemas: schemas, onRowClick: handleRowClick, emptyState: _jsx(GroupMemoriesEmptyState, { canManageSharedMemories: true, onAdd: () => setAddDialog({ scope: GQLMemoryScope.Team }) }) })), canManageSharedMemories && (_jsx(FilterableTabContent, { value: "schemas", tabs: tabsList, placeholder: "Filter schemas\u2026", query: schemasQuery, onQueryChange: setSchemasQuery, children: _jsx(SchemasTab, { query: schemasQuery }) })), _jsx(FilterableTabContent, { value: "live-context", tabs: tabsList, placeholder: "Filter live context\u2026", query: liveContextQuery, onQueryChange: setLiveContextQuery, children: _jsx(LiveContextTab, { query: liveContextQuery }) })] }), formDialogState && (_jsx(MemoryFormDialog, { open: true, onOpenChange: (open) => {
|
|
463
463
|
if (!open)
|
|
464
464
|
formDialogState.onClose();
|
|
465
|
-
}, scope: formDialogState.scope, initial: formDialogState.initial, onSave: formDialogState.onSave, isSaving: formDialogState.isSaving,
|
|
465
|
+
}, scope: formDialogState.scope, initial: formDialogState.initial, onSave: formDialogState.onSave, isSaving: formDialogState.isSaving, canManageSharedMemories: canManageSharedMemories, schemas: schemas, currentUserId: user.id })), movingMemory && (_jsx(ChangeScopeDialog, { open: true, onOpenChange: (open) => {
|
|
466
466
|
if (!open)
|
|
467
467
|
setMovingMemory(null);
|
|
468
|
-
}, memory: movingMemory,
|
|
468
|
+
}, memory: movingMemory, canManageSharedMemories: canManageSharedMemories, onSave: handleMove, isSaving: updateMutation.isPending, currentUserId: user.id })), _jsx(RestoreBlockedDialog, { open: restoreBlocked != null, onOpenChange: (open) => {
|
|
469
469
|
if (!open)
|
|
470
470
|
setRestoreBlocked(null);
|
|
471
471
|
}, blockedByLabel: restoreBlocked?.blockedByLabel ?? null, onConfirm: handleConfirmRestoreBlocked }), _jsx(ConsolidationReviewDialog, { open: consolidating, clusters: reviewGroups, isLoading: isFindingRedundancy, isSaving: consolidateMutation.isPending, candidateCount: consolidationCandidates.length, comparedCount: reviewData?.memoryRedundancyReview.comparedCount ?? null, timedOut: reviewData?.memoryRedundancyReview.timedOut ?? false, errorMessage: reviewData?.memoryRedundancyReview.error ?? (reviewError instanceof Error ? reviewError.message : null), onMerge: handleConsolidate, onClose: () => setConsolidating(false) })] }));
|
|
@@ -22,9 +22,8 @@ declare module "@ulb-darmstadt/shacl-form" {
|
|
|
22
22
|
};
|
|
23
23
|
};
|
|
24
24
|
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
getQuads(subject: unknown, predicate: unknown, object: unknown, graph: unknown): ShaclFormQuad[];
|
|
25
|
+
interface ShaclFormStore extends Iterable<ShaclFormQuad> {
|
|
26
|
+
readonly size: number;
|
|
28
27
|
}
|
|
29
28
|
interface ShaclFormElement extends HTMLElement {
|
|
30
29
|
serialize(format?: SerializationFormat, graph?: ShaclFormStore): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shacl-form-types.d.ts","sourceRoot":"","sources":["../../src/shacl/shacl-form-types.ts"],"names":[],"mappings":"AAEA,OAAO,OAAO,CAAC;AAEf,OAAO,QAAQ,2BAA2B,CAAC;IACzC,KAAY,mBAAmB,GAC3B,aAAa,GACb,qBAAqB,GACrB,uBAAuB,GACvB,qBAAqB,CAAC;IAE1B,uFAAuF;IACvF,UAAiB,yBAAyB;QACxC,QAAQ,EAAE,OAAO,CAAC;QAClB,OAAO,EAAE,OAAO,EAAE,CAAC;KACpB;IAED,UAAiB,aAAa;QAC5B,OAAO,EAAE;YAAE,KAAK,EAAE,MAAM,CAAC;YAAC,QAAQ,EAAE,MAAM,CAAA;SAAE,CAAC;QAC7C,SAAS,EAAE;YAAE,KAAK,EAAE,MAAM,CAAA;SAAE,CAAC;QAC7B,MAAM,EAAE;YAAE,KAAK,EAAE,MAAM,CAAC;YAAC,QAAQ,EAAE,MAAM,CAAC;YAAC,QAAQ,CAAC,EAAE;gBAAE,KAAK,EAAE,MAAM,CAAA;aAAE,CAAA;SAAE,CAAC;KAC3E;
|
|
1
|
+
{"version":3,"file":"shacl-form-types.d.ts","sourceRoot":"","sources":["../../src/shacl/shacl-form-types.ts"],"names":[],"mappings":"AAEA,OAAO,OAAO,CAAC;AAEf,OAAO,QAAQ,2BAA2B,CAAC;IACzC,KAAY,mBAAmB,GAC3B,aAAa,GACb,qBAAqB,GACrB,uBAAuB,GACvB,qBAAqB,CAAC;IAE1B,uFAAuF;IACvF,UAAiB,yBAAyB;QACxC,QAAQ,EAAE,OAAO,CAAC;QAClB,OAAO,EAAE,OAAO,EAAE,CAAC;KACpB;IAED,UAAiB,aAAa;QAC5B,OAAO,EAAE;YAAE,KAAK,EAAE,MAAM,CAAC;YAAC,QAAQ,EAAE,MAAM,CAAA;SAAE,CAAC;QAC7C,SAAS,EAAE;YAAE,KAAK,EAAE,MAAM,CAAA;SAAE,CAAC;QAC7B,MAAM,EAAE;YAAE,KAAK,EAAE,MAAM,CAAC;YAAC,QAAQ,EAAE,MAAM,CAAC;YAAC,QAAQ,CAAC,EAAE;gBAAE,KAAK,EAAE,MAAM,CAAA;aAAE,CAAA;SAAE,CAAC;KAC3E;IAGD,UAAiB,cAAe,SAAQ,QAAQ,CAAC,aAAa,CAAC;QAC7D,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;KACvB;IAED,UAAiB,gBAAiB,SAAQ,WAAW;QACnD,SAAS,CAAC,MAAM,CAAC,EAAE,mBAAmB,EAAE,KAAK,CAAC,EAAE,cAAc,GAAG,MAAM,CAAC;QACxE,KAAK,CAAC,KAAK,CAAC,EAAE,cAAc,GAAG,cAAc,CAAC;QAC9C,QAAQ,CAAC,iBAAiB,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAAC;KAC3E;IAED,UAAiB,oBAAqB,SAAQ,WAAW;QACvD,MAAM,EAAE;YACN,KAAK,EAAE,OAAO,CAAC;YACf,MAAM,CAAC,EAAE,yBAAyB,CAAC;SACpC,CAAC;KACH;CACF;AAED,OAAO,QAAQ,OAAO,CAAC;IAErB,UAAU,GAAG,CAAC;QACZ,UAAU,iBAAiB;YACzB,YAAY,EAAE,OAAO,OAAO,EAAE,iBAAiB,CAC7C,OAAO,OAAO,EAAE,cAAc,CAAC,WAAW,CAAC,GAAG;gBAC5C,oBAAoB,CAAC,EAAE,MAAM,CAAC;gBAC9B,aAAa,CAAC,EAAE,MAAM,CAAC;gBACvB,aAAa,CAAC,EAAE,MAAM,CAAC;gBACvB,qBAAqB,CAAC,EAAE,MAAM,CAAC;gBAC/B,eAAe,CAAC,EAAE,MAAM,CAAC;gBACzB,WAAW,CAAC,EAAE,MAAM,CAAC;gBACrB,eAAe,CAAC,EAAE,MAAM,CAAC;gBACzB,oBAAoB,CAAC,EAAE,MAAM,CAAC;aAC/B,EACD,WAAW,CACZ,CAAC;SACH;KACF;CACF"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { QueryClient } from "@tanstack/react-query";
|
|
2
|
+
import { type QueryWithGetKey } from "#lib/tanstack-query";
|
|
3
|
+
export declare const graphDerivedQueries: QueryWithGetKey[];
|
|
4
|
+
export declare function invalidateGraphDerivedQueries(queryClient: QueryClient): Promise<void>;
|
|
5
|
+
//# sourceMappingURL=graph-derived-queries.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graph-derived-queries.d.ts","sourceRoot":"","sources":["../../src/shared/graph-derived-queries.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAqB,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAG9E,eAAO,MAAM,mBAAmB,EAAE,eAAe,EAqBhD,CAAC;AAEF,wBAAsB,6BAA6B,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAE3F"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { useActionPlanByIriQuery, useActionPlanDiffQuery, useActionPlanRulesQuery, useActionPlanRunHistoryQuery, useActionPlanSamplesQuery, useActionPlansQuery, useConversationStartersQuery, useCoverageRulesQuery, useCurrentFactValueQuery, useExplainRdFoxFactQuery, useGetActionPlansSummaryQuery, useMemoriesQuery, useMemorySchemasQuery, useNodePropertiesQuery, useNodeRelationshipsQuery, useRulesQuery, useShaclShapesQuery, useSparqlQueryQuery, useUserPreferencesQuery, useValidateActionPlanQuery, } from "@manta-eu/client";
|
|
2
|
+
import { invalidateQueries } from "#lib/tanstack-query";
|
|
3
|
+
// Queries whose resolver reads the active datastore's knowledge graph, so any graph write can change them.
|
|
4
|
+
export const graphDerivedQueries = [
|
|
5
|
+
useActionPlanByIriQuery,
|
|
6
|
+
useActionPlanDiffQuery,
|
|
7
|
+
useActionPlanRulesQuery,
|
|
8
|
+
useActionPlanRunHistoryQuery,
|
|
9
|
+
useActionPlanSamplesQuery,
|
|
10
|
+
useActionPlansQuery,
|
|
11
|
+
useConversationStartersQuery,
|
|
12
|
+
useCoverageRulesQuery,
|
|
13
|
+
useCurrentFactValueQuery,
|
|
14
|
+
useExplainRdFoxFactQuery,
|
|
15
|
+
useGetActionPlansSummaryQuery,
|
|
16
|
+
useMemoriesQuery,
|
|
17
|
+
useMemorySchemasQuery,
|
|
18
|
+
useNodePropertiesQuery,
|
|
19
|
+
useNodeRelationshipsQuery,
|
|
20
|
+
useRulesQuery,
|
|
21
|
+
useShaclShapesQuery,
|
|
22
|
+
useSparqlQueryQuery,
|
|
23
|
+
useUserPreferencesQuery,
|
|
24
|
+
useValidateActionPlanQuery,
|
|
25
|
+
];
|
|
26
|
+
export async function invalidateGraphDerivedQueries(queryClient) {
|
|
27
|
+
await invalidateQueries(queryClient, [...graphDerivedQueries, ["ldo-ui"], ["rule-sample-facts"]]);
|
|
28
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@manta-eu/react",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"description": "The Manta design system, knowledge-graph UI and agent components",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -1022,10 +1022,8 @@
|
|
|
1022
1022
|
"@radix-ui/react-avatar": "^1.2.6",
|
|
1023
1023
|
"@radix-ui/react-checkbox": "^1.3.11",
|
|
1024
1024
|
"@radix-ui/react-collapsible": "^1.1.20",
|
|
1025
|
-
"@radix-ui/react-context-menu": "^2.3.7",
|
|
1026
1025
|
"@radix-ui/react-dialog": "^1.1.23",
|
|
1027
1026
|
"@radix-ui/react-dropdown-menu": "^2.1.24",
|
|
1028
|
-
"@radix-ui/react-hover-card": "^1.1.23",
|
|
1029
1027
|
"@radix-ui/react-label": "^2.1.15",
|
|
1030
1028
|
"@radix-ui/react-popover": "^1.1.23",
|
|
1031
1029
|
"@radix-ui/react-progress": "^1.1.16",
|
|
@@ -1038,7 +1036,6 @@
|
|
|
1038
1036
|
"@radix-ui/react-switch": "^1.3.7",
|
|
1039
1037
|
"@radix-ui/react-tabs": "^1.1.21",
|
|
1040
1038
|
"@radix-ui/react-tooltip": "^1.2.16",
|
|
1041
|
-
"@radix-ui/react-use-controllable-state": "^1.2.6",
|
|
1042
1039
|
"@streamdown/code": "^1.1.1",
|
|
1043
1040
|
"@streamdown/math": "^1.0.2",
|
|
1044
1041
|
"@streamdown/mermaid": "^1.0.2",
|
|
@@ -1060,7 +1057,7 @@
|
|
|
1060
1057
|
"hono": "^4.9.8",
|
|
1061
1058
|
"input-otp": "^1.4.2",
|
|
1062
1059
|
"js-cookie": "^3.0.5",
|
|
1063
|
-
"ldkit": "^2.
|
|
1060
|
+
"ldkit": "^2.9.0",
|
|
1064
1061
|
"libphonenumber-js": "^1.11.15",
|
|
1065
1062
|
"lucide-react": "^1.17.0",
|
|
1066
1063
|
"mime": "^4.1.0",
|
|
@@ -1085,11 +1082,12 @@
|
|
|
1085
1082
|
"usehooks-ts": "^3.1.1",
|
|
1086
1083
|
"zod": "^4.5.0",
|
|
1087
1084
|
"zustand": "^5.0.2",
|
|
1088
|
-
"@manta-eu/
|
|
1089
|
-
"@manta-eu/ldo": "0.1.
|
|
1090
|
-
"@manta-eu/
|
|
1091
|
-
"@manta-eu/
|
|
1092
|
-
"@manta-eu/
|
|
1085
|
+
"@manta-eu/auth": "0.1.6",
|
|
1086
|
+
"@manta-eu/ldo": "0.1.6",
|
|
1087
|
+
"@manta-eu/datalog-parser": "0.1.6",
|
|
1088
|
+
"@manta-eu/lib": "0.1.6",
|
|
1089
|
+
"@manta-eu/client": "0.1.6",
|
|
1090
|
+
"@manta-eu/rdf-lib": "0.1.6"
|
|
1093
1091
|
},
|
|
1094
1092
|
"peerDependencies": {
|
|
1095
1093
|
"@ulb-darmstadt/shacl-form": "^2.1.1-rc1",
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { type LucideIcon } from "lucide-react";
|
|
2
|
-
import type { ComponentProps, ReactNode } from "react";
|
|
3
|
-
import { Badge } from "#components/badge/index";
|
|
4
|
-
import { CollapsibleContent, CollapsibleTrigger } from "#components/collapsible/index";
|
|
5
|
-
export type ChainOfThoughtProps = ComponentProps<"div"> & {
|
|
6
|
-
open?: boolean;
|
|
7
|
-
defaultOpen?: boolean;
|
|
8
|
-
onOpenChange?: (open: boolean) => void;
|
|
9
|
-
};
|
|
10
|
-
export declare function ChainOfThought(props: ChainOfThoughtProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
-
export type ChainOfThoughtHeaderProps = ComponentProps<typeof CollapsibleTrigger>;
|
|
12
|
-
export declare function ChainOfThoughtHeader(props: ChainOfThoughtHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
-
export type ChainOfThoughtStepProps = ComponentProps<"li"> & {
|
|
14
|
-
icon?: LucideIcon;
|
|
15
|
-
label: ReactNode;
|
|
16
|
-
description?: ReactNode;
|
|
17
|
-
status?: "complete" | "active" | "pending";
|
|
18
|
-
};
|
|
19
|
-
export declare function ChainOfThoughtStep(props: ChainOfThoughtStepProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
-
export type ChainOfThoughtSearchResultsProps = ComponentProps<"div">;
|
|
21
|
-
export declare function ChainOfThoughtSearchResults(props: ChainOfThoughtSearchResultsProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
-
export type ChainOfThoughtSearchResultProps = ComponentProps<typeof Badge>;
|
|
23
|
-
export declare function ChainOfThoughtSearchResult(props: ChainOfThoughtSearchResultProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
-
export type ChainOfThoughtContentProps = ComponentProps<typeof CollapsibleContent>;
|
|
25
|
-
export declare function ChainOfThoughtContent(props: ChainOfThoughtContentProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
-
export type ChainOfThoughtImageProps = ComponentProps<"div"> & {
|
|
27
|
-
caption?: string;
|
|
28
|
-
};
|
|
29
|
-
export declare function ChainOfThoughtImage(props: ChainOfThoughtImageProps): import("react/jsx-runtime").JSX.Element;
|
|
30
|
-
//# sourceMappingURL=chain-of-thought.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"chain-of-thought.d.ts","sourceRoot":"","sources":["../../../src/components/ai-elements/chain-of-thought.tsx"],"names":[],"mappings":"AAGA,OAAO,EAA8B,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAC3E,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvD,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAChD,OAAO,EAAe,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAmBpG,MAAM,MAAM,mBAAmB,GAAG,cAAc,CAAC,KAAK,CAAC,GAAG;IACxD,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CACxC,CAAC;AAEF,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,2CAkBxD;AAED,MAAM,MAAM,yBAAyB,GAAG,cAAc,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAElF,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,yBAAyB,2CAoBpE;AAED,MAAM,MAAM,uBAAuB,GAAG,cAAc,CAAC,IAAI,CAAC,GAAG;IAC3D,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,KAAK,EAAE,SAAS,CAAC;IACjB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,MAAM,CAAC,EAAE,UAAU,GAAG,QAAQ,GAAG,SAAS,CAAC;CAC5C,CAAC;AAEF,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,uBAAuB,2CA8BhE;AAED,MAAM,MAAM,gCAAgC,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;AAErE,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,gCAAgC,2CAIlF;AAED,MAAM,MAAM,+BAA+B,GAAG,cAAc,CAAC,OAAO,KAAK,CAAC,CAAC;AAE3E,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,+BAA+B,2CAQhF;AAED,MAAM,MAAM,0BAA0B,GAAG,cAAc,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAEnF,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,0BAA0B,2CAoBtE;AAED,MAAM,MAAM,wBAAwB,GAAG,cAAc,CAAC,KAAK,CAAC,GAAG;IAC7D,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,wBAAwB,2CAWlE"}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { useControllableState } from "@radix-ui/react-use-controllable-state";
|
|
4
|
-
import { Brain, ChevronDown, Circle } from "lucide-react";
|
|
5
|
-
import { createContext, use, useMemo } from "react";
|
|
6
|
-
import { Badge } from "#components/badge/index";
|
|
7
|
-
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "#components/collapsible/index";
|
|
8
|
-
import { cn } from "#lib/utils";
|
|
9
|
-
const ChainOfThoughtContext = createContext(null);
|
|
10
|
-
function useChainOfThought() {
|
|
11
|
-
const context = use(ChainOfThoughtContext);
|
|
12
|
-
if (!context) {
|
|
13
|
-
throw new Error("ChainOfThought components must be used within ChainOfThought");
|
|
14
|
-
}
|
|
15
|
-
return context;
|
|
16
|
-
}
|
|
17
|
-
export function ChainOfThought(props) {
|
|
18
|
-
const { className, open, defaultOpen = true, onOpenChange, children, ...restProps } = props;
|
|
19
|
-
const [isOpen, setIsOpen] = useControllableState({
|
|
20
|
-
prop: open,
|
|
21
|
-
defaultProp: defaultOpen,
|
|
22
|
-
onChange: onOpenChange,
|
|
23
|
-
});
|
|
24
|
-
const chainOfThoughtContext = useMemo(() => ({ isOpen, setIsOpen }), [isOpen, setIsOpen]);
|
|
25
|
-
return (_jsx(ChainOfThoughtContext.Provider, { value: chainOfThoughtContext, children: _jsx("div", { className: cn("not-prose max-w-prose space-y-4", className), ...restProps, children: children }) }));
|
|
26
|
-
}
|
|
27
|
-
export function ChainOfThoughtHeader(props) {
|
|
28
|
-
const { className, children, ...restProps } = props;
|
|
29
|
-
const { isOpen, setIsOpen } = useChainOfThought();
|
|
30
|
-
return (_jsx(Collapsible, { onOpenChange: setIsOpen, open: isOpen, children: _jsxs(CollapsibleTrigger, { className: cn("flex w-full items-center gap-2 text-muted-foreground typography-small transition-colors hover:text-default-foreground", className), ...restProps, children: [_jsx(Brain, { className: "size-4" }), _jsx("span", { className: "flex-1 text-left", children: children ?? "Chain of Thought" }), _jsx(ChevronDown, { className: cn("size-4 transition-transform", isOpen ? "rotate-180" : "rotate-0") })] }) }));
|
|
31
|
-
}
|
|
32
|
-
export function ChainOfThoughtStep(props) {
|
|
33
|
-
const { className, icon: IconComponent = Circle, label, description, status = "complete", children, ...restProps } = props;
|
|
34
|
-
const statusStyles = {
|
|
35
|
-
complete: "text-muted-foreground",
|
|
36
|
-
active: "text-default-foreground",
|
|
37
|
-
pending: "text-muted-foreground",
|
|
38
|
-
};
|
|
39
|
-
return (_jsxs("li", { className: cn("flex flex-row gap-1 group", className, statusStyles[status]), ...restProps, children: [_jsxs("div", { className: "relative mt-0.5", children: [_jsx(IconComponent, { className: "size-4 opacity-60 group-hover:opacity-100 mr-2", strokeWidth: 0.5 }), _jsx("div", { className: "-mx-px absolute top-7 bottom-0 left-1/2 w-px bg-muted-border" })] }), _jsxs("div", { className: "flex-1 space-y-2", children: [_jsx("div", { children: label }), description && _jsx("div", { className: "text-muted-foreground typography-tiny", children: description }), children] })] }));
|
|
40
|
-
}
|
|
41
|
-
export function ChainOfThoughtSearchResults(props) {
|
|
42
|
-
const { className, ...restProps } = props;
|
|
43
|
-
return _jsx("div", { className: cn("flex items-center gap-2", className), ...restProps });
|
|
44
|
-
}
|
|
45
|
-
export function ChainOfThoughtSearchResult(props) {
|
|
46
|
-
const { className, children, ...restProps } = props;
|
|
47
|
-
return (_jsx(Badge, { className: cn("gap-1 px-2 py-0.5 typography-tiny", className), variant: "secondary", ...restProps, children: children }));
|
|
48
|
-
}
|
|
49
|
-
export function ChainOfThoughtContent(props) {
|
|
50
|
-
const { className, children, ...restProps } = props;
|
|
51
|
-
const { isOpen } = useChainOfThought();
|
|
52
|
-
return (_jsx(Collapsible, { open: isOpen, children: _jsx(CollapsibleContent, { className: cn("mt-2 space-y-3", "data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2", "data-[state=open]:slide-in-from-top-2 text-default-foreground outline-none", "data-[state=closed]:animate-out data-[state=open]:animate-in", className), ...restProps, children: children }) }));
|
|
53
|
-
}
|
|
54
|
-
export function ChainOfThoughtImage(props) {
|
|
55
|
-
const { className, children, caption, ...restProps } = props;
|
|
56
|
-
return (_jsxs("div", { className: cn("mt-2 space-y-2", className), ...restProps, children: [_jsx("div", { className: "relative flex max-h-[22rem] items-center justify-center overflow-hidden rounded-lg bg-muted p-3", children: children }), caption && _jsx("p", { className: "text-muted-foreground typography-tiny", children: caption })] }));
|
|
57
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { Root, Trigger, Group, Portal, Sub, RadioGroup, SubTrigger, Item, CheckboxItem, Label, Separator, RadioItem } from "@radix-ui/react-context-menu";
|
|
2
|
-
import type { ComponentProps } from "react";
|
|
3
|
-
export declare function ContextMenu(props: ComponentProps<typeof Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
-
export declare function ContextMenuTrigger(props: ComponentProps<typeof Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
export declare function ContextMenuGroup(props: ComponentProps<typeof Group>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
-
export declare function ContextMenuPortal(props: ComponentProps<typeof Portal>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
export declare function ContextMenuSub(props: ComponentProps<typeof Sub>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
export declare function ContextMenuRadioGroup(props: ComponentProps<typeof RadioGroup>): import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
type ContextMenuSubTriggerProps = ComponentProps<typeof SubTrigger> & {
|
|
10
|
-
inset?: boolean;
|
|
11
|
-
};
|
|
12
|
-
export declare function ContextMenuSubTrigger(props: ContextMenuSubTriggerProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
-
export declare const ContextMenuSubContent: import("react").ForwardRefExoticComponent<Omit<import("@radix-ui/react-context-menu").ContextMenuSubContentProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
14
|
-
export declare const ContextMenuContent: import("react").ForwardRefExoticComponent<Omit<import("@radix-ui/react-context-menu").ContextMenuContentProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
15
|
-
type ContextMenuItemProps = ComponentProps<typeof Item> & {
|
|
16
|
-
inset?: boolean;
|
|
17
|
-
variant?: "default" | "destructive";
|
|
18
|
-
};
|
|
19
|
-
export declare function ContextMenuItem(props: ContextMenuItemProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
-
export declare function ContextMenuCheckboxItem(props: ComponentProps<typeof CheckboxItem>): import("react/jsx-runtime").JSX.Element;
|
|
21
|
-
export declare function ContextMenuRadioItem(props: ComponentProps<typeof RadioItem>): import("react/jsx-runtime").JSX.Element;
|
|
22
|
-
type ContextMenuLabelProps = ComponentProps<typeof Label> & {
|
|
23
|
-
inset?: boolean;
|
|
24
|
-
};
|
|
25
|
-
export declare function ContextMenuLabel(props: ContextMenuLabelProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
-
export declare function ContextMenuSeparator(props: ComponentProps<typeof Separator>): import("react/jsx-runtime").JSX.Element;
|
|
27
|
-
export declare function ContextMenuShortcut(props: ComponentProps<"span">): import("react/jsx-runtime").JSX.Element;
|
|
28
|
-
export {};
|
|
29
|
-
//# sourceMappingURL=context-menu.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"context-menu.d.ts","sourceRoot":"","sources":["../../src/components/context-menu.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,IAAI,EACJ,OAAO,EACP,KAAK,EACL,MAAM,EACN,GAAG,EACH,UAAU,EACV,UAAU,EAGV,IAAI,EACJ,YAAY,EACZ,KAAK,EACL,SAAS,EAET,SAAS,EACV,MAAM,8BAA8B,CAAC;AAEtC,OAAO,KAAK,EAAE,cAAc,EAAgB,MAAM,OAAO,CAAC;AAI1D,wBAAgB,WAAW,CAAC,KAAK,EAAE,cAAc,CAAC,OAAO,IAAI,CAAC,2CAkB7D;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,cAAc,CAAC,OAAO,OAAO,CAAC,2CAGvE;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,cAAc,CAAC,OAAO,KAAK,CAAC,2CAEnE;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,cAAc,CAAC,OAAO,MAAM,CAAC,2CAErE;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,cAAc,CAAC,OAAO,GAAG,CAAC,2CAE/D;AAED,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,cAAc,CAAC,OAAO,UAAU,CAAC,2CAE7E;AAED,KAAK,0BAA0B,GAAG,cAAc,CAAC,OAAO,UAAU,CAAC,GAAG;IACpE,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,0BAA0B,2CAuBtE;AAED,eAAO,MAAM,qBAAqB,2NAqBjC,CAAC;AAEF,eAAO,MAAM,kBAAkB,wNAwB9B,CAAC;AAEF,KAAK,oBAAoB,GAAG,cAAc,CAAC,OAAO,IAAI,CAAC,GAAG;IACxD,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,OAAO,CAAC,EAAE,SAAS,GAAG,aAAa,CAAC;CACrC,CAAC;AAEF,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,2CAwB1D;AAED,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,cAAc,CAAC,OAAO,YAAY,CAAC,2CAyBjF;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,cAAc,CAAC,OAAO,SAAS,CAAC,2CAwB3E;AAED,KAAK,qBAAqB,GAAG,cAAc,CAAC,OAAO,KAAK,CAAC,GAAG;IAC1D,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,2CAW5D;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,cAAc,CAAC,OAAO,SAAS,CAAC,2CAS3E;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,cAAc,CAAC,MAAM,CAAC,2CAShE"}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { Root, Trigger, Group, Portal, Sub, RadioGroup, SubTrigger, Content, SubContent, Item, CheckboxItem, Label, Separator, ItemIndicator, RadioItem, } from "@radix-ui/react-context-menu";
|
|
4
|
-
import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react";
|
|
5
|
-
import { forwardRef, useState } from "react";
|
|
6
|
-
import { cn } from "../lib/utils.js";
|
|
7
|
-
export function ContextMenu(props) {
|
|
8
|
-
const [menuKey, setMenuKey] = useState(0);
|
|
9
|
-
return (_jsx(Root, { "data-slot": "context-menu", onOpenChange: (open) => {
|
|
10
|
-
// Call original onOpenChange if provided
|
|
11
|
-
props.onOpenChange?.(open);
|
|
12
|
-
// When menu closes, prepare for next repositioning
|
|
13
|
-
if (!open) {
|
|
14
|
-
setMenuKey((prev) => prev + 1);
|
|
15
|
-
}
|
|
16
|
-
}, ...props }, menuKey));
|
|
17
|
-
}
|
|
18
|
-
export function ContextMenuTrigger(props) {
|
|
19
|
-
const { className, ...rest } = props;
|
|
20
|
-
return _jsx(Trigger, { className: cn("touch-manipulation", className), "data-slot": "context-menu-trigger", ...rest });
|
|
21
|
-
}
|
|
22
|
-
export function ContextMenuGroup(props) {
|
|
23
|
-
return _jsx(Group, { "data-slot": "context-menu-group", ...props });
|
|
24
|
-
}
|
|
25
|
-
export function ContextMenuPortal(props) {
|
|
26
|
-
return _jsx(Portal, { "data-slot": "context-menu-portal", ...props });
|
|
27
|
-
}
|
|
28
|
-
export function ContextMenuSub(props) {
|
|
29
|
-
return _jsx(Sub, { "data-slot": "context-menu-sub", ...props });
|
|
30
|
-
}
|
|
31
|
-
export function ContextMenuRadioGroup(props) {
|
|
32
|
-
return _jsx(RadioGroup, { "data-slot": "context-menu-radio-group", ...props });
|
|
33
|
-
}
|
|
34
|
-
export function ContextMenuSubTrigger(props) {
|
|
35
|
-
const { className, inset, children, ...otherProps } = props;
|
|
36
|
-
return (_jsxs(SubTrigger, { className: cn("flex cursor-default touch-manipulation select-none items-center", "rounded-radius px-2 py-1.5 typography-small outline-hidden", "focus:bg-accent focus:text-accent-foreground", "data-[state=open]:bg-accent data-inset:pl-8 data-[state=open]:text-accent-foreground", "[&_svg:not([class*='size-'])]:size-4", "[&_svg:not([class*='text-'])]:text-muted-foreground", "[&_svg]:pointer-events-none [&_svg]:shrink-0", className), "data-inset": inset, "data-slot": "context-menu-sub-trigger", ...otherProps, children: [children, _jsx(ChevronRightIcon, { "aria-hidden": "true", className: "ml-auto" })] }));
|
|
37
|
-
}
|
|
38
|
-
export const ContextMenuSubContent = forwardRef(function ContextMenuSubContent({ className, ...props }, ref) {
|
|
39
|
-
return (_jsx(SubContent, { className: cn("data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", "data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95", "data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2", "data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", "z-50 min-w-32 touch-manipulation overflow-hidden", "origin-(--radix-context-menu-content-transform-origin)", "rounded-radius border bg-card p-1 text-default-foreground shadow-lg", "data-[state=closed]:animate-out data-[state=open]:animate-in motion-reduce:animate-none", className), "data-slot": "context-menu-sub-content", ref: ref, ...props }));
|
|
40
|
-
});
|
|
41
|
-
export const ContextMenuContent = forwardRef(function ContextMenuContent({ className, ...props }, ref) {
|
|
42
|
-
return (_jsx(Portal, { children: _jsx(Content, { className: cn("data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", "data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95", "data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2", "data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", "z-50 min-w-32 touch-manipulation overflow-y-auto overflow-x-hidden", "max-h-(--radix-context-menu-content-available-height)", "origin-(--radix-context-menu-content-transform-origin)", "overscroll-contain rounded-radius border bg-card p-1 text-default-foreground shadow-md", "data-[state=closed]:animate-out data-[state=open]:animate-in motion-reduce:animate-none", className), "data-slot": "context-menu-content", ref: ref, ...props }) }));
|
|
43
|
-
});
|
|
44
|
-
export function ContextMenuItem(props) {
|
|
45
|
-
const { className, inset, variant = "default", ...otherProps } = props;
|
|
46
|
-
return (_jsx(Item, { "aria-disabled": otherProps.disabled ? true : undefined, className: cn("relative flex cursor-default touch-manipulation select-none items-center gap-2", "rounded-radius px-2 py-1.5 typography-small outline-hidden", "focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-inset:pl-8", "data-[variant=destructive]:text-error-foreground data-disabled:opacity-50", "data-[variant=destructive]:focus:bg-error data-[variant=destructive]:focus:text-error-foreground", "[&_svg:not([class*='size-'])]:size-4", "[&_svg:not([class*='text-'])]:text-muted-foreground", "[&_svg]:pointer-events-none [&_svg]:shrink-0", "data-[variant=destructive]:*:[svg]:text-error-foreground!", className), "data-inset": inset, "data-slot": "context-menu-item", "data-variant": variant, ...otherProps }));
|
|
47
|
-
}
|
|
48
|
-
export function ContextMenuCheckboxItem(props) {
|
|
49
|
-
const { className, children, checked, ...otherProps } = props;
|
|
50
|
-
return (_jsxs(CheckboxItem, { "aria-disabled": otherProps.disabled ? true : undefined, checked: checked, className: cn("relative flex cursor-default touch-manipulation select-none items-center gap-2", "rounded-radius py-1.5 pr-2 pl-8 typography-small outline-hidden focus:bg-accent focus:text-accent-foreground", "data-disabled:pointer-events-none data-disabled:opacity-50", "[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0", className), "data-slot": "context-menu-checkbox-item", ...otherProps, children: [_jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: _jsx(ItemIndicator, { children: _jsx(CheckIcon, { "aria-hidden": "true", className: "size-4" }) }) }), children] }));
|
|
51
|
-
}
|
|
52
|
-
export function ContextMenuRadioItem(props) {
|
|
53
|
-
const { className, children, ...otherProps } = props;
|
|
54
|
-
return (_jsxs(RadioItem, { "aria-disabled": otherProps.disabled ? true : undefined, className: cn("relative flex cursor-default touch-manipulation select-none items-center gap-2", "rounded-radius py-1.5 pr-2 pl-8 typography-small outline-hidden focus:bg-accent focus:text-accent-foreground", "data-disabled:pointer-events-none data-disabled:opacity-50", "[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0", className), "data-slot": "context-menu-radio-item", ...otherProps, children: [_jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: _jsx(ItemIndicator, { children: _jsx(CircleIcon, { "aria-hidden": "true", className: "size-2 fill-current" }) }) }), children] }));
|
|
55
|
-
}
|
|
56
|
-
export function ContextMenuLabel(props) {
|
|
57
|
-
const { className, inset, ...otherProps } = props;
|
|
58
|
-
return (_jsx(Label, { className: cn("px-2 py-1.5 typography-small-medium text-default-foreground data-inset:pl-8", className), "data-inset": inset, "data-slot": "context-menu-label", ...otherProps }));
|
|
59
|
-
}
|
|
60
|
-
export function ContextMenuSeparator(props) {
|
|
61
|
-
const { className, ...otherProps } = props;
|
|
62
|
-
return (_jsx(Separator, { className: cn("-mx-1 my-1 h-px bg-muted-border", className), "data-slot": "context-menu-separator", ...otherProps }));
|
|
63
|
-
}
|
|
64
|
-
export function ContextMenuShortcut(props) {
|
|
65
|
-
const { className, ...otherProps } = props;
|
|
66
|
-
return (_jsx("span", { className: cn("ml-auto typography-tiny text-muted-foreground tracking-widest", className), "data-slot": "context-menu-shortcut", ...otherProps }));
|
|
67
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { Root, Trigger, Content } from "@radix-ui/react-hover-card";
|
|
2
|
-
import type { ComponentProps } from "react";
|
|
3
|
-
export declare function HoverCard(props: ComponentProps<typeof Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
-
export declare function HoverCardTrigger(props: ComponentProps<typeof Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
export declare function HoverCardContent(props: ComponentProps<typeof Content>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
-
//# sourceMappingURL=hover-card.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hover-card.d.ts","sourceRoot":"","sources":["../../src/components/hover-card.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAU,MAAM,4BAA4B,CAAC;AAC5E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAG5C,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,CAAC,OAAO,IAAI,CAAC,2CAE3D;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,cAAc,CAAC,OAAO,OAAO,CAAC,2CAUrE;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,cAAc,CAAC,OAAO,OAAO,CAAC,2CAiBrE"}
|