@m4l/components 9.17.1-beta-feature-731-m4l-components-code-editor.0 → 9.18.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/@types/types.d.ts +0 -11
- package/components/CommonActions/components/ActionFormCancel/ActionFormCancel.d.ts +2 -1
- package/components/CommonActions/components/ActionFormCancel/ActionFormCancel.d.ts.map +1 -1
- package/components/CommonActions/components/ActionFormCancel/ActionFormCancel.js +30 -41
- package/components/CommonActions/components/ActionFormCancel/types.d.ts +2 -2
- package/components/CommonActions/index.d.ts +1 -0
- package/components/CommonActions/index.d.ts.map +1 -1
- package/components/DragResizeWindowRND/DragResizeWindowRND.d.ts +3 -14
- package/components/DragResizeWindowRND/DragResizeWindowRND.d.ts.map +1 -1
- package/components/DragResizeWindowRND/DragResizeWindowRND.js +105 -119
- package/components/DragResizeWindowRND/helpers/index.d.ts +1 -0
- package/components/DragResizeWindowRND/helpers/index.d.ts.map +1 -1
- package/components/DragResizeWindowRND/helpers/resizeHandles.d.ts +15 -0
- package/components/DragResizeWindowRND/helpers/resizeHandles.d.ts.map +1 -0
- package/components/DragResizeWindowRND/helpers/resizeHandles.js +68 -0
- package/components/DragResizeWindowRND/types.d.ts +3 -1
- package/components/DragResizeWindowRND/types.d.ts.map +1 -1
- package/components/WindowBase/WindowBase.d.ts.map +1 -1
- package/components/WindowBase/WindowBase.js +49 -49
- package/components/WindowBase/WindowBase.styles.d.ts +1 -1
- package/components/WindowBase/WindowBase.styles.d.ts.map +1 -1
- package/components/WindowBase/WindowBase.styles.js +37 -12
- package/components/WindowBase/contexts/WindowToolsMFContext/types.d.ts +19 -34
- package/components/WindowBase/contexts/WindowToolsMFContext/types.d.ts.map +1 -1
- package/components/WindowBase/subcomponents/Header/HeaderWindowBase.js +18 -18
- package/components/areas/components/AreasAdmin/AreasAdmin.d.ts +2 -5
- package/components/areas/components/AreasAdmin/AreasAdmin.d.ts.map +1 -1
- package/components/areas/components/AreasAdmin/AreasAdmin.js +24 -24
- package/components/areas/components/AreasAdmin/helper.d.ts +1 -4
- package/components/areas/components/AreasAdmin/helper.d.ts.map +1 -1
- package/components/areas/components/AreasAdmin/subcomponents/AreaChip/AreaChip.d.ts +2 -26
- package/components/areas/components/AreasAdmin/subcomponents/AreaChip/AreaChip.d.ts.map +1 -1
- package/components/areas/components/AreasAdmin/subcomponents/AreaChip/AreaChip.js +72 -71
- package/components/areas/components/AreasAdmin/subcomponents/AreaChipMobile/AreaChipMobile.d.ts +1 -1
- package/components/areas/components/AreasAdmin/subcomponents/AreaChipMobile/AreaChipMobile.js +17 -17
- package/components/areas/components/AreasAdmin/subcomponents/AreaChipMobile/subcomponents/ChipMobile/ChipMobile.d.ts +2 -24
- package/components/areas/components/AreasAdmin/subcomponents/AreaChipMobile/subcomponents/ChipMobile/ChipMobile.d.ts.map +1 -1
- package/components/areas/components/AreasAdmin/subcomponents/AreaChipMobile/subcomponents/ChipMobile/ChipMobile.js +58 -57
- package/components/areas/components/AreasAdmin/types.d.ts +9 -9
- package/components/areas/components/AreasViewer/AreasViewer.styles.d.ts.map +1 -1
- package/components/areas/components/AreasViewer/AreasViewer.styles.js +174 -6
- package/components/areas/components/AreasViewer/constants.d.ts +12 -0
- package/components/areas/components/AreasViewer/constants.d.ts.map +1 -1
- package/components/areas/components/AreasViewer/constants.js +5 -2
- package/components/areas/components/AreasViewer/slots/AreasViewerEnum.d.ts +9 -0
- package/components/areas/components/AreasViewer/slots/AreasViewerEnum.d.ts.map +1 -1
- package/components/areas/components/AreasViewer/slots/AreasViewerEnum.js +2 -2
- package/components/areas/components/AreasViewer/slots/AreasViewerSlots.d.ts +27 -0
- package/components/areas/components/AreasViewer/slots/AreasViewerSlots.d.ts.map +1 -1
- package/components/areas/components/AreasViewer/slots/AreasViewerSlots.js +62 -25
- package/components/areas/components/AreasViewer/subcomponents/Area/Area.d.ts +1 -4
- package/components/areas/components/AreasViewer/subcomponents/Area/Area.d.ts.map +1 -1
- package/components/areas/components/AreasViewer/subcomponents/Area/Area.js +4 -4
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/AreaGridLayout/AreaGridLayout.d.ts +1 -2
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/AreaGridLayout/AreaGridLayout.d.ts.map +1 -1
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/BaseArea.d.ts +1 -1
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/BaseArea.d.ts.map +1 -1
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/BaseArea.js +12 -11
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/helpers/panelRuntime.d.ts +78 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/helpers/panelRuntime.d.ts.map +1 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/helpers/panelRuntime.js +86 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/hooks/useOverlayPanelResize.d.ts +33 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/hooks/useOverlayPanelResize.d.ts.map +1 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/hooks/useOverlayPanelResize.js +91 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/hooks/usePanelsByArea.d.ts +6 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/hooks/usePanelsByArea.d.ts.map +1 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/hooks/usePanelsByArea.js +45 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/hooks/usePinnedPanelResize.d.ts +16 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/hooks/usePinnedPanelResize.d.ts.map +1 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/hooks/usePinnedPanelResize.js +105 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/subcomponents/AreaPanels/AreaPanels.d.ts +6 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/subcomponents/AreaPanels/AreaPanels.d.ts.map +1 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/subcomponents/AreaPanels/AreaPanels.js +158 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/subcomponents/AreaPanels/subcomponents/PanelResizeInteractionLayer.d.ts +15 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/subcomponents/AreaPanels/subcomponents/PanelResizeInteractionLayer.d.ts.map +1 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/subcomponents/AreaPanels/subcomponents/PanelResizeInteractionLayer.js +19 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/subcomponents/AreaPanels/subcomponents/PanelResizeRail.d.ts +14 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/subcomponents/AreaPanels/subcomponents/PanelResizeRail.d.ts.map +1 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/subcomponents/AreaPanels/subcomponents/PanelResizeRail.js +35 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/subcomponents/AreaPanels/subcomponents/PanelWindow.d.ts +7 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/subcomponents/AreaPanels/subcomponents/PanelWindow.d.ts.map +1 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/subcomponents/AreaPanels/subcomponents/PanelWindow.js +68 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/types.d.ts +61 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/types.d.ts.map +1 -1
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/Window.d.ts +3 -6
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/Window.d.ts.map +1 -1
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/Window.js +45 -45
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useHeaderActions.d.ts +1 -3
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useHeaderActions.d.ts.map +1 -1
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useRightActions.d.ts +1 -1
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useRightActions.d.ts.map +1 -1
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useRightActions.js +68 -40
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useWindow.d.ts +6 -11
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useWindow.d.ts.map +1 -1
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useWindow.js +77 -76
- package/components/areas/contexts/AreasContext/helpers/generateModuleCount.d.ts +3 -5
- package/components/areas/contexts/AreasContext/helpers/generateModuleCount.d.ts.map +1 -1
- package/components/areas/contexts/AreasContext/helpers/helper.d.ts +20 -15
- package/components/areas/contexts/AreasContext/helpers/helper.d.ts.map +1 -1
- package/components/areas/contexts/AreasContext/helpers/helper.js +8 -7
- package/components/areas/contexts/AreasContext/index.d.ts.map +1 -1
- package/components/areas/contexts/AreasContext/index.js +51 -48
- package/components/areas/contexts/AreasContext/store.d.ts +2 -3
- package/components/areas/contexts/AreasContext/store.d.ts.map +1 -1
- package/components/areas/contexts/AreasContext/store.js +397 -290
- package/components/areas/contexts/AreasContext/types.d.ts +109 -85
- package/components/areas/contexts/AreasContext/types.d.ts.map +1 -1
- package/components/areas/dictionary.d.ts +3 -0
- package/components/areas/dictionary.d.ts.map +1 -1
- package/components/areas/dictionary.js +9 -6
- package/components/areas/hooks/useAreas/index.d.ts +2 -2
- package/components/areas/hooks/useAreas/index.js +4 -4
- package/components/areas/types.d.ts +173 -47
- package/components/areas/types.d.ts.map +1 -1
- package/components/areas/utils/useOnClickOutside/index.d.ts +2 -1
- package/components/areas/utils/useOnClickOutside/index.d.ts.map +1 -1
- package/components/areas/utils/useOnClickOutside/index.js +15 -0
- package/components/extended/index.d.ts +0 -1
- package/components/extended/index.d.ts.map +1 -1
- package/components/hook-form/index.d.ts +0 -1
- package/components/hook-form/index.d.ts.map +1 -1
- package/components/popups/components/PopupsProvider/contexts/PopupsContext/types.d.ts +5 -4
- package/components/popups/components/PopupsProvider/contexts/PopupsContext/types.d.ts.map +1 -1
- package/components/popups/components/PopupsProvider/hooks/usePopups.js +2 -2
- package/hooks/index.d.ts +1 -0
- package/hooks/index.d.ts.map +1 -1
- package/hooks/useWindowCloseGuard/index.d.ts +18 -0
- package/hooks/useWindowCloseGuard/index.d.ts.map +1 -0
- package/hooks/useWindowCloseGuard/index.js +56 -0
- package/index.js +664 -675
- package/package.json +7 -10
- package/test/mocks/dictionary-mock.d.ts +2 -0
- package/test/mocks/dictionary-mock.d.ts.map +1 -1
- package/components/extended/ReactSimpleCodeEditor/CodeEditor.d.ts +0 -6
- package/components/extended/ReactSimpleCodeEditor/CodeEditor.d.ts.map +0 -1
- package/components/extended/ReactSimpleCodeEditor/CodeEditor.js +0 -247
- package/components/extended/ReactSimpleCodeEditor/CodeEditor.styles.d.ts +0 -3
- package/components/extended/ReactSimpleCodeEditor/CodeEditor.styles.d.ts.map +0 -1
- package/components/extended/ReactSimpleCodeEditor/CodeEditor.styles.js +0 -297
- package/components/extended/ReactSimpleCodeEditor/constants.d.ts +0 -82
- package/components/extended/ReactSimpleCodeEditor/constants.d.ts.map +0 -1
- package/components/extended/ReactSimpleCodeEditor/constants.js +0 -149
- package/components/extended/ReactSimpleCodeEditor/dictionary.d.ts +0 -11
- package/components/extended/ReactSimpleCodeEditor/dictionary.d.ts.map +0 -1
- package/components/extended/ReactSimpleCodeEditor/dictionary.js +0 -7
- package/components/extended/ReactSimpleCodeEditor/helpers/highlighting.d.ts +0 -59
- package/components/extended/ReactSimpleCodeEditor/helpers/highlighting.d.ts.map +0 -1
- package/components/extended/ReactSimpleCodeEditor/helpers/highlighting.js +0 -1063
- package/components/extended/ReactSimpleCodeEditor/helpers/languageIcon.d.ts +0 -6
- package/components/extended/ReactSimpleCodeEditor/helpers/languageIcon.d.ts.map +0 -1
- package/components/extended/ReactSimpleCodeEditor/helpers/languageIcon.js +0 -7
- package/components/extended/ReactSimpleCodeEditor/index.d.ts +0 -4
- package/components/extended/ReactSimpleCodeEditor/index.d.ts.map +0 -1
- package/components/extended/ReactSimpleCodeEditor/slots/CodeEditorEnum.d.ts +0 -18
- package/components/extended/ReactSimpleCodeEditor/slots/CodeEditorEnum.d.ts.map +0 -1
- package/components/extended/ReactSimpleCodeEditor/slots/CodeEditorEnum.js +0 -4
- package/components/extended/ReactSimpleCodeEditor/slots/CodeEditorSlots.d.ts +0 -84
- package/components/extended/ReactSimpleCodeEditor/slots/CodeEditorSlots.d.ts.map +0 -1
- package/components/extended/ReactSimpleCodeEditor/slots/CodeEditorSlots.js +0 -63
- package/components/extended/ReactSimpleCodeEditor/slots/index.d.ts +0 -3
- package/components/extended/ReactSimpleCodeEditor/slots/index.d.ts.map +0 -1
- package/components/extended/ReactSimpleCodeEditor/storybookRuntime.d.ts +0 -15
- package/components/extended/ReactSimpleCodeEditor/storybookRuntime.d.ts.map +0 -1
- package/components/extended/ReactSimpleCodeEditor/types.d.ts +0 -127
- package/components/extended/ReactSimpleCodeEditor/types.d.ts.map +0 -1
- package/components/hook-form/RHFCodeEditor/RHFCodeEditor.d.ts +0 -7
- package/components/hook-form/RHFCodeEditor/RHFCodeEditor.d.ts.map +0 -1
- package/components/hook-form/RHFCodeEditor/RHFCodeEditor.js +0 -6
- package/components/hook-form/RHFCodeEditor/index.d.ts +0 -3
- package/components/hook-form/RHFCodeEditor/index.d.ts.map +0 -1
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import { Theme } from '@mui/material';
|
|
2
|
-
type CodeEditorVSCodeModernSurfacePalette = {
|
|
3
|
-
activeIndentGuideForeground: string;
|
|
4
|
-
borderColor: string;
|
|
5
|
-
bracketMatchBorder: string;
|
|
6
|
-
caretForeground: string;
|
|
7
|
-
dividerColor: string;
|
|
8
|
-
editorBackground: string;
|
|
9
|
-
editorForeground: string;
|
|
10
|
-
errorBorderColor: string;
|
|
11
|
-
errorRangeBackground: string;
|
|
12
|
-
errorRangeShadowColor: string;
|
|
13
|
-
errorLineBackground: string;
|
|
14
|
-
focusBorderColor: string;
|
|
15
|
-
headerBackground: string;
|
|
16
|
-
headerForeground: string;
|
|
17
|
-
inactiveSelectionBackground: string;
|
|
18
|
-
indentGuideForeground: string;
|
|
19
|
-
languageChipBackground: string;
|
|
20
|
-
languageChipBorder: string;
|
|
21
|
-
languageChipForeground: string;
|
|
22
|
-
lineNumberActiveForeground: string;
|
|
23
|
-
lineNumberForeground: string;
|
|
24
|
-
placeholderForeground: string;
|
|
25
|
-
readOnlyChipBackground: string;
|
|
26
|
-
readOnlyChipBorder: string;
|
|
27
|
-
readOnlyChipForeground: string;
|
|
28
|
-
rootBackground: string;
|
|
29
|
-
selectionBackground: string;
|
|
30
|
-
widgetBackground: string;
|
|
31
|
-
};
|
|
32
|
-
type CodeEditorVSCodeModernSyntaxPalette = {
|
|
33
|
-
attributeName: string;
|
|
34
|
-
boolean: string;
|
|
35
|
-
comment: string;
|
|
36
|
-
constant: string;
|
|
37
|
-
escape: string;
|
|
38
|
-
function: string;
|
|
39
|
-
keyword: string;
|
|
40
|
-
number: string;
|
|
41
|
-
operator: string;
|
|
42
|
-
regex: string;
|
|
43
|
-
string: string;
|
|
44
|
-
tag: string;
|
|
45
|
-
type: string;
|
|
46
|
-
variable: string;
|
|
47
|
-
};
|
|
48
|
-
export type CodeEditorVSCodeModernPalette = {
|
|
49
|
-
bracketPalette: readonly string[];
|
|
50
|
-
surface: CodeEditorVSCodeModernSurfacePalette;
|
|
51
|
-
syntax: CodeEditorVSCodeModernSyntaxPalette;
|
|
52
|
-
};
|
|
53
|
-
export declare const CODE_EDITOR_KEY_COMPONENT = "M4LCodeEditor";
|
|
54
|
-
export declare const CODE_EDITOR_DEFAULT_LANGUAGE = "text";
|
|
55
|
-
export declare const CODE_EDITOR_DEFAULT_MIN_LINES = 4;
|
|
56
|
-
export declare const CODE_EDITOR_DEFAULT_MAX_LINES = 10;
|
|
57
|
-
export declare const CODE_EDITOR_PADDING_PX = 12;
|
|
58
|
-
export declare const CODE_EDITOR_LINE_HEIGHT_BY_SIZE: {
|
|
59
|
-
readonly small: 18;
|
|
60
|
-
readonly medium: 20;
|
|
61
|
-
};
|
|
62
|
-
export declare const CODE_EDITOR_MONO_FONT_FAMILY = "\"Geist Mono\", \"JetBrains Mono\", \"Cascadia Code\", \"Liberation Mono\", monospace";
|
|
63
|
-
export declare const CODE_EDITOR_READ_ONLY_LABEL = "Read Only";
|
|
64
|
-
export declare const CODE_EDITOR_AT_LANGUAGE = "at-commands";
|
|
65
|
-
export declare const CODE_EDITOR_AT_TEMPLATE_NAME = "at-basic";
|
|
66
|
-
export declare const CODE_EDITOR_AT_TEMPLATE_LANGUAGE_LABEL = "AT Commands";
|
|
67
|
-
export declare const CODE_EDITOR_LANGUAGE_CHIP_ICON_INSTANCE_ID = "CodeEditorLanguageChipIcon";
|
|
68
|
-
export declare const CODE_EDITOR_AT_TEMPLATE_TOKENS: {
|
|
69
|
-
readonly commandPrefixes: readonly ["AT+", "+"];
|
|
70
|
-
readonly concatenationSeparators: readonly [";"];
|
|
71
|
-
readonly argumentSeparators: readonly [","];
|
|
72
|
-
readonly reservedWords: readonly ["SET", "INFO", "SAVE", "CLEAR"];
|
|
73
|
-
};
|
|
74
|
-
export declare const CODE_EDITOR_LANGUAGE_ALIASES: Record<string, string>;
|
|
75
|
-
export declare const CODE_EDITOR_FALLBACK_LANGUAGE_ICON: import('@mui/material/OverridableComponent').OverridableComponent<import('@mui/material').SvgIconTypeMap<{}, "svg">> & {
|
|
76
|
-
muiName: string;
|
|
77
|
-
};
|
|
78
|
-
/** Resolve the exact VS Code Modern palette for the current light or dark theme mode. */
|
|
79
|
-
export declare function getCodeEditorVSCodeModernPalette(theme: Theme): CodeEditorVSCodeModernPalette;
|
|
80
|
-
export declare const CODE_EDITOR_CLASSES: Record<"body" | "skeleton" | "header" | "pre" | "textarea" | "root" | "placeholder" | "headerBadges" | "languageChip" | "languageChipIcon" | "readOnlyChip" | "lineNumbers" | "lineNumber" | "editorScroller" | "editor", string>;
|
|
81
|
-
export {};
|
|
82
|
-
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../../../packages/components/src/components/extended/ReactSimpleCodeEditor/constants.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
import { FileFolderFileOutlined as n } from "@m4l/icons";
|
|
2
|
-
import { getComponentClasses as a } from "../../../utils/getComponentSlotRoot.js";
|
|
3
|
-
import { CodeEditorSlots as t } from "./slots/CodeEditorEnum.js";
|
|
4
|
-
const C = {
|
|
5
|
-
dark: {
|
|
6
|
-
bracketPalette: ["#FFD700", "#DA70D6", "#179FFF"],
|
|
7
|
-
surface: {
|
|
8
|
-
activeIndentGuideForeground: "#707070",
|
|
9
|
-
borderColor: "#3C3C3C",
|
|
10
|
-
bracketMatchBorder: "#888888",
|
|
11
|
-
caretForeground: "#AEAFAD",
|
|
12
|
-
dividerColor: "#2B2B2B",
|
|
13
|
-
editorBackground: "#1F1F1F",
|
|
14
|
-
editorForeground: "#CCCCCC",
|
|
15
|
-
errorBorderColor: "#F85149",
|
|
16
|
-
errorRangeBackground: "#F8514926",
|
|
17
|
-
errorRangeShadowColor: "#F85149",
|
|
18
|
-
errorLineBackground: "#F8514914",
|
|
19
|
-
focusBorderColor: "#0078D4",
|
|
20
|
-
headerBackground: "#181818",
|
|
21
|
-
headerForeground: "#CCCCCC",
|
|
22
|
-
inactiveSelectionBackground: "#3A3D41",
|
|
23
|
-
indentGuideForeground: "#404040",
|
|
24
|
-
languageChipBackground: "#313131",
|
|
25
|
-
languageChipBorder: "#3C3C3C",
|
|
26
|
-
languageChipForeground: "#CCCCCC",
|
|
27
|
-
lineNumberActiveForeground: "#CCCCCC",
|
|
28
|
-
lineNumberForeground: "#6E7681",
|
|
29
|
-
placeholderForeground: "#989898",
|
|
30
|
-
readOnlyChipBackground: "#2489DB82",
|
|
31
|
-
readOnlyChipBorder: "#2488DB",
|
|
32
|
-
readOnlyChipForeground: "#FFFFFF",
|
|
33
|
-
rootBackground: "#181818",
|
|
34
|
-
selectionBackground: "#264F78",
|
|
35
|
-
widgetBackground: "#202020"
|
|
36
|
-
},
|
|
37
|
-
syntax: {
|
|
38
|
-
attributeName: "#9CDCFE",
|
|
39
|
-
boolean: "#569CD6",
|
|
40
|
-
comment: "#6A9955",
|
|
41
|
-
constant: "#4FC1FF",
|
|
42
|
-
escape: "#D7BA7D",
|
|
43
|
-
function: "#DCDCAA",
|
|
44
|
-
keyword: "#569CD6",
|
|
45
|
-
number: "#B5CEA8",
|
|
46
|
-
operator: "#CCCCCC",
|
|
47
|
-
regex: "#646695",
|
|
48
|
-
string: "#CE9178",
|
|
49
|
-
tag: "#569CD6",
|
|
50
|
-
type: "#4EC9B0",
|
|
51
|
-
variable: "#9CDCFE"
|
|
52
|
-
}
|
|
53
|
-
},
|
|
54
|
-
light: {
|
|
55
|
-
bracketPalette: ["#0431FA", "#319331", "#7B3814"],
|
|
56
|
-
surface: {
|
|
57
|
-
activeIndentGuideForeground: "#939393",
|
|
58
|
-
borderColor: "#CECECE",
|
|
59
|
-
bracketMatchBorder: "#B9B9B9",
|
|
60
|
-
caretForeground: "#000000",
|
|
61
|
-
dividerColor: "#E5E5E5",
|
|
62
|
-
editorBackground: "#FFFFFF",
|
|
63
|
-
editorForeground: "#3B3B3B",
|
|
64
|
-
errorBorderColor: "#F85149",
|
|
65
|
-
errorRangeBackground: "#F8514920",
|
|
66
|
-
errorRangeShadowColor: "#F85149",
|
|
67
|
-
errorLineBackground: "#F8514912",
|
|
68
|
-
focusBorderColor: "#005FB8",
|
|
69
|
-
headerBackground: "#F8F8F8",
|
|
70
|
-
headerForeground: "#3B3B3B",
|
|
71
|
-
inactiveSelectionBackground: "#E5EBF1",
|
|
72
|
-
indentGuideForeground: "#D3D3D3",
|
|
73
|
-
languageChipBackground: "#FFFFFF",
|
|
74
|
-
languageChipBorder: "#CECECE",
|
|
75
|
-
languageChipForeground: "#3B3B3B",
|
|
76
|
-
lineNumberActiveForeground: "#171184",
|
|
77
|
-
lineNumberForeground: "#6E7681",
|
|
78
|
-
placeholderForeground: "#767676",
|
|
79
|
-
readOnlyChipBackground: "#BED6ED",
|
|
80
|
-
readOnlyChipBorder: "#005FB8",
|
|
81
|
-
readOnlyChipForeground: "#000000",
|
|
82
|
-
rootBackground: "#F8F8F8",
|
|
83
|
-
selectionBackground: "#ADD6FF",
|
|
84
|
-
widgetBackground: "#F8F8F8"
|
|
85
|
-
},
|
|
86
|
-
syntax: {
|
|
87
|
-
attributeName: "#E50000",
|
|
88
|
-
boolean: "#0000FF",
|
|
89
|
-
comment: "#008000",
|
|
90
|
-
constant: "#0070C1",
|
|
91
|
-
escape: "#EE0000",
|
|
92
|
-
function: "#795E26",
|
|
93
|
-
keyword: "#0000FF",
|
|
94
|
-
number: "#098658",
|
|
95
|
-
operator: "#3B3B3B",
|
|
96
|
-
regex: "#811F3F",
|
|
97
|
-
string: "#A31515",
|
|
98
|
-
tag: "#800000",
|
|
99
|
-
type: "#267F99",
|
|
100
|
-
variable: "#001080"
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
}, d = "M4LCodeEditor", i = "text", g = 4, u = 10, D = 12, _ = {
|
|
104
|
-
small: 18,
|
|
105
|
-
medium: 20
|
|
106
|
-
}, B = '"Geist Mono", "JetBrains Mono", "Cascadia Code", "Liberation Mono", monospace', s = "Read Only", r = "at-commands", l = "at-basic", A = "AT Commands", O = "CodeEditorLanguageChipIcon", T = {
|
|
107
|
-
commandPrefixes: ["AT+", "+"],
|
|
108
|
-
concatenationSeparators: [";"],
|
|
109
|
-
argumentSeparators: [","],
|
|
110
|
-
reservedWords: ["SET", "INFO", "SAVE", "CLEAR"]
|
|
111
|
-
}, m = {
|
|
112
|
-
js: "javascript",
|
|
113
|
-
jsx: "jsx",
|
|
114
|
-
ts: "typescript",
|
|
115
|
-
tsx: "tsx",
|
|
116
|
-
py: "python",
|
|
117
|
-
sh: "bash",
|
|
118
|
-
shell: "bash",
|
|
119
|
-
yml: "yaml",
|
|
120
|
-
at: r,
|
|
121
|
-
"telemetry-at": r
|
|
122
|
-
}, p = n;
|
|
123
|
-
function I(o) {
|
|
124
|
-
const e = o.palette.mode === "dark" ? "dark" : "light";
|
|
125
|
-
return C[e];
|
|
126
|
-
}
|
|
127
|
-
const L = a(
|
|
128
|
-
d,
|
|
129
|
-
t
|
|
130
|
-
);
|
|
131
|
-
export {
|
|
132
|
-
r as CODE_EDITOR_AT_LANGUAGE,
|
|
133
|
-
A as CODE_EDITOR_AT_TEMPLATE_LANGUAGE_LABEL,
|
|
134
|
-
l as CODE_EDITOR_AT_TEMPLATE_NAME,
|
|
135
|
-
T as CODE_EDITOR_AT_TEMPLATE_TOKENS,
|
|
136
|
-
L as CODE_EDITOR_CLASSES,
|
|
137
|
-
i as CODE_EDITOR_DEFAULT_LANGUAGE,
|
|
138
|
-
u as CODE_EDITOR_DEFAULT_MAX_LINES,
|
|
139
|
-
g as CODE_EDITOR_DEFAULT_MIN_LINES,
|
|
140
|
-
p as CODE_EDITOR_FALLBACK_LANGUAGE_ICON,
|
|
141
|
-
d as CODE_EDITOR_KEY_COMPONENT,
|
|
142
|
-
m as CODE_EDITOR_LANGUAGE_ALIASES,
|
|
143
|
-
O as CODE_EDITOR_LANGUAGE_CHIP_ICON_INSTANCE_ID,
|
|
144
|
-
_ as CODE_EDITOR_LINE_HEIGHT_BY_SIZE,
|
|
145
|
-
B as CODE_EDITOR_MONO_FONT_FAMILY,
|
|
146
|
-
D as CODE_EDITOR_PADDING_PX,
|
|
147
|
-
s as CODE_EDITOR_READ_ONLY_LABEL,
|
|
148
|
-
I as getCodeEditorVSCodeModernPalette
|
|
149
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Dictionary } from '@m4l/core';
|
|
2
|
-
export declare const CODE_EDITOR_DICTIONARY_KEY = "code_editor";
|
|
3
|
-
/**
|
|
4
|
-
* Return the dictionary namespaces required by the CodeEditor component.
|
|
5
|
-
*/
|
|
6
|
-
export declare function getCodeEditorComponentsDictionary(): string[];
|
|
7
|
-
export declare const defaultCodeEditorDictionary: Dictionary;
|
|
8
|
-
export declare const CODE_EDITOR_DICTIONARY: {
|
|
9
|
-
readonly readOnly: "code_editor.read_only";
|
|
10
|
-
};
|
|
11
|
-
//# sourceMappingURL=dictionary.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dictionary.d.ts","sourceRoot":"","sources":["../../../../../../../packages/components/src/components/extended/ReactSimpleCodeEditor/dictionary.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAE5C,eAAO,MAAM,0BAA0B,gBAAgB,CAAC;AAExD;;GAEG;AACH,wBAAgB,iCAAiC,aAEhD;AAED,eAAO,MAAM,2BAA2B,EAAE,UAIzC,CAAC;AAEF,eAAO,MAAM,sBAAsB;;CAEzB,CAAC"}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { ReactElement } from 'react';
|
|
2
|
-
import { Theme } from '@mui/material';
|
|
3
|
-
import { default as Prism } from 'prismjs';
|
|
4
|
-
import { PrismTheme } from 'prism-react-renderer';
|
|
5
|
-
import { CodeEditorCustomLanguages, CodeEditorLezerSyntaxValidatorOptions, CodeEditorLanguageTemplate, CodeEditorLanguageTemplateInput, CodeEditorRuntimeDependency, HighlightCodeOptions, CodeEditorSyntaxValidationContext, CodeEditorSyntaxValidator, CodeEditorSyntaxValidationResult } from '../types';
|
|
6
|
-
export declare const DEFAULT_CODE_EDITOR_AT_LANGUAGE_TEMPLATE: CodeEditorLanguageTemplate;
|
|
7
|
-
/** Escape a literal token so it can be embedded safely inside a RegExp. */
|
|
8
|
-
export declare function escapeRegExpToken(token: string): string;
|
|
9
|
-
/** Join user-defined token literals into a RegExp alternation pattern. */
|
|
10
|
-
export declare function createTokenAlternation(tokens?: string[]): string | undefined;
|
|
11
|
-
/** Build the Prism grammar for AT command templates from a token definition object. */
|
|
12
|
-
export declare function buildAtCommandGrammar(template: CodeEditorLanguageTemplate): Prism.Grammar;
|
|
13
|
-
/** Build the Prism grammar associated with the provided CodeEditor template. */
|
|
14
|
-
export declare function createCodeEditorLanguageGrammar(template: CodeEditorLanguageTemplate): Prism.Grammar;
|
|
15
|
-
/**
|
|
16
|
-
* Register a Prism grammar so CodeEditor can highlight a custom language.
|
|
17
|
-
*/
|
|
18
|
-
export declare function registerCodeEditorLanguage(languageName: string, grammar: Prism.Grammar): void;
|
|
19
|
-
/** Register a reusable language template so callers can reference it by name later. */
|
|
20
|
-
export declare function registerCodeEditorLanguageTemplate(template: CodeEditorLanguageTemplate): void;
|
|
21
|
-
/** Resolve a named or inline template definition passed to the CodeEditor API. */
|
|
22
|
-
export declare function resolveCodeEditorLanguageTemplate(template?: CodeEditorLanguageTemplateInput): CodeEditorLanguageTemplate | undefined;
|
|
23
|
-
/** Resolve the active template without mutating the shared Prism language registry. */
|
|
24
|
-
export declare function ensureCodeEditorLanguageTemplate(template?: CodeEditorLanguageTemplateInput): CodeEditorLanguageTemplate | undefined;
|
|
25
|
-
/**
|
|
26
|
-
* Register a global syntax validator that `validateSyntax` can reuse by language key.
|
|
27
|
-
*/
|
|
28
|
-
export declare function registerCodeEditorSyntaxValidator(languageName: string, syntaxValidator: CodeEditorSyntaxValidator): void;
|
|
29
|
-
/**
|
|
30
|
-
* Build a CodeEditor syntax validator from an official Lezer-backed parser.
|
|
31
|
-
*/
|
|
32
|
-
export declare function createCodeEditorLezerSyntaxValidator(options: CodeEditorLezerSyntaxValidatorOptions): CodeEditorSyntaxValidator;
|
|
33
|
-
/**
|
|
34
|
-
* Execute one or more runtime dependencies once so consumers can lazy-load Prism modules.
|
|
35
|
-
*/
|
|
36
|
-
export declare function ensureCodeEditorRuntimeDependencies(runtimeDependencies?: CodeEditorRuntimeDependency | CodeEditorRuntimeDependency[]): Promise<void>;
|
|
37
|
-
/**
|
|
38
|
-
* Register the custom languages passed to the current CodeEditor instance globally.
|
|
39
|
-
*/
|
|
40
|
-
export declare function ensureCodeEditorLanguages(customLanguages?: CodeEditorCustomLanguages): void;
|
|
41
|
-
/**
|
|
42
|
-
* Resolve aliases such as js/ts/sh to the Prism language key used for highlighting.
|
|
43
|
-
*/
|
|
44
|
-
export declare function resolveCodeEditorLanguage(languageText?: string): string;
|
|
45
|
-
/** Validate registered languages while treating unsupported languages as an explicit opt-in path. */
|
|
46
|
-
export declare function validateCodeEditorSyntax({ code, languageTemplate, languageText, }: CodeEditorSyntaxValidationContext): CodeEditorSyntaxValidationResult;
|
|
47
|
-
/**
|
|
48
|
-
* Count the number of logical lines rendered by the editor, preserving trailing new lines.
|
|
49
|
-
*/
|
|
50
|
-
export declare function getCodeEditorLineCount(value: string): number;
|
|
51
|
-
/**
|
|
52
|
-
* Build the Prism theme used by CodeEditor from the exact VS Code Modern palettes.
|
|
53
|
-
*/
|
|
54
|
-
export declare function createCodeEditorPrismTheme(theme: Theme): PrismTheme;
|
|
55
|
-
/**
|
|
56
|
-
* Render the highlighted code tree consumed by react-simple-code-editor.
|
|
57
|
-
*/
|
|
58
|
-
export declare function highlightCode({ code, customLanguages, languageTemplate, languageText, prismTheme, syntaxErrorRange, }: HighlightCodeOptions): ReactElement;
|
|
59
|
-
//# sourceMappingURL=highlighting.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"highlighting.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/components/src/components/extended/ReactSimpleCodeEditor/helpers/highlighting.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,KAAK,MAAM,SAAS,CAAC;AAC5B,OAAO,EAA4B,KAAK,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAUjF,OAAO,KAAK,EACV,yBAAyB,EAEzB,qCAAqC,EACrC,0BAA0B,EAC1B,+BAA+B,EAC/B,2BAA2B,EAC3B,oBAAoB,EAGpB,iCAAiC,EACjC,yBAAyB,EACzB,gCAAgC,EACjC,MAAM,UAAU,CAAC;AA2GlB,eAAO,MAAM,wCAAwC,EAAE,0BAWtD,CAAC;AA0RF,2EAA2E;AAC3E,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEvD;AAED,0EAA0E;AAC1E,wBAAgB,sBAAsB,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,GAAG,MAAM,GAAG,SAAS,CAU5E;AAED,uFAAuF;AACvF,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,0BAA0B,GACnC,KAAK,CAAC,OAAO,CAmDf;AAED,gFAAgF;AAChF,wBAAgB,+BAA+B,CAC7C,QAAQ,EAAE,0BAA0B,GACnC,KAAK,CAAC,OAAO,CAOf;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CACxC,YAAY,EAAE,MAAM,EACpB,OAAO,EAAE,KAAK,CAAC,OAAO,GACrB,IAAI,CAMN;AAED,uFAAuF;AACvF,wBAAgB,kCAAkC,CAChD,QAAQ,EAAE,0BAA0B,GACnC,IAAI,CAQN;AAED,kFAAkF;AAClF,wBAAgB,iCAAiC,CAC/C,QAAQ,CAAC,EAAE,+BAA+B,GACzC,0BAA0B,GAAG,SAAS,CAUxC;AAED,uFAAuF;AACvF,wBAAgB,gCAAgC,CAC9C,QAAQ,CAAC,EAAE,+BAA+B,GACzC,0BAA0B,GAAG,SAAS,CAExC;AAED;;GAEG;AACH,wBAAgB,iCAAiC,CAC/C,YAAY,EAAE,MAAM,EACpB,eAAe,EAAE,yBAAyB,GACzC,IAAI,CAMN;AAED;;GAEG;AACH,wBAAgB,oCAAoC,CAClD,OAAO,EAAE,qCAAqC,GAC7C,yBAAyB,CAG3B;AAeD;;GAEG;AACH,wBAAsB,mCAAmC,CACvD,mBAAmB,CAAC,EAAE,2BAA2B,GAAG,2BAA2B,EAAE,GAChF,OAAO,CAAC,IAAI,CAAC,CAsBf;AAED;;GAEG;AACH,wBAAgB,yBAAyB,CACvC,eAAe,CAAC,EAAE,yBAAyB,GAC1C,IAAI,CAQN;AAED;;GAEG;AACH,wBAAgB,yBAAyB,CACvC,YAAY,CAAC,EAAE,MAAM,GACpB,MAAM,CAKR;AAmqBD,qGAAqG;AACrG,wBAAgB,wBAAwB,CAAC,EACvC,IAAI,EACJ,gBAAgB,EAChB,YAAY,GACb,EAAE,iCAAiC,GAAG,gCAAgC,CAkBtE;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAE5D;AA+HD;;GAEG;AACH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,KAAK,GAAG,UAAU,CAiInE;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,EAC5B,IAAI,EACJ,eAAe,EACf,gBAAgB,EAChB,YAAY,EACZ,UAAU,EACV,gBAAgB,GACjB,EAAE,oBAAoB,GAAG,YAAY,CA6QrC"}
|