@manta-eu/react 0.1.5 → 0.1.7
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 +1 -0
- 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.js +13 -3
- package/dist/components/embedded-chat/index.d.ts.map +1 -1
- package/dist/components/embedded-chat/index.js +2 -1
- package/dist/components/layouts/Sidebar.d.ts.map +1 -1
- package/dist/components/layouts/Sidebar.js +15 -2
- package/dist/components/layouts/StatusScreen.d.ts.map +1 -1
- package/dist/components/layouts/StatusScreen.js +3 -1
- 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/components/thinking/manta-swim.d.ts.map +1 -1
- package/dist/components/thinking/manta-swim.js +3 -1
- 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/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-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/useAuth.d.ts +1 -0
- package/dist/hooks/useAuth.d.ts.map +1 -1
- package/dist/hooks/useAuth.js +32 -9
- package/dist/hooks/useValidateActionPlan.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/chat-types.d.ts +2 -0
- package/dist/lib/chat-types.d.ts.map +1 -1
- 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/tool-icons.d.ts.map +1 -1
- package/dist/lib/tool-icons.js +2 -5
- package/dist/providers/ActiveChatProvider.d.ts.map +1 -1
- package/dist/providers/ActiveChatProvider.js +2 -0
- package/dist/providers/AssistantIconProvider.d.ts +11 -0
- package/dist/providers/AssistantIconProvider.d.ts.map +1 -0
- package/dist/providers/AssistantIconProvider.js +10 -0
- 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 +1 -0
- package/dist/providers/index.d.ts.map +1 -1
- package/dist/providers/index.js +1 -0
- package/dist/routes/activity/change-display.js +1 -1
- package/dist/routes/chat/index.d.ts +2 -0
- package/dist/routes/chat/index.d.ts.map +1 -1
- package/dist/routes/chat/index.js +3 -2
- 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/integrations/catalog-shape.d.ts +6 -2
- package/dist/routes/integrations/catalog-shape.d.ts.map +1 -1
- package/dist/routes/integrations/components/AddIntegrationModal.d.ts.map +1 -1
- package/dist/routes/integrations/components/AddIntegrationModal.js +1 -1
- 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 +55 -12
- package/dist/routes/integrations/types.d.ts +25 -4
- package/dist/routes/integrations/types.d.ts.map +1 -1
- package/dist/routes/integrations/types.js +10 -0
- 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 +15 -13
- 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
|
@@ -3,7 +3,7 @@ import type { KeycloakRealm } from "@manta-eu/client/shared/constants";
|
|
|
3
3
|
import type { HexColor } from "@manta-eu/lib/color";
|
|
4
4
|
import type { ComponentType } from "react";
|
|
5
5
|
import type { ConnectFormProps, InferalConnectFormConfig } from "./components/connect-forms/types.js";
|
|
6
|
-
import type { ConnectionSource, ProviderId, ProviderLogoComponent } from "./types.js";
|
|
6
|
+
import type { ConnectionSource, DataConnectorType, ProviderId, ProviderLogoComponent } from "./types.js";
|
|
7
7
|
export type ConnectionCapability = "provisions-stream";
|
|
8
8
|
export type ConnectionMethodBase = {
|
|
9
9
|
capabilities: readonly ConnectionCapability[];
|
|
@@ -22,7 +22,11 @@ export type OAuthConnectionMethod = ConnectionMethodBase & {
|
|
|
22
22
|
export type GmailConnectionMethod = ConnectionMethodBase & {
|
|
23
23
|
source: "gmail";
|
|
24
24
|
};
|
|
25
|
-
export type
|
|
25
|
+
export type DataConnectionMethod = ConnectionMethodBase & {
|
|
26
|
+
source: "data-connection";
|
|
27
|
+
connectorType: DataConnectorType;
|
|
28
|
+
};
|
|
29
|
+
export type ProviderConnectionMethod = InferalConnectionMethod | OAuthConnectionMethod | GmailConnectionMethod | DataConnectionMethod;
|
|
26
30
|
export type ConnectableConnectionMethod = ProviderConnectionMethod & {
|
|
27
31
|
connectForm: ComponentType<ConnectFormProps>;
|
|
28
32
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"catalog-shape.d.ts","sourceRoot":"","sources":["../../../src/routes/integrations/catalog-shape.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,KAAK,E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
-
{"version":3,"file":"AddIntegrationModal.d.ts","sourceRoot":"","sources":["../../../../src/routes/integrations/components/AddIntegrationModal.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAC1E,OAAO,EAEL,KAAK,oBAAoB,EACzB,KAAK,0BAA0B,EAEhC,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAK7D,MAAM,MAAM,wBAAwB,CAAC,EAAE,SAAS,MAAM,GAAG,UAAU,IAAI;IACrE,OAAO,EAAE,SAAS,0BAA0B,CAAC,EAAE,CAAC,EAAE,CAAC;IACnD,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,iBAAiB,CAAC,EAAE,OAAO,CAAC,EAAE,CAAC,CAAC;IAChC,uBAAuB,CAAC,EAAE,gBAAgB,CAAC;IAC3C,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,kBAAkB,CAAC,EAAE,oBAAoB,CAAC;IAC1C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,SAAS,CAAC;CACzB,CAAC;AAEF,wBAAgB,mBAAmB,CAAC,EAAE,SAAS,MAAM,GAAG,UAAU,EAAE,KAAK,EAAE,wBAAwB,CAAC,EAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"AddIntegrationModal.d.ts","sourceRoot":"","sources":["../../../../src/routes/integrations/components/AddIntegrationModal.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAC1E,OAAO,EAEL,KAAK,oBAAoB,EACzB,KAAK,0BAA0B,EAEhC,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAK7D,MAAM,MAAM,wBAAwB,CAAC,EAAE,SAAS,MAAM,GAAG,UAAU,IAAI;IACrE,OAAO,EAAE,SAAS,0BAA0B,CAAC,EAAE,CAAC,EAAE,CAAC;IACnD,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,iBAAiB,CAAC,EAAE,OAAO,CAAC,EAAE,CAAC,CAAC;IAChC,uBAAuB,CAAC,EAAE,gBAAgB,CAAC;IAC3C,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,kBAAkB,CAAC,EAAE,oBAAoB,CAAC;IAC1C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,SAAS,CAAC;CACzB,CAAC;AAEF,wBAAgB,mBAAmB,CAAC,EAAE,SAAS,MAAM,GAAG,UAAU,EAAE,KAAK,EAAE,wBAAwB,CAAC,EAAE,CAAC,2CAoFtG"}
|
|
@@ -35,7 +35,7 @@ export function AddIntegrationModal(props) {
|
|
|
35
35
|
name: selectedProvider.name,
|
|
36
36
|
brandColor: selectedProvider.brandColor,
|
|
37
37
|
logo: selectedProvider.logo,
|
|
38
|
-
}, inferalConfig: selection.method.source === "inferal" ? selection.method : undefined, onBack: () => {
|
|
38
|
+
}, inferalConfig: selection.method.source === "inferal" ? selection.method : undefined, dataConnectorType: selection.method.source === "data-connection" ? selection.method.connectorType : undefined, onBack: () => {
|
|
39
39
|
setResumeSpent(true);
|
|
40
40
|
setSelection(null);
|
|
41
41
|
}, onChanged: () => onConnected?.(), onDismiss: () => onOpenChange(false), resumedFromOAuth: selectedProviderResumedFromOAuth })) : (_jsx(IntegrationCatalog, { entries: entries, onSelect: setSelection, scrollable: true, requiredCapability: requiredCapability, header: _jsxs(DialogHeader, { children: [_jsx(DialogTitle, { text: title }), _jsx(DialogDescription, { children: description })] }) })) }) }));
|
|
@@ -17,6 +17,7 @@ export type InferalConnectFormConfig = {
|
|
|
17
17
|
export type ConnectFormProps = {
|
|
18
18
|
provider: ProviderPresentation<string>;
|
|
19
19
|
inferalConfig?: InferalConnectFormConfig;
|
|
20
|
+
dataConnectorType?: string;
|
|
20
21
|
onBack: () => void;
|
|
21
22
|
onChanged: () => void;
|
|
22
23
|
onDismiss: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/routes/integrations/components/connect-forms/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAClE,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAEvE,MAAM,MAAM,yBAAyB,GAAG,QAAQ,CAAC;IAC/C,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAC1B,QAAQ,CAAC,EAAE,gBAAgB,CAAC;CAC7B,CAAC,CAAC;AAEH,MAAM,MAAM,wBAAwB,GAAG;IACrC,iBAAiB,CAAC,EAAE,yBAAyB,CAAC;IAC9C,gBAAgB,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,MAAM,CAAC;IACjD,cAAc,EAAE,QAAQ,CAAC,MAAM,CAAC,kBAAkB,EAAE,MAAM,CAAC,CAAC,CAAC;CAC9D,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,EAAE,oBAAoB,CAAC,MAAM,CAAC,CAAC;IACvC,aAAa,CAAC,EAAE,wBAAwB,CAAC;IACzC,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,UAAU,CAAC,MAAM,SAAS,WAAW,IAAI;IACnD,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,CAAC,CAAC,UAAU,CAAC;IACrB,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,CAAC,IAAI,EAAE,aAAa,CAAC,MAAM,CAAC,KAAK,SAAS,CAAC;CACpD,CAAC"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/routes/integrations/components/connect-forms/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAClE,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAEvE,MAAM,MAAM,yBAAyB,GAAG,QAAQ,CAAC;IAC/C,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAC1B,QAAQ,CAAC,EAAE,gBAAgB,CAAC;CAC7B,CAAC,CAAC;AAEH,MAAM,MAAM,wBAAwB,GAAG;IACrC,iBAAiB,CAAC,EAAE,yBAAyB,CAAC;IAC9C,gBAAgB,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,MAAM,CAAC;IACjD,cAAc,EAAE,QAAQ,CAAC,MAAM,CAAC,kBAAkB,EAAE,MAAM,CAAC,CAAC,CAAC;CAC9D,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,EAAE,oBAAoB,CAAC,MAAM,CAAC,CAAC;IACvC,aAAa,CAAC,EAAE,wBAAwB,CAAC;IACzC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,UAAU,CAAC,MAAM,SAAS,WAAW,IAAI;IACnD,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,CAAC,CAAC,UAAU,CAAC;IACrB,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,CAAC,IAAI,EAAE,aAAa,CAAC,MAAM,CAAC,KAAK,SAAS,CAAC;CACpD,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Status } from "./components/StatusChip.js";
|
|
2
|
-
import type { ProviderConnection } from "./types.js";
|
|
2
|
+
import type { OAuthConnection, ProviderConnection } from "./types.js";
|
|
3
3
|
/**
|
|
4
4
|
* The display projection of a `ProviderConnection`. It retains the source only so
|
|
5
5
|
* row-level actions can dispatch correctly; rendering otherwise uses normalized fields.
|
|
@@ -24,5 +24,8 @@ export type ConnectionView = {
|
|
|
24
24
|
syncedLabel?: string;
|
|
25
25
|
namedAccount?: NamedAccount;
|
|
26
26
|
};
|
|
27
|
+
export type GrantFacts = Pick<OAuthConnection, "revokedAt" | "grantExpiresAt">;
|
|
28
|
+
/** The accounts whose grant a person has to renew: revoked, expired, or inside the warning window. */
|
|
29
|
+
export declare function connectionProblems<T extends GrantFacts>(connections: readonly T[]): T[];
|
|
27
30
|
export declare function toConnectionView(connection: ProviderConnection): ConnectionView;
|
|
28
31
|
//# sourceMappingURL=connection-view.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connection-view.d.ts","sourceRoot":"","sources":["../../../src/routes/integrations/connection-view.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"connection-view.d.ts","sourceRoot":"","sources":["../../../src/routes/integrations/connection-view.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,KAAK,EAAsD,eAAe,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAEvH;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,gBAAgB,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;CACpD,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,MAAM,EAAE,kBAAkB,CAAC,MAAM,CAAC,CAAC;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,YAAY,CAAC;CAC7B,CAAC;AA+DF,MAAM,MAAM,UAAU,GAAG,IAAI,CAAC,eAAe,EAAE,WAAW,GAAG,gBAAgB,CAAC,CAAC;AAY/E,sGAAsG;AACtG,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,UAAU,EAAE,WAAW,EAAE,SAAS,CAAC,EAAE,GAAG,CAAC,EAAE,CAEvF;AAyCD,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,kBAAkB,GAAG,cAAc,CAqB/E"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { GQLGmailIntegrationStatus, GQLIntegration, GQLRelayIntegrationStatus } from "@manta-eu/client";
|
|
1
|
+
import { GQLDataConnectionStatus, GQLGmailIntegrationStatus, GQLIntegration, GQLRelayIntegrationStatus, } from "@manta-eu/client";
|
|
2
2
|
import { isPresent } from "@manta-eu/lib/present";
|
|
3
|
-
import { formatDistanceToNow, isValid } from "date-fns";
|
|
3
|
+
import { addDays, formatDistanceToNow, isAfter, isValid } from "date-fns";
|
|
4
4
|
import { match } from "ts-pattern";
|
|
5
5
|
// Fallback nouns shown until the ontology carries rdfs:labels for these classes (MNT-503).
|
|
6
6
|
// https://linear.app/manta-eu/issue/MNT-503/add-rdfslabel-to-provider-entity-classes-in-the-ontology
|
|
@@ -29,28 +29,60 @@ const statusMap = {
|
|
|
29
29
|
[GQLRelayIntegrationStatus.Deleting]: { label: "Deleting", tone: "neutral" },
|
|
30
30
|
[GQLRelayIntegrationStatus.Deleted]: { label: "Deleted", tone: "neutral" },
|
|
31
31
|
};
|
|
32
|
+
// An active connection keeps syncing its tested settings, so an error there belongs to a failed change.
|
|
33
|
+
const dataConnectionUpdateFailed = { label: "Update failed", tone: "warning" };
|
|
34
|
+
function dataConnectionStatus({ status, error }) {
|
|
35
|
+
if (status === GQLDataConnectionStatus.Active && isPresent(error))
|
|
36
|
+
return dataConnectionUpdateFailed;
|
|
37
|
+
return dataConnectionStatusMap[status];
|
|
38
|
+
}
|
|
39
|
+
const dataConnectionStatusMap = {
|
|
40
|
+
[GQLDataConnectionStatus.Testing]: { label: "Testing", tone: "info" },
|
|
41
|
+
[GQLDataConnectionStatus.Active]: { label: "Connected", tone: "success" },
|
|
42
|
+
[GQLDataConnectionStatus.Failed]: { label: "Failed", tone: "error" },
|
|
43
|
+
};
|
|
32
44
|
const oauthConnectedStatus = { label: "Connected", tone: "success" };
|
|
33
45
|
const oauthRevokedStatus = { label: "Reconnect needed", tone: "error" };
|
|
46
|
+
const oauthExpiredStatus = { label: "Expired", tone: "error" };
|
|
47
|
+
const grantExpiryWarningDays = 14;
|
|
34
48
|
// Integrations whose account is limited to what was picked at connect time, so an empty pick reads nothing.
|
|
35
49
|
const oauthIncludedResourcesLabels = {
|
|
36
50
|
[GQLIntegration.Dash]: { label: "Folders", noneLabel: "No folders selected" },
|
|
37
51
|
};
|
|
38
|
-
function
|
|
39
|
-
if (!isPresent(
|
|
52
|
+
function timeAgoLabel(event, at) {
|
|
53
|
+
if (!isPresent(at))
|
|
54
|
+
return undefined;
|
|
55
|
+
const date = new Date(at);
|
|
56
|
+
if (!isValid(date))
|
|
40
57
|
return undefined;
|
|
41
|
-
|
|
42
|
-
|
|
58
|
+
return `${event} ${formatDistanceToNow(date, { addSuffix: true })}`;
|
|
59
|
+
}
|
|
60
|
+
function grantStatus({ revokedAt, grantExpiresAt }) {
|
|
61
|
+
if (isPresent(revokedAt))
|
|
62
|
+
return oauthRevokedStatus;
|
|
63
|
+
if (!isPresent(grantExpiresAt))
|
|
64
|
+
return undefined;
|
|
65
|
+
const expiresAt = new Date(grantExpiresAt);
|
|
66
|
+
const now = new Date();
|
|
67
|
+
if (!isValid(expiresAt) || isAfter(expiresAt, addDays(now, grantExpiryWarningDays)))
|
|
43
68
|
return undefined;
|
|
44
|
-
|
|
69
|
+
if (!isAfter(expiresAt, now))
|
|
70
|
+
return oauthExpiredStatus;
|
|
71
|
+
return { label: `Expires ${formatDistanceToNow(expiresAt, { addSuffix: true })}`, tone: "warning" };
|
|
72
|
+
}
|
|
73
|
+
/** The accounts whose grant a person has to renew: revoked, expired, or inside the warning window. */
|
|
74
|
+
export function connectionProblems(connections) {
|
|
75
|
+
return connections.filter((connection) => isPresent(grantStatus(connection)));
|
|
45
76
|
}
|
|
46
|
-
function oauthScope(
|
|
47
|
-
const
|
|
48
|
-
const
|
|
77
|
+
function oauthScope(connection) {
|
|
78
|
+
const { integration, includedResources } = connection;
|
|
79
|
+
const grant = grantStatus(connection);
|
|
80
|
+
const status = grant ?? oauthConnectedStatus;
|
|
49
81
|
const labels = oauthIncludedResourcesLabels[integration];
|
|
50
82
|
if (!labels || !includedResources)
|
|
51
83
|
return { status };
|
|
52
84
|
if (!isPresent(includedResources)) {
|
|
53
|
-
return { status:
|
|
85
|
+
return { status: grant ?? { label: labels.noneLabel, tone: "warning" } };
|
|
54
86
|
}
|
|
55
87
|
return {
|
|
56
88
|
status,
|
|
@@ -69,17 +101,28 @@ function toManagedConnectionView(connection) {
|
|
|
69
101
|
: undefined,
|
|
70
102
|
};
|
|
71
103
|
}
|
|
104
|
+
function toDataConnectionView(connection) {
|
|
105
|
+
return {
|
|
106
|
+
source: connection.kind,
|
|
107
|
+
id: connection.id,
|
|
108
|
+
primaryLabel: connection.name,
|
|
109
|
+
secondaryLabel: isPresent(connection.error) ? `Error: ${connection.error}` : undefined,
|
|
110
|
+
status: dataConnectionStatus(connection),
|
|
111
|
+
syncedLabel: timeAgoLabel("Added", connection.createdAt),
|
|
112
|
+
};
|
|
113
|
+
}
|
|
72
114
|
export function toConnectionView(connection) {
|
|
73
115
|
return match(connection)
|
|
74
116
|
.returnType()
|
|
75
117
|
.with({ kind: "inferal" }, toManagedConnectionView)
|
|
76
118
|
.with({ kind: "gmail" }, toManagedConnectionView)
|
|
119
|
+
.with({ kind: "data-connection" }, toDataConnectionView)
|
|
77
120
|
.with({ kind: "oauth" }, (c) => ({
|
|
78
121
|
source: c.kind,
|
|
79
122
|
id: c.id,
|
|
80
123
|
primaryLabel: isPresent(c.name) ? c.name : `${oauthAccountNoun[c.integration]} ${c.externalId}`,
|
|
81
124
|
...oauthScope(c),
|
|
82
|
-
syncedLabel:
|
|
125
|
+
syncedLabel: timeAgoLabel("Connected", c.connectedAt),
|
|
83
126
|
namedAccount: {
|
|
84
127
|
name: isPresent(c.name) ? c.name : oauthAccountNoun[c.integration],
|
|
85
128
|
noun: isPresent(c.name) ? oauthAccountNoun[c.integration] : undefined,
|
|
@@ -1,12 +1,23 @@
|
|
|
1
|
-
import type { GQLGmailIntegrationStatus, GQLIncludedResource, GQLInferalIntegrationProvider, GQLIntegration, GQLRelayIntegrationStatus } from "@manta-eu/client";
|
|
1
|
+
import type { GQLDataConnectionStatus, GQLGmailIntegrationStatus, GQLIncludedResource, GQLInferalIntegrationProvider, GQLIntegration, GQLRelayIntegrationStatus } from "@manta-eu/client";
|
|
2
2
|
import type { HexColor } from "@manta-eu/lib/color";
|
|
3
3
|
import type { ComponentType, SVGProps } from "react";
|
|
4
4
|
import type { ConnectionView } from "./connection-view.js";
|
|
5
5
|
export declare const gmailProviderId = "GMAIL";
|
|
6
6
|
export declare const figmaProviderId = "FIGMA";
|
|
7
7
|
export declare const dashProviderId = "DASH";
|
|
8
|
-
export
|
|
9
|
-
|
|
8
|
+
export declare const dataConnectionProviderIds: {
|
|
9
|
+
readonly postgres: "POSTGRES";
|
|
10
|
+
readonly redshift: "REDSHIFT";
|
|
11
|
+
readonly mysql: "MYSQL";
|
|
12
|
+
readonly mariadb: "MARIADB";
|
|
13
|
+
readonly sqlserver: "SQLSERVER";
|
|
14
|
+
readonly snowflake: "SNOWFLAKE";
|
|
15
|
+
readonly bigquery: "BIGQUERY";
|
|
16
|
+
readonly clickhouse: "CLICKHOUSE";
|
|
17
|
+
};
|
|
18
|
+
export type DataConnectorType = keyof typeof dataConnectionProviderIds;
|
|
19
|
+
export type ProviderId = `${GQLInferalIntegrationProvider}` | typeof gmailProviderId | typeof figmaProviderId | typeof dashProviderId | (typeof dataConnectionProviderIds)[DataConnectorType];
|
|
20
|
+
export type ConnectionSource = "inferal" | "oauth" | "gmail" | "data-connection";
|
|
10
21
|
export type ProviderLogoComponent = ComponentType<SVGProps<SVGSVGElement>>;
|
|
11
22
|
export type ProviderPresentation<Id extends string = ProviderId> = {
|
|
12
23
|
id: Id;
|
|
@@ -36,6 +47,7 @@ export type OAuthConnection = {
|
|
|
36
47
|
includedResources?: GQLIncludedResource[];
|
|
37
48
|
connectedAt?: string | null;
|
|
38
49
|
revokedAt?: string | null;
|
|
50
|
+
grantExpiresAt?: string | null;
|
|
39
51
|
};
|
|
40
52
|
export type GmailConnection = {
|
|
41
53
|
kind: "gmail";
|
|
@@ -46,7 +58,16 @@ export type GmailConnection = {
|
|
|
46
58
|
lastSyncedAt: Date | null;
|
|
47
59
|
detail?: string | null;
|
|
48
60
|
};
|
|
49
|
-
|
|
61
|
+
/** Raw row from `dataConnections` before normalization to `ConnectionView`. */
|
|
62
|
+
export type DataConnection = {
|
|
63
|
+
kind: "data-connection";
|
|
64
|
+
id: string;
|
|
65
|
+
name: string;
|
|
66
|
+
status: GQLDataConnectionStatus;
|
|
67
|
+
error?: string | null;
|
|
68
|
+
createdAt: string;
|
|
69
|
+
};
|
|
70
|
+
export type ProviderConnection = InferalConnection | OAuthConnection | GmailConnection | DataConnection;
|
|
50
71
|
export type ConnectedProvider<Id extends string = ProviderId> = {
|
|
51
72
|
id: Id;
|
|
52
73
|
name: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/routes/integrations/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,yBAAyB,EACzB,mBAAmB,EACnB,6BAA6B,EAC7B,cAAc,EACd,yBAAyB,EAC1B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAExD,eAAO,MAAM,eAAe,UAAU,CAAC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C;IAChC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,iBAAiB,GAAG,eAAe,GAAG,eAAe,GAAG,cAAc,CAAC;AAExG,MAAM,MAAM,iBAAiB,CAAC,EAAE,SAAS,MAAM,GAAG,UAAU,IAAI;IAC9D,EAAE,EAAE,EAAE,CAAC;IACP,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,cAAc,EAAE,CAAC;CAC/B,CAAC"}
|
|
@@ -1,3 +1,13 @@
|
|
|
1
1
|
export const gmailProviderId = "GMAIL";
|
|
2
2
|
export const figmaProviderId = "FIGMA";
|
|
3
3
|
export const dashProviderId = "DASH";
|
|
4
|
+
export const dataConnectionProviderIds = {
|
|
5
|
+
postgres: "POSTGRES",
|
|
6
|
+
redshift: "REDSHIFT",
|
|
7
|
+
mysql: "MYSQL",
|
|
8
|
+
mariadb: "MARIADB",
|
|
9
|
+
sqlserver: "SQLSERVER",
|
|
10
|
+
snowflake: "SNOWFLAKE",
|
|
11
|
+
bigquery: "BIGQUERY",
|
|
12
|
+
clickhouse: "CLICKHOUSE",
|
|
13
|
+
};
|
|
@@ -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/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-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.7",
|
|
4
4
|
"description": "The Manta design system, knowledge-graph UI and agent components",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -537,6 +537,11 @@
|
|
|
537
537
|
"types": "./dist/providers/index.d.ts",
|
|
538
538
|
"import": "./dist/providers/index.js"
|
|
539
539
|
},
|
|
540
|
+
"./providers/AssistantIconProvider": {
|
|
541
|
+
"manta-source": "./src/providers/AssistantIconProvider.tsx",
|
|
542
|
+
"types": "./dist/providers/AssistantIconProvider.d.ts",
|
|
543
|
+
"import": "./dist/providers/AssistantIconProvider.js"
|
|
544
|
+
},
|
|
540
545
|
"./providers/AssistantNameProvider": {
|
|
541
546
|
"manta-source": "./src/providers/AssistantNameProvider.tsx",
|
|
542
547
|
"types": "./dist/providers/AssistantNameProvider.d.ts",
|
|
@@ -1017,15 +1022,13 @@
|
|
|
1017
1022
|
"@cloudflare/think": "0.17.0",
|
|
1018
1023
|
"@dagrejs/dagre": "^1.1.4",
|
|
1019
1024
|
"@hookform/resolvers": "^5.7.1",
|
|
1020
|
-
"@posthog/react": "^1.
|
|
1025
|
+
"@posthog/react": "^1.11.2",
|
|
1021
1026
|
"@radix-ui/react-alert-dialog": "^1.1.23",
|
|
1022
1027
|
"@radix-ui/react-avatar": "^1.2.6",
|
|
1023
1028
|
"@radix-ui/react-checkbox": "^1.3.11",
|
|
1024
1029
|
"@radix-ui/react-collapsible": "^1.1.20",
|
|
1025
|
-
"@radix-ui/react-context-menu": "^2.3.7",
|
|
1026
1030
|
"@radix-ui/react-dialog": "^1.1.23",
|
|
1027
1031
|
"@radix-ui/react-dropdown-menu": "^2.1.24",
|
|
1028
|
-
"@radix-ui/react-hover-card": "^1.1.23",
|
|
1029
1032
|
"@radix-ui/react-label": "^2.1.15",
|
|
1030
1033
|
"@radix-ui/react-popover": "^1.1.23",
|
|
1031
1034
|
"@radix-ui/react-progress": "^1.1.16",
|
|
@@ -1038,7 +1041,6 @@
|
|
|
1038
1041
|
"@radix-ui/react-switch": "^1.3.7",
|
|
1039
1042
|
"@radix-ui/react-tabs": "^1.1.21",
|
|
1040
1043
|
"@radix-ui/react-tooltip": "^1.2.16",
|
|
1041
|
-
"@radix-ui/react-use-controllable-state": "^1.2.6",
|
|
1042
1044
|
"@streamdown/code": "^1.1.1",
|
|
1043
1045
|
"@streamdown/math": "^1.0.2",
|
|
1044
1046
|
"@streamdown/mermaid": "^1.0.2",
|
|
@@ -1060,7 +1062,7 @@
|
|
|
1060
1062
|
"hono": "^4.9.8",
|
|
1061
1063
|
"input-otp": "^1.4.2",
|
|
1062
1064
|
"js-cookie": "^3.0.5",
|
|
1063
|
-
"ldkit": "^2.
|
|
1065
|
+
"ldkit": "^2.9.0",
|
|
1064
1066
|
"libphonenumber-js": "^1.11.15",
|
|
1065
1067
|
"lucide-react": "^1.17.0",
|
|
1066
1068
|
"mime": "^4.1.0",
|
|
@@ -1068,7 +1070,7 @@
|
|
|
1068
1070
|
"mustache": "^4.2.0",
|
|
1069
1071
|
"nuqs": "^2.8.9",
|
|
1070
1072
|
"p-limit": "^7.3.0",
|
|
1071
|
-
"posthog-js": "^1.
|
|
1073
|
+
"posthog-js": "^1.434.18",
|
|
1072
1074
|
"ramda": "^0.32.0",
|
|
1073
1075
|
"react-day-picker": "9.11.2",
|
|
1074
1076
|
"react-hook-form": "^7.67.0",
|
|
@@ -1085,12 +1087,12 @@
|
|
|
1085
1087
|
"usehooks-ts": "^3.1.1",
|
|
1086
1088
|
"zod": "^4.5.0",
|
|
1087
1089
|
"zustand": "^5.0.2",
|
|
1088
|
-
"@manta-eu/
|
|
1089
|
-
"@manta-eu/
|
|
1090
|
-
"@manta-eu/
|
|
1091
|
-
"@manta-eu/
|
|
1092
|
-
"@manta-eu/
|
|
1093
|
-
"@manta-eu/rdf-lib": "0.1.
|
|
1090
|
+
"@manta-eu/datalog-parser": "0.1.7",
|
|
1091
|
+
"@manta-eu/ldo": "0.1.7",
|
|
1092
|
+
"@manta-eu/lib": "0.1.7",
|
|
1093
|
+
"@manta-eu/auth": "0.1.7",
|
|
1094
|
+
"@manta-eu/client": "0.1.7",
|
|
1095
|
+
"@manta-eu/rdf-lib": "0.1.7"
|
|
1094
1096
|
},
|
|
1095
1097
|
"peerDependencies": {
|
|
1096
1098
|
"@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,EA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,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,8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