flarecms 0.2.2 → 0.2.4

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 (126) hide show
  1. package/dist/api/lib/cache.d.ts +18 -0
  2. package/dist/api/lib/response.d.ts +44 -0
  3. package/dist/api/middlewares/auth.d.ts +10 -0
  4. package/dist/api/middlewares/cors.d.ts +1 -0
  5. package/dist/api/middlewares/rbac.d.ts +21 -0
  6. package/dist/api/routes/auth.d.ts +6 -0
  7. package/dist/api/routes/collections.d.ts +6 -0
  8. package/dist/api/routes/content.d.ts +6 -0
  9. package/dist/api/routes/device.d.ts +6 -0
  10. package/dist/api/routes/magic.d.ts +6 -0
  11. package/dist/api/routes/mcp.d.ts +6 -0
  12. package/dist/api/routes/oauth.d.ts +6 -0
  13. package/dist/api/routes/plugins.d.ts +6 -0
  14. package/dist/api/routes/settings.d.ts +6 -0
  15. package/dist/api/routes/setup.d.ts +6 -0
  16. package/dist/api/routes/tokens.d.ts +6 -0
  17. package/dist/api/schemas/auth.d.ts +12 -0
  18. package/dist/api/schemas/index.d.ts +43 -0
  19. package/dist/api/schemas/tokens.d.ts +20 -0
  20. package/dist/auth/index.d.ts +11 -0
  21. package/dist/cli/commands.d.ts +3 -0
  22. package/dist/cli/commands.js +19 -2
  23. package/dist/cli/index.d.ts +2 -0
  24. package/dist/cli/index.js +19 -2
  25. package/dist/cli/mcp.d.ts +9 -0
  26. package/dist/cli/tests/cli.test.d.ts +1 -0
  27. package/dist/cli/tests/create-plugin-template.test.d.ts +1 -0
  28. package/dist/cli/tests/create.test.d.ts +1 -0
  29. package/dist/cli/tests/plugin.test.d.ts +1 -0
  30. package/dist/cli/tests/publish.test.d.ts +1 -0
  31. package/dist/client/FlareAdminRouter.d.ts +20 -0
  32. package/dist/client/app.d.ts +1 -0
  33. package/dist/client/components/app-sidebar.d.ts +5 -0
  34. package/dist/client/components/blocks/block-card.d.ts +7 -0
  35. package/dist/client/components/blocks/block-form.d.ts +7 -0
  36. package/dist/client/components/blocks/block-renderer.d.ts +10 -0
  37. package/dist/client/components/blocks/block-table.d.ts +7 -0
  38. package/dist/client/components/collection-modal.d.ts +6 -0
  39. package/dist/client/components/content-list.d.ts +3 -0
  40. package/dist/client/components/dynamic-form.d.ts +9 -0
  41. package/dist/client/components/field-modal.d.ts +8 -0
  42. package/dist/client/components/plugin-widget.d.ts +6 -0
  43. package/dist/client/components/settings/api-token-section.d.ts +1 -0
  44. package/dist/client/components/settings/general-section.d.ts +1 -0
  45. package/dist/client/components/settings/security-section.d.ts +1 -0
  46. package/dist/client/components/settings/seo-section.d.ts +1 -0
  47. package/dist/client/components/settings/signup-section.d.ts +1 -0
  48. package/dist/client/components/ui/accordion.d.ts +6 -0
  49. package/dist/client/components/ui/avatar.d.ts +11 -0
  50. package/dist/client/components/ui/badge.d.ts +7 -0
  51. package/dist/client/components/ui/button.d.ts +11 -0
  52. package/dist/client/components/ui/card.d.ts +11 -0
  53. package/dist/client/components/ui/checkbox.d.ts +3 -0
  54. package/dist/client/components/ui/collapsible.d.ts +5 -0
  55. package/dist/client/components/ui/dialog.d.ts +17 -0
  56. package/dist/client/components/ui/icon-picker.d.ts +27 -0
  57. package/dist/client/components/ui/icons-data.d.ts +5 -0
  58. package/dist/client/components/ui/input.d.ts +3 -0
  59. package/dist/client/components/ui/label.d.ts +3 -0
  60. package/dist/client/components/ui/popover.d.ts +10 -0
  61. package/dist/client/components/ui/select.d.ts +15 -0
  62. package/dist/client/components/ui/separator.d.ts +3 -0
  63. package/dist/client/components/ui/sheet.d.ts +14 -0
  64. package/dist/client/components/ui/sidebar.d.ts +63 -0
  65. package/dist/client/components/ui/skeleton.d.ts +2 -0
  66. package/dist/client/components/ui/sonner.d.ts +3 -0
  67. package/dist/client/components/ui/switch.d.ts +5 -0
  68. package/dist/client/components/ui/table.d.ts +10 -0
  69. package/dist/client/components/ui/tabs.d.ts +10 -0
  70. package/dist/client/components/ui/textarea.d.ts +3 -0
  71. package/dist/client/components/ui/tooltip.d.ts +6 -0
  72. package/dist/client/hooks/use-mobile.d.ts +1 -0
  73. package/dist/client/index.d.ts +8 -0
  74. package/dist/client/layouts/admin-layout.d.ts +6 -0
  75. package/dist/client/layouts/settings-layout.d.ts +6 -0
  76. package/dist/client/lib/api.d.ts +18 -0
  77. package/dist/client/lib/block-registry.d.ts +24 -0
  78. package/dist/client/lib/block-types.d.ts +132 -0
  79. package/dist/client/lib/utils.d.ts +2 -0
  80. package/dist/client/main.d.ts +1 -0
  81. package/dist/client/pages/collection-detail.d.ts +7 -0
  82. package/dist/client/pages/collections.d.ts +1 -0
  83. package/dist/client/pages/dashboard.d.ts +1 -0
  84. package/dist/client/pages/device.d.ts +1 -0
  85. package/dist/client/pages/document-detail-page.d.ts +1 -0
  86. package/dist/client/pages/documents-page.d.ts +1 -0
  87. package/dist/client/pages/login.d.ts +1 -0
  88. package/dist/client/pages/plugin-manager.d.ts +1 -0
  89. package/dist/client/pages/plugin-page.d.ts +6 -0
  90. package/dist/client/pages/settings.d.ts +1 -0
  91. package/dist/client/pages/setup.d.ts +1 -0
  92. package/dist/client/pages/signup.d.ts +1 -0
  93. package/dist/client/store/auth.d.ts +10 -0
  94. package/dist/client/store/collections.d.ts +3 -0
  95. package/dist/client/store/config.d.ts +4 -0
  96. package/dist/client/store/fetcher.d.ts +4 -0
  97. package/dist/client/store/plugins.d.ts +21 -0
  98. package/dist/client/store/router.d.ts +84 -0
  99. package/dist/client/store/schema.d.ts +7 -0
  100. package/dist/client/store/settings.d.ts +7 -0
  101. package/dist/client/types.d.ts +31 -0
  102. package/dist/db/dynamic.d.ts +5 -0
  103. package/dist/db/index.d.ts +8 -0
  104. package/dist/db/migrations/001_initial_schema.d.ts +3 -0
  105. package/dist/db/migrations/002_auth_tables.d.ts +3 -0
  106. package/dist/db/migrations/003_plugins.d.ts +3 -0
  107. package/dist/db/migrator.d.ts +10 -0
  108. package/dist/db/schema.d.ts +151 -0
  109. package/dist/index.d.ts +11 -0
  110. package/dist/plugins/adapt-entry.d.ts +5 -0
  111. package/dist/plugins/context.d.ts +21 -0
  112. package/dist/plugins/define-plugin.d.ts +22 -0
  113. package/dist/plugins/hooks.d.ts +37 -0
  114. package/dist/plugins/index.d.ts +7 -0
  115. package/dist/plugins/manager.d.ts +41 -0
  116. package/dist/plugins/middleware.d.ts +8 -0
  117. package/dist/plugins/noop-sandbox.d.ts +18 -0
  118. package/dist/plugins/routes.d.ts +32 -0
  119. package/dist/plugins/sandbox/bridge.d.ts +45 -0
  120. package/dist/plugins/sandbox/runner.d.ts +14 -0
  121. package/dist/plugins/sandbox/types.d.ts +71 -0
  122. package/dist/plugins/sandbox/wrapper.d.ts +6 -0
  123. package/dist/plugins/types.d.ts +725 -0
  124. package/dist/server/index.d.ts +18 -0
  125. package/dist/types.d.ts +19 -0
  126. package/package.json +1 -1
@@ -0,0 +1,5 @@
1
+ export declare const iconsData: Array<{
2
+ name: string;
3
+ categories: string[];
4
+ tags: string[];
5
+ }>;
@@ -0,0 +1,3 @@
1
+ import * as React from "react";
2
+ declare function Input({ className, type, ...props }: React.ComponentProps<"input">): import("react/jsx-runtime").JSX.Element;
3
+ export { Input };
@@ -0,0 +1,3 @@
1
+ import * as React from "react";
2
+ declare function Label({ className, ...props }: React.ComponentProps<"label">): import("react/jsx-runtime").JSX.Element;
3
+ export { Label };
@@ -0,0 +1,10 @@
1
+ import * as React from 'react';
2
+ import { Popover as PopoverPrimitive } from '@base-ui/react/popover';
3
+ declare function Popover({ ...props }: React.PropsWithChildren<PopoverPrimitive.Root.Props>): import("react/jsx-runtime").JSX.Element;
4
+ declare const PopoverTrigger: React.ForwardRefExoticComponent<Omit<React.PropsWithChildren<PopoverPrimitive.Trigger.Props<unknown>>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
5
+ declare function PopoverContent({ className, align, side, sideOffset, alignOffset, ...props }: React.PropsWithChildren<PopoverPrimitive.Popup.Props & Pick<PopoverPrimitive.Positioner.Props, 'align' | 'alignOffset' | 'side' | 'sideOffset'>>): import("react/jsx-runtime").JSX.Element;
6
+ declare function PopoverAnchor({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
7
+ declare function PopoverHeader({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
8
+ declare function PopoverTitle({ className, ...props }: PopoverPrimitive.Title.Props): import("react/jsx-runtime").JSX.Element;
9
+ declare function PopoverDescription({ className, ...props }: PopoverPrimitive.Description.Props): import("react/jsx-runtime").JSX.Element;
10
+ export { Popover, PopoverAnchor, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, };
@@ -0,0 +1,15 @@
1
+ import * as React from 'react';
2
+ import { Select as SelectPrimitive } from '@base-ui/react/select';
3
+ declare const Select: typeof SelectPrimitive.Root;
4
+ declare function SelectGroup({ className, ...props }: SelectPrimitive.Group.Props): import("react/jsx-runtime").JSX.Element;
5
+ declare function SelectValue({ className, ...props }: SelectPrimitive.Value.Props): import("react/jsx-runtime").JSX.Element;
6
+ declare function SelectTrigger({ className, size, children, ...props }: SelectPrimitive.Trigger.Props & {
7
+ size?: 'sm' | 'default';
8
+ }): import("react/jsx-runtime").JSX.Element;
9
+ declare function SelectContent({ className, children, side, sideOffset, align, alignOffset, alignItemWithTrigger, ...props }: SelectPrimitive.Popup.Props & Pick<SelectPrimitive.Positioner.Props, 'align' | 'alignOffset' | 'side' | 'sideOffset' | 'alignItemWithTrigger'>): import("react/jsx-runtime").JSX.Element;
10
+ declare function SelectLabel({ className, ...props }: SelectPrimitive.GroupLabel.Props): import("react/jsx-runtime").JSX.Element;
11
+ declare function SelectItem({ className, children, ...props }: SelectPrimitive.Item.Props): import("react/jsx-runtime").JSX.Element;
12
+ declare function SelectSeparator({ className, ...props }: SelectPrimitive.Separator.Props): import("react/jsx-runtime").JSX.Element;
13
+ declare function SelectScrollUpButton({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.ScrollUpArrow>): import("react/jsx-runtime").JSX.Element;
14
+ declare function SelectScrollDownButton({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.ScrollDownArrow>): import("react/jsx-runtime").JSX.Element;
15
+ export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, };
@@ -0,0 +1,3 @@
1
+ import { Separator as SeparatorPrimitive } from "@base-ui/react/separator";
2
+ declare function Separator({ className, orientation, ...props }: SeparatorPrimitive.Props): import("react/jsx-runtime").JSX.Element;
3
+ export { Separator };
@@ -0,0 +1,14 @@
1
+ import * as React from 'react';
2
+ import { Dialog as SheetPrimitive } from '@base-ui/react/dialog';
3
+ declare function Sheet({ ...props }: SheetPrimitive.Root.Props): import("react/jsx-runtime").JSX.Element;
4
+ declare function SheetTrigger({ ...props }: SheetPrimitive.Trigger.Props): import("react/jsx-runtime").JSX.Element;
5
+ declare function SheetClose({ ...props }: SheetPrimitive.Close.Props): import("react/jsx-runtime").JSX.Element;
6
+ declare function SheetContent({ className, children, side, showCloseButton, ...props }: SheetPrimitive.Popup.Props & {
7
+ side?: 'top' | 'right' | 'bottom' | 'left';
8
+ showCloseButton?: boolean;
9
+ }): import("react/jsx-runtime").JSX.Element;
10
+ declare function SheetHeader({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
11
+ declare function SheetFooter({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
12
+ declare function SheetTitle({ className, ...props }: SheetPrimitive.Title.Props): import("react/jsx-runtime").JSX.Element;
13
+ declare function SheetDescription({ className, ...props }: SheetPrimitive.Description.Props): import("react/jsx-runtime").JSX.Element;
14
+ export { Sheet, SheetTrigger, SheetClose, SheetContent, SheetHeader, SheetFooter, SheetTitle, SheetDescription, };
@@ -0,0 +1,63 @@
1
+ import * as React from "react";
2
+ import { useRender } from "@base-ui/react/use-render";
3
+ import { type VariantProps } from "class-variance-authority";
4
+ import { Button } from "./button";
5
+ import { Input } from "./input";
6
+ import { Separator } from "./separator";
7
+ import { TooltipContent } from "./tooltip";
8
+ type SidebarContextProps = {
9
+ state: "expanded" | "collapsed";
10
+ open: boolean;
11
+ setOpen: (open: boolean) => void;
12
+ openMobile: boolean;
13
+ setOpenMobile: (open: boolean) => void;
14
+ isMobile: boolean;
15
+ toggleSidebar: () => void;
16
+ };
17
+ declare function useSidebar(): SidebarContextProps;
18
+ declare function SidebarProvider({ defaultOpen, open: openProp, onOpenChange: setOpenProp, className, style, children, ...props }: React.ComponentProps<"div"> & {
19
+ defaultOpen?: boolean;
20
+ open?: boolean;
21
+ onOpenChange?: (open: boolean) => void;
22
+ }): import("react/jsx-runtime").JSX.Element;
23
+ declare function Sidebar({ side, variant, collapsible, className, children, dir, ...props }: React.ComponentProps<"div"> & {
24
+ side?: "left" | "right";
25
+ variant?: "sidebar" | "floating" | "inset";
26
+ collapsible?: "offcanvas" | "icon" | "none";
27
+ }): import("react/jsx-runtime").JSX.Element;
28
+ declare function SidebarTrigger({ className, onClick, ...props }: React.ComponentProps<typeof Button>): import("react/jsx-runtime").JSX.Element;
29
+ declare function SidebarRail({ className, ...props }: React.ComponentProps<"button">): import("react/jsx-runtime").JSX.Element;
30
+ declare function SidebarInset({ className, ...props }: React.ComponentProps<"main">): import("react/jsx-runtime").JSX.Element;
31
+ declare function SidebarInput({ className, ...props }: React.ComponentProps<typeof Input>): import("react/jsx-runtime").JSX.Element;
32
+ declare function SidebarHeader({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
33
+ declare function SidebarFooter({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
34
+ declare function SidebarSeparator({ className, ...props }: React.ComponentProps<typeof Separator>): import("react/jsx-runtime").JSX.Element;
35
+ declare function SidebarContent({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
36
+ declare function SidebarGroup({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
37
+ declare function SidebarGroupLabel({ className, render, ...props }: useRender.ComponentProps<"div"> & React.ComponentProps<"div">): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
38
+ declare function SidebarGroupAction({ className, render, ...props }: useRender.ComponentProps<"button"> & React.ComponentProps<"button">): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
39
+ declare function SidebarGroupContent({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
40
+ declare function SidebarMenu({ className, ...props }: React.ComponentProps<"ul">): import("react/jsx-runtime").JSX.Element;
41
+ declare function SidebarMenuItem({ className, ...props }: React.ComponentProps<"li">): import("react/jsx-runtime").JSX.Element;
42
+ declare const sidebarMenuButtonVariants: (props?: ({
43
+ variant?: "default" | "outline" | null | undefined;
44
+ size?: "default" | "sm" | "lg" | null | undefined;
45
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
46
+ declare function SidebarMenuButton({ render, isActive, variant, size, tooltip, className, ...props }: useRender.ComponentProps<"button"> & React.ComponentProps<"button"> & {
47
+ isActive?: boolean;
48
+ tooltip?: string | React.ComponentProps<typeof TooltipContent>;
49
+ } & VariantProps<typeof sidebarMenuButtonVariants>): import("react/jsx-runtime").JSX.Element;
50
+ declare function SidebarMenuAction({ className, render, showOnHover, ...props }: useRender.ComponentProps<"button"> & React.ComponentProps<"button"> & {
51
+ showOnHover?: boolean;
52
+ }): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
53
+ declare function SidebarMenuBadge({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
54
+ declare function SidebarMenuSkeleton({ className, showIcon, ...props }: React.ComponentProps<"div"> & {
55
+ showIcon?: boolean;
56
+ }): import("react/jsx-runtime").JSX.Element;
57
+ declare function SidebarMenuSub({ className, ...props }: React.ComponentProps<"ul">): import("react/jsx-runtime").JSX.Element;
58
+ declare function SidebarMenuSubItem({ className, ...props }: React.ComponentProps<"li">): import("react/jsx-runtime").JSX.Element;
59
+ declare function SidebarMenuSubButton({ render, size, isActive, className, ...props }: useRender.ComponentProps<"a"> & React.ComponentProps<"a"> & {
60
+ size?: "sm" | "md";
61
+ isActive?: boolean;
62
+ }): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
63
+ export { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, useSidebar, };
@@ -0,0 +1,2 @@
1
+ declare function Skeleton({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
2
+ export { Skeleton };
@@ -0,0 +1,3 @@
1
+ import { type ToasterProps } from "sonner";
2
+ declare const Toaster: ({ ...props }: ToasterProps) => import("react/jsx-runtime").JSX.Element;
3
+ export { Toaster };
@@ -0,0 +1,5 @@
1
+ import { Switch as SwitchPrimitive } from '@base-ui/react/switch';
2
+ declare function Switch({ className, size, ...props }: SwitchPrimitive.Root.Props & {
3
+ size?: 'sm' | 'default';
4
+ }): import("react/jsx-runtime").JSX.Element;
5
+ export { Switch };
@@ -0,0 +1,10 @@
1
+ import * as React from "react";
2
+ declare function Table({ className, ...props }: React.ComponentProps<"table">): import("react/jsx-runtime").JSX.Element;
3
+ declare function TableHeader({ className, ...props }: React.ComponentProps<"thead">): import("react/jsx-runtime").JSX.Element;
4
+ declare function TableBody({ className, ...props }: React.ComponentProps<"tbody">): import("react/jsx-runtime").JSX.Element;
5
+ declare function TableFooter({ className, ...props }: React.ComponentProps<"tfoot">): import("react/jsx-runtime").JSX.Element;
6
+ declare function TableRow({ className, ...props }: React.ComponentProps<"tr">): import("react/jsx-runtime").JSX.Element;
7
+ declare function TableHead({ className, ...props }: React.ComponentProps<"th">): import("react/jsx-runtime").JSX.Element;
8
+ declare function TableCell({ className, ...props }: React.ComponentProps<"td">): import("react/jsx-runtime").JSX.Element;
9
+ declare function TableCaption({ className, ...props }: React.ComponentProps<"caption">): import("react/jsx-runtime").JSX.Element;
10
+ export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption, };
@@ -0,0 +1,10 @@
1
+ import { Tabs as TabsPrimitive } from "@base-ui/react/tabs";
2
+ import { type VariantProps } from "class-variance-authority";
3
+ declare function Tabs({ className, orientation, ...props }: TabsPrimitive.Root.Props): import("react/jsx-runtime").JSX.Element;
4
+ declare const tabsListVariants: (props?: ({
5
+ variant?: "default" | "line" | null | undefined;
6
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
7
+ declare function TabsList({ className, variant, ...props }: TabsPrimitive.List.Props & VariantProps<typeof tabsListVariants>): import("react/jsx-runtime").JSX.Element;
8
+ declare function TabsTrigger({ className, ...props }: TabsPrimitive.Tab.Props): import("react/jsx-runtime").JSX.Element;
9
+ declare function TabsContent({ className, ...props }: TabsPrimitive.Panel.Props): import("react/jsx-runtime").JSX.Element;
10
+ export { Tabs, TabsList, TabsTrigger, TabsContent, tabsListVariants };
@@ -0,0 +1,3 @@
1
+ import * as React from 'react';
2
+ declare function Textarea({ className, ...props }: React.ComponentProps<'textarea'>): import("react/jsx-runtime").JSX.Element;
3
+ export { Textarea };
@@ -0,0 +1,6 @@
1
+ import { Tooltip as TooltipPrimitive } from "@base-ui/react/tooltip";
2
+ declare function TooltipProvider({ delay, ...props }: TooltipPrimitive.Provider.Props): import("react/jsx-runtime").JSX.Element;
3
+ declare function Tooltip({ ...props }: TooltipPrimitive.Root.Props): import("react/jsx-runtime").JSX.Element;
4
+ declare function TooltipTrigger({ ...props }: TooltipPrimitive.Trigger.Props): import("react/jsx-runtime").JSX.Element;
5
+ declare function TooltipContent({ className, side, sideOffset, align, alignOffset, children, ...props }: TooltipPrimitive.Popup.Props & Pick<TooltipPrimitive.Positioner.Props, "align" | "alignOffset" | "side" | "sideOffset">): import("react/jsx-runtime").JSX.Element;
6
+ export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };
@@ -0,0 +1 @@
1
+ export declare function useIsMobile(): boolean;
@@ -0,0 +1,8 @@
1
+ export * from './FlareAdminRouter';
2
+ export { default as FlareAdminApp } from './app';
3
+ export * from './store/auth';
4
+ export * from './store/collections';
5
+ export * from './store/router';
6
+ export * from './lib/api';
7
+ export * from './lib/block-registry';
8
+ export * from './lib/utils';
@@ -0,0 +1,6 @@
1
+ import type { ReactNode } from 'react';
2
+ interface AdminLayoutProps {
3
+ children: ReactNode;
4
+ }
5
+ export declare function AdminLayout({ children }: AdminLayoutProps): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,6 @@
1
+ export declare function SettingsSidebar(): import("react/jsx-runtime").JSX.Element;
2
+ export declare function SettingsLayout({ children, title, subtitle, }: {
3
+ children: React.ReactNode;
4
+ title: string;
5
+ subtitle: string;
6
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Core API instance pre-configured with:
3
+ * 1. Automatic Bearer Token injection via beforeRequest hook
4
+ * 2. Automatic Zero-Config redirect via afterResponse hook
5
+ * 3. Standard error handling for non-2xx responses (built-in ky behavior)
6
+ */
7
+ export declare const api: import("ky").KyInstance;
8
+ /**
9
+ * A legacy wrapper for components still expecting a standard Response object from apiFetch.
10
+ * Uses the ky 'api' instance under the hood.
11
+ *
12
+ * @deprecated Use the 'api' instance directly (e.g., api.get().json()) for new code.
13
+ */
14
+ export declare function apiFetch(path: string, options?: RequestInit): Promise<any>;
15
+ /**
16
+ * Sends a Block Kit interaction to a plugin's admin handler.
17
+ */
18
+ export declare function sendPluginInteraction(pluginId: string, interaction: any): Promise<unknown>;
@@ -0,0 +1,24 @@
1
+ import React from 'react';
2
+ /**
3
+ * Registry for custom plugin blocks.
4
+ *
5
+ * Plugins can register React components here to be rendered by the
6
+ * host application when the backend returns a 'custom' block.
7
+ */
8
+ type CustomBlockComponent = React.ComponentType<any>;
9
+ /**
10
+ * Registers a new React component as a custom block type.
11
+ *
12
+ * @param name - Unique identifier for the custom block
13
+ * @param component - React component to render
14
+ */
15
+ export declare function registerPluginBlock(name: string, component: CustomBlockComponent): void;
16
+ /**
17
+ * Retrieves a registered custom block component.
18
+ */
19
+ export declare function getPluginBlock(name: string): CustomBlockComponent | undefined;
20
+ /**
21
+ * Checks if a custom block type is registered.
22
+ */
23
+ export declare function hasPluginBlock(name: string): boolean;
24
+ export {};
@@ -0,0 +1,132 @@
1
+ /**
2
+ * Block Kit Type System
3
+ *
4
+ * A declarative UI definition system for sandboxed plugins.
5
+ */
6
+ export type BlockType = 'header' | 'text' | 'divider' | 'stat' | 'input' | 'textarea' | 'select' | 'toggle' | 'button' | 'button_group' | 'table' | 'alert' | 'card' | 'grid' | 'form' | 'custom';
7
+ export interface BaseBlock {
8
+ type: BlockType;
9
+ id?: string;
10
+ className?: string;
11
+ }
12
+ export interface HeaderBlock extends BaseBlock {
13
+ type: 'header';
14
+ text: string;
15
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
16
+ }
17
+ export interface TextBlock extends BaseBlock {
18
+ type: 'text';
19
+ text: string;
20
+ variant?: 'muted' | 'success' | 'warning' | 'error' | 'primary';
21
+ }
22
+ export interface DividerBlock extends BaseBlock {
23
+ type: 'divider';
24
+ }
25
+ export interface StatBlock extends BaseBlock {
26
+ type: 'stat';
27
+ label: string;
28
+ value: string | number;
29
+ change?: number;
30
+ changeLabel?: string;
31
+ }
32
+ export interface InputBlock extends BaseBlock {
33
+ type: 'input';
34
+ id: string;
35
+ label?: string;
36
+ placeholder?: string;
37
+ value?: string;
38
+ inputType?: 'text' | 'password' | 'email' | 'number' | 'url';
39
+ }
40
+ export interface TextareaBlock extends BaseBlock {
41
+ type: 'textarea';
42
+ id: string;
43
+ label?: string;
44
+ placeholder?: string;
45
+ value?: string;
46
+ rows?: number;
47
+ }
48
+ export interface SelectBlock extends BaseBlock {
49
+ type: 'select';
50
+ id: string;
51
+ label?: string;
52
+ options: Array<{
53
+ label: string;
54
+ value: string;
55
+ }>;
56
+ value?: string;
57
+ }
58
+ export interface ToggleBlock extends BaseBlock {
59
+ type: 'toggle';
60
+ id: string;
61
+ label?: string;
62
+ value?: boolean;
63
+ }
64
+ export interface ButtonBlock extends BaseBlock {
65
+ type: 'button';
66
+ id: string;
67
+ label: string;
68
+ variant?: 'default' | 'outline' | 'secondary' | 'ghost' | 'destructive' | 'link';
69
+ size?: 'default' | 'sm' | 'lg' | 'icon';
70
+ }
71
+ export interface ButtonGroupBlock extends BaseBlock {
72
+ type: 'button_group';
73
+ buttons: ButtonBlock[];
74
+ align?: 'left' | 'center' | 'right';
75
+ }
76
+ export interface TableBlock extends BaseBlock {
77
+ type: 'table';
78
+ columns: Array<{
79
+ key: string;
80
+ label: string;
81
+ }>;
82
+ rows: Array<Record<string, any>>;
83
+ }
84
+ export interface AlertBlock extends BaseBlock {
85
+ type: 'alert';
86
+ title?: string;
87
+ message: string;
88
+ status: 'info' | 'success' | 'warning' | 'destructive';
89
+ }
90
+ export interface CardBlock extends BaseBlock {
91
+ type: 'card';
92
+ title?: string;
93
+ description?: string;
94
+ blocks: Block[];
95
+ }
96
+ export interface GridBlock extends BaseBlock {
97
+ type: 'grid';
98
+ columns?: number;
99
+ gap?: number;
100
+ blocks: Block[];
101
+ }
102
+ export interface FormBlock extends BaseBlock {
103
+ type: 'form';
104
+ id: string;
105
+ submitLabel?: string;
106
+ blocks: Block[];
107
+ }
108
+ export interface CustomBlock extends BaseBlock {
109
+ type: 'custom';
110
+ component: string;
111
+ props?: Record<string, any>;
112
+ }
113
+ export type Block = HeaderBlock | TextBlock | DividerBlock | StatBlock | InputBlock | TextareaBlock | SelectBlock | ToggleBlock | ButtonBlock | ButtonGroupBlock | TableBlock | AlertBlock | CardBlock | GridBlock | FormBlock | CustomBlock;
114
+ export type BlockInteraction = {
115
+ type: 'page_load';
116
+ page: string;
117
+ } | {
118
+ type: 'block_action';
119
+ blockId: string;
120
+ value?: any;
121
+ } | {
122
+ type: 'form_submit';
123
+ formId: string;
124
+ values: Record<string, any>;
125
+ };
126
+ export interface BlockResponse {
127
+ blocks: Block[];
128
+ toast?: {
129
+ type: 'success' | 'error' | 'info' | 'warning';
130
+ message: string;
131
+ };
132
+ }
@@ -0,0 +1,2 @@
1
+ import { type ClassValue } from "clsx";
2
+ export declare function cn(...inputs: ClassValue[]): string;
@@ -0,0 +1 @@
1
+ import './index.css';
@@ -0,0 +1,7 @@
1
+ interface CollectionDetailProps {
2
+ id: string;
3
+ slug: string;
4
+ onBack: () => void;
5
+ }
6
+ export declare function CollectionDetailPage({ id, slug, onBack, }: CollectionDetailProps): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1 @@
1
+ export declare function CollectionsPage(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function DashboardPage(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function DevicePage(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function DocumentDetailPage(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function DocumentsPage(): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1 @@
1
+ export declare function LoginPage(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function PluginManagerPage(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ interface PluginPageProps {
2
+ pluginId: string;
3
+ page: string;
4
+ }
5
+ export declare function PluginPage({ pluginId, page }: PluginPageProps): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1 @@
1
+ export declare function SettingsPage(): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1 @@
1
+ export declare function SetupPage(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function SignupPage(): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,10 @@
1
+ export interface AuthState {
2
+ token: string | null;
3
+ user: {
4
+ email: string;
5
+ role: string;
6
+ } | null;
7
+ }
8
+ export declare const $auth: import("nanostores").WritableAtom<AuthState>;
9
+ export declare const login: (token: string, email: string) => void;
10
+ export declare const logout: () => void;
@@ -0,0 +1,3 @@
1
+ import type { Collection } from '../types';
2
+ export declare const $collections: import("@nanostores/query").FetcherStore<Collection[], any>;
3
+ export declare const $createCollection: import("@nanostores/query").MutatorStore<Partial<Collection>, Collection, any>;
@@ -0,0 +1,4 @@
1
+ export declare const $basePath: import("nanostores").PreinitializedWritableAtom<string> & object;
2
+ export declare const $apiBaseUrl: import("nanostores").PreinitializedWritableAtom<string> & object;
3
+ export declare function setBase(base: string): void;
4
+ export declare function setApiBaseUrl(url: string): void;
@@ -0,0 +1,4 @@
1
+ export declare const createFetcherStore: <T = unknown, E = any>(keyInput: import("@nanostores/query").KeyInput, { fetcher, ...fetcherSettings }?: import("@nanostores/query").CommonSettings<T>) => import("@nanostores/query").FetcherStore<T, E>, createMutatorStore: <Data = void, Result = unknown, E_1 = any>(mutator: import("@nanostores/query").ManualMutator<Data, Result>, opts?: {
2
+ throttleCalls?: boolean | undefined;
3
+ onError?: ((error: unknown) => void) | undefined;
4
+ } | undefined) => import("@nanostores/query").MutatorStore<Data, Result, E_1>;
@@ -0,0 +1,21 @@
1
+ export interface PluginManifest {
2
+ id: string;
3
+ name: string;
4
+ version: string;
5
+ capabilities: string[];
6
+ routes: string[];
7
+ adminPages?: Array<{
8
+ path: string;
9
+ label?: string;
10
+ icon?: string;
11
+ }>;
12
+ adminWidgets?: Array<{
13
+ id: string;
14
+ title?: string;
15
+ size?: string;
16
+ }>;
17
+ }
18
+ /**
19
+ * Store for active plugins list
20
+ */
21
+ export declare const $plugins: import("@nanostores/query").FetcherStore<PluginManifest[], any>;
@@ -0,0 +1,84 @@
1
+ import { type Router } from '@nanostores/router';
2
+ declare const ROUTE_PATTERNS: {
3
+ readonly home: "";
4
+ readonly setup: "/setup";
5
+ readonly login: "/login";
6
+ readonly signup: "/signup";
7
+ readonly collections: "/collections";
8
+ readonly users: "/users";
9
+ readonly settings: "/settings";
10
+ readonly settings_general: "/settings/general";
11
+ readonly settings_seo: "/settings/seo";
12
+ readonly settings_security: "/settings/security";
13
+ readonly settings_signup: "/settings/signup";
14
+ readonly settings_api: "/settings/api";
15
+ readonly device: "/device";
16
+ readonly collection: "/collection/:id/:slug";
17
+ readonly plugins: "/plugins";
18
+ readonly plugin_page: "/plugins/:pluginId";
19
+ readonly plugin_subpage: "/plugins/:pluginId/:page";
20
+ readonly document_list: "/:slug";
21
+ readonly document_edit: "/:slug/:id";
22
+ };
23
+ /**
24
+ * ExtractParams is a mapped type that extracts the parameters for each route.
25
+ */
26
+ type ExtractParams<Path extends string> = Path extends `${string}:${infer Param}/${infer Rest}` ? {
27
+ [K in Param | keyof ExtractParams<`/${Rest}`>]: string;
28
+ } : Path extends `${string}:${infer Param}` ? {
29
+ [K in Param]: string;
30
+ } : {};
31
+ /**
32
+ * RouteParams is a mapped type that extracts the parameters for each route.
33
+ */
34
+ type RouteParams = {
35
+ [K in RouteName]: ExtractParams<RoutePatterns[K]>;
36
+ };
37
+ /**
38
+ * RoutePatterns is a mapped type that extracts the parameters for each route.
39
+ */
40
+ type RoutePatterns = typeof ROUTE_PATTERNS;
41
+ /**
42
+ * RouteName is a mapped type that extracts the parameters for each route.
43
+ */
44
+ export type RouteName = keyof RoutePatterns;
45
+ export declare const $router: import("nanostores").PreinitializedMapStore<{
46
+ hash: string;
47
+ params: any;
48
+ path: string;
49
+ route: any;
50
+ search: Record<string, string>;
51
+ }> & object;
52
+ /**
53
+ * Initializes the router with a specific base path.
54
+ */
55
+ export declare function initRouter(base: string): Router<{
56
+ readonly home: "";
57
+ readonly setup: "/setup";
58
+ readonly login: "/login";
59
+ readonly signup: "/signup";
60
+ readonly collections: "/collections";
61
+ readonly users: "/users";
62
+ readonly settings: "/settings";
63
+ readonly settings_general: "/settings/general";
64
+ readonly settings_seo: "/settings/seo";
65
+ readonly settings_security: "/settings/security";
66
+ readonly settings_signup: "/settings/signup";
67
+ readonly settings_api: "/settings/api";
68
+ readonly device: "/device";
69
+ readonly collection: "/collection/:id/:slug";
70
+ readonly plugins: "/plugins";
71
+ readonly plugin_page: "/plugins/:pluginId";
72
+ readonly plugin_subpage: "/plugins/:pluginId/:page";
73
+ readonly document_list: "/:slug";
74
+ readonly document_edit: "/:slug/:id";
75
+ }>;
76
+ /**
77
+ * Navigate to a named route.
78
+ */
79
+ export declare function navigate<T extends RouteName>(route: T, params?: RouteParams[T], search?: Record<string, string | number>): void;
80
+ /**
81
+ * Redirect to a named route.
82
+ */
83
+ export declare function redirect<T extends RouteName>(route: T, params?: any, search?: Record<string, string | number>): void;
84
+ export {};
@@ -0,0 +1,7 @@
1
+ import type { CollectionSchema, Field } from '../types';
2
+ export declare const $activeSlug: import("nanostores").PreinitializedWritableAtom<string | null> & object;
3
+ export declare const $schema: import("@nanostores/query").FetcherStore<CollectionSchema, any>;
4
+ export declare const $addField: import("@nanostores/query").MutatorStore<Partial<Field> & {
5
+ collectionSlug: string;
6
+ }, Field, any>;
7
+ export declare const $reloadSchema: () => void;
@@ -0,0 +1,7 @@
1
+ export interface Settings {
2
+ [key: string]: string;
3
+ }
4
+ export declare const $settings: import("nanostores").PreinitializedMapStore<Settings> & object;
5
+ export declare function loadSettings(): Promise<void>;
6
+ export declare function updateSettingsLocally(newSettings: Settings): void;
7
+ export declare function getSetting(key: string, fallback?: string): string;