@elaraai/east-ui 0.0.1-beta.4 → 0.0.1-beta.6

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 (116) hide show
  1. package/README.md +3 -2
  2. package/dist/src/collections/gantt/index.d.ts +515 -0
  3. package/dist/src/collections/gantt/index.d.ts.map +1 -1
  4. package/dist/src/collections/table/index.d.ts +412 -0
  5. package/dist/src/collections/table/index.d.ts.map +1 -1
  6. package/dist/src/component.d.ts +103 -0
  7. package/dist/src/component.d.ts.map +1 -1
  8. package/dist/src/component.js +15 -1
  9. package/dist/src/component.js.map +1 -1
  10. package/dist/src/container/card/index.d.ts +206 -0
  11. package/dist/src/container/card/index.d.ts.map +1 -1
  12. package/dist/src/disclosure/accordion/index.d.ts +412 -0
  13. package/dist/src/disclosure/accordion/index.d.ts.map +1 -1
  14. package/dist/src/disclosure/carousel/index.d.ts +206 -0
  15. package/dist/src/disclosure/carousel/index.d.ts.map +1 -1
  16. package/dist/src/disclosure/tabs/index.d.ts +412 -0
  17. package/dist/src/disclosure/tabs/index.d.ts.map +1 -1
  18. package/dist/src/forms/field/index.d.ts +206 -0
  19. package/dist/src/forms/field/index.d.ts.map +1 -1
  20. package/dist/src/index.d.ts +1 -1
  21. package/dist/src/index.d.ts.map +1 -1
  22. package/dist/src/index.js +1 -1
  23. package/dist/src/index.js.map +1 -1
  24. package/dist/src/layout/box/index.d.ts +206 -0
  25. package/dist/src/layout/box/index.d.ts.map +1 -1
  26. package/dist/src/layout/grid/index.d.ts +412 -0
  27. package/dist/src/layout/grid/index.d.ts.map +1 -1
  28. package/dist/src/layout/splitter/index.d.ts +412 -0
  29. package/dist/src/layout/splitter/index.d.ts.map +1 -1
  30. package/dist/src/layout/stack/index.d.ts +206 -0
  31. package/dist/src/layout/stack/index.d.ts.map +1 -1
  32. package/dist/src/overlays/dialog/index.d.ts +412 -0
  33. package/dist/src/overlays/dialog/index.d.ts.map +1 -1
  34. package/dist/src/overlays/drawer/index.d.ts +412 -0
  35. package/dist/src/overlays/drawer/index.d.ts.map +1 -1
  36. package/dist/src/overlays/hover-card/index.d.ts +412 -0
  37. package/dist/src/overlays/hover-card/index.d.ts.map +1 -1
  38. package/dist/src/overlays/menu/index.d.ts +206 -0
  39. package/dist/src/overlays/menu/index.d.ts.map +1 -1
  40. package/dist/src/overlays/popover/index.d.ts +412 -0
  41. package/dist/src/overlays/popover/index.d.ts.map +1 -1
  42. package/dist/src/overlays/toggle-tip/index.d.ts +206 -0
  43. package/dist/src/overlays/toggle-tip/index.d.ts.map +1 -1
  44. package/dist/src/overlays/tooltip/index.d.ts +206 -0
  45. package/dist/src/overlays/tooltip/index.d.ts.map +1 -1
  46. package/dist/src/typography/code/index.d.ts +61 -0
  47. package/dist/src/typography/code/index.d.ts.map +1 -0
  48. package/dist/src/typography/code/index.js +65 -0
  49. package/dist/src/typography/code/index.js.map +1 -0
  50. package/dist/src/typography/code/types.d.ts +56 -0
  51. package/dist/src/typography/code/types.d.ts.map +1 -0
  52. package/dist/src/typography/code/types.js +39 -0
  53. package/dist/src/typography/code/types.js.map +1 -0
  54. package/dist/src/typography/code-block/index.d.ts +86 -0
  55. package/dist/src/typography/code-block/index.d.ts.map +1 -0
  56. package/dist/src/typography/code-block/index.js +78 -0
  57. package/dist/src/typography/code-block/index.js.map +1 -0
  58. package/dist/src/typography/code-block/types.d.ts +100 -0
  59. package/dist/src/typography/code-block/types.d.ts.map +1 -0
  60. package/dist/src/typography/code-block/types.js +70 -0
  61. package/dist/src/typography/code-block/types.js.map +1 -0
  62. package/dist/src/typography/heading/index.d.ts +92 -0
  63. package/dist/src/typography/heading/index.d.ts.map +1 -0
  64. package/dist/src/typography/heading/index.js +73 -0
  65. package/dist/src/typography/heading/index.js.map +1 -0
  66. package/dist/src/typography/heading/types.d.ts +108 -0
  67. package/dist/src/typography/heading/types.d.ts.map +1 -0
  68. package/dist/src/typography/heading/types.js +76 -0
  69. package/dist/src/typography/heading/types.js.map +1 -0
  70. package/dist/src/typography/highlight/index.d.ts +48 -0
  71. package/dist/src/typography/highlight/index.d.ts.map +1 -0
  72. package/dist/src/typography/highlight/index.js +60 -0
  73. package/dist/src/typography/highlight/index.js.map +1 -0
  74. package/dist/src/typography/highlight/types.d.ts +26 -0
  75. package/dist/src/typography/highlight/types.d.ts.map +1 -0
  76. package/dist/src/typography/highlight/types.js +21 -0
  77. package/dist/src/typography/highlight/types.js.map +1 -0
  78. package/dist/src/typography/index.d.ts +16 -159
  79. package/dist/src/typography/index.d.ts.map +1 -1
  80. package/dist/src/typography/index.js +24 -167
  81. package/dist/src/typography/index.js.map +1 -1
  82. package/dist/src/typography/link/index.d.ts +56 -0
  83. package/dist/src/typography/link/index.d.ts.map +1 -0
  84. package/dist/src/typography/link/index.js +66 -0
  85. package/dist/src/typography/link/index.js.map +1 -0
  86. package/dist/src/typography/link/types.d.ts +49 -0
  87. package/dist/src/typography/link/types.d.ts.map +1 -0
  88. package/dist/src/typography/link/types.js +38 -0
  89. package/dist/src/typography/link/types.js.map +1 -0
  90. package/dist/src/typography/list/index.d.ts +59 -0
  91. package/dist/src/typography/list/index.d.ts.map +1 -0
  92. package/dist/src/typography/list/index.js +61 -0
  93. package/dist/src/typography/list/index.js.map +1 -0
  94. package/dist/src/typography/list/types.d.ts +47 -0
  95. package/dist/src/typography/list/types.d.ts.map +1 -0
  96. package/dist/src/typography/list/types.js +36 -0
  97. package/dist/src/typography/list/types.js.map +1 -0
  98. package/dist/src/typography/mark/index.d.ts +57 -0
  99. package/dist/src/typography/mark/index.d.ts.map +1 -0
  100. package/dist/src/typography/mark/index.js +58 -0
  101. package/dist/src/typography/mark/index.js.map +1 -0
  102. package/dist/src/typography/mark/types.d.ts +49 -0
  103. package/dist/src/typography/mark/types.d.ts.map +1 -0
  104. package/dist/src/typography/mark/types.js +38 -0
  105. package/dist/src/typography/mark/types.js.map +1 -0
  106. package/dist/src/typography/text/index.d.ts +122 -0
  107. package/dist/src/typography/text/index.d.ts.map +1 -0
  108. package/dist/src/typography/text/index.js +130 -0
  109. package/dist/src/typography/text/index.js.map +1 -0
  110. package/dist/src/typography/{types.d.ts → text/types.d.ts} +2 -2
  111. package/dist/src/typography/text/types.d.ts.map +1 -0
  112. package/dist/src/typography/{types.js → text/types.js} +1 -1
  113. package/dist/src/typography/text/types.js.map +1 -0
  114. package/package.json +2 -2
  115. package/dist/src/typography/types.d.ts.map +0 -1
  116. package/dist/src/typography/types.js.map +0 -1
@@ -0,0 +1,108 @@
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 SubtypeExprOrValue, OptionType, StringType, StructType, VariantType, NullType } from "@elaraai/east";
6
+ import { TextAlignType, type TextAlignLiteral } from "../../style.js";
7
+ /**
8
+ * Heading size type for typography scaling.
9
+ *
10
+ * @property xs - Extra small heading
11
+ * @property sm - Small heading
12
+ * @property md - Medium heading
13
+ * @property lg - Large heading
14
+ * @property xl - Extra large heading
15
+ * @property 2xl - 2x large heading
16
+ * @property 3xl - 3x large heading
17
+ * @property 4xl - 4x large heading
18
+ * @property 5xl - 5x large heading
19
+ * @property 6xl - 6x large heading
20
+ */
21
+ export declare const HeadingSizeType: VariantType<{
22
+ xs: NullType;
23
+ sm: NullType;
24
+ md: NullType;
25
+ lg: NullType;
26
+ xl: NullType;
27
+ "2xl": NullType;
28
+ "3xl": NullType;
29
+ "4xl": NullType;
30
+ "5xl": NullType;
31
+ "6xl": NullType;
32
+ }>;
33
+ export type HeadingSizeType = typeof HeadingSizeType;
34
+ export type HeadingSizeLiteral = "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "6xl";
35
+ /**
36
+ * Heading semantic level type.
37
+ *
38
+ * @property h1 - Level 1 heading (most important)
39
+ * @property h2 - Level 2 heading
40
+ * @property h3 - Level 3 heading
41
+ * @property h4 - Level 4 heading
42
+ * @property h5 - Level 5 heading
43
+ * @property h6 - Level 6 heading (least important)
44
+ */
45
+ export declare const HeadingAsType: VariantType<{
46
+ h1: NullType;
47
+ h2: NullType;
48
+ h3: NullType;
49
+ h4: NullType;
50
+ h5: NullType;
51
+ h6: NullType;
52
+ }>;
53
+ export type HeadingAsType = typeof HeadingAsType;
54
+ export type HeadingAsLiteral = "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
55
+ /**
56
+ * The concrete East type for Heading component data.
57
+ *
58
+ * @property value - The heading text
59
+ * @property size - Visual size of the heading
60
+ * @property as - Semantic HTML element (h1-h6)
61
+ * @property color - Text color
62
+ * @property textAlign - Text alignment
63
+ */
64
+ export declare const HeadingType: StructType<{
65
+ value: StringType;
66
+ size: OptionType<VariantType<{
67
+ xs: NullType;
68
+ sm: NullType;
69
+ md: NullType;
70
+ lg: NullType;
71
+ xl: NullType;
72
+ "2xl": NullType;
73
+ "3xl": NullType;
74
+ "4xl": NullType;
75
+ "5xl": NullType;
76
+ "6xl": NullType;
77
+ }>>;
78
+ as: OptionType<VariantType<{
79
+ h1: NullType;
80
+ h2: NullType;
81
+ h3: NullType;
82
+ h4: NullType;
83
+ h5: NullType;
84
+ h6: NullType;
85
+ }>>;
86
+ color: OptionType<StringType>;
87
+ textAlign: OptionType<VariantType<{
88
+ left: NullType;
89
+ center: NullType;
90
+ right: NullType;
91
+ justify: NullType;
92
+ }>>;
93
+ }>;
94
+ export type HeadingType = typeof HeadingType;
95
+ /**
96
+ * Style configuration for Heading components.
97
+ */
98
+ export type HeadingStyle = {
99
+ /** Visual size of the heading */
100
+ size?: SubtypeExprOrValue<HeadingSizeType> | HeadingSizeLiteral;
101
+ /** Semantic HTML element (h1-h6) */
102
+ as?: SubtypeExprOrValue<HeadingAsType> | HeadingAsLiteral;
103
+ /** Text color */
104
+ color?: SubtypeExprOrValue<StringType>;
105
+ /** Text alignment */
106
+ textAlign?: SubtypeExprOrValue<TextAlignType> | TextAlignLiteral;
107
+ };
108
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/typography/heading/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACH,KAAK,kBAAkB,EACvB,UAAU,EACV,UAAU,EACV,UAAU,EACV,WAAW,EACX,QAAQ,EACX,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,aAAa,EAAE,KAAK,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAMtE;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;EAW1B,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,OAAO,eAAe,CAAC;AACrD,MAAM,MAAM,kBAAkB,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC;AAM1G;;;;;;;;;GASG;AACH,eAAO,MAAM,aAAa;;;;;;;EAOxB,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,OAAO,aAAa,CAAC;AACjD,MAAM,MAAM,gBAAgB,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAMvE;;;;;;;;GAQG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAMtB,CAAC;AAEH,MAAM,MAAM,WAAW,GAAG,OAAO,WAAW,CAAC;AAM7C;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG;IACvB,iCAAiC;IACjC,IAAI,CAAC,EAAE,kBAAkB,CAAC,eAAe,CAAC,GAAG,kBAAkB,CAAC;IAChE,oCAAoC;IACpC,EAAE,CAAC,EAAE,kBAAkB,CAAC,aAAa,CAAC,GAAG,gBAAgB,CAAC;IAC1D,iBAAiB;IACjB,KAAK,CAAC,EAAE,kBAAkB,CAAC,UAAU,CAAC,CAAC;IACvC,qBAAqB;IACrB,SAAS,CAAC,EAAE,kBAAkB,CAAC,aAAa,CAAC,GAAG,gBAAgB,CAAC;CACpE,CAAC"}
@@ -0,0 +1,76 @@
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 { OptionType, StringType, StructType, VariantType, NullType, } from "@elaraai/east";
6
+ import { TextAlignType } from "../../style.js";
7
+ // ============================================================================
8
+ // Heading Size Type
9
+ // ============================================================================
10
+ /**
11
+ * Heading size type for typography scaling.
12
+ *
13
+ * @property xs - Extra small heading
14
+ * @property sm - Small heading
15
+ * @property md - Medium heading
16
+ * @property lg - Large heading
17
+ * @property xl - Extra large heading
18
+ * @property 2xl - 2x large heading
19
+ * @property 3xl - 3x large heading
20
+ * @property 4xl - 4x large heading
21
+ * @property 5xl - 5x large heading
22
+ * @property 6xl - 6x large heading
23
+ */
24
+ export const HeadingSizeType = VariantType({
25
+ xs: NullType,
26
+ sm: NullType,
27
+ md: NullType,
28
+ lg: NullType,
29
+ xl: NullType,
30
+ "2xl": NullType,
31
+ "3xl": NullType,
32
+ "4xl": NullType,
33
+ "5xl": NullType,
34
+ "6xl": NullType,
35
+ });
36
+ // ============================================================================
37
+ // Heading As Type
38
+ // ============================================================================
39
+ /**
40
+ * Heading semantic level type.
41
+ *
42
+ * @property h1 - Level 1 heading (most important)
43
+ * @property h2 - Level 2 heading
44
+ * @property h3 - Level 3 heading
45
+ * @property h4 - Level 4 heading
46
+ * @property h5 - Level 5 heading
47
+ * @property h6 - Level 6 heading (least important)
48
+ */
49
+ export const HeadingAsType = VariantType({
50
+ h1: NullType,
51
+ h2: NullType,
52
+ h3: NullType,
53
+ h4: NullType,
54
+ h5: NullType,
55
+ h6: NullType,
56
+ });
57
+ // ============================================================================
58
+ // Heading Type
59
+ // ============================================================================
60
+ /**
61
+ * The concrete East type for Heading component data.
62
+ *
63
+ * @property value - The heading text
64
+ * @property size - Visual size of the heading
65
+ * @property as - Semantic HTML element (h1-h6)
66
+ * @property color - Text color
67
+ * @property textAlign - Text alignment
68
+ */
69
+ export const HeadingType = StructType({
70
+ value: StringType,
71
+ size: OptionType(HeadingSizeType),
72
+ as: OptionType(HeadingAsType),
73
+ color: OptionType(StringType),
74
+ textAlign: OptionType(TextAlignType),
75
+ });
76
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/typography/heading/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAEH,UAAU,EACV,UAAU,EACV,UAAU,EACV,WAAW,EACX,QAAQ,GACX,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,aAAa,EAAyB,MAAM,gBAAgB,CAAC;AAEtE,+EAA+E;AAC/E,oBAAoB;AACpB,+EAA+E;AAE/E;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,WAAW,CAAC;IACvC,EAAE,EAAE,QAAQ;IACZ,EAAE,EAAE,QAAQ;IACZ,EAAE,EAAE,QAAQ;IACZ,EAAE,EAAE,QAAQ;IACZ,EAAE,EAAE,QAAQ;IACZ,KAAK,EAAE,QAAQ;IACf,KAAK,EAAE,QAAQ;IACf,KAAK,EAAE,QAAQ;IACf,KAAK,EAAE,QAAQ;IACf,KAAK,EAAE,QAAQ;CAClB,CAAC,CAAC;AAKH,+EAA+E;AAC/E,kBAAkB;AAClB,+EAA+E;AAE/E;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,WAAW,CAAC;IACrC,EAAE,EAAE,QAAQ;IACZ,EAAE,EAAE,QAAQ;IACZ,EAAE,EAAE,QAAQ;IACZ,EAAE,EAAE,QAAQ;IACZ,EAAE,EAAE,QAAQ;IACZ,EAAE,EAAE,QAAQ;CACf,CAAC,CAAC;AAKH,+EAA+E;AAC/E,eAAe;AACf,+EAA+E;AAE/E;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,UAAU,CAAC;IAClC,KAAK,EAAE,UAAU;IACjB,IAAI,EAAE,UAAU,CAAC,eAAe,CAAC;IACjC,EAAE,EAAE,UAAU,CAAC,aAAa,CAAC;IAC7B,KAAK,EAAE,UAAU,CAAC,UAAU,CAAC;IAC7B,SAAS,EAAE,UAAU,CAAC,aAAa,CAAC;CACvC,CAAC,CAAC"}
@@ -0,0 +1,48 @@
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 SubtypeExprOrValue, type ExprType, StringType, ArrayType } from "@elaraai/east";
6
+ import { UIComponentType } from "../../component.js";
7
+ import { type HighlightStyle } from "./types.js";
8
+ export { HighlightType, type HighlightStyle } from "./types.js";
9
+ /**
10
+ * Creates a Highlight component for highlighting text portions.
11
+ *
12
+ * @param value - The text containing content to highlight
13
+ * @param query - String or array of strings to highlight
14
+ * @param style - Optional styling configuration
15
+ * @returns An East expression representing the highlight component
16
+ */
17
+ declare function createHighlight(value: SubtypeExprOrValue<StringType>, query: SubtypeExprOrValue<ArrayType<StringType>> | string | string[], style?: HighlightStyle): ExprType<UIComponentType>;
18
+ /**
19
+ * Highlight component for highlighting portions of text.
20
+ *
21
+ * @remarks
22
+ * Use `Highlight.Root(value, query, style)` to highlight matching text.
23
+ *
24
+ * @example
25
+ * ```ts
26
+ * import { East } from "@elaraai/east";
27
+ * import { Highlight, UIComponentType } from "@elaraai/east-ui";
28
+ *
29
+ * const example = East.function([], UIComponentType, $ => {
30
+ * return Highlight.Root(
31
+ * "Search results for: react components",
32
+ * ["react", "components"],
33
+ * { color: "yellow.200" }
34
+ * );
35
+ * });
36
+ * ```
37
+ */
38
+ export declare const Highlight: {
39
+ readonly Root: typeof createHighlight;
40
+ readonly Types: {
41
+ readonly Highlight: import("@elaraai/east").StructType<{
42
+ value: StringType;
43
+ query: ArrayType<StringType>;
44
+ color: import("@elaraai/east").OptionType<StringType>;
45
+ }>;
46
+ };
47
+ };
48
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/typography/highlight/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACH,KAAK,kBAAkB,EACvB,KAAK,QAAQ,EAEb,UAAU,EACV,SAAS,EAEZ,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAiB,KAAK,cAAc,EAAE,MAAM,YAAY,CAAC;AAGhE,OAAO,EAAE,aAAa,EAAE,KAAK,cAAc,EAAE,MAAM,YAAY,CAAC;AAMhE;;;;;;;GAOG;AACH,iBAAS,eAAe,CACpB,KAAK,EAAE,kBAAkB,CAAC,UAAU,CAAC,EACrC,KAAK,EAAE,kBAAkB,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,GAAG,MAAM,GAAG,MAAM,EAAE,EACpE,KAAK,CAAC,EAAE,cAAc,GACvB,QAAQ,CAAC,eAAe,CAAC,CAa3B;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,SAAS;;;;;;;;;CAKZ,CAAC"}
@@ -0,0 +1,60 @@
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 { East, StringType, ArrayType, variant, } from "@elaraai/east";
6
+ import { UIComponentType } from "../../component.js";
7
+ import { HighlightType } from "./types.js";
8
+ // Re-export types
9
+ export { HighlightType } from "./types.js";
10
+ // ============================================================================
11
+ // Highlight Component
12
+ // ============================================================================
13
+ /**
14
+ * Creates a Highlight component for highlighting text portions.
15
+ *
16
+ * @param value - The text containing content to highlight
17
+ * @param query - String or array of strings to highlight
18
+ * @param style - Optional styling configuration
19
+ * @returns An East expression representing the highlight component
20
+ */
21
+ function createHighlight(value, query, style) {
22
+ // Normalize query to array
23
+ const queryArray = typeof query === "string"
24
+ ? [query]
25
+ : Array.isArray(query)
26
+ ? query
27
+ : query;
28
+ return East.value(variant("Highlight", {
29
+ value: value,
30
+ query: queryArray,
31
+ color: style?.color ? variant("some", style.color) : variant("none", null),
32
+ }), UIComponentType);
33
+ }
34
+ /**
35
+ * Highlight component for highlighting portions of text.
36
+ *
37
+ * @remarks
38
+ * Use `Highlight.Root(value, query, style)` to highlight matching text.
39
+ *
40
+ * @example
41
+ * ```ts
42
+ * import { East } from "@elaraai/east";
43
+ * import { Highlight, UIComponentType } from "@elaraai/east-ui";
44
+ *
45
+ * const example = East.function([], UIComponentType, $ => {
46
+ * return Highlight.Root(
47
+ * "Search results for: react components",
48
+ * ["react", "components"],
49
+ * { color: "yellow.200" }
50
+ * );
51
+ * });
52
+ * ```
53
+ */
54
+ export const Highlight = {
55
+ Root: createHighlight,
56
+ Types: {
57
+ Highlight: HighlightType,
58
+ },
59
+ };
60
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/typography/highlight/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAGH,IAAI,EACJ,UAAU,EACV,SAAS,EACT,OAAO,GACV,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAuB,MAAM,YAAY,CAAC;AAEhE,kBAAkB;AAClB,OAAO,EAAE,aAAa,EAAuB,MAAM,YAAY,CAAC;AAEhE,+EAA+E;AAC/E,sBAAsB;AACtB,+EAA+E;AAE/E;;;;;;;GAOG;AACH,SAAS,eAAe,CACpB,KAAqC,EACrC,KAAoE,EACpE,KAAsB;IAEtB,2BAA2B;IAC3B,MAAM,UAAU,GAAG,OAAO,KAAK,KAAK,QAAQ;QACxC,CAAC,CAAC,CAAC,KAAK,CAAC;QACT,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;YAClB,CAAC,CAAC,KAAK;YACP,CAAC,CAAC,KAAK,CAAC;IAEhB,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,WAAW,EAAE;QACnC,KAAK,EAAE,KAAK;QACZ,KAAK,EAAE,UAAU;QACjB,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC;KAC7E,CAAC,EAAE,eAAe,CAAC,CAAC;AACzB,CAAC;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG;IACrB,IAAI,EAAE,eAAe;IACrB,KAAK,EAAE;QACH,SAAS,EAAE,aAAa;KAC3B;CACK,CAAC"}
@@ -0,0 +1,26 @@
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 SubtypeExprOrValue, OptionType, StringType, StructType, ArrayType } from "@elaraai/east";
6
+ /**
7
+ * The concrete East type for Highlight component data.
8
+ *
9
+ * @property value - The text containing content to highlight
10
+ * @property query - String or array of strings to highlight within the text
11
+ * @property color - Background color for highlighted portions
12
+ */
13
+ export declare const HighlightType: StructType<{
14
+ value: StringType;
15
+ query: ArrayType<StringType>;
16
+ color: OptionType<StringType>;
17
+ }>;
18
+ export type HighlightType = typeof HighlightType;
19
+ /**
20
+ * Style configuration for Highlight components.
21
+ */
22
+ export type HighlightStyle = {
23
+ /** Background color for highlighted text */
24
+ color?: SubtypeExprOrValue<StringType>;
25
+ };
26
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/typography/highlight/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACH,KAAK,kBAAkB,EACvB,UAAU,EACV,UAAU,EACV,UAAU,EACV,SAAS,EACZ,MAAM,eAAe,CAAC;AAMvB;;;;;;GAMG;AACH,eAAO,MAAM,aAAa;;;;EAIxB,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,OAAO,aAAa,CAAC;AAMjD;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG;IACzB,4CAA4C;IAC5C,KAAK,CAAC,EAAE,kBAAkB,CAAC,UAAU,CAAC,CAAC;CAC1C,CAAC"}
@@ -0,0 +1,21 @@
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 { OptionType, StringType, StructType, ArrayType, } from "@elaraai/east";
6
+ // ============================================================================
7
+ // Highlight Type
8
+ // ============================================================================
9
+ /**
10
+ * The concrete East type for Highlight component data.
11
+ *
12
+ * @property value - The text containing content to highlight
13
+ * @property query - String or array of strings to highlight within the text
14
+ * @property color - Background color for highlighted portions
15
+ */
16
+ export const HighlightType = StructType({
17
+ value: StringType,
18
+ query: ArrayType(StringType),
19
+ color: OptionType(StringType),
20
+ });
21
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/typography/highlight/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAEH,UAAU,EACV,UAAU,EACV,UAAU,EACV,SAAS,GACZ,MAAM,eAAe,CAAC;AAEvB,+EAA+E;AAC/E,iBAAiB;AACjB,+EAA+E;AAE/E;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,UAAU,CAAC;IACpC,KAAK,EAAE,UAAU;IACjB,KAAK,EAAE,SAAS,CAAC,UAAU,CAAC;IAC5B,KAAK,EAAE,UAAU,CAAC,UAAU,CAAC;CAChC,CAAC,CAAC"}
@@ -2,163 +2,20 @@
2
2
  * Copyright (c) 2025 Elara AI Pty Ltd
3
3
  * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
4
4
  */
5
- import { type SubtypeExprOrValue, type ExprType, StringType } from "@elaraai/east";
6
- import { UIComponentType } from "../component.js";
7
- import { type TextStyle } from "./types.js";
8
- export { TextType, type TextStyle } from "./types.js";
9
- /**
10
- * Creates a Text component with a value and optional styling.
11
- *
12
- * @param value - The text value as a string or East expression
13
- * @param style - Optional styling configuration for the text
14
- * @returns An East expression representing the styled text component
15
- *
16
- * @remarks
17
- * The value can be a plain string or an East expression of StringType.
18
- *
19
- * @example
20
- * ```ts
21
- * import { Text } from "@elaraai/east-ui";
22
- *
23
- * // Simple text
24
- * const text = Text.Root("Hello");
25
- *
26
- * // Styled text with string literals
27
- * const styledText = Text.Root("World", {
28
- * color: "blue.500",
29
- * fontWeight: "bold",
30
- * textAlign: "center",
31
- * });
32
- *
33
- * // Access the type
34
- * const textType = Text.Types.Text;
35
- * ```
36
- */
37
- declare function createText(value: SubtypeExprOrValue<StringType>, style?: TextStyle): ExprType<UIComponentType>;
38
- /**
39
- * Text component for displaying styled text content.
40
- *
41
- * @remarks
42
- * Use `Text.Root(value, style)` to create text, or access `Text.Types.Text` for the East type.
43
- *
44
- * @example
45
- * ```ts
46
- * import { Text } from "@elaraai/east-ui";
47
- *
48
- * // Create styled text
49
- * const text = Text.Root("Hello", { color: "blue.500", fontWeight: "bold" });
50
- *
51
- * // Access the type
52
- * const textType = Text.Types.Text;
53
- * ```
54
- */
55
- export declare const Text: {
56
- /**
57
- * Creates a Text component for displaying styled text content.
58
- *
59
- * @param value - The text string to display
60
- * @param style - Optional styling configuration
61
- * @returns An East expression representing the text component
62
- *
63
- * @remarks
64
- * Text is the fundamental component for displaying text content.
65
- * It supports various styling options including color, font weight,
66
- * alignment, and text overflow handling.
67
- *
68
- * @example
69
- * ```ts
70
- * import { East } from "@elaraai/east";
71
- * import { Text, UIComponentType } from "@elaraai/east-ui";
72
- *
73
- * const example = East.function([], UIComponentType, $ => {
74
- * return Text.Root("Hello World", {
75
- * color: "blue.500",
76
- * fontWeight: "bold",
77
- * textAlign: "center",
78
- * });
79
- * });
80
- * ```
81
- */
82
- readonly Root: typeof createText;
83
- readonly Types: {
84
- /**
85
- * The concrete East type for Text component data.
86
- *
87
- * @remarks
88
- * This struct type represents the serializable data structure for a Text component.
89
- *
90
- * @property value - The text string content
91
- * @property color - Text color (Chakra UI color token or CSS color)
92
- * @property fontWeight - Font weight (normal, bold, semibold, etc.)
93
- * @property fontSize - Font size (xs, sm, md, lg, xl, etc.)
94
- * @property textAlign - Text alignment (left, center, right, justify)
95
- * @property textOverflow - Text overflow behavior (clip, ellipsis)
96
- */
97
- readonly Text: import("@elaraai/east").StructType<{
98
- value: StringType;
99
- color: import("@elaraai/east").OptionType<StringType>;
100
- background: import("@elaraai/east").OptionType<StringType>;
101
- fontWeight: import("@elaraai/east").OptionType<import("@elaraai/east").VariantType<{
102
- normal: import("@elaraai/east").NullType;
103
- bold: import("@elaraai/east").NullType;
104
- semibold: import("@elaraai/east").NullType;
105
- medium: import("@elaraai/east").NullType;
106
- light: import("@elaraai/east").NullType;
107
- }>>;
108
- fontStyle: import("@elaraai/east").OptionType<import("@elaraai/east").VariantType<{
109
- normal: import("@elaraai/east").NullType;
110
- italic: import("@elaraai/east").NullType;
111
- }>>;
112
- fontSize: import("@elaraai/east").OptionType<import("@elaraai/east").VariantType<{
113
- xs: import("@elaraai/east").NullType;
114
- sm: import("@elaraai/east").NullType;
115
- md: import("@elaraai/east").NullType;
116
- lg: import("@elaraai/east").NullType;
117
- }>>;
118
- textTransform: import("@elaraai/east").OptionType<import("@elaraai/east").VariantType<{
119
- uppercase: import("@elaraai/east").NullType;
120
- lowercase: import("@elaraai/east").NullType;
121
- capitalize: import("@elaraai/east").NullType;
122
- none: import("@elaraai/east").NullType;
123
- }>>;
124
- textAlign: import("@elaraai/east").OptionType<import("@elaraai/east").VariantType<{
125
- left: import("@elaraai/east").NullType;
126
- center: import("@elaraai/east").NullType;
127
- right: import("@elaraai/east").NullType;
128
- justify: import("@elaraai/east").NullType;
129
- }>>;
130
- textOverflow: import("@elaraai/east").OptionType<import("@elaraai/east").VariantType<{
131
- clip: import("@elaraai/east").NullType;
132
- ellipsis: import("@elaraai/east").NullType;
133
- }>>;
134
- whiteSpace: import("@elaraai/east").OptionType<import("@elaraai/east").VariantType<{
135
- normal: import("@elaraai/east").NullType;
136
- nowrap: import("@elaraai/east").NullType;
137
- pre: import("@elaraai/east").NullType;
138
- "pre-wrap": import("@elaraai/east").NullType;
139
- "pre-line": import("@elaraai/east").NullType;
140
- }>>;
141
- overflow: import("@elaraai/east").OptionType<import("@elaraai/east").VariantType<{
142
- visible: import("@elaraai/east").NullType;
143
- hidden: import("@elaraai/east").NullType;
144
- scroll: import("@elaraai/east").NullType;
145
- auto: import("@elaraai/east").NullType;
146
- }>>;
147
- borderWidth: import("@elaraai/east").OptionType<import("@elaraai/east").VariantType<{
148
- none: import("@elaraai/east").NullType;
149
- thin: import("@elaraai/east").NullType;
150
- medium: import("@elaraai/east").NullType;
151
- thick: import("@elaraai/east").NullType;
152
- }>>;
153
- borderStyle: import("@elaraai/east").OptionType<import("@elaraai/east").VariantType<{
154
- solid: import("@elaraai/east").NullType;
155
- dashed: import("@elaraai/east").NullType;
156
- dotted: import("@elaraai/east").NullType;
157
- double: import("@elaraai/east").NullType;
158
- none: import("@elaraai/east").NullType;
159
- }>>;
160
- borderColor: import("@elaraai/east").OptionType<StringType>;
161
- }>;
162
- };
163
- };
5
+ export { Text } from "./text/index.js";
6
+ export { TextType, type TextStyle } from "./text/types.js";
7
+ export { Code } from "./code/index.js";
8
+ export { CodeType, CodeVariantType, type CodeStyle } from "./code/types.js";
9
+ export { Heading } from "./heading/index.js";
10
+ export { HeadingType, HeadingSizeType, HeadingAsType, type HeadingStyle } from "./heading/types.js";
11
+ export { Link } from "./link/index.js";
12
+ export { LinkType, LinkVariantType, type LinkStyle } from "./link/types.js";
13
+ export { Highlight } from "./highlight/index.js";
14
+ export { HighlightType, type HighlightStyle } from "./highlight/types.js";
15
+ export { Mark } from "./mark/index.js";
16
+ export { MarkType, MarkVariantType, type MarkStyle } from "./mark/types.js";
17
+ export { List } from "./list/index.js";
18
+ export { ListType, ListVariantType, type ListStyle } from "./list/types.js";
19
+ export { CodeBlock } from "./code-block/index.js";
20
+ export { CodeBlockType, type CodeBlockStyle } from "./code-block/types.js";
164
21
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/typography/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACH,KAAK,kBAAkB,EACvB,KAAK,QAAQ,EAEb,UAAU,EAEb,MAAM,eAAe,CAAC;AAcvB,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,YAAY,CAAC;AAGtD,OAAO,EAAE,QAAQ,EAAE,KAAK,SAAS,EAAE,MAAM,YAAY,CAAC;AAMtD;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,iBAAS,UAAU,CACf,KAAK,EAAE,kBAAkB,CAAC,UAAU,CAAC,EACrC,KAAK,CAAC,EAAE,SAAS,GAClB,QAAQ,CAAC,eAAe,CAAC,CA6E3B;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,IAAI;IACb;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;;;QAGC;;;;;;;;;;;;WAYG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGD,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/typography/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,KAAK,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG3D,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,KAAK,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5E,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,aAAa,EAAE,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAGpG,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,KAAK,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5E,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,KAAK,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAG1E,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,KAAK,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5E,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,KAAK,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5E,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,KAAK,cAAc,EAAE,MAAM,uBAAuB,CAAC"}