@mt-gloss/ui 0.1.102 → 0.1.104
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/{COMMITS-Dm8qIHaq.js → COMMITS-BEa-B4Oc.js} +143 -119
- package/composites-panels.js +2 -2
- package/index.js +946 -885
- package/lib/composites/panels/coordinator/settingsBufferSchemas.d.ts +13 -0
- package/lib/composites/panels/coordinator/types.d.ts +6 -0
- package/lib/primitives/dashboard/SettingsTabStrip/SettingsTabStrip.d.ts +17 -0
- package/lib/primitives/dashboard/SettingsTabStrip/index.d.ts +6 -0
- package/lib/primitives/dashboard/SettingsTabStrip/types.d.ts +12 -0
- package/lib/primitives/dashboard/index.d.ts +1 -0
- package/package.json +1 -1
- package/ui.css +1 -1
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Normalizes a buffer value for a given key before writing to bufferByCard.
|
|
3
|
+
* Called inside the SET_BUFFER_VALUE reducer case (coordinator.ts).
|
|
4
|
+
* Unknown keys pass through unchanged (forward-compat).
|
|
5
|
+
*
|
|
6
|
+
* Fallback values per spike §6.1.4:
|
|
7
|
+
* threshold → 80, timeframe → 30, accent → null
|
|
8
|
+
*
|
|
9
|
+
* @param key buffer-value key (e.g. 'threshold', 'timeframe', 'accent', 'slots')
|
|
10
|
+
* @param value unknown — usually number (sliders) or string (color hex)
|
|
11
|
+
* @returns normalized value (clamped, parsed, or passthrough)
|
|
12
|
+
*/
|
|
13
|
+
export declare function normalizeBufferValue(key: string, value: unknown): unknown;
|
|
@@ -43,6 +43,11 @@ export type TriggerContext = {
|
|
|
43
43
|
kind: 'manage-pages-action';
|
|
44
44
|
global: true;
|
|
45
45
|
align: 'left';
|
|
46
|
+
} | {
|
|
47
|
+
kind: 'layout-action-blocked';
|
|
48
|
+
action: 'drag' | 'resize' | 'add' | 'pack';
|
|
49
|
+
blockedCardId: string;
|
|
50
|
+
activeCardId: string;
|
|
46
51
|
};
|
|
47
52
|
export interface CloseLogEntry {
|
|
48
53
|
panelId: PanelId;
|
|
@@ -96,6 +101,7 @@ export interface PanelState {
|
|
|
96
101
|
activeTrigger: TriggerContext | null;
|
|
97
102
|
bellCutoutOpen: boolean;
|
|
98
103
|
isDirty: boolean;
|
|
104
|
+
dirtySessionCount: number;
|
|
99
105
|
lockHint: LockHint | null;
|
|
100
106
|
bufferByCard: Record<string, BufferDelta>;
|
|
101
107
|
lastClose: {
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { SettingsTabStripProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* SettingsTabStrip — WAI-ARIA Tabs pattern primitive for the Settings panel dimension strip.
|
|
5
|
+
*
|
|
6
|
+
* - Roles: container role='tablist'; each button role='tab'; activeTab has aria-selected='true' + tabIndex=0
|
|
7
|
+
* - Keyboard: ArrowLeft/Right (wrap), Home, End — automatic activation (focus = select)
|
|
8
|
+
* - Active indicator: motion.span with layoutId='settings-active-tab-indicator'; gated by useReducedMotionPanel
|
|
9
|
+
*
|
|
10
|
+
* Returns null when dimensions.length < 2 (single-dimension panels skip the strip).
|
|
11
|
+
*
|
|
12
|
+
* Phase 16 D-09. Avoids collision with existing presets/PresetSegmentedControl (role=radiogroup).
|
|
13
|
+
*/
|
|
14
|
+
export declare function SettingsTabStrip({ dimensions, activeTab, onSelect, reduced: reducedProp, labels, ariaLabel, }: SettingsTabStripProps): React.ReactElement | null;
|
|
15
|
+
export declare namespace SettingsTabStrip {
|
|
16
|
+
var displayName: string;
|
|
17
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SettingsTabStrip barrel — WAI-ARIA Tabs pattern primitive for Settings panel dimension strip.
|
|
3
|
+
* Phase 16 D-09. Use INSIDE SettingsShell to render the 3-or-4 tab navigation.
|
|
4
|
+
*/
|
|
5
|
+
export { SettingsTabStrip } from './SettingsTabStrip';
|
|
6
|
+
export type { SettingsTabStripProps, SettingsDimension } from './types';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type SettingsDimension = 'timeframe' | 'threshold' | 'slots' | 'color';
|
|
2
|
+
export interface SettingsTabStripProps {
|
|
3
|
+
dimensions: ReadonlyArray<SettingsDimension>;
|
|
4
|
+
activeTab: SettingsDimension;
|
|
5
|
+
onSelect: (next: SettingsDimension) => void;
|
|
6
|
+
/** Override; when omitted, the component reads useReducedMotionPanel(). */
|
|
7
|
+
reduced?: boolean;
|
|
8
|
+
/** Optional label overrides; defaults to DIM_LABELS. */
|
|
9
|
+
labels?: Partial<Record<SettingsDimension, string>>;
|
|
10
|
+
/** Defaults to 'Settings dimensions'. */
|
|
11
|
+
ariaLabel?: string;
|
|
12
|
+
}
|
|
@@ -44,4 +44,5 @@ export * from './TrackingOutline';
|
|
|
44
44
|
export * from './CellTintOverlay';
|
|
45
45
|
export * from './RefusePulse';
|
|
46
46
|
export { ResizeTrackingOutline, type ResizeTrackingOutlineProps, } from './ResizeTrackingOutline';
|
|
47
|
+
export * from './SettingsTabStrip';
|
|
47
48
|
export { useResizeChoreography, type UseResizeChoreographyArgs, type UseResizeChoreographyReturn, } from './MetricCard/useResizeChoreography';
|