@stll/ui 0.65.1 → 0.67.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/calendar/day-calendar.d.ts +8 -3
- package/dist/calendar/day-calendar.js +8 -11
- package/dist/calendar/day-calendar.logic.d.ts +0 -2
- package/dist/calendar/day-calendar.logic.js +1 -2
- package/dist/calendar/primitives.d.ts +1 -3
- package/dist/calendar/primitives.js +1 -2
- package/dist/calendar/resource-calendar.d.ts +0 -2
- package/dist/calendar/resource-calendar.js +1 -2
- package/dist/calendar/resource-calendar.logic.d.ts +1 -3
- package/dist/calendar/resource-calendar.logic.js +1 -2
- package/dist/components/accordion.d.ts +0 -2
- package/dist/components/accordion.js +1 -2
- package/dist/components/ai-label.d.ts +0 -2
- package/dist/components/ai-label.js +1 -2
- package/dist/components/alert-dialog.d.ts +0 -2
- package/dist/components/alert-dialog.js +2 -3
- package/dist/components/animated-count.d.ts +0 -2
- package/dist/components/animated-count.js +1 -2
- package/dist/components/animated-preview.css +152 -0
- package/dist/components/animated-preview.d.ts +75 -0
- package/dist/components/animated-preview.js +105 -0
- package/dist/components/application-rail.d.ts +1 -3
- package/dist/components/application-rail.js +2 -3
- package/dist/components/avatar.d.ts +0 -2
- package/dist/components/avatar.js +1 -2
- package/dist/components/badge.d.ts +0 -2
- package/dist/components/badge.js +1 -2
- package/dist/components/bidi-text.d.ts +0 -2
- package/dist/components/bidi-text.js +1 -2
- package/dist/components/brand-icons.d.ts +0 -2
- package/dist/components/brand-icons.js +1 -2
- package/dist/components/breadcrumb.d.ts +0 -2
- package/dist/components/breadcrumb.js +1 -2
- package/dist/components/button.d.ts +0 -2
- package/dist/components/button.js +37 -15
- package/dist/components/button.native-classes.d.ts +0 -2
- package/dist/components/button.native-classes.js +1 -2
- package/dist/components/button.native.d.ts +0 -2
- package/dist/components/button.native.js +1 -2
- package/dist/components/button.shared.d.ts +1 -3
- package/dist/components/button.shared.js +1 -2
- package/dist/components/checkbox.d.ts +0 -2
- package/dist/components/checkbox.js +3 -4
- package/dist/components/collapsible.d.ts +0 -2
- package/dist/components/collapsible.js +1 -2
- package/dist/components/color-picker.d.ts +12 -5
- package/dist/components/color-picker.js +8 -10
- package/dist/components/combobox.d.ts +0 -2
- package/dist/components/combobox.js +5 -6
- package/dist/components/command.d.ts +0 -2
- package/dist/components/command.js +4 -5
- package/dist/components/composer-tokens.d.ts +1 -3
- package/dist/components/composer-tokens.js +1 -2
- package/dist/components/composer.d.ts +0 -2
- package/dist/components/composer.js +2 -3
- package/dist/components/context-menu.d.ts +9 -2
- package/dist/components/context-menu.js +10 -4
- package/dist/components/copy-button.d.ts +0 -2
- package/dist/components/copy-button.js +1 -2
- package/dist/components/court-badge.d.ts +0 -2
- package/dist/components/court-badge.js +1 -2
- package/dist/components/court-filter.d.ts +0 -2
- package/dist/components/court-filter.js +3 -4
- package/dist/components/date-picker-popover.d.ts +0 -2
- package/dist/components/date-picker-popover.js +6 -70
- package/dist/components/date-picker-popover.logic.d.ts +1 -3
- package/dist/components/date-picker-popover.logic.js +1 -2
- package/dist/components/date-range-filter.d.ts +0 -2
- package/dist/components/date-range-filter.js +1 -2
- package/dist/components/destructive-action-confirmation.d.ts +0 -2
- package/dist/components/destructive-action-confirmation.js +2 -3
- package/dist/components/destructive-confirm-dialog.d.ts +0 -2
- package/dist/components/destructive-confirm-dialog.js +1 -2
- package/dist/components/details-grid.d.ts +13 -5
- package/dist/components/details-grid.js +69 -14
- package/dist/components/dialog-form-state.d.ts +1 -3
- package/dist/components/dialog-form-state.js +1 -2
- package/dist/components/dialog.d.ts +0 -2
- package/dist/components/dialog.js +4 -5
- package/dist/components/directional-icon.d.ts +0 -2
- package/dist/components/directional-icon.js +1 -2
- package/dist/components/document-identity-badge.d.ts +0 -2
- package/dist/components/document-identity-badge.js +2 -3
- package/dist/components/document-identity-badge.logic.d.ts +1 -3
- package/dist/components/document-identity-badge.logic.js +1 -2
- package/dist/components/document-mark.d.ts +9 -0
- package/dist/components/document-mark.js +29 -0
- package/dist/components/document-mark.native.d.ts +11 -0
- package/dist/components/document-mark.native.js +36 -0
- package/dist/components/document-mark.shared.d.ts +378 -0
- package/dist/components/document-mark.shared.js +756 -0
- package/dist/components/entity-actions.d.ts +34 -0
- package/dist/components/entity-actions.js +132 -0
- package/dist/components/field.d.ts +0 -2
- package/dist/components/field.js +1 -2
- package/dist/components/file-input.d.ts +0 -2
- package/dist/components/file-input.js +2 -3
- package/dist/components/form.d.ts +0 -2
- package/dist/components/form.js +1 -2
- package/dist/components/frame.d.ts +0 -2
- package/dist/components/frame.js +1 -2
- package/dist/components/hex-color-picker.d.ts +0 -2
- package/dist/components/hex-color-picker.js +2 -3
- package/dist/components/horizontal-scroller.d.ts +0 -2
- package/dist/components/horizontal-scroller.js +3 -4
- package/dist/components/identity-text.d.ts +0 -2
- package/dist/components/identity-text.js +2 -3
- package/dist/components/inline-drop-indicator.d.ts +1 -3
- package/dist/components/inline-drop-indicator.js +1 -2
- package/dist/components/inline-rename.d.ts +0 -2
- package/dist/components/inline-rename.js +2 -3
- package/dist/components/input-control.d.ts +1 -3
- package/dist/components/input-control.js +1 -2
- package/dist/components/input-group.d.ts +0 -2
- package/dist/components/input-group.js +4 -5
- package/dist/components/input-otp.d.ts +0 -2
- package/dist/components/input-otp.js +1 -2
- package/dist/components/input.d.ts +0 -2
- package/dist/components/input.js +3 -4
- package/dist/components/input.native.d.ts +0 -2
- package/dist/components/input.native.js +1 -2
- package/dist/components/input.shared.d.ts +1 -3
- package/dist/components/kbd.d.ts +58 -0
- package/dist/components/kbd.js +90 -0
- package/dist/components/label.d.ts +0 -2
- package/dist/components/label.js +1 -2
- package/dist/components/landing.d.ts +0 -2
- package/dist/components/landing.js +1 -2
- package/dist/components/list.d.ts +0 -2
- package/dist/components/list.js +1 -2
- package/dist/components/loader.d.ts +0 -2
- package/dist/components/loader.js +1 -2
- package/dist/components/loader.native.d.ts +0 -2
- package/dist/components/loader.native.js +1 -2
- package/dist/components/loader.shared.d.ts +1 -3
- package/dist/components/loader.shared.js +1 -2
- package/dist/components/matter-icon.d.ts +0 -2
- package/dist/components/matter-icon.js +2 -3
- package/dist/components/matter-icon.native.d.ts +0 -2
- package/dist/components/matter-icon.native.js +2 -3
- package/dist/components/matter-icon.shared.d.ts +1 -3
- package/dist/components/matter-icon.shared.js +1 -2
- package/dist/components/menu-section.d.ts +0 -2
- package/dist/components/menu-section.js +1 -2
- package/dist/components/menu.d.ts +18 -4
- package/dist/components/menu.js +29 -9
- package/dist/components/middle-truncate.d.ts +0 -2
- package/dist/components/middle-truncate.js +1 -2
- package/dist/components/middle-truncate.logic.d.ts +0 -2
- package/dist/components/middle-truncate.logic.js +1 -2
- package/dist/components/number-input.d.ts +0 -2
- package/dist/components/number-input.js +2 -3
- package/dist/components/outline-rail.d.ts +12 -3
- package/dist/components/outline-rail.js +64 -12
- package/dist/components/outline-rail.logic.d.ts +0 -2
- package/dist/components/outline-rail.logic.js +7 -3
- package/dist/components/pagination.d.ts +0 -2
- package/dist/components/pagination.js +1 -2
- package/dist/components/popover.d.ts +0 -2
- package/dist/components/popover.js +2 -3
- package/dist/components/preview-card.d.ts +0 -2
- package/dist/components/preview-card.js +1 -2
- package/dist/components/preview-pane.d.ts +0 -2
- package/dist/components/preview-pane.js +1 -2
- package/dist/components/prose.d.ts +0 -2
- package/dist/components/prose.js +1 -2
- package/dist/components/scroll-area.d.ts +0 -2
- package/dist/components/scroll-area.js +1 -2
- package/dist/components/scroll-to-top.d.ts +1 -3
- package/dist/components/scroll-to-top.js +1 -2
- package/dist/components/search-field.d.ts +0 -2
- package/dist/components/search-field.js +1 -2
- package/dist/components/secret-input.d.ts +0 -2
- package/dist/components/secret-input.js +1 -2
- package/dist/components/segmented-icon-toggle.d.ts +0 -2
- package/dist/components/segmented-icon-toggle.js +2 -3
- package/dist/components/select.d.ts +0 -2
- package/dist/components/select.js +4 -5
- package/dist/components/separator.d.ts +0 -2
- package/dist/components/separator.js +1 -2
- package/dist/components/separator.native.d.ts +1 -3
- package/dist/components/separator.native.js +1 -2
- package/dist/components/separator.shared.d.ts +1 -3
- package/dist/components/sheet.d.ts +0 -2
- package/dist/components/sheet.js +3 -4
- package/dist/components/sheet.native.d.ts +1 -3
- package/dist/components/sheet.native.js +2 -3
- package/dist/components/sheet.shared.d.ts +1 -3
- package/dist/components/sidebar.d.ts +0 -2
- package/dist/components/sidebar.js +5 -6
- package/dist/components/sidebar.logic.d.ts +1 -3
- package/dist/components/sidebar.logic.js +1 -2
- package/dist/components/skeleton.d.ts +0 -2
- package/dist/components/skeleton.js +1 -2
- package/dist/components/split-button.d.ts +0 -2
- package/dist/components/split-button.js +2 -3
- package/dist/components/status-mark.d.ts +0 -2
- package/dist/components/status-mark.js +1 -2
- package/dist/components/stella-mark.d.ts +1 -3
- package/dist/components/stella-mark.js +1 -2
- package/dist/components/stella-mark.native.d.ts +1 -3
- package/dist/components/stella-mark.native.js +1 -2
- package/dist/components/stella-mark.shared.d.ts +1 -3
- package/dist/components/stella-mark.shared.js +1 -2
- package/dist/components/stella-wordmark.d.ts +1 -3
- package/dist/components/stella-wordmark.js +1 -2
- package/dist/components/stella-wordmark.native.d.ts +1 -3
- package/dist/components/stella-wordmark.native.js +1 -2
- package/dist/components/stella-wordmark.shared.d.ts +1 -3
- package/dist/components/stella-wordmark.shared.js +1 -2
- package/dist/components/steps.d.ts +0 -2
- package/dist/components/steps.js +1 -2
- package/dist/components/swap-text.d.ts +0 -2
- package/dist/components/swap-text.js +1 -2
- package/dist/components/switch.d.ts +0 -2
- package/dist/components/switch.js +1 -2
- package/dist/components/switch.native.d.ts +0 -2
- package/dist/components/switch.native.js +1 -2
- package/dist/components/switch.shared.d.ts +1 -3
- package/dist/components/table-chart.d.ts +1 -3
- package/dist/components/table-chart.js +1 -2
- package/dist/components/table.d.ts +0 -2
- package/dist/components/table.js +1 -2
- package/dist/components/tabs.d.ts +0 -2
- package/dist/components/tabs.js +2 -3
- package/dist/components/text.d.ts +0 -2
- package/dist/components/text.js +1 -2
- package/dist/components/text.native.d.ts +0 -2
- package/dist/components/text.native.js +1 -2
- package/dist/components/text.shared.d.ts +1 -3
- package/dist/components/text.shared.js +1 -2
- package/dist/components/textarea.d.ts +11 -3
- package/dist/components/textarea.js +53 -15
- package/dist/components/textarea.native.d.ts +1 -3
- package/dist/components/textarea.native.js +1 -2
- package/dist/components/textarea.shared.d.ts +1 -3
- package/dist/components/time-field.d.ts +25 -0
- package/dist/components/time-field.js +108 -0
- package/dist/components/toast.d.ts +0 -2
- package/dist/components/toast.js +4 -5
- package/dist/components/toggle-group.d.ts +0 -2
- package/dist/components/toggle-group.js +1 -2
- package/dist/components/toggle.d.ts +0 -2
- package/dist/components/toggle.js +1 -2
- package/dist/components/toolbar-icon-action.d.ts +0 -2
- package/dist/components/toolbar-icon-action.js +1 -2
- package/dist/components/tooltip-trigger-helper.d.ts +0 -2
- package/dist/components/tooltip-trigger-helper.js +1 -2
- package/dist/components/tooltip.d.ts +7 -3
- package/dist/components/tooltip.js +10 -6
- package/dist/components/truncated-text.d.ts +0 -2
- package/dist/components/truncated-text.js +3 -4
- package/dist/components/view-toolbar.d.ts +0 -2
- package/dist/components/view-toolbar.js +1 -2
- package/dist/components/workspace-shell.d.ts +0 -2
- package/dist/components/workspace-shell.js +4 -5
- package/dist/css.d.ts +0 -1
- package/dist/data-table/schema.d.ts +1 -3
- package/dist/data-table/schema.js +1 -2
- package/dist/data-table/table.d.ts +0 -2
- package/dist/data-table/table.js +2 -3
- package/dist/hooks/use-contained-handler.d.ts +0 -2
- package/dist/hooks/use-contained-handler.js +1 -2
- package/dist/hooks/use-content-dir.d.ts +0 -2
- package/dist/hooks/use-content-dir.js +1 -2
- package/dist/hooks/use-latest.d.ts +1 -3
- package/dist/hooks/use-latest.js +1 -2
- package/dist/hooks/use-mobile.d.ts +1 -3
- package/dist/hooks/use-mobile.js +1 -2
- package/dist/hooks/use-prefers-reduced-motion.d.ts +6 -0
- package/dist/hooks/use-prefers-reduced-motion.js +17 -0
- package/dist/hooks/use-viewport-width.d.ts +1 -3
- package/dist/hooks/use-viewport-width.js +1 -2
- package/dist/index.d.ts +5 -4
- package/dist/index.js +35 -34
- package/dist/inspector/chrome.d.ts +1 -3
- package/dist/inspector/chrome.js +2 -3
- package/dist/inspector/dock.d.ts +0 -2
- package/dist/inspector/dock.js +2 -3
- package/dist/inspector/entity-tab.d.ts +0 -2
- package/dist/inspector/entity-tab.js +3 -4
- package/dist/inspector/entity-tab.logic.d.ts +1 -3
- package/dist/inspector/entity-tab.logic.js +1 -2
- package/dist/inspector/facet-bar.d.ts +1 -3
- package/dist/inspector/facet-bar.js +5 -6
- package/dist/inspector/facet-bar.logic.d.ts +1 -3
- package/dist/inspector/facet-bar.logic.js +1 -2
- package/dist/inspector/index.js +2 -2
- package/dist/inspector/layout-tokens.d.ts +1 -3
- package/dist/inspector/layout-tokens.js +1 -2
- package/dist/inspector/pane-width.d.ts +0 -2
- package/dist/inspector/pane-width.js +1 -2
- package/dist/inspector/use-pane-width.d.ts +0 -2
- package/dist/inspector/use-pane-width.js +1 -2
- package/dist/kanban/band-peek.d.ts +1 -3
- package/dist/kanban/band-peek.js +1 -2
- package/dist/kanban/card-properties.d.ts +1 -3
- package/dist/kanban/card-properties.js +1 -2
- package/dist/kanban/card-shell.d.ts +1 -3
- package/dist/kanban/card-shell.js +2 -3
- package/dist/kanban/cell-action.d.ts +1 -3
- package/dist/kanban/cell-action.js +2 -3
- package/dist/kanban/column-band-header.d.ts +1 -3
- package/dist/kanban/column-band-header.js +2 -3
- package/dist/kanban/column-bands.d.ts +1 -3
- package/dist/kanban/column-bands.js +1 -2
- package/dist/kanban/column-header.d.ts +1 -3
- package/dist/kanban/column-header.js +1 -2
- package/dist/kanban/drag-interactions.d.ts +0 -2
- package/dist/kanban/drag-interactions.js +1 -2
- package/dist/kanban/grouping.d.ts +1 -3
- package/dist/kanban/grouping.js +1 -2
- package/dist/kanban/index.js +5 -5
- package/dist/kanban/layout-tokens.d.ts +1 -3
- package/dist/kanban/layout-tokens.js +1 -2
- package/dist/kanban/matrix.d.ts +1 -3
- package/dist/kanban/matrix.js +1 -2
- package/dist/kanban/sortable-edge.d.ts +0 -2
- package/dist/kanban/sortable-edge.js +1 -2
- package/dist/kanban/sortable-interactions.d.ts +0 -2
- package/dist/kanban/sortable-interactions.js +3 -4
- package/dist/kanban/sortable-interactions.logic.d.ts +0 -2
- package/dist/kanban/sortable-interactions.logic.js +1 -2
- package/dist/kanban/sticky-lane.d.ts +0 -2
- package/dist/kanban/sticky-lane.js +1 -2
- package/dist/kanban/subgroup-board.d.ts +0 -2
- package/dist/kanban/subgroup-board.js +5 -6
- package/dist/kanban/touch-identity.d.ts +0 -2
- package/dist/kanban/touch-identity.js +1 -2
- package/dist/kanban/virtual-cell.d.ts +1 -3
- package/dist/kanban/virtual-cell.js +3 -4
- package/dist/lib/button-disposition.d.ts +0 -2
- package/dist/lib/button-disposition.js +1 -2
- package/dist/lib/control-size.d.ts +0 -2
- package/dist/lib/control-size.js +1 -2
- package/dist/lib/field-trigger.d.ts +1 -3
- package/dist/lib/field-trigger.js +1 -2
- package/dist/lib/file-picker.d.ts +0 -2
- package/dist/lib/file-picker.js +1 -2
- package/dist/lib/initials.d.ts +1 -3
- package/dist/lib/initials.js +1 -2
- package/dist/lib/inline-reorder.d.ts +0 -2
- package/dist/lib/inline-reorder.js +1 -2
- package/dist/lib/matter-colors.d.ts +0 -2
- package/dist/lib/matter-colors.js +1 -2
- package/dist/lib/menu-row.d.ts +1 -3
- package/dist/lib/menu-row.js +1 -2
- package/dist/lib/native-context-menu.d.ts +24 -0
- package/dist/lib/native-context-menu.js +85 -0
- package/dist/lib/option-color.d.ts +1 -3
- package/dist/lib/option-color.js +1 -2
- package/dist/lib/overlay-layer.d.ts +1 -3
- package/dist/lib/overlay-layer.js +1 -2
- package/dist/lib/panel-inset.d.ts +1 -3
- package/dist/lib/panel-inset.js +1 -2
- package/dist/lib/positioner-sizing.d.ts +1 -3
- package/dist/lib/positioner-sizing.js +1 -2
- package/dist/lib/renders-nothing.d.ts +8 -0
- package/dist/lib/renders-nothing.js +14 -0
- package/dist/lib/safe-area.d.ts +1 -3
- package/dist/lib/safe-area.js +1 -2
- package/dist/lib/scroll-edge-fade.d.ts +1 -3
- package/dist/lib/scroll-edge-fade.js +1 -2
- package/dist/lib/slot.d.ts +0 -2
- package/dist/lib/slot.js +1 -2
- package/dist/lib/tab-order.d.ts +0 -2
- package/dist/lib/tab-order.js +1 -2
- package/dist/lib/tooltip-content.d.ts +1 -3
- package/dist/lib/tooltip-content.js +1 -2
- package/dist/lib/typed-character.d.ts +1 -3
- package/dist/lib/typed-character.js +1 -2
- package/dist/lib/utils.d.ts +1 -3
- package/dist/lib/utils.js +1 -2
- package/dist/lib/week.d.ts +1 -3
- package/dist/lib/week.js +1 -2
- package/dist/review/review-author-avatar.d.ts +0 -2
- package/dist/review/review-author-avatar.js +2 -3
- package/dist/review/review-comment-card.d.ts +0 -2
- package/dist/review/review-comment-card.js +3 -4
- package/dist/review/review-decision-actions.d.ts +0 -2
- package/dist/review/review-decision-actions.js +2 -3
- package/dist/review/review-diff-text.d.ts +0 -2
- package/dist/review/review-diff-text.js +1 -2
- package/dist/review/review-out-of-date-notice.d.ts +0 -2
- package/dist/review/review-out-of-date-notice.js +2 -3
- package/dist/review/review-severity-dot.d.ts +0 -2
- package/dist/review/review-severity-dot.js +1 -2
- package/dist/review/review-status-badge.d.ts +0 -2
- package/dist/review/review-status-badge.js +1 -2
- package/dist/review/review-word-diff.d.ts +1 -3
- package/dist/review/review-word-diff.js +1 -2
- package/dist/review/text-mark.d.ts +0 -2
- package/dist/review/text-mark.js +1 -2
- package/dist/styles/theme.css +50 -23
- package/dist/testing/browser-clock.d.ts +1 -3
- package/dist/testing/browser-clock.js +1 -2
- package/package.json +50 -10
|
@@ -3,7 +3,6 @@ import { AutoScrollActivator, AutoScrollOptions, CollisionDetection, DndContextP
|
|
|
3
3
|
import { Button } from "../components/button.js";
|
|
4
4
|
import { KANBAN_BOARD_COLLISION_DETECTION, KanbanCellVirtualNavigation, KanbanSortableCellPosition, KanbanVirtualScrollRequest, kanbanKeyboardCoordinates } from "./sortable-interactions.logic.js";
|
|
5
5
|
import { useSortable } from "@dnd-kit/sortable";
|
|
6
|
-
//#region src/kanban/sortable-interactions.d.ts
|
|
7
6
|
export declare const KANBAN_MOUSE_ACTIVATION_DISTANCE = 8;
|
|
8
7
|
/** Above sticky board chrome, below app-level floating surfaces. */
|
|
9
8
|
export declare const KANBAN_DRAG_OVERLAY_Z_INDEX = 75;
|
|
@@ -141,5 +140,4 @@ export type KanbanCardDragSurfaceProps = {
|
|
|
141
140
|
} & Omit<React$1.ComponentProps<"div">, "ref">;
|
|
142
141
|
/** A whole-card drag activator that preserves descendant controls and scrolling. */
|
|
143
142
|
export declare const KanbanCardDragSurface: ({ bindings, className, ...props }: KanbanCardDragSurfaceProps) => React$1.JSX.Element;
|
|
144
|
-
//#endregion
|
|
145
143
|
export { KANBAN_BOARD_COLLISION_DETECTION, type KanbanCellVirtualNavigation, type KanbanSortableCellPosition, type KanbanVirtualScrollRequest, kanbanKeyboardCoordinates };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { Button } from "../components/button.js";
|
|
2
3
|
import { GripVerticalIcon } from "../icons.js";
|
|
3
|
-
import { cn } from "../lib/utils.js";
|
|
4
4
|
import "../lib/overlay-layer.js";
|
|
5
|
-
import {
|
|
5
|
+
import { cn } from "../lib/utils.js";
|
|
6
6
|
import { KANBAN_BOARD_COLLISION_DETECTION, KANBAN_DROP_TARGET_TYPES, clearKanbanKeyboardTarget, getKanbanKeyboardTargetState, isKanbanDropSettled, kanbanKeyboardCoordinates } from "./sortable-interactions.logic.js";
|
|
7
7
|
import { isActiveTouchChange } from "./touch-identity.js";
|
|
8
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -10,7 +10,7 @@ import * as React$1 from "react";
|
|
|
10
10
|
import { createPortal } from "react-dom";
|
|
11
11
|
import { AutoScrollActivator, DndContext, DragOverlay, KeyboardSensor, MouseSensor, TouchSensor, useDroppable, useSensor, useSensors } from "@dnd-kit/core";
|
|
12
12
|
import { useSortable } from "@dnd-kit/sortable";
|
|
13
|
-
|
|
13
|
+
// src/kanban/sortable-interactions.tsx
|
|
14
14
|
const KANBAN_MOUSE_ACTIVATION_DISTANCE = 8;
|
|
15
15
|
/** Above sticky board chrome, below app-level floating surfaces. */
|
|
16
16
|
const KANBAN_DRAG_OVERLAY_Z_INDEX = 75;
|
|
@@ -499,5 +499,4 @@ const KanbanCardDragSurface = ({ bindings, className, ...props }) => {
|
|
|
499
499
|
ref: setActivatorNodeRef
|
|
500
500
|
});
|
|
501
501
|
};
|
|
502
|
-
//#endregion
|
|
503
502
|
export { KANBAN_BOARD_AUTO_SCROLL_OPTIONS, KANBAN_BOARD_COLLISION_DETECTION, KANBAN_DRAG_OVERLAY_Z_INDEX, KANBAN_MOUSE_ACTIVATION_DISTANCE, KANBAN_SORTABLE_ACTIVATION_MODES, KANBAN_TOUCH_ACTIVATION_CONSTRAINT, KanbanCardDragSurface, KanbanDragHandle, KanbanSortableBoard, kanbanKeyboardCoordinates, useKanbanDropTarget, useKanbanSortable, useKanbanSortableSensors };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { CollisionDetection, KeyboardCoordinateGetter, SensorContext, UniqueIdentifier } from "@dnd-kit/core";
|
|
2
|
-
//#region src/kanban/sortable-interactions.logic.d.ts
|
|
3
2
|
export declare const KANBAN_DROP_TARGET_TYPES: {
|
|
4
3
|
readonly CELL: "kanban-cell";
|
|
5
4
|
readonly ITEM: "kanban-item";
|
|
@@ -75,5 +74,4 @@ type GetKeyboardTargetOptions = {
|
|
|
75
74
|
export declare const getKanbanKeyboardTarget: ({ activeId, cells, currentCellId, currentOverId, direction }: GetKeyboardTargetOptions) => UniqueIdentifier | undefined;
|
|
76
75
|
/** Ordered two-dimensional navigation over item and empty-cell targets. */
|
|
77
76
|
export declare const kanbanKeyboardCoordinates: KeyboardCoordinateGetter;
|
|
78
|
-
//#endregion
|
|
79
77
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { closestCorners, getFirstCollision, pointerWithin } from "@dnd-kit/core";
|
|
2
|
-
|
|
2
|
+
// src/kanban/sortable-interactions.logic.ts
|
|
3
3
|
const KANBAN_DROP_TARGET_TYPES = {
|
|
4
4
|
CELL: "kanban-cell",
|
|
5
5
|
ITEM: "kanban-item"
|
|
@@ -206,5 +206,4 @@ const kanbanKeyboardCoordinates = (event, { active, context }) => {
|
|
|
206
206
|
y: targetRect.top
|
|
207
207
|
};
|
|
208
208
|
};
|
|
209
|
-
//#endregion
|
|
210
209
|
export { KANBAN_BOARD_COLLISION_DETECTION, KANBAN_DROP_TARGET_TYPES, clearKanbanKeyboardTarget, getKanbanKeyboardTarget, getKanbanKeyboardTargetState, isKanbanCellDropData, isKanbanDropSettled, kanbanKeyboardCoordinates };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { CSSProperties, ReactNode } from "react";
|
|
2
|
-
//#region src/kanban/sticky-lane.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* A lane's controls while its cells scroll.
|
|
5
4
|
*
|
|
@@ -70,5 +69,4 @@ export type KanbanCollapsedBandCaptionProps = {
|
|
|
70
69
|
* A host rendering its own collapsed cell composes this inside that cell.
|
|
71
70
|
*/
|
|
72
71
|
export declare const KanbanCollapsedBandCaption: ({ className, label, meta }: KanbanCollapsedBandCaptionProps) => import("react").JSX.Element;
|
|
73
|
-
//#endregion
|
|
74
72
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { cn } from "../lib/utils.js";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
|
|
3
|
+
// src/kanban/sticky-lane.tsx
|
|
4
4
|
/**
|
|
5
5
|
* A lane's controls while its cells scroll.
|
|
6
6
|
*
|
|
@@ -66,5 +66,4 @@ const KanbanCollapsedBandCaption = ({ className, label, meta }) => /* @__PURE__
|
|
|
66
66
|
children: meta
|
|
67
67
|
})]
|
|
68
68
|
});
|
|
69
|
-
//#endregion
|
|
70
69
|
export { KANBAN_CARD_STICKY_TOP_CLASS, KANBAN_CARD_STICKY_TOP_VAR, KANBAN_STICKY_TOP_CLASS, KANBAN_STICKY_TOP_VAR, KanbanCollapsedBandCaption, resolveKanbanCardStickyTop };
|
|
@@ -2,7 +2,6 @@ import { KanbanBandToggleActivation } from "./column-band-header.js";
|
|
|
2
2
|
import { KanbanBoardCell, KanbanBoardColumn, KanbanBoardMatrix } from "./matrix.js";
|
|
3
3
|
import { KanbanColumnBand, KanbanGroup } from "./grouping.js";
|
|
4
4
|
import { ReactNode, Ref } from "react";
|
|
5
|
-
//#region src/kanban/subgroup-board.d.ts
|
|
6
5
|
export type KanbanSubgroupColumnHeaderContext = {
|
|
7
6
|
column: KanbanBoardColumn;
|
|
8
7
|
count: number;
|
|
@@ -154,5 +153,4 @@ export type KanbanSubgroupBoardProps<TRow> = {
|
|
|
154
153
|
* folded band costs no vertical space.
|
|
155
154
|
*/
|
|
156
155
|
export declare const KanbanSubgroupBoard: <TRow>({ scrollRef, matrix, renderColumnHeader, renderLaneIdentity, renderCell, renderLaneColumnSummary, renderLaneColumnAction, renderBandHeader, renderCollapsedBandCell, formatBandToggleLabel, formatCount, isLaneCollapsed, onLaneCollapsedChange, isBandCollapsed, onBandCollapsedChange, footer, className, dragOverBandId, isDragging }: KanbanSubgroupBoardProps<TRow>) => import("react").JSX.Element;
|
|
157
|
-
//#endregion
|
|
158
156
|
export {};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
+
import { DirectionalIcon } from "../components/directional-icon.js";
|
|
1
2
|
import { ChevronDownIcon } from "../icons.js";
|
|
2
3
|
import { cn } from "../lib/utils.js";
|
|
3
|
-
import {
|
|
4
|
-
import { KANBAN_STICKY_TOP_CLASS, KANBAN_STICKY_TOP_VAR, KanbanCollapsedBandCaption } from "./sticky-lane.js";
|
|
5
|
-
import { KANBAN_CHROME_TOGGLE_COARSE_TARGET_CLASS } from "./layout-tokens.js";
|
|
4
|
+
import { createBandPeekController } from "./band-peek.js";
|
|
6
5
|
import { KanbanColumnBandHeader } from "./column-band-header.js";
|
|
7
6
|
import { KANBAN_COLLAPSED_BAND_WIDTH_CLASS, KANBAN_COLUMN_WIDTH_CLASS, resolveKanbanColumnBands } from "./column-bands.js";
|
|
8
7
|
import { KANBAN_CARD_DRAG_MIME } from "./drag-interactions.js";
|
|
9
|
-
import {
|
|
8
|
+
import { KANBAN_CHROME_TOGGLE_COARSE_TARGET_CLASS } from "./layout-tokens.js";
|
|
9
|
+
import { KANBAN_STICKY_TOP_CLASS, KANBAN_STICKY_TOP_VAR, KanbanCollapsedBandCaption } from "./sticky-lane.js";
|
|
10
10
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
11
11
|
import { useEffect, useMemo, useRef, useState } from "react";
|
|
12
|
-
|
|
12
|
+
// src/kanban/subgroup-board.tsx
|
|
13
13
|
/**
|
|
14
14
|
* How far a lane's own pinned row reaches: its identity line over the line of
|
|
15
15
|
* per-column summaries, each fixed at the chrome row height.
|
|
@@ -443,5 +443,4 @@ const FoldedBandSlot = ({ band, children, className, peek }) => {
|
|
|
443
443
|
children
|
|
444
444
|
});
|
|
445
445
|
};
|
|
446
|
-
//#endregion
|
|
447
446
|
export { KanbanSubgroupBoard };
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
//#region src/kanban/touch-identity.d.ts
|
|
2
1
|
type ActiveTouchChangeOptions = {
|
|
3
2
|
activeTouchIdentifier: number | null;
|
|
4
3
|
changedTouchIdentifiers: readonly number[];
|
|
5
4
|
};
|
|
6
5
|
export declare const isActiveTouchChange: ({ activeTouchIdentifier, changedTouchIdentifiers }: ActiveTouchChangeOptions) => boolean;
|
|
7
|
-
//#endregion
|
|
8
6
|
export {};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
// src/kanban/touch-identity.ts
|
|
2
2
|
const isActiveTouchChange = ({ activeTouchIdentifier, changedTouchIdentifiers }) => activeTouchIdentifier === null || changedTouchIdentifiers.includes(activeTouchIdentifier);
|
|
3
|
-
//#endregion
|
|
4
3
|
export { isActiveTouchChange };
|
|
@@ -3,7 +3,6 @@ import { OptionColor } from "../lib/option-color.js";
|
|
|
3
3
|
import { SortableContextProps, SortingStrategy } from "@dnd-kit/sortable";
|
|
4
4
|
import { UniqueIdentifier } from "@dnd-kit/core";
|
|
5
5
|
import { UseKanbanDropTargetOptions } from "./sortable-interactions.js";
|
|
6
|
-
//#region src/kanban/virtual-cell.d.ts
|
|
7
6
|
export declare const KANBAN_VIRTUAL_CELL_PAGINATION: {
|
|
8
7
|
readonly NONE: "none";
|
|
9
8
|
readonly CURSOR: "cursor";
|
|
@@ -71,5 +70,4 @@ export type KanbanVirtualCellProps<TRow> = {
|
|
|
71
70
|
className?: string | undefined;
|
|
72
71
|
};
|
|
73
72
|
/** Bounded, virtualized Kanban cell with cursor-page request deduplication. */
|
|
74
|
-
export declare const KanbanVirtualCell: <TRow>({ rows, getRowKey, renderRow, pagination, sortable, containerRef, active, backgroundColor, accent, footer, footerPlacement, estimateSize, overscan, loadMoreThreshold, className }: KanbanVirtualCellProps<TRow>) => import("react").JSX.Element;
|
|
75
|
-
//#endregion
|
|
73
|
+
export declare const KanbanVirtualCell: <TRow>({ rows, getRowKey, renderRow, pagination, sortable, containerRef, active, backgroundColor, accent, footer, footerPlacement, estimateSize, overscan, loadMoreThreshold, className }: KanbanVirtualCellProps<TRow>) => import("react").JSX.Element;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
+
import { resolveOptionColor } from "../lib/option-color.js";
|
|
1
2
|
import { cn } from "../lib/utils.js";
|
|
2
|
-
import { KANBAN_CARD_STICKY_TOP_VAR, KANBAN_STICKY_TOP_CLASS, resolveKanbanCardStickyTop } from "./sticky-lane.js";
|
|
3
3
|
import { useKanbanDropTarget } from "./sortable-interactions.js";
|
|
4
|
-
import {
|
|
4
|
+
import { KANBAN_CARD_STICKY_TOP_VAR, KANBAN_STICKY_TOP_CLASS, resolveKanbanCardStickyTop } from "./sticky-lane.js";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import { useId, useLayoutEffect, useRef, useState } from "react";
|
|
7
7
|
import { useDndContext } from "@dnd-kit/core";
|
|
8
8
|
import { SortableContext, verticalListSortingStrategy } from "@dnd-kit/sortable";
|
|
9
9
|
import { defaultRangeExtractor, useVirtualizer } from "@tanstack/react-virtual";
|
|
10
|
-
|
|
10
|
+
// src/kanban/virtual-cell.tsx
|
|
11
11
|
const DEFAULT_ESTIMATE_SIZE_PX = 128;
|
|
12
12
|
const DEFAULT_OVERSCAN = 8;
|
|
13
13
|
const DEFAULT_LOAD_MORE_THRESHOLD_PX = 200;
|
|
@@ -181,5 +181,4 @@ function resolveKanbanCellAppearance({ accent, active, backgroundColor }) {
|
|
|
181
181
|
hasAccent: accentVariants !== void 0
|
|
182
182
|
};
|
|
183
183
|
}
|
|
184
|
-
//#endregion
|
|
185
184
|
export { KANBAN_VIRTUAL_CELL_PAGINATION, KanbanVirtualCell };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as React$1 from "react";
|
|
2
|
-
//#region src/lib/button-disposition.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* How a button expresses "unavailable".
|
|
5
4
|
*
|
|
@@ -59,5 +58,4 @@ export declare const blockDisabledActivation: (event: BlockableEvent) => void;
|
|
|
59
58
|
export declare const blockDisabledKeyActivation: (event: BlockableEvent & {
|
|
60
59
|
key: string;
|
|
61
60
|
}) => void;
|
|
62
|
-
//#endregion
|
|
63
61
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { hasTooltipContent } from "./tooltip-content.js";
|
|
2
|
-
|
|
2
|
+
// src/lib/button-disposition.ts
|
|
3
3
|
/**
|
|
4
4
|
* How a button expresses "unavailable".
|
|
5
5
|
*
|
|
@@ -48,5 +48,4 @@ const blockDisabledKeyActivation = (event) => {
|
|
|
48
48
|
event.preventBaseUIHandler?.();
|
|
49
49
|
if (event.key !== "Tab") event.preventDefault();
|
|
50
50
|
};
|
|
51
|
-
//#endregion
|
|
52
51
|
export { BUTTON_DISPOSITION, blockDisabledActivation, blockDisabledKeyActivation, resolveButtonDisposition };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/lib/control-size.d.ts
|
|
2
1
|
declare const CONTROL_SIZE: Readonly<{
|
|
3
2
|
readonly sm: "sm";
|
|
4
3
|
readonly default: "default";
|
|
@@ -6,5 +5,4 @@ declare const CONTROL_SIZE: Readonly<{
|
|
|
6
5
|
}>;
|
|
7
6
|
type ControlSize = (typeof CONTROL_SIZE)[keyof typeof CONTROL_SIZE];
|
|
8
7
|
declare const CONTROL_SIZES: readonly ("default" | "lg" | "sm")[];
|
|
9
|
-
//#endregion
|
|
10
8
|
export { CONTROL_SIZE, CONTROL_SIZES, type ControlSize };
|
package/dist/lib/control-size.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
// src/lib/control-size.ts
|
|
2
2
|
const CONTROL_SIZE = Object.freeze({
|
|
3
3
|
sm: "sm",
|
|
4
4
|
default: "default",
|
|
5
5
|
lg: "lg"
|
|
6
6
|
});
|
|
7
7
|
const CONTROL_SIZES = Object.freeze(Object.values(CONTROL_SIZE));
|
|
8
|
-
//#endregion
|
|
9
8
|
export { CONTROL_SIZE, CONTROL_SIZES };
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
//#region src/lib/field-trigger.d.ts
|
|
2
1
|
/**
|
|
3
2
|
* The bordered box of a button that opens a picker inside a form (a select
|
|
4
3
|
* trigger, a date field). One string so every popup-backed field shares the
|
|
5
4
|
* input metric, focus ring, invalid and disabled treatment, and the 44px
|
|
6
5
|
* coarse-pointer hit area.
|
|
7
6
|
*/
|
|
8
|
-
export declare const FIELD_TRIGGER_CLASS_NAME = "border-input bg-background text-foreground ring-ring/24 focus-visible:border-ring aria-invalid:border-destructive/36 focus-visible:aria-invalid:border-destructive/64 focus-visible:aria-invalid:ring-destructive/16 dark:bg-input/32 dark:aria-invalid:ring-destructive/24 relative inline-flex min-h-9 w-full min-w-36 items-center justify-center gap-2 rounded-lg border px-[calc(--spacing(3)-1px)] text-start text-base shadow-xs/5 outline-none select-none not-dark:bg-clip-padding before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] not-data-disabled:not-focus-visible:not-aria-invalid:not-data-pressed:before:shadow-[0_1px_--theme(--color-black/4%)] focus-visible:ring-[3px] data-disabled:pointer-events-none data-disabled:opacity-64 sm:min-h-8 sm:text-sm dark:not-data-disabled:not-focus-visible:not-aria-invalid:not-data-pressed:before:shadow-[0_-1px_--theme(--color-white/6%)] pointer-coarse:after:absolute pointer-coarse:after:size-full pointer-coarse:after:min-h-11 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='opacity-'])]:opacity-80 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [[data-disabled],:focus-visible,[aria-invalid],[data-pressed]]:shadow-none";
|
|
9
|
-
//#endregion
|
|
7
|
+
export declare const FIELD_TRIGGER_CLASS_NAME = "border-input bg-background text-foreground ring-ring/24 focus-visible:border-ring aria-invalid:border-destructive/36 focus-visible:aria-invalid:border-destructive/64 focus-visible:aria-invalid:ring-destructive/16 dark:bg-input/32 dark:aria-invalid:ring-destructive/24 relative inline-flex min-h-9 w-full min-w-36 items-center justify-center gap-2 rounded-lg border px-[calc(--spacing(3)-1px)] text-start text-base shadow-xs/5 outline-none select-none not-dark:bg-clip-padding before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] not-data-disabled:not-focus-visible:not-aria-invalid:not-data-pressed:before:shadow-[0_1px_--theme(--color-black/4%)] focus-visible:ring-[3px] data-disabled:pointer-events-none data-disabled:opacity-64 sm:min-h-8 sm:text-sm dark:not-data-disabled:not-focus-visible:not-aria-invalid:not-data-pressed:before:shadow-[0_-1px_--theme(--color-white/6%)] pointer-coarse:after:absolute pointer-coarse:after:size-full pointer-coarse:after:min-h-11 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='opacity-'])]:opacity-80 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [[data-disabled],:focus-visible,[aria-invalid],[data-pressed]]:shadow-none";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/lib/field-trigger.ts
|
|
2
2
|
/**
|
|
3
3
|
* The bordered box of a button that opens a picker inside a form (a select
|
|
4
4
|
* trigger, a date field). One string so every popup-backed field shares the
|
|
@@ -6,5 +6,4 @@
|
|
|
6
6
|
* coarse-pointer hit area.
|
|
7
7
|
*/
|
|
8
8
|
const FIELD_TRIGGER_CLASS_NAME = "border-input bg-background text-foreground ring-ring/24 focus-visible:border-ring aria-invalid:border-destructive/36 focus-visible:aria-invalid:border-destructive/64 focus-visible:aria-invalid:ring-destructive/16 dark:bg-input/32 dark:aria-invalid:ring-destructive/24 relative inline-flex min-h-9 w-full min-w-36 items-center justify-center gap-2 rounded-lg border px-[calc(--spacing(3)-1px)] text-start text-base shadow-xs/5 outline-none select-none not-dark:bg-clip-padding before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] not-data-disabled:not-focus-visible:not-aria-invalid:not-data-pressed:before:shadow-[0_1px_--theme(--color-black/4%)] focus-visible:ring-[3px] data-disabled:pointer-events-none data-disabled:opacity-64 sm:min-h-8 sm:text-sm dark:not-data-disabled:not-focus-visible:not-aria-invalid:not-data-pressed:before:shadow-[0_-1px_--theme(--color-white/6%)] pointer-coarse:after:absolute pointer-coarse:after:size-full pointer-coarse:after:min-h-11 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='opacity-'])]:opacity-80 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [[data-disabled],:focus-visible,[aria-invalid],[data-pressed]]:shadow-none";
|
|
9
|
-
//#endregion
|
|
10
9
|
export { FIELD_TRIGGER_CLASS_NAME };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/lib/file-picker.d.ts
|
|
2
1
|
type PickedFiles = [File, ...File[]];
|
|
3
2
|
type OpenFilePickerOptions = {
|
|
4
3
|
accept?: string | undefined;
|
|
@@ -16,5 +15,4 @@ type OpenFilePickerOptions = {
|
|
|
16
15
|
* `onPick` runs only with at least one file.
|
|
17
16
|
*/
|
|
18
17
|
declare const openFilePicker: ({ accept, multiple, onPick }: OpenFilePickerOptions) => void;
|
|
19
|
-
//#endregion
|
|
20
18
|
export { type OpenFilePickerOptions, openFilePicker };
|
package/dist/lib/file-picker.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/lib/file-picker.ts
|
|
2
2
|
/**
|
|
3
3
|
* Opens the browser's file chooser without an `<input type="file">` in the
|
|
4
4
|
* component tree, so no surface carries a hidden input, a ref, or the
|
|
@@ -25,5 +25,4 @@ const openFilePicker = ({ accept, multiple = false, onPick }) => {
|
|
|
25
25
|
document.body.append(input);
|
|
26
26
|
input.click();
|
|
27
27
|
};
|
|
28
|
-
//#endregion
|
|
29
28
|
export { openFilePicker };
|
package/dist/lib/initials.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/lib/initials.d.ts
|
|
2
1
|
/**
|
|
3
2
|
* Extract up to two uppercase initials from a display name.
|
|
4
3
|
*
|
|
@@ -11,5 +10,4 @@
|
|
|
11
10
|
* "王小明" → "王小"
|
|
12
11
|
* - Null / empty: "?"
|
|
13
12
|
*/
|
|
14
|
-
export declare const getInitials: (name: string | null) => string;
|
|
15
|
-
//#endregion
|
|
13
|
+
export declare const getInitials: (name: string | null) => string;
|
package/dist/lib/initials.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/lib/initials.ts
|
|
2
2
|
/**
|
|
3
3
|
* Extract up to two uppercase initials from a display name.
|
|
4
4
|
*
|
|
@@ -23,5 +23,4 @@ const getInitials = (name) => {
|
|
|
23
23
|
}
|
|
24
24
|
return trimmed.slice(0, 2).toUpperCase();
|
|
25
25
|
};
|
|
26
|
-
//#endregion
|
|
27
26
|
export { getInitials };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/lib/inline-reorder.d.ts
|
|
2
1
|
/**
|
|
3
2
|
* Reordering for a horizontal row of items (tabs, chips) dragged with
|
|
4
3
|
* pragmatic drag and drop. Edges match the hitbox package's `Edge`, so a
|
|
@@ -16,5 +15,4 @@ type ReorderInlineIdsParams = {
|
|
|
16
15
|
};
|
|
17
16
|
/** The new order, or null when the drop leaves the order unchanged. */
|
|
18
17
|
export declare const reorderInlineIds: ({ ids, draggedId, targetId, position }: ReorderInlineIdsParams) => string[] | null;
|
|
19
|
-
//#endregion
|
|
20
18
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/lib/inline-reorder.ts
|
|
2
2
|
const toInlineDropPosition = (edge, direction) => {
|
|
3
3
|
if (edge !== "left" && edge !== "right") return null;
|
|
4
4
|
return (direction === "rtl" ? edge === "left" : edge === "right") ? "after" : "before";
|
|
@@ -11,5 +11,4 @@ const reorderInlineIds = ({ ids, draggedId, targetId, position }) => {
|
|
|
11
11
|
reordered.splice(position === "after" ? targetIndex + 1 : targetIndex, 0, draggedId);
|
|
12
12
|
return reordered.every((id, index) => id === ids[index]) ? null : reordered;
|
|
13
13
|
};
|
|
14
|
-
//#endregion
|
|
15
14
|
export { reorderInlineIds, toInlineDropPosition };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { CSSProperties } from "react";
|
|
2
|
-
//#region src/lib/matter-colors.d.ts
|
|
3
2
|
export declare const MATTER_SWATCHES: readonly ["--option-blue", "--option-emerald", "--option-amber", "--option-violet", "--option-red", "--option-cyan", "--option-orange", "--option-teal"];
|
|
4
3
|
export declare const getMatterSwatch: (id: string) => "--option-amber" | "--option-blue" | "--option-cyan" | "--option-emerald" | "--option-orange" | "--option-red" | "--option-teal" | "--option-violet";
|
|
5
4
|
export declare const getMatterColor: (id: string) => string;
|
|
@@ -35,5 +34,4 @@ export type MatterChromeStyle = CSSProperties & {
|
|
|
35
34
|
};
|
|
36
35
|
/** The tint variables a matter-scoped subtree paints its chrome and panes from. */
|
|
37
36
|
export declare const matterChromeStyle: (color: string | null) => MatterChromeStyle;
|
|
38
|
-
//#endregion
|
|
39
37
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/lib/matter-colors.ts
|
|
2
2
|
const DEFAULT_MATTER_SWATCH = "--option-blue";
|
|
3
3
|
const MATTER_SWATCHES = [
|
|
4
4
|
DEFAULT_MATTER_SWATCH,
|
|
@@ -61,5 +61,4 @@ const matterChromeStyle = (color) => ({
|
|
|
61
61
|
"--matter-background-tint": matterTint(color, MATTER_TINT_GROUND.content),
|
|
62
62
|
"--matter-sidebar-tint": matterTint(color, MATTER_TINT_GROUND.chrome)
|
|
63
63
|
});
|
|
64
|
-
//#endregion
|
|
65
64
|
export { MATTER_SWATCHES, MATTER_TINT_GROUND, getMatterColor, getMatterPickerColor, getMatterSwatch, matterChromeStyle, matterTint, resolveMatterColor, toStoredMatterColor };
|
package/dist/lib/menu-row.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/lib/menu-row.d.ts
|
|
2
1
|
/**
|
|
3
2
|
* One row metric for a menu list: a 32px row for a fine pointer that grows to
|
|
4
3
|
* the 44px touch target DESIGN.md asks for under a coarse one, an 8px inset,
|
|
@@ -10,5 +9,4 @@
|
|
|
10
9
|
* constant, so a list that mixes a button row with a highlightable command row
|
|
11
10
|
* cannot drift into two densities.
|
|
12
11
|
*/
|
|
13
|
-
export declare const MENU_ROW_CLASS_NAME = "min-h-8 w-full min-w-0 justify-start gap-2 px-2 py-1 pointer-coarse:min-h-11 text-start text-sm sm:text-sm [&_[data-slot=checkbox]]:size-4 [&_[data-slot=checkbox]_svg]:size-3 [&_svg:not([class*='size-'])]:size-4 sm:[&_svg:not([class*='size-'])]:size-4";
|
|
14
|
-
//#endregion
|
|
12
|
+
export declare const MENU_ROW_CLASS_NAME = "min-h-8 w-full min-w-0 justify-start gap-2 px-2 py-1 pointer-coarse:min-h-11 text-start text-sm sm:text-sm [&_[data-slot=checkbox]]:size-4 [&_[data-slot=checkbox]_svg]:size-3 [&_svg:not([class*='size-'])]:size-4 sm:[&_svg:not([class*='size-'])]:size-4";
|
package/dist/lib/menu-row.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/lib/menu-row.ts
|
|
2
2
|
/**
|
|
3
3
|
* One row metric for a menu list: a 32px row for a fine pointer that grows to
|
|
4
4
|
* the 44px touch target DESIGN.md asks for under a coarse one, an 8px inset,
|
|
@@ -11,5 +11,4 @@
|
|
|
11
11
|
* cannot drift into two densities.
|
|
12
12
|
*/
|
|
13
13
|
const MENU_ROW_CLASS_NAME = "min-h-8 w-full min-w-0 justify-start gap-2 px-2 py-1 pointer-coarse:min-h-11 text-start text-sm sm:text-sm [&_[data-slot=checkbox]]:size-4 [&_[data-slot=checkbox]_svg]:size-3 [&_svg:not([class*='size-'])]:size-4 sm:[&_svg:not([class*='size-'])]:size-4";
|
|
14
|
-
//#endregion
|
|
15
14
|
export { MENU_ROW_CLASS_NAME };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/** Why a right-click keeps the native menu, or null when stella may take it. */
|
|
2
|
+
export type NativeContextMenuReason = "editable" | "link" | "selection" | "shift";
|
|
3
|
+
type ContextMenuEventLike = {
|
|
4
|
+
readonly shiftKey: boolean;
|
|
5
|
+
readonly target: EventTarget | null;
|
|
6
|
+
};
|
|
7
|
+
/** The element is, or sits inside, text the user can edit. */
|
|
8
|
+
export declare const isEditableContextMenuTarget: (element: Element) => boolean;
|
|
9
|
+
/** The element is, or sits inside, a link with a destination. */
|
|
10
|
+
export declare const isLinkContextMenuTarget: (element: Element) => boolean;
|
|
11
|
+
/** A non-empty text selection covers the element. */
|
|
12
|
+
export declare const isSelectedTextContextMenuTarget: (element: Element) => boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Why this right-click keeps the browser's menu on an object, or null when
|
|
15
|
+
* the object's own actions open instead.
|
|
16
|
+
*/
|
|
17
|
+
export declare const nativeContextMenuReason: (event: ContextMenuEventLike) => NativeContextMenuReason | null;
|
|
18
|
+
/**
|
|
19
|
+
* The narrower rule a desktop webview applies to a right-click nothing in the
|
|
20
|
+
* page handled: only editable or selected text keeps a (text) menu, since
|
|
21
|
+
* the webview's native menu elsewhere offers browser items such as reload.
|
|
22
|
+
*/
|
|
23
|
+
export declare const nativeTextContextMenuReason: (event: Pick<ContextMenuEventLike, "target">) => Extract<NativeContextMenuReason, "editable" | "selection"> | null;
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
// src/lib/native-context-menu.ts
|
|
2
|
+
/** Input types whose value is text a user edits; the others are controls. */
|
|
3
|
+
const NON_TEXT_INPUT_TYPES = /* @__PURE__ */ new Set([
|
|
4
|
+
"button",
|
|
5
|
+
"checkbox",
|
|
6
|
+
"color",
|
|
7
|
+
"file",
|
|
8
|
+
"hidden",
|
|
9
|
+
"image",
|
|
10
|
+
"radio",
|
|
11
|
+
"range",
|
|
12
|
+
"reset",
|
|
13
|
+
"submit"
|
|
14
|
+
]);
|
|
15
|
+
/** The element a right-click landed on; a text node answers for its parent. */
|
|
16
|
+
const elementOf = (target) => {
|
|
17
|
+
if (target instanceof Element) return target;
|
|
18
|
+
if (target instanceof Node) return target.parentElement;
|
|
19
|
+
return null;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* What a `contenteditable` value means under the HTML standard: its keywords
|
|
23
|
+
* match ASCII case-insensitively, the empty string means "true", and an
|
|
24
|
+
* invalid value inherits from the parent.
|
|
25
|
+
*/
|
|
26
|
+
const contentEditableState = (value) => {
|
|
27
|
+
if (value === null) return "inherit";
|
|
28
|
+
switch (value.toLowerCase()) {
|
|
29
|
+
case "":
|
|
30
|
+
case "true":
|
|
31
|
+
case "plaintext-only": return "editable";
|
|
32
|
+
case "false": return "not-editable";
|
|
33
|
+
default: return "inherit";
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
/** The element is, or sits inside, text the user can edit. */
|
|
37
|
+
const isEditableContextMenuTarget = (element) => {
|
|
38
|
+
const field = element.closest("input, textarea");
|
|
39
|
+
if (field !== null) {
|
|
40
|
+
const type = field.getAttribute("type")?.toLowerCase() ?? "text";
|
|
41
|
+
if (field.tagName.toLowerCase() === "textarea") return true;
|
|
42
|
+
return !NON_TEXT_INPUT_TYPES.has(type);
|
|
43
|
+
}
|
|
44
|
+
for (let current = element.closest("[contenteditable]"); current !== null; current = current.parentElement?.closest("[contenteditable]") ?? null) {
|
|
45
|
+
const state = contentEditableState(current.getAttribute("contenteditable"));
|
|
46
|
+
if (state !== "inherit") return state === "editable";
|
|
47
|
+
}
|
|
48
|
+
return false;
|
|
49
|
+
};
|
|
50
|
+
/** The element is, or sits inside, a link with a destination. */
|
|
51
|
+
const isLinkContextMenuTarget = (element) => element.closest("a[href]") !== null;
|
|
52
|
+
/** A non-empty text selection covers the element. */
|
|
53
|
+
const isSelectedTextContextMenuTarget = (element) => {
|
|
54
|
+
const selection = element.ownerDocument.defaultView?.getSelection() ?? null;
|
|
55
|
+
if (selection === null || selection.isCollapsed) return false;
|
|
56
|
+
if (selection.toString().trim() === "") return false;
|
|
57
|
+
for (let index = 0; index < selection.rangeCount; index += 1) if (selection.getRangeAt(index).intersectsNode(element)) return true;
|
|
58
|
+
return false;
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* Why this right-click keeps the browser's menu on an object, or null when
|
|
62
|
+
* the object's own actions open instead.
|
|
63
|
+
*/
|
|
64
|
+
const nativeContextMenuReason = (event) => {
|
|
65
|
+
if (event.shiftKey) return "shift";
|
|
66
|
+
const element = elementOf(event.target);
|
|
67
|
+
if (element === null) return null;
|
|
68
|
+
if (isEditableContextMenuTarget(element)) return "editable";
|
|
69
|
+
if (isSelectedTextContextMenuTarget(element)) return "selection";
|
|
70
|
+
if (isLinkContextMenuTarget(element)) return "link";
|
|
71
|
+
return null;
|
|
72
|
+
};
|
|
73
|
+
/**
|
|
74
|
+
* The narrower rule a desktop webview applies to a right-click nothing in the
|
|
75
|
+
* page handled: only editable or selected text keeps a (text) menu, since
|
|
76
|
+
* the webview's native menu elsewhere offers browser items such as reload.
|
|
77
|
+
*/
|
|
78
|
+
const nativeTextContextMenuReason = (event) => {
|
|
79
|
+
const element = elementOf(event.target);
|
|
80
|
+
if (element === null) return null;
|
|
81
|
+
if (isEditableContextMenuTarget(element)) return "editable";
|
|
82
|
+
if (isSelectedTextContextMenuTarget(element)) return "selection";
|
|
83
|
+
return null;
|
|
84
|
+
};
|
|
85
|
+
export { isEditableContextMenuTarget, isLinkContextMenuTarget, isSelectedTextContextMenuTarget, nativeContextMenuReason, nativeTextContextMenuReason };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/lib/option-color.d.ts
|
|
2
1
|
/**
|
|
3
2
|
* The kit's colour token for user-chosen option colours.
|
|
4
3
|
*
|
|
@@ -23,5 +22,4 @@ export declare const emptyColor: ColorVariants;
|
|
|
23
22
|
/** Resolve any OptionColor (named or hex) to CSS color variants. */
|
|
24
23
|
export declare const resolveOptionColor: (color: OptionColor) => ColorVariants;
|
|
25
24
|
/** The 16 named preset color keys. */
|
|
26
|
-
export declare const optionColors: readonly OptionColor[];
|
|
27
|
-
//#endregion
|
|
25
|
+
export declare const optionColors: readonly OptionColor[];
|
package/dist/lib/option-color.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/lib/option-color.ts
|
|
2
2
|
/** Named preset colors with CSS variable references. */
|
|
3
3
|
const NAMED_COLORS = Object.freeze([
|
|
4
4
|
"red",
|
|
@@ -55,5 +55,4 @@ const resolveOptionColor = (color) => {
|
|
|
55
55
|
};
|
|
56
56
|
/** The 16 named preset color keys. */
|
|
57
57
|
const optionColors = NAMED_COLORS;
|
|
58
|
-
//#endregion
|
|
59
58
|
export { emptyColor, optionColors, resolveOptionColor };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/lib/overlay-layer.d.ts
|
|
2
1
|
export declare const BOARD_DRAG_OVERLAY_Z_INDEX = 75;
|
|
3
2
|
/**
|
|
4
3
|
* The shell's own sticky chrome: its top bar, and anything else the shell pins
|
|
@@ -45,5 +44,4 @@ export type OverlayLayer = keyof typeof OVERLAY_LAYER_CLASS_NAMES;
|
|
|
45
44
|
* viewport edge once `shift()` has to move a popup that is wider than its
|
|
46
45
|
* anchor, which reads as a clipped surface rather than a repositioned one.
|
|
47
46
|
*/
|
|
48
|
-
export declare const OVERLAY_COLLISION_PADDING = 8;
|
|
49
|
-
//#endregion
|
|
47
|
+
export declare const OVERLAY_COLLISION_PADDING = 8;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/lib/overlay-layer.ts
|
|
2
2
|
const BOARD_DRAG_OVERLAY_Z_INDEX = 75;
|
|
3
3
|
/**
|
|
4
4
|
* The shell's own sticky chrome: its top bar, and anything else the shell pins
|
|
@@ -45,5 +45,4 @@ const OVERLAY_LAYER_CLASS_NAMES = {
|
|
|
45
45
|
* anchor, which reads as a clipped surface rather than a repositioned one.
|
|
46
46
|
*/
|
|
47
47
|
const OVERLAY_COLLISION_PADDING = 8;
|
|
48
|
-
//#endregion
|
|
49
48
|
export { BOARD_DRAG_OVERLAY_Z_INDEX, OVERLAY_COLLISION_PADDING, OVERLAY_LAYER_CLASS_NAMES, SHELL_CHROME_LAYER_CLASS_NAME };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/lib/panel-inset.d.ts
|
|
2
1
|
/** Shared geometry contract between docked chrome and document side panels. */
|
|
3
2
|
export declare const DOCUMENT_PANEL_BOTTOM_INSET = "--document-panel-bottom-inset";
|
|
4
3
|
export declare const DOCUMENT_PANEL_SAFE_BOTTOM = "max(env(safe-area-inset-bottom, 0px), var(--document-panel-bottom-inset, 0px))";
|
|
@@ -7,5 +6,4 @@ export declare const DOCUMENT_PANEL_SAFE_BOTTOM = "max(env(safe-area-inset-botto
|
|
|
7
6
|
* callback ref owns observation and cleanup, so growing composer/thread chrome
|
|
8
7
|
* changes every descendant panel without screen-specific padding estimates.
|
|
9
8
|
*/
|
|
10
|
-
export declare const publishDocumentPanelInset: (element: HTMLDivElement | null) => (() => void) | undefined;
|
|
11
|
-
//#endregion
|
|
9
|
+
export declare const publishDocumentPanelInset: (element: HTMLDivElement | null) => (() => void) | undefined;
|
package/dist/lib/panel-inset.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/lib/panel-inset.ts
|
|
2
2
|
/** Shared geometry contract between docked chrome and document side panels. */
|
|
3
3
|
const DOCUMENT_PANEL_BOTTOM_INSET = "--document-panel-bottom-inset";
|
|
4
4
|
const DOCUMENT_PANEL_SAFE_BOTTOM = "max(env(safe-area-inset-bottom, 0px), var(--document-panel-bottom-inset, 0px))";
|
|
@@ -29,5 +29,4 @@ const publishDocumentPanelInset = (element) => {
|
|
|
29
29
|
host.style.removeProperty(DOCUMENT_PANEL_BOTTOM_INSET);
|
|
30
30
|
};
|
|
31
31
|
};
|
|
32
|
-
//#endregion
|
|
33
32
|
export { DOCUMENT_PANEL_BOTTOM_INSET, DOCUMENT_PANEL_SAFE_BOTTOM, publishDocumentPanelInset };
|
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
//#region src/lib/positioner-sizing.d.ts
|
|
2
1
|
export declare const CONTENT_SIZED_POSITIONER_CLASS_NAME = "w-max max-w-(--available-width)";
|
|
3
|
-
export declare const IN_FLOW_POPUP_CLASS_NAME = "relative!";
|
|
4
|
-
//#endregion
|
|
2
|
+
export declare const IN_FLOW_POPUP_CLASS_NAME = "relative!";
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/lib/positioner-sizing.ts
|
|
2
2
|
const CONTENT_SIZED_POSITIONER_CLASS_NAME = "w-max max-w-(--available-width)";
|
|
3
3
|
const IN_FLOW_POPUP_CLASS_NAME = "relative!";
|
|
4
|
-
//#endregion
|
|
5
4
|
export { CONTENT_SIZED_POSITIONER_CLASS_NAME, IN_FLOW_POPUP_CLASS_NAME };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Whether React draws nothing for this node: `null`, `undefined`, a boolean,
|
|
4
|
+
* an empty string, or a list of only such nodes. A slot that sits empty
|
|
5
|
+
* (an `icon=""`, a `{flag && value}` that came out `true`, an empty `.map`)
|
|
6
|
+
* is then treated as absent rather than given a box.
|
|
7
|
+
*/
|
|
8
|
+
export declare function rendersNothing(node: ReactNode): boolean;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// src/lib/renders-nothing.ts
|
|
2
|
+
/**
|
|
3
|
+
* Whether React draws nothing for this node: `null`, `undefined`, a boolean,
|
|
4
|
+
* an empty string, or a list of only such nodes. A slot that sits empty
|
|
5
|
+
* (an `icon=""`, a `{flag && value}` that came out `true`, an empty `.map`)
|
|
6
|
+
* is then treated as absent rather than given a box.
|
|
7
|
+
*/
|
|
8
|
+
function rendersNothing(node) {
|
|
9
|
+
if (node === null || node === void 0 || typeof node === "boolean") return true;
|
|
10
|
+
if (typeof node === "string") return node === "";
|
|
11
|
+
if (Array.isArray(node)) return node.every((child) => rendersNothing(child));
|
|
12
|
+
return false;
|
|
13
|
+
}
|
|
14
|
+
export { rendersNothing };
|