@sragatiping/cuboid 0.1.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 (106) hide show
  1. package/dist/components/CodeSnippet/CodeSnippet.d.ts +50 -0
  2. package/dist/components/CodeSnippet/CodeSnippet.stories.d.ts +17 -0
  3. package/dist/components/CodeSnippet/__fixtures__/device-profile-report.d.ts +422 -0
  4. package/dist/components/CodeSnippet/index.d.ts +2 -0
  5. package/dist/components/CodeSnippet/tokenizer.d.ts +49 -0
  6. package/dist/components/DataGrid/DataGrid.d.ts +11 -0
  7. package/dist/components/DataGrid/index.d.ts +2 -0
  8. package/dist/components/Graph/GraphCanvas.d.ts +15 -0
  9. package/dist/components/Graph/GraphCanvas.stories.d.ts +20 -0
  10. package/dist/components/Graph/GraphCard.d.ts +31 -0
  11. package/dist/components/Graph/GraphEdge.d.ts +27 -0
  12. package/dist/components/Graph/GraphHandle.d.ts +16 -0
  13. package/dist/components/Graph/GraphRow.d.ts +14 -0
  14. package/dist/components/Graph/context.d.ts +36 -0
  15. package/dist/components/Graph/index.d.ts +10 -0
  16. package/dist/components/JsonGraph/DeviceProfileReport.stories.d.ts +11 -0
  17. package/dist/components/JsonGraph/JsonCardTitle.d.ts +12 -0
  18. package/dist/components/JsonGraph/JsonFieldRow.d.ts +15 -0
  19. package/dist/components/JsonGraph/JsonGraph.stories.d.ts +19 -0
  20. package/dist/components/JsonGraph/JsonInputHandle.d.ts +30 -0
  21. package/dist/components/JsonGraph/JsonObjectRow.d.ts +22 -0
  22. package/dist/components/JsonGraph/index.d.ts +8 -0
  23. package/dist/components/JsonGraph/treeLayout.d.ts +114 -0
  24. package/dist/components/JsonViewer/JsonViewer.d.ts +15 -0
  25. package/dist/components/JsonViewer/index.d.ts +2 -0
  26. package/dist/components/core/ActionMenu/ActionMenu.d.ts +28 -0
  27. package/dist/components/core/ActionMenu/ActionMenu.stories.d.ts +10 -0
  28. package/dist/components/core/ActionMenu/ActionMenuItem.d.ts +22 -0
  29. package/dist/components/core/ActionMenu/ActionMenuList.d.ts +32 -0
  30. package/dist/components/core/ActionMenu/actionMenuCssVars.d.ts +2 -0
  31. package/dist/components/core/ActionMenu/actionMenuKeyboard.d.ts +4 -0
  32. package/dist/components/core/ActionMenu/index.d.ts +6 -0
  33. package/dist/components/core/Breadcrumb/BreadcrumbLink.d.ts +12 -0
  34. package/dist/components/core/Breadcrumb/Breadcrumbs.d.ts +13 -0
  35. package/dist/components/core/Breadcrumb/Breadcrumbs.stories.d.ts +6 -0
  36. package/dist/components/core/Breadcrumb/index.d.ts +4 -0
  37. package/dist/components/core/Button/Button.d.ts +22 -0
  38. package/dist/components/core/Button/Button.stories.d.ts +6 -0
  39. package/dist/components/core/Button/index.d.ts +2 -0
  40. package/dist/components/core/Icon/Icon.d.ts +13 -0
  41. package/dist/components/core/Icon/Icon.stories.d.ts +6 -0
  42. package/dist/components/core/Icon/index.d.ts +2 -0
  43. package/dist/components/core/IconButton/IconButton.d.ts +28 -0
  44. package/dist/components/core/IconButton/IconButton.stories.d.ts +6 -0
  45. package/dist/components/core/IconButton/index.d.ts +3 -0
  46. package/dist/components/core/Link/Link.d.ts +18 -0
  47. package/dist/components/core/Link/Link.stories.d.ts +6 -0
  48. package/dist/components/core/Link/index.d.ts +2 -0
  49. package/dist/components/core/Overlay/Overlay.d.ts +21 -0
  50. package/dist/components/core/Overlay/Overlay.stories.d.ts +10 -0
  51. package/dist/components/core/Overlay/index.d.ts +2 -0
  52. package/dist/components/core/Pill/Pill.d.ts +25 -0
  53. package/dist/components/core/Pill/Pill.stories.d.ts +6 -0
  54. package/dist/components/core/Pill/index.d.ts +3 -0
  55. package/dist/components/core/Popover/Popover.d.ts +39 -0
  56. package/dist/components/core/Popover/Popover.stories.d.ts +10 -0
  57. package/dist/components/core/Popover/index.d.ts +2 -0
  58. package/dist/components/core/ResizeHandle/ResizeHandle.d.ts +21 -0
  59. package/dist/components/core/ResizeHandle/index.d.ts +2 -0
  60. package/dist/components/core/Sheet/Sheet.d.ts +55 -0
  61. package/dist/components/core/Sheet/Sheet.stories.d.ts +14 -0
  62. package/dist/components/core/Sheet/index.d.ts +4 -0
  63. package/dist/components/core/Sidebar/Sidebar.d.ts +68 -0
  64. package/dist/components/core/Sidebar/Sidebar.stories.d.ts +11 -0
  65. package/dist/components/core/Sidebar/index.d.ts +2 -0
  66. package/dist/components/core/Sidebar/sidebarCssVars.d.ts +2 -0
  67. package/dist/components/core/SiteHeader/SiteHeader.d.ts +17 -0
  68. package/dist/components/core/SiteHeader/SiteHeader.stories.d.ts +6 -0
  69. package/dist/components/core/SiteHeader/index.d.ts +2 -0
  70. package/dist/components/core/SplitLayout/SplitLayout.d.ts +24 -0
  71. package/dist/components/core/SplitLayout/SplitLayout.stories.d.ts +6 -0
  72. package/dist/components/core/SplitLayout/index.d.ts +2 -0
  73. package/dist/components/core/Stack/Stack.d.ts +43 -0
  74. package/dist/components/core/Stack/Stack.stories.d.ts +15 -0
  75. package/dist/components/core/Stack/index.d.ts +3 -0
  76. package/dist/components/core/Text/Text.d.ts +29 -0
  77. package/dist/components/core/Text/Text.stories.d.ts +8 -0
  78. package/dist/components/core/Text/index.d.ts +2 -0
  79. package/dist/components/core/Tooltip/Tooltip.d.ts +17 -0
  80. package/dist/components/core/Tooltip/Tooltip.stories.d.ts +10 -0
  81. package/dist/components/core/Tooltip/index.d.ts +2 -0
  82. package/dist/components/core/index.d.ts +34 -0
  83. package/dist/icons/Icons.stories.d.ts +6 -0
  84. package/dist/icons/index.d.ts +13 -0
  85. package/dist/icons/manifest.json.d.ts +2489 -0
  86. package/dist/icons/material/config.d.ts +4 -0
  87. package/dist/icons/material/createMaterialIcon.d.ts +7 -0
  88. package/dist/icons/material/index.d.ts +231 -0
  89. package/dist/icons/material/source.d.ts +220 -0
  90. package/dist/index.cjs.js +10 -0
  91. package/dist/index.cjs.js.map +1 -0
  92. package/dist/index.d.ts +47 -0
  93. package/dist/index.es.js +8135 -0
  94. package/dist/index.es.js.map +1 -0
  95. package/dist/style.css +1 -0
  96. package/dist/theme/ThemeContext.d.ts +20 -0
  97. package/dist/theme/defaultTheme.d.ts +2 -0
  98. package/dist/theme/figma/buildFigmaTheme.d.ts +7 -0
  99. package/dist/theme/output/base.json.d.ts +208 -0
  100. package/dist/theme/output/theme.json.d.ts +1898 -0
  101. package/dist/theme/types.d.ts +610 -0
  102. package/dist/theme/utils.d.ts +6 -0
  103. package/dist/utils/flattenJson.d.ts +18 -0
  104. package/dist/utils/parseLengthPx.d.ts +2 -0
  105. package/dist/utils/responsive.d.ts +8 -0
  106. package/package.json +71 -0
@@ -0,0 +1,610 @@
1
+ export type DeepPartial<T> = {
2
+ [P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];
3
+ };
4
+ export interface ColorScale {
5
+ 0: string;
6
+ 1: string;
7
+ 2: string;
8
+ 3: string;
9
+ 4: string;
10
+ 5: string;
11
+ 6: string;
12
+ 7: string;
13
+ 8: string;
14
+ 9: string;
15
+ }
16
+ export interface BaseColors {
17
+ gray: ColorScale;
18
+ blue: ColorScale;
19
+ green: ColorScale;
20
+ red: ColorScale;
21
+ orange: ColorScale;
22
+ purple: ColorScale;
23
+ }
24
+ export interface BackgroundColors {
25
+ default: string;
26
+ muted: string;
27
+ inset: string;
28
+ emphasis: string;
29
+ disabled: string;
30
+ transparent: string;
31
+ inverse: string;
32
+ neutral: {
33
+ muted: string;
34
+ emphasis: string;
35
+ };
36
+ }
37
+ export interface ForegroundColors {
38
+ default: string;
39
+ muted: string;
40
+ onEmphasis: string;
41
+ disabled: string;
42
+ link: string;
43
+ white: string;
44
+ neutral: string;
45
+ }
46
+ export interface BorderColors {
47
+ default: string;
48
+ muted: string;
49
+ emphasis: string;
50
+ disabled: string;
51
+ transparent: string;
52
+ translucent: string;
53
+ neutral: {
54
+ muted: string;
55
+ emphasis: string;
56
+ };
57
+ }
58
+ export interface SyntaxColors {
59
+ comment: string;
60
+ constant: string;
61
+ constantOtherReferenceLink: string;
62
+ entity: string;
63
+ entityTag: string;
64
+ keyword: string;
65
+ key: string;
66
+ string: string;
67
+ stringRegexp: string;
68
+ variable: string;
69
+ brackethighlighterAngle: string;
70
+ brackethighlighterUnmatched: string;
71
+ carriageReturnBg: string;
72
+ carriageReturnText: string;
73
+ invalidIllegalText: string;
74
+ invalidIllegalBg: string;
75
+ markupBold: string;
76
+ markupItalic: string;
77
+ markupHeading: string;
78
+ markupList: string;
79
+ markupInsertedBg: string;
80
+ markupInsertedText: string;
81
+ markupDeletedBg: string;
82
+ markupDeletedText: string;
83
+ markupChangedBg: string;
84
+ markupChangedText: string;
85
+ nullLiteral: string;
86
+ /** Both true and false — purple by default. Not red/green: value has no inherent sentiment. */
87
+ booleanLiteral: string;
88
+ /** { } [ ] brackets and braces */
89
+ bracket: string;
90
+ /** String values that look like a URL */
91
+ stringUrl: string;
92
+ /** String values that look like an email address */
93
+ stringEmail: string;
94
+ /** String values that look like a UUID */
95
+ stringUuid: string;
96
+ /** Background tint applied to a row when the pointer hovers over it */
97
+ rowHoverBg: string;
98
+ }
99
+ /** Resolved palette from tokens/functional/colors/globals.json (color.* paths). */
100
+ export interface GlobalSemanticColorPair {
101
+ default: string;
102
+ muted: string;
103
+ }
104
+ export interface GlobalTextColors {
105
+ contrast: string;
106
+ default: string;
107
+ muted: string;
108
+ subtle: string;
109
+ disabled: string;
110
+ }
111
+ export interface GlobalCanvasColors {
112
+ default: string;
113
+ modal: string;
114
+ inset: string;
115
+ insetStrong: string;
116
+ subtle: string;
117
+ transparent: string;
118
+ overlay: {
119
+ modal: string;
120
+ sheet: string;
121
+ };
122
+ }
123
+ export interface GlobalColors {
124
+ primary: string;
125
+ black: string;
126
+ white: string;
127
+ focus: string;
128
+ success: GlobalSemanticColorPair;
129
+ warning: GlobalSemanticColorPair;
130
+ error: GlobalSemanticColorPair;
131
+ info: GlobalSemanticColorPair;
132
+ fg: Record<string, Record<string, string>>;
133
+ text: GlobalTextColors;
134
+ canvas: GlobalCanvasColors;
135
+ border: {
136
+ gray: Record<string, string>;
137
+ grayAlpha: Record<string, string>;
138
+ };
139
+ bg: {
140
+ gray: {
141
+ light: Record<string, string>;
142
+ dark: Record<string, string>;
143
+ };
144
+ };
145
+ syntax: SyntaxColors;
146
+ }
147
+ /** Maps to Figma component tokens: button / {variant} / bgColor | borderColor | fgColor */
148
+ export interface ButtonVariantStateColors {
149
+ rest: string;
150
+ hover: string;
151
+ pressed: string;
152
+ disabled: string;
153
+ }
154
+ export interface ButtonVariantInteractiveColors {
155
+ bgColor: ButtonVariantStateColors;
156
+ borderColor: ButtonVariantStateColors;
157
+ fgColor: ButtonVariantStateColors;
158
+ }
159
+ export interface ButtonFunctionalColors {
160
+ primary: ButtonVariantInteractiveColors;
161
+ secondary: ButtonVariantInteractiveColors;
162
+ ghost: ButtonVariantInteractiveColors;
163
+ danger: ButtonVariantInteractiveColors;
164
+ /** Pill-style control; maps to Figma `button/rounded/*` */
165
+ rounded: ButtonVariantInteractiveColors;
166
+ }
167
+ /**
168
+ * Per-variant icon button colors for theme/CSS (`unselected` = token `base`).
169
+ * Token path: `color.iconButton.<variant>.<base|selected>.<bgColor|borderColor|fgColor>.<interaction>`.
170
+ */
171
+ export interface IconButtonAppearanceColors {
172
+ unselected: ButtonVariantInteractiveColors;
173
+ selected: ButtonVariantInteractiveColors;
174
+ }
175
+ /** Variant names come from token keys under `color.iconButton` (build does not hardcode them). */
176
+ export type IconButtonFunctionalColors = Record<string, IconButtonAppearanceColors>;
177
+ /** Tooltip surface (Figma `colors/gray/13` fill, inverse text) */
178
+ export interface TooltipSurfaceColors {
179
+ background: string;
180
+ border: string;
181
+ foreground: string;
182
+ }
183
+ /** Text link foreground — rest + hover only (`color.link.<variant>.fgColor`). */
184
+ export interface LinkFgColors {
185
+ rest: string;
186
+ hover: string;
187
+ }
188
+ export interface LinkFunctionalColors {
189
+ inline: LinkFgColors;
190
+ standalone: LinkFgColors;
191
+ }
192
+ export interface BreadcrumbLinkStateColors {
193
+ rest: string;
194
+ hover: string;
195
+ active: string;
196
+ }
197
+ export interface BreadcrumbLinkColors {
198
+ bgColor: BreadcrumbLinkStateColors;
199
+ fgColor: BreadcrumbLinkStateColors;
200
+ }
201
+ export interface BreadcrumbSeparatorColors {
202
+ fgColor: string;
203
+ }
204
+ export interface BreadcrumbFunctionalColors {
205
+ link: BreadcrumbLinkColors;
206
+ separator: BreadcrumbSeparatorColors;
207
+ }
208
+ export interface SiteHeaderFunctionalColors {
209
+ background: string;
210
+ border: string;
211
+ divider: string;
212
+ }
213
+ export interface OverlayFunctionalColors {
214
+ modal: string;
215
+ sheet: string;
216
+ none: string;
217
+ }
218
+ export interface SheetFunctionalColors {
219
+ background: string;
220
+ }
221
+ export interface SidebarFunctionalColors {
222
+ background: string;
223
+ border: string;
224
+ }
225
+ export interface PopoverFunctionalColors {
226
+ background: string;
227
+ }
228
+ export interface ActionMenuItemBgColors {
229
+ rest: string;
230
+ hover: string;
231
+ pressed: string;
232
+ disabled: string;
233
+ selected: {
234
+ rest: string;
235
+ pressed: string;
236
+ };
237
+ }
238
+ export interface ActionMenuItemFgColors {
239
+ rest: string;
240
+ pressed: string;
241
+ disabled: string;
242
+ selected: string;
243
+ subtext: string;
244
+ }
245
+ export interface ActionMenuFunctionalColors {
246
+ item: {
247
+ bgColor: ActionMenuItemBgColors;
248
+ fgColor: ActionMenuItemFgColors;
249
+ };
250
+ section: {
251
+ fgColor: string;
252
+ };
253
+ divider: {
254
+ fgColor: string;
255
+ };
256
+ }
257
+ export interface ActionMenuItemSizeTokens {
258
+ minHeight: string;
259
+ paddingInline: string;
260
+ paddingBlock: string;
261
+ borderRadius: string;
262
+ slotGap: string;
263
+ subtextGap: string;
264
+ iconSize: string;
265
+ subtextIconSize: string;
266
+ }
267
+ export interface ActionMenuListSizeTokens {
268
+ paddingInline: string;
269
+ paddingBlock: string;
270
+ /** Gap between rows within a section (and bare items in the list). */
271
+ itemGap: string;
272
+ /** Extra spacing between section groups — applied in addition to `itemGap`. */
273
+ sectionGap: string;
274
+ }
275
+ export interface ActionMenuSectionSizeTokens {
276
+ paddingInline: string;
277
+ paddingBlock: string;
278
+ }
279
+ export interface ActionMenuHeaderSizeTokens {
280
+ paddingInline: string;
281
+ paddingBlockStart: string;
282
+ paddingBlockEnd: string;
283
+ }
284
+ export interface ActionMenuFooterSizeTokens {
285
+ padding: string;
286
+ }
287
+ export interface ActionMenuSizesTokens {
288
+ item: ActionMenuItemSizeTokens;
289
+ list: ActionMenuListSizeTokens;
290
+ section: ActionMenuSectionSizeTokens;
291
+ header: ActionMenuHeaderSizeTokens;
292
+ footer: ActionMenuFooterSizeTokens;
293
+ }
294
+ export type PillSurface = "filled" | "bordered";
295
+ /** Matches Figma Pill intensity property. */
296
+ export type PillIntensity = "extralight" | "light" | "bold" | "extraBold";
297
+ export interface PillIntensityColors {
298
+ filled: ButtonVariantInteractiveColors;
299
+ bordered: ButtonVariantInteractiveColors;
300
+ }
301
+ /** Keys are shade names (`gray`, `yellow`, …) from token files under `components/pill/`. */
302
+ export type PillFunctionalColors = Record<string, Record<PillIntensity, PillIntensityColors>>;
303
+ export interface PillSizeStopTokens {
304
+ paddingInline: string;
305
+ paddingBlock: string;
306
+ borderRadius: string;
307
+ gap: string;
308
+ }
309
+ export interface PillSizesTokens {
310
+ sm: PillSizeStopTokens;
311
+ md: PillSizeStopTokens;
312
+ }
313
+ export interface FunctionalColors {
314
+ background: BackgroundColors;
315
+ foreground: ForegroundColors;
316
+ border: BorderColors;
317
+ syntax: SyntaxColors;
318
+ /** Component-scoped colors — start with primary; other variants follow the same shape */
319
+ button: ButtonFunctionalColors;
320
+ iconButton: IconButtonFunctionalColors;
321
+ link: LinkFunctionalColors;
322
+ breadcrumb: BreadcrumbFunctionalColors;
323
+ siteHeader: SiteHeaderFunctionalColors;
324
+ overlay: OverlayFunctionalColors;
325
+ sheet: SheetFunctionalColors;
326
+ sidebar: SidebarFunctionalColors;
327
+ popover: PopoverFunctionalColors;
328
+ actionMenu: ActionMenuFunctionalColors;
329
+ pill: PillFunctionalColors;
330
+ tooltip: TooltipSurfaceColors;
331
+ }
332
+ export interface Colors {
333
+ base: BaseColors;
334
+ functional: FunctionalColors;
335
+ global: GlobalColors;
336
+ }
337
+ export interface FontFamilyTokens {
338
+ base: string;
339
+ mono: string;
340
+ }
341
+ export interface FontSizeTokens {
342
+ xs: string;
343
+ sm: string;
344
+ md: string;
345
+ lg: string;
346
+ xl: string;
347
+ xxl: string;
348
+ }
349
+ export interface FontWeightTokens {
350
+ regular: number;
351
+ medium: number;
352
+ semibold: number;
353
+ bold: number;
354
+ }
355
+ export interface LineHeightTokens {
356
+ tight: number;
357
+ normal: number;
358
+ relaxed: number;
359
+ }
360
+ export interface TextStyle {
361
+ fontSize: string;
362
+ fontWeight: number;
363
+ lineHeight: number;
364
+ fontFamily?: string;
365
+ }
366
+ export interface TextTokens {
367
+ display: TextStyle;
368
+ titleLarge: TextStyle;
369
+ titleMedium: TextStyle;
370
+ titleSmall: TextStyle;
371
+ subtitle: TextStyle;
372
+ bodyLarge: TextStyle;
373
+ bodyMedium: TextStyle;
374
+ bodySmall: TextStyle;
375
+ caption: TextStyle;
376
+ codeBlock: TextStyle;
377
+ inlineCode: TextStyle;
378
+ }
379
+ /** Button label metrics per control size (from typography tokens). */
380
+ export interface ButtonTypographyStop {
381
+ fontSize: string;
382
+ lineHeight: string;
383
+ }
384
+ export interface ButtonTypography {
385
+ extraSmall: ButtonTypographyStop;
386
+ small: ButtonTypographyStop;
387
+ medium: ButtonTypographyStop;
388
+ large: ButtonTypographyStop;
389
+ }
390
+ /** Pill label metrics per size stop (from typography tokens). */
391
+ export interface PillTypographyStop {
392
+ fontSize: string;
393
+ lineHeight: string;
394
+ fontWeight: number;
395
+ }
396
+ export interface PillTypography {
397
+ sm: PillTypographyStop;
398
+ md: PillTypographyStop;
399
+ }
400
+ export interface Typography {
401
+ fontFamily: FontFamilyTokens;
402
+ fontSize: FontSizeTokens;
403
+ fontWeight: FontWeightTokens;
404
+ lineHeight: LineHeightTokens;
405
+ text: TextTokens;
406
+ button: ButtonTypography;
407
+ pill: PillTypography;
408
+ }
409
+ export interface SpaceTokens {
410
+ 1: string;
411
+ 2: string;
412
+ 3: string;
413
+ 4: string;
414
+ 5: string;
415
+ 6: string;
416
+ 8: string;
417
+ 10: string;
418
+ 12: string;
419
+ }
420
+ export interface BorderRadiusTokens {
421
+ sm: string;
422
+ md: string;
423
+ lg: string;
424
+ xl: string;
425
+ full: string;
426
+ }
427
+ export interface BorderWidthTokens {
428
+ thin: string;
429
+ thick: string;
430
+ }
431
+ /** Named scale for Stack `gap`. */
432
+ export interface StackGapTokens {
433
+ none: string;
434
+ xxs: string;
435
+ xs: string;
436
+ sm: string;
437
+ md: string;
438
+ lg: string;
439
+ xl: string;
440
+ xxl: string;
441
+ }
442
+ /** Named scale for Stack `padding` / `paddingBlock` / `paddingInline`. */
443
+ export interface StackPaddingTokens {
444
+ none: string;
445
+ xxs: string;
446
+ xs: string;
447
+ sm: string;
448
+ md: string;
449
+ lg: string;
450
+ xl: string;
451
+ xxl: string;
452
+ }
453
+ export type StackGap = keyof StackGapTokens;
454
+ export type StackPadding = keyof StackPaddingTokens;
455
+ /** @deprecated Use `StackGap` or `StackPadding` — gap and padding share the same stop names. */
456
+ export type StackSpacing = StackGap;
457
+ /** @deprecated Use `StackGapTokens` or `StackPaddingTokens`. */
458
+ export type StackSpacingTokens = StackGapTokens;
459
+ /** Min-width thresholds — `sm` is implicit (0); use in `@media (min-width: var(--cube-breakpoint-md))`. */
460
+ export interface BreakpointTokens {
461
+ md: string;
462
+ lg: string;
463
+ }
464
+ /** Shared control geometry (button, input, etc.) — from functional size tokens. */
465
+ export interface ControlPaddingInlineTokens {
466
+ condensed: string;
467
+ normal: string;
468
+ spacious: string;
469
+ }
470
+ export interface ControlSizeStopTokens {
471
+ /** Outer height (border-box) */
472
+ size: string;
473
+ /** Corner radius for this control stop (buttons, inputs, etc.) */
474
+ borderRadius: string;
475
+ gap: string;
476
+ paddingBlock: string;
477
+ paddingInline: ControlPaddingInlineTokens;
478
+ }
479
+ export interface ControlSizesTokens {
480
+ extraSmall: ControlSizeStopTokens;
481
+ small: ControlSizeStopTokens;
482
+ medium: ControlSizeStopTokens;
483
+ large: ControlSizeStopTokens;
484
+ }
485
+ export interface PopoverLayoutTokens {
486
+ /** Offset between trigger and panel surface */
487
+ gap: string;
488
+ borderRadius: string;
489
+ minWidth: string;
490
+ maxWidth: string;
491
+ }
492
+ export interface TooltipLayoutTokens {
493
+ /** Offset between trigger and tooltip surface */
494
+ gap: string;
495
+ borderRadius: string;
496
+ paddingInline: string;
497
+ paddingBlock: string;
498
+ maxWidth: string;
499
+ maxWidthSingleLine: string;
500
+ boxShadow: string;
501
+ }
502
+ /** Icon-only control geometry — hit target, radius, glyph; no padding/gap (`size.control.iconButton` in `tokens/functional/size/size.json`). */
503
+ export interface IconButtonSizeStopTokens {
504
+ /** Border-box width/height of the control */
505
+ size: string;
506
+ borderRadius: string;
507
+ /** Icon / visual glyph box (width & height) */
508
+ icon: string;
509
+ }
510
+ export interface IconButtonSizesTokens {
511
+ extraSmall: IconButtonSizeStopTokens;
512
+ small: IconButtonSizeStopTokens;
513
+ medium: IconButtonSizeStopTokens;
514
+ large: IconButtonSizeStopTokens;
515
+ }
516
+ export interface BreadcrumbSizesTokens {
517
+ gap: string;
518
+ itemPaddingInline: string;
519
+ itemPaddingBlock: string;
520
+ itemBorderRadius: string;
521
+ separatorWidth: string;
522
+ }
523
+ export interface SiteHeaderSizesTokens {
524
+ height: string;
525
+ paddingInlineStart: string;
526
+ paddingInlineEnd: string;
527
+ paddingBlock: string;
528
+ leadingGap: string;
529
+ trailingGap: string;
530
+ dividerHeight: string;
531
+ dividerWidth: string;
532
+ }
533
+ /** Shared stacking order for portaled / floating UI — one ladder for the whole system. */
534
+ export interface ZIndexTokens {
535
+ base: string;
536
+ raised: string;
537
+ sticky: string;
538
+ dropdown: string;
539
+ overlay: string;
540
+ sheet: string;
541
+ dialog: string;
542
+ popover: string;
543
+ tooltip: string;
544
+ toast: string;
545
+ max: string;
546
+ }
547
+ export interface SheetWidthStopTokens {
548
+ sm: string;
549
+ md: string;
550
+ lg: string;
551
+ }
552
+ export interface SheetSizesTokens {
553
+ width: SheetWidthStopTokens;
554
+ minWidth: string;
555
+ maxWidth: string;
556
+ maxHeight: string;
557
+ padding: string;
558
+ /** Top corner radius token — used only when `edge="bottom"` and `roundedTop` is true. */
559
+ bottomCornerRadius: string;
560
+ }
561
+ export interface SidebarSizesTokens {
562
+ width: SheetWidthStopTokens;
563
+ widthMinimized: string;
564
+ minWidth: string;
565
+ maxWidth: string;
566
+ padding: string;
567
+ footerPadding: string;
568
+ }
569
+ export interface ResizeHandleSizesTokens {
570
+ hitArea: string;
571
+ }
572
+ export interface ShadowTokens {
573
+ popover: string;
574
+ popoverElevated: string;
575
+ sheet: string;
576
+ }
577
+ export interface Sizes {
578
+ space: SpaceTokens;
579
+ stack: {
580
+ gap: StackGapTokens;
581
+ padding: StackPaddingTokens;
582
+ };
583
+ borderRadius: BorderRadiusTokens;
584
+ borderWidth: BorderWidthTokens;
585
+ breakpoints: BreakpointTokens;
586
+ control: ControlSizesTokens;
587
+ tooltip: TooltipLayoutTokens;
588
+ pill: PillSizesTokens;
589
+ iconButton: IconButtonSizesTokens;
590
+ breadcrumb: BreadcrumbSizesTokens;
591
+ siteHeader: SiteHeaderSizesTokens;
592
+ sheet: SheetSizesTokens;
593
+ sidebar: SidebarSizesTokens;
594
+ popover: PopoverLayoutTokens;
595
+ actionMenu: ActionMenuSizesTokens;
596
+ resizeHandle: ResizeHandleSizesTokens;
597
+ zIndex: ZIndexTokens;
598
+ }
599
+ export type SpaceKey = keyof SpaceTokens;
600
+ export interface ThemeTokens {
601
+ colors: Colors;
602
+ typography: Typography;
603
+ sizes: Sizes;
604
+ shadows: ShadowTokens;
605
+ }
606
+ /**
607
+ * What consumers pass to <ThemeProvider theme={...}> or the component theme prop.
608
+ * Any deeply-nested subset is valid — missing keys fall back to the default theme.
609
+ */
610
+ export type CubeTheme = DeepPartial<ThemeTokens>;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Deep-merges `override` on top of `base`.
3
+ * Only plain objects are merged recursively — primitives, arrays, and null
4
+ * are replaced wholesale. Missing keys in `override` keep the `base` value.
5
+ */
6
+ export declare function deepMerge<T extends object>(base: T, override: Partial<T> | undefined): T;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Derives column headers and normalized rows from a JSON value.
3
+ *
4
+ * Supported shapes:
5
+ * - Array of objects → columns from union of all keys, rows are the objects
6
+ * - Plain object → two columns "Key" / "Value", one row per entry
7
+ * - Anything else → single column "Value", single row
8
+ */
9
+ export interface GridData {
10
+ columns: string[];
11
+ rows: Record<string, unknown>[];
12
+ }
13
+ export declare function flattenJson(data: unknown): GridData;
14
+ /**
15
+ * Converts a cell value to a human-readable string for display in the table.
16
+ * Objects / arrays are pretty-printed as compact JSON.
17
+ */
18
+ export declare function cellToString(value: unknown): string;
@@ -0,0 +1,2 @@
1
+ /** Parse theme/CSS length strings to pixels (assumes 16px root for rem). */
2
+ export declare function parseLengthPx(value: string, fallback?: number): number;
@@ -0,0 +1,8 @@
1
+ /** Mobile-first breakpoints — `sm` is the default (no min-width). */
2
+ export type Breakpoint = "sm" | "md" | "lg";
3
+ export declare const BREAKPOINTS: Breakpoint[];
4
+ /** Scalar applies to all breakpoints; object sets per-tier values with cascade (md ← sm, lg ← md ← sm). */
5
+ export type Responsive<T> = T | Partial<Record<Breakpoint, T>>;
6
+ export declare function isResponsiveObject<T>(value: Responsive<T>): value is Partial<Record<Breakpoint, T>>;
7
+ /** Resolve mobile-first values for each tier. */
8
+ export declare function resolveResponsive<T>(value: Responsive<T> | undefined): Record<Breakpoint, T | undefined>;