@svadmin/surface 0.8.6 → 0.9.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.
Files changed (192) hide show
  1. package/README.md +70 -38
  2. package/STYLING.md +31 -0
  3. package/compatibility.json +23 -2
  4. package/dist/agent-contract.d.ts +37 -0
  5. package/dist/agent-contract.js +203 -0
  6. package/dist/agent.d.ts +38 -7
  7. package/dist/agent.js +98 -59
  8. package/dist/binding.d.ts +2 -0
  9. package/dist/binding.js +7 -1
  10. package/dist/builtin-definitions.d.ts +6 -0
  11. package/dist/builtin-definitions.js +40 -0
  12. package/dist/builtin-schemas.d.ts +25 -0
  13. package/dist/builtin-schemas.js +13 -0
  14. package/dist/catalog.d.ts +4 -61
  15. package/dist/catalog.js +20 -44
  16. package/dist/components/MetricWidget.svelte +12 -8
  17. package/dist/components/ResourceFormBody.svelte +97 -0
  18. package/dist/components/ResourceFormBody.svelte.d.ts +13 -0
  19. package/dist/components/ResourceFormWidget.svelte +19 -0
  20. package/dist/components/ResourceFormWidget.svelte.d.ts +4 -0
  21. package/dist/components/ResourceTableWidget.svelte +14 -12
  22. package/dist/components/SurfaceEditPreview.svelte +107 -0
  23. package/dist/components/SurfaceEditPreview.svelte.d.ts +20 -0
  24. package/dist/components/SurfaceRenderer.svelte +120 -163
  25. package/dist/components/SurfaceRenderer.svelte.d.ts +4 -0
  26. package/dist/components/SurfaceWorkflowProvider.svelte +22 -0
  27. package/dist/components/SurfaceWorkflowProvider.svelte.d.ts +17 -0
  28. package/dist/components/SvarGridWidget.svelte +47 -0
  29. package/dist/components/SvarGridWidget.svelte.d.ts +4 -0
  30. package/dist/components/SvarSurfaceProvider.svelte +12 -0
  31. package/dist/components/SvarSurfaceProvider.svelte.d.ts +11 -0
  32. package/dist/edits.d.ts +57 -0
  33. package/dist/edits.js +166 -0
  34. package/dist/index.d.ts +8 -2
  35. package/dist/index.js +5 -1
  36. package/dist/interactive.d.ts +6 -0
  37. package/dist/interactive.js +15 -0
  38. package/dist/json.js +1 -2
  39. package/dist/openui.d.ts +64 -0
  40. package/dist/openui.js +168 -0
  41. package/dist/schema.d.ts +108 -0
  42. package/dist/schema.js +73 -0
  43. package/dist/server-sqlite.d.ts +1 -0
  44. package/dist/server-sqlite.js +2 -0
  45. package/dist/server.d.ts +4 -0
  46. package/dist/server.js +4 -0
  47. package/dist/source-cache.d.ts +30 -0
  48. package/dist/source-cache.js +135 -0
  49. package/dist/styled-system/css/conditions.js +36 -0
  50. package/dist/styled-system/css/css.d.ts +22 -0
  51. package/dist/styled-system/css/css.js +45 -0
  52. package/dist/styled-system/css/cva.d.ts +6 -0
  53. package/dist/styled-system/css/cva.js +87 -0
  54. package/dist/styled-system/css/cx.d.ts +5 -0
  55. package/dist/styled-system/css/cx.js +15 -0
  56. package/dist/styled-system/css/index.d.ts +5 -0
  57. package/dist/styled-system/css/index.js +4 -0
  58. package/dist/styled-system/css/sva.d.ts +4 -0
  59. package/dist/styled-system/css/sva.js +46 -0
  60. package/dist/styled-system/design-contract.d.ts +13 -0
  61. package/dist/styled-system/design-contract.js +11 -0
  62. package/dist/styled-system/helpers.js +316 -0
  63. package/dist/styled-system/patterns/aspect-ratio.d.ts +20 -0
  64. package/dist/styled-system/patterns/aspect-ratio.js +38 -0
  65. package/dist/styled-system/patterns/bleed.d.ts +21 -0
  66. package/dist/styled-system/patterns/bleed.js +24 -0
  67. package/dist/styled-system/patterns/box.d.ts +20 -0
  68. package/dist/styled-system/patterns/box.js +15 -0
  69. package/dist/styled-system/patterns/center.d.ts +20 -0
  70. package/dist/styled-system/patterns/center.js +21 -0
  71. package/dist/styled-system/patterns/circle.d.ts +20 -0
  72. package/dist/styled-system/patterns/circle.js +25 -0
  73. package/dist/styled-system/patterns/container.d.ts +20 -0
  74. package/dist/styled-system/patterns/container.js +21 -0
  75. package/dist/styled-system/patterns/cq.d.ts +21 -0
  76. package/dist/styled-system/patterns/cq.js +21 -0
  77. package/dist/styled-system/patterns/divider.d.ts +22 -0
  78. package/dist/styled-system/patterns/divider.js +25 -0
  79. package/dist/styled-system/patterns/flex.d.ts +26 -0
  80. package/dist/styled-system/patterns/flex.js +26 -0
  81. package/dist/styled-system/patterns/float.d.ts +23 -0
  82. package/dist/styled-system/patterns/float.js +52 -0
  83. package/dist/styled-system/patterns/grid-item.d.ts +25 -0
  84. package/dist/styled-system/patterns/grid-item.js +25 -0
  85. package/dist/styled-system/patterns/grid.d.ts +24 -0
  86. package/dist/styled-system/patterns/grid.js +27 -0
  87. package/dist/styled-system/patterns/hstack.d.ts +21 -0
  88. package/dist/styled-system/patterns/hstack.js +24 -0
  89. package/dist/styled-system/patterns/index.d.ts +21 -0
  90. package/dist/styled-system/patterns/index.js +20 -0
  91. package/dist/styled-system/patterns/link-overlay.d.ts +20 -0
  92. package/dist/styled-system/patterns/link-overlay.js +24 -0
  93. package/dist/styled-system/patterns/spacer.d.ts +20 -0
  94. package/dist/styled-system/patterns/spacer.js +25 -0
  95. package/dist/styled-system/patterns/square.d.ts +20 -0
  96. package/dist/styled-system/patterns/square.js +24 -0
  97. package/dist/styled-system/patterns/stack.d.ts +23 -0
  98. package/dist/styled-system/patterns/stack.js +24 -0
  99. package/dist/styled-system/patterns/visually-hidden.d.ts +20 -0
  100. package/dist/styled-system/patterns/visually-hidden.js +18 -0
  101. package/dist/styled-system/patterns/vstack.d.ts +21 -0
  102. package/dist/styled-system/patterns/vstack.js +24 -0
  103. package/dist/styled-system/patterns/wrap.d.ts +24 -0
  104. package/dist/styled-system/patterns/wrap.js +25 -0
  105. package/dist/styled-system/recipes/content-header.d.ts +31 -0
  106. package/dist/styled-system/recipes/content-header.js +65 -0
  107. package/dist/styled-system/recipes/content-page.d.ts +34 -0
  108. package/dist/styled-system/recipes/content-page.js +43 -0
  109. package/dist/styled-system/recipes/create-recipe.js +82 -0
  110. package/dist/styled-system/recipes/index.d.ts +17 -0
  111. package/dist/styled-system/recipes/index.js +16 -0
  112. package/dist/styled-system/recipes/metric-block.d.ts +34 -0
  113. package/dist/styled-system/recipes/metric-block.js +76 -0
  114. package/dist/styled-system/recipes/product-list.d.ts +31 -0
  115. package/dist/styled-system/recipes/product-list.js +73 -0
  116. package/dist/styled-system/recipes/product-section.d.ts +31 -0
  117. package/dist/styled-system/recipes/product-section.js +49 -0
  118. package/dist/styled-system/recipes/product-settings-row.d.ts +34 -0
  119. package/dist/styled-system/recipes/product-settings-row.js +58 -0
  120. package/dist/styled-system/recipes/product-settings.d.ts +31 -0
  121. package/dist/styled-system/recipes/product-settings.js +57 -0
  122. package/dist/styled-system/recipes/product-status.d.ts +34 -0
  123. package/dist/styled-system/recipes/product-status.js +45 -0
  124. package/dist/styled-system/recipes/product-toolbar.d.ts +31 -0
  125. package/dist/styled-system/recipes/product-toolbar.js +41 -0
  126. package/dist/styled-system/recipes/product-workspace.d.ts +34 -0
  127. package/dist/styled-system/recipes/product-workspace.js +58 -0
  128. package/dist/styled-system/recipes/surface-metric.d.ts +38 -0
  129. package/dist/styled-system/recipes/surface-metric.js +63 -0
  130. package/dist/styled-system/recipes/surface-table.d.ts +34 -0
  131. package/dist/styled-system/recipes/surface-table.js +62 -0
  132. package/dist/styled-system/recipes/ui-badge.d.ts +31 -0
  133. package/dist/styled-system/recipes/ui-badge.js +38 -0
  134. package/dist/styled-system/recipes/ui-button.d.ts +32 -0
  135. package/dist/styled-system/recipes/ui-button.js +43 -0
  136. package/dist/styled-system/recipes/ui-input.d.ts +31 -0
  137. package/dist/styled-system/recipes/ui-input.js +49 -0
  138. package/dist/styled-system/recipes/ui-textarea.d.ts +31 -0
  139. package/dist/styled-system/recipes/ui-textarea.js +24 -0
  140. package/dist/styled-system/styles.css +1257 -0
  141. package/dist/styled-system/tokens/index.d.ts +9 -0
  142. package/dist/styled-system/tokens/index.js +268 -0
  143. package/dist/styled-system/tokens/tokens.d.ts +36 -0
  144. package/dist/styled-system/types/composition.d.ts +227 -0
  145. package/dist/styled-system/types/conditions.d.ts +236 -0
  146. package/dist/styled-system/types/csstype.d.ts +22570 -0
  147. package/dist/styled-system/types/index.d.ts +6 -0
  148. package/dist/styled-system/types/parts.d.ts +8 -0
  149. package/dist/styled-system/types/pattern.d.ts +78 -0
  150. package/dist/styled-system/types/prop-type.d.ts +223 -0
  151. package/dist/styled-system/types/recipe.d.ts +181 -0
  152. package/dist/styled-system/types/selectors.d.ts +59 -0
  153. package/dist/styled-system/types/static-css.d.ts +56 -0
  154. package/dist/styled-system/types/style-props.d.ts +8088 -0
  155. package/dist/styled-system/types/system-types.d.ts +151 -0
  156. package/dist/styles/editor.css +124 -0
  157. package/dist/styles/editor.generated.d.ts +8 -0
  158. package/dist/styles/editor.generated.js +9 -0
  159. package/dist/styles.css +1262 -0
  160. package/dist/svar-catalog.d.ts +3 -0
  161. package/dist/svar-catalog.js +7 -0
  162. package/dist/svar-context.d.ts +9 -0
  163. package/dist/svar-context.js +1 -0
  164. package/dist/svar-schema.d.ts +21 -0
  165. package/dist/svar-schema.js +36 -0
  166. package/dist/svar.d.ts +4 -0
  167. package/dist/svar.js +3 -0
  168. package/dist/svelte.d.ts +4 -2
  169. package/dist/svelte.js +2 -1
  170. package/dist/types.d.ts +5 -1
  171. package/dist/validation.js +2 -102
  172. package/dist/wire.d.ts +13 -0
  173. package/dist/wire.js +30 -0
  174. package/dist/workflows/action-contracts.d.ts +7 -0
  175. package/dist/workflows/action-contracts.js +54 -0
  176. package/dist/workflows/catalog.d.ts +20 -0
  177. package/dist/workflows/catalog.js +50 -0
  178. package/dist/workflows/client.d.ts +45 -0
  179. package/dist/workflows/client.js +125 -0
  180. package/dist/workflows/context.d.ts +9 -0
  181. package/dist/workflows/context.js +5 -0
  182. package/dist/workflows/openui-guard.d.ts +19 -0
  183. package/dist/workflows/openui-guard.js +209 -0
  184. package/dist/workflows/service.d.ts +58 -0
  185. package/dist/workflows/service.js +296 -0
  186. package/dist/workflows/sqlite-store.d.ts +20 -0
  187. package/dist/workflows/sqlite-store.js +91 -0
  188. package/dist/workflows/types.d.ts +103 -0
  189. package/dist/workflows/types.js +8 -0
  190. package/dist/workflows.d.ts +5 -0
  191. package/dist/workflows.js +4 -0
  192. package/package.json +53 -9
@@ -0,0 +1,9 @@
1
+ /* eslint-disable */
2
+ import type { Token } from './tokens';
3
+
4
+ export declare const token: {
5
+ (path: Token, fallback?: string): string
6
+ var: (path: Token, fallback?: string) => string
7
+ }
8
+
9
+ export * from './tokens';
@@ -0,0 +1,268 @@
1
+ const tokens = {
2
+ "spacing.xs": {
3
+ "value": "0.25rem",
4
+ "variable": "var(--svadmin-spacing-xs)"
5
+ },
6
+ "spacing.sm": {
7
+ "value": "0.75rem",
8
+ "variable": "var(--svadmin-spacing-sm)"
9
+ },
10
+ "spacing.md": {
11
+ "value": "1rem",
12
+ "variable": "var(--svadmin-spacing-md)"
13
+ },
14
+ "spacing.lg": {
15
+ "value": "1.25rem",
16
+ "variable": "var(--svadmin-spacing-lg)"
17
+ },
18
+ "spacing.content.stack": {
19
+ "value": "var(--spacing)",
20
+ "variable": "var(--svadmin-spacing-content-stack)"
21
+ },
22
+ "spacing.content.inline": {
23
+ "value": "calc(var(--spacing) * 2)",
24
+ "variable": "var(--svadmin-spacing-content-inline)"
25
+ },
26
+ "spacing.content.section": {
27
+ "value": "calc(var(--spacing) * 3)",
28
+ "variable": "var(--svadmin-spacing-content-section)"
29
+ },
30
+ "spacing.content.panel": {
31
+ "value": "calc(var(--spacing) * 4)",
32
+ "variable": "var(--svadmin-spacing-content-panel)"
33
+ },
34
+ "spacing.content.page": {
35
+ "value": "calc(var(--spacing) * 6)",
36
+ "variable": "var(--svadmin-spacing-content-page)"
37
+ },
38
+ "sizes.content.narrow": {
39
+ "value": "var(--container-3xl)",
40
+ "variable": "var(--svadmin-sizes-content-narrow)"
41
+ },
42
+ "sizes.content.default": {
43
+ "value": "74rem",
44
+ "variable": "var(--svadmin-sizes-content-default)"
45
+ },
46
+ "sizes.content.wide": {
47
+ "value": "92rem",
48
+ "variable": "var(--svadmin-sizes-content-wide)"
49
+ },
50
+ "sizes.content.description": {
51
+ "value": "var(--container-2xl)",
52
+ "variable": "var(--svadmin-sizes-content-description)"
53
+ },
54
+ "sizes.content.skeletonHeight": {
55
+ "value": "calc(var(--spacing) * 8)",
56
+ "variable": "var(--svadmin-sizes-content-skeleton-height)"
57
+ },
58
+ "sizes.content.skeletonWidth": {
59
+ "value": "calc(var(--spacing) * 24)",
60
+ "variable": "var(--svadmin-sizes-content-skeleton-width)"
61
+ },
62
+ "fontSizes.compact": {
63
+ "value": "0.75rem",
64
+ "variable": "var(--svadmin-font-sizes-compact)"
65
+ },
66
+ "fontSizes.body": {
67
+ "value": "0.875rem",
68
+ "variable": "var(--svadmin-font-sizes-body)"
69
+ },
70
+ "fontSizes.content.caption": {
71
+ "value": "var(--text-xs)",
72
+ "variable": "var(--svadmin-font-sizes-content-caption)"
73
+ },
74
+ "fontSizes.content.body": {
75
+ "value": "var(--text-sm)",
76
+ "variable": "var(--svadmin-font-sizes-content-body)"
77
+ },
78
+ "fontSizes.content.title": {
79
+ "value": "var(--text-xl)",
80
+ "variable": "var(--svadmin-font-sizes-content-title)"
81
+ },
82
+ "fontSizes.content.metric": {
83
+ "value": "var(--text-2xl)",
84
+ "variable": "var(--svadmin-font-sizes-content-metric)"
85
+ },
86
+ "lineHeights.content.caption": {
87
+ "value": "var(--text-xs--line-height)",
88
+ "variable": "var(--svadmin-line-heights-content-caption)"
89
+ },
90
+ "lineHeights.content.body": {
91
+ "value": "var(--text-sm--line-height)",
92
+ "variable": "var(--svadmin-line-heights-content-body)"
93
+ },
94
+ "lineHeights.content.title": {
95
+ "value": "var(--leading-tight)",
96
+ "variable": "var(--svadmin-line-heights-content-title)"
97
+ },
98
+ "lineHeights.content.description": {
99
+ "value": "calc(var(--spacing) * 6)",
100
+ "variable": "var(--svadmin-line-heights-content-description)"
101
+ },
102
+ "lineHeights.content.metric": {
103
+ "value": "var(--text-2xl--line-height)",
104
+ "variable": "var(--svadmin-line-heights-content-metric)"
105
+ },
106
+ "fontWeights.content.medium": {
107
+ "value": "var(--font-weight-medium)",
108
+ "variable": "var(--svadmin-font-weights-content-medium)"
109
+ },
110
+ "fontWeights.content.strong": {
111
+ "value": "var(--font-weight-semibold)",
112
+ "variable": "var(--svadmin-font-weights-content-strong)"
113
+ },
114
+ "letterSpacings.content.normal": {
115
+ "value": "var(--tracking-normal)",
116
+ "variable": "var(--svadmin-letter-spacings-content-normal)"
117
+ },
118
+ "shadows.content.card": {
119
+ "value": "0 0 0 0 transparent, 0 0 0 0 transparent, 0 0 0 0 transparent, 0 0 0 0 transparent, 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",
120
+ "variable": "var(--svadmin-shadows-content-card)"
121
+ },
122
+ "colors.surface": {
123
+ "value": "var(--card)",
124
+ "variable": "var(--svadmin-colors-surface)"
125
+ },
126
+ "colors.foreground": {
127
+ "value": "var(--foreground)",
128
+ "variable": "var(--svadmin-colors-foreground)"
129
+ },
130
+ "colors.muted": {
131
+ "value": "var(--muted-foreground)",
132
+ "variable": "var(--svadmin-colors-muted)"
133
+ },
134
+ "colors.border": {
135
+ "value": "var(--border)",
136
+ "variable": "var(--svadmin-colors-border)"
137
+ },
138
+ "colors.success": {
139
+ "value": "var(--success)",
140
+ "variable": "var(--svadmin-colors-success)"
141
+ },
142
+ "colors.warning": {
143
+ "value": "var(--warning)",
144
+ "variable": "var(--svadmin-colors-warning)"
145
+ },
146
+ "colors.danger": {
147
+ "value": "var(--destructive)",
148
+ "variable": "var(--svadmin-colors-danger)"
149
+ },
150
+ "colors.info": {
151
+ "value": "var(--info)",
152
+ "variable": "var(--svadmin-colors-info)"
153
+ },
154
+ "colors.content.foreground": {
155
+ "value": "var(--color-foreground)",
156
+ "variable": "var(--svadmin-colors-content-foreground)"
157
+ },
158
+ "colors.content.muted": {
159
+ "value": "var(--color-muted-foreground)",
160
+ "variable": "var(--svadmin-colors-content-muted)"
161
+ },
162
+ "colors.content.card": {
163
+ "value": "var(--color-card)",
164
+ "variable": "var(--svadmin-colors-content-card)"
165
+ },
166
+ "colors.content.border": {
167
+ "value": "var(--color-border)",
168
+ "variable": "var(--svadmin-colors-content-border)"
169
+ },
170
+ "colors.content.positive": {
171
+ "value": "var(--color-success)",
172
+ "variable": "var(--svadmin-colors-content-positive)"
173
+ },
174
+ "colors.content.negative": {
175
+ "value": "var(--color-destructive)",
176
+ "variable": "var(--svadmin-colors-content-negative)"
177
+ },
178
+ "colors.content.warning": {
179
+ "value": "var(--color-warning-foreground)",
180
+ "variable": "var(--svadmin-colors-content-warning)"
181
+ },
182
+ "radii.surface": {
183
+ "value": "var(--radius-lg)",
184
+ "variable": "var(--svadmin-radii-surface)"
185
+ },
186
+ "radii.content.card": {
187
+ "value": "var(--radius-lg)",
188
+ "variable": "var(--svadmin-radii-content-card)"
189
+ },
190
+ "spacing.-xs": {
191
+ "value": "calc(var(--svadmin-spacing-xs) * -1)",
192
+ "variable": "var(--svadmin-spacing-xs)"
193
+ },
194
+ "spacing.-sm": {
195
+ "value": "calc(var(--svadmin-spacing-sm) * -1)",
196
+ "variable": "var(--svadmin-spacing-sm)"
197
+ },
198
+ "spacing.-md": {
199
+ "value": "calc(var(--svadmin-spacing-md) * -1)",
200
+ "variable": "var(--svadmin-spacing-md)"
201
+ },
202
+ "spacing.-lg": {
203
+ "value": "calc(var(--svadmin-spacing-lg) * -1)",
204
+ "variable": "var(--svadmin-spacing-lg)"
205
+ },
206
+ "spacing.content.-stack": {
207
+ "value": "calc(var(--svadmin-spacing-content-stack) * -1)",
208
+ "variable": "var(--svadmin-spacing-content-stack)"
209
+ },
210
+ "spacing.content.-inline": {
211
+ "value": "calc(var(--svadmin-spacing-content-inline) * -1)",
212
+ "variable": "var(--svadmin-spacing-content-inline)"
213
+ },
214
+ "spacing.content.-section": {
215
+ "value": "calc(var(--svadmin-spacing-content-section) * -1)",
216
+ "variable": "var(--svadmin-spacing-content-section)"
217
+ },
218
+ "spacing.content.-panel": {
219
+ "value": "calc(var(--svadmin-spacing-content-panel) * -1)",
220
+ "variable": "var(--svadmin-spacing-content-panel)"
221
+ },
222
+ "spacing.content.-page": {
223
+ "value": "calc(var(--svadmin-spacing-content-page) * -1)",
224
+ "variable": "var(--svadmin-spacing-content-page)"
225
+ },
226
+ "colors.colorPalette": {
227
+ "value": "var(--svadmin-colors-color-palette)",
228
+ "variable": "var(--svadmin-colors-color-palette)"
229
+ },
230
+ "colors.colorPalette.foreground": {
231
+ "value": "var(--svadmin-colors-color-palette-foreground)",
232
+ "variable": "var(--svadmin-colors-color-palette-foreground)"
233
+ },
234
+ "colors.colorPalette.muted": {
235
+ "value": "var(--svadmin-colors-color-palette-muted)",
236
+ "variable": "var(--svadmin-colors-color-palette-muted)"
237
+ },
238
+ "colors.colorPalette.card": {
239
+ "value": "var(--svadmin-colors-color-palette-card)",
240
+ "variable": "var(--svadmin-colors-color-palette-card)"
241
+ },
242
+ "colors.colorPalette.border": {
243
+ "value": "var(--svadmin-colors-color-palette-border)",
244
+ "variable": "var(--svadmin-colors-color-palette-border)"
245
+ },
246
+ "colors.colorPalette.positive": {
247
+ "value": "var(--svadmin-colors-color-palette-positive)",
248
+ "variable": "var(--svadmin-colors-color-palette-positive)"
249
+ },
250
+ "colors.colorPalette.negative": {
251
+ "value": "var(--svadmin-colors-color-palette-negative)",
252
+ "variable": "var(--svadmin-colors-color-palette-negative)"
253
+ },
254
+ "colors.colorPalette.warning": {
255
+ "value": "var(--svadmin-colors-color-palette-warning)",
256
+ "variable": "var(--svadmin-colors-color-palette-warning)"
257
+ }
258
+ }
259
+
260
+ export function token(path, fallback) {
261
+ return tokens[path]?.value || fallback
262
+ }
263
+
264
+ function tokenVar(path, fallback) {
265
+ return tokens[path]?.variable || fallback
266
+ }
267
+
268
+ token.var = tokenVar
@@ -0,0 +1,36 @@
1
+ /* eslint-disable */
2
+ export type Token = `spacing.${SpacingToken}` | `sizes.${SizeToken}` | `fontSizes.${FontSizeToken}` | `lineHeights.${LineHeightToken}` | `fontWeights.${FontWeightToken}` | `letterSpacings.${LetterSpacingToken}` | `shadows.${ShadowToken}` | `colors.${ColorToken}` | `radii.${RadiusToken}`
3
+
4
+ export type ColorPalette = "surface" | "foreground" | "muted" | "border" | "success" | "warning" | "danger" | "info" | "content"
5
+
6
+ export type SpacingToken = "xs" | "sm" | "md" | "lg" | "content.stack" | "content.inline" | "content.section" | "content.panel" | "content.page" | "-xs" | "-sm" | "-md" | "-lg" | "-content.stack" | "-content.inline" | "-content.section" | "-content.panel" | "-content.page"
7
+
8
+ export type SizeToken = "content.narrow" | "content.default" | "content.wide" | "content.description" | "content.skeletonHeight" | "content.skeletonWidth"
9
+
10
+ export type FontSizeToken = "compact" | "body" | "content.caption" | "content.body" | "content.title" | "content.metric"
11
+
12
+ export type LineHeightToken = "content.caption" | "content.body" | "content.title" | "content.description" | "content.metric"
13
+
14
+ export type FontWeightToken = "content.medium" | "content.strong"
15
+
16
+ export type LetterSpacingToken = "content.normal"
17
+
18
+ export type ShadowToken = "content.card"
19
+
20
+ export type ColorToken = "surface" | "foreground" | "muted" | "border" | "success" | "warning" | "danger" | "info" | "content.foreground" | "content.muted" | "content.card" | "content.border" | "content.positive" | "content.negative" | "content.warning" | "colorPalette" | "colorPalette.foreground" | "colorPalette.muted" | "colorPalette.card" | "colorPalette.border" | "colorPalette.positive" | "colorPalette.negative" | "colorPalette.warning"
21
+
22
+ export type RadiusToken = "surface" | "content.card"
23
+
24
+ export type Tokens = {
25
+ spacing: SpacingToken
26
+ sizes: SizeToken
27
+ fontSizes: FontSizeToken
28
+ lineHeights: LineHeightToken
29
+ fontWeights: FontWeightToken
30
+ letterSpacings: LetterSpacingToken
31
+ shadows: ShadowToken
32
+ colors: ColorToken
33
+ radii: RadiusToken
34
+ } & { [token: string]: never }
35
+
36
+ export type TokenCategory = "aspectRatios" | "zIndex" | "opacity" | "colors" | "fonts" | "fontSizes" | "fontWeights" | "lineHeights" | "letterSpacings" | "sizes" | "cursor" | "shadows" | "spacing" | "radii" | "borders" | "borderWidths" | "durations" | "easings" | "animations" | "blurs" | "gradients" | "breakpoints" | "assets"
@@ -0,0 +1,227 @@
1
+ /* eslint-disable */
2
+ import type { CompositionStyleObject } from './system-types';
3
+
4
+ interface Token<T> {
5
+ value: T
6
+ description?: string
7
+ }
8
+
9
+ interface Recursive<T> {
10
+ [key: string]: Recursive<T> | T
11
+ }
12
+
13
+ /* -----------------------------------------------------------------------------
14
+ * Text styles
15
+ * -----------------------------------------------------------------------------*/
16
+
17
+ type TextStyleProperty =
18
+ | 'color'
19
+ | 'direction'
20
+ | 'font'
21
+ | 'fontFamily'
22
+ | 'fontFeatureSettings'
23
+ | 'fontKerning'
24
+ | 'fontLanguageOverride'
25
+ | 'fontOpticalSizing'
26
+ | 'fontPalette'
27
+ | 'fontSize'
28
+ | 'fontSizeAdjust'
29
+ | 'fontStretch'
30
+ | 'fontStyle'
31
+ | 'fontSynthesis'
32
+ | 'fontVariant'
33
+ | 'fontVariantAlternates'
34
+ | 'fontVariantCaps'
35
+ | 'fontVariantLigatures'
36
+ | 'fontVariantNumeric'
37
+ | 'fontVariantPosition'
38
+ | 'fontVariationSettings'
39
+ | 'fontWeight'
40
+ | 'hangingPunctuation'
41
+ | 'hyphens'
42
+ | 'hyphenateCharacter'
43
+ | 'hyphenateLimitChars'
44
+ | 'letterSpacing'
45
+ | 'lineBreak'
46
+ | 'lineHeight'
47
+ | 'quotes'
48
+ | 'overflowWrap'
49
+ | 'tabSize'
50
+ | 'textAlign'
51
+ | 'textAlignLast'
52
+ | 'textBox'
53
+ | 'textBoxEdge'
54
+ | 'textBoxTrim'
55
+ | 'textCombineUpright'
56
+ | 'textDecoration'
57
+ | 'textDecorationColor'
58
+ | 'textDecorationLine'
59
+ | 'textDecorationSkip'
60
+ | 'textDecorationSkipBox'
61
+ | 'textDecorationSkipInk'
62
+ | 'textDecorationSkipInset'
63
+ | 'textDecorationStyle'
64
+ | 'textDecorationThickness'
65
+ | 'textEmphasis'
66
+ | 'textEmphasisColor'
67
+ | 'textEmphasisPosition'
68
+ | 'textEmphasisStyle'
69
+ | 'textIndent'
70
+ | 'textJustify'
71
+ | 'textOrientation'
72
+ | 'textOverflow'
73
+ | 'textRendering'
74
+ | 'textShadow'
75
+ | 'textStroke'
76
+ | 'textStrokeColor'
77
+ | 'textStrokeWidth'
78
+ | 'textTransform'
79
+ | 'textUnderlineOffset'
80
+ | 'textUnderlinePosition'
81
+ | 'textWrap'
82
+ | 'textWrapMode'
83
+ | 'textWrapStyle'
84
+ | 'unicodeBidi'
85
+ | 'verticalAlign'
86
+ | 'whiteSpace'
87
+ | 'wordBreak'
88
+ | 'wordSpacing'
89
+ | 'writingMode'
90
+
91
+ export type TextStyle = CompositionStyleObject<TextStyleProperty>
92
+
93
+ export type TextStyles = Recursive<Token<TextStyle>>
94
+
95
+ /* -----------------------------------------------------------------------------
96
+ * Layer styles
97
+ * -----------------------------------------------------------------------------*/
98
+
99
+ type LogicalPlacement = 'Inline' | 'Block' | 'InlineStart' | 'InlineEnd' | 'BlockStart' | 'BlockEnd'
100
+
101
+ type PhysicalPlacement = 'Top' | 'Right' | 'Bottom' | 'Left'
102
+
103
+ type Placement = PhysicalPlacement | LogicalPlacement
104
+
105
+ type Radius =
106
+ | `Top${'Right' | 'Left'}`
107
+ | `Bottom${'Right' | 'Left'}`
108
+ | `Start${'Start' | 'End'}`
109
+ | `End${'Start' | 'End'}`
110
+
111
+ type LayerStyleProperty =
112
+ | 'aspectRatio'
113
+ | 'background'
114
+ | 'backgroundColor'
115
+ | 'backgroundImage'
116
+ | 'border'
117
+ | 'borderColor'
118
+ | 'borderImage'
119
+ | 'borderImageOutset'
120
+ | 'borderImageRepeat'
121
+ | 'borderImageSlice'
122
+ | 'borderImageSource'
123
+ | 'borderImageWidth'
124
+ | 'borderRadius'
125
+ | 'borderStyle'
126
+ | 'borderWidth'
127
+ | `border${Placement}`
128
+ | `border${Placement}Color`
129
+ | `border${Placement}Style`
130
+ | `border${Placement}Width`
131
+ | 'borderRadius'
132
+ | `border${Radius}Radius`
133
+ | 'boxShadow'
134
+ | 'boxShadowColor'
135
+ | 'clipPath'
136
+ | 'color'
137
+ | 'contain'
138
+ | 'content'
139
+ | 'contentVisibility'
140
+ | 'cursor'
141
+ | 'display'
142
+ | 'filter'
143
+ | 'backdropFilter'
144
+ | 'height'
145
+ | 'width'
146
+ | 'minHeight'
147
+ | 'minWidth'
148
+ | 'maxHeight'
149
+ | 'maxWidth'
150
+ | `margin${Placement}`
151
+ | 'inset'
152
+ | `inset${LogicalPlacement}`
153
+ | Lowercase<PhysicalPlacement>
154
+ | 'isolation'
155
+ | 'mask'
156
+ | 'maskClip'
157
+ | 'maskComposite'
158
+ | 'maskImage'
159
+ | 'maskMode'
160
+ | 'maskOrigin'
161
+ | 'maskPosition'
162
+ | 'maskRepeat'
163
+ | 'maskSize'
164
+ | 'mixBlendMode'
165
+ | 'objectFit'
166
+ | 'objectPosition'
167
+ | 'opacity'
168
+ | 'outline'
169
+ | 'outlineColor'
170
+ | 'outlineOffset'
171
+ | 'outlineStyle'
172
+ | 'outlineWidth'
173
+ | 'overflow'
174
+ | 'overflowX'
175
+ | 'overflowY'
176
+ | 'padding'
177
+ | `padding${Placement}`
178
+ | 'pointerEvents'
179
+ | 'position'
180
+ | 'resize'
181
+ | 'transform'
182
+ | 'transition'
183
+ | 'visibility'
184
+ | 'willChange'
185
+ | 'zIndex'
186
+ | 'backgroundBlendMode'
187
+ | 'backgroundAttachment'
188
+ | 'backgroundClip'
189
+ | 'backgroundOrigin'
190
+ | 'backgroundPosition'
191
+ | 'backgroundRepeat'
192
+ | 'backgroundSize'
193
+
194
+ export type LayerStyle = CompositionStyleObject<LayerStyleProperty>
195
+
196
+ export type LayerStyles = Recursive<Token<LayerStyle>>
197
+
198
+ /* -----------------------------------------------------------------------------
199
+ * Motion styles
200
+ * -----------------------------------------------------------------------------*/
201
+
202
+ type AnimationStyleProperty =
203
+ | 'animation'
204
+ | 'animationComposition'
205
+ | 'animationDelay'
206
+ | 'animationDirection'
207
+ | 'animationDuration'
208
+ | 'animationFillMode'
209
+ | 'animationIterationCount'
210
+ | 'animationName'
211
+ | 'animationPlayState'
212
+ | 'animationTimingFunction'
213
+ | 'animationRange'
214
+ | 'animationRangeStart'
215
+ | 'animationRangeEnd'
216
+ | 'animationTimeline'
217
+ | 'transformOrigin'
218
+
219
+ export type AnimationStyle = CompositionStyleObject<AnimationStyleProperty>
220
+
221
+ export type AnimationStyles = Recursive<Token<AnimationStyle>>
222
+
223
+ export interface CompositionStyles {
224
+ textStyles: TextStyles
225
+ layerStyles: LayerStyles
226
+ animationStyles: AnimationStyles
227
+ }