@stackone/malachite 2.131.0 → 2.133.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/COMPONENTS.md +8 -8
- package/dist/assets/icons/hexagon_fill.svg.js +6 -0
- package/dist/assets/icons/hexagon_fill.svg.js.map +1 -0
- package/dist/assets/icons/shield_star_fill.svg.js +6 -0
- package/dist/assets/icons/shield_star_fill.svg.js.map +1 -0
- package/dist/components/Button.js.map +1 -1
- package/dist/components/CodeBlock.js +130 -130
- package/dist/components/CodeBlock.js.map +1 -1
- package/dist/components/CodeBlockHighlighter.js +65 -65
- package/dist/components/CodeBlockHighlighter.js.map +1 -1
- package/dist/components/CodePreview.js +74 -63
- package/dist/components/CodePreview.js.map +1 -1
- package/dist/components/FormActions.js +13 -9
- package/dist/components/FormActions.js.map +1 -1
- package/dist/components/Hexagon.js +33 -26
- package/dist/components/Hexagon.js.map +1 -1
- package/dist/components/HexagonScale.js +20 -19
- package/dist/components/HexagonScale.js.map +1 -1
- package/dist/components/Input/Input.js +55 -54
- package/dist/components/Input/Input.js.map +1 -1
- package/dist/components/KeyValueList.js +36 -32
- package/dist/components/KeyValueList.js.map +1 -1
- package/dist/components/QueryInput.js +91 -90
- package/dist/components/QueryInput.js.map +1 -1
- package/dist/components/Surface.js +1 -1
- package/dist/components/Surface.js.map +1 -1
- package/dist/components/Table/Table.js +691 -637
- package/dist/components/Table/Table.js.map +1 -1
- package/dist/components/TextArea/TextArea.js +46 -46
- package/dist/components/TextArea/TextArea.js.map +1 -1
- package/dist/components/buttonStyles.js +2 -0
- package/dist/components/buttonStyles.js.map +1 -1
- package/dist/components/codeBlockStyles.js +11 -6
- package/dist/components/codeBlockStyles.js.map +1 -1
- package/dist/components/codePreviewJson.js +25 -0
- package/dist/components/codePreviewJson.js.map +1 -0
- package/dist/index.d.ts +42 -7
- package/dist/tailwind.css.js +1 -1
- package/dist/theme.js +11 -3
- package/dist/theme.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -559,7 +559,13 @@ export declare type ButtonVariant = 'filled' | 'outline'
|
|
|
559
559
|
* acts on what it produced. Provenance, not a severity: it says who is being asked, not
|
|
560
560
|
* that anything is wrong.
|
|
561
561
|
*/
|
|
562
|
-
| 'assistant' | 'destructive'
|
|
562
|
+
| 'assistant' | 'destructive'
|
|
563
|
+
/**
|
|
564
|
+
* `destructive` as a solid red ground with white text, for the one action in a confirmation
|
|
565
|
+
* that cannot be taken back (stopping every AI tool, deleting a project). `destructive`'s
|
|
566
|
+
* outline is for a destructive action that sits among others.
|
|
567
|
+
*/
|
|
568
|
+
| 'destructive-filled' | 'success' | 'warning' | 'error' | 'ghost'
|
|
563
569
|
/** `ghost` until its `Surface.Row` is hovered or focused, or its menu opens. For `trailing` only. */
|
|
564
570
|
| 'row-outline'
|
|
565
571
|
/** Text only, in the accent colour, for a secondary action beside a primary one. */
|
|
@@ -1316,6 +1322,8 @@ export declare interface CodePreviewProps {
|
|
|
1316
1322
|
* title still names it for assistive tech. */
|
|
1317
1323
|
titleHidden?: boolean;
|
|
1318
1324
|
code: string;
|
|
1325
|
+
/** `json` colours keys, strings, numbers and literals line by line. Plain text by default. */
|
|
1326
|
+
language?: 'json';
|
|
1319
1327
|
/** How many lines show until the reader asks for all of them. `Infinity` shows them all. */
|
|
1320
1328
|
previewLines?: number;
|
|
1321
1329
|
/** 1-based line numbers to flag, such as the fields a scanner caught. Colour alone, so say why nearby. */
|
|
@@ -2379,8 +2387,11 @@ declare interface FormItemProps {
|
|
|
2379
2387
|
}
|
|
2380
2388
|
|
|
2381
2389
|
export declare interface FormPrimaryAction extends FormAction {
|
|
2382
|
-
/**
|
|
2383
|
-
|
|
2390
|
+
/**
|
|
2391
|
+
* `destructive` for an action that deletes or revokes; `destructive-filled` for the one action
|
|
2392
|
+
* in a confirmation that can't be taken back, on the solid red ground.
|
|
2393
|
+
*/
|
|
2394
|
+
tone?: FormPrimaryTone;
|
|
2384
2395
|
/**
|
|
2385
2396
|
* `submit` makes it the form's submit button, so Enter in a field presses it. Leave `onClick`
|
|
2386
2397
|
* off then and handle the form's `onSubmit` (a `SidePanel`'s, say), or a click runs both.
|
|
@@ -2388,6 +2399,8 @@ export declare interface FormPrimaryAction extends FormAction {
|
|
|
2388
2399
|
type?: 'button' | 'submit';
|
|
2389
2400
|
}
|
|
2390
2401
|
|
|
2402
|
+
export declare type FormPrimaryTone = 'default' | 'destructive' | 'destructive-filled';
|
|
2403
|
+
|
|
2391
2404
|
declare interface FormProps {
|
|
2392
2405
|
children: default_2.ReactNode;
|
|
2393
2406
|
onFinish?: (data: FieldValues) => void;
|
|
@@ -2570,6 +2583,8 @@ export declare interface HexagonProps {
|
|
|
2570
2583
|
tone?: HexagonTone;
|
|
2571
2584
|
/** `small` is 16px, `medium` 18px. */
|
|
2572
2585
|
size?: HexagonSize;
|
|
2586
|
+
/** `hexagon` for an outcome; `shield`, a shield with a star cut out, for a protection or risk level. Same tones and sizes. */
|
|
2587
|
+
shape?: HexagonShape;
|
|
2573
2588
|
/** Draws it at 20% strength, for a step of a scale that isn't the current one. */
|
|
2574
2589
|
dimmed?: boolean;
|
|
2575
2590
|
className?: string;
|
|
@@ -2578,8 +2593,10 @@ export declare interface HexagonProps {
|
|
|
2578
2593
|
export declare const HexagonScale: default_2.FC<HexagonScaleProps>;
|
|
2579
2594
|
|
|
2580
2595
|
export declare interface HexagonScaleProps {
|
|
2581
|
-
/** One
|
|
2596
|
+
/** One mark per step, in order. */
|
|
2582
2597
|
steps: readonly HexagonTone[];
|
|
2598
|
+
/** Every step's outline; default `hexagon`. */
|
|
2599
|
+
shape?: HexagonShape;
|
|
2583
2600
|
/** Index of the step drawn at full strength; the rest are dimmed. Omit to dim them all. */
|
|
2584
2601
|
current?: number;
|
|
2585
2602
|
/** Only when it stands alone; beside text naming the step it is decorative. */
|
|
@@ -2589,6 +2606,8 @@ export declare interface HexagonScaleProps {
|
|
|
2589
2606
|
className?: string;
|
|
2590
2607
|
}
|
|
2591
2608
|
|
|
2609
|
+
export declare type HexagonShape = 'hexagon' | 'shield';
|
|
2610
|
+
|
|
2592
2611
|
export declare type HexagonSize = 'small' | 'medium';
|
|
2593
2612
|
|
|
2594
2613
|
export declare type HexagonTone = 'neutral' | 'success' | 'caution' | 'warning' | 'error';
|
|
@@ -3639,6 +3658,9 @@ export declare const KeyValueList: default_2.FC<KeyValueListProps> & {
|
|
|
3639
3658
|
Row: typeof Row;
|
|
3640
3659
|
};
|
|
3641
3660
|
|
|
3661
|
+
/** How wide the label column is, on the scale of the list's size. */
|
|
3662
|
+
export declare type KeyValueListLabelWidth = 'narrow' | 'regular' | 'wide';
|
|
3663
|
+
|
|
3642
3664
|
export declare interface KeyValueListProps {
|
|
3643
3665
|
className?: string;
|
|
3644
3666
|
children: default_2.ReactNode;
|
|
@@ -3649,6 +3671,12 @@ export declare interface KeyValueListProps {
|
|
|
3649
3671
|
* frames it already, rather than a box inside a box.
|
|
3650
3672
|
*/
|
|
3651
3673
|
plain?: boolean;
|
|
3674
|
+
/**
|
|
3675
|
+
* The label column's width, scaled to `size`. `narrow` for a list in a small window or panel
|
|
3676
|
+
* where the values need the room, `wide` for long labels. Defaults to `regular`, the width the
|
|
3677
|
+
* column has always had.
|
|
3678
|
+
*/
|
|
3679
|
+
labelWidth?: KeyValueListLabelWidth;
|
|
3652
3680
|
}
|
|
3653
3681
|
|
|
3654
3682
|
export declare interface KeyValueListRowProps {
|
|
@@ -4019,6 +4047,10 @@ export declare interface MalachiteTheme {
|
|
|
4019
4047
|
shadow: string;
|
|
4020
4048
|
shadowLight: string;
|
|
4021
4049
|
shadowMedium: string;
|
|
4050
|
+
/** The solid ground of `Button variant="destructive-filled"`. */
|
|
4051
|
+
fill: string;
|
|
4052
|
+
/** Text and icons on `fill`. */
|
|
4053
|
+
fillForeground: string;
|
|
4022
4054
|
};
|
|
4023
4055
|
success: {
|
|
4024
4056
|
background: string;
|
|
@@ -6243,7 +6275,9 @@ declare interface SurfaceRowChromeProps {
|
|
|
6243
6275
|
* carries an outcome, where the result belongs to the whole line rather than to one cell in it.
|
|
6244
6276
|
*/
|
|
6245
6277
|
tone?: 'default' | 'muted' | 'success' | 'warning' | 'error';
|
|
6246
|
-
/** `compact
|
|
6278
|
+
/** `compact`, the default, is an 8px by 16px inset the row owns, so its content clears the
|
|
6279
|
+
* card's border without a padding wrapper. `none` leaves the edges to the content, for a row
|
|
6280
|
+
* that pads itself or runs edge to edge, such as a search field. */
|
|
6247
6281
|
inset?: 'none' | 'compact';
|
|
6248
6282
|
/** `false` leaves the hover to something inside the row. */
|
|
6249
6283
|
hover?: boolean;
|
|
@@ -6373,9 +6407,10 @@ declare type TableProps<T = Record<string, unknown>> = {
|
|
|
6373
6407
|
loading?: boolean;
|
|
6374
6408
|
/** How many skeleton rows `loading` draws, for a table whose real row count is known. */
|
|
6375
6409
|
loadingRowCount?: number;
|
|
6376
|
-
/** Names the
|
|
6410
|
+
/** Names the table for assistive technology. */
|
|
6377
6411
|
'aria-label'?: string;
|
|
6378
|
-
/** Names the
|
|
6412
|
+
/** Names the table by the id of a visible heading. The detached layout falls back to its
|
|
6413
|
+
* `title` row when neither this nor `aria-label` is given. */
|
|
6379
6414
|
'aria-labelledby'?: string;
|
|
6380
6415
|
error?: boolean;
|
|
6381
6416
|
errorTitle?: string;
|