@graphty/compact-mantine 0.6.0 → 0.7.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/dist/index.d.ts CHANGED
@@ -49,6 +49,7 @@ import { VariantColorsResolver } from '@mantine/core';
49
49
  * @param props.actions - Controls that act, hidden until the row is hovered or focused, and always drawn where the pointer cannot hover
50
50
  * @param props.residentActions - Controls that report a state, which are never hidden
51
51
  * @param props.actionsVisible - Forces the hidden controls shown or hidden instead of letting hover and focus decide
52
+ * @param props.disabled - Whether the row cannot act, which draws its reading at the disabled ink and announces it as unavailable
52
53
  * @param props.onClick - Called when the row's own reading is activated, with the event and the activation source
53
54
  * @param props.onFocus - Called when focus enters the row or moves between its controls
54
55
  * @param props.onBlur - Called when focus leaves a control in the row
@@ -139,6 +140,18 @@ export declare interface ActionRowProps {
139
140
  * scan a column for.
140
141
  */
141
142
  residentActions?: default_2.ReactNode;
143
+ /**
144
+ * Whether this row cannot act, and says so by being drawn dimmer.
145
+ *
146
+ * It is the row half of the "not built yet" group form: where three or more
147
+ * contiguous rows share that status the tag rises once to the group header and the
148
+ * rows below are "dimmed and disabled instead of tagged individually". The reading
149
+ * then takes the disabled ink -- a different token from the ordinary muted one --
150
+ * and the row is announced as unavailable, so nothing about the state depends on
151
+ * telling two greys apart.
152
+ * @default false
153
+ */
154
+ disabled?: boolean;
142
155
  /**
143
156
  * Forces `actions` to be drawn, or forces them hidden, instead of letting
144
157
  * the row decide from hover and focus.
@@ -1274,6 +1287,7 @@ export declare interface ControlGroupProps {
1274
1287
  * section is correct in either direction with nothing to configure.
1275
1288
  * @param props - Component props
1276
1289
  * @param props.label - The section's name, drawn in its header
1290
+ * @param props.technicalName - The technical half of the 6.3 pair, drawn in the secondary ink inside the same label
1277
1291
  * @param props.opened - Whether the section is expanded, when you drive it from your own state
1278
1292
  * @param props.defaultOpened - Whether the section starts expanded when it keeps its own state, defaulting to true
1279
1293
  * @param props.onOpenChange - Called when the section expands or collapses, with the new state first and the event second
@@ -1312,6 +1326,16 @@ export declare function ControlSection(props: ControlSectionProps): default_2.JS
1312
1326
  export declare interface ControlSectionProps extends DisclosureProps {
1313
1327
  /** The section's name, drawn in its header. One to three words, sentence case. */
1314
1328
  label: string;
1329
+ /**
1330
+ * The technical name for the same thing, WITHOUT its parentheses -- `"Layout"`
1331
+ * beside `"Arrangement"`, `"Node and edge table"` beside `"Data table"`.
1332
+ *
1333
+ * One drawing only: plain name, space, technical name in parentheses in the
1334
+ * secondary ink, inside this one label. It joins the header's tooltip and the
1335
+ * group's accessible name as well, so the pair is never something only a pointer
1336
+ * can reach.
1337
+ */
1338
+ technicalName?: string;
1315
1339
  /**
1316
1340
  * Whether the section holds settings the reader changed from their
1317
1341
  * defaults. A 6px accent dot follows the name, announced to a screen reader
@@ -3789,6 +3813,15 @@ export declare interface PopoutContextValue {
3789
3813
  * everything opened from it.
3790
3814
  */
3791
3815
  parentId: string | null;
3816
+ /**
3817
+ * The region this pop-out was opened in, or null when it sits in no region.
3818
+ *
3819
+ * Root-level pop-outs compete for one open slot per region, so a pop-out
3820
+ * opened in a panel and one opened in an inspector can both be open while
3821
+ * two opened in the same panel cannot. It is the opener's region, not the
3822
+ * panel's screen position.
3823
+ */
3824
+ region: string | null;
3792
3825
  }
3793
3826
 
3794
3827
  /**
@@ -3883,8 +3916,11 @@ export declare function PopoutManager({ children }: PopoutManagerProps): JSX.Ele
3883
3916
  * out of `Popout` never needs it.
3884
3917
  */
3885
3918
  export declare interface PopoutManagerContextValue {
3886
- /** Adds a pop-out to the layer, with the callback that closes it and the pop-out it was opened from. */
3887
- register: (id: string, closeCallback: () => void, parentId?: string | null) => void;
3919
+ /**
3920
+ * Adds a pop-out to the layer, with the callback that closes it, the pop-out
3921
+ * it was opened from, and the region it was opened in.
3922
+ */
3923
+ register: (id: string, closeCallback: () => void, parentId?: string | null, region?: string | null) => void;
3888
3924
  /** Takes a pop-out out of the layer, when it leaves the page. */
3889
3925
  unregister: (id: string) => void;
3890
3926
  /** The stacking order a pop-out currently draws at. */
@@ -4102,6 +4138,56 @@ export declare interface PopoutProps extends DisclosureProps {
4102
4138
  children: ReactNode;
4103
4139
  }
4104
4140
 
4141
+ /**
4142
+ * Which region the pop-outs beneath this point belong to.
4143
+ *
4144
+ * A shell is divided into regions -- a properties panel, an inspector, the
4145
+ * surface between them, a dialog, a dock -- and a reader may hold one pop-out
4146
+ * open in each, because two pop-outs describing two different objects are not
4147
+ * competing for the same answer. What they may not do is stack up inside ONE
4148
+ * region: opening a second there closes the first, because both describe the
4149
+ * same object and the second is the reader changing their mind.
4150
+ *
4151
+ * Without a region, every pop-out opened straight from the page is a sibling of
4152
+ * every other, so an inspector pop-out closes a panel pop-out that has nothing
4153
+ * to do with it. That is the behaviour this component exists to divide up, and
4154
+ * it is why the default -- no region at all -- keeps the older whole-page rule:
4155
+ * an application that never mentions regions is unaffected.
4156
+ *
4157
+ * The region is the OPENER's, not the surface's screen position. Wrap the
4158
+ * region's own markup, and a pop-out that slides out over neighbouring space
4159
+ * still counts against the region whose control opened it.
4160
+ *
4161
+ * Nesting is unaffected either way. A pop-out opened from another pop-out is
4162
+ * grouped by its parent, as it always was, and inherits this region only for
4163
+ * the benefit of anything it opens in turn.
4164
+ * @param props - Component props
4165
+ * @param props.id - What to call this region
4166
+ * @param props.children - The part of the tree whose pop-outs belong to it
4167
+ * @returns The provider the pop-outs inside it read their region from
4168
+ * @example
4169
+ * ```tsx
4170
+ * <PopoutManager>
4171
+ * <PopoutRegion id="panel">{panel}</PopoutRegion>
4172
+ * <PopoutRegion id="inspector">{inspector}</PopoutRegion>
4173
+ * </PopoutManager>
4174
+ * ```
4175
+ */
4176
+ export declare function PopoutRegion({ id, children }: PopoutRegionProps): JSX.Element;
4177
+
4178
+ /**
4179
+ * Props for the PopoutRegion component.
4180
+ */
4181
+ export declare interface PopoutRegionProps {
4182
+ /**
4183
+ * What to call this region. Any stable string; two regions are the same
4184
+ * region when their ids are equal.
4185
+ */
4186
+ id: string;
4187
+ /** The part of the tree whose pop-outs belong to this region. */
4188
+ children: ReactNode;
4189
+ }
4190
+
4105
4191
  /**
4106
4192
  * A floating panel that opens from a trigger and can be dragged, nested and
4107
4193
  * dismissed without leaving the page.
@@ -5207,7 +5293,7 @@ export declare function UiGlyph({ name, size }: UiGlyphProps): default_2.JSX.Ele
5207
5293
  * Shared UI glyphs: the chevrons, the doors and the status marks the row types
5208
5294
  * draw outside a field's slot.
5209
5295
  */
5210
- export declare type UiGlyphName = "chevronDown" | "chevronRight" | "chevronLeft" | "close" | "plus" | "minus" | "gear" | "warning" | "check" | "eye" | "refresh" | "copy" | "pin" | "info" | "reset";
5296
+ export declare type UiGlyphName = "chevronDown" | "chevronRight" | "chevronLeft" | "close" | "plus" | "minus" | "gear" | "warning" | "check" | "eye" | "refresh" | "copy" | "pin" | "keepOpen" | "info" | "reset";
5211
5297
 
5212
5298
  /**
5213
5299
  * Props for the UiGlyph component.
@@ -5342,6 +5428,12 @@ export declare function useOrdinalFormatter(): (value: number) => string;
5342
5428
  */
5343
5429
  export declare function usePanelLabels(): boolean;
5344
5430
 
5431
+ /**
5432
+ * The region the calling component sits in.
5433
+ * @returns The region's id, or null when there is no enclosing region.
5434
+ */
5435
+ export declare function usePopoutRegion(): string | null;
5436
+
5345
5437
  /** The released version of this package. */
5346
5438
  export declare const VERSION = "0.6.0";
5347
5439