@elaraai/east-ui-components 0.0.1-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CLA.md +26 -0
- package/CONTRIBUTING.md +28 -0
- package/LICENSE.md +682 -0
- package/dist/buttons/button/index.d.ts +25 -0
- package/dist/buttons/button/index.d.ts.map +1 -0
- package/dist/buttons/icon-button/index.d.ts +22 -0
- package/dist/buttons/icon-button/index.d.ts.map +1 -0
- package/dist/buttons/index.d.ts +10 -0
- package/dist/buttons/index.d.ts.map +1 -0
- package/dist/charts/area/index.d.ts +16 -0
- package/dist/charts/area/index.d.ts.map +1 -0
- package/dist/charts/bar/index.d.ts +16 -0
- package/dist/charts/bar/index.d.ts.map +1 -0
- package/dist/charts/bar-list/index.d.ts +16 -0
- package/dist/charts/bar-list/index.d.ts.map +1 -0
- package/dist/charts/bar-segment/index.d.ts +16 -0
- package/dist/charts/bar-segment/index.d.ts.map +1 -0
- package/dist/charts/index.d.ts +17 -0
- package/dist/charts/index.d.ts.map +1 -0
- package/dist/charts/line/index.d.ts +16 -0
- package/dist/charts/line/index.d.ts.map +1 -0
- package/dist/charts/pie/index.d.ts +16 -0
- package/dist/charts/pie/index.d.ts.map +1 -0
- package/dist/charts/radar/index.d.ts +16 -0
- package/dist/charts/radar/index.d.ts.map +1 -0
- package/dist/charts/scatter/index.d.ts +16 -0
- package/dist/charts/scatter/index.d.ts.map +1 -0
- package/dist/charts/sparkline/index.d.ts +35 -0
- package/dist/charts/sparkline/index.d.ts.map +1 -0
- package/dist/charts/utils.d.ts +151 -0
- package/dist/charts/utils.d.ts.map +1 -0
- package/dist/collections/data-list/index.d.ts +24 -0
- package/dist/collections/data-list/index.d.ts.map +1 -0
- package/dist/collections/index.d.ts +8 -0
- package/dist/collections/index.d.ts.map +1 -0
- package/dist/collections/table/index.d.ts +24 -0
- package/dist/collections/table/index.d.ts.map +1 -0
- package/dist/collections/tree-view/index.d.ts +31 -0
- package/dist/collections/tree-view/index.d.ts.map +1 -0
- package/dist/component.d.ts +15 -0
- package/dist/component.d.ts.map +1 -0
- package/dist/container/card/index.d.ts +22 -0
- package/dist/container/card/index.d.ts.map +1 -0
- package/dist/container/index.d.ts +6 -0
- package/dist/container/index.d.ts.map +1 -0
- package/dist/disclosure/accordion/index.d.ts +36 -0
- package/dist/disclosure/accordion/index.d.ts.map +1 -0
- package/dist/disclosure/carousel/index.d.ts +22 -0
- package/dist/disclosure/carousel/index.d.ts.map +1 -0
- package/dist/disclosure/index.d.ts +8 -0
- package/dist/disclosure/index.d.ts.map +1 -0
- package/dist/disclosure/tabs/index.d.ts +45 -0
- package/dist/disclosure/tabs/index.d.ts.map +1 -0
- package/dist/display/avatar/index.d.ts +22 -0
- package/dist/display/avatar/index.d.ts.map +1 -0
- package/dist/display/badge/index.d.ts +22 -0
- package/dist/display/badge/index.d.ts.map +1 -0
- package/dist/display/icon/index.d.ts +22 -0
- package/dist/display/icon/index.d.ts.map +1 -0
- package/dist/display/index.d.ts +10 -0
- package/dist/display/index.d.ts.map +1 -0
- package/dist/display/stat/index.d.ts +16 -0
- package/dist/display/stat/index.d.ts.map +1 -0
- package/dist/display/tag/index.d.ts +22 -0
- package/dist/display/tag/index.d.ts.map +1 -0
- package/dist/feedback/alert/index.d.ts +22 -0
- package/dist/feedback/alert/index.d.ts.map +1 -0
- package/dist/feedback/index.d.ts +7 -0
- package/dist/feedback/index.d.ts.map +1 -0
- package/dist/feedback/progress/index.d.ts +22 -0
- package/dist/feedback/progress/index.d.ts.map +1 -0
- package/dist/forms/checkbox/index.d.ts +22 -0
- package/dist/forms/checkbox/index.d.ts.map +1 -0
- package/dist/forms/field/index.d.ts +22 -0
- package/dist/forms/field/index.d.ts.map +1 -0
- package/dist/forms/fieldset/index.d.ts +76 -0
- package/dist/forms/fieldset/index.d.ts.map +1 -0
- package/dist/forms/file-upload/index.d.ts +22 -0
- package/dist/forms/file-upload/index.d.ts.map +1 -0
- package/dist/forms/index.d.ts +15 -0
- package/dist/forms/index.d.ts.map +1 -0
- package/dist/forms/input/index.d.ts +60 -0
- package/dist/forms/input/index.d.ts.map +1 -0
- package/dist/forms/select/index.d.ts +31 -0
- package/dist/forms/select/index.d.ts.map +1 -0
- package/dist/forms/slider/index.d.ts +22 -0
- package/dist/forms/slider/index.d.ts.map +1 -0
- package/dist/forms/switch/index.d.ts +22 -0
- package/dist/forms/switch/index.d.ts.map +1 -0
- package/dist/forms/tags-input/index.d.ts +22 -0
- package/dist/forms/tags-input/index.d.ts.map +1 -0
- package/dist/forms/textarea/index.d.ts +22 -0
- package/dist/forms/textarea/index.d.ts.map +1 -0
- package/dist/index.cjs +50804 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +23 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +50780 -0
- package/dist/index.js.map +1 -0
- package/dist/layout/box/index.d.ts +25 -0
- package/dist/layout/box/index.d.ts.map +1 -0
- package/dist/layout/grid/index.d.ts +25 -0
- package/dist/layout/grid/index.d.ts.map +1 -0
- package/dist/layout/index.d.ts +13 -0
- package/dist/layout/index.d.ts.map +1 -0
- package/dist/layout/separator/index.d.ts +25 -0
- package/dist/layout/separator/index.d.ts.map +1 -0
- package/dist/layout/splitter/index.d.ts +33 -0
- package/dist/layout/splitter/index.d.ts.map +1 -0
- package/dist/layout/stack/index.d.ts +25 -0
- package/dist/layout/stack/index.d.ts.map +1 -0
- package/dist/overlays/action-bar/index.d.ts +18 -0
- package/dist/overlays/action-bar/index.d.ts.map +1 -0
- package/dist/overlays/dialog/index.d.ts +16 -0
- package/dist/overlays/dialog/index.d.ts.map +1 -0
- package/dist/overlays/drawer/index.d.ts +16 -0
- package/dist/overlays/drawer/index.d.ts.map +1 -0
- package/dist/overlays/hover-card/index.d.ts +16 -0
- package/dist/overlays/hover-card/index.d.ts.map +1 -0
- package/dist/overlays/index.d.ts +13 -0
- package/dist/overlays/index.d.ts.map +1 -0
- package/dist/overlays/menu/index.d.ts +18 -0
- package/dist/overlays/menu/index.d.ts.map +1 -0
- package/dist/overlays/popover/index.d.ts +16 -0
- package/dist/overlays/popover/index.d.ts.map +1 -0
- package/dist/overlays/toggle-tip/index.d.ts +17 -0
- package/dist/overlays/toggle-tip/index.d.ts.map +1 -0
- package/dist/overlays/tooltip/index.d.ts +16 -0
- package/dist/overlays/tooltip/index.d.ts.map +1 -0
- package/dist/platform/hooks.d.ts +145 -0
- package/dist/platform/hooks.d.ts.map +1 -0
- package/dist/platform/index.d.ts +16 -0
- package/dist/platform/index.d.ts.map +1 -0
- package/dist/platform/store.d.ts +114 -0
- package/dist/platform/store.d.ts.map +1 -0
- package/dist/typography/index.d.ts +6 -0
- package/dist/typography/index.d.ts.map +1 -0
- package/dist/typography/text/index.d.ts +25 -0
- package/dist/typography/text/index.d.ts.map +1 -0
- package/package.json +85 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Elara AI Pty Ltd
|
|
3
|
+
* Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
|
|
4
|
+
*/
|
|
5
|
+
import { type BoxProps } from "@chakra-ui/react";
|
|
6
|
+
import { type ValueTypeOf } from "@elaraai/east";
|
|
7
|
+
import { Box } from "@elaraai/east-ui";
|
|
8
|
+
/** East Box value type */
|
|
9
|
+
export type BoxValue = ValueTypeOf<typeof Box.Types.Box>;
|
|
10
|
+
/**
|
|
11
|
+
* Converts an East UI Box value to Chakra UI Box props.
|
|
12
|
+
* Pure function - easy to test independently.
|
|
13
|
+
*
|
|
14
|
+
* @param value - The East Box value
|
|
15
|
+
* @returns Chakra Box props
|
|
16
|
+
*/
|
|
17
|
+
export declare function toChakraBox(value: BoxValue): BoxProps;
|
|
18
|
+
export interface EastChakraBoxProps {
|
|
19
|
+
value: BoxValue;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Renders an East UI Box value using Chakra UI Box component.
|
|
23
|
+
*/
|
|
24
|
+
export declare const EastChakraBox: import("react").NamedExoticComponent<EastChakraBoxProps>;
|
|
25
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/layout/box/index.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAoB,KAAK,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACnE,OAAO,EAAY,KAAK,WAAW,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAOvC,0BAA0B;AAC1B,MAAM,MAAM,QAAQ,GAAG,WAAW,CAAC,OAAO,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;AAEzD;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,QAAQ,GAAG,QAAQ,CA2BrD;AAED,MAAM,WAAW,kBAAkB;IAC/B,KAAK,EAAE,QAAQ,CAAC;CACnB;AAED;;GAEG;AACH,eAAO,MAAM,aAAa,0DAU0B,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Elara AI Pty Ltd
|
|
3
|
+
* Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
|
|
4
|
+
*/
|
|
5
|
+
import { type GridProps } from "@chakra-ui/react";
|
|
6
|
+
import { type ValueTypeOf } from "@elaraai/east";
|
|
7
|
+
import { Grid } from "@elaraai/east-ui";
|
|
8
|
+
/** East Grid value type */
|
|
9
|
+
export type GridValue = ValueTypeOf<typeof Grid.Types.Grid>;
|
|
10
|
+
/**
|
|
11
|
+
* Converts an East UI Grid value to Chakra UI Grid props.
|
|
12
|
+
* Pure function - easy to test independently.
|
|
13
|
+
*
|
|
14
|
+
* @param value - The East Grid value
|
|
15
|
+
* @returns Chakra Grid props
|
|
16
|
+
*/
|
|
17
|
+
export declare function toChakraGrid(value: GridValue): GridProps;
|
|
18
|
+
export interface EastChakraGridProps {
|
|
19
|
+
value: GridValue;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Renders an East UI Grid value using Chakra UI Grid component.
|
|
23
|
+
*/
|
|
24
|
+
export declare const EastChakraGrid: import("react").NamedExoticComponent<EastChakraGridProps>;
|
|
25
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/layout/grid/index.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAkD,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAClG,OAAO,EAAY,KAAK,WAAW,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAiBxC,2BAA2B;AAC3B,MAAM,MAAM,SAAS,GAAG,WAAW,CAAC,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AAG5D;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,SAAS,GAAG,SAAS,CAqBxD;AAED,MAAM,WAAW,mBAAmB;IAChC,KAAK,EAAE,SAAS,CAAC;CACpB;AAED;;GAEG;AACH,eAAO,MAAM,cAAc,2DAoB0B,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Elara AI Pty Ltd
|
|
3
|
+
* Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Layout components for structuring content.
|
|
7
|
+
*/
|
|
8
|
+
export { toChakraBox, EastChakraBox, type BoxValue, type EastChakraBoxProps, } from "./box/index.js";
|
|
9
|
+
export { toChakraStack, EastChakraStack, type StackValue, type EastChakraStackProps, } from "./stack/index.js";
|
|
10
|
+
export { toChakraSeparator, EastChakraSeparator, type SeparatorValue, type EastChakraSeparatorProps, } from "./separator/index.js";
|
|
11
|
+
export { toChakraGrid, EastChakraGrid, type GridValue, type EastChakraGridProps, } from "./grid/index.js";
|
|
12
|
+
export { toChakraSplitter, EastChakraSplitter, type SplitterValue, type EastChakraSplitterProps, } from "./splitter/index.js";
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/layout/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,OAAO,EACH,WAAW,EACX,aAAa,EACb,KAAK,QAAQ,EACb,KAAK,kBAAkB,GAC1B,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACH,aAAa,EACb,eAAe,EACf,KAAK,UAAU,EACf,KAAK,oBAAoB,GAC5B,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACH,iBAAiB,EACjB,mBAAmB,EACnB,KAAK,cAAc,EACnB,KAAK,wBAAwB,GAChC,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACH,YAAY,EACZ,cAAc,EACd,KAAK,SAAS,EACd,KAAK,mBAAmB,GAC3B,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACH,gBAAgB,EAChB,kBAAkB,EAClB,KAAK,aAAa,EAClB,KAAK,uBAAuB,GAC/B,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Elara AI Pty Ltd
|
|
3
|
+
* Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
|
|
4
|
+
*/
|
|
5
|
+
import { type SeparatorProps } from "@chakra-ui/react";
|
|
6
|
+
import { type ValueTypeOf } from "@elaraai/east";
|
|
7
|
+
import { Separator } from "@elaraai/east-ui";
|
|
8
|
+
/** East Separator value type */
|
|
9
|
+
export type SeparatorValue = ValueTypeOf<typeof Separator.Types.Separator>;
|
|
10
|
+
/**
|
|
11
|
+
* Converts an East UI Separator value to Chakra UI Separator props.
|
|
12
|
+
* Pure function - easy to test independently.
|
|
13
|
+
*
|
|
14
|
+
* @param value - The East Separator value
|
|
15
|
+
* @returns Chakra Separator props
|
|
16
|
+
*/
|
|
17
|
+
export declare function toChakraSeparator(value: SeparatorValue): SeparatorProps;
|
|
18
|
+
export interface EastChakraSeparatorProps {
|
|
19
|
+
value: SeparatorValue;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Renders an East UI Separator value using Chakra UI Separator component.
|
|
23
|
+
*/
|
|
24
|
+
export declare const EastChakraSeparator: import("react").NamedExoticComponent<EastChakraSeparatorProps>;
|
|
25
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/layout/separator/index.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAgC,KAAK,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACrF,OAAO,EAAY,KAAK,WAAW,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAM7C,gCAAgC;AAChC,MAAM,MAAM,cAAc,GAAG,WAAW,CAAC,OAAO,SAAS,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;AAG3E;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,cAAc,GAAG,cAAc,CAOvE;AAED,MAAM,WAAW,wBAAwB;IACrC,KAAK,EAAE,cAAc,CAAC;CACzB;AAED;;GAEG;AACH,eAAO,MAAM,mBAAmB,gEAS0B,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Elara AI Pty Ltd
|
|
3
|
+
* Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
|
|
4
|
+
*/
|
|
5
|
+
import React from "react";
|
|
6
|
+
import { type ValueTypeOf } from "@elaraai/east";
|
|
7
|
+
import { Splitter } from "@elaraai/east-ui";
|
|
8
|
+
/** East Splitter value type */
|
|
9
|
+
export type SplitterValue = ValueTypeOf<typeof Splitter.Types.Splitter>;
|
|
10
|
+
/**
|
|
11
|
+
* Splitter style props (without panels, which are rendered separately).
|
|
12
|
+
*/
|
|
13
|
+
interface SplitterStyleProps {
|
|
14
|
+
orientation?: "horizontal" | "vertical";
|
|
15
|
+
defaultSize?: number[];
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Converts an East UI Splitter value to Chakra UI Splitter style props.
|
|
19
|
+
* Pure function - easy to test independently.
|
|
20
|
+
*
|
|
21
|
+
* @param value - The East Splitter value
|
|
22
|
+
* @returns Splitter style props
|
|
23
|
+
*/
|
|
24
|
+
export declare function toChakraSplitter(value: SplitterValue): SplitterStyleProps;
|
|
25
|
+
export interface EastChakraSplitterProps {
|
|
26
|
+
value: SplitterValue;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Renders an East UI Splitter value using Chakra UI Splitter component.
|
|
30
|
+
*/
|
|
31
|
+
export declare const EastChakraSplitter: React.NamedExoticComponent<EastChakraSplitterProps>;
|
|
32
|
+
export {};
|
|
33
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/layout/splitter/index.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAwB,MAAM,OAAO,CAAC;AAE7C,OAAO,EAAY,KAAK,WAAW,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAO5C,+BAA+B;AAC/B,MAAM,MAAM,aAAa,GAAG,WAAW,CAAC,OAAO,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;AAGxE;;GAEG;AACH,UAAU,kBAAkB;IACxB,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;IACxC,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;CAC1B;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,aAAa,GAAG,kBAAkB,CAUzE;AAED,MAAM,WAAW,uBAAuB;IACpC,KAAK,EAAE,aAAa,CAAC;CACxB;AAED;;GAEG;AACH,eAAO,MAAM,kBAAkB,qDAwB0B,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Elara AI Pty Ltd
|
|
3
|
+
* Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
|
|
4
|
+
*/
|
|
5
|
+
import { type StackProps } from "@chakra-ui/react";
|
|
6
|
+
import { type ValueTypeOf } from "@elaraai/east";
|
|
7
|
+
import { Stack } from "@elaraai/east-ui";
|
|
8
|
+
/** East Stack value type */
|
|
9
|
+
export type StackValue = ValueTypeOf<typeof Stack.Types.Stack>;
|
|
10
|
+
/**
|
|
11
|
+
* Converts an East UI Stack value to Chakra UI Stack props.
|
|
12
|
+
* Pure function - easy to test independently.
|
|
13
|
+
*
|
|
14
|
+
* @param value - The East Stack value
|
|
15
|
+
* @returns Chakra Stack props
|
|
16
|
+
*/
|
|
17
|
+
export declare function toChakraStack(value: StackValue): StackProps;
|
|
18
|
+
export interface EastChakraStackProps {
|
|
19
|
+
value: StackValue;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Renders an East UI Stack value using Chakra UI Stack component.
|
|
23
|
+
*/
|
|
24
|
+
export declare const EastChakraStack: import("react").NamedExoticComponent<EastChakraStackProps>;
|
|
25
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/layout/stack/index.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAwB,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACzE,OAAO,EAAY,KAAK,WAAW,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAOzC,4BAA4B;AAC5B,MAAM,MAAM,UAAU,GAAG,WAAW,CAAC,OAAO,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;AAE/D;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,UAAU,GAAG,UAAU,CAuB3D;AAED,MAAM,WAAW,oBAAoB;IACjC,KAAK,EAAE,UAAU,CAAC;CACrB;AAED;;GAEG;AACH,eAAO,MAAM,eAAe,4DAU0B,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Elara AI Pty Ltd
|
|
3
|
+
* Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
|
|
4
|
+
*/
|
|
5
|
+
import { type ValueTypeOf } from "@elaraai/east";
|
|
6
|
+
import { ActionBar } from "@elaraai/east-ui";
|
|
7
|
+
/** East ActionBar value type */
|
|
8
|
+
export type ActionBarValue = ValueTypeOf<typeof ActionBar.Types.ActionBar>;
|
|
9
|
+
/** East ActionBar item value type */
|
|
10
|
+
export type ActionBarItemValue = ValueTypeOf<typeof ActionBar.Types.Item>;
|
|
11
|
+
export interface EastChakraActionBarProps {
|
|
12
|
+
value: ActionBarValue;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Renders an East UI ActionBar value using Chakra UI ActionBar component.
|
|
16
|
+
*/
|
|
17
|
+
export declare const EastChakraActionBar: import("react").NamedExoticComponent<EastChakraActionBarProps>;
|
|
18
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/overlays/action-bar/index.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAmB,KAAK,WAAW,EAAE,MAAM,eAAe,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAM7C,gCAAgC;AAChC,MAAM,MAAM,cAAc,GAAG,WAAW,CAAC,OAAO,SAAS,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;AAE3E,qCAAqC;AACrC,MAAM,MAAM,kBAAkB,GAAG,WAAW,CAAC,OAAO,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AAE1E,MAAM,WAAW,wBAAwB;IACrC,KAAK,EAAE,cAAc,CAAC;CACzB;AAED;;GAEG;AACH,eAAO,MAAM,mBAAmB,gEAkC0B,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Elara AI Pty Ltd
|
|
3
|
+
* Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
|
|
4
|
+
*/
|
|
5
|
+
import { type ValueTypeOf } from "@elaraai/east";
|
|
6
|
+
import { Dialog } from "@elaraai/east-ui";
|
|
7
|
+
/** East Dialog value type */
|
|
8
|
+
export type DialogValue = ValueTypeOf<typeof Dialog.Types.Dialog>;
|
|
9
|
+
export interface EastChakraDialogProps {
|
|
10
|
+
value: DialogValue;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Renders an East UI Dialog value using Chakra UI Dialog component.
|
|
14
|
+
*/
|
|
15
|
+
export declare const EastChakraDialog: import("react").NamedExoticComponent<EastChakraDialogProps>;
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/overlays/dialog/index.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAY,KAAK,WAAW,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAO1C,6BAA6B;AAC7B,MAAM,MAAM,WAAW,GAAG,WAAW,CAAC,OAAO,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;AAElE,MAAM,WAAW,qBAAqB;IAClC,KAAK,EAAE,WAAW,CAAC;CACtB;AAED;;GAEG;AACH,eAAO,MAAM,gBAAgB,6DAgD0B,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Elara AI Pty Ltd
|
|
3
|
+
* Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
|
|
4
|
+
*/
|
|
5
|
+
import { type ValueTypeOf } from "@elaraai/east";
|
|
6
|
+
import { Drawer } from "@elaraai/east-ui";
|
|
7
|
+
/** East Drawer value type */
|
|
8
|
+
export type DrawerValue = ValueTypeOf<typeof Drawer.Types.Drawer>;
|
|
9
|
+
export interface EastChakraDrawerProps {
|
|
10
|
+
value: DrawerValue;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Renders an East UI Drawer value using Chakra UI Drawer component.
|
|
14
|
+
*/
|
|
15
|
+
export declare const EastChakraDrawer: import("react").NamedExoticComponent<EastChakraDrawerProps>;
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/overlays/drawer/index.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAY,KAAK,WAAW,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAO1C,6BAA6B;AAC7B,MAAM,MAAM,WAAW,GAAG,WAAW,CAAC,OAAO,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;AAElE,MAAM,WAAW,qBAAqB;IAClC,KAAK,EAAE,WAAW,CAAC;CACtB;AAED;;GAEG;AACH,eAAO,MAAM,gBAAgB,6DAsC0B,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Elara AI Pty Ltd
|
|
3
|
+
* Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
|
|
4
|
+
*/
|
|
5
|
+
import { type ValueTypeOf } from "@elaraai/east";
|
|
6
|
+
import { HoverCard } from "@elaraai/east-ui";
|
|
7
|
+
/** East HoverCard value type */
|
|
8
|
+
export type HoverCardValue = ValueTypeOf<typeof HoverCard.Types.HoverCard>;
|
|
9
|
+
export interface EastChakraHoverCardProps {
|
|
10
|
+
value: HoverCardValue;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Renders an East UI HoverCard value using Chakra UI HoverCard component.
|
|
14
|
+
*/
|
|
15
|
+
export declare const EastChakraHoverCard: import("react").NamedExoticComponent<EastChakraHoverCardProps>;
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/overlays/hover-card/index.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAY,KAAK,WAAW,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAO7C,gCAAgC;AAChC,MAAM,MAAM,cAAc,GAAG,WAAW,CAAC,OAAO,SAAS,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;AAE3E,MAAM,WAAW,wBAAwB;IACrC,KAAK,EAAE,cAAc,CAAC;CACzB;AAED;;GAEG;AACH,eAAO,MAAM,mBAAmB,gEAsC0B,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Elara AI Pty Ltd
|
|
3
|
+
* Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
|
|
4
|
+
*/
|
|
5
|
+
export { EastChakraTooltip, type TooltipValue, type EastChakraTooltipProps, } from "./tooltip/index.js";
|
|
6
|
+
export { EastChakraMenu, type MenuValue, type MenuItemValue, type EastChakraMenuProps, } from "./menu/index.js";
|
|
7
|
+
export { EastChakraPopover, type PopoverValue, type EastChakraPopoverProps, } from "./popover/index.js";
|
|
8
|
+
export { EastChakraHoverCard, type HoverCardValue, type EastChakraHoverCardProps, } from "./hover-card/index.js";
|
|
9
|
+
export { EastChakraDialog, type DialogValue, type EastChakraDialogProps, } from "./dialog/index.js";
|
|
10
|
+
export { EastChakraDrawer, type DrawerValue, type EastChakraDrawerProps, } from "./drawer/index.js";
|
|
11
|
+
export { EastChakraActionBar, type ActionBarValue, type ActionBarItemValue, type EastChakraActionBarProps, } from "./action-bar/index.js";
|
|
12
|
+
export { EastChakraToggleTip, type ToggleTipValue, type EastChakraToggleTipProps, } from "./toggle-tip/index.js";
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/overlays/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACH,iBAAiB,EACjB,KAAK,YAAY,EACjB,KAAK,sBAAsB,GAC9B,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACH,cAAc,EACd,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,KAAK,mBAAmB,GAC3B,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACH,iBAAiB,EACjB,KAAK,YAAY,EACjB,KAAK,sBAAsB,GAC9B,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACH,mBAAmB,EACnB,KAAK,cAAc,EACnB,KAAK,wBAAwB,GAChC,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACH,gBAAgB,EAChB,KAAK,WAAW,EAChB,KAAK,qBAAqB,GAC7B,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACH,gBAAgB,EAChB,KAAK,WAAW,EAChB,KAAK,qBAAqB,GAC7B,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACH,mBAAmB,EACnB,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,KAAK,wBAAwB,GAChC,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACH,mBAAmB,EACnB,KAAK,cAAc,EACnB,KAAK,wBAAwB,GAChC,MAAM,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Elara AI Pty Ltd
|
|
3
|
+
* Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
|
|
4
|
+
*/
|
|
5
|
+
import { type ValueTypeOf } from "@elaraai/east";
|
|
6
|
+
import { Menu } from "@elaraai/east-ui";
|
|
7
|
+
/** East Menu value type */
|
|
8
|
+
export type MenuValue = ValueTypeOf<typeof Menu.Types.Menu>;
|
|
9
|
+
/** East MenuItem value type */
|
|
10
|
+
export type MenuItemValue = ValueTypeOf<typeof Menu.Types.Item>;
|
|
11
|
+
export interface EastChakraMenuProps {
|
|
12
|
+
value: MenuValue;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Renders an East UI Menu value using Chakra UI Menu component.
|
|
16
|
+
*/
|
|
17
|
+
export declare const EastChakraMenu: import("react").NamedExoticComponent<EastChakraMenuProps>;
|
|
18
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/overlays/menu/index.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAmB,KAAK,WAAW,EAAE,MAAM,eAAe,CAAC;AAClE,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAOxC,2BAA2B;AAC3B,MAAM,MAAM,SAAS,GAAG,WAAW,CAAC,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AAE5D,+BAA+B;AAC/B,MAAM,MAAM,aAAa,GAAG,WAAW,CAAC,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AAEhE,MAAM,WAAW,mBAAmB;IAChC,KAAK,EAAE,SAAS,CAAC;CACpB;AAED;;GAEG;AACH,eAAO,MAAM,cAAc,2DAgC0B,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Elara AI Pty Ltd
|
|
3
|
+
* Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
|
|
4
|
+
*/
|
|
5
|
+
import { type ValueTypeOf } from "@elaraai/east";
|
|
6
|
+
import { Popover } from "@elaraai/east-ui";
|
|
7
|
+
/** East Popover value type */
|
|
8
|
+
export type PopoverValue = ValueTypeOf<typeof Popover.Types.Popover>;
|
|
9
|
+
export interface EastChakraPopoverProps {
|
|
10
|
+
value: PopoverValue;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Renders an East UI Popover value using Chakra UI Popover component.
|
|
14
|
+
*/
|
|
15
|
+
export declare const EastChakraPopover: import("react").NamedExoticComponent<EastChakraPopoverProps>;
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/overlays/popover/index.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAY,KAAK,WAAW,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAO3C,8BAA8B;AAC9B,MAAM,MAAM,YAAY,GAAG,WAAW,CAAC,OAAO,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;AAErE,MAAM,WAAW,sBAAsB;IACnC,KAAK,EAAE,YAAY,CAAC;CACvB;AAED;;GAEG;AACH,eAAO,MAAM,iBAAiB,8DA+B0B,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Elara AI Pty Ltd
|
|
3
|
+
* Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
|
|
4
|
+
*/
|
|
5
|
+
import { type ValueTypeOf } from "@elaraai/east";
|
|
6
|
+
import { ToggleTip } from "@elaraai/east-ui";
|
|
7
|
+
/** East ToggleTip value type */
|
|
8
|
+
export type ToggleTipValue = ValueTypeOf<typeof ToggleTip.Types.ToggleTip>;
|
|
9
|
+
export interface EastChakraToggleTipProps {
|
|
10
|
+
value: ToggleTipValue;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Renders an East UI ToggleTip value using Chakra UI Popover component.
|
|
14
|
+
* ToggleTip is a click-activated tooltip for better accessibility.
|
|
15
|
+
*/
|
|
16
|
+
export declare const EastChakraToggleTip: import("react").NamedExoticComponent<EastChakraToggleTipProps>;
|
|
17
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/overlays/toggle-tip/index.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAY,KAAK,WAAW,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAO7C,gCAAgC;AAChC,MAAM,MAAM,cAAc,GAAG,WAAW,CAAC,OAAO,SAAS,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;AAE3E,MAAM,WAAW,wBAAwB;IACrC,KAAK,EAAE,cAAc,CAAC;CACzB;AAED;;;GAGG;AACH,eAAO,MAAM,mBAAmB,gEAsB0B,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Elara AI Pty Ltd
|
|
3
|
+
* Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
|
|
4
|
+
*/
|
|
5
|
+
import { type ValueTypeOf } from "@elaraai/east";
|
|
6
|
+
import { Tooltip } from "@elaraai/east-ui";
|
|
7
|
+
/** East Tooltip value type */
|
|
8
|
+
export type TooltipValue = ValueTypeOf<typeof Tooltip.Types.Tooltip>;
|
|
9
|
+
export interface EastChakraTooltipProps {
|
|
10
|
+
value: TooltipValue;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Renders an East UI Tooltip value using Chakra UI Tooltip component.
|
|
14
|
+
*/
|
|
15
|
+
export declare const EastChakraTooltip: import("react").NamedExoticComponent<EastChakraTooltipProps>;
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/overlays/tooltip/index.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAY,KAAK,WAAW,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAO3C,8BAA8B;AAC9B,MAAM,MAAM,YAAY,GAAG,WAAW,CAAC,OAAO,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;AAErE,MAAM,WAAW,sBAAsB;IACnC,KAAK,EAAE,YAAY,CAAC;CACvB;AAED;;GAEG;AACH,eAAO,MAAM,iBAAiB,8DAmB0B,CAAC"}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Elara AI Pty Ltd
|
|
3
|
+
* Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
|
|
4
|
+
*/
|
|
5
|
+
import { type ReactNode } from "react";
|
|
6
|
+
import { type EastIR } from "@elaraai/east";
|
|
7
|
+
import { EastStore } from "./store.js";
|
|
8
|
+
/**
|
|
9
|
+
* Props for the EastStoreProvider component.
|
|
10
|
+
*/
|
|
11
|
+
export interface EastStoreProviderProps {
|
|
12
|
+
/** The EastStore instance to provide */
|
|
13
|
+
store: EastStore;
|
|
14
|
+
/** Child components */
|
|
15
|
+
children: ReactNode;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Provides an EastStore to the component tree.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```tsx
|
|
22
|
+
* const store = createEastStore();
|
|
23
|
+
* store.register("dashboard", dashboardFn.toIR());
|
|
24
|
+
*
|
|
25
|
+
* function App() {
|
|
26
|
+
* return (
|
|
27
|
+
* <EastStoreProvider store={store}>
|
|
28
|
+
* <EastFunction id="dashboard" />
|
|
29
|
+
* </EastStoreProvider>
|
|
30
|
+
* );
|
|
31
|
+
* }
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
export declare function EastStoreProvider({ store, children }: EastStoreProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
/**
|
|
36
|
+
* Hook to access the EastStore from context.
|
|
37
|
+
*
|
|
38
|
+
* @returns The EastStore instance
|
|
39
|
+
* @throws Error if used outside of an EastStoreProvider
|
|
40
|
+
*/
|
|
41
|
+
export declare function useEastStore(): EastStore;
|
|
42
|
+
/**
|
|
43
|
+
* Props for the EastFunction component.
|
|
44
|
+
*/
|
|
45
|
+
export interface EastFunctionProps {
|
|
46
|
+
/** The East IR to compile and render */
|
|
47
|
+
ir: EastIR<[Map<string, Uint8Array>], any>;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Renders an East function that takes state and returns a UI component.
|
|
51
|
+
* Automatically registers the function and re-renders when state changes.
|
|
52
|
+
*
|
|
53
|
+
* The function is identified by a content-based hash of its IR,
|
|
54
|
+
* so the same function can be used in multiple places without
|
|
55
|
+
* manual ID management.
|
|
56
|
+
*
|
|
57
|
+
* @example
|
|
58
|
+
* ```tsx
|
|
59
|
+
* const counter = East.function(
|
|
60
|
+
* [DictType(StringType, BlobType)],
|
|
61
|
+
* UIComponentType,
|
|
62
|
+
* ($, state) => {
|
|
63
|
+
* const count = state.get("count").decodeBeast(IntegerType, "v2");
|
|
64
|
+
* return Text.Root(East.str`Count: ${count}`);
|
|
65
|
+
* }
|
|
66
|
+
* );
|
|
67
|
+
*
|
|
68
|
+
* // Use directly - no manual registration needed
|
|
69
|
+
* <EastFunction ir={counter.toIR()} />
|
|
70
|
+
* ```
|
|
71
|
+
*/
|
|
72
|
+
export declare function EastFunction({ ir }: EastFunctionProps): import("react/jsx-runtime").JSX.Element | null;
|
|
73
|
+
/**
|
|
74
|
+
* Hook to subscribe to all state changes and get the current state.
|
|
75
|
+
*
|
|
76
|
+
* @returns The current state as a Map
|
|
77
|
+
*
|
|
78
|
+
* @example
|
|
79
|
+
* ```tsx
|
|
80
|
+
* function StateDebugger() {
|
|
81
|
+
* const state = useEastState();
|
|
82
|
+
* return <pre>{JSON.stringify([...state.entries()], null, 2)}</pre>;
|
|
83
|
+
* }
|
|
84
|
+
* ```
|
|
85
|
+
*/
|
|
86
|
+
export declare function useEastState(): Map<string, Uint8Array>;
|
|
87
|
+
/**
|
|
88
|
+
* Hook to subscribe to a specific key and get its value.
|
|
89
|
+
*
|
|
90
|
+
* @param key - The key to subscribe to
|
|
91
|
+
* @returns The Beast2-encoded blob value, or undefined if not set
|
|
92
|
+
*
|
|
93
|
+
* @example
|
|
94
|
+
* ```tsx
|
|
95
|
+
* function CountDisplay() {
|
|
96
|
+
* const countBlob = useEastKey("count");
|
|
97
|
+
* // Decode the blob in your component or pass to East code
|
|
98
|
+
* return <div>Count blob: {countBlob?.length ?? 0} bytes</div>;
|
|
99
|
+
* }
|
|
100
|
+
* ```
|
|
101
|
+
*/
|
|
102
|
+
export declare function useEastKey(key: string): Uint8Array | undefined;
|
|
103
|
+
/**
|
|
104
|
+
* Hook to get a function to write to the store from React code.
|
|
105
|
+
*
|
|
106
|
+
* @returns A write function
|
|
107
|
+
*
|
|
108
|
+
* @example
|
|
109
|
+
* ```tsx
|
|
110
|
+
* function ResetButton() {
|
|
111
|
+
* const write = useEastWrite();
|
|
112
|
+
* const handleReset = () => {
|
|
113
|
+
* write("count", encodeBeast2(0n));
|
|
114
|
+
* };
|
|
115
|
+
* return <button onClick={handleReset}>Reset</button>;
|
|
116
|
+
* }
|
|
117
|
+
* ```
|
|
118
|
+
*/
|
|
119
|
+
export declare function useEastWrite(): (key: string, value: Uint8Array) => void;
|
|
120
|
+
/**
|
|
121
|
+
* Hook to get a batch function for grouping multiple writes.
|
|
122
|
+
*
|
|
123
|
+
* @returns A batch function
|
|
124
|
+
*
|
|
125
|
+
* @example
|
|
126
|
+
* ```tsx
|
|
127
|
+
* function MultiUpdate() {
|
|
128
|
+
* const batch = useEastBatch();
|
|
129
|
+
* const write = useEastWrite();
|
|
130
|
+
*
|
|
131
|
+
* const handleUpdate = () => {
|
|
132
|
+
* batch(() => {
|
|
133
|
+
* write("a", encodeBeast2(1n));
|
|
134
|
+
* write("b", encodeBeast2(2n));
|
|
135
|
+
* write("c", encodeBeast2(3n));
|
|
136
|
+
* });
|
|
137
|
+
* // All writes processed, single re-render
|
|
138
|
+
* };
|
|
139
|
+
*
|
|
140
|
+
* return <button onClick={handleUpdate}>Update All</button>;
|
|
141
|
+
* }
|
|
142
|
+
* ```
|
|
143
|
+
*/
|
|
144
|
+
export declare function useEastBatch(): <T>(fn: () => T) => T;
|
|
145
|
+
//# sourceMappingURL=hooks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../src/platform/hooks.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAMH,KAAK,SAAS,EACjB,MAAM,OAAO,CAAC;AACf,OAAO,EAA+C,KAAK,MAAM,EAAE,MAAM,eAAe,CAAC;AACzF,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAavC;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACnC,wCAAwC;IACxC,KAAK,EAAE,SAAS,CAAC;IACjB,uBAAuB;IACvB,QAAQ,EAAE,SAAS,CAAC;CACvB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,sBAAsB,2CAM5E;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,IAAI,SAAS,CAMxC;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAC9B,wCAAwC;IACxC,EAAE,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;CAC9C;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,YAAY,CAAC,EAAE,EAAE,EAAE,EAAE,iBAAiB,kDA6BrD;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,YAAY,IAAI,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAStD;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,GAAG,SAAS,CAU9D;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,YAAY,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,KAAK,IAAI,CAGvE;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,YAAY,IAAI,CAAC,CAAC,EAAE,EAAE,EAAE,MAAM,CAAC,KAAK,CAAC,CAGpD"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Elara AI Pty Ltd
|
|
3
|
+
* Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* East UI State Management Platform
|
|
7
|
+
*
|
|
8
|
+
* Provides reactive state management for East UI applications.
|
|
9
|
+
* State is stored as Beast2-encoded blobs, allowing any East type to be stored.
|
|
10
|
+
*
|
|
11
|
+
* @packageDocumentation
|
|
12
|
+
*/
|
|
13
|
+
export { State, state_write, state_read } from "@elaraai/east-ui";
|
|
14
|
+
export { EastStore, createEastStore, type EastStoreOptions } from "./store.js";
|
|
15
|
+
export { EastStoreProvider, EastFunction, useEastStore, useEastState, useEastKey, useEastWrite, useEastBatch, type EastStoreProviderProps, type EastFunctionProps, } from "./hooks.js";
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/platform/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;GAOG;AAGH,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAGlE,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,KAAK,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAG/E,OAAO,EACH,iBAAiB,EACjB,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,YAAY,EACZ,KAAK,sBAAsB,EAC3B,KAAK,iBAAiB,GACzB,MAAM,YAAY,CAAC"}
|