@pstdio/ui 0.16.0 → 0.17.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/chat-ui.js +1618 -1102
- package/dist/chat-ui.js.map +1 -1
- package/dist/{checkbox-D5AzFRlb.js → checkbox-B2zYVemL.js} +28 -28
- package/dist/checkbox-B2zYVemL.js.map +1 -0
- package/dist/components/chat-ui/components/chat-input-actions.d.ts +1 -0
- package/dist/components/chat-ui/components/chat-input.d.ts +8 -2
- package/dist/components/chat-ui/components/chat-panel.d.ts +11 -5
- package/dist/components/chat-ui/components/composer-constants.d.ts +1 -0
- package/dist/components/chat-ui/components/conversation-browse.d.ts +22 -0
- package/dist/components/chat-ui/components/message-types.d.ts +14 -0
- package/dist/components/chat-ui/components/queued-follow-up-list-state.d.ts +4 -0
- package/dist/components/chat-ui/components/queued-follow-up-list.d.ts +11 -0
- package/dist/components/chat-ui/components/timeline.d.ts +5 -0
- package/dist/components/chat-ui/components/working-indicator.d.ts +9 -0
- package/dist/components/chat-ui/components/workspace-hub.d.ts +8 -1
- package/dist/components/chat-ui/index.d.ts +4 -2
- package/dist/components/chat-ui/tool-rendering/build-timeline.d.ts +2 -2
- package/dist/components/chat-ui/tool-rendering/question-prompt.d.ts +9 -0
- package/dist/components/data-table/build-columns.d.ts +13 -2
- package/dist/components/data-table/categorical-color-cell.d.ts +8 -0
- package/dist/components/data-table/color-cell-style.d.ts +13 -0
- package/dist/components/data-table/color-scale-cell.d.ts +7 -0
- package/dist/components/data-table/data-table-column-menu.d.ts +12 -0
- package/dist/components/data-table/data-table-header.d.ts +18 -0
- package/dist/components/data-table/data-table-stat-chart.d.ts +21 -0
- package/dist/components/data-table/data-table-state.d.ts +27 -0
- package/dist/components/data-table/data-table-stats-row.d.ts +11 -0
- package/dist/components/data-table/data-table-stats.d.ts +19 -0
- package/dist/components/data-table/data-table-table-parts.d.ts +21 -0
- package/dist/components/data-table/data-table.story-descriptions.d.ts +6 -0
- package/dist/components/data-table/data-table.story-fixtures.d.ts +6 -0
- package/dist/components/data-table/friendly-json-display.d.ts +31 -0
- package/dist/components/data-table/index.d.ts +3 -1
- package/dist/components/data-table/json-cell.d.ts +6 -0
- package/dist/components/data-table/pagination-footer.d.ts +4 -1
- package/dist/components/data-table/selection-toolbar.d.ts +3 -1
- package/dist/components/data-table/types.d.ts +72 -0
- package/dist/components/{data-renderer → kanban-renderer}/display-menu.d.ts +4 -4
- package/dist/components/{data-renderer → kanban-renderer}/filter-menu.d.ts +3 -3
- package/dist/components/kanban-renderer/index.d.ts +19 -0
- package/dist/components/kanban-renderer/kanban-renderer-attribute-badge.d.ts +7 -0
- package/dist/components/{data-renderer/data-renderer-board-column-header.d.ts → kanban-renderer/kanban-renderer-board-column-header.d.ts} +2 -2
- package/dist/components/{data-renderer/data-renderer-board-group-section.d.ts → kanban-renderer/kanban-renderer-board-group-section.d.ts} +2 -2
- package/dist/components/{data-renderer/data-renderer-board-move.d.ts → kanban-renderer/kanban-renderer-board-move.d.ts} +3 -3
- package/dist/components/{data-renderer/data-renderer-board.d.ts → kanban-renderer/kanban-renderer-board.d.ts} +15 -14
- package/dist/components/{data-renderer/data-renderer-card.d.ts → kanban-renderer/kanban-renderer-card.d.ts} +4 -3
- package/dist/components/{data-renderer/data-renderer-content.d.ts → kanban-renderer/kanban-renderer-content.d.ts} +8 -8
- package/dist/components/kanban-renderer/kanban-renderer-create-dialog.d.ts +12 -0
- package/dist/components/kanban-renderer/kanban-renderer-create-field.d.ts +10 -0
- package/dist/components/kanban-renderer/kanban-renderer-grouping.d.ts +23 -0
- package/dist/components/{data-renderer/data-renderer-helpers.d.ts → kanban-renderer/kanban-renderer-helpers.d.ts} +15 -15
- package/dist/components/kanban-renderer/kanban-renderer-list-items.d.ts +25 -0
- package/dist/components/kanban-renderer/kanban-renderer-list.d.ts +43 -0
- package/dist/components/{data-renderer/data-renderer-story-fixtures.d.ts → kanban-renderer/kanban-renderer-story-fixtures.d.ts} +3 -2
- package/dist/components/kanban-renderer/kanban-renderer-toolbar.d.ts +15 -0
- package/dist/components/kanban-renderer/kanban-renderer-view-bar.d.ts +14 -0
- package/dist/components/kanban-renderer/kanban-renderer-views.d.ts +12 -0
- package/dist/components/{data-renderer/data-renderer.d.ts → kanban-renderer/kanban-renderer.d.ts} +11 -8
- package/dist/components/{data-renderer → kanban-renderer}/types.d.ts +51 -8
- package/dist/components/kanban-renderer/use-kanban-renderer-store.d.ts +78 -0
- package/dist/components/layout/index.d.ts +1 -0
- package/dist/components/layout/panel-header.constants.d.ts +2 -0
- package/dist/components/layout/resizable-split-layout.d.ts +3 -2
- package/dist/components/layout/resizable-split-layout.geometry.d.ts +56 -0
- package/dist/components/layout/resizable-split-layout.handle.d.ts +6 -2
- package/dist/components/layout/resizable-split-layout.panels.d.ts +25 -0
- package/dist/components/list-row/list-row-actions.d.ts +1 -0
- package/dist/components/list-row/list-row-content.d.ts +7 -0
- package/dist/components/list-row/list-row.types.d.ts +4 -1
- package/dist/components/overlays/attached-menu.d.ts +6 -0
- package/dist/components/overlays/attachment-chip.d.ts +13 -0
- package/dist/components/overlays/index.d.ts +6 -2
- package/dist/components/overlays/resource-context-menu.d.ts +13 -1
- package/dist/components/param-editor/index.d.ts +2 -1
- package/dist/components/param-editor/inputs/selection-input.d.ts +6 -6
- package/dist/components/param-editor/inputs/selection-menu.d.ts +29 -0
- package/dist/components/param-editor/param-editor-horizontal.d.ts +1 -0
- package/dist/components/param-editor/param-editor-read-only-field.d.ts +9 -0
- package/dist/components/param-editor/param-editor-section.d.ts +1 -0
- package/dist/components/param-editor/param-editor.d.ts +1 -0
- package/dist/components/param-editor/param-editor.types.d.ts +35 -6
- package/dist/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/ReferenceMenuPlugin.d.ts +2 -1
- package/dist/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/hooks/useContextLookup.d.ts +2 -1
- package/dist/components/rich-text/prompt-input/plugins/ReferencePlugin/ReferencePlugin.d.ts +2 -1
- package/dist/components/rich-text/prompt-input/prompt-input.d.ts +3 -2
- package/dist/components/rich-text/types.d.ts +1 -1
- package/dist/components/{sidebar/sidebar-footer.d.ts → sidenav/sidenav-footer.d.ts} +2 -2
- package/dist/components/{sidebar/sidebar-header.d.ts → sidenav/sidenav-header.d.ts} +2 -2
- package/dist/components/sidenav/sidenav.d.ts +2 -0
- package/dist/components/sidenav/sidenav.store.d.ts +49 -0
- package/dist/components/{sidebar/sidebar.types.d.ts → sidenav/sidenav.types.d.ts} +5 -5
- package/dist/components/tab-strip/tab-visibility-filter.d.ts +1 -0
- package/dist/components/terminal/terminal.d.ts +11 -0
- package/dist/components/tree-list/tree-list-visibility-filter.d.ts +0 -1
- package/dist/components/tree-list/tree-list.d.ts +1 -1
- package/dist/components/tree-list/tree-list.types.d.ts +4 -0
- package/dist/data-table.js +1271 -0
- package/dist/data-table.js.map +1 -0
- package/dist/diff.js +2 -2
- package/dist/index.d.ts +3 -3
- package/dist/index.js +1885 -3360
- package/dist/index.js.map +1 -1
- package/dist/kanban-renderer-toolbar-B9ro-9z1.js +1318 -0
- package/dist/kanban-renderer-toolbar-B9ro-9z1.js.map +1 -0
- package/dist/kanban-renderer.js +1087 -0
- package/dist/kanban-renderer.js.map +1 -0
- package/dist/list-row-YRUxEcy3.js +808 -0
- package/dist/list-row-YRUxEcy3.js.map +1 -0
- package/dist/param-editor-CYZJbmKu.js +933 -0
- package/dist/param-editor-CYZJbmKu.js.map +1 -0
- package/dist/param-editor-read-only-field-DgtLqcFa.js +925 -0
- package/dist/param-editor-read-only-field-DgtLqcFa.js.map +1 -0
- package/dist/prism-BXb57lxL.js +125 -0
- package/dist/prism-BXb57lxL.js.map +1 -0
- package/dist/rich-message-DBf_5YlW.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/terminal.js +197 -177
- package/dist/terminal.js.map +1 -1
- package/dist/theme/primitives/sizes.d.ts +23 -0
- package/dist/theme/recipes/button.d.ts +6 -0
- package/dist/theme/recipes/tabs.d.ts +4 -4
- package/dist/theme/tokens/colors.d.ts +18 -24
- package/dist/{theme-CJBYBJaA.js → theme-CNhnbvcE.js} +208 -162
- package/dist/theme-CNhnbvcE.js.map +1 -0
- package/dist/theme.js +1 -1
- package/dist/tree-list-CZHLAURU.js +1033 -0
- package/dist/tree-list-CZHLAURU.js.map +1 -0
- package/package.json +10 -4
- package/dist/checkbox-D5AzFRlb.js.map +0 -1
- package/dist/components/data-renderer/card-interaction-guard.d.ts +0 -2
- package/dist/components/data-renderer/data-renderer-attribute-badge.d.ts +0 -7
- package/dist/components/data-renderer/data-renderer-grouping.d.ts +0 -23
- package/dist/components/data-renderer/data-renderer-list.d.ts +0 -39
- package/dist/components/data-renderer/data-renderer-toolbar.d.ts +0 -12
- package/dist/components/data-renderer/index.d.ts +0 -18
- package/dist/components/data-renderer/use-data-renderer-store.d.ts +0 -59
- package/dist/components/sidebar/sidebar.d.ts +0 -2
- package/dist/components/sidebar/sidebar.store.d.ts +0 -49
- package/dist/data-renderer.js +0 -1669
- package/dist/data-renderer.js.map +0 -1
- package/dist/list-row-mi3Hn-Um.js +0 -740
- package/dist/list-row-mi3Hn-Um.js.map +0 -1
- package/dist/theme-CJBYBJaA.js.map +0 -1
- package/dist/tree-list-CcuZMLS5.js +0 -930
- package/dist/tree-list-CcuZMLS5.js.map +0 -1
- package/dist/workspace-badge-Fuo-1zPj.js +0 -314
- package/dist/workspace-badge-Fuo-1zPj.js.map +0 -1
- /package/dist/components/{data-renderer/data-renderer-badge-helpers.d.ts → kanban-renderer/kanban-renderer-badge-helpers.d.ts} +0 -0
- /package/dist/components/{data-renderer/data-renderer-enum-helpers.d.ts → kanban-renderer/kanban-renderer-enum-helpers.d.ts} +0 -0
- /package/dist/components/{data-renderer → kanban-renderer}/use-resolved-attributes.d.ts +0 -0
|
@@ -51,13 +51,13 @@ export interface AttributeDescriptor {
|
|
|
51
51
|
displayable?: boolean;
|
|
52
52
|
editable?: boolean;
|
|
53
53
|
display?: AttributeDisplayDescriptor;
|
|
54
|
-
render?: (value: unknown, row:
|
|
54
|
+
render?: (value: unknown, row: KanbanRendererRow) => ReactNode;
|
|
55
55
|
compare?: (a: unknown, b: unknown) => number;
|
|
56
56
|
}
|
|
57
57
|
/**
|
|
58
58
|
* Reactive source for an entire attribute schema. Mirrors React's
|
|
59
59
|
* useSyncExternalStore contract so consumers (e.g. the workbench's
|
|
60
|
-
*
|
|
60
|
+
* kanban-renderer bridge) can subscribe and re-resolve when the schema changes
|
|
61
61
|
* — letting a contribution add/remove/edit attributes at runtime without
|
|
62
62
|
* re-registering.
|
|
63
63
|
*/
|
|
@@ -66,7 +66,7 @@ export interface AttributesSource {
|
|
|
66
66
|
getSnapshot: () => AttributeDescriptor[];
|
|
67
67
|
}
|
|
68
68
|
export declare const isAttributesSource: (attributes: AttributeDescriptor[] | AttributesSource) => attributes is AttributesSource;
|
|
69
|
-
export interface
|
|
69
|
+
export interface KanbanRendererRow {
|
|
70
70
|
id: string;
|
|
71
71
|
title: string;
|
|
72
72
|
/**
|
|
@@ -77,19 +77,62 @@ export interface DataRendererRow {
|
|
|
77
77
|
resource?: unknown;
|
|
78
78
|
attributes: Record<string, unknown>;
|
|
79
79
|
}
|
|
80
|
-
export interface
|
|
80
|
+
export interface KanbanRendererOrdering {
|
|
81
81
|
attributeId: string | typeof MANUAL_ORDERING;
|
|
82
82
|
direction: SortDirection;
|
|
83
83
|
}
|
|
84
|
-
export interface
|
|
84
|
+
export interface KanbanRendererSettings {
|
|
85
85
|
viewMode: ViewMode;
|
|
86
86
|
columnGrouping: string | typeof NO_GROUPING;
|
|
87
87
|
rowGrouping: string | typeof NO_GROUPING;
|
|
88
|
-
ordering:
|
|
88
|
+
ordering: KanbanRendererOrdering;
|
|
89
89
|
displayProperties: string[];
|
|
90
90
|
}
|
|
91
|
-
export type
|
|
92
|
-
export
|
|
91
|
+
export type KanbanRendererFilterState = Record<string, string[]>;
|
|
92
|
+
export interface KanbanRendererSavedView {
|
|
93
|
+
id: string;
|
|
94
|
+
title: string;
|
|
95
|
+
settings: KanbanRendererSettings;
|
|
96
|
+
filters: KanbanRendererFilterState;
|
|
97
|
+
isDefault?: boolean;
|
|
98
|
+
}
|
|
99
|
+
export type KanbanRendererCreateFieldType = "text" | "longtext" | "markdown" | "number" | "boolean" | "select" | "multi-select" | "files";
|
|
100
|
+
export interface KanbanRendererCreateField {
|
|
101
|
+
id: string;
|
|
102
|
+
label: string;
|
|
103
|
+
description?: string;
|
|
104
|
+
placeholder?: string;
|
|
105
|
+
type: KanbanRendererCreateFieldType;
|
|
106
|
+
required?: boolean;
|
|
107
|
+
defaultValue?: unknown;
|
|
108
|
+
options?: EnumOption[];
|
|
109
|
+
/** `files` fields only. */
|
|
110
|
+
multiple?: boolean;
|
|
111
|
+
accept?: string;
|
|
112
|
+
}
|
|
113
|
+
/** Chrome copy is supplied by the caller so the dialog ships no strings of its own. */
|
|
114
|
+
export interface KanbanRendererCreateLabels {
|
|
115
|
+
cancel: string;
|
|
116
|
+
properties: string;
|
|
117
|
+
submitError: string;
|
|
118
|
+
removeFile: string;
|
|
119
|
+
}
|
|
120
|
+
export interface KanbanRendererCreateRowConfig {
|
|
121
|
+
title: string;
|
|
122
|
+
submitLabel: string;
|
|
123
|
+
fields: KanbanRendererCreateField[];
|
|
124
|
+
labels: KanbanRendererCreateLabels;
|
|
125
|
+
}
|
|
126
|
+
export interface KanbanRendererCreateSubmission {
|
|
127
|
+
columnId: string;
|
|
128
|
+
columnAttributeId?: string;
|
|
129
|
+
/** Declared field values, excluding `files` fields — those arrive as `files`. */
|
|
130
|
+
values: Record<string, unknown>;
|
|
131
|
+
/** Every editable attribute the user set, keyed by attribute id. */
|
|
132
|
+
attributeValues: Record<string, unknown>;
|
|
133
|
+
files: File[];
|
|
134
|
+
}
|
|
135
|
+
export declare const DEFAULT_KANBAN_RENDERER_SETTINGS: KanbanRendererSettings;
|
|
93
136
|
/**
|
|
94
137
|
* Look up an attribute by id from a contribution-provided descriptor list.
|
|
95
138
|
* Returns undefined for sentinels ("none", "manual") or unknown ids.
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { KanbanRendererFilterState, KanbanRendererSavedView, KanbanRendererSettings } from './types';
|
|
2
|
+
interface KanbanRendererSnapshot {
|
|
3
|
+
settings: KanbanRendererSettings;
|
|
4
|
+
filters: KanbanRendererFilterState;
|
|
5
|
+
expandedGroups: Record<string, boolean>;
|
|
6
|
+
views: KanbanRendererSavedView[];
|
|
7
|
+
activeViewId: string;
|
|
8
|
+
}
|
|
9
|
+
interface KanbanRendererStoreInitialState {
|
|
10
|
+
settings?: Partial<KanbanRendererSettings>;
|
|
11
|
+
filters?: KanbanRendererFilterState;
|
|
12
|
+
expandedGroups?: Record<string, boolean>;
|
|
13
|
+
views?: KanbanRendererSavedView[];
|
|
14
|
+
activeViewId?: string;
|
|
15
|
+
}
|
|
16
|
+
interface KanbanRendererState extends KanbanRendererSnapshot {
|
|
17
|
+
setViewMode: (viewMode: KanbanRendererSettings["viewMode"]) => void;
|
|
18
|
+
setColumnGrouping: (columnGrouping: KanbanRendererSettings["columnGrouping"]) => void;
|
|
19
|
+
setRowGrouping: (rowGrouping: KanbanRendererSettings["rowGrouping"]) => void;
|
|
20
|
+
setOrdering: (ordering: KanbanRendererSettings["ordering"]) => void;
|
|
21
|
+
setOrderingAttributeId: (attributeId: KanbanRendererSettings["ordering"]["attributeId"]) => void;
|
|
22
|
+
setDisplayProperties: (displayProperties: string[]) => void;
|
|
23
|
+
toggleSortDirection: () => void;
|
|
24
|
+
toggleDisplayProperty: (property: string) => void;
|
|
25
|
+
setFilter: (attributeId: string, values: string[]) => void;
|
|
26
|
+
toggleFilterValue: (attributeId: string, value: string) => void;
|
|
27
|
+
clearFilter: (attributeId: string) => void;
|
|
28
|
+
clearAllFilters: () => void;
|
|
29
|
+
setExpandedGroup: (groupId: string, isExpanded: boolean) => void;
|
|
30
|
+
activateView: (viewId: string) => void;
|
|
31
|
+
createView: (view: {
|
|
32
|
+
id: string;
|
|
33
|
+
title: string;
|
|
34
|
+
}) => void;
|
|
35
|
+
saveActiveView: () => void;
|
|
36
|
+
resetActiveView: () => void;
|
|
37
|
+
renameView: (viewId: string, title: string) => void;
|
|
38
|
+
duplicateView: (viewId: string, duplicate: {
|
|
39
|
+
id: string;
|
|
40
|
+
title: string;
|
|
41
|
+
}) => void;
|
|
42
|
+
deleteView: (viewId: string) => void;
|
|
43
|
+
setDefaultView: (viewId: string) => void;
|
|
44
|
+
reset: () => void;
|
|
45
|
+
}
|
|
46
|
+
interface CreateKanbanRendererStoreOptions {
|
|
47
|
+
storageKey: string;
|
|
48
|
+
initialState?: KanbanRendererStoreInitialState;
|
|
49
|
+
}
|
|
50
|
+
export declare const createKanbanRendererStore: (options: CreateKanbanRendererStoreOptions) => Omit<import('zustand').StoreApi<KanbanRendererState>, "setState" | "persist"> & {
|
|
51
|
+
setState(partial: KanbanRendererState | Partial<KanbanRendererState> | ((state: KanbanRendererState) => KanbanRendererState | Partial<KanbanRendererState>), replace?: false | undefined): unknown;
|
|
52
|
+
setState(state: KanbanRendererState | ((state: KanbanRendererState) => KanbanRendererState), replace: true): unknown;
|
|
53
|
+
persist: {
|
|
54
|
+
setOptions: (options: Partial<import('zustand/middleware').PersistOptions<KanbanRendererState, unknown, unknown>>) => void;
|
|
55
|
+
clearStorage: () => void;
|
|
56
|
+
rehydrate: () => Promise<void> | void;
|
|
57
|
+
hasHydrated: () => boolean;
|
|
58
|
+
onHydrate: (fn: (state: KanbanRendererState) => void) => () => void;
|
|
59
|
+
onFinishHydration: (fn: (state: KanbanRendererState) => void) => () => void;
|
|
60
|
+
getOptions: () => Partial<import('zustand/middleware').PersistOptions<KanbanRendererState, unknown, unknown>>;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
export declare const getKanbanRendererStore: (storageKey: string, initialState?: KanbanRendererStoreInitialState) => Omit<import('zustand').StoreApi<KanbanRendererState>, "setState" | "persist"> & {
|
|
64
|
+
setState(partial: KanbanRendererState | Partial<KanbanRendererState> | ((state: KanbanRendererState) => KanbanRendererState | Partial<KanbanRendererState>), replace?: false | undefined): unknown;
|
|
65
|
+
setState(state: KanbanRendererState | ((state: KanbanRendererState) => KanbanRendererState), replace: true): unknown;
|
|
66
|
+
persist: {
|
|
67
|
+
setOptions: (options: Partial<import('zustand/middleware').PersistOptions<KanbanRendererState, unknown, unknown>>) => void;
|
|
68
|
+
clearStorage: () => void;
|
|
69
|
+
rehydrate: () => Promise<void> | void;
|
|
70
|
+
hasHydrated: () => boolean;
|
|
71
|
+
onHydrate: (fn: (state: KanbanRendererState) => void) => () => void;
|
|
72
|
+
onFinishHydration: (fn: (state: KanbanRendererState) => void) => () => void;
|
|
73
|
+
getOptions: () => Partial<import('zustand/middleware').PersistOptions<KanbanRendererState, unknown, unknown>>;
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
export declare const useKanbanRendererStore: <T>(storageKey: string, selector: (state: KanbanRendererState) => T, initialState?: KanbanRendererStoreInitialState) => T;
|
|
77
|
+
export declare const isActiveKanbanRendererViewDirty: (state: Pick<KanbanRendererState, "activeViewId" | "filters" | "settings" | "views">) => boolean;
|
|
78
|
+
export type { KanbanRendererSnapshot, KanbanRendererState, KanbanRendererStoreInitialState };
|
|
@@ -3,4 +3,5 @@ export { Header } from './header';
|
|
|
3
3
|
export { HorizontalMenuStack } from './horizontal-menu-stack';
|
|
4
4
|
export type { ItemSectionProps } from './item-section';
|
|
5
5
|
export { ItemSection } from './item-section';
|
|
6
|
+
export { PANEL_HEADER_CONTROL_SIZE, PANEL_HEADER_HEIGHT, PANEL_HEADER_TAB_SIZE, } from './panel-header.constants';
|
|
6
7
|
export { ResizableSplitLayout } from './resizable-split-layout';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FlexProps } from '@chakra-ui/react';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
import { ResizableSplitSide } from './resizable-split-layout.
|
|
3
|
+
import { ResizableSplitSide } from './resizable-split-layout.geometry';
|
|
4
4
|
interface ResizableSplitLayoutProps extends Omit<FlexProps, "children" | "onResize"> {
|
|
5
5
|
resizablePanel: ReactNode;
|
|
6
6
|
contentPanel: ReactNode;
|
|
@@ -12,8 +12,9 @@ interface ResizableSplitLayoutProps extends Omit<FlexProps, "children" | "onResi
|
|
|
12
12
|
collapsed?: boolean;
|
|
13
13
|
collapsible?: boolean;
|
|
14
14
|
resizeLabel?: string;
|
|
15
|
+
resizeHandleSizePx?: number;
|
|
15
16
|
showResizeSeparator?: boolean;
|
|
16
|
-
onSizeChange?: (
|
|
17
|
+
onSizeChange?: (size: number) => void;
|
|
17
18
|
onCollapsedChange?: (collapsed: boolean) => void;
|
|
18
19
|
}
|
|
19
20
|
export declare const ResizableSplitLayout: (props: ResizableSplitLayoutProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
export type ResizableSplitSide = "left" | "right" | "top" | "bottom";
|
|
2
|
+
export declare const getResizableSplitAxis: (side: ResizableSplitSide) => {
|
|
3
|
+
readonly rootDirection: "row";
|
|
4
|
+
readonly dimension: "width";
|
|
5
|
+
readonly separatorOrientation: "vertical";
|
|
6
|
+
readonly cursor: "col-resize";
|
|
7
|
+
readonly pointerCoordinate: "clientX";
|
|
8
|
+
readonly deltaDirection: 1;
|
|
9
|
+
readonly panelFirst: true;
|
|
10
|
+
} | {
|
|
11
|
+
readonly rootDirection: "row";
|
|
12
|
+
readonly dimension: "width";
|
|
13
|
+
readonly separatorOrientation: "vertical";
|
|
14
|
+
readonly cursor: "col-resize";
|
|
15
|
+
readonly pointerCoordinate: "clientX";
|
|
16
|
+
readonly deltaDirection: -1;
|
|
17
|
+
readonly panelFirst: false;
|
|
18
|
+
} | {
|
|
19
|
+
readonly rootDirection: "column";
|
|
20
|
+
readonly dimension: "height";
|
|
21
|
+
readonly separatorOrientation: "horizontal";
|
|
22
|
+
readonly cursor: "row-resize";
|
|
23
|
+
readonly pointerCoordinate: "clientY";
|
|
24
|
+
readonly deltaDirection: 1;
|
|
25
|
+
readonly panelFirst: true;
|
|
26
|
+
} | {
|
|
27
|
+
readonly rootDirection: "column";
|
|
28
|
+
readonly dimension: "height";
|
|
29
|
+
readonly separatorOrientation: "horizontal";
|
|
30
|
+
readonly cursor: "row-resize";
|
|
31
|
+
readonly pointerCoordinate: "clientY";
|
|
32
|
+
readonly deltaDirection: -1;
|
|
33
|
+
readonly panelFirst: false;
|
|
34
|
+
};
|
|
35
|
+
export declare const resolveResizableBounds: (input: {
|
|
36
|
+
rootSize: number;
|
|
37
|
+
fallbackRootSize: number;
|
|
38
|
+
minSize: number;
|
|
39
|
+
maxSize?: number;
|
|
40
|
+
contentMinSize: number;
|
|
41
|
+
}) => {
|
|
42
|
+
minSize: number;
|
|
43
|
+
maxSize: number;
|
|
44
|
+
};
|
|
45
|
+
export declare const resolveDraggedPanelSize: (input: {
|
|
46
|
+
side: ResizableSplitSide;
|
|
47
|
+
startSize: number;
|
|
48
|
+
pointerDelta: number;
|
|
49
|
+
minSize: number;
|
|
50
|
+
maxSize: number;
|
|
51
|
+
collapsible: boolean;
|
|
52
|
+
}) => {
|
|
53
|
+
rawSize: number;
|
|
54
|
+
size: number;
|
|
55
|
+
collapsed: boolean;
|
|
56
|
+
};
|
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
import { KeyboardEvent as ReactKeyboardEvent, PointerEvent as ReactPointerEvent } from 'react';
|
|
2
|
-
|
|
2
|
+
import { getResizableSplitAxis } from './resizable-split-layout.geometry';
|
|
3
3
|
interface ResizeHandleProps {
|
|
4
|
+
axis: ReturnType<typeof getResizableSplitAxis>;
|
|
4
5
|
bounds: {
|
|
5
6
|
minSize: number;
|
|
6
7
|
maxSize: number;
|
|
7
8
|
};
|
|
9
|
+
collapsed: boolean;
|
|
10
|
+
collapsible: boolean;
|
|
8
11
|
contentPanelId: string;
|
|
9
12
|
resizablePanelId: string;
|
|
13
|
+
resizeHandleSizePx: number;
|
|
10
14
|
resizeLabel: string;
|
|
11
|
-
|
|
15
|
+
resolvedPanelSize: number;
|
|
12
16
|
showResizeSeparator: boolean;
|
|
13
17
|
onResizeKeyDown: (event: ReactKeyboardEvent<HTMLDivElement>) => void;
|
|
14
18
|
onResizeStart: (event: ReactPointerEvent<HTMLDivElement>) => void;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { KeyboardEvent as ReactKeyboardEvent, ReactNode, PointerEvent as ReactPointerEvent, RefObject } from 'react';
|
|
2
|
+
import { getResizableSplitAxis } from './resizable-split-layout.geometry';
|
|
3
|
+
interface ResizableSplitPanelsProps {
|
|
4
|
+
axis: ReturnType<typeof getResizableSplitAxis>;
|
|
5
|
+
bounds: {
|
|
6
|
+
minSize: number;
|
|
7
|
+
maxSize: number;
|
|
8
|
+
};
|
|
9
|
+
collapsed: boolean;
|
|
10
|
+
collapsible: boolean;
|
|
11
|
+
contentPanel: ReactNode;
|
|
12
|
+
contentPanelId: string;
|
|
13
|
+
contentPanelRef: RefObject<HTMLDivElement | null>;
|
|
14
|
+
resizablePanel: ReactNode;
|
|
15
|
+
resizablePanelId: string;
|
|
16
|
+
resizablePanelRef: RefObject<HTMLDivElement | null>;
|
|
17
|
+
resizeHandleSizePx: number;
|
|
18
|
+
resizeLabel: string;
|
|
19
|
+
resolvedPanelSize: number;
|
|
20
|
+
showResizeSeparator: boolean;
|
|
21
|
+
onResizeKeyDown: (event: ReactKeyboardEvent<HTMLDivElement>) => void;
|
|
22
|
+
onResizeStart: (event: ReactPointerEvent<HTMLDivElement>) => void;
|
|
23
|
+
}
|
|
24
|
+
export declare const ResizableSplitPanels: (props: ResizableSplitPanelsProps) => import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export {};
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import { ListRowItem, ListRowProps } from './list-row.types';
|
|
2
|
+
export declare const createResourceRowActions: (item: ListRowItem, showContextMenuTrigger?: boolean) => import('./list-row.types').ListRowAction[] | {
|
|
3
|
+
id: string;
|
|
4
|
+
label: string;
|
|
5
|
+
icon: import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
menuItems: import('./list-row.types').ListRowActionMenuItem[];
|
|
7
|
+
}[];
|
|
2
8
|
export declare const ListRowContent: (props: {
|
|
3
9
|
item: ListRowItem;
|
|
4
10
|
isExpanded: boolean;
|
|
@@ -6,4 +12,5 @@ export declare const ListRowContent: (props: {
|
|
|
6
12
|
isDisabled: boolean;
|
|
7
13
|
tone: ListRowProps["tone"];
|
|
8
14
|
variant: ListRowProps["variant"];
|
|
15
|
+
showContextMenuTrigger: boolean;
|
|
9
16
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -13,6 +13,7 @@ export interface ListRowActionContext {
|
|
|
13
13
|
export interface ListRowActionMenuItem {
|
|
14
14
|
id: string;
|
|
15
15
|
label: string;
|
|
16
|
+
commandId?: string;
|
|
16
17
|
description?: string;
|
|
17
18
|
icon?: ReactNode | ComponentType<{
|
|
18
19
|
size?: number | string;
|
|
@@ -37,7 +38,7 @@ export interface ListRowAction {
|
|
|
37
38
|
menuItems?: ListRowActionMenuItem[];
|
|
38
39
|
onAction?: (context: ListRowActionContext) => void;
|
|
39
40
|
}
|
|
40
|
-
export type ListRowVariant = "default" | "compact" | "full-width" | "tree" | "empty-state";
|
|
41
|
+
export type ListRowVariant = "default" | "compact" | "collection" | "full-width" | "tree" | "empty-state";
|
|
41
42
|
export type ListRowTone = "default" | "danger";
|
|
42
43
|
export type ListRowMenuPlacement = "top" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end" | "right" | "right-start" | "right-end" | "left" | "left-start" | "left-end";
|
|
43
44
|
/** Data model for one reusable row, including labels, icons, menus, actions, and children. */
|
|
@@ -80,6 +81,8 @@ export interface ListRowProps extends ListRowItem, Omit<ListRowRootProps, "as" |
|
|
|
80
81
|
isExpanded?: boolean;
|
|
81
82
|
/** Forces the expand affordance when children are lazy-loaded or externally controlled. */
|
|
82
83
|
showExpandToggle?: boolean;
|
|
84
|
+
/** Shows context-menu actions from an inline trigger in addition to right-click access. */
|
|
85
|
+
showContextMenuTrigger?: boolean;
|
|
83
86
|
variant?: ListRowVariant;
|
|
84
87
|
tone?: ListRowTone;
|
|
85
88
|
selectedBg?: ListRowRootProps["bg"];
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { FlexProps } from '@chakra-ui/react';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
export interface AttachedMenuProps extends Omit<FlexProps, "children"> {
|
|
4
|
+
children?: ReactNode;
|
|
5
|
+
}
|
|
6
|
+
export declare const AttachedMenu: (props: AttachedMenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface AttachmentChipProps {
|
|
2
|
+
file: File;
|
|
3
|
+
/** Accessible label for the remove control; the caller owns translation. */
|
|
4
|
+
removeLabel: string;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
onRemove: () => void;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* A file queued for upload, before the resource it belongs to exists. Removal
|
|
10
|
+
* lives on the chip because there is no other surface between picking a file
|
|
11
|
+
* and submitting where a mistaken attachment can be taken back.
|
|
12
|
+
*/
|
|
13
|
+
export declare const AttachmentChip: (props: AttachmentChipProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,11 +1,15 @@
|
|
|
1
|
+
export type { AttachedMenuProps } from './attached-menu';
|
|
2
|
+
export { AttachedMenu } from './attached-menu';
|
|
1
3
|
export { AttachedPanel } from './attached-panel';
|
|
4
|
+
export type { AttachmentChipProps } from './attachment-chip';
|
|
5
|
+
export { AttachmentChip } from './attachment-chip';
|
|
2
6
|
export { BubbleButton } from './bubble-button';
|
|
3
7
|
export { BubblePanel } from './bubble-panel';
|
|
4
8
|
export { DeleteConfirmationModal } from './delete-confirmation-modal';
|
|
5
9
|
export type { RepoPickerDialogEntry, RepoPickerDialogProps } from './repo-picker-dialog';
|
|
6
10
|
export { RepoPickerDialog } from './repo-picker-dialog';
|
|
7
|
-
export type { ResourceContextAction } from './resource-context-menu';
|
|
8
|
-
export { ResourceContextMenu } from './resource-context-menu';
|
|
11
|
+
export type { ResourceActionMenuProps, ResourceContextAction } from './resource-context-menu';
|
|
12
|
+
export { ResourceActionMenu, ResourceContextMenu } from './resource-context-menu';
|
|
9
13
|
export type { SearchModalContentProps } from './search-modal-content';
|
|
10
14
|
export { SearchModalContent } from './search-modal-content';
|
|
11
15
|
export type { SearchableMenuItem, SearchableMenuParentList } from './searchable-menu';
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { Menu } from '@chakra-ui/react';
|
|
2
|
-
import { ComponentProps, ReactNode } from 'react';
|
|
2
|
+
import { ComponentProps, ReactElement, ReactNode } from 'react';
|
|
3
3
|
type MenuRootProps = ComponentProps<typeof Menu.Root>;
|
|
4
4
|
export interface ResourceContextAction {
|
|
5
5
|
key: string;
|
|
6
6
|
label: string;
|
|
7
|
+
commandId?: string;
|
|
7
8
|
onClick: () => Promise<void> | void;
|
|
8
9
|
isDisabled?: boolean;
|
|
9
10
|
icon?: ReactNode;
|
|
@@ -18,6 +19,17 @@ interface ResourceContextMenuProps {
|
|
|
18
19
|
positioning?: MenuRootProps["positioning"];
|
|
19
20
|
/** Keep the menu open after selecting an item — useful for menus that toggle several entries in one pass. */
|
|
20
21
|
closeOnSelect?: MenuRootProps["closeOnSelect"];
|
|
22
|
+
/** Preserve the trigger tree while actions load or change. */
|
|
23
|
+
keepMountedWhenEmpty?: boolean;
|
|
21
24
|
}
|
|
25
|
+
export interface ResourceActionMenuProps {
|
|
26
|
+
actions: ResourceContextAction[];
|
|
27
|
+
children: ReactElement;
|
|
28
|
+
contentMinWidth?: string;
|
|
29
|
+
contentBackground?: string;
|
|
30
|
+
positioning?: MenuRootProps["positioning"];
|
|
31
|
+
closeOnSelect?: MenuRootProps["closeOnSelect"];
|
|
32
|
+
}
|
|
33
|
+
export declare const ResourceActionMenu: (props: ResourceActionMenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
22
34
|
export declare const ResourceContextMenu: (props: ResourceContextMenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
23
35
|
export {};
|
|
@@ -14,12 +14,13 @@ export { TextInput } from './inputs/text-input';
|
|
|
14
14
|
export { VectorInput } from './inputs/vector-input';
|
|
15
15
|
export type { ParamEditorProps } from './param-editor';
|
|
16
16
|
export { ParamEditor } from './param-editor';
|
|
17
|
-
export type { ActionOption, ActionsParam, AnchorGridParam, AnchorGridValue, BaseParam, ColorParam, DateParam, FileDropParam, FileDropValue, InputGroup, NumberParam, Param, ParamValue, ParamValueMap, PropertyParam, RangeParam, RangeValue, ResourceOption, ResourceParam, ResourceRefValue, SegmentedOption, SegmentedParam, SelectionParam, TextParam, VectorParam, VectorValue, } from './param-editor.types';
|
|
17
|
+
export type { ActionOption, ActionsParam, AnchorGridParam, AnchorGridValue, BaseParam, ColorParam, DateParam, FileDropParam, FileDropValue, InputGroup, NumberParam, Param, ParamEditorReadOnlyContent, ParamEditorReadOnlyImage, ParamValue, ParamValueMap, PropertyParam, RangeParam, RangeValue, ReadOnlyParam, ResourceOption, ResourceParam, ResourceRefValue, SegmentedOption, SegmentedParam, SelectionParam, TextParam, VectorParam, VectorValue, } from './param-editor.types';
|
|
18
18
|
export { ParamEditorControlItem } from './param-editor-control-item';
|
|
19
19
|
export { ParamEditorControlList } from './param-editor-control-list';
|
|
20
20
|
export { ParamEditorField } from './param-editor-field';
|
|
21
21
|
export { ParamEditorFieldLabel } from './param-editor-field-label';
|
|
22
22
|
export { ParamEditorInlineGroup } from './param-editor-inline-group';
|
|
23
23
|
export { ParamEditorLabel } from './param-editor-label';
|
|
24
|
+
export { ParamEditorReadOnlyField } from './param-editor-read-only-field';
|
|
24
25
|
export { ParamEditorReadOnlyValue } from './param-editor-read-only-value';
|
|
25
26
|
export { ParamEditorSection } from './param-editor-section';
|
|
@@ -1,13 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
id: string;
|
|
3
|
-
name: string;
|
|
4
|
-
icon?: string;
|
|
5
|
-
}
|
|
1
|
+
import { SelectionMenuOption } from './selection-menu';
|
|
6
2
|
interface SelectionInputProps {
|
|
7
3
|
id: string;
|
|
8
4
|
defaultValue: string | string[];
|
|
9
5
|
name: string;
|
|
10
|
-
options:
|
|
6
|
+
options: SelectionMenuOption[];
|
|
11
7
|
onChange: (id: string, value: string | string[]) => void;
|
|
12
8
|
description: string;
|
|
13
9
|
readOnly?: boolean;
|
|
@@ -16,6 +12,10 @@ interface SelectionInputProps {
|
|
|
16
12
|
tooltipPlacement?: "top" | "right" | "bottom" | "left";
|
|
17
13
|
placeholder?: string;
|
|
18
14
|
fullWidth?: boolean;
|
|
15
|
+
/** Re-picking the selected option clears it. */
|
|
16
|
+
clearable?: boolean;
|
|
17
|
+
/** Inert, but still rendered as a control. */
|
|
18
|
+
disabled?: boolean;
|
|
19
19
|
}
|
|
20
20
|
export declare const SelectionInput: (props: SelectionInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
21
21
|
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface SelectionMenuOption {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
icon?: string;
|
|
6
|
+
/** Palette key (e.g. "blue") applied to the option's icon. */
|
|
7
|
+
color?: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface SelectionMenuProps {
|
|
11
|
+
triggerLabel: ReactNode;
|
|
12
|
+
options: SelectionMenuOption[];
|
|
13
|
+
selectedIds: string[];
|
|
14
|
+
multiSelect: boolean;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
fullWidth?: boolean;
|
|
17
|
+
onToggle: (optionId: string) => void;
|
|
18
|
+
}
|
|
19
|
+
export declare const selectionIndicator: (multiSelect: boolean, selected: boolean) => import("react/jsx-runtime").JSX.Element | null;
|
|
20
|
+
export declare const selectionOptionIcon: (option: SelectionMenuOption | undefined, boxSize: string) => import("react/jsx-runtime").JSX.Element | null;
|
|
21
|
+
/**
|
|
22
|
+
* The single dropdown behind every option picker in the editor — selection
|
|
23
|
+
* params and editable resource params alike. Sharing it is what keeps a
|
|
24
|
+
* resource attribute and a command param from drifting into two looks.
|
|
25
|
+
*
|
|
26
|
+
* Single-selects clear by re-picking the selected option; a dedicated "none"
|
|
27
|
+
* row would read as just another value to choose.
|
|
28
|
+
*/
|
|
29
|
+
export declare const SelectionMenu: (props: SelectionMenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -6,5 +6,6 @@ export interface ParamEditorHorizontalProps {
|
|
|
6
6
|
onChange: (id: string, value: ParamValue) => void;
|
|
7
7
|
readOnly?: boolean;
|
|
8
8
|
fullWidth?: boolean;
|
|
9
|
+
variant?: "default" | "small";
|
|
9
10
|
}
|
|
10
11
|
export declare const ParamEditorHorizontal: (props: ParamEditorHorizontalProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Param } from './param-editor.types';
|
|
2
|
+
interface ParamEditorReadOnlyFieldProps {
|
|
3
|
+
param: Extract<Param, {
|
|
4
|
+
type: "readOnly";
|
|
5
|
+
}>;
|
|
6
|
+
fullWidth?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare const ParamEditorReadOnlyField: (props: ParamEditorReadOnlyFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -11,6 +11,7 @@ interface ParamEditorSectionProps {
|
|
|
11
11
|
collapsible?: boolean;
|
|
12
12
|
defaultCollapsed?: boolean;
|
|
13
13
|
isFirst?: boolean;
|
|
14
|
+
variant?: "default" | "small";
|
|
14
15
|
}
|
|
15
16
|
export declare const ParamEditorSection: (props: ParamEditorSectionProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
17
|
export {};
|
|
@@ -7,5 +7,6 @@ export interface ParamEditorProps {
|
|
|
7
7
|
onOpenResource?: (ref: ResourceRefValue) => void;
|
|
8
8
|
readOnly?: boolean;
|
|
9
9
|
fullWidth?: boolean;
|
|
10
|
+
variant?: "default" | "small";
|
|
10
11
|
}
|
|
11
12
|
export declare const ParamEditor: (props: ParamEditorProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,6 +3,8 @@ export interface BaseParam {
|
|
|
3
3
|
id: string;
|
|
4
4
|
name: string;
|
|
5
5
|
description?: string;
|
|
6
|
+
/** Locks this one param while the rest of the editor stays editable. */
|
|
7
|
+
readOnly?: boolean;
|
|
6
8
|
}
|
|
7
9
|
export interface NumberParam extends BaseParam {
|
|
8
10
|
type: "number";
|
|
@@ -16,16 +18,26 @@ export interface TextParam extends BaseParam {
|
|
|
16
18
|
defaultValue: string;
|
|
17
19
|
singleLine?: boolean;
|
|
18
20
|
}
|
|
21
|
+
export interface SelectionOption {
|
|
22
|
+
id: string;
|
|
23
|
+
name: string;
|
|
24
|
+
icon?: string;
|
|
25
|
+
/** Palette key (e.g. "blue") applied to the option's icon. */
|
|
26
|
+
color?: string;
|
|
27
|
+
}
|
|
19
28
|
export interface SelectionParam extends BaseParam {
|
|
20
29
|
type: "selection";
|
|
21
30
|
defaultValue: string | string[];
|
|
22
|
-
options:
|
|
23
|
-
id: string;
|
|
24
|
-
name: string;
|
|
25
|
-
icon?: string;
|
|
26
|
-
}[];
|
|
31
|
+
options: SelectionOption[];
|
|
27
32
|
multiSelect?: boolean;
|
|
28
33
|
placeholder?: string;
|
|
34
|
+
/** Adds a "clear" row so a single-select can be returned to unset. */
|
|
35
|
+
clearable?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Renders the control inert but still as a control — unlike `readOnly`, which
|
|
38
|
+
* collapses it to plain text and drops the option's icon.
|
|
39
|
+
*/
|
|
40
|
+
disabled?: boolean;
|
|
29
41
|
}
|
|
30
42
|
export interface DateParam extends BaseParam {
|
|
31
43
|
type: "date";
|
|
@@ -41,6 +53,23 @@ export interface PropertyParam extends BaseParam {
|
|
|
41
53
|
type: "property";
|
|
42
54
|
value: ReactNode;
|
|
43
55
|
}
|
|
56
|
+
export interface ParamEditorReadOnlyImage {
|
|
57
|
+
src: string;
|
|
58
|
+
alt: string;
|
|
59
|
+
}
|
|
60
|
+
export type ParamEditorReadOnlyContent = string | number | boolean | null | Array<string | number | boolean | null> | {
|
|
61
|
+
type: "image";
|
|
62
|
+
src: string;
|
|
63
|
+
alt: string;
|
|
64
|
+
} | {
|
|
65
|
+
type: "image-gallery";
|
|
66
|
+
images: ParamEditorReadOnlyImage[];
|
|
67
|
+
};
|
|
68
|
+
/** Serializable display-only value rendered by the read-only Param Editor. */
|
|
69
|
+
export interface ReadOnlyParam extends BaseParam {
|
|
70
|
+
type: "readOnly";
|
|
71
|
+
value: ParamEditorReadOnlyContent;
|
|
72
|
+
}
|
|
44
73
|
/** A reference the host can open (e.g. another resource tab). */
|
|
45
74
|
export interface ResourceRefValue {
|
|
46
75
|
type: string;
|
|
@@ -154,5 +183,5 @@ export interface InputGroup {
|
|
|
154
183
|
defaultCollapsed?: boolean;
|
|
155
184
|
}
|
|
156
185
|
export type ParamValue = number | string | null | string[] | RangeValue | VectorValue | FileDropValue;
|
|
157
|
-
export type Param = NumberParam | TextParam | SelectionParam | DateParam | ColorParam | PropertyParam | ResourceParam | RangeParam | SegmentedParam | ActionsParam | AnchorGridParam | VectorParam | FileDropParam;
|
|
186
|
+
export type Param = NumberParam | TextParam | SelectionParam | DateParam | ColorParam | PropertyParam | ReadOnlyParam | ResourceParam | RangeParam | SegmentedParam | ActionsParam | AnchorGridParam | VectorParam | FileDropParam;
|
|
158
187
|
export type ParamValueMap = Record<string, ParamValue>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ReferenceResourceType } from '../../../prompt-input';
|
|
1
2
|
import { ReferenceMenuOption } from '../ReferenceMenuOption';
|
|
2
3
|
/**
|
|
3
4
|
* Search across all resources and menu options
|
|
@@ -7,7 +8,7 @@ import { ReferenceMenuOption } from '../ReferenceMenuOption';
|
|
|
7
8
|
*/
|
|
8
9
|
export declare function useContextLookup(queryString: string | null, items?: {
|
|
9
10
|
resourceId: string;
|
|
10
|
-
resourceType:
|
|
11
|
+
resourceType: ReferenceResourceType;
|
|
11
12
|
name: string;
|
|
12
13
|
description?: string;
|
|
13
14
|
}[]): ReferenceMenuOption[];
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { LexicalNode } from 'lexical';
|
|
2
2
|
import { PropsWithChildren } from 'react';
|
|
3
|
+
import { ReferenceResourceType } from '../../prompt-input';
|
|
3
4
|
export declare const $insertExistingReference: (nodeToReplace: LexicalNode, resourceId: string, name: string) => void;
|
|
4
5
|
export declare function ReferencePlugin(props: PropsWithChildren<{
|
|
5
|
-
onAddReference?: (resourceId: string, resourceType:
|
|
6
|
+
onAddReference?: (resourceId: string, resourceType: ReferenceResourceType) => void;
|
|
6
7
|
}>): null;
|