@asymmetric-effort/specifyjs 0.2.151 → 0.2.153

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.
@@ -1,4 +1,4 @@
1
- import type { BoardState } from './types';
1
+ import type { BoardState, BoardItem } from './types';
2
2
  import type { BoardAction } from './BoardReducer';
3
3
  export interface BoardProps {
4
4
  state: BoardState;
@@ -9,7 +9,20 @@ export interface BoardProps {
9
9
  searchQuery?: string;
10
10
  colorFilter?: string | null;
11
11
  onOpenProject?: (projectId: string) => void;
12
+ onCardContextMenu?: (cardId: string, pos: {
13
+ x: number;
14
+ y: number;
15
+ }) => void;
16
+ onUpdateItem?: (cardId: string, updates: {
17
+ card_title?: string;
18
+ content?: unknown;
19
+ }) => void;
12
20
  }
21
+ /**
22
+ * Find the first container whose bounding box contains the given point.
23
+ * Optionally excludes a specific item ID (e.g., the dragged item itself).
24
+ */
25
+ export declare function findContainerAtPoint(collection: BoardItem[], x: number, y: number, excludeId?: string): string | null;
13
26
  export declare function snapToGrid(pos: {
14
27
  x: number;
15
28
  y: number;
@@ -20,5 +20,19 @@ export interface CardComponentProps {
20
20
  onDelete?: (cardId: string) => void;
21
21
  dispatch?: (action: BoardAction) => void;
22
22
  onOpenProject?: (projectId: string) => void;
23
+ onCardContextMenu?: (cardId: string, pos: {
24
+ x: number;
25
+ y: number;
26
+ }) => void;
27
+ onUpdate?: (cardId: string, updates: {
28
+ card_title?: string;
29
+ content?: unknown;
30
+ }) => void;
31
+ onDragStart?: (cardId: string) => void;
32
+ onDragEnd?: (cardId: string) => void;
33
+ onAnchorDragStart?: (cardId: string, anchor: string, pos: {
34
+ x: number;
35
+ y: number;
36
+ }) => void;
23
37
  }
24
38
  export declare function CardComponent(props: CardComponentProps): import("specifyjs/shared/types").SpecElement<import("specifyjs/shared/types").Props>;
@@ -7,6 +7,10 @@ export interface CardLinkOverlayProps {
7
7
  cards: Card[];
8
8
  selectedLinkId: string | null;
9
9
  onSelectLink: (linkId: string | null) => void;
10
+ onLinkContextMenu?: (linkId: string, cardId: string, pos: {
11
+ x: number;
12
+ y: number;
13
+ }) => void;
10
14
  canvasWidth: number;
11
15
  canvasHeight: number;
12
16
  }
@@ -2,6 +2,7 @@ import type { Container } from './types';
2
2
  export interface ContainerComponentProps {
3
3
  container: Container;
4
4
  selected?: boolean;
5
+ highlighted?: boolean;
5
6
  onSelect?: (containerId: string) => void;
6
7
  onMove?: (containerId: string, position: {
7
8
  x: number;
@@ -11,6 +12,7 @@ export interface ContainerComponentProps {
11
12
  width: number;
12
13
  height: number;
13
14
  }) => void;
15
+ onDelete?: (containerId: string) => void;
14
16
  onDrop?: (itemId: string, containerId: string) => void;
15
17
  children?: unknown;
16
18
  }
@@ -1,15 +1,6 @@
1
- export type { Card, CardLink, BoardState, BoardItem } from './types';
2
- export type { BoardStorage } from './types';
3
- export { useBoardState, boardReducer, historyReducer, DEFAULT_BOARD_STATE } from './BoardState';
4
- export type { BoardAction, HistoryState, UseBoardStateResult } from './BoardState';
5
- export { LocalBoardStorage } from './LocalStorage';
6
- export { Card as CardComponent } from './Card';
7
- export { CardEditor } from './CardEditor';
8
- export { ConnectionsOverlay } from './Connection';
9
- export { BoardToolbar, CARD_COLORS } from './Toolbar';
10
- export { Board, snapToGrid, screenToCanvas, computeFitAll } from './Board';
11
- export { InterAppWrapper } from './InterApp';
12
1
  export interface ProjectManagerAppProps {
13
2
  boardId?: string;
3
+ /** Called when the project name changes — consumer should update the window title */
4
+ onTitleChange?: (title: string) => void;
14
5
  }
15
6
  export declare function ProjectManagerApp(props: ProjectManagerAppProps): import("specifyjs").SpecElement<import("specifyjs").Props>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@asymmetric-effort/specifyjs",
3
- "version": "0.2.151",
3
+ "version": "0.2.153",
4
4
  "description": "A declarative TypeScript UI framework built for performance and simplicity",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -95,7 +95,7 @@
95
95
  ],
96
96
  "license": "MIT",
97
97
  "devDependencies": {
98
- "@asymmetric-effort/nogginlessdom": "^0.0.22",
98
+ "@asymmetric-effort/nogginlessdom": "^0.0.25",
99
99
  "@playwright/test": "^1.59.0",
100
100
  "@types/node": "^25.6.2",
101
101
  "@typescript-eslint/eslint-plugin": "^8.0.0",
@@ -1,11 +0,0 @@
1
- /**
2
- * Card.ts -- Re-exports the CardComponent from the reusable Board library.
3
- * Keeps demo-specific constants (context menu colors, priority options).
4
- */
5
- export { CardComponent as Card, PRIORITY_COLORS, CARD_TYPE_OPTIONS } from '../../../components/data/board/src/Card';
6
- export type { CardComponentProps as CardProps } from '../../../components/data/board/src/Card';
7
- export declare const CONTEXT_MENU_COLORS: string[];
8
- export declare const PRIORITY_OPTIONS: Array<{
9
- label: string;
10
- value: 'low' | 'medium' | 'high' | 'critical';
11
- }>;
@@ -1,10 +0,0 @@
1
- import type { Card } from './types';
2
- export interface CardEditorProps {
3
- card: Card;
4
- onSave: (cardId: string, updates: {
5
- title: string;
6
- description: string;
7
- }) => void;
8
- onClose: () => void;
9
- }
10
- export declare function CardEditor(props: CardEditorProps): import("specifyjs").SpecElement<import("specifyjs").Props>;
@@ -1,6 +0,0 @@
1
- /**
2
- * Connection.ts -- Re-exports the CardLinkOverlay from the reusable Board library.
3
- * The old ConnectionsOverlay is replaced by CardLinkOverlay.
4
- */
5
- export { CardLinkOverlay as ConnectionsOverlay } from '../../../components/data/board/src/CardLink';
6
- export type { CardLinkOverlayProps as ConnectionsOverlayProps } from '../../../components/data/board/src/CardLink';