@archbase/layout 3.0.0 → 3.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.
Files changed (44) hide show
  1. package/dist/ArchbaseCard.d.ts +2 -0
  2. package/dist/ArchbaseContainer.d.ts +2 -0
  3. package/dist/ArchbaseGroup.d.ts +2 -0
  4. package/dist/ArchbaseStack.d.ts +2 -0
  5. package/dist/barrel-exports.d.ts +12 -0
  6. package/dist/containers/ArchbaseDockableContainer.d.ts +17 -0
  7. package/dist/containers/advancedtabs/ArchbaseAdvancedTabs.d.ts +47 -0
  8. package/dist/containers/advancedtabs/index.d.ts +2 -0
  9. package/dist/containers/form/ArchbaseForm.d.ts +5 -0
  10. package/dist/containers/form/index.d.ts +1 -0
  11. package/dist/containers/index.d.ts +7 -0
  12. package/dist/containers/split-pane/ArchbaseSplitPane.d.ts +124 -0
  13. package/dist/containers/split-pane/index.d.ts +2 -0
  14. package/dist/containers/window/ArchbaseFloatingWindow.d.ts +23 -0
  15. package/dist/containers/window/index.d.ts +2 -0
  16. package/dist/containers/window/setupTests.d.ts +0 -0
  17. package/dist/dock/ArchbaseDockLayout.d.ts +2 -0
  18. package/dist/dock/ArchbaseDockLayout.types.d.ts +50 -0
  19. package/dist/dock/ArchbaseDockLayoutPreset.d.ts +5 -0
  20. package/dist/dock/index.d.ts +3 -0
  21. package/dist/index.d.ts +7 -0
  22. package/dist/index.js +102 -102
  23. package/dist/spaces/components/ArchbaseSpace.d.ts +6 -0
  24. package/dist/spaces/components/ArchbaseSpaceAnchored.d.ts +88 -0
  25. package/dist/spaces/components/ArchbaseSpaceCentered.d.ts +6 -0
  26. package/dist/spaces/components/ArchbaseSpaceCenteredVertically.d.ts +6 -0
  27. package/dist/spaces/components/ArchbaseSpaceCustom.d.ts +18 -0
  28. package/dist/spaces/components/ArchbaseSpaceFill.d.ts +3 -0
  29. package/dist/spaces/components/ArchbaseSpaceFixed.d.ts +9 -0
  30. package/dist/spaces/components/ArchbaseSpaceInfo.d.ts +9 -0
  31. package/dist/spaces/components/ArchbaseSpaceLayer.d.ts +7 -0
  32. package/dist/spaces/components/ArchbaseSpaceOptions.d.ts +7 -0
  33. package/dist/spaces/components/ArchbaseSpacePositioned.d.ts +16 -0
  34. package/dist/spaces/components/ArchbaseSpaceViewPort.d.ts +11 -0
  35. package/dist/spaces/components/index.d.ts +11 -0
  36. package/dist/spaces/core-dragging.d.ts +8 -0
  37. package/dist/spaces/core-react.d.ts +78 -0
  38. package/dist/spaces/core-resizing.d.ts +12 -0
  39. package/dist/spaces/core-types.d.ts +167 -0
  40. package/dist/spaces/core-utils.d.ts +12 -0
  41. package/dist/spaces/core.d.ts +2 -0
  42. package/dist/spaces/index.d.ts +5 -0
  43. package/package.json +12 -11
  44. package/dist/archbase-layout-3.0.0.tgz +0 -0
@@ -0,0 +1,2 @@
1
+ export { Card as ArchbaseCard } from '@mantine/core';
2
+ export type { CardProps as ArchbaseCardProps } from '@mantine/core';
@@ -0,0 +1,2 @@
1
+ export { Container as ArchbaseContainer } from '@mantine/core';
2
+ export type { ContainerProps as ArchbaseContainerProps } from '@mantine/core';
@@ -0,0 +1,2 @@
1
+ export { Group as ArchbaseGroup } from '@mantine/core';
2
+ export type { GroupProps as ArchbaseGroupProps } from '@mantine/core';
@@ -0,0 +1,2 @@
1
+ export { Stack as ArchbaseStack } from '@mantine/core';
2
+ export type { StackProps as ArchbaseStackProps } from '@mantine/core';
@@ -0,0 +1,12 @@
1
+ export { ArchbaseSpaceCentered } from './spaces/components/ArchbaseSpaceCentered';
2
+ export { ArchbaseSpaceCenteredVertically } from './spaces/components/ArchbaseSpaceCenteredVertically';
3
+ export { ArchbaseSpaceCustom } from './spaces/components/ArchbaseSpaceCustom';
4
+ export { ArchbaseSpaceFill } from './spaces/components/ArchbaseSpaceFill';
5
+ export { ArchbaseSpaceFixed } from './spaces/components/ArchbaseSpaceFixed';
6
+ export { ArchbaseSpaceLayer } from './spaces/components/ArchbaseSpaceLayer';
7
+ export { ArchbaseSpacePositioned } from './spaces/components/ArchbaseSpacePositioned';
8
+ export { ArchbaseSpaceInfo } from './spaces/components/ArchbaseSpaceInfo';
9
+ export { ArchbaseSpaceViewPort } from './spaces/components/ArchbaseSpaceViewPort';
10
+ export { ArchbaseSpaceOptions } from './spaces/components/ArchbaseSpaceOptions';
11
+ export { ArchbaseSpaceTop, ArchbaseSpaceBottom, ArchbaseSpaceLeft, ArchbaseSpaceRight, ArchbaseSpaceTopResizable, ArchbaseSpaceBottomResizable, ArchbaseSpaceLeftResizable, ArchbaseSpaceRightResizable } from './spaces/components/ArchbaseSpaceAnchored';
12
+ export { ArchbaseForm } from './containers/form/ArchbaseForm';
@@ -0,0 +1,17 @@
1
+ import { ReactNode } from 'react';
2
+ export interface ArchbaseDockableContainerProps {
3
+ children?: ReactNode;
4
+ title: string;
5
+ reducedTitle: string;
6
+ containerWidth?: string;
7
+ backgroundColor?: string;
8
+ hiddenBackgroundColor?: string;
9
+ withBorder?: boolean;
10
+ hiddenWidth?: string;
11
+ position?: 'left' | 'right';
12
+ onShow?: () => void;
13
+ onHide?: () => void;
14
+ defaultIsDocked?: boolean;
15
+ defaultIsVisible?: boolean;
16
+ }
17
+ export declare const ArchbaseDockableContainer: ({ children, title, reducedTitle, containerWidth, backgroundColor, hiddenBackgroundColor, withBorder, hiddenWidth, position, onShow, onHide, defaultIsDocked, defaultIsVisible, }: ArchbaseDockableContainerProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,47 @@
1
+ import { default as React, CSSProperties, ReactNode } from 'react';
2
+ export interface ArchbaseAdvancedTabItem {
3
+ key: any;
4
+ favicon: ReactNode | string | undefined;
5
+ title: string;
6
+ customTitle?: string;
7
+ }
8
+ export interface ArchbaseAdvancedTabProps {
9
+ favicon: ReactNode | string | undefined;
10
+ title: string;
11
+ /** Título customizado que aparecerá na aba. Pode ser utilizado $title para interpolar o valor na string do customTitle */
12
+ customTitle?: string;
13
+ activeTab: boolean;
14
+ position: number;
15
+ contentWidth: number;
16
+ onClick: (event: React.MouseEvent<HTMLDivElement>) => void;
17
+ onClose: (event: React.MouseEvent<HTMLDivElement>) => void;
18
+ setDragging: Function;
19
+ tabsContentWidth: number;
20
+ animateTabMove: Function;
21
+ isDragging: boolean;
22
+ id: any;
23
+ index: number;
24
+ sorting: boolean;
25
+ showButtonClose: boolean;
26
+ onCloseAllTabs?: () => void;
27
+ onCloseLeftTabs?: (tabId: string) => void;
28
+ onCloseRightTabs?: (tabId: string) => void;
29
+ onCloseOtherTabs?: (tabId: string) => void;
30
+ totalTabs?: number;
31
+ }
32
+ export interface ArchbaseAdvancedTabsProps {
33
+ currentTabs: ArchbaseAdvancedTabItem[];
34
+ buttonCloseOnlyActiveTab: boolean;
35
+ activeTab: any;
36
+ onTabChange: Function;
37
+ onTabClose: Function;
38
+ className?: string;
39
+ style?: CSSProperties;
40
+ dark: boolean;
41
+ onClick: Function;
42
+ onCloseAllTabs?: () => void;
43
+ onCloseLeftTabs?: (tabId: string) => void;
44
+ onCloseRightTabs?: (tabId: string) => void;
45
+ onCloseOtherTabs?: (tabId: string) => void;
46
+ }
47
+ export declare const ArchbaseAdvancedTabs: React.FC<ArchbaseAdvancedTabsProps>;
@@ -0,0 +1,2 @@
1
+ export { ArchbaseAdvancedTabs } from './ArchbaseAdvancedTabs';
2
+ export type { ArchbaseAdvancedTabItem, ArchbaseAdvancedTabProps, ArchbaseAdvancedTabsProps } from './ArchbaseAdvancedTabs';
@@ -0,0 +1,5 @@
1
+ import { default as React } from 'react';
2
+ export interface ArchbaseFormProps {
3
+ children: React.ReactNode;
4
+ }
5
+ export declare function ArchbaseForm({ children }: ArchbaseFormProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export { ArchbaseForm } from './ArchbaseForm';
@@ -0,0 +1,7 @@
1
+ export * from './form';
2
+ export * from '../spaces';
3
+ export * from './advancedtabs';
4
+ export * from './window';
5
+ export * from './split-pane';
6
+ export { ArchbaseDockableContainer } from './ArchbaseDockableContainer';
7
+ export type { ArchbaseDockableContainerProps } from './ArchbaseDockableContainer';
@@ -0,0 +1,124 @@
1
+ import { default as React, ReactNode } from 'react';
2
+ export interface ArchbaseSplitPaneProps {
3
+ children: ReactNode;
4
+ /**
5
+ * Direção do split
6
+ * @default 'row'
7
+ */
8
+ direction?: 'row' | 'column';
9
+ /**
10
+ * Tamanho do separador em pixels
11
+ * @default 4
12
+ */
13
+ splitterSize?: number | string;
14
+ /**
15
+ * Cor do separador
16
+ */
17
+ splitterColor?: string;
18
+ /**
19
+ * Cor do separador em hover
20
+ */
21
+ splitterHoverColor?: string;
22
+ /**
23
+ * Raio da barra divisória
24
+ */
25
+ splitterRadius?: number | string;
26
+ /**
27
+ * Exibe knob na barra divisória
28
+ */
29
+ withKnob?: boolean;
30
+ /**
31
+ * Opacidade da barra divisória
32
+ */
33
+ opacity?: number | string;
34
+ /**
35
+ * Estilo adicional do container
36
+ */
37
+ style?: React.CSSProperties;
38
+ /**
39
+ * ClassName adicional
40
+ */
41
+ className?: string;
42
+ }
43
+ export interface ArchbaseSplitPanePaneProps {
44
+ children: ReactNode;
45
+ /**
46
+ * Tamanho mínimo do painel em pixels
47
+ */
48
+ minSize?: number | string;
49
+ /**
50
+ * Tamanho máximo do painel em pixels
51
+ */
52
+ maxSize?: number | string;
53
+ /**
54
+ * Tamanho padrão do painel em pixels ou porcentagem
55
+ */
56
+ defaultSize?: number | string;
57
+ /**
58
+ * Estilo adicional do painel
59
+ */
60
+ style?: React.CSSProperties;
61
+ /**
62
+ * ClassName adicional
63
+ */
64
+ className?: string;
65
+ }
66
+ export interface ArchbaseSplitPaneResizerProps {
67
+ /**
68
+ * Estilo adicional do resizer
69
+ */
70
+ style?: React.CSSProperties;
71
+ /**
72
+ * ClassName adicional
73
+ */
74
+ className?: string;
75
+ }
76
+ /**
77
+ * Componente ArchbaseSplitPane
78
+ *
79
+ * Wrapper sobre @gfazioli/mantine-split-pane para criar layouts redimensionáveis
80
+ * com painéis divisórios. Ideal para master-detail views, painéis laterais,
81
+ * editores com preview, etc.
82
+ *
83
+ * @example
84
+ * ```tsx
85
+ * <ArchbaseSplitPane direction="row">
86
+ * <ArchbaseSplitPanePane>
87
+ * <FilterPanel />
88
+ * </ArchbaseSplitPanePane>
89
+ * <ArchbaseSplitPaneResizer />
90
+ * <ArchbaseSplitPanePane>
91
+ * <ArchbaseDataGrid />
92
+ * </ArchbaseSplitPanePane>
93
+ * </ArchbaseSplitPane>
94
+ * ```
95
+ */
96
+ export declare const ArchbaseSplitPane: ({ children, direction, splitterSize, splitterColor, splitterHoverColor, splitterRadius, withKnob, opacity, style, className, }: ArchbaseSplitPaneProps) => import("react/jsx-runtime").JSX.Element;
97
+ /**
98
+ * Componente ArchbaseSplitPanePane
99
+ *
100
+ * Representa um painel individual dentro do ArchbaseSplitPane.
101
+ * Deve ser usado como filho direto de ArchbaseSplitPane.
102
+ *
103
+ * @example
104
+ * ```tsx
105
+ * <ArchbaseSplitPanePane minSize={200} maxSize={600}>
106
+ * <Content />
107
+ * </ArchbaseSplitPanePane>
108
+ * ```
109
+ */
110
+ export declare const ArchbaseSplitPanePane: ({ children, minSize, maxSize, defaultSize, style, className, }: ArchbaseSplitPanePaneProps) => import("react/jsx-runtime").JSX.Element;
111
+ /**
112
+ * Componente ArchbaseSplitPaneResizer
113
+ *
114
+ * Barra divisória arrastável entre painéis.
115
+ * Deve ser usado entre ArchbaseSplitPanePane components.
116
+ *
117
+ * @example
118
+ * ```tsx
119
+ * <ArchbaseSplitPanePane>...</ArchbaseSplitPanePane>
120
+ * <ArchbaseSplitPaneResizer />
121
+ * <ArchbaseSplitPanePane>...</ArchbaseSplitPanePane>
122
+ * ```
123
+ */
124
+ export declare const ArchbaseSplitPaneResizer: ({ style, className, }: ArchbaseSplitPaneResizerProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { ArchbaseSplitPane, ArchbaseSplitPanePane, ArchbaseSplitPaneResizer } from './ArchbaseSplitPane';
2
+ export type { ArchbaseSplitPaneProps, ArchbaseSplitPanePaneProps, ArchbaseSplitPaneResizerProps } from './ArchbaseSplitPane';
@@ -0,0 +1,23 @@
1
+ import { default as React } from 'react';
2
+ export interface ArchbaseFloatingWindowProps {
3
+ id: string;
4
+ children?: any;
5
+ height: number;
6
+ width: number;
7
+ top?: number;
8
+ left?: number;
9
+ resizable?: boolean;
10
+ titleBar?: {
11
+ icon?: string | HTMLImageElement;
12
+ title?: string;
13
+ buttons?: {
14
+ minimize?: boolean;
15
+ maximize?: boolean;
16
+ close?: () => void;
17
+ };
18
+ };
19
+ style?: React.CSSProperties;
20
+ /** Referência para o container que envolve o componente filho */
21
+ innerRef?: React.RefObject<HTMLInputElement> | undefined;
22
+ }
23
+ export declare const ArchbaseFloatingWindow: React.FC<ArchbaseFloatingWindowProps>;
@@ -0,0 +1,2 @@
1
+ export { ArchbaseFloatingWindow, } from './ArchbaseFloatingWindow';
2
+ export type { ArchbaseFloatingWindowProps } from './ArchbaseFloatingWindow';
File without changes
@@ -0,0 +1,2 @@
1
+ import { ArchbaseDockLayoutProps } from './ArchbaseDockLayout.types';
2
+ export declare function ArchbaseDockLayout({ components, defaultLayout, watermark, hideBorders, autoHideHeaders, onLayoutChange, onPanelClose, onPanelOpen, style, className, height, disabled, }: ArchbaseDockLayoutProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,50 @@
1
+ import { CSSProperties, ReactNode } from 'react';
2
+ export type DockComponentType = 'panel' | 'gridview' | 'splitview' | 'dockview';
3
+ export interface DockPanelComponent {
4
+ id: string;
5
+ title: string;
6
+ component: React.ComponentType<any>;
7
+ tabComponent?: React.ComponentType<any>;
8
+ params?: Record<string, any>;
9
+ minimumSize?: number;
10
+ maximumSize?: number;
11
+ isClosable?: boolean;
12
+ }
13
+ export interface DockLayoutConfig {
14
+ direction?: 'horizontal' | 'vertical';
15
+ defaultSize?: number[];
16
+ minimumSize?: number[];
17
+ maximumSize?: number[];
18
+ proportions?: number[];
19
+ }
20
+ export interface ArchbaseDockLayoutProps {
21
+ components: Record<string, DockPanelComponent>;
22
+ defaultLayout?: string | object;
23
+ watermark?: string | ReactNode;
24
+ hideBorders?: boolean;
25
+ autoHideHeaders?: boolean;
26
+ onLayoutChange?: (layout: object) => void;
27
+ onPanelClose?: (panelId: string) => void;
28
+ onPanelOpen?: (panelId: string) => void;
29
+ style?: CSSProperties;
30
+ className?: string;
31
+ height?: string | number;
32
+ disabled?: boolean;
33
+ }
34
+ export interface DockPanelProps {
35
+ componentId: string;
36
+ params?: Record<string, any>;
37
+ onClose?: () => void;
38
+ style?: CSSProperties;
39
+ className?: string;
40
+ }
41
+ export type DockLayoutPreset = 'dashboard' | 'ide' | 'explorer' | 'analytics' | 'custom';
42
+ export interface ArchbaseDockLayoutPresetProps {
43
+ preset: DockLayoutPreset;
44
+ components?: Record<string, DockPanelComponent>;
45
+ onPanelClose?: (panelId: string) => void;
46
+ onPanelOpen?: (panelId: string) => void;
47
+ style?: CSSProperties;
48
+ className?: string;
49
+ height?: string | number;
50
+ }
@@ -0,0 +1,5 @@
1
+ import { ArchbaseDockLayoutPresetProps } from './ArchbaseDockLayout.types';
2
+ /**
3
+ * Preset de layouts para casos de uso comuns
4
+ */
5
+ export declare function ArchbaseDockLayoutPreset({ preset, components: userComponents, onPanelClose, onPanelOpen, style, className, height, }: ArchbaseDockLayoutPresetProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ export { ArchbaseDockLayout } from './ArchbaseDockLayout';
2
+ export { ArchbaseDockLayoutPreset } from './ArchbaseDockLayoutPreset';
3
+ export type { ArchbaseDockLayoutProps, DockPanelComponent, DockLayoutConfig, DockPanelProps, ArchbaseDockLayoutPresetProps, DockLayoutPreset, DockComponentType, } from './ArchbaseDockLayout.types';
@@ -0,0 +1,7 @@
1
+ export * from './ArchbaseCard';
2
+ export * from './ArchbaseContainer';
3
+ export * from './ArchbaseGroup';
4
+ export * from './ArchbaseStack';
5
+ export * from './containers';
6
+ export * from './dock';
7
+ export * from './spaces';