@k2b/ui 0.57.1 → 0.59.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/base.css +1 -0
- package/dist/browser/actions/ContextMenu.js +5 -2
- package/dist/browser/actions/ContextMenu.js.map +1 -1
- package/dist/browser/actions/Dropdown.js +4 -3
- package/dist/browser/actions/Dropdown.js.map +1 -1
- package/dist/browser/actions/Tabs.js +58 -19
- package/dist/browser/actions/Tabs.js.map +1 -1
- package/dist/browser/actions/Toolbar.js +66 -60
- package/dist/browser/actions/Toolbar.js.map +1 -1
- package/dist/browser/actions/ViewTabs.js +89 -73
- package/dist/browser/actions/ViewTabs.js.map +1 -1
- package/dist/browser/actions/drag-and-drop.js +2 -1
- package/dist/browser/actions/drag-and-drop.js.map +1 -1
- package/dist/browser/actions/menu-rows.js +1 -1
- package/dist/browser/actions/menu-rows.js.map +1 -1
- package/dist/browser/charts/core/snapshot.js +3 -1
- package/dist/browser/charts/core/snapshot.js.map +1 -1
- package/dist/browser/chat/ChatComposer.js +832 -679
- package/dist/browser/chat/ChatComposer.js.map +1 -1
- package/dist/browser/chat/ChatContextPopup.js +34 -4
- package/dist/browser/chat/ChatContextPopup.js.map +1 -1
- package/dist/browser/chat/ChatPrimitives.js +471 -284
- package/dist/browser/chat/ChatPrimitives.js.map +1 -1
- package/dist/browser/chat/ChatTasks.js +218 -80
- package/dist/browser/chat/ChatTasks.js.map +1 -1
- package/dist/browser/chat/ChatTimeline.js +5 -3
- package/dist/browser/chat/ChatTimeline.js.map +1 -1
- package/dist/browser/chat/chat-behavior.js +12 -0
- package/dist/browser/chat/chat-behavior.js.map +1 -1
- package/dist/browser/chat/chat-messages.js +50 -2
- package/dist/browser/chat/chat-messages.js.map +1 -1
- package/dist/browser/chat/index.js +2 -1
- package/dist/browser/chat/index.js.map +1 -1
- package/dist/browser/chat/types.js.map +1 -1
- package/dist/browser/content/Calendar.js +2 -2
- package/dist/browser/content/Calendar.js.map +1 -1
- package/dist/browser/content/CalendarWeekView.js +9 -2
- package/dist/browser/content/CalendarWeekView.js.map +1 -1
- package/dist/browser/content/ChartRoot.js +4 -1
- package/dist/browser/content/ChartRoot.js.map +1 -1
- package/dist/browser/content/DataTable.js +9 -0
- package/dist/browser/content/DataTable.js.map +1 -1
- package/dist/browser/content/Lightbox.js +2 -2
- package/dist/browser/content/Lightbox.js.map +1 -1
- package/dist/browser/content/PdfPages.js +160 -44
- package/dist/browser/content/PdfPages.js.map +1 -1
- package/dist/browser/content/PdfViewer.js +59 -21
- package/dist/browser/content/PdfViewer.js.map +1 -1
- package/dist/browser/content/ProgressPath.js +101 -0
- package/dist/browser/content/ProgressPath.js.map +1 -0
- package/dist/browser/content/Timeline.js +1 -1
- package/dist/browser/content/Timeline.js.map +1 -1
- package/dist/browser/content/chart-tick-room.js +59 -0
- package/dist/browser/content/chart-tick-room.js.map +1 -0
- package/dist/browser/content/index.js +1 -0
- package/dist/browser/content/index.js.map +1 -1
- package/dist/browser/content/pdf-viewer-engine.js +1 -1
- package/dist/browser/feedback/HoverCard.js +535 -0
- package/dist/browser/feedback/HoverCard.js.map +1 -0
- package/dist/browser/feedback/Tooltip.js +5 -2
- package/dist/browser/feedback/Tooltip.js.map +1 -1
- package/dist/browser/feedback/dialog-core.js +12 -8
- package/dist/browser/feedback/dialog-core.js.map +1 -1
- package/dist/browser/feedback/index.js +1 -0
- package/dist/browser/feedback/index.js.map +1 -1
- package/dist/browser/feedback/prompt-confirm.js +3 -17
- package/dist/browser/feedback/prompt-confirm.js.map +1 -1
- package/dist/browser/feedback/prompt-sheet-view.js +95 -0
- package/dist/browser/feedback/prompt-sheet-view.js.map +1 -0
- package/dist/browser/feedback/prompt-sheet.js +36 -0
- package/dist/browser/feedback/prompt-sheet.js.map +1 -0
- package/dist/browser/feedback/prompts.js +14 -38
- package/dist/browser/feedback/prompts.js.map +1 -1
- package/dist/browser/feedback/toast.js +17 -12
- package/dist/browser/feedback/toast.js.map +1 -1
- package/dist/browser/internal/anchor-placement.js +38 -0
- package/dist/browser/internal/anchor-placement.js.map +1 -0
- package/dist/browser/internal/portal-scope.js +36 -0
- package/dist/browser/internal/portal-scope.js.map +1 -0
- package/dist/browser/internal/portal.js +13 -10
- package/dist/browser/internal/portal.js.map +1 -1
- package/dist/browser/intl/messages.js +10 -0
- package/dist/browser/intl/messages.js.map +1 -1
- package/dist/browser/layout/AnchoredPopover.js +10 -25
- package/dist/browser/layout/AnchoredPopover.js.map +1 -1
- package/dist/browser/layout/BottomSheet.js +1 -12
- package/dist/browser/layout/BottomSheet.js.map +1 -1
- package/dist/browser/layout/Discussion.js +298 -3
- package/dist/browser/layout/Discussion.js.map +1 -1
- package/dist/browser/layout/FloatingWindow.js +124 -75
- package/dist/browser/layout/FloatingWindow.js.map +1 -1
- package/dist/browser/layout/Panes.js +643 -212
- package/dist/browser/layout/Panes.js.map +1 -1
- package/dist/browser/layout/index.js +1 -1
- package/dist/browser/layout/index.js.map +1 -1
- package/dist/browser/layout/panes-layout.js +169 -0
- package/dist/browser/layout/panes-layout.js.map +1 -1
- package/dist/browser/layout/panes-messages.js +108 -2
- package/dist/browser/layout/panes-messages.js.map +1 -1
- package/dist/browser/layout/panes-preview-scope.js +9 -0
- package/dist/browser/layout/panes-preview-scope.js.map +1 -0
- package/dist/browser/layout/sheet-handle.js +173 -37
- package/dist/browser/layout/sheet-handle.js.map +1 -1
- package/dist/browser/layout/sheet-motion.js +38 -5
- package/dist/browser/layout/sheet-motion.js.map +1 -1
- package/dist/browser/panes.js +3 -0
- package/dist/browser/panes.js.map +1 -0
- package/dist/browser/surfaces/ChangeList.js +78 -16
- package/dist/browser/surfaces/ChangeList.js.map +1 -1
- package/dist/browser/surfaces/DotStrip.js +126 -41
- package/dist/browser/surfaces/DotStrip.js.map +1 -1
- package/dist/browser/surfaces/LinkCard.js +69 -16
- package/dist/browser/surfaces/LinkCard.js.map +1 -1
- package/dist/ssr/actions/ContextMenu.js +1 -0
- package/dist/ssr/actions/ContextMenu.js.map +1 -1
- package/dist/ssr/actions/Dropdown.js +4 -4
- package/dist/ssr/actions/Dropdown.js.map +1 -1
- package/dist/ssr/actions/Tabs.js +21 -6
- package/dist/ssr/actions/Tabs.js.map +1 -1
- package/dist/ssr/actions/Toolbar.js +24 -18
- package/dist/ssr/actions/Toolbar.js.map +1 -1
- package/dist/ssr/actions/ViewTabs.js +27 -20
- package/dist/ssr/actions/ViewTabs.js.map +1 -1
- package/dist/ssr/actions/drag-and-drop.js +2 -1
- package/dist/ssr/actions/drag-and-drop.js.map +1 -1
- package/dist/ssr/actions/menu-rows.js +1 -1
- package/dist/ssr/actions/menu-rows.js.map +1 -1
- package/dist/ssr/charts/core/snapshot.js +3 -1
- package/dist/ssr/charts/core/snapshot.js.map +1 -1
- package/dist/ssr/chat/ChatComposer.js +250 -142
- package/dist/ssr/chat/ChatComposer.js.map +1 -1
- package/dist/ssr/chat/ChatContextPopup.js +17 -1
- package/dist/ssr/chat/ChatContextPopup.js.map +1 -1
- package/dist/ssr/chat/ChatPrimitives.js +179 -51
- package/dist/ssr/chat/ChatPrimitives.js.map +1 -1
- package/dist/ssr/chat/ChatTasks.js +117 -27
- package/dist/ssr/chat/ChatTasks.js.map +1 -1
- package/dist/ssr/chat/ChatTimeline.js +5 -3
- package/dist/ssr/chat/ChatTimeline.js.map +1 -1
- package/dist/ssr/chat/chat-behavior.js +12 -0
- package/dist/ssr/chat/chat-behavior.js.map +1 -1
- package/dist/ssr/chat/chat-messages.js +50 -2
- package/dist/ssr/chat/chat-messages.js.map +1 -1
- package/dist/ssr/chat/index.js +2 -1
- package/dist/ssr/chat/index.js.map +1 -1
- package/dist/ssr/chat/types.js.map +1 -1
- package/dist/ssr/content/Calendar.js +2 -2
- package/dist/ssr/content/Calendar.js.map +1 -1
- package/dist/ssr/content/CalendarWeekView.js +9 -2
- package/dist/ssr/content/CalendarWeekView.js.map +1 -1
- package/dist/ssr/content/ChartRoot.js +4 -1
- package/dist/ssr/content/ChartRoot.js.map +1 -1
- package/dist/ssr/content/DataTable.js +9 -0
- package/dist/ssr/content/DataTable.js.map +1 -1
- package/dist/ssr/content/Lightbox.js +2 -2
- package/dist/ssr/content/Lightbox.js.map +1 -1
- package/dist/ssr/content/PdfPages.js +160 -44
- package/dist/ssr/content/PdfPages.js.map +1 -1
- package/dist/ssr/content/PdfViewer.js +40 -8
- package/dist/ssr/content/PdfViewer.js.map +1 -1
- package/dist/ssr/content/ProgressPath.js +51 -0
- package/dist/ssr/content/ProgressPath.js.map +1 -0
- package/dist/ssr/content/Timeline.js +1 -1
- package/dist/ssr/content/Timeline.js.map +1 -1
- package/dist/ssr/content/chart-tick-room.js +59 -0
- package/dist/ssr/content/chart-tick-room.js.map +1 -0
- package/dist/ssr/content/index.js +1 -0
- package/dist/ssr/content/index.js.map +1 -1
- package/dist/ssr/feedback/HoverCard.js +473 -0
- package/dist/ssr/feedback/HoverCard.js.map +1 -0
- package/dist/ssr/feedback/Tooltip.js +5 -2
- package/dist/ssr/feedback/Tooltip.js.map +1 -1
- package/dist/ssr/feedback/dialog-core.js +12 -8
- package/dist/ssr/feedback/dialog-core.js.map +1 -1
- package/dist/ssr/feedback/index.js +1 -0
- package/dist/ssr/feedback/index.js.map +1 -1
- package/dist/ssr/feedback/prompt-confirm.js +3 -17
- package/dist/ssr/feedback/prompt-confirm.js.map +1 -1
- package/dist/ssr/feedback/prompt-sheet-view.js +61 -0
- package/dist/ssr/feedback/prompt-sheet-view.js.map +1 -0
- package/dist/ssr/feedback/prompt-sheet.js +36 -0
- package/dist/ssr/feedback/prompt-sheet.js.map +1 -0
- package/dist/ssr/feedback/prompts.js +14 -38
- package/dist/ssr/feedback/prompts.js.map +1 -1
- package/dist/ssr/feedback/toast.js +17 -12
- package/dist/ssr/feedback/toast.js.map +1 -1
- package/dist/ssr/internal/anchor-placement.js +38 -0
- package/dist/ssr/internal/anchor-placement.js.map +1 -0
- package/dist/ssr/internal/portal-scope.js +36 -0
- package/dist/ssr/internal/portal-scope.js.map +1 -0
- package/dist/ssr/internal/portal.js +13 -10
- package/dist/ssr/internal/portal.js.map +1 -1
- package/dist/ssr/intl/messages.js +10 -0
- package/dist/ssr/intl/messages.js.map +1 -1
- package/dist/ssr/layout/AnchoredPopover.js +10 -25
- package/dist/ssr/layout/AnchoredPopover.js.map +1 -1
- package/dist/ssr/layout/BottomSheet.js +1 -12
- package/dist/ssr/layout/BottomSheet.js.map +1 -1
- package/dist/ssr/layout/Discussion.js +168 -2
- package/dist/ssr/layout/Discussion.js.map +1 -1
- package/dist/ssr/layout/FloatingWindow.js +39 -15
- package/dist/ssr/layout/FloatingWindow.js.map +1 -1
- package/dist/ssr/layout/Panes.js +399 -41
- package/dist/ssr/layout/Panes.js.map +1 -1
- package/dist/ssr/layout/index.js +1 -1
- package/dist/ssr/layout/index.js.map +1 -1
- package/dist/ssr/layout/panes-layout.js +169 -0
- package/dist/ssr/layout/panes-layout.js.map +1 -1
- package/dist/ssr/layout/panes-messages.js +108 -2
- package/dist/ssr/layout/panes-messages.js.map +1 -1
- package/dist/ssr/layout/panes-preview-scope.js +9 -0
- package/dist/ssr/layout/panes-preview-scope.js.map +1 -0
- package/dist/ssr/layout/sheet-handle.js +173 -37
- package/dist/ssr/layout/sheet-handle.js.map +1 -1
- package/dist/ssr/layout/sheet-motion.js +38 -5
- package/dist/ssr/layout/sheet-motion.js.map +1 -1
- package/dist/ssr/panes.js +3 -0
- package/dist/ssr/panes.js.map +1 -0
- package/dist/ssr/surfaces/ChangeList.js +37 -5
- package/dist/ssr/surfaces/ChangeList.js.map +1 -1
- package/dist/ssr/surfaces/DotStrip.js +75 -12
- package/dist/ssr/surfaces/DotStrip.js.map +1 -1
- package/dist/ssr/surfaces/LinkCard.js +46 -7
- package/dist/ssr/surfaces/LinkCard.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/types/actions/Dropdown.d.ts +4 -3
- package/dist/types/actions/Tabs.d.ts +9 -0
- package/dist/types/actions/ViewTabs.d.ts +2 -0
- package/dist/types/chat/ChatComposer.d.ts +24 -2
- package/dist/types/chat/ChatPrimitives.d.ts +6 -1
- package/dist/types/chat/ChatTasks.d.ts +14 -1
- package/dist/types/chat/chat-behavior.d.ts +14 -0
- package/dist/types/chat/chat-messages.d.ts +24 -0
- package/dist/types/chat/index.d.ts +5 -4
- package/dist/types/chat/types.d.ts +27 -0
- package/dist/types/content/PdfPages.d.ts +8 -3
- package/dist/types/content/PdfViewer.d.ts +12 -4
- package/dist/types/content/ProgressPath.d.ts +25 -0
- package/dist/types/content/chart-tick-room.d.ts +15 -0
- package/dist/types/content/index.d.ts +1 -0
- package/dist/types/feedback/HoverCard.d.ts +44 -0
- package/dist/types/feedback/Tooltip.d.ts +5 -0
- package/dist/types/feedback/index.d.ts +2 -0
- package/dist/types/feedback/prompt-confirm.d.ts +0 -2
- package/dist/types/feedback/prompt-sheet-view.d.ts +3 -0
- package/dist/types/feedback/prompt-sheet.d.ts +20 -0
- package/dist/types/feedback/toast.d.ts +5 -1
- package/dist/types/internal/anchor-placement.d.ts +23 -0
- package/dist/types/internal/portal-scope.d.ts +11 -0
- package/dist/types/internal/portal.d.ts +1 -1
- package/dist/types/intl/messages.d.ts +5 -0
- package/dist/types/layout/BottomSheet.d.ts +1 -5
- package/dist/types/layout/Discussion.d.ts +25 -0
- package/dist/types/layout/FloatingWindow.d.ts +6 -0
- package/dist/types/layout/Panes.d.ts +21 -0
- package/dist/types/layout/index.d.ts +3 -3
- package/dist/types/layout/panes-layout.d.ts +51 -0
- package/dist/types/layout/panes-messages.d.ts +55 -0
- package/dist/types/layout/panes-preview-scope.d.ts +2 -0
- package/dist/types/layout/sheet-handle.d.ts +17 -8
- package/dist/types/layout/sheet-motion.d.ts +5 -0
- package/dist/types/panes.d.ts +2 -0
- package/dist/types/surfaces/ChangeList.d.ts +23 -4
- package/dist/types/surfaces/DotStrip.d.ts +25 -5
- package/dist/types/surfaces/LinkCard.d.ts +13 -0
- package/package.json +8 -2
|
@@ -38,6 +38,12 @@ export type FloatingWindowProps = {
|
|
|
38
38
|
minWidth?: number;
|
|
39
39
|
minHeight?: number;
|
|
40
40
|
accent?: string;
|
|
41
|
+
/**
|
|
42
|
+
* `text` names the size control beside its icon ("Maximize" / "Restore size"), for a window whose size changes what
|
|
43
|
+
* it shows, such as a composer that spreads out into panes when large. The control keeps one width in both states.
|
|
44
|
+
* Defaults to `icon`.
|
|
45
|
+
*/
|
|
46
|
+
sizeControl?: "icon" | "text";
|
|
41
47
|
class?: string;
|
|
42
48
|
resolveScope?: () => HTMLElement | null | undefined;
|
|
43
49
|
};
|
|
@@ -11,14 +11,35 @@ export type PanesItem = {
|
|
|
11
11
|
export type PanesProps = {
|
|
12
12
|
layout: PanesLayout;
|
|
13
13
|
onLayoutChange: (layout: PanesLayout) => void;
|
|
14
|
+
/**
|
|
15
|
+
* The person chose an item: a click, focus, or work in its pane. Below `PANES_NARROW_WIDTH` this is the only report,
|
|
16
|
+
* because the narrow row of tabs never changes the stored layout; an application that names the front item in its
|
|
17
|
+
* URL or keeps it across devices listens here.
|
|
18
|
+
*/
|
|
19
|
+
onActivate?: (itemId: string) => void;
|
|
14
20
|
items: readonly PanesItem[];
|
|
15
21
|
movable?: boolean;
|
|
16
22
|
resizable?: boolean;
|
|
17
23
|
split?: false | "horizontal" | "vertical" | "both";
|
|
18
24
|
onAddItem?: (targetItemId: string | null) => void;
|
|
25
|
+
/**
|
|
26
|
+
* The application's own arrangement. "Reset arrangement" in the Arrange menu returns to it, choosing its preset
|
|
27
|
+
* restores its sizes, and a double click on a boundary restores that boundary's size.
|
|
28
|
+
*/
|
|
29
|
+
defaultLayout?: PanesLayout;
|
|
30
|
+
/**
|
|
31
|
+
* The one-time hint at the first tab grip that panes can be arranged. The application decides on the server
|
|
32
|
+
* whether it was seen and stores the dismissal, so a dismissed hint never renders again.
|
|
33
|
+
*/
|
|
34
|
+
arrangeHint?: {
|
|
35
|
+
open: boolean;
|
|
36
|
+
onDismiss: () => void;
|
|
37
|
+
};
|
|
19
38
|
ariaLabel?: string;
|
|
20
39
|
class?: string;
|
|
21
40
|
};
|
|
41
|
+
/** Below this width of its own container, Panes shows every item as one row of tabs and never stores that. */
|
|
42
|
+
export declare const PANES_NARROW_WIDTH = 640;
|
|
22
43
|
type DropMeta = {
|
|
23
44
|
target: PanesDropTarget;
|
|
24
45
|
label: string;
|
|
@@ -18,7 +18,7 @@ export { default as DetailPanel } from "./DetailPanel";
|
|
|
18
18
|
export type { DetailAccessEntry, DetailAccessProps, DetailLinkItem, DetailLinksProps, DetailPresencePerson, DetailPresenceProps, DetailPresenceState, DetailPropertiesProps, DetailProperty, DetailTag, DetailTagsProps, } from "./DetailSections";
|
|
19
19
|
export { DetailAccess, DetailLinks, DetailPresence, DetailPresenceSlot, DetailProperties, DetailTags } from "./DetailSections";
|
|
20
20
|
export { DETAILS_ICON, DetailsToggle, type DetailsToggleProps } from "./DetailsToggle";
|
|
21
|
-
export type { DiscussionComposerProps, DiscussionItemProps, DiscussionListProps, DiscussionProps } from "./Discussion";
|
|
21
|
+
export type { DiscussionComposerProps, DiscussionItemProps, DiscussionListProps, DiscussionProps, DiscussionThreadProps, } from "./Discussion";
|
|
22
22
|
export { default as Discussion } from "./Discussion";
|
|
23
23
|
export type { FloatingWindowClose, FloatingWindowProps, FloatingWindowState, OpenFloatingWindowOptions, } from "./FloatingWindow";
|
|
24
24
|
export { default as FloatingWindow, type FloatingWindowBounds, type FloatingWindowRect, fitFloatingWindowRect, openFloatingWindow, } from "./FloatingWindow";
|
|
@@ -38,8 +38,8 @@ export { PersonPopover, type PersonPopoverAction, type PersonPopoverError, type
|
|
|
38
38
|
export type { PullToRefreshProps, PullToRefreshState } from "./PullToRefresh";
|
|
39
39
|
export { default as PullToRefresh } from "./PullToRefresh";
|
|
40
40
|
export { installPageTitleController } from "./page-title-controller";
|
|
41
|
-
export type { AddPanesItemOptions, PanesDirection, PanesGroup, PanesIntent, PanesLayout, PanesNode, PanesPath, PanesPathSegment, PanesSide, PanesSplit, } from "./panes-layout";
|
|
42
|
-
export { activatePanesItem, addPanesItem, applyPanesIntent, createPanesLayout, isPanesItemVisible, PANES_LAYOUT_VERSION, parsePanesLayout, reconcilePanesLayout, removePanesItem, resizePanesSplit, } from "./panes-layout";
|
|
41
|
+
export type { AddPanesItemOptions, PanesDirection, PanesGroup, PanesIntent, PanesLayout, PanesNode, PanesPath, PanesPathSegment, PanesPreset, PanesSide, PanesSplit, } from "./panes-layout";
|
|
42
|
+
export { activatePanesItem, addPanesItem, applyPanesIntent, applyPanesPreset, createPanesLayout, isPanesItemVisible, PANES_LAYOUT_VERSION, parsePanesLayout, reconcilePanesLayout, removePanesItem, resizePanesSplit, } from "./panes-layout";
|
|
43
43
|
export { default as ResizeSeparator, type ResizeSeparatorProps } from "./ResizeSeparator";
|
|
44
44
|
export { attachResizeSeparator, type ResizeSeparatorOptions } from "./resize-separator";
|
|
45
45
|
export type { ScrollAreaProps } from "./ScrollArea";
|
|
@@ -61,3 +61,54 @@ export declare const reconcilePanesLayout: (layout: PanesLayout, desiredOpenItem
|
|
|
61
61
|
export declare const resizePanesSplit: (layout: PanesLayout, path: PanesPath, ratio: number) => PanesLayout;
|
|
62
62
|
export declare const samePanesIntent: (left: PanesIntent | null, right: PanesIntent | null) => boolean;
|
|
63
63
|
export declare const getPanesDropTargets: (layout: PanesLayout, itemId: string, options: PanesDropTargetOptions) => PanesDropTarget[];
|
|
64
|
+
/** The item IDs of a layout in tree order: left before right, top before bottom, tabs in their order. */
|
|
65
|
+
export declare const panesItemOrder: (layout: PanesLayout) => string[];
|
|
66
|
+
/** Whether two layouts place the same items the same way, regardless of split ratios and active tabs. */
|
|
67
|
+
export declare const samePanesArrangement: (left: PanesLayout, right: PanesLayout) => boolean;
|
|
68
|
+
/** Whether two layouts place the same items the same way with the same split ratios, regardless of active tabs. */
|
|
69
|
+
export declare const samePanesSizes: (left: PanesLayout, right: PanesLayout) => boolean;
|
|
70
|
+
/** The named arrangements offered by the Arrange menu. */
|
|
71
|
+
export declare const PANES_PRESETS: readonly ["two", "three", "stacked", "tabs"];
|
|
72
|
+
export type PanesPreset = (typeof PANES_PRESETS)[number];
|
|
73
|
+
/** Whether `preset` can arrange `count` items when only the `split` directions are allowed. */
|
|
74
|
+
export declare const canApplyPanesPreset: (preset: PanesPreset, count: number, split: PanesDropTargetOptions["split"]) => boolean;
|
|
75
|
+
/**
|
|
76
|
+
* Arranges `itemIds`, in this order, as a named preset: `two` puts the first item beside the rest as tabs, `three`
|
|
77
|
+
* puts the first two items beside the rest, `stacked` puts the first item beside the second above the rest, and
|
|
78
|
+
* `tabs` keeps every item in one group. `active` stays the visible tab of its group. A `fallback` layout with the
|
|
79
|
+
* same arrangement lends its split ratios, so choosing an application's default arrangement restores its sizes.
|
|
80
|
+
* Returns `null` when there are too few items.
|
|
81
|
+
*/
|
|
82
|
+
export declare const applyPanesPreset: (preset: PanesPreset, itemIds: readonly string[], options?: {
|
|
83
|
+
active?: string;
|
|
84
|
+
fallback?: PanesLayout;
|
|
85
|
+
}) => PanesLayout | null;
|
|
86
|
+
/** The preset whose arrangement `layout` has for `itemIds`, if any. */
|
|
87
|
+
export declare const getPanesPreset: (layout: PanesLayout, itemIds: readonly string[]) => PanesPreset | null;
|
|
88
|
+
/** The split ratio at `path` in `layout`, when a split with that direction is there. */
|
|
89
|
+
export declare const getPanesSplitRatio: (layout: PanesLayout | undefined, path: PanesPath, direction: PanesDirection) => number | null;
|
|
90
|
+
/**
|
|
91
|
+
* One group with every item in tree order, for a container too narrow for side-by-side panes. It is shown, never
|
|
92
|
+
* stored: the stored layout stays as it is and returns once the container is wide enough again.
|
|
93
|
+
*/
|
|
94
|
+
export declare const projectPanesLayout: (layout: PanesLayout, active: string | null) => PanesLayout;
|
|
95
|
+
export type PanesMove = {
|
|
96
|
+
kind: "split";
|
|
97
|
+
side: PanesSide;
|
|
98
|
+
targetItemId: string;
|
|
99
|
+
intent: PanesIntent;
|
|
100
|
+
} | {
|
|
101
|
+
kind: "group";
|
|
102
|
+
targetItemId: string;
|
|
103
|
+
intent: PanesIntent;
|
|
104
|
+
} | {
|
|
105
|
+
kind: "tab";
|
|
106
|
+
direction: "previous" | "next";
|
|
107
|
+
intent: PanesIntent;
|
|
108
|
+
};
|
|
109
|
+
/**
|
|
110
|
+
* Every place `itemId` can move to, as menu entries: each drop target that changes the arrangement, with the tab
|
|
111
|
+
* order inside its own group as one step to either side. Positions inside another group's tab row are reached by
|
|
112
|
+
* joining that group, then stepping.
|
|
113
|
+
*/
|
|
114
|
+
export declare const getPanesMoves: (layout: PanesLayout, itemId: string, options: PanesDropTargetOptions) => PanesMove[];
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
type Side = "left" | "right" | "top" | "bottom";
|
|
2
|
+
type Preset = "two" | "three" | "stacked" | "tabs";
|
|
1
3
|
declare const panesMessages: import("@k2b/stdlib").Catalog<{
|
|
2
4
|
addPane: string;
|
|
3
5
|
addToNamed: ({ name }: {
|
|
@@ -14,6 +16,59 @@ declare const panesMessages: import("@k2b/stdlib").Catalog<{
|
|
|
14
16
|
paneTabs: string;
|
|
15
17
|
paneWorkspace: string;
|
|
16
18
|
resizePanes: string;
|
|
19
|
+
resizeHint: ({ direction }: {
|
|
20
|
+
direction: "horizontal" | "vertical";
|
|
21
|
+
}) => string;
|
|
22
|
+
noPane: string;
|
|
23
|
+
arrange: string;
|
|
24
|
+
arrangement: string;
|
|
25
|
+
preset: ({ preset }: {
|
|
26
|
+
preset: Preset;
|
|
27
|
+
}) => string;
|
|
28
|
+
moveNamed: ({ name }: {
|
|
29
|
+
name: string;
|
|
30
|
+
}) => string;
|
|
31
|
+
moveBeside: ({ side, name }: {
|
|
32
|
+
side: Side;
|
|
33
|
+
name: string;
|
|
34
|
+
}) => string;
|
|
35
|
+
moveIntoGroup: ({ name }: {
|
|
36
|
+
name: string;
|
|
37
|
+
}) => string;
|
|
38
|
+
moveTabPrevious: string;
|
|
39
|
+
moveTabNext: string;
|
|
40
|
+
ctrlKey: string;
|
|
41
|
+
resetArrangement: string;
|
|
42
|
+
arrangeNote: string;
|
|
43
|
+
arrangeHint: string;
|
|
44
|
+
arrangeHintDetail: string;
|
|
45
|
+
moved: ({ name, place }: {
|
|
46
|
+
name: string;
|
|
47
|
+
place: string;
|
|
48
|
+
}) => string;
|
|
49
|
+
arranged: ({ preset }: {
|
|
50
|
+
preset: string;
|
|
51
|
+
}) => string;
|
|
52
|
+
pickedUp: ({ name }: {
|
|
53
|
+
name: string;
|
|
54
|
+
}) => string;
|
|
55
|
+
dragOver: ({ name, place }: {
|
|
56
|
+
name: string;
|
|
57
|
+
place: string;
|
|
58
|
+
}) => string;
|
|
59
|
+
notOverPane: ({ name }: {
|
|
60
|
+
name: string;
|
|
61
|
+
}) => string;
|
|
62
|
+
dropped: ({ name, place }: {
|
|
63
|
+
name: string;
|
|
64
|
+
place: string;
|
|
65
|
+
}) => string;
|
|
66
|
+
notMoved: ({ name }: {
|
|
67
|
+
name: string;
|
|
68
|
+
}) => string;
|
|
69
|
+
cancelled: ({ name }: {
|
|
70
|
+
name: string;
|
|
71
|
+
}) => string;
|
|
17
72
|
}>;
|
|
18
73
|
export type PanesMessages = ReturnType<(typeof panesMessages)["resolve"]>["t"];
|
|
19
74
|
/** Resolved from the inherited render locale. */
|
|
@@ -1,21 +1,30 @@
|
|
|
1
1
|
export type SheetHandleOptions = {
|
|
2
|
-
/**
|
|
2
|
+
/**
|
|
3
|
+
* The sheet the handle sits on, anchored at its bottom edge. It carries the current detent in `data-sheet-detent`.
|
|
4
|
+
* Its container clips with `overflow: clip`, so the part that slides below the edge never scrolls into view.
|
|
5
|
+
*/
|
|
3
6
|
sheet: HTMLElement;
|
|
4
7
|
/** The detents' names, lowest first. The stylesheet gives each `[data-sheet-detent="…"]` its height. */
|
|
5
8
|
detents: readonly string[];
|
|
6
9
|
/** The detent the stylesheet draws while the sheet has no `data-sheet-detent`, such as in the server's markup. */
|
|
7
10
|
initial: string;
|
|
8
|
-
/**
|
|
11
|
+
/** When a drag or a press sends the sheet to another detent, as it starts to glide, for example to rename the handle. */
|
|
9
12
|
onChange?: (detent: string) => void;
|
|
10
|
-
/**
|
|
13
|
+
/**
|
|
14
|
+
* Without it, a drag stops at the lowest detent; with it, a drag well below that detent slides the sheet out and
|
|
15
|
+
* then asks to close. When the sheet is still shown afterwards, as when the owner asks first, it returns.
|
|
16
|
+
*/
|
|
11
17
|
onDismiss?: () => void;
|
|
12
18
|
};
|
|
13
19
|
/**
|
|
14
20
|
* Lets a sheet's handle drag it between detents. The handle stays a button: a press, by pointer, Enter or Space,
|
|
15
|
-
* moves the sheet to the next detent up, and from the highest back to the lowest.
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
21
|
+
* moves the sheet to the next detent up, and from the highest back to the lowest.
|
|
22
|
+
*
|
|
23
|
+
* The sheet moves by transform only, like `BottomSheet`. When a drag or a glide starts, its layout height is pinned
|
|
24
|
+
* at the highest detent and a transform shows the visible part; the content inside does not lay out again on every
|
|
25
|
+
* frame. A release glides to the detent nearest to where the pointer's speed would carry it; then the stylesheet's
|
|
26
|
+
* height for that detent takes over in one step that looks the same. Reduced motion makes every glide instant. The
|
|
27
|
+
* stylesheet owns every resting height, which keeps the server's first frame and a rotation correct without script;
|
|
28
|
+
* it must not transition `height`.
|
|
20
29
|
*/
|
|
21
30
|
export declare function attachSheetHandle(handle: HTMLElement, options: SheetHandleOptions): () => void;
|
|
@@ -22,6 +22,11 @@ export type SheetMotion = {
|
|
|
22
22
|
step: (direction: "up" | "down") => void;
|
|
23
23
|
dispose: () => void;
|
|
24
24
|
};
|
|
25
|
+
/** Initial focus goes to the first input of the top sheet, otherwise to the
|
|
26
|
+
* dialog element itself. Native `showModal()` focuses the first focusable
|
|
27
|
+
* descendant, which is the drag handle; iOS shows a ring for that programmatic
|
|
28
|
+
* focus, so the sheet moves it to the ring-less dialog before the next paint. */
|
|
29
|
+
export declare const sheetInitialFocus: (dialog: HTMLDialogElement) => HTMLElement;
|
|
25
30
|
/**
|
|
26
31
|
* Moves a bottom sheet with transform and opacity only. Its layout height is fixed when it opens (the content's height,
|
|
27
32
|
* or the full height with detents) and never animates; the sheet slides by `--k2b-sheet-y`, the footer stays on the
|
|
@@ -1,20 +1,39 @@
|
|
|
1
1
|
import { type JSX } from "solid-js";
|
|
2
|
-
/**
|
|
3
|
-
|
|
2
|
+
/**
|
|
3
|
+
* `add` gains something, `change` alters it, `remove` takes it away, `same` stays as it is, `neutral` names a
|
|
4
|
+
* setting, `warning` has a consequence for others.
|
|
5
|
+
*/
|
|
6
|
+
export type ChangeTone = "add" | "change" | "remove" | "same" | "neutral" | "warning";
|
|
7
|
+
/** A short quiet word at the end of a line, such as "new", "dropped", or "needs approval". */
|
|
8
|
+
export type ChangeMark = {
|
|
9
|
+
label: string;
|
|
10
|
+
/** A Tabler icon class before the word. */
|
|
11
|
+
icon?: string;
|
|
12
|
+
/** `new` takes the action colour, `gone` an outline; `neutral`, the default, a quiet grey. */
|
|
13
|
+
tone?: "new" | "gone" | "neutral";
|
|
14
|
+
};
|
|
4
15
|
export type ChangeListItem = {
|
|
5
16
|
tone: ChangeTone;
|
|
6
|
-
/** A Tabler icon class; defaults to plus, arrows or minus by tone. */
|
|
17
|
+
/** A Tabler icon class; defaults to plus, arrows or minus by tone. With `marker="sign"` the sign stays. */
|
|
7
18
|
icon?: string;
|
|
8
19
|
content: JSX.Element;
|
|
9
20
|
/** One quiet line under the content, such as what the change means for others. */
|
|
10
21
|
detail?: JSX.Element;
|
|
22
|
+
/** Words at the end of the line, such as which change needs approval. */
|
|
23
|
+
marks?: readonly ChangeMark[];
|
|
11
24
|
};
|
|
12
25
|
export type ChangeListProps = {
|
|
13
26
|
items: readonly ChangeListItem[];
|
|
14
27
|
/** Names the list for assistive technology, such as "What changes". */
|
|
15
28
|
label: string;
|
|
29
|
+
/**
|
|
30
|
+
* `icon`, the default: a round icon chip per line, for pending edits beside a save action. `sign`: a bare sign on
|
|
31
|
+
* one text edge, `+` in the action colour for something new, `−` for something gone, `=` for what stays, for a
|
|
32
|
+
* comparison such as what a new version may do.
|
|
33
|
+
*/
|
|
34
|
+
marker?: "icon" | "sign";
|
|
16
35
|
class?: string;
|
|
17
36
|
};
|
|
18
|
-
/**
|
|
37
|
+
/** Changes, one line each, so a person can check them in one look: pending edits, or what a new version changes. */
|
|
19
38
|
export declare function ChangeList(props: ChangeListProps): JSX.Element;
|
|
20
39
|
export default ChangeList;
|
|
@@ -1,22 +1,42 @@
|
|
|
1
1
|
import { type JSX } from "solid-js";
|
|
2
|
-
/**
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
/**
|
|
3
|
+
* `accent` = the app colour (it worked), `success` = it worked, in the success colour, `ai` = came from AI,
|
|
4
|
+
* `warning` = skipped or needs a look, `danger` = failed, `muted` = nothing to do, `running` = runs now.
|
|
5
|
+
*/
|
|
6
|
+
export type DotStripTone = "accent" | "success" | "warning" | "danger" | "ai" | "muted" | "running";
|
|
7
|
+
type DotStripBase = {
|
|
5
8
|
/** Outcomes in order, left to right. */
|
|
6
9
|
dots: readonly DotStripTone[];
|
|
7
|
-
/** Total slots. Slots after `dots` show as empty
|
|
10
|
+
/** Total slots. Slots after `dots` show as empty places, so a growing strip keeps its size. Defaults to `dots.length`. */
|
|
8
11
|
length?: number;
|
|
9
12
|
/** Shows every slot as a quiet placeholder, for "nothing checked yet". */
|
|
10
13
|
waiting?: boolean;
|
|
11
14
|
/** Index of the dot that belongs to the item shown next to the strip. */
|
|
12
15
|
selected?: number | null;
|
|
13
16
|
size?: "md" | "lg";
|
|
17
|
+
/**
|
|
18
|
+
* `dot`, the default: round marks whose shape follows the state, so colour is never the only sign. `bar`: upright
|
|
19
|
+
* bars, 5 × 22 px at `lg`, as for the last runs beside a time. `slot`: square places, as for the places of a runner.
|
|
20
|
+
*/
|
|
21
|
+
variant?: "dot" | "bar" | "slot";
|
|
14
22
|
/** Dots per row; more wrap into further rows of the same width. Defaults to one row. */
|
|
15
23
|
columns?: number;
|
|
16
24
|
/** Names the strip and its counts, for example "Last 50 mails: 17 matched, 6 skipped, 27 not". */
|
|
17
25
|
label: string;
|
|
18
26
|
class?: string;
|
|
19
27
|
};
|
|
20
|
-
|
|
28
|
+
export type DotStripProps = DotStripBase & ({
|
|
29
|
+
links?: undefined;
|
|
30
|
+
dotLabels?: undefined;
|
|
31
|
+
} | {
|
|
32
|
+
/**
|
|
33
|
+
* One link per dot, such as the run it stands for; a dot without a link stays a named mark. The strip is then a
|
|
34
|
+
* list with one tab stop: arrow keys, Home, and End move between the links.
|
|
35
|
+
*/
|
|
36
|
+
links: readonly (string | undefined)[];
|
|
37
|
+
/** One accessible name per dot, such as "Run at 14:01: failed". */
|
|
38
|
+
dotLabels: readonly string[];
|
|
39
|
+
});
|
|
40
|
+
/** A fixed-size row of outcome marks: the last runs, checks or mails at a glance, each optionally a link. */
|
|
21
41
|
export declare function DotStrip(props: DotStripProps): JSX.Element;
|
|
22
42
|
export default DotStrip;
|
|
@@ -20,6 +20,19 @@ export type LinkCardProps = {
|
|
|
20
20
|
* hover, no chevron. Put plain cards in `AppOverview.Cards surface="plain"`.
|
|
21
21
|
*/
|
|
22
22
|
surface?: "paper" | "plain";
|
|
23
|
+
/**
|
|
24
|
+
* The card as a small overview of one thing, as on "My apps & automations": `aside` stands top right beside the
|
|
25
|
+
* title, such as a strip of the last runs; `body` is a line under the head, such as what it did last; `footer` is
|
|
26
|
+
* the last line, `start` (a state with its sign) and `end` (a quiet time). Any of them stacks the card: head, body,
|
|
27
|
+
* and footer one below the other, the footer on the card's bottom edge, a 10 px radius, and no chevron. The whole
|
|
28
|
+
* card stays one link, so these places hold text and marks, never links or buttons.
|
|
29
|
+
*/
|
|
30
|
+
aside?: JSX.Element;
|
|
31
|
+
body?: JSX.Element;
|
|
32
|
+
footer?: {
|
|
33
|
+
start?: JSX.Element;
|
|
34
|
+
end?: JSX.Element;
|
|
35
|
+
};
|
|
23
36
|
};
|
|
24
37
|
export declare function LinkCard(props: LinkCardProps): JSX.Element;
|
|
25
38
|
export default LinkCard;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@k2b/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.59.0",
|
|
4
4
|
"description": "Production-ready components for SolidJS applications.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -42,6 +42,12 @@
|
|
|
42
42
|
"import": "./dist/ssr/country-map.js",
|
|
43
43
|
"default": "./dist/ssr/country-map.js"
|
|
44
44
|
},
|
|
45
|
+
"./panes": {
|
|
46
|
+
"types": "./dist/types/panes.d.ts",
|
|
47
|
+
"browser": "./dist/browser/panes.js",
|
|
48
|
+
"import": "./dist/ssr/panes.js",
|
|
49
|
+
"default": "./dist/ssr/panes.js"
|
|
50
|
+
},
|
|
45
51
|
"./package.json": "./package.json",
|
|
46
52
|
"./map-glyphs/*": "./map-glyphs/*",
|
|
47
53
|
"./text-editor": {
|
|
@@ -104,7 +110,7 @@
|
|
|
104
110
|
"devDependencies": {
|
|
105
111
|
"@babel/core": "8.1.0",
|
|
106
112
|
"@babel/preset-typescript": "8.0.7",
|
|
107
|
-
"@k2b/ssr": "0.21.
|
|
113
|
+
"@k2b/ssr": "0.21.3",
|
|
108
114
|
"@types/babel__core": "7.20.5",
|
|
109
115
|
"@types/bun": "1.4.2",
|
|
110
116
|
"axe-core": "4.14.0",
|