@arbidocs/blocks 0.3.116 → 0.3.117
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +142 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +39 -2
- package/dist/index.d.ts +39 -2
- package/dist/index.js +144 -7
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.d.cts
CHANGED
|
@@ -2,7 +2,7 @@ import { UseBoundStore, StoreApi } from 'zustand';
|
|
|
2
2
|
import * as react from 'react';
|
|
3
3
|
import react__default, { ReactNode } from 'react';
|
|
4
4
|
import * as _arbidocs_react from '@arbidocs/react';
|
|
5
|
-
import { AiRunOptions, useArbi, AiTaskStatus } from '@arbidocs/react';
|
|
5
|
+
import { AiRunOptions, UserMenuItem, NotifyVariant, useArbi, AiTaskStatus } from '@arbidocs/react';
|
|
6
6
|
export { AiRunOptions, AiTaskStatus, ArtifactEvent, SearchChunk, Table, TableBody, TableCell, TableHead, TableHeader, TableRow, redlineStats, textToArtifact, toRedlineMarkdown } from '@arbidocs/react';
|
|
7
7
|
import { ColDef, GridOptions, GridApi, CellValueChangedEvent, GridState } from 'ag-grid-community';
|
|
8
8
|
import { LucideIcon } from 'lucide-react';
|
|
@@ -296,6 +296,10 @@ type ConnectionStatus = 'demo' | 'disconnected' | 'connecting' | 'authenticated'
|
|
|
296
296
|
interface ArbiUser {
|
|
297
297
|
name: string;
|
|
298
298
|
email: string;
|
|
299
|
+
/** The user's external_id (usr-…), when known (live sessions). */
|
|
300
|
+
externalId?: string;
|
|
301
|
+
/** Avatar image URL / data-URL from the backend profile, when set. */
|
|
302
|
+
picture?: string | null;
|
|
299
303
|
}
|
|
300
304
|
/** A retrieval-augmented answer step surfaced from the agent loop. */
|
|
301
305
|
interface AssistantStep {
|
|
@@ -1107,6 +1111,39 @@ interface AppShellProps {
|
|
|
1107
1111
|
}
|
|
1108
1112
|
declare function AppShell({ sections, footerItems, logo, logoHref, logoLabel, sidebarFooter, topbar, rightRail, children, mainClassName, testIdPrefix, }: AppShellProps): react.JSX.Element;
|
|
1109
1113
|
|
|
1114
|
+
interface AppHeaderUser {
|
|
1115
|
+
name: string;
|
|
1116
|
+
email?: string | null;
|
|
1117
|
+
picture?: string | null;
|
|
1118
|
+
}
|
|
1119
|
+
interface AppHeaderProps {
|
|
1120
|
+
/** Open the command palette (⌘K). Bound to the search trigger. */
|
|
1121
|
+
onSearch: () => void;
|
|
1122
|
+
/** Open the palette in ask mode (defaults to `onSearch`). */
|
|
1123
|
+
onAsk?: () => void;
|
|
1124
|
+
searchPlaceholder?: string;
|
|
1125
|
+
searchKbd?: string;
|
|
1126
|
+
askLabel?: string;
|
|
1127
|
+
/** Right-cluster content before the action buttons (e.g. a running-timer). */
|
|
1128
|
+
leading?: ReactNode;
|
|
1129
|
+
/** Extra icon buttons between Ask AI and the bell (e.g. a chat toggle). */
|
|
1130
|
+
actions?: ReactNode;
|
|
1131
|
+
user: AppHeaderUser;
|
|
1132
|
+
/** Account actions above sign-out (e.g. Settings). */
|
|
1133
|
+
userItems?: UserMenuItem[];
|
|
1134
|
+
onLogout: () => void;
|
|
1135
|
+
/** Called with a notification's href when an entry is clicked. */
|
|
1136
|
+
onNotificationNavigate?: (href: string) => void;
|
|
1137
|
+
/** Override per-variant notification glyph colours (e.g. brand accent). */
|
|
1138
|
+
notificationTones?: Partial<Record<NotifyVariant, string>>;
|
|
1139
|
+
classNames?: {
|
|
1140
|
+
search?: string;
|
|
1141
|
+
askButton?: string;
|
|
1142
|
+
};
|
|
1143
|
+
testIdPrefix?: string;
|
|
1144
|
+
}
|
|
1145
|
+
declare function AppHeader({ onSearch, onAsk, searchPlaceholder, searchKbd, askLabel, leading, actions, user, userItems, onLogout, onNotificationNavigate, notificationTones, classNames, testIdPrefix, }: AppHeaderProps): react.JSX.Element;
|
|
1146
|
+
|
|
1110
1147
|
/**
|
|
1111
1148
|
* Shared studio types — the persistence contract, page metadata and the AI
|
|
1112
1149
|
* prompt-builder signature the firm supplies. Firm-agnostic: a firm app wires
|
|
@@ -1653,4 +1690,4 @@ interface AgentsPanelProps {
|
|
|
1653
1690
|
}
|
|
1654
1691
|
declare function AgentsPanel({ store, testIdPrefix }: AgentsPanelProps): react.JSX.Element;
|
|
1655
1692
|
|
|
1656
|
-
export { ASSET_REF_PREFIX, Accordion, type AccordionItem, type AccordionProps, type AgentSelectionStore, AgentsPanel, type AgentsPanelProps, type AiFields, type AiFieldsConfig, type AppNavItem, type AppNavSection, AppShell, type AppShellProps, type ApplyThemeOptions, type ArbiBlocksConfigOptions, type ArbiMode, type ArbiUser, type AssetMaterializer, AssetResolverProvider, type AssistantCitation, type AssistantMessage, type AssistantStep, AvatarBlock, type AvatarBlockProps, Banner, type BannerProps, type BannerTone, BlockImage, type BlockImageProps, type BlockKit, type BuildPrompt, type BuilderModule, CTABanner, type CTABannerProps, Callout, type CalloutProps, type CalloutVariant, type ColorToken, type Column, Columns, type ColumnsProps, ConnectionProvider, type ConnectionStatus, type ContactField, ContactForm, type ContactFormProps, Container, type ContainerProps, DataTable, DataTableBlock, type DataTableBlockColumn, type DataTableBlockProps, EmptyState, type ExportedModule, FAQ, type FAQProps, type FaqItem, FeatureGrid, type FeatureGridProps, type FeatureItem, type FirmArbiConfig, Footer, type FooterColumn, type FooterLink, type FooterProps, Gallery, type GalleryImage, type GalleryProps, GridView, type GridViewEmptyState, type GridViewProps, type GridViewSelection, Hero, type HeroCta, type HeroProps, type ImageFieldConfig, type ImageFieldFactory, LegalArbiProvider, ListBlock, type ListBlockProps, type ListItem, LiveDataProvider, type LoadResult, LogoCloud, type LogoCloudProps, type LogoItem, type MaterializeOptions, type MatterContext, MediaText, type MediaTextProps, MetricCard, type MetricCardProps, ModuleManager, type ModuleManagerProps, type ModuleRegistry, type ModuleStoreBundle, type NavLink, Navbar, type NavbarProps, PageHeader, PageRenderer, type PageRendererProps, type PersistVia, type PricingPlan, PricingTable, type PricingTableProps, type PromptConfig, type PromptLibrary, type Prompts, type ResolvedModule, RichTextBlock, type RichTextBlockProps, Section, SectionHeading, type SectionProps, Spacer, type SpacerProps, StatGroup, type StatGroupProps, type StatItem, type StepItem, Steps, type StepsProps, StudioEditor, type StudioEditorProps, type StudioPageMeta, type StudioPersistence, type StudioPersistenceConfig, THEME_STYLE_ID, type TabItem, Tabs, type TabsProps, TeamGrid, type TeamGridProps, type TeamMember, Testimonial, TestimonialGrid, type TestimonialGridProps, type TestimonialItem, type TestimonialProps, type ThemeBundle, ThemeEditor, type ThemeEditorProps, type ThemeEmitMode, type ThemeFonts, type ThemePreset, type ThemeState, type ThemeStoreConfig, type ThemeTokens, Toolbar, type UseImageGen, VerticalBuilder, type VerticalBuilderProps, type VerticalConfig, type VerticalExport, type VerticalExportConfig, type VideoAspect, VideoEmbed, type VideoEmbedProps, WidgetPlaceholder, applyStoredTheme, applyThemeVars, asAssetRef, assetRefId, clearThemeVars, createAgentSelectionStore, createAiFields, createArbiBlocksConfig, createArbiMaterializer, createBlockKit, createImageField, createLiveWidgets, createModuleRegistry, createModuleStore, createPromptLibrary, createSiteBlocks, createStudioPersistence, createThemeStore, createVerticalExport, createWebsiteBlocks, daysUntil, fmtDate, fmtDateTime, fromNow, gbp, hrs, iconMap, initials, isAssetRef, isAuthenticated, materializePageData, matterToContext, pct, tid, toEmbedUrl, toHslTriplet, useAssetResolverActive, useConnection, useFirmAiTask, useImageGen, useLiveDataActive, useSemanticSearch, useWorkspaceDocs };
|
|
1693
|
+
export { ASSET_REF_PREFIX, Accordion, type AccordionItem, type AccordionProps, type AgentSelectionStore, AgentsPanel, type AgentsPanelProps, type AiFields, type AiFieldsConfig, AppHeader, type AppHeaderProps, type AppHeaderUser, type AppNavItem, type AppNavSection, AppShell, type AppShellProps, type ApplyThemeOptions, type ArbiBlocksConfigOptions, type ArbiMode, type ArbiUser, type AssetMaterializer, AssetResolverProvider, type AssistantCitation, type AssistantMessage, type AssistantStep, AvatarBlock, type AvatarBlockProps, Banner, type BannerProps, type BannerTone, BlockImage, type BlockImageProps, type BlockKit, type BuildPrompt, type BuilderModule, CTABanner, type CTABannerProps, Callout, type CalloutProps, type CalloutVariant, type ColorToken, type Column, Columns, type ColumnsProps, ConnectionProvider, type ConnectionStatus, type ContactField, ContactForm, type ContactFormProps, Container, type ContainerProps, DataTable, DataTableBlock, type DataTableBlockColumn, type DataTableBlockProps, EmptyState, type ExportedModule, FAQ, type FAQProps, type FaqItem, FeatureGrid, type FeatureGridProps, type FeatureItem, type FirmArbiConfig, Footer, type FooterColumn, type FooterLink, type FooterProps, Gallery, type GalleryImage, type GalleryProps, GridView, type GridViewEmptyState, type GridViewProps, type GridViewSelection, Hero, type HeroCta, type HeroProps, type ImageFieldConfig, type ImageFieldFactory, LegalArbiProvider, ListBlock, type ListBlockProps, type ListItem, LiveDataProvider, type LoadResult, LogoCloud, type LogoCloudProps, type LogoItem, type MaterializeOptions, type MatterContext, MediaText, type MediaTextProps, MetricCard, type MetricCardProps, ModuleManager, type ModuleManagerProps, type ModuleRegistry, type ModuleStoreBundle, type NavLink, Navbar, type NavbarProps, PageHeader, PageRenderer, type PageRendererProps, type PersistVia, type PricingPlan, PricingTable, type PricingTableProps, type PromptConfig, type PromptLibrary, type Prompts, type ResolvedModule, RichTextBlock, type RichTextBlockProps, Section, SectionHeading, type SectionProps, Spacer, type SpacerProps, StatGroup, type StatGroupProps, type StatItem, type StepItem, Steps, type StepsProps, StudioEditor, type StudioEditorProps, type StudioPageMeta, type StudioPersistence, type StudioPersistenceConfig, THEME_STYLE_ID, type TabItem, Tabs, type TabsProps, TeamGrid, type TeamGridProps, type TeamMember, Testimonial, TestimonialGrid, type TestimonialGridProps, type TestimonialItem, type TestimonialProps, type ThemeBundle, ThemeEditor, type ThemeEditorProps, type ThemeEmitMode, type ThemeFonts, type ThemePreset, type ThemeState, type ThemeStoreConfig, type ThemeTokens, Toolbar, type UseImageGen, VerticalBuilder, type VerticalBuilderProps, type VerticalConfig, type VerticalExport, type VerticalExportConfig, type VideoAspect, VideoEmbed, type VideoEmbedProps, WidgetPlaceholder, applyStoredTheme, applyThemeVars, asAssetRef, assetRefId, clearThemeVars, createAgentSelectionStore, createAiFields, createArbiBlocksConfig, createArbiMaterializer, createBlockKit, createImageField, createLiveWidgets, createModuleRegistry, createModuleStore, createPromptLibrary, createSiteBlocks, createStudioPersistence, createThemeStore, createVerticalExport, createWebsiteBlocks, daysUntil, fmtDate, fmtDateTime, fromNow, gbp, hrs, iconMap, initials, isAssetRef, isAuthenticated, materializePageData, matterToContext, pct, tid, toEmbedUrl, toHslTriplet, useAssetResolverActive, useConnection, useFirmAiTask, useImageGen, useLiveDataActive, useSemanticSearch, useWorkspaceDocs };
|
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { UseBoundStore, StoreApi } from 'zustand';
|
|
|
2
2
|
import * as react from 'react';
|
|
3
3
|
import react__default, { ReactNode } from 'react';
|
|
4
4
|
import * as _arbidocs_react from '@arbidocs/react';
|
|
5
|
-
import { AiRunOptions, useArbi, AiTaskStatus } from '@arbidocs/react';
|
|
5
|
+
import { AiRunOptions, UserMenuItem, NotifyVariant, useArbi, AiTaskStatus } from '@arbidocs/react';
|
|
6
6
|
export { AiRunOptions, AiTaskStatus, ArtifactEvent, SearchChunk, Table, TableBody, TableCell, TableHead, TableHeader, TableRow, redlineStats, textToArtifact, toRedlineMarkdown } from '@arbidocs/react';
|
|
7
7
|
import { ColDef, GridOptions, GridApi, CellValueChangedEvent, GridState } from 'ag-grid-community';
|
|
8
8
|
import { LucideIcon } from 'lucide-react';
|
|
@@ -296,6 +296,10 @@ type ConnectionStatus = 'demo' | 'disconnected' | 'connecting' | 'authenticated'
|
|
|
296
296
|
interface ArbiUser {
|
|
297
297
|
name: string;
|
|
298
298
|
email: string;
|
|
299
|
+
/** The user's external_id (usr-…), when known (live sessions). */
|
|
300
|
+
externalId?: string;
|
|
301
|
+
/** Avatar image URL / data-URL from the backend profile, when set. */
|
|
302
|
+
picture?: string | null;
|
|
299
303
|
}
|
|
300
304
|
/** A retrieval-augmented answer step surfaced from the agent loop. */
|
|
301
305
|
interface AssistantStep {
|
|
@@ -1107,6 +1111,39 @@ interface AppShellProps {
|
|
|
1107
1111
|
}
|
|
1108
1112
|
declare function AppShell({ sections, footerItems, logo, logoHref, logoLabel, sidebarFooter, topbar, rightRail, children, mainClassName, testIdPrefix, }: AppShellProps): react.JSX.Element;
|
|
1109
1113
|
|
|
1114
|
+
interface AppHeaderUser {
|
|
1115
|
+
name: string;
|
|
1116
|
+
email?: string | null;
|
|
1117
|
+
picture?: string | null;
|
|
1118
|
+
}
|
|
1119
|
+
interface AppHeaderProps {
|
|
1120
|
+
/** Open the command palette (⌘K). Bound to the search trigger. */
|
|
1121
|
+
onSearch: () => void;
|
|
1122
|
+
/** Open the palette in ask mode (defaults to `onSearch`). */
|
|
1123
|
+
onAsk?: () => void;
|
|
1124
|
+
searchPlaceholder?: string;
|
|
1125
|
+
searchKbd?: string;
|
|
1126
|
+
askLabel?: string;
|
|
1127
|
+
/** Right-cluster content before the action buttons (e.g. a running-timer). */
|
|
1128
|
+
leading?: ReactNode;
|
|
1129
|
+
/** Extra icon buttons between Ask AI and the bell (e.g. a chat toggle). */
|
|
1130
|
+
actions?: ReactNode;
|
|
1131
|
+
user: AppHeaderUser;
|
|
1132
|
+
/** Account actions above sign-out (e.g. Settings). */
|
|
1133
|
+
userItems?: UserMenuItem[];
|
|
1134
|
+
onLogout: () => void;
|
|
1135
|
+
/** Called with a notification's href when an entry is clicked. */
|
|
1136
|
+
onNotificationNavigate?: (href: string) => void;
|
|
1137
|
+
/** Override per-variant notification glyph colours (e.g. brand accent). */
|
|
1138
|
+
notificationTones?: Partial<Record<NotifyVariant, string>>;
|
|
1139
|
+
classNames?: {
|
|
1140
|
+
search?: string;
|
|
1141
|
+
askButton?: string;
|
|
1142
|
+
};
|
|
1143
|
+
testIdPrefix?: string;
|
|
1144
|
+
}
|
|
1145
|
+
declare function AppHeader({ onSearch, onAsk, searchPlaceholder, searchKbd, askLabel, leading, actions, user, userItems, onLogout, onNotificationNavigate, notificationTones, classNames, testIdPrefix, }: AppHeaderProps): react.JSX.Element;
|
|
1146
|
+
|
|
1110
1147
|
/**
|
|
1111
1148
|
* Shared studio types — the persistence contract, page metadata and the AI
|
|
1112
1149
|
* prompt-builder signature the firm supplies. Firm-agnostic: a firm app wires
|
|
@@ -1653,4 +1690,4 @@ interface AgentsPanelProps {
|
|
|
1653
1690
|
}
|
|
1654
1691
|
declare function AgentsPanel({ store, testIdPrefix }: AgentsPanelProps): react.JSX.Element;
|
|
1655
1692
|
|
|
1656
|
-
export { ASSET_REF_PREFIX, Accordion, type AccordionItem, type AccordionProps, type AgentSelectionStore, AgentsPanel, type AgentsPanelProps, type AiFields, type AiFieldsConfig, type AppNavItem, type AppNavSection, AppShell, type AppShellProps, type ApplyThemeOptions, type ArbiBlocksConfigOptions, type ArbiMode, type ArbiUser, type AssetMaterializer, AssetResolverProvider, type AssistantCitation, type AssistantMessage, type AssistantStep, AvatarBlock, type AvatarBlockProps, Banner, type BannerProps, type BannerTone, BlockImage, type BlockImageProps, type BlockKit, type BuildPrompt, type BuilderModule, CTABanner, type CTABannerProps, Callout, type CalloutProps, type CalloutVariant, type ColorToken, type Column, Columns, type ColumnsProps, ConnectionProvider, type ConnectionStatus, type ContactField, ContactForm, type ContactFormProps, Container, type ContainerProps, DataTable, DataTableBlock, type DataTableBlockColumn, type DataTableBlockProps, EmptyState, type ExportedModule, FAQ, type FAQProps, type FaqItem, FeatureGrid, type FeatureGridProps, type FeatureItem, type FirmArbiConfig, Footer, type FooterColumn, type FooterLink, type FooterProps, Gallery, type GalleryImage, type GalleryProps, GridView, type GridViewEmptyState, type GridViewProps, type GridViewSelection, Hero, type HeroCta, type HeroProps, type ImageFieldConfig, type ImageFieldFactory, LegalArbiProvider, ListBlock, type ListBlockProps, type ListItem, LiveDataProvider, type LoadResult, LogoCloud, type LogoCloudProps, type LogoItem, type MaterializeOptions, type MatterContext, MediaText, type MediaTextProps, MetricCard, type MetricCardProps, ModuleManager, type ModuleManagerProps, type ModuleRegistry, type ModuleStoreBundle, type NavLink, Navbar, type NavbarProps, PageHeader, PageRenderer, type PageRendererProps, type PersistVia, type PricingPlan, PricingTable, type PricingTableProps, type PromptConfig, type PromptLibrary, type Prompts, type ResolvedModule, RichTextBlock, type RichTextBlockProps, Section, SectionHeading, type SectionProps, Spacer, type SpacerProps, StatGroup, type StatGroupProps, type StatItem, type StepItem, Steps, type StepsProps, StudioEditor, type StudioEditorProps, type StudioPageMeta, type StudioPersistence, type StudioPersistenceConfig, THEME_STYLE_ID, type TabItem, Tabs, type TabsProps, TeamGrid, type TeamGridProps, type TeamMember, Testimonial, TestimonialGrid, type TestimonialGridProps, type TestimonialItem, type TestimonialProps, type ThemeBundle, ThemeEditor, type ThemeEditorProps, type ThemeEmitMode, type ThemeFonts, type ThemePreset, type ThemeState, type ThemeStoreConfig, type ThemeTokens, Toolbar, type UseImageGen, VerticalBuilder, type VerticalBuilderProps, type VerticalConfig, type VerticalExport, type VerticalExportConfig, type VideoAspect, VideoEmbed, type VideoEmbedProps, WidgetPlaceholder, applyStoredTheme, applyThemeVars, asAssetRef, assetRefId, clearThemeVars, createAgentSelectionStore, createAiFields, createArbiBlocksConfig, createArbiMaterializer, createBlockKit, createImageField, createLiveWidgets, createModuleRegistry, createModuleStore, createPromptLibrary, createSiteBlocks, createStudioPersistence, createThemeStore, createVerticalExport, createWebsiteBlocks, daysUntil, fmtDate, fmtDateTime, fromNow, gbp, hrs, iconMap, initials, isAssetRef, isAuthenticated, materializePageData, matterToContext, pct, tid, toEmbedUrl, toHslTriplet, useAssetResolverActive, useConnection, useFirmAiTask, useImageGen, useLiveDataActive, useSemanticSearch, useWorkspaceDocs };
|
|
1693
|
+
export { ASSET_REF_PREFIX, Accordion, type AccordionItem, type AccordionProps, type AgentSelectionStore, AgentsPanel, type AgentsPanelProps, type AiFields, type AiFieldsConfig, AppHeader, type AppHeaderProps, type AppHeaderUser, type AppNavItem, type AppNavSection, AppShell, type AppShellProps, type ApplyThemeOptions, type ArbiBlocksConfigOptions, type ArbiMode, type ArbiUser, type AssetMaterializer, AssetResolverProvider, type AssistantCitation, type AssistantMessage, type AssistantStep, AvatarBlock, type AvatarBlockProps, Banner, type BannerProps, type BannerTone, BlockImage, type BlockImageProps, type BlockKit, type BuildPrompt, type BuilderModule, CTABanner, type CTABannerProps, Callout, type CalloutProps, type CalloutVariant, type ColorToken, type Column, Columns, type ColumnsProps, ConnectionProvider, type ConnectionStatus, type ContactField, ContactForm, type ContactFormProps, Container, type ContainerProps, DataTable, DataTableBlock, type DataTableBlockColumn, type DataTableBlockProps, EmptyState, type ExportedModule, FAQ, type FAQProps, type FaqItem, FeatureGrid, type FeatureGridProps, type FeatureItem, type FirmArbiConfig, Footer, type FooterColumn, type FooterLink, type FooterProps, Gallery, type GalleryImage, type GalleryProps, GridView, type GridViewEmptyState, type GridViewProps, type GridViewSelection, Hero, type HeroCta, type HeroProps, type ImageFieldConfig, type ImageFieldFactory, LegalArbiProvider, ListBlock, type ListBlockProps, type ListItem, LiveDataProvider, type LoadResult, LogoCloud, type LogoCloudProps, type LogoItem, type MaterializeOptions, type MatterContext, MediaText, type MediaTextProps, MetricCard, type MetricCardProps, ModuleManager, type ModuleManagerProps, type ModuleRegistry, type ModuleStoreBundle, type NavLink, Navbar, type NavbarProps, PageHeader, PageRenderer, type PageRendererProps, type PersistVia, type PricingPlan, PricingTable, type PricingTableProps, type PromptConfig, type PromptLibrary, type Prompts, type ResolvedModule, RichTextBlock, type RichTextBlockProps, Section, SectionHeading, type SectionProps, Spacer, type SpacerProps, StatGroup, type StatGroupProps, type StatItem, type StepItem, Steps, type StepsProps, StudioEditor, type StudioEditorProps, type StudioPageMeta, type StudioPersistence, type StudioPersistenceConfig, THEME_STYLE_ID, type TabItem, Tabs, type TabsProps, TeamGrid, type TeamGridProps, type TeamMember, Testimonial, TestimonialGrid, type TestimonialGridProps, type TestimonialItem, type TestimonialProps, type ThemeBundle, ThemeEditor, type ThemeEditorProps, type ThemeEmitMode, type ThemeFonts, type ThemePreset, type ThemeState, type ThemeStoreConfig, type ThemeTokens, Toolbar, type UseImageGen, VerticalBuilder, type VerticalBuilderProps, type VerticalConfig, type VerticalExport, type VerticalExportConfig, type VideoAspect, VideoEmbed, type VideoEmbedProps, WidgetPlaceholder, applyStoredTheme, applyThemeVars, asAssetRef, assetRefId, clearThemeVars, createAgentSelectionStore, createAiFields, createArbiBlocksConfig, createArbiMaterializer, createBlockKit, createImageField, createLiveWidgets, createModuleRegistry, createModuleStore, createPromptLibrary, createSiteBlocks, createStudioPersistence, createThemeStore, createVerticalExport, createWebsiteBlocks, daysUntil, fmtDate, fmtDateTime, fromNow, gbp, hrs, iconMap, initials, isAssetRef, isAuthenticated, materializePageData, matterToContext, pct, tid, toEmbedUrl, toHslTriplet, useAssetResolverActive, useConnection, useFirmAiTask, useImageGen, useLiveDataActive, useSemanticSearch, useWorkspaceDocs };
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { create } from 'zustand';
|
|
2
2
|
import { persist } from 'zustand/middleware';
|
|
3
3
|
import { createContext, useState, useEffect, useCallback, useMemo, useContext, useRef } from 'react';
|
|
4
|
-
import { MessageSquare, Cpu, Code, Cloud, Layers, Target, Award, MapPin, Phone, Mail, Lock, Globe, Heart, Star, Rocket, Shield, Zap, Sparkles, Gavel, Scale, Bell, Activity, BarChart3, DollarSign, TrendingUp, Info, AlertCircle, CheckCircle, Clock, Calendar, Briefcase, Users, Folder, FileText, RotateCcw, Palette, Search, ArrowUpRight, ArrowDownRight, ImageIcon, ArrowRight, Quote, ChevronDown, XCircle, AlertTriangle, CheckCircle2, Check, X, Menu, ArrowLeft, Loader2, ChevronUp, BrainCircuit, Bot, LayoutGrid, FileJson, Save, Download, ImagePlus, Upload, Link2, MessagesSquare } from 'lucide-react';
|
|
5
|
-
import { Input, Card, CardHeader, CardTitle, CardContent, useArbi, ArbiProvider, useAiTask, useWorkspaceDocs as useWorkspaceDocs$1, useSemanticSearch as useSemanticSearch$1, cn, Table, TableHeader, TableRow, TableHead, TableBody, TableCell, Button, Avatar, AvatarImage, AvatarFallback, AiMarkdown, Badge, Switch, useConfigs, useAgents, Checkbox, Tabs as Tabs$1, TabsList, TabsTrigger, TabsContent, Separator, ArbiWebSocketProvider, useDocuments, useThumbnails, useConversations } from '@arbidocs/react';
|
|
4
|
+
import { MessageSquare, Cpu, Code, Cloud, Layers, Target, Award, MapPin, Phone, Mail, Lock, Globe, Heart, Star, Rocket, Shield, Zap, Sparkles, Gavel, Scale, Bell, Activity, BarChart3, DollarSign, TrendingUp, Info, AlertCircle, CheckCircle, Clock, Calendar, Briefcase, Users, Folder, FileText, RotateCcw, Palette, Search, ArrowUpRight, ArrowDownRight, ImageIcon, ArrowRight, Quote, ChevronDown, XCircle, AlertTriangle, CheckCircle2, Check, X, Menu, ArrowLeft, Loader2, ChevronUp, BrainCircuit, Bot, LayoutGrid, FileJson, Save, Download, Crop, ImagePlus, Upload, Link2, MessagesSquare } from 'lucide-react';
|
|
5
|
+
import { Input, Card, CardHeader, CardTitle, CardContent, useArbi, ArbiProvider, useAiTask, useWorkspaceDocs as useWorkspaceDocs$1, useSemanticSearch as useSemanticSearch$1, cn, Table, TableHeader, TableRow, TableHead, TableBody, TableCell, Button, Avatar, AvatarImage, AvatarFallback, AiMarkdown, NotificationBell, UserMenu, Badge, Switch, useConfigs, useAgents, Checkbox, Tabs as Tabs$1, TabsList, TabsTrigger, TabsContent, Separator, ArbiWebSocketProvider, useDocuments, useThumbnails, ImageCropModal, DEFAULT_ASPECT_OPTIONS, useConversations } from '@arbidocs/react';
|
|
6
6
|
export { Table, TableBody, TableCell, TableHead, TableHeader, TableRow, redlineStats, textToArtifact, toRedlineMarkdown } from '@arbidocs/react';
|
|
7
7
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
8
8
|
import { QueryClient, QueryClientProvider, useQuery, useQueryClient } from '@tanstack/react-query';
|
|
@@ -603,7 +603,25 @@ function ConnectionProvider({
|
|
|
603
603
|
await arbi.selectWorkspace(target.external_id);
|
|
604
604
|
setWorkspaceId(target.external_id);
|
|
605
605
|
}
|
|
606
|
-
|
|
606
|
+
let resolved = { name: email.split("@")[0], email };
|
|
607
|
+
try {
|
|
608
|
+
const me = arbi.user.identity();
|
|
609
|
+
const members = await arbi.workspaces.listUsers();
|
|
610
|
+
const self = members.find((m) => m.user.external_id === me?.externalId)?.user;
|
|
611
|
+
if (self) {
|
|
612
|
+
const fullName = [self.given_name, self.family_name].filter(Boolean).join(" ").trim();
|
|
613
|
+
resolved = {
|
|
614
|
+
name: fullName || email.split("@")[0],
|
|
615
|
+
email: self.email || email,
|
|
616
|
+
externalId: self.external_id,
|
|
617
|
+
picture: self.picture ?? null
|
|
618
|
+
};
|
|
619
|
+
} else if (me?.externalId) {
|
|
620
|
+
resolved.externalId = me.externalId;
|
|
621
|
+
}
|
|
622
|
+
} catch {
|
|
623
|
+
}
|
|
624
|
+
setUser(resolved);
|
|
607
625
|
setStatus("authenticated");
|
|
608
626
|
} catch (e) {
|
|
609
627
|
setError(e instanceof Error ? e.message : "Sign-in failed. Check your credentials.");
|
|
@@ -2449,6 +2467,74 @@ function AppShell({
|
|
|
2449
2467
|
}
|
|
2450
2468
|
);
|
|
2451
2469
|
}
|
|
2470
|
+
function AppHeader({
|
|
2471
|
+
onSearch,
|
|
2472
|
+
onAsk,
|
|
2473
|
+
searchPlaceholder = "Ask AI or search\u2026",
|
|
2474
|
+
searchKbd = "\u2318K",
|
|
2475
|
+
askLabel = "Ask AI",
|
|
2476
|
+
leading,
|
|
2477
|
+
actions,
|
|
2478
|
+
user,
|
|
2479
|
+
userItems,
|
|
2480
|
+
onLogout,
|
|
2481
|
+
onNotificationNavigate,
|
|
2482
|
+
notificationTones,
|
|
2483
|
+
classNames,
|
|
2484
|
+
testIdPrefix = "app"
|
|
2485
|
+
}) {
|
|
2486
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2487
|
+
/* @__PURE__ */ jsxs(
|
|
2488
|
+
"button",
|
|
2489
|
+
{
|
|
2490
|
+
type: "button",
|
|
2491
|
+
onClick: onSearch,
|
|
2492
|
+
className: classNames?.search ?? "relative hidden max-w-md flex-1 items-center rounded-md border border-input bg-background py-2 pl-9 pr-3 text-left text-sm text-muted-foreground transition-colors hover:bg-accent md:flex",
|
|
2493
|
+
"data-testid": tid(testIdPrefix, "global-search"),
|
|
2494
|
+
children: [
|
|
2495
|
+
/* @__PURE__ */ jsx(Search, { className: "pointer-events-none absolute left-3 top-1/2 size-4 -translate-y-1/2 text-muted-foreground" }),
|
|
2496
|
+
/* @__PURE__ */ jsx("span", { className: "flex-1", children: searchPlaceholder }),
|
|
2497
|
+
/* @__PURE__ */ jsx("kbd", { className: "rounded border border-border px-1.5 py-0.5 text-[10px]", children: searchKbd })
|
|
2498
|
+
]
|
|
2499
|
+
}
|
|
2500
|
+
),
|
|
2501
|
+
/* @__PURE__ */ jsxs("div", { className: "ml-auto flex items-center gap-3", children: [
|
|
2502
|
+
leading,
|
|
2503
|
+
/* @__PURE__ */ jsxs(
|
|
2504
|
+
Button,
|
|
2505
|
+
{
|
|
2506
|
+
size: "sm",
|
|
2507
|
+
onClick: onAsk ?? onSearch,
|
|
2508
|
+
className: classNames?.askButton,
|
|
2509
|
+
"data-testid": tid(testIdPrefix, "ask-ai"),
|
|
2510
|
+
children: [
|
|
2511
|
+
/* @__PURE__ */ jsx(Sparkles, { className: "size-4" }),
|
|
2512
|
+
askLabel
|
|
2513
|
+
]
|
|
2514
|
+
}
|
|
2515
|
+
),
|
|
2516
|
+
actions,
|
|
2517
|
+
/* @__PURE__ */ jsx(
|
|
2518
|
+
NotificationBell,
|
|
2519
|
+
{
|
|
2520
|
+
testId: tid(testIdPrefix, "notifications"),
|
|
2521
|
+
onNavigate: onNotificationNavigate,
|
|
2522
|
+
toneClassNames: notificationTones
|
|
2523
|
+
}
|
|
2524
|
+
),
|
|
2525
|
+
/* @__PURE__ */ jsx(
|
|
2526
|
+
UserMenu,
|
|
2527
|
+
{
|
|
2528
|
+
user,
|
|
2529
|
+
items: userItems,
|
|
2530
|
+
onLogout,
|
|
2531
|
+
testId: tid(testIdPrefix, "user-menu"),
|
|
2532
|
+
logoutTestId: tid(testIdPrefix, "logout")
|
|
2533
|
+
}
|
|
2534
|
+
)
|
|
2535
|
+
] })
|
|
2536
|
+
] });
|
|
2537
|
+
}
|
|
2452
2538
|
var LiveDataContext = createContext(false);
|
|
2453
2539
|
function useLiveDataActive() {
|
|
2454
2540
|
return useContext(LiveDataContext);
|
|
@@ -3218,6 +3304,9 @@ function useImageGen() {
|
|
|
3218
3304
|
reset: task.reset
|
|
3219
3305
|
};
|
|
3220
3306
|
}
|
|
3307
|
+
function toJpgName(name) {
|
|
3308
|
+
return name.replace(/\.[^.]+$/, "") + ".jpg";
|
|
3309
|
+
}
|
|
3221
3310
|
var IMAGE_EXT = /\.(png|jpe?g|webp|gif|avif|svg)$/i;
|
|
3222
3311
|
function ImageFieldControl({
|
|
3223
3312
|
value,
|
|
@@ -3231,9 +3320,12 @@ function ImageFieldControl({
|
|
|
3231
3320
|
const [url, setUrl] = useState("");
|
|
3232
3321
|
const [prompt, setPrompt] = useState("");
|
|
3233
3322
|
const [busy, setBusy] = useState(false);
|
|
3323
|
+
const [cropSrc, setCropSrc] = useState(null);
|
|
3324
|
+
const [cropName, setCropName] = useState("image.jpg");
|
|
3234
3325
|
const arbi = useArbi();
|
|
3235
3326
|
const gen = useImageGen();
|
|
3236
3327
|
const queryClient = useQueryClient();
|
|
3328
|
+
const currentAssetImage = useAssetImage(isAssetRef(value) ? assetRefId(value) : "");
|
|
3237
3329
|
const tp = (...q) => tid(`${testIdPrefix}-image`, name, ...q);
|
|
3238
3330
|
const refreshAssets = () => queryClient.invalidateQueries({ queryKey: ["arbi", "documents", workspaceId] });
|
|
3239
3331
|
const { data: docs } = useDocuments(workspaceId);
|
|
@@ -3248,13 +3340,24 @@ function ImageFieldControl({
|
|
|
3248
3340
|
[imageDocs]
|
|
3249
3341
|
);
|
|
3250
3342
|
const { data: thumbs } = useThumbnails(imageIds);
|
|
3251
|
-
const onUpload =
|
|
3343
|
+
const onUpload = (e) => {
|
|
3252
3344
|
const file = e.target.files?.[0];
|
|
3253
3345
|
if (!file) return;
|
|
3346
|
+
setCropName(toJpgName(file.name));
|
|
3347
|
+
setCropSrc(URL.createObjectURL(file));
|
|
3348
|
+
e.target.value = "";
|
|
3349
|
+
};
|
|
3350
|
+
const openReframe = () => {
|
|
3351
|
+
if (!currentAssetImage) return;
|
|
3352
|
+
setCropName("reframe.jpg");
|
|
3353
|
+
setCropSrc(currentAssetImage);
|
|
3354
|
+
};
|
|
3355
|
+
const uploadBlobAsAsset = async (blob, name2) => {
|
|
3254
3356
|
setBusy(true);
|
|
3255
3357
|
try {
|
|
3256
3358
|
await arbi.selectWorkspace(workspaceId);
|
|
3257
|
-
const
|
|
3359
|
+
const file = new File([blob], name2, { type: blob.type });
|
|
3360
|
+
const res = await arbi.documents.uploadFile(file, name2, { folder });
|
|
3258
3361
|
const id = res.doc_ext_ids?.[0];
|
|
3259
3362
|
if (id) {
|
|
3260
3363
|
onChange(asAssetRef(id));
|
|
@@ -3264,6 +3367,12 @@ function ImageFieldControl({
|
|
|
3264
3367
|
setBusy(false);
|
|
3265
3368
|
}
|
|
3266
3369
|
};
|
|
3370
|
+
const onCropComplete = async (result) => {
|
|
3371
|
+
const src = cropSrc;
|
|
3372
|
+
setCropSrc(null);
|
|
3373
|
+
await uploadBlobAsAsset(result.blob, cropName);
|
|
3374
|
+
if (src?.startsWith("blob:")) URL.revokeObjectURL(src);
|
|
3375
|
+
};
|
|
3267
3376
|
const onGenerate = async () => {
|
|
3268
3377
|
if (!prompt.trim() || gen.isGenerating) return;
|
|
3269
3378
|
const id = await gen.generate(prompt);
|
|
@@ -3281,7 +3390,22 @@ function ImageFieldControl({
|
|
|
3281
3390
|
const inputClass = "w-full rounded-md border border-border bg-card px-2.5 py-1.5 text-sm text-foreground outline-none focus:border-primary";
|
|
3282
3391
|
const tabClass = (on) => `inline-flex items-center gap-1 rounded-md px-2 py-1 text-xs font-medium ${on ? "bg-primary text-primary-foreground" : "text-muted-foreground hover:text-foreground"}`;
|
|
3283
3392
|
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", "data-testid": tp(), children: [
|
|
3284
|
-
/* @__PURE__ */
|
|
3393
|
+
/* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
3394
|
+
/* @__PURE__ */ jsx(BlockImage, { src: value, aspect: "16:9", rounded: "md", testId: tp("preview") }),
|
|
3395
|
+
currentAssetImage ? /* @__PURE__ */ jsxs(
|
|
3396
|
+
"button",
|
|
3397
|
+
{
|
|
3398
|
+
type: "button",
|
|
3399
|
+
onClick: openReframe,
|
|
3400
|
+
className: "absolute right-1.5 top-1.5 inline-flex items-center gap-1 rounded-md bg-background/85 px-2 py-1 text-xs font-medium text-foreground shadow-sm backdrop-blur hover:bg-background",
|
|
3401
|
+
"data-testid": tp("reframe"),
|
|
3402
|
+
children: [
|
|
3403
|
+
/* @__PURE__ */ jsx(Crop, { className: "size-3" }),
|
|
3404
|
+
" Crop"
|
|
3405
|
+
]
|
|
3406
|
+
}
|
|
3407
|
+
) : null
|
|
3408
|
+
] }),
|
|
3285
3409
|
/* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1", children: MODES.map((m) => /* @__PURE__ */ jsxs(
|
|
3286
3410
|
"button",
|
|
3287
3411
|
{
|
|
@@ -3398,6 +3522,19 @@ function ImageFieldControl({
|
|
|
3398
3522
|
"data-testid": tp("clear"),
|
|
3399
3523
|
children: "Clear"
|
|
3400
3524
|
}
|
|
3525
|
+
),
|
|
3526
|
+
/* @__PURE__ */ jsx(
|
|
3527
|
+
ImageCropModal,
|
|
3528
|
+
{
|
|
3529
|
+
open: !!cropSrc,
|
|
3530
|
+
image: cropSrc,
|
|
3531
|
+
title: "Frame your image",
|
|
3532
|
+
aspectOptions: DEFAULT_ASPECT_OPTIONS,
|
|
3533
|
+
cropShape: "rect",
|
|
3534
|
+
output: { maxSize: 1600 },
|
|
3535
|
+
onComplete: onCropComplete,
|
|
3536
|
+
onCancel: () => setCropSrc(null)
|
|
3537
|
+
}
|
|
3401
3538
|
)
|
|
3402
3539
|
] });
|
|
3403
3540
|
}
|
|
@@ -5450,6 +5587,6 @@ function VerticalBuilder({
|
|
|
5450
5587
|
] });
|
|
5451
5588
|
}
|
|
5452
5589
|
|
|
5453
|
-
export { ASSET_REF_PREFIX, Accordion, AgentsPanel, AppShell, AssetResolverProvider, AvatarBlock, Banner, BlockImage, CTABanner, Callout, Columns, ConnectionProvider, ContactForm, Container, DataTable, DataTableBlock, EmptyState, FAQ, FeatureGrid, Footer, Gallery, GridView, Hero, LegalArbiProvider, ListBlock, LiveDataProvider, LogoCloud, MediaText, MetricCard, ModuleManager, Navbar, PageHeader, PageRenderer, PricingTable, RichTextBlock, Section, SectionHeading, Spacer, StatGroup, Steps, StudioEditor, THEME_STYLE_ID, Tabs, TeamGrid, Testimonial, TestimonialGrid, ThemeEditor, Toolbar, VerticalBuilder, VideoEmbed, WidgetPlaceholder, applyStoredTheme, applyThemeVars, asAssetRef, assetRefId, clearThemeVars, createAgentSelectionStore, createAiFields, createArbiBlocksConfig, createArbiMaterializer, createBlockKit, createImageField, createLiveWidgets, createModuleRegistry, createModuleStore, createPromptLibrary, createSiteBlocks, createStudioPersistence, createThemeStore, createVerticalExport, createWebsiteBlocks, daysUntil, fmtDate, fmtDateTime, fromNow, gbp, hrs, iconMap, initials, isAssetRef, isAuthenticated, materializePageData, matterToContext, pct, tid, toEmbedUrl, toHslTriplet, useAssetResolverActive, useConnection, useFirmAiTask, useImageGen, useLiveDataActive, useSemanticSearch, useWorkspaceDocs };
|
|
5590
|
+
export { ASSET_REF_PREFIX, Accordion, AgentsPanel, AppHeader, AppShell, AssetResolverProvider, AvatarBlock, Banner, BlockImage, CTABanner, Callout, Columns, ConnectionProvider, ContactForm, Container, DataTable, DataTableBlock, EmptyState, FAQ, FeatureGrid, Footer, Gallery, GridView, Hero, LegalArbiProvider, ListBlock, LiveDataProvider, LogoCloud, MediaText, MetricCard, ModuleManager, Navbar, PageHeader, PageRenderer, PricingTable, RichTextBlock, Section, SectionHeading, Spacer, StatGroup, Steps, StudioEditor, THEME_STYLE_ID, Tabs, TeamGrid, Testimonial, TestimonialGrid, ThemeEditor, Toolbar, VerticalBuilder, VideoEmbed, WidgetPlaceholder, applyStoredTheme, applyThemeVars, asAssetRef, assetRefId, clearThemeVars, createAgentSelectionStore, createAiFields, createArbiBlocksConfig, createArbiMaterializer, createBlockKit, createImageField, createLiveWidgets, createModuleRegistry, createModuleStore, createPromptLibrary, createSiteBlocks, createStudioPersistence, createThemeStore, createVerticalExport, createWebsiteBlocks, daysUntil, fmtDate, fmtDateTime, fromNow, gbp, hrs, iconMap, initials, isAssetRef, isAuthenticated, materializePageData, matterToContext, pct, tid, toEmbedUrl, toHslTriplet, useAssetResolverActive, useConnection, useFirmAiTask, useImageGen, useLiveDataActive, useSemanticSearch, useWorkspaceDocs };
|
|
5454
5591
|
//# sourceMappingURL=index.js.map
|
|
5455
5592
|
//# sourceMappingURL=index.js.map
|