@elaraai/east-ui 1.0.97 → 1.0.98

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 (99) hide show
  1. package/dist/src/collections/index.d.ts +0 -1
  2. package/dist/src/collections/index.d.ts.map +1 -1
  3. package/dist/src/collections/index.js +0 -1
  4. package/dist/src/collections/index.js.map +1 -1
  5. package/dist/src/component.d.ts +0 -999
  6. package/dist/src/component.d.ts.map +1 -1
  7. package/dist/src/component.js +0 -44
  8. package/dist/src/component.js.map +1 -1
  9. package/dist/src/contracts/drag.d.ts +2 -2
  10. package/dist/src/contracts/drag.js +2 -2
  11. package/dist/src/contracts/editing.d.ts +4 -0
  12. package/dist/src/contracts/editing.d.ts.map +1 -1
  13. package/dist/src/contracts/editing.js +2 -1
  14. package/dist/src/contracts/editing.js.map +1 -1
  15. package/dist/src/index.d.ts +2 -1
  16. package/dist/src/index.d.ts.map +1 -1
  17. package/dist/src/index.js +4 -1
  18. package/dist/src/index.js.map +1 -1
  19. package/dist/src/internal.d.ts +4 -1
  20. package/dist/src/internal.d.ts.map +1 -1
  21. package/dist/src/internal.js +5 -2
  22. package/dist/src/internal.js.map +1 -1
  23. package/dist/src/layout/snap-grid/index.d.ts +1 -0
  24. package/dist/src/layout/snap-grid/index.d.ts.map +1 -1
  25. package/dist/src/pick/panel/index.js +1 -1
  26. package/dist/src/pick/panel/index.js.map +1 -1
  27. package/dist/src/platform/slice/index.d.ts +4 -7
  28. package/dist/src/platform/slice/index.d.ts.map +1 -1
  29. package/dist/src/platform/slice/index.js +5 -8
  30. package/dist/src/platform/slice/index.js.map +1 -1
  31. package/dist/src/platform/slice/record-area.d.ts +181 -0
  32. package/dist/src/platform/slice/record-area.d.ts.map +1 -0
  33. package/dist/src/platform/slice/record-area.js +304 -0
  34. package/dist/src/platform/slice/record-area.js.map +1 -0
  35. package/dist/src/platform/slice/record-chrome.d.ts +138 -0
  36. package/dist/src/platform/slice/record-chrome.d.ts.map +1 -1
  37. package/dist/src/platform/slice/record-plan.d.ts +34 -1
  38. package/dist/src/platform/slice/record-plan.d.ts.map +1 -1
  39. package/dist/src/platform/slice/record-plan.js +126 -3
  40. package/dist/src/platform/slice/record-plan.js.map +1 -1
  41. package/dist/src/platform/slice/record-series.d.ts +166 -0
  42. package/dist/src/platform/slice/record-series.d.ts.map +1 -0
  43. package/dist/src/platform/slice/record-series.js +258 -0
  44. package/dist/src/platform/slice/record-series.js.map +1 -0
  45. package/dist/src/platform/slice/record-types.d.ts +1862 -13
  46. package/dist/src/platform/slice/record-types.d.ts.map +1 -1
  47. package/dist/src/platform/slice/record-types.js +50 -4
  48. package/dist/src/platform/slice/record-types.js.map +1 -1
  49. package/dist/src/platform/slice/record.d.ts +17 -2
  50. package/dist/src/platform/slice/record.d.ts.map +1 -1
  51. package/dist/src/platform/slice/record.js +62 -9
  52. package/dist/src/platform/slice/record.js.map +1 -1
  53. package/dist/src/runtime/collections/index.d.ts +0 -1
  54. package/dist/src/runtime/collections/index.d.ts.map +1 -1
  55. package/dist/src/runtime/collections/index.js +0 -1
  56. package/dist/src/runtime/collections/index.js.map +1 -1
  57. package/dist/src/runtime/record-slice-source.d.ts +298 -0
  58. package/dist/src/runtime/record-slice-source.d.ts.map +1 -1
  59. package/dist/src/runtime/record-slice-source.js +554 -16
  60. package/dist/src/runtime/record-slice-source.js.map +1 -1
  61. package/dist/src/runtime/record-slice.d.ts +87 -3
  62. package/dist/src/runtime/record-slice.d.ts.map +1 -1
  63. package/dist/src/runtime/record-slice.js +175 -12
  64. package/dist/src/runtime/record-slice.js.map +1 -1
  65. package/dist/src/slice/record/index.d.ts +69 -0
  66. package/dist/src/slice/record/index.d.ts.map +1 -1
  67. package/dist/src/style/color.d.ts +237 -0
  68. package/dist/src/style/color.d.ts.map +1 -0
  69. package/dist/src/style/color.js +105 -0
  70. package/dist/src/style/color.js.map +1 -0
  71. package/dist/src/style/namespace.d.ts +151 -1
  72. package/dist/src/style/namespace.d.ts.map +1 -1
  73. package/dist/src/style/namespace.js +9 -1
  74. package/dist/src/style/namespace.js.map +1 -1
  75. package/dist/src/style.d.ts +3 -0
  76. package/dist/src/style.d.ts.map +1 -1
  77. package/dist/src/style.js +3 -0
  78. package/dist/src/style.js.map +1 -1
  79. package/dist/test/style.examples.d.ts +1 -0
  80. package/dist/test/style.examples.d.ts.map +1 -1
  81. package/dist/test/style.examples.js +17 -2
  82. package/dist/test/style.examples.js.map +1 -1
  83. package/package.json +4 -4
  84. package/dist/src/collections/schematic/index.d.ts +0 -1390
  85. package/dist/src/collections/schematic/index.d.ts.map +0 -1
  86. package/dist/src/collections/schematic/index.js +0 -815
  87. package/dist/src/collections/schematic/index.js.map +0 -1
  88. package/dist/src/collections/schematic/types.d.ts +0 -1183
  89. package/dist/src/collections/schematic/types.d.ts.map +0 -1
  90. package/dist/src/collections/schematic/types.js +0 -724
  91. package/dist/src/collections/schematic/types.js.map +0 -1
  92. package/dist/src/runtime/collections/schematic.d.ts +0 -73
  93. package/dist/src/runtime/collections/schematic.d.ts.map +0 -1
  94. package/dist/src/runtime/collections/schematic.js +0 -69
  95. package/dist/src/runtime/collections/schematic.js.map +0 -1
  96. package/dist/test/collections/schematic.examples.d.ts +0 -23
  97. package/dist/test/collections/schematic.examples.d.ts.map +0 -1
  98. package/dist/test/collections/schematic.examples.js +0 -602
  99. package/dist/test/collections/schematic.examples.js.map +0 -1
@@ -41,6 +41,39 @@ export declare const RecordSliceRailComponent: import("../../extension.js").UICo
41
41
  readonly to: import("@elaraai/east").StringType;
42
42
  readonly optional: import("@elaraai/east").BooleanType;
43
43
  }>>;
44
+ readonly area: import("@elaraai/east").OptionType<import("@elaraai/east").StructType<{
45
+ readonly x: import("@elaraai/east").StringType;
46
+ readonly y: import("@elaraai/east").StringType;
47
+ readonly width: import("@elaraai/east").OptionType<import("@elaraai/east").StringType>;
48
+ readonly height: import("@elaraai/east").OptionType<import("@elaraai/east").StringType>;
49
+ readonly centre: import("@elaraai/east").BooleanType;
50
+ readonly cell: import("@elaraai/east").FloatType;
51
+ readonly optional: import("@elaraai/east").BooleanType;
52
+ }>>;
53
+ readonly series: import("@elaraai/east").OptionType<import("@elaraai/east").StructType<{
54
+ readonly key: import("@elaraai/east").StringType;
55
+ readonly from: import("@elaraai/east").StringType;
56
+ readonly to: import("@elaraai/east").StringType;
57
+ readonly tile: import("@elaraai/east").VariantType<{
58
+ readonly day: import("@elaraai/east").NullType;
59
+ readonly week: import("@elaraai/east").NullType;
60
+ readonly month: import("@elaraai/east").NullType;
61
+ readonly quarter: import("@elaraai/east").NullType;
62
+ readonly year: import("@elaraai/east").NullType;
63
+ }>;
64
+ }>>;
65
+ readonly summary: import("@elaraai/east").OptionType<import("@elaraai/east").StructType<{
66
+ readonly key: import("@elaraai/east").StringType;
67
+ readonly from: import("@elaraai/east").StringType;
68
+ readonly to: import("@elaraai/east").StringType;
69
+ readonly tile: import("@elaraai/east").VariantType<{
70
+ readonly day: import("@elaraai/east").NullType;
71
+ readonly week: import("@elaraai/east").NullType;
72
+ readonly month: import("@elaraai/east").NullType;
73
+ readonly quarter: import("@elaraai/east").NullType;
74
+ readonly year: import("@elaraai/east").NullType;
75
+ }>;
76
+ }>>;
44
77
  }>>;
45
78
  readonly range: import("@elaraai/east").OptionType<import("@elaraai/east").StringType>;
46
79
  readonly search: import("@elaraai/east").ArrayType<import("@elaraai/east").StringType>;
@@ -54,6 +87,12 @@ export declare const RecordSliceRailComponent: import("../../extension.js").UICo
54
87
  readonly to: import("@elaraai/east").StringType;
55
88
  }>;
56
89
  readonly prefix: import("@elaraai/east").StringType;
90
+ readonly window: import("@elaraai/east").StructType<{
91
+ readonly minX: import("@elaraai/east").FloatType;
92
+ readonly minY: import("@elaraai/east").FloatType;
93
+ readonly maxX: import("@elaraai/east").FloatType;
94
+ readonly maxY: import("@elaraai/east").FloatType;
95
+ }>;
57
96
  }>>;
58
97
  }>>;
59
98
  }>;
@@ -65,6 +104,12 @@ export declare const RecordSliceRailComponent: import("../../extension.js").UICo
65
104
  readonly to: import("@elaraai/east").StringType;
66
105
  }>;
67
106
  readonly prefix: import("@elaraai/east").StringType;
107
+ readonly window: import("@elaraai/east").StructType<{
108
+ readonly minX: import("@elaraai/east").FloatType;
109
+ readonly minY: import("@elaraai/east").FloatType;
110
+ readonly maxX: import("@elaraai/east").FloatType;
111
+ readonly maxY: import("@elaraai/east").FloatType;
112
+ }>;
68
113
  }>>;
69
114
  readonly preset: import("@elaraai/east").OptionType<import("@elaraai/east").StringType>;
70
115
  readonly resolution: import("@elaraai/east").OptionType<import("@elaraai/east").VariantType<{
@@ -85,6 +130,12 @@ export declare const RecordSliceRailComponent: import("../../extension.js").UICo
85
130
  readonly to: import("@elaraai/east").StringType;
86
131
  }>;
87
132
  readonly prefix: import("@elaraai/east").StringType;
133
+ readonly window: import("@elaraai/east").StructType<{
134
+ readonly minX: import("@elaraai/east").FloatType;
135
+ readonly minY: import("@elaraai/east").FloatType;
136
+ readonly maxX: import("@elaraai/east").FloatType;
137
+ readonly maxY: import("@elaraai/east").FloatType;
138
+ }>;
88
139
  }>>;
89
140
  readonly preset: import("@elaraai/east").OptionType<import("@elaraai/east").StringType>;
90
141
  readonly resolution: import("@elaraai/east").OptionType<import("@elaraai/east").VariantType<{
@@ -110,6 +161,12 @@ export declare const RecordSliceRailComponent: import("../../extension.js").UICo
110
161
  readonly to: import("@elaraai/east").StringType;
111
162
  }>;
112
163
  readonly prefix: import("@elaraai/east").StringType;
164
+ readonly window: import("@elaraai/east").StructType<{
165
+ readonly minX: import("@elaraai/east").FloatType;
166
+ readonly minY: import("@elaraai/east").FloatType;
167
+ readonly maxX: import("@elaraai/east").FloatType;
168
+ readonly maxY: import("@elaraai/east").FloatType;
169
+ }>;
113
170
  }>>], import("@elaraai/east").OptionType<import("@elaraai/east").IntegerType>>;
114
171
  readonly total: import("@elaraai/east").FunctionType<[], import("@elaraai/east").OptionType<import("@elaraai/east").IntegerType>>;
115
172
  readonly domain: import("@elaraai/east").FunctionType<[import("@elaraai/east").StringType], import("@elaraai/east").OptionType<import("@elaraai/east").StructType<{
@@ -151,6 +208,12 @@ export declare const RecordSliceRailComponent: import("../../extension.js").UICo
151
208
  readonly to: import("@elaraai/east").StringType;
152
209
  }>;
153
210
  readonly prefix: import("@elaraai/east").StringType;
211
+ readonly window: import("@elaraai/east").StructType<{
212
+ readonly minX: import("@elaraai/east").FloatType;
213
+ readonly minY: import("@elaraai/east").FloatType;
214
+ readonly maxX: import("@elaraai/east").FloatType;
215
+ readonly maxY: import("@elaraai/east").FloatType;
216
+ }>;
154
217
  }>>, import("@elaraai/east").StringType], import("@elaraai/east").OptionType<import("@elaraai/east").BooleanType>>;
155
218
  readonly containsRow: import("@elaraai/east").FunctionType<[import("@elaraai/east").DictType<import("@elaraai/east").StringType, import("@elaraai/east").VariantType<{
156
219
  readonly values: import("@elaraai/east").ArrayType<import("@elaraai/east").StringType>;
@@ -159,6 +222,12 @@ export declare const RecordSliceRailComponent: import("../../extension.js").UICo
159
222
  readonly to: import("@elaraai/east").StringType;
160
223
  }>;
161
224
  readonly prefix: import("@elaraai/east").StringType;
225
+ readonly window: import("@elaraai/east").StructType<{
226
+ readonly minX: import("@elaraai/east").FloatType;
227
+ readonly minY: import("@elaraai/east").FloatType;
228
+ readonly maxX: import("@elaraai/east").FloatType;
229
+ readonly maxY: import("@elaraai/east").FloatType;
230
+ }>;
162
231
  }>>, import("@elaraai/east").StringType, import("@elaraai/east").BlobType], import("@elaraai/east").OptionType<import("@elaraai/east").BooleanType>>;
163
232
  }>;
164
233
  readonly affordances: import("@elaraai/east").ArrayType<import("@elaraai/east").VariantType<{
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/slice/record/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,yDAAyD;AACzD,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAA6D,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/slice/record/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,yDAAyD;AACzD,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAA6D,CAAC"}
@@ -0,0 +1,237 @@
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 { NullType, VariantType, type ExprType } from "@elaraai/east";
6
+ /**
7
+ * Color shade variant type — the steps of a theme palette, `50` to `900`.
8
+ *
9
+ * @remarks
10
+ * One case per step of the design system's scales (`brand`, `gray`) and of
11
+ * the stock Chakra palettes the theme carries for the other hues. A shade is
12
+ * never used alone: it is the payload of a {@link ColorTokenType} hue case.
13
+ *
14
+ * @property 50 - The lightest step
15
+ * @property 100 - A tint
16
+ * @property 200 - A tint
17
+ * @property 300 - A tint
18
+ * @property 400 - The last step whose ink is the foreground
19
+ * @property 500 - The hue's solid
20
+ * @property 600 - A shade
21
+ * @property 700 - A shade
22
+ * @property 800 - A shade
23
+ * @property 900 - The darkest step
24
+ */
25
+ export declare const ColorShadeType: VariantType<{
26
+ readonly "50": NullType;
27
+ readonly "100": NullType;
28
+ readonly "200": NullType;
29
+ readonly "300": NullType;
30
+ readonly "400": NullType;
31
+ readonly "500": NullType;
32
+ readonly "600": NullType;
33
+ readonly "700": NullType;
34
+ readonly "800": NullType;
35
+ readonly "900": NullType;
36
+ }>;
37
+ /**
38
+ * Type representing color shade variant values.
39
+ */
40
+ export type ColorShadeType = typeof ColorShadeType;
41
+ /**
42
+ * String literal type for color shade values.
43
+ */
44
+ export type ColorShadeLiteral = "50" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900";
45
+ /**
46
+ * Color token variant type — a theme hue holding its shade: the one typed
47
+ * colour every component that takes a colour for a data fill takes.
48
+ *
49
+ * @remarks
50
+ * Create instances using the {@link ColorToken} function. The hues are
51
+ * {@link ColorSchemeType}'s hue cases — the theme's palettes: `brand` and
52
+ * `gray` the design system's scales, the rest Chakra's stock — and the shade
53
+ * is a {@link ColorShadeType}, so `variant("red", variant("100", null))` is
54
+ * `Style.ColorToken("red", "100")`. A renderer resolves a token as
55
+ * `{colors.<hue>.<shade>}`, the same in both colour modes, and draws the
56
+ * words on it in the ink the shade takes (the foreground up to `400`, the
57
+ * paper's from `500`). It is a colour the APP gives — a shift's, a series' —
58
+ * never a state: a state's colour is a {@link StatusTokenType}.
59
+ *
60
+ * @property brand - The design system's primary scale
61
+ * @property gray - The design system's gray scale
62
+ * @property red - Red palette
63
+ * @property orange - Orange palette
64
+ * @property yellow - Yellow palette
65
+ * @property green - Green palette
66
+ * @property teal - Teal palette
67
+ * @property blue - Blue palette
68
+ * @property cyan - Cyan palette
69
+ * @property purple - Purple palette
70
+ * @property pink - Pink palette
71
+ */
72
+ export declare const ColorTokenType: VariantType<{
73
+ readonly brand: VariantType<{
74
+ readonly "50": NullType;
75
+ readonly "100": NullType;
76
+ readonly "200": NullType;
77
+ readonly "300": NullType;
78
+ readonly "400": NullType;
79
+ readonly "500": NullType;
80
+ readonly "600": NullType;
81
+ readonly "700": NullType;
82
+ readonly "800": NullType;
83
+ readonly "900": NullType;
84
+ }>;
85
+ readonly gray: VariantType<{
86
+ readonly "50": NullType;
87
+ readonly "100": NullType;
88
+ readonly "200": NullType;
89
+ readonly "300": NullType;
90
+ readonly "400": NullType;
91
+ readonly "500": NullType;
92
+ readonly "600": NullType;
93
+ readonly "700": NullType;
94
+ readonly "800": NullType;
95
+ readonly "900": NullType;
96
+ }>;
97
+ readonly red: VariantType<{
98
+ readonly "50": NullType;
99
+ readonly "100": NullType;
100
+ readonly "200": NullType;
101
+ readonly "300": NullType;
102
+ readonly "400": NullType;
103
+ readonly "500": NullType;
104
+ readonly "600": NullType;
105
+ readonly "700": NullType;
106
+ readonly "800": NullType;
107
+ readonly "900": NullType;
108
+ }>;
109
+ readonly orange: VariantType<{
110
+ readonly "50": NullType;
111
+ readonly "100": NullType;
112
+ readonly "200": NullType;
113
+ readonly "300": NullType;
114
+ readonly "400": NullType;
115
+ readonly "500": NullType;
116
+ readonly "600": NullType;
117
+ readonly "700": NullType;
118
+ readonly "800": NullType;
119
+ readonly "900": NullType;
120
+ }>;
121
+ readonly yellow: VariantType<{
122
+ readonly "50": NullType;
123
+ readonly "100": NullType;
124
+ readonly "200": NullType;
125
+ readonly "300": NullType;
126
+ readonly "400": NullType;
127
+ readonly "500": NullType;
128
+ readonly "600": NullType;
129
+ readonly "700": NullType;
130
+ readonly "800": NullType;
131
+ readonly "900": NullType;
132
+ }>;
133
+ readonly green: VariantType<{
134
+ readonly "50": NullType;
135
+ readonly "100": NullType;
136
+ readonly "200": NullType;
137
+ readonly "300": NullType;
138
+ readonly "400": NullType;
139
+ readonly "500": NullType;
140
+ readonly "600": NullType;
141
+ readonly "700": NullType;
142
+ readonly "800": NullType;
143
+ readonly "900": NullType;
144
+ }>;
145
+ readonly teal: VariantType<{
146
+ readonly "50": NullType;
147
+ readonly "100": NullType;
148
+ readonly "200": NullType;
149
+ readonly "300": NullType;
150
+ readonly "400": NullType;
151
+ readonly "500": NullType;
152
+ readonly "600": NullType;
153
+ readonly "700": NullType;
154
+ readonly "800": NullType;
155
+ readonly "900": NullType;
156
+ }>;
157
+ readonly blue: VariantType<{
158
+ readonly "50": NullType;
159
+ readonly "100": NullType;
160
+ readonly "200": NullType;
161
+ readonly "300": NullType;
162
+ readonly "400": NullType;
163
+ readonly "500": NullType;
164
+ readonly "600": NullType;
165
+ readonly "700": NullType;
166
+ readonly "800": NullType;
167
+ readonly "900": NullType;
168
+ }>;
169
+ readonly cyan: VariantType<{
170
+ readonly "50": NullType;
171
+ readonly "100": NullType;
172
+ readonly "200": NullType;
173
+ readonly "300": NullType;
174
+ readonly "400": NullType;
175
+ readonly "500": NullType;
176
+ readonly "600": NullType;
177
+ readonly "700": NullType;
178
+ readonly "800": NullType;
179
+ readonly "900": NullType;
180
+ }>;
181
+ readonly purple: VariantType<{
182
+ readonly "50": NullType;
183
+ readonly "100": NullType;
184
+ readonly "200": NullType;
185
+ readonly "300": NullType;
186
+ readonly "400": NullType;
187
+ readonly "500": NullType;
188
+ readonly "600": NullType;
189
+ readonly "700": NullType;
190
+ readonly "800": NullType;
191
+ readonly "900": NullType;
192
+ }>;
193
+ readonly pink: VariantType<{
194
+ readonly "50": NullType;
195
+ readonly "100": NullType;
196
+ readonly "200": NullType;
197
+ readonly "300": NullType;
198
+ readonly "400": NullType;
199
+ readonly "500": NullType;
200
+ readonly "600": NullType;
201
+ readonly "700": NullType;
202
+ readonly "800": NullType;
203
+ readonly "900": NullType;
204
+ }>;
205
+ }>;
206
+ /**
207
+ * Type representing color token variant values.
208
+ */
209
+ export type ColorTokenType = typeof ColorTokenType;
210
+ /**
211
+ * String literal type for a color token's hue.
212
+ */
213
+ export type ColorHueLiteral = "brand" | "gray" | "red" | "orange" | "yellow" | "green" | "teal" | "blue" | "cyan" | "purple" | "pink";
214
+ /**
215
+ * The hues of a color token, in the theme's order.
216
+ */
217
+ export declare const COLOR_HUES: readonly ColorHueLiteral[];
218
+ /**
219
+ * The shades of a color token, lightest first.
220
+ */
221
+ export declare const COLOR_SHADES: readonly ColorShadeLiteral[];
222
+ /**
223
+ * Creates a color token expression: a theme hue at a shade.
224
+ *
225
+ * @param hue - The theme hue
226
+ * @param shade - The palette step, `"50"` to `"900"`
227
+ * @returns An East expression representing the color token
228
+ *
229
+ * @example
230
+ * ```ts
231
+ * import { Style } from "@elaraai/east-ui";
232
+ *
233
+ * Style.ColorToken("teal", "500"); // variant("teal", variant("500", null))
234
+ * ```
235
+ */
236
+ export declare function ColorToken(hue: ColorHueLiteral, shade: ColorShadeLiteral): ExprType<ColorTokenType>;
237
+ //# sourceMappingURL=color.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"color.d.ts","sourceRoot":"","sources":["../../../src/style/color.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,QAAQ,EAAW,WAAW,EAAE,KAAK,QAAQ,EAAE,MAAM,eAAe,CAAC;AAMpF;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;EAWzB,CAAC;AAEH;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,OAAO,cAAc,CAAC;AAEnD;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,IAAI,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC;AAE7G;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAYzB,CAAC;AAEH;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,OAAO,cAAc,CAAC;AAEnD;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,MAAM,GAAG,KAAK,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,CAAC;AAEtI;;GAEG;AACH,eAAO,MAAM,UAAU,EAAE,SAAS,eAAe,EAAoG,CAAC;AAEtJ;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,SAAS,iBAAiB,EAA0E,CAAC;AAEhI;;;;;;;;;;;;;GAaG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,eAAe,EAAE,KAAK,EAAE,iBAAiB,GAAG,QAAQ,CAAC,cAAc,CAAC,CAEnG"}
@@ -0,0 +1,105 @@
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, NullType, variant, VariantType } from "@elaraai/east";
6
+ // ============================================================================
7
+ // Color Token — a theme hue, and its shade (#1406)
8
+ // ============================================================================
9
+ /**
10
+ * Color shade variant type — the steps of a theme palette, `50` to `900`.
11
+ *
12
+ * @remarks
13
+ * One case per step of the design system's scales (`brand`, `gray`) and of
14
+ * the stock Chakra palettes the theme carries for the other hues. A shade is
15
+ * never used alone: it is the payload of a {@link ColorTokenType} hue case.
16
+ *
17
+ * @property 50 - The lightest step
18
+ * @property 100 - A tint
19
+ * @property 200 - A tint
20
+ * @property 300 - A tint
21
+ * @property 400 - The last step whose ink is the foreground
22
+ * @property 500 - The hue's solid
23
+ * @property 600 - A shade
24
+ * @property 700 - A shade
25
+ * @property 800 - A shade
26
+ * @property 900 - The darkest step
27
+ */
28
+ export const ColorShadeType = VariantType({
29
+ "50": NullType,
30
+ "100": NullType,
31
+ "200": NullType,
32
+ "300": NullType,
33
+ "400": NullType,
34
+ "500": NullType,
35
+ "600": NullType,
36
+ "700": NullType,
37
+ "800": NullType,
38
+ "900": NullType,
39
+ });
40
+ /**
41
+ * Color token variant type — a theme hue holding its shade: the one typed
42
+ * colour every component that takes a colour for a data fill takes.
43
+ *
44
+ * @remarks
45
+ * Create instances using the {@link ColorToken} function. The hues are
46
+ * {@link ColorSchemeType}'s hue cases — the theme's palettes: `brand` and
47
+ * `gray` the design system's scales, the rest Chakra's stock — and the shade
48
+ * is a {@link ColorShadeType}, so `variant("red", variant("100", null))` is
49
+ * `Style.ColorToken("red", "100")`. A renderer resolves a token as
50
+ * `{colors.<hue>.<shade>}`, the same in both colour modes, and draws the
51
+ * words on it in the ink the shade takes (the foreground up to `400`, the
52
+ * paper's from `500`). It is a colour the APP gives — a shift's, a series' —
53
+ * never a state: a state's colour is a {@link StatusTokenType}.
54
+ *
55
+ * @property brand - The design system's primary scale
56
+ * @property gray - The design system's gray scale
57
+ * @property red - Red palette
58
+ * @property orange - Orange palette
59
+ * @property yellow - Yellow palette
60
+ * @property green - Green palette
61
+ * @property teal - Teal palette
62
+ * @property blue - Blue palette
63
+ * @property cyan - Cyan palette
64
+ * @property purple - Purple palette
65
+ * @property pink - Pink palette
66
+ */
67
+ export const ColorTokenType = VariantType({
68
+ brand: ColorShadeType,
69
+ gray: ColorShadeType,
70
+ red: ColorShadeType,
71
+ orange: ColorShadeType,
72
+ yellow: ColorShadeType,
73
+ green: ColorShadeType,
74
+ teal: ColorShadeType,
75
+ blue: ColorShadeType,
76
+ cyan: ColorShadeType,
77
+ purple: ColorShadeType,
78
+ pink: ColorShadeType,
79
+ });
80
+ /**
81
+ * The hues of a color token, in the theme's order.
82
+ */
83
+ export const COLOR_HUES = ["brand", "gray", "red", "orange", "yellow", "green", "teal", "blue", "cyan", "purple", "pink"];
84
+ /**
85
+ * The shades of a color token, lightest first.
86
+ */
87
+ export const COLOR_SHADES = ["50", "100", "200", "300", "400", "500", "600", "700", "800", "900"];
88
+ /**
89
+ * Creates a color token expression: a theme hue at a shade.
90
+ *
91
+ * @param hue - The theme hue
92
+ * @param shade - The palette step, `"50"` to `"900"`
93
+ * @returns An East expression representing the color token
94
+ *
95
+ * @example
96
+ * ```ts
97
+ * import { Style } from "@elaraai/east-ui";
98
+ *
99
+ * Style.ColorToken("teal", "500"); // variant("teal", variant("500", null))
100
+ * ```
101
+ */
102
+ export function ColorToken(hue, shade) {
103
+ return East.value(variant(hue, variant(shade, null)), ColorTokenType);
104
+ }
105
+ //# sourceMappingURL=color.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"color.js","sourceRoot":"","sources":["../../../src/style/color.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,WAAW,EAAiB,MAAM,eAAe,CAAC;AAEpF,+EAA+E;AAC/E,mDAAmD;AACnD,+EAA+E;AAE/E;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,WAAW,CAAC;IACtC,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,QAAQ;IACf,KAAK,EAAE,QAAQ;IACf,KAAK,EAAE,QAAQ;IACf,KAAK,EAAE,QAAQ;IACf,KAAK,EAAE,QAAQ;IACf,KAAK,EAAE,QAAQ;IACf,KAAK,EAAE,QAAQ;IACf,KAAK,EAAE,QAAQ;IACf,KAAK,EAAE,QAAQ;CAClB,CAAC,CAAC;AAYH;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,WAAW,CAAC;IACtC,KAAK,EAAE,cAAc;IACrB,IAAI,EAAE,cAAc;IACpB,GAAG,EAAE,cAAc;IACnB,MAAM,EAAE,cAAc;IACtB,MAAM,EAAE,cAAc;IACtB,KAAK,EAAE,cAAc;IACrB,IAAI,EAAE,cAAc;IACpB,IAAI,EAAE,cAAc;IACpB,IAAI,EAAE,cAAc;IACpB,MAAM,EAAE,cAAc;IACtB,IAAI,EAAE,cAAc;CACvB,CAAC,CAAC;AAYH;;GAEG;AACH,MAAM,CAAC,MAAM,UAAU,GAA+B,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;AAEtJ;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAiC,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;AAEhI;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,UAAU,CAAC,GAAoB,EAAE,KAAwB;IACrE,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,EAAE,cAAc,CAAC,CAAC;AAC1E,CAAC"}