@theaiplatform/miniapp-sdk 0.0.1 → 0.0.2

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/ui.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
2
+ import * as AvatarPrimitive from '@radix-ui/react-avatar';
2
3
  import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
3
4
  import { ClassProp } from 'class-variance-authority/types';
4
5
  import { ClassValue } from 'clsx';
@@ -86,6 +87,30 @@ declare const alertVariants: (props?: ({
86
87
  variant?: "default" | "info" | "destructive" | "warning" | "success" | null | undefined;
87
88
  } & ClassProp) | undefined) => string;
88
89
 
90
+ export declare function Avatar({ className, ref, ...props }: React_2.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root> & {
91
+ ref?: React_2.Ref<React_2.ComponentRef<typeof AvatarPrimitive.Root>>;
92
+ }): JSX.Element;
93
+
94
+ export declare namespace Avatar {
95
+ var displayName: string | undefined;
96
+ }
97
+
98
+ export declare function AvatarFallback({ className, ref, ...props }: React_2.ComponentPropsWithoutRef<typeof AvatarPrimitive.Fallback> & {
99
+ ref?: React_2.Ref<React_2.ComponentRef<typeof AvatarPrimitive.Fallback>>;
100
+ }): JSX.Element;
101
+
102
+ export declare namespace AvatarFallback {
103
+ var displayName: string | undefined;
104
+ }
105
+
106
+ export declare function AvatarImage({ className, ref, ...props }: React_2.ComponentPropsWithoutRef<typeof AvatarPrimitive.Image> & {
107
+ ref?: React_2.Ref<React_2.ComponentRef<typeof AvatarPrimitive.Image>>;
108
+ }): JSX.Element;
109
+
110
+ export declare namespace AvatarImage {
111
+ var displayName: string | undefined;
112
+ }
113
+
89
114
  export declare function Badge({ className, variant, ...props }: BadgeProps): JSX.Element;
90
115
 
91
116
  declare interface BadgeProps extends React_2.HTMLAttributes<HTMLSpanElement>, VariantProps<typeof badgeVariants> {
@@ -500,6 +525,104 @@ export declare interface MiniAppIconButtonProps extends Omit<ButtonProps, 'child
500
525
  tooltipSide?: React_2.ComponentProps<typeof TooltipContent>['side'];
501
526
  }
502
527
 
528
+ export declare function MiniAppMetric({ className, ...props }: React_2.ComponentProps<typeof Card>): JSX.Element;
529
+
530
+ export declare namespace MiniAppMetric {
531
+ var displayName: string;
532
+ }
533
+
534
+ export declare function MiniAppMetricContent({ className, ...props }: React_2.ComponentProps<typeof CardContent>): JSX.Element;
535
+
536
+ export declare namespace MiniAppMetricContent {
537
+ var displayName: string;
538
+ }
539
+
540
+ export declare function MiniAppMetricDetail({ className, ...props }: React_2.ComponentProps<'p'>): JSX.Element;
541
+
542
+ export declare namespace MiniAppMetricDetail {
543
+ var displayName: string;
544
+ }
545
+
546
+ export declare function MiniAppMetricHeader({ className, ...props }: React_2.ComponentProps<typeof CardHeader>): JSX.Element;
547
+
548
+ export declare namespace MiniAppMetricHeader {
549
+ var displayName: string;
550
+ }
551
+
552
+ export declare function MiniAppMetricLabel({ className, ...props }: React_2.ComponentProps<'div'>): JSX.Element;
553
+
554
+ export declare namespace MiniAppMetricLabel {
555
+ var displayName: string;
556
+ }
557
+
558
+ export declare function MiniAppMetricValue({ className, ...props }: React_2.ComponentProps<'div'>): JSX.Element;
559
+
560
+ export declare namespace MiniAppMetricValue {
561
+ var displayName: string;
562
+ }
563
+
564
+ export declare function MiniAppPageHeader({ className, ref, ...props }: React_2.ComponentProps<'header'> & {
565
+ ref?: React_2.Ref<HTMLElement>;
566
+ }): JSX.Element;
567
+
568
+ export declare namespace MiniAppPageHeader {
569
+ var displayName: string;
570
+ }
571
+
572
+ export declare function MiniAppPageHeaderActions({ className, ...props }: React_2.ComponentProps<'div'>): JSX.Element;
573
+
574
+ export declare namespace MiniAppPageHeaderActions {
575
+ var displayName: string;
576
+ }
577
+
578
+ export declare function MiniAppPageHeaderContent({ className, ...props }: React_2.ComponentProps<'div'>): JSX.Element;
579
+
580
+ export declare namespace MiniAppPageHeaderContent {
581
+ var displayName: string;
582
+ }
583
+
584
+ export declare function MiniAppPageHeaderDescription({ className, ...props }: React_2.ComponentProps<'p'>): JSX.Element;
585
+
586
+ export declare namespace MiniAppPageHeaderDescription {
587
+ var displayName: string;
588
+ }
589
+
590
+ export declare function MiniAppPageHeaderTitle({ className, ...props }: React_2.ComponentProps<typeof H1>): JSX.Element;
591
+
592
+ export declare namespace MiniAppPageHeaderTitle {
593
+ var displayName: string;
594
+ }
595
+
596
+ export declare function MiniAppSectionHeader({ className, ...props }: React_2.ComponentProps<'header'>): JSX.Element;
597
+
598
+ export declare namespace MiniAppSectionHeader {
599
+ var displayName: string;
600
+ }
601
+
602
+ export declare function MiniAppSectionHeaderActions({ className, ...props }: React_2.ComponentProps<'div'>): JSX.Element;
603
+
604
+ export declare namespace MiniAppSectionHeaderActions {
605
+ var displayName: string;
606
+ }
607
+
608
+ export declare function MiniAppSectionHeaderContent({ className, ...props }: React_2.ComponentProps<'div'>): JSX.Element;
609
+
610
+ export declare namespace MiniAppSectionHeaderContent {
611
+ var displayName: string;
612
+ }
613
+
614
+ export declare function MiniAppSectionHeaderDescription({ className, ...props }: React_2.ComponentProps<'p'>): JSX.Element;
615
+
616
+ export declare namespace MiniAppSectionHeaderDescription {
617
+ var displayName: string;
618
+ }
619
+
620
+ export declare function MiniAppSectionHeaderTitle({ className, ...props }: React_2.ComponentProps<typeof H2>): JSX.Element;
621
+
622
+ export declare namespace MiniAppSectionHeaderTitle {
623
+ var displayName: string;
624
+ }
625
+
503
626
  export declare function MiniAppStatusBar({ children, className, tone, ...props }: MiniAppStatusBarProps): JSX.Element;
504
627
 
505
628
  export declare namespace MiniAppStatusBar {
@@ -735,6 +858,43 @@ export declare namespace Slider {
735
858
  var displayName: string;
736
859
  }
737
860
 
861
+ /**
862
+ * StatusIndicator - A semantic status dot for compact status surfaces.
863
+ *
864
+ * @example
865
+ * ```tsx
866
+ * <StatusIndicator label="Service available" tone="success" size="sm" />
867
+ * <StatusIndicator label="Action required" tone="warning" size="md" />
868
+ * ```
869
+ */
870
+ export declare function StatusIndicator({ className, label, ref, size, tone, ...props }: StatusIndicatorProps & {
871
+ ref?: React_2.Ref<HTMLSpanElement>;
872
+ }): JSX.Element;
873
+
874
+ export declare namespace StatusIndicator {
875
+ var displayName: string;
876
+ }
877
+
878
+ /**
879
+ * Props for StatusIndicator component
880
+ */
881
+ export declare interface StatusIndicatorProps extends React_2.HTMLAttributes<HTMLSpanElement>, VariantProps<typeof statusIndicatorVariants> {
882
+ /** Accessible description of the represented status. */
883
+ label: string;
884
+ /** Size variant */
885
+ size?: 'sm' | 'md' | 'lg';
886
+ /** Semantic status tone. */
887
+ tone?: 'success' | 'warning' | 'destructive' | 'neutral';
888
+ }
889
+
890
+ /**
891
+ * Status indicator variants
892
+ */
893
+ declare const statusIndicatorVariants: (props?: ({
894
+ tone?: "destructive" | "warning" | "success" | "neutral" | null | undefined;
895
+ size?: "sm" | "lg" | "md" | null | undefined;
896
+ } & ClassProp) | undefined) => string;
897
+
738
898
  /**
739
899
  * Supported languages for syntax highlighting.
740
900
  * Maps common language identifiers to prism-react-renderer compatible names.
package/dist/ui.js CHANGED
@@ -9,6 +9,7 @@ import { useCallback, useEffect, useRef } from "react";
9
9
  import { Group, Panel, Separator as external_react_resizable_panels_Separator } from "react-resizable-panels";
10
10
  import * as __rspack_external_react from "react";
11
11
  import * as __rspack_external__radix_ui_react_alert_dialog_df21c073 from "@radix-ui/react-alert-dialog";
12
+ import * as __rspack_external__radix_ui_react_avatar_44cfeec7 from "@radix-ui/react-avatar";
12
13
  import * as __rspack_external__radix_ui_react_separator_c79cca86 from "@radix-ui/react-separator";
13
14
  import * as __rspack_external__radix_ui_react_checkbox_76182ac8 from "@radix-ui/react-checkbox";
14
15
  import * as __rspack_external__radix_ui_react_dialog_dabd8325 from "@radix-ui/react-dialog";
@@ -429,6 +430,33 @@ function Badge({ className, variant, ...props }) {
429
430
  ...props
430
431
  });
431
432
  }
433
+ function Avatar({ className, ref, ...props }) {
434
+ return /*#__PURE__*/ __rspack_external_react.createElement(__rspack_external__radix_ui_react_avatar_44cfeec7.Root, {
435
+ ref: ref,
436
+ ...props,
437
+ "data-component": "avatar",
438
+ className: cn('relative flex size-10 shrink-0 overflow-hidden rounded-full', className)
439
+ });
440
+ }
441
+ Avatar.displayName = __rspack_external__radix_ui_react_avatar_44cfeec7.Root.displayName;
442
+ function AvatarImage({ className, ref, ...props }) {
443
+ return /*#__PURE__*/ __rspack_external_react.createElement(__rspack_external__radix_ui_react_avatar_44cfeec7.Image, {
444
+ ref: ref,
445
+ ...props,
446
+ "data-component": "avatar-image",
447
+ className: cn('aspect-square size-full', className)
448
+ });
449
+ }
450
+ AvatarImage.displayName = __rspack_external__radix_ui_react_avatar_44cfeec7.Image.displayName;
451
+ function AvatarFallback({ className, ref, ...props }) {
452
+ return /*#__PURE__*/ __rspack_external_react.createElement(__rspack_external__radix_ui_react_avatar_44cfeec7.Fallback, {
453
+ ref: ref,
454
+ ...props,
455
+ "data-component": "avatar-fallback",
456
+ className: cn('bg-muted flex size-full items-center justify-center rounded-full text-sm font-medium', className)
457
+ });
458
+ }
459
+ AvatarFallback.displayName = __rspack_external__radix_ui_react_avatar_44cfeec7.Fallback.displayName;
432
460
  function Separator({ className, orientation = 'horizontal', decorative = true, ref, ...props }) {
433
461
  return /*#__PURE__*/ __rspack_external_react.createElement(__rspack_external__radix_ui_react_separator_c79cca86.Root, {
434
462
  ref: ref,
@@ -1363,9 +1391,10 @@ TooltipContent.displayName = __rspack_external__radix_ui_react_tooltip_b301f25d.
1363
1391
  function MiniAppToolbar({ className, ref, ...props }) {
1364
1392
  return /*#__PURE__*/ __rspack_external_react.createElement("header", {
1365
1393
  ref: ref,
1394
+ ...props,
1395
+ "data-component": "mini-app-toolbar",
1366
1396
  "data-slot": "mini-app-toolbar",
1367
- className: cn('bg-sidebar/50 border-workspace-divider flex min-h-12 shrink-0 items-center gap-3 border-b px-4 py-2', className),
1368
- ...props
1397
+ className: cn('bg-sidebar/50 border-workspace-divider flex min-h-12 shrink-0 items-center gap-3 border-b px-4 py-2', className)
1369
1398
  });
1370
1399
  }
1371
1400
  MiniAppToolbar.displayName = 'MiniAppToolbar';
@@ -1375,12 +1404,13 @@ function MiniAppIconButton({ icon, label, size = 'icon-xs', tooltipSide = 'botto
1375
1404
  }, /*#__PURE__*/ __rspack_external_react.createElement(TooltipTrigger, {
1376
1405
  asChild: true
1377
1406
  }, /*#__PURE__*/ __rspack_external_react.createElement(Button, {
1407
+ ...props,
1378
1408
  type: type,
1379
1409
  variant: variant,
1380
1410
  size: size,
1381
1411
  "aria-label": label,
1382
- "data-slot": "mini-app-icon-button",
1383
- ...props
1412
+ "data-component": "mini-app-icon-button",
1413
+ "data-slot": "mini-app-icon-button"
1384
1414
  }, /*#__PURE__*/ __rspack_external_react.createElement(icon_Icon, {
1385
1415
  icon: icon,
1386
1416
  size: "sm",
@@ -1392,17 +1422,147 @@ function MiniAppIconButton({ icon, label, size = 'icon-xs', tooltipSide = 'botto
1392
1422
  MiniAppIconButton.displayName = 'MiniAppIconButton';
1393
1423
  function MiniAppStatusBar({ children, className, tone = 'neutral', ...props }) {
1394
1424
  return /*#__PURE__*/ __rspack_external_react.createElement(Alert, {
1425
+ ...props,
1395
1426
  role: "status",
1396
1427
  "aria-live": "polite",
1428
+ "data-component": "mini-app-status-bar",
1397
1429
  "data-slot": "mini-app-status-bar",
1398
1430
  variant: 'error' === tone ? 'destructive' : 'success' === tone ? 'success' : 'default',
1399
- className: cn('max-h-16 overflow-auto rounded-none border-x-0 border-b-0 px-3 py-1.5', className),
1400
- ...props
1431
+ className: cn('max-h-16 overflow-auto rounded-none border-x-0 border-b-0 px-3 py-1.5', className)
1401
1432
  }, /*#__PURE__*/ __rspack_external_react.createElement(AlertDescription, {
1402
1433
  className: "text-xs"
1403
1434
  }, children));
1404
1435
  }
1405
1436
  MiniAppStatusBar.displayName = 'MiniAppStatusBar';
1437
+ function MiniAppPageHeader({ className, ref, ...props }) {
1438
+ return /*#__PURE__*/ __rspack_external_react.createElement("header", {
1439
+ ref: ref,
1440
+ ...props,
1441
+ "data-component": "mini-app-page-header",
1442
+ className: cn('flex flex-wrap items-start justify-between gap-4', className)
1443
+ });
1444
+ }
1445
+ MiniAppPageHeader.displayName = 'MiniAppPageHeader';
1446
+ function MiniAppPageHeaderContent({ className, ...props }) {
1447
+ return /*#__PURE__*/ __rspack_external_react.createElement("div", {
1448
+ ...props,
1449
+ "data-component": "mini-app-page-header-content",
1450
+ className: cn('min-w-0 flex-1 space-y-1', className)
1451
+ });
1452
+ }
1453
+ MiniAppPageHeaderContent.displayName = 'MiniAppPageHeaderContent';
1454
+ function MiniAppPageHeaderTitle({ className, ...props }) {
1455
+ return /*#__PURE__*/ __rspack_external_react.createElement(H1, {
1456
+ ...props,
1457
+ "data-component": "mini-app-page-header-title",
1458
+ className: cn('text-2xl leading-8', className)
1459
+ });
1460
+ }
1461
+ MiniAppPageHeaderTitle.displayName = 'MiniAppPageHeaderTitle';
1462
+ function MiniAppPageHeaderDescription({ className, ...props }) {
1463
+ return /*#__PURE__*/ __rspack_external_react.createElement("p", {
1464
+ ...props,
1465
+ "data-component": "mini-app-page-header-description",
1466
+ className: cn('text-muted-foreground text-sm', className)
1467
+ });
1468
+ }
1469
+ MiniAppPageHeaderDescription.displayName = "MiniAppPageHeaderDescription";
1470
+ function MiniAppPageHeaderActions({ className, ...props }) {
1471
+ return /*#__PURE__*/ __rspack_external_react.createElement("div", {
1472
+ ...props,
1473
+ "data-component": "mini-app-page-header-actions",
1474
+ className: cn('flex shrink-0 flex-wrap items-center gap-2', className)
1475
+ });
1476
+ }
1477
+ MiniAppPageHeaderActions.displayName = 'MiniAppPageHeaderActions';
1478
+ function MiniAppSectionHeader({ className, ...props }) {
1479
+ return /*#__PURE__*/ __rspack_external_react.createElement("header", {
1480
+ ...props,
1481
+ "data-component": "mini-app-section-header",
1482
+ className: cn('flex flex-wrap items-start justify-between gap-3', className)
1483
+ });
1484
+ }
1485
+ MiniAppSectionHeader.displayName = 'MiniAppSectionHeader';
1486
+ function MiniAppSectionHeaderContent({ className, ...props }) {
1487
+ return /*#__PURE__*/ __rspack_external_react.createElement("div", {
1488
+ ...props,
1489
+ "data-component": "mini-app-section-header-content",
1490
+ className: cn('min-w-0 flex-1 space-y-1', className)
1491
+ });
1492
+ }
1493
+ MiniAppSectionHeaderContent.displayName = 'MiniAppSectionHeaderContent';
1494
+ function MiniAppSectionHeaderTitle({ className, ...props }) {
1495
+ return /*#__PURE__*/ __rspack_external_react.createElement(H2, {
1496
+ ...props,
1497
+ "data-component": "mini-app-section-header-title",
1498
+ className: cn('text-lg leading-7', className)
1499
+ });
1500
+ }
1501
+ MiniAppSectionHeaderTitle.displayName = 'MiniAppSectionHeaderTitle';
1502
+ function MiniAppSectionHeaderDescription({ className, ...props }) {
1503
+ return /*#__PURE__*/ __rspack_external_react.createElement("p", {
1504
+ ...props,
1505
+ "data-component": "mini-app-section-header-description",
1506
+ className: cn('text-muted-foreground text-sm', className)
1507
+ });
1508
+ }
1509
+ MiniAppSectionHeaderDescription.displayName = "MiniAppSectionHeaderDescription";
1510
+ function MiniAppSectionHeaderActions({ className, ...props }) {
1511
+ return /*#__PURE__*/ __rspack_external_react.createElement("div", {
1512
+ ...props,
1513
+ "data-component": "mini-app-section-header-actions",
1514
+ className: cn('flex shrink-0 flex-wrap items-center gap-2', className)
1515
+ });
1516
+ }
1517
+ MiniAppSectionHeaderActions.displayName = 'MiniAppSectionHeaderActions';
1518
+ function MiniAppMetric({ className, ...props }) {
1519
+ return /*#__PURE__*/ __rspack_external_react.createElement(Card, {
1520
+ ...props,
1521
+ "data-component": "mini-app-metric",
1522
+ className: cn('border p-0', className)
1523
+ });
1524
+ }
1525
+ MiniAppMetric.displayName = 'MiniAppMetric';
1526
+ function MiniAppMetricHeader({ className, ...props }) {
1527
+ return /*#__PURE__*/ __rspack_external_react.createElement(CardHeader, {
1528
+ ...props,
1529
+ "data-component": "mini-app-metric-header",
1530
+ className: cn('flex-row items-center justify-between gap-2 p-4 pb-0', className)
1531
+ });
1532
+ }
1533
+ MiniAppMetricHeader.displayName = 'MiniAppMetricHeader';
1534
+ function MiniAppMetricLabel({ className, ...props }) {
1535
+ return /*#__PURE__*/ __rspack_external_react.createElement("div", {
1536
+ ...props,
1537
+ "data-component": "mini-app-metric-label",
1538
+ className: cn('text-muted-foreground text-sm font-medium', className)
1539
+ });
1540
+ }
1541
+ MiniAppMetricLabel.displayName = 'MiniAppMetricLabel';
1542
+ function MiniAppMetricContent({ className, ...props }) {
1543
+ return /*#__PURE__*/ __rspack_external_react.createElement(CardContent, {
1544
+ ...props,
1545
+ "data-component": "mini-app-metric-content",
1546
+ className: cn('space-y-1 p-4 pt-3', className)
1547
+ });
1548
+ }
1549
+ MiniAppMetricContent.displayName = 'MiniAppMetricContent';
1550
+ function MiniAppMetricValue({ className, ...props }) {
1551
+ return /*#__PURE__*/ __rspack_external_react.createElement("div", {
1552
+ ...props,
1553
+ "data-component": "mini-app-metric-value",
1554
+ className: cn('text-foreground text-2xl font-semibold tabular-nums', className)
1555
+ });
1556
+ }
1557
+ MiniAppMetricValue.displayName = 'MiniAppMetricValue';
1558
+ function MiniAppMetricDetail({ className, ...props }) {
1559
+ return /*#__PURE__*/ __rspack_external_react.createElement("p", {
1560
+ ...props,
1561
+ "data-component": "mini-app-metric-detail",
1562
+ className: cn('text-muted-foreground text-xs', className)
1563
+ });
1564
+ }
1565
+ MiniAppMetricDetail.displayName = 'MiniAppMetricDetail';
1406
1566
  function NativeSelect({ className, density = 'default', ref, wrapperClassName, ...props }) {
1407
1567
  return /*#__PURE__*/ __rspack_external_react.createElement("div", {
1408
1568
  className: cn('relative min-w-0 max-w-full', wrapperClassName)
@@ -1715,6 +1875,39 @@ function Slider({ className, ref, 'aria-label': ariaLabel, 'aria-labelledby': ar
1715
1875
  })));
1716
1876
  }
1717
1877
  Slider.displayName = 'Slider';
1878
+ const statusIndicatorVariants = cva('rounded-full', {
1879
+ variants: {
1880
+ tone: {
1881
+ success: 'bg-success',
1882
+ warning: 'bg-warning',
1883
+ destructive: 'bg-destructive',
1884
+ neutral: 'bg-muted-foreground'
1885
+ },
1886
+ size: {
1887
+ sm: 'size-2.5',
1888
+ md: 'size-3',
1889
+ lg: 'size-4'
1890
+ }
1891
+ },
1892
+ defaultVariants: {
1893
+ tone: 'neutral',
1894
+ size: 'md'
1895
+ }
1896
+ });
1897
+ function StatusIndicator({ className, label, ref, size, tone, ...props }) {
1898
+ return /*#__PURE__*/ __rspack_external_react.createElement("span", {
1899
+ ref: ref,
1900
+ ...props,
1901
+ "data-component": "status-indicator",
1902
+ className: cn(statusIndicatorVariants({
1903
+ tone,
1904
+ size
1905
+ }), className),
1906
+ role: "status",
1907
+ "aria-label": label
1908
+ });
1909
+ }
1910
+ StatusIndicator.displayName = 'StatusIndicator';
1718
1911
  const Table = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, density = 'default', ...props }, ref)=>/*#__PURE__*/ __rspack_external_react.createElement("div", {
1719
1912
  className: "relative w-full overflow-auto"
1720
1913
  }, /*#__PURE__*/ __rspack_external_react.createElement("table", {
@@ -1849,4 +2042,4 @@ const ToggleGroupItem = /*#__PURE__*/ __rspack_external_react.forwardRef(({ clas
1849
2042
  ...props
1850
2043
  }, children));
1851
2044
  ToggleGroupItem.displayName = __rspack_external__radix_ui_react_toggle_group_1cb63752.Item.displayName;
1852
- export { Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, Badge, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, H1, H2, H3, H4, H5, H6, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, Label, MiniAppIconButton, MiniAppStatusBar, MiniAppToolbar, NativeSelect, NativeSelectOptGroup, NativeSelectOption, NativeViewOcclusionProvider, Progress, RadioCard, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Skeleton, Slider, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, cn, code_block_CodeBlock as CodeBlock, code_block_CodeBlockCopyButton as CodeBlockCopyButton, icon_Icon as Icon, useNativeViewOcclusion };
2045
+ export { Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, Avatar, AvatarFallback, AvatarImage, Badge, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, H1, H2, H3, H4, H5, H6, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, Label, MiniAppIconButton, MiniAppMetric, MiniAppMetricContent, MiniAppMetricDetail, MiniAppMetricHeader, MiniAppMetricLabel, MiniAppMetricValue, MiniAppPageHeader, MiniAppPageHeaderActions, MiniAppPageHeaderContent, MiniAppPageHeaderDescription, MiniAppPageHeaderTitle, MiniAppSectionHeader, MiniAppSectionHeaderActions, MiniAppSectionHeaderContent, MiniAppSectionHeaderDescription, MiniAppSectionHeaderTitle, MiniAppStatusBar, MiniAppToolbar, NativeSelect, NativeSelectOptGroup, NativeSelectOption, NativeViewOcclusionProvider, Progress, RadioCard, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Skeleton, Slider, StatusIndicator, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, cn, code_block_CodeBlock as CodeBlock, code_block_CodeBlockCopyButton as CodeBlockCopyButton, icon_Icon as Icon, useNativeViewOcclusion };
package/dist/web.d.ts CHANGED
@@ -137,7 +137,7 @@ declare type MiniAppAuthApi = {
137
137
  };
138
138
 
139
139
  /**
140
- * @capability integrations-and-marketplace
140
+ * @capability miniapp-platform
141
141
  */
142
142
  declare type MiniAppChannel = {
143
143
  roomId: string;
@@ -181,6 +181,85 @@ declare type MiniAppCreateSpecialistResult = {
181
181
  isActive: boolean;
182
182
  };
183
183
 
184
+ /** Metadata-only access to host-managed credentials in the active workspace. */
185
+ declare type MiniAppCredentialsApi = {
186
+ listHttp(): MiniAppMaybePromise<MiniAppHttpCredentialMetadata[]>;
187
+ };
188
+
189
+ /** Host-mediated bounded HTTP(S); browser fetch is not the authority. */
190
+ declare type MiniAppHttpApi = {
191
+ request(input: MiniAppHttpRequestInput, options?: MiniAppHttpRequestOptions): MiniAppMaybePromise<MiniAppHttpResponse>;
192
+ };
193
+
194
+ /** Metadata-only stored HTTP credential. Secret fields never cross IPC. */
195
+ declare type MiniAppHttpCredentialMetadata = {
196
+ id: string;
197
+ credentialType: MiniAppHttpCredentialType;
198
+ displayName: string;
199
+ metadataFields: Record<string, string>;
200
+ };
201
+
202
+ declare type MiniAppHttpCredentialType = 'http_bearer' | 'http_basic' | 'http_header_auth' | 'http_api_key';
203
+
204
+ declare type MiniAppHttpHeader = {
205
+ name: string;
206
+ value: string;
207
+ };
208
+
209
+ declare type MiniAppHttpHeaderInput = {
210
+ name: string;
211
+ value: string;
212
+ /** Defaults to true when omitted. */
213
+ enabled?: boolean;
214
+ };
215
+
216
+ declare type MiniAppHttpQueryInput = {
217
+ name: string;
218
+ value: string;
219
+ /** Defaults to true when omitted. */
220
+ enabled?: boolean;
221
+ };
222
+
223
+ declare type MiniAppHttpRequestInput = {
224
+ method: string;
225
+ url: string;
226
+ query?: MiniAppHttpQueryInput[];
227
+ headers?: MiniAppHttpHeaderInput[];
228
+ body?: string | null;
229
+ /** Defaults to 30 seconds and is capped by the host at 120 seconds. */
230
+ timeoutMs?: number | null;
231
+ /** Defaults to 5 MiB and is capped by the host at 10 MiB. */
232
+ responseBodyLimitBytes?: number | null;
233
+ /**
234
+ * Defaults to false. The host follows at most ten same-origin redirects;
235
+ * cross-origin redirects require a separate request and grant.
236
+ */
237
+ followRedirects?: boolean | null;
238
+ };
239
+
240
+ declare type MiniAppHttpRequestOptions = {
241
+ /**
242
+ * Opaque host-managed credential reference. Secret material never enters
243
+ * miniapp JavaScript.
244
+ */
245
+ credentialRef?: string;
246
+ };
247
+
248
+ declare type MiniAppHttpResponse = {
249
+ finalUrl: string;
250
+ status: number;
251
+ statusText: string;
252
+ /** Ordered entries; duplicate response header names remain separate. */
253
+ headers: MiniAppHttpHeader[];
254
+ bodyText: string | null;
255
+ bodyBase64: string | null;
256
+ bodyKind: 'text' | 'binary';
257
+ bodyTruncated: boolean;
258
+ sizeBytes: number;
259
+ elapsedMs: number;
260
+ contentType: string | null;
261
+ };
262
+
184
263
  /** JSON-compatible values accepted by public miniapp operations. */
185
264
  declare type MiniAppJsonValue = null | boolean | number | string | MiniAppJsonValue[] | {
186
265
  [key: string]: MiniAppJsonValue;
@@ -277,6 +356,10 @@ export declare type MiniAppPlatformApi = {
277
356
  chat: MiniAppChatApi;
278
357
  storage: MiniAppStorageApi;
279
358
  presence: MiniAppPresenceApi;
359
+ /** Desktop host capability; feature-detect before use on portable targets. */
360
+ http?: MiniAppHttpApi;
361
+ /** Desktop host capability; feature-detect before use on portable targets. */
362
+ credentials?: MiniAppCredentialsApi;
280
363
  /** Browser capabilities appear only when the selected target supports them. */
281
364
  auth?: MiniAppAuthApi;
282
365
  vfs?: MiniAppVfsApi;