@asymmetric-effort/specifyjs 0.2.169 → 0.2.172
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/esm/components-barrel.js +736 -546
- package/dist/specifyjs-components.cjs.js +3 -3
- package/dist/specifyjs-components.esm.js +736 -546
- package/dist/types/components/page/ide/src/CodeEditor.d.ts +16 -0
- package/dist/types/components/page/ide/src/FileExplorer.d.ts +29 -0
- package/dist/types/components/page/ide/src/MenuBar.d.ts +19 -0
- package/dist/types/components/page/ide/src/Minimap.d.ts +16 -0
- package/dist/types/components/page/ide/src/StatusBar.d.ts +18 -0
- package/dist/types/components/page/ide/src/SyntaxHighlighter.d.ts +26 -0
- package/dist/types/components/page/ide/src/TabBar.d.ts +15 -0
- package/dist/types/components/page/ide/src/TitleBar.d.ts +12 -0
- package/dist/types/components/page/ide/src/index.d.ts +17 -0
- package/dist/types/components/page/unity-desktop/src/UnityDesktop.d.ts +1 -0
- package/dist/types/core/src/components-barrel.d.ts +6 -0
- package/package.json +1 -1
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/** Props for the CodeEditor component. */
|
|
2
|
+
export interface CodeEditorProps {
|
|
3
|
+
/** Lines of code to display with syntax highlighting. */
|
|
4
|
+
content: string[];
|
|
5
|
+
/** Callback fired when the editor content changes. */
|
|
6
|
+
onInput?: () => void;
|
|
7
|
+
/** Ref object to attach to the contentEditable element. */
|
|
8
|
+
editorRef?: {
|
|
9
|
+
current: HTMLElement | null;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* A code editing area with line numbers and syntax-highlighted content.
|
|
14
|
+
* The code block is contentEditable, allowing live editing.
|
|
15
|
+
*/
|
|
16
|
+
export declare function CodeEditor(props: CodeEditorProps): import("specifyjs").SpecElement<import("specifyjs").Props>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/** A single entry in the file tree. */
|
|
2
|
+
export interface FileEntry {
|
|
3
|
+
/** Display name of the file or folder. */
|
|
4
|
+
name: string;
|
|
5
|
+
/** Indentation level (0 = root). */
|
|
6
|
+
indent: number;
|
|
7
|
+
/** Whether this entry is a folder (true) or a file (false). */
|
|
8
|
+
isFolder: boolean;
|
|
9
|
+
/** Name of the parent folder, if any. */
|
|
10
|
+
parent?: string;
|
|
11
|
+
}
|
|
12
|
+
/** Props for the FileExplorer component. */
|
|
13
|
+
export interface FileExplorerProps {
|
|
14
|
+
/** Flat list of file/folder entries to display. */
|
|
15
|
+
files: FileEntry[];
|
|
16
|
+
/** Name of the currently active (selected) file. */
|
|
17
|
+
activeFile: string;
|
|
18
|
+
/** Map of folder name to whether it is expanded. */
|
|
19
|
+
expandedFolders: Record<string, boolean>;
|
|
20
|
+
/** Callback when a file is clicked. */
|
|
21
|
+
onFileClick: (fileName: string) => void;
|
|
22
|
+
/** Callback when a folder is toggled. */
|
|
23
|
+
onFolderToggle: (folderName: string) => void;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* A file-tree sidebar that displays folders and files with expand/collapse.
|
|
27
|
+
* Visibility of nested items is determined by `expandedFolders`.
|
|
28
|
+
*/
|
|
29
|
+
export declare function FileExplorer(props: FileExplorerProps): import("specifyjs").SpecElement<import("specifyjs").Props>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/** A single item inside a dropdown menu. */
|
|
2
|
+
export interface MenuItem {
|
|
3
|
+
label: string;
|
|
4
|
+
action: string;
|
|
5
|
+
}
|
|
6
|
+
/** Props for the MenuBar component. */
|
|
7
|
+
export interface MenuBarProps {
|
|
8
|
+
/** Ordered list of top-level menu names. */
|
|
9
|
+
menus: string[];
|
|
10
|
+
/** Map of menu name to its dropdown items. Menus without entries have no dropdown. */
|
|
11
|
+
menuItems: Record<string, MenuItem[]>;
|
|
12
|
+
/** Callback fired when a dropdown item is clicked, receiving the action string. */
|
|
13
|
+
onAction: (action: string) => void;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* A horizontal menu bar that manages its own open/close state internally.
|
|
17
|
+
* Dropdown items fire the provided `onAction` callback.
|
|
18
|
+
*/
|
|
19
|
+
export declare function MenuBar(props: MenuBarProps): import("specifyjs").SpecElement<import("specifyjs").Props>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/** Props for the Minimap component. */
|
|
2
|
+
export interface MinimapProps {
|
|
3
|
+
/** Lines of code to represent as minimap bars. */
|
|
4
|
+
lines: string[];
|
|
5
|
+
/** Pixel offset of the visible viewport top. */
|
|
6
|
+
visibleStart: number;
|
|
7
|
+
/** Pixel height of the visible viewport indicator. */
|
|
8
|
+
visibleEnd: number;
|
|
9
|
+
/** Total number of lines (used for scaling). */
|
|
10
|
+
totalLines: number;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* A minimap sidebar that shows a compressed view of all code lines
|
|
14
|
+
* with a translucent viewport indicator.
|
|
15
|
+
*/
|
|
16
|
+
export declare function Minimap(props: MinimapProps): import("specifyjs").SpecElement<import("specifyjs").Props>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/** A single item displayed in the status bar. */
|
|
2
|
+
export interface StatusItem {
|
|
3
|
+
/** Text label to display. */
|
|
4
|
+
label: string;
|
|
5
|
+
/** Optional click handler. */
|
|
6
|
+
onClick?: () => void;
|
|
7
|
+
}
|
|
8
|
+
/** Props for the StatusBar component. */
|
|
9
|
+
export interface StatusBarProps {
|
|
10
|
+
/** Items displayed on the left side of the status bar. */
|
|
11
|
+
items: StatusItem[];
|
|
12
|
+
/** Items displayed on the right side of the status bar. */
|
|
13
|
+
rightItems: StatusItem[];
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* A bottom status bar split into left and right item groups.
|
|
17
|
+
*/
|
|
18
|
+
export declare function StatusBar(props: StatusBarProps): import("specifyjs").SpecElement<import("specifyjs").Props>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SyntaxHighlighter -- Tokenizer and color constants for syntax highlighting.
|
|
3
|
+
*
|
|
4
|
+
* Provides `tokenizeLine` which splits a line of TypeScript/JavaScript code
|
|
5
|
+
* into colored tokens for rendering in the IDE editor and minimap.
|
|
6
|
+
*/
|
|
7
|
+
/** A single colored token produced by the tokenizer. */
|
|
8
|
+
export interface Token {
|
|
9
|
+
text: string;
|
|
10
|
+
color: string;
|
|
11
|
+
}
|
|
12
|
+
export declare const COL_KEYWORD = "#569cd6";
|
|
13
|
+
export declare const COL_STRING = "#ce9178";
|
|
14
|
+
export declare const COL_TYPE = "#4ec9b0";
|
|
15
|
+
export declare const COL_COMMENT = "#6a9955";
|
|
16
|
+
export declare const COL_FUNCTION = "#dcdcaa";
|
|
17
|
+
export declare const COL_DEFAULT = "#d4d4d4";
|
|
18
|
+
export declare const COL_PUNCTUATION = "#d4d4d4";
|
|
19
|
+
export declare const COL_NUMBER = "#b5cea8";
|
|
20
|
+
/**
|
|
21
|
+
* Tokenize a single line of code into an array of colored tokens.
|
|
22
|
+
*
|
|
23
|
+
* Recognizes comments, strings, numbers, keywords, type names, function calls,
|
|
24
|
+
* and punctuation. Returns a non-breaking space token for blank lines.
|
|
25
|
+
*/
|
|
26
|
+
export declare function tokenizeLine(line: string): Array<Token>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** Props for the TabBar component. */
|
|
2
|
+
export interface TabBarProps {
|
|
3
|
+
/** List of tab labels (typically file names). */
|
|
4
|
+
tabs: string[];
|
|
5
|
+
/** The currently active tab label. */
|
|
6
|
+
activeTab: string;
|
|
7
|
+
/** Callback when a tab is clicked. */
|
|
8
|
+
onTabClick: (tab: string) => void;
|
|
9
|
+
/** Optional callback when a tab's close button is clicked. */
|
|
10
|
+
onTabClose?: (tab: string) => void;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* A horizontal tab strip for switching between open files.
|
|
14
|
+
*/
|
|
15
|
+
export declare function TabBar(props: TabBarProps): import("specifyjs").SpecElement<import("specifyjs").Props>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** Props for the TitleBar component. */
|
|
2
|
+
export interface TitleBarProps {
|
|
3
|
+
/** The title text to display centered in the bar. */
|
|
4
|
+
title: string;
|
|
5
|
+
/** Optional style overrides merged onto the default title bar styles. */
|
|
6
|
+
style?: Record<string, string>;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* A simple horizontal bar displaying centered title text.
|
|
10
|
+
* Used as the topmost element in an IDE layout.
|
|
11
|
+
*/
|
|
12
|
+
export declare function TitleBar(props: TitleBarProps): import("specifyjs").SpecElement<import("specifyjs").Props>;
|
|
@@ -1,2 +1,19 @@
|
|
|
1
1
|
export { IDE } from './IDE';
|
|
2
2
|
export type { IDEProps } from './IDE';
|
|
3
|
+
export { TitleBar } from './TitleBar';
|
|
4
|
+
export type { TitleBarProps } from './TitleBar';
|
|
5
|
+
export { MenuBar } from './MenuBar';
|
|
6
|
+
export type { MenuBarProps, MenuItem } from './MenuBar';
|
|
7
|
+
export { FileExplorer } from './FileExplorer';
|
|
8
|
+
export type { FileExplorerProps, FileEntry } from './FileExplorer';
|
|
9
|
+
export { TabBar } from './TabBar';
|
|
10
|
+
export type { TabBarProps } from './TabBar';
|
|
11
|
+
export { CodeEditor } from './CodeEditor';
|
|
12
|
+
export type { CodeEditorProps } from './CodeEditor';
|
|
13
|
+
export { Minimap } from './Minimap';
|
|
14
|
+
export type { MinimapProps } from './Minimap';
|
|
15
|
+
export { StatusBar } from './StatusBar';
|
|
16
|
+
export type { StatusBarProps, StatusItem } from './StatusBar';
|
|
17
|
+
export { tokenizeLine } from './SyntaxHighlighter';
|
|
18
|
+
export type { Token } from './SyntaxHighlighter';
|
|
19
|
+
export { COL_KEYWORD, COL_STRING, COL_TYPE, COL_COMMENT, COL_FUNCTION, COL_DEFAULT, COL_PUNCTUATION, COL_NUMBER, } from './SyntaxHighlighter';
|
|
@@ -70,6 +70,12 @@ export * from '../../components/page/unity-desktop/src/index';
|
|
|
70
70
|
export * from '../../components/page/word-processor/src/index';
|
|
71
71
|
export * from '../../components/page/ide/src/index';
|
|
72
72
|
export * from '../../components/page/trading-dashboard/src/index';
|
|
73
|
+
export * from '../../components/data/board/src/index';
|
|
74
|
+
export * from '../../components/nav/dock/src/index';
|
|
75
|
+
export * from '../../components/nav/system-tray/src/index';
|
|
76
|
+
export * from '../../components/layout/draggable-window/src/index';
|
|
77
|
+
export * from '../../components/layout/window-manager/src/index';
|
|
78
|
+
export * from '../../components/layout/desktop-background/src/index';
|
|
73
79
|
export * from '../../components/form/button/src/index';
|
|
74
80
|
export * from '../../components/viz/3d-layers/src/index';
|
|
75
81
|
export * from '../../components/viz/big-number/src/index';
|