@lax-wp/design-system 0.8.23 → 0.8.24
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/components/data-display/code-editor-beta/CodeEditorBeta.d.ts +14 -10
- package/dist/components/data-display/label-value/LabelValue.d.ts +2 -0
- package/dist/components/forms/form/Form.d.ts +2 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.es.js +6894 -6785
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +47 -48
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { type FC } from "react";
|
|
2
2
|
import { type ReactCodeMirrorRef } from "@uiw/react-codemirror";
|
|
3
|
-
|
|
3
|
+
declare const TABS: ("JSON" | "Grid")[];
|
|
4
|
+
export type TTabKey = (typeof TABS)[number];
|
|
5
|
+
/**
|
|
6
|
+
* Toolbar context passed to the `renderToolbarActions` callback.
|
|
7
|
+
*/
|
|
4
8
|
export interface CodeEditorBetaToolbarContext {
|
|
5
9
|
/** The CodeMirror editor view ref */
|
|
6
10
|
editorRef: ReactCodeMirrorRef | null;
|
|
@@ -15,6 +19,9 @@ export interface CodeEditorBetaToolbarContext {
|
|
|
15
19
|
/** Current active tab (JSON or Grid) */
|
|
16
20
|
activeTab: "JSON" | "Grid";
|
|
17
21
|
}
|
|
22
|
+
/**
|
|
23
|
+
* Props for the experimental CodeMirror-based CodeEditor.
|
|
24
|
+
*/
|
|
18
25
|
export interface CodeEditorBetaProps {
|
|
19
26
|
/** The code content to display in the editor */
|
|
20
27
|
value: string;
|
|
@@ -42,9 +49,9 @@ export interface CodeEditorBetaProps {
|
|
|
42
49
|
className?: string;
|
|
43
50
|
/** Auto-format JSON on mount */
|
|
44
51
|
enableAutoFormatting?: boolean;
|
|
45
|
-
/** Disables parent save button during Python validation */
|
|
52
|
+
/** Disables parent save button during Python validation (mirrors original CodeEditor) */
|
|
46
53
|
setIsDisableSave?: (flag: boolean) => void;
|
|
47
|
-
/** API to check Python syntax */
|
|
54
|
+
/** API to check Python syntax — returns an error object if invalid */
|
|
48
55
|
checkSyntaxAPI?: (code: string) => Promise<{
|
|
49
56
|
data: {
|
|
50
57
|
error?: {
|
|
@@ -54,7 +61,7 @@ export interface CodeEditorBetaProps {
|
|
|
54
61
|
};
|
|
55
62
|
};
|
|
56
63
|
}>;
|
|
57
|
-
/** API to format Python code */
|
|
64
|
+
/** API to format Python code — returns formatted_code string */
|
|
58
65
|
formatCodeAPI?: (code: string) => Promise<{
|
|
59
66
|
data: {
|
|
60
67
|
formatted_code?: string;
|
|
@@ -62,14 +69,12 @@ export interface CodeEditorBetaProps {
|
|
|
62
69
|
}>;
|
|
63
70
|
/** Custom toolbar actions render function */
|
|
64
71
|
renderToolbarActions?: (context: CodeEditorBetaToolbarContext) => React.ReactNode;
|
|
65
|
-
/** Callback fired when the user clicks inside a code block. Receives the innermost block. */
|
|
66
|
-
onBlockClick?: (block: CodeBlockInfo) => void;
|
|
67
|
-
/** When set, the editor searches for this text, scrolls to the match, and highlights the enclosing block. */
|
|
68
|
-
focusBlock?: string;
|
|
69
72
|
}
|
|
70
73
|
/**
|
|
71
74
|
* CodeEditorBeta — experimental CodeMirror 6 replacement for the Monaco-based CodeEditor.
|
|
72
75
|
*
|
|
76
|
+
* Smaller bundle, no web workers, same toolbar UX. Drops Codeium AI completions.
|
|
77
|
+
*
|
|
73
78
|
* @example
|
|
74
79
|
* ```tsx
|
|
75
80
|
* <CodeEditorBeta
|
|
@@ -77,9 +82,8 @@ export interface CodeEditorBetaProps {
|
|
|
77
82
|
* onChange={setJsonString}
|
|
78
83
|
* language="json"
|
|
79
84
|
* height="400px"
|
|
80
|
-
* onBlockClick={(block) => console.log(block)}
|
|
81
|
-
* focusBlock="customer"
|
|
82
85
|
* />
|
|
83
86
|
* ```
|
|
84
87
|
*/
|
|
85
88
|
export declare const CodeEditorBeta: FC<CodeEditorBetaProps>;
|
|
89
|
+
export {};
|
|
@@ -93,6 +93,8 @@ export interface LabelValueProps {
|
|
|
93
93
|
showDiff?: boolean;
|
|
94
94
|
/** Whether this is a live field (shows bolt icon) */
|
|
95
95
|
isLiveField?: boolean;
|
|
96
|
+
/** Whether this is an AI extracted field (shows AI extracted icon) */
|
|
97
|
+
isAiExtracted?: boolean;
|
|
96
98
|
/** Delta change value for currency fields */
|
|
97
99
|
deltaChange?: number;
|
|
98
100
|
/** Theme mode */
|
package/dist/index.d.ts
CHANGED
|
@@ -37,6 +37,7 @@ export type { DynamicDataInputFieldProps, DynamicDataModalProps as DynamicDataIn
|
|
|
37
37
|
export { DynamicDataInput } from "./components/forms/dynamic-data-input/DynamicDataInput";
|
|
38
38
|
export type { DynamicDataInputProps } from "./components/forms/dynamic-data-input/DynamicDataInput";
|
|
39
39
|
export { PercentageInputField } from "./components/forms/percentage-input/PercentageInputField";
|
|
40
|
+
export { Form } from "./components/forms/form/Form";
|
|
40
41
|
export type { PercentageInputFieldProps, RiskDetails as PercentageInputFieldRiskDetails, RiskDetailsCardProps as PercentageInputFieldRiskDetailsCardProps, } from "./components/forms/percentage-input/PercentageInputField";
|
|
41
42
|
export { Toggle } from "./components/forms/toggle/Toggle";
|
|
42
43
|
export type { ToggleProps } from "./components/forms/toggle/Toggle";
|