randmarcomps 1.660.0 → 1.662.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/README.md +1 -21
  2. package/dist/components/ui/button.d.ts +1 -1
  3. package/dist/components/ui/command.d.ts +4 -4
  4. package/dist/hooks/useAIAssistant.d.ts +3 -5
  5. package/dist/lib.d.ts +1 -11
  6. package/dist/randmarcomps.cjs +26 -26
  7. package/dist/randmarcomps.js +4258 -4903
  8. package/dist/stories/SearchExperience.stories.d.ts +5 -2
  9. package/dist/stories/Treemap.stories.d.ts +0 -4
  10. package/dist/utils/assistant-mcp.d.ts +8 -0
  11. package/package.json +1 -3
  12. package/dist/components/pages/explore-manufacturers.d.ts +0 -6
  13. package/dist/components/pages/product-overview/components/invoices-table.d.ts +0 -8
  14. package/dist/components/pages/search/components/search-results-header.d.ts +0 -11
  15. package/dist/components/ui/category-card.d.ts +0 -6
  16. package/dist/components/ui/chat/assistant-chat.d.ts +0 -6
  17. package/dist/components/ui/general-document-card.d.ts +0 -6
  18. package/dist/components/ui/input-otp.d.ts +0 -11
  19. package/dist/components/ui/invoice-card.d.ts +0 -6
  20. package/dist/components/ui/order-card.d.ts +0 -6
  21. package/dist/components/ui/page-header.d.ts +0 -6
  22. package/dist/components/ui/partner-page-shell.d.ts +0 -10
  23. package/dist/components/ui/reseller-billing-overview-card.d.ts +0 -9
  24. package/dist/components/ui/sales-overview-card.d.ts +0 -8
  25. package/dist/components/ui/shipment-card.d.ts +0 -6
  26. package/dist/components/ui/top-percent-treemap.d.ts +0 -14
  27. package/dist/stories/ExploreManufacturers.stories.d.ts +0 -6
  28. package/dist/stories/PageHeader.stories.d.ts +0 -9
  29. package/dist/stories/ResellerBillingOverviewCard.stories.d.ts +0 -27
  30. package/dist/stories/SalesOverviewCard.stories.d.ts +0 -23
  31. package/dist/utils/api-functions.d.ts +0 -39
@@ -1,8 +1,11 @@
1
1
  import { StoryObj } from '@storybook/react';
2
- import { SearchResultsHeader } from '../lib';
2
+ import { RmPageHeader } from '../lib';
3
3
  declare const meta: {
4
4
  title: string;
5
- component: typeof SearchResultsHeader;
5
+ component: typeof RmPageHeader;
6
+ args: {
7
+ title: string;
8
+ };
6
9
  tags: string[];
7
10
  parameters: {
8
11
  layout: string;
@@ -1,12 +1,8 @@
1
1
  import { Meta, StoryObj } from '@storybook/react';
2
2
  import { Treemap } from '../components/ui/treemap';
3
- import { TopPercentTreemap } from '../components/ui/top-percent-treemap';
4
3
  declare const meta: Meta<typeof Treemap>;
5
4
  export default meta;
6
5
  type Story = StoryObj<typeof Treemap>;
7
- type TopPercentStory = StoryObj<typeof TopPercentTreemap>;
8
6
  export declare const Generic: Story;
9
7
  export declare const LoadingState: Story;
10
8
  export declare const NoData: Story;
11
- export declare const Top80Percent: TopPercentStory;
12
- export declare const Top50Percent: TopPercentStory;
@@ -0,0 +1,8 @@
1
+ import { RandmarAssistantV2FunctionCall, RandmarAssistantV2FunctionResponse } from 'randmar-api-client';
2
+ export declare function getMcpToolTitle(functionCall: RandmarAssistantV2FunctionCall): string;
3
+ export declare function executeMcpTool(functionCall: RandmarAssistantV2FunctionCall, token?: string, signal?: AbortSignal): Promise<{
4
+ title: string;
5
+ output: string;
6
+ functionResponse: RandmarAssistantV2FunctionResponse;
7
+ }>;
8
+ export declare function getAssistantAccessToken(): string | undefined;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "randmarcomps",
3
3
  "private": false,
4
- "version": "1.660.0",
4
+ "version": "1.662.0",
5
5
  "description": "The UI library enabling speed and consistency in Randmar frontends.",
6
6
  "type": "module",
7
7
  "files": [
@@ -109,8 +109,6 @@
109
109
  "date-fns": "^4.1.0",
110
110
  "dompurify": "^3.3.3",
111
111
  "html-react-parser": "^5.2.10",
112
- "input-otp": "^1.4.2",
113
- "js-md5": "^0.8.3",
114
112
  "lucide-react": "^0.562.0",
115
113
  "marked": "^17.0.1",
116
114
  "next-themes": "^0.4.6",
@@ -1,6 +0,0 @@
1
- declare function ExploreManufacturers({ appID, manufPath, withBot }: {
2
- appID: string;
3
- manufPath: (id: string) => string | undefined;
4
- withBot: boolean;
5
- }): import("react").JSX.Element;
6
- export default ExploreManufacturers;
@@ -1,8 +0,0 @@
1
- import { Invoice } from 'randmar-api-client';
2
- interface InvoicesTableProps {
3
- applicationId: string;
4
- invoices?: Invoice[] | null;
5
- loading?: boolean;
6
- }
7
- export declare function InvoicesTable({ applicationId, invoices, loading, }: InvoicesTableProps): import("react").JSX.Element;
8
- export {};
@@ -1,11 +0,0 @@
1
- import * as React from "react";
2
- export interface SearchResultsHeaderProps {
3
- query?: string;
4
- title?: string;
5
- subtitle?: string;
6
- actions?: React.ReactNode;
7
- children?: React.ReactNode;
8
- className?: string;
9
- contentClassName?: string;
10
- }
11
- export declare function SearchResultsHeader({ query, title, subtitle, actions, children, className, contentClassName, }: SearchResultsHeaderProps): React.JSX.Element;
@@ -1,6 +0,0 @@
1
- import { ManufacturerCategory } from 'randmar-api-client';
2
- export interface CategoryCardProps {
3
- category?: ManufacturerCategory;
4
- loading?: boolean;
5
- }
6
- export declare function CategoryCard({ category, loading }: CategoryCardProps): import("react").JSX.Element;
@@ -1,6 +0,0 @@
1
- export interface AssistantChatProps {
2
- userId: string;
3
- userName: string;
4
- initialPrompt?: string;
5
- }
6
- export default function AssistantChat(props: AssistantChatProps): import("react").JSX.Element;
@@ -1,6 +0,0 @@
1
- import { GeneralDocumentOld } from 'randmar-api-client';
2
- export interface GeneralDocumentCardProps {
3
- document?: GeneralDocumentOld;
4
- loading?: boolean;
5
- }
6
- export declare function GeneralDocumentCard({ document, loading }: GeneralDocumentCardProps): import("react").JSX.Element;
@@ -1,11 +0,0 @@
1
- import { OTPInput } from 'input-otp';
2
- import * as React from "react";
3
- declare function InputOTP({ className, containerClassName, ...props }: React.ComponentProps<typeof OTPInput> & {
4
- containerClassName?: string;
5
- }): React.JSX.Element;
6
- declare function InputOTPGroup({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
7
- declare function InputOTPSlot({ index, className, ...props }: React.ComponentProps<"div"> & {
8
- index: number;
9
- }): React.JSX.Element;
10
- declare function InputOTPSeparator({ ...props }: React.ComponentProps<"div">): React.JSX.Element;
11
- export { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator };
@@ -1,6 +0,0 @@
1
- import { Invoice } from 'randmar-api-client';
2
- export interface InvoiceCardProps {
3
- invoice?: Invoice;
4
- loading?: boolean;
5
- }
6
- export declare function InvoiceCard({ invoice, loading }: InvoiceCardProps): import("react").JSX.Element;
@@ -1,6 +0,0 @@
1
- import { Order } from 'randmar-api-client';
2
- export interface OrderCardProps {
3
- order?: Order;
4
- loading?: boolean;
5
- }
6
- export declare function OrderCard({ order, loading }: OrderCardProps): import("react").JSX.Element;
@@ -1,6 +0,0 @@
1
- export interface PageHeaderProps {
2
- title: React.ReactNode;
3
- children?: React.ReactNode;
4
- className?: string;
5
- }
6
- export declare function PageHeader({ title, children, className }: PageHeaderProps): import("react").JSX.Element;
@@ -1,10 +0,0 @@
1
- import * as React from "react";
2
- export declare const PARTNER_PAGE_SHELL_STACK_CLASS_NAME = "space-y-8";
3
- export declare const PARTNER_PAGE_SHELL_CONTENT_CLASS_NAME = "px-4 py-4 sm:px-6 sm:py-6";
4
- export interface PartnerPageShellProps extends Omit<React.ComponentProps<"section">, "children"> {
5
- header: React.ReactNode;
6
- children: React.ReactNode;
7
- contentClassName?: string;
8
- contentProps?: Omit<React.ComponentProps<"div">, "children" | "className">;
9
- }
10
- export declare function PartnerPageShell({ header, children, className, contentClassName, contentProps, ...props }: PartnerPageShellProps): React.JSX.Element;
@@ -1,9 +0,0 @@
1
- import { default as React } from 'react';
2
- import { Reseller } from 'randmar-api-client';
3
- interface ResellerBillingOverviewCardProps {
4
- reseller?: Reseller;
5
- actions?: React.ReactNode;
6
- loading?: boolean;
7
- }
8
- export declare function ResellerBillingOverviewCard({ reseller, actions, loading }: ResellerBillingOverviewCardProps): React.JSX.Element;
9
- export {};
@@ -1,8 +0,0 @@
1
- import { SalesData, SalesStatistic } from 'randmar-api-client';
2
- interface SalesOverviewCardProps {
3
- salesData?: SalesData;
4
- salesStatistics?: SalesStatistic[];
5
- loading?: boolean;
6
- }
7
- export declare function SalesOverviewCard({ salesData, salesStatistics, loading }: SalesOverviewCardProps): import("react").JSX.Element;
8
- export {};
@@ -1,6 +0,0 @@
1
- import { Shipment } from 'randmar-api-client';
2
- export interface ShipmentCardProps {
3
- shipment?: Shipment;
4
- loading?: boolean;
5
- }
6
- export declare function ShipmentCard({ shipment, loading }: ShipmentCardProps): import("react").JSX.Element;
@@ -1,14 +0,0 @@
1
- import * as React from "react";
2
- export interface SimpleNode {
3
- name: string;
4
- value: number;
5
- }
6
- export interface TopPercentTreemapProps {
7
- data: SimpleNode[];
8
- topPercent?: number;
9
- title?: string;
10
- height?: string;
11
- className?: string;
12
- loading?: boolean;
13
- }
14
- export declare const TopPercentTreemap: ({ data, topPercent, title, loading, ...props }: TopPercentTreemapProps) => React.JSX.Element;
@@ -1,6 +0,0 @@
1
- import { Meta, StoryObj } from '@storybook/react';
2
- import { default as ExploreManufacturers } from '../components/pages/explore-manufacturers';
3
- declare const meta: Meta<typeof ExploreManufacturers>;
4
- export default meta;
5
- type Story = StoryObj<typeof ExploreManufacturers>;
6
- export declare const Default: Story;
@@ -1,9 +0,0 @@
1
- import { Meta, StoryObj } from '@storybook/react';
2
- import { PageHeader } from '../components/ui/page-header';
3
- declare const meta: Meta<typeof PageHeader>;
4
- export default meta;
5
- type Story = StoryObj<typeof PageHeader>;
6
- export declare const Default: Story;
7
- export declare const WithActions: Story;
8
- export declare const LongTitle: Story;
9
- export declare const ResponsiveActionWrap: Story;
@@ -1,27 +0,0 @@
1
- import { default as React } from 'react';
2
- import { StoryObj } from '@storybook/react';
3
- import { ResellerBillingOverviewCard } from '../components/ui/reseller-billing-overview-card';
4
- declare const meta: {
5
- title: string;
6
- component: typeof ResellerBillingOverviewCard;
7
- parameters: {
8
- layout: string;
9
- };
10
- tags: string[];
11
- decorators: ((Story: React.ComponentType) => React.JSX.Element)[];
12
- };
13
- export default meta;
14
- type Story = StoryObj<typeof meta>;
15
- export declare const Default: Story;
16
- export declare const Loading: Story;
17
- export declare const Empty: Story;
18
- export declare const WithoutActions: Story;
19
- export declare const LowBillingAmount: Story;
20
- export declare const HighBillingAmount: Story;
21
- export declare const MostlyCurrentBilling: Story;
22
- export declare const MostlyOverdueBilling: Story;
23
- export declare const NearCreditLimit: Story;
24
- export declare const ExceededCreditLimit: Story;
25
- export declare const WithMultipleActions: Story;
26
- export declare const Mobile: Story;
27
- export declare const Tablet: Story;
@@ -1,23 +0,0 @@
1
- import { default as React } from 'react';
2
- import { StoryObj } from '@storybook/react';
3
- import { SalesOverviewCard } from '../components/ui/sales-overview-card';
4
- declare const meta: {
5
- title: string;
6
- component: typeof SalesOverviewCard;
7
- parameters: {
8
- layout: string;
9
- };
10
- tags: string[];
11
- decorators: ((Story: React.ComponentType) => React.JSX.Element)[];
12
- };
13
- export default meta;
14
- type Story = StoryObj<typeof meta>;
15
- export declare const Default: Story;
16
- export declare const Loading: Story;
17
- export declare const Empty: Story;
18
- export declare const NoChartData: Story;
19
- export declare const LowSalesVolume: Story;
20
- export declare const HighSalesVolume: Story;
21
- export declare const VolatileSales: Story;
22
- export declare const Mobile: Story;
23
- export declare const Tablet: Story;
@@ -1,39 +0,0 @@
1
- /**
2
- * Minimal function-calling schema types used by the Randmar assistant pipeline.
3
- * These are intentionally lightweight and avoid taking a runtime dependency on `@google/genai`.
4
- */
5
- export declare enum Type {
6
- STRING = "string",
7
- NUMBER = "number",
8
- BOOLEAN = "boolean",
9
- OBJECT = "object"
10
- }
11
- export interface FunctionDeclaration {
12
- name: string;
13
- description?: string;
14
- parameters?: {
15
- type: Type;
16
- properties?: Record<string, {
17
- type?: Type;
18
- description: string;
19
- }>;
20
- required?: string[];
21
- };
22
- }
23
- /**
24
- * Represents a dynamically generated API function, including its declaration for the model,
25
- * and a handler to execute the API call.
26
- */
27
- export interface ApiFunction {
28
- declaration: FunctionDeclaration;
29
- prettyName: string;
30
- details: string;
31
- handler: (args: object) => Promise<string>;
32
- }
33
- /**
34
- * Fetches a Swagger/OpenAPI specification and dynamically generates API functions from it.
35
- * @returns A promise that resolves to an array of ApiFunction objects.
36
- */
37
- export declare function fetchApiFunctions(options?: {
38
- swaggerJsonUrl?: string;
39
- }): Promise<ApiFunction[]>;