@datarobot/design-system 29.6.0 → 29.7.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/cjs/index.d.ts +1 -0
- package/cjs/index.js +11 -0
- package/cjs/text-merge-view/index.d.ts +2 -0
- package/cjs/text-merge-view/index.js +12 -0
- package/cjs/text-merge-view/text-merge-view.d.ts +21 -0
- package/cjs/text-merge-view/text-merge-view.js +109 -0
- package/esm/index.d.ts +1 -0
- package/esm/index.js +1 -0
- package/esm/text-merge-view/index.d.ts +2 -0
- package/esm/text-merge-view/index.js +2 -0
- package/esm/text-merge-view/text-merge-view.d.ts +21 -0
- package/esm/text-merge-view/text-merge-view.js +101 -0
- package/js/bundle/bundle.js +248 -51
- package/js/bundle/bundle.min.js +1 -1
- package/js/bundle/index.d.ts +24 -0
- package/package.json +4 -1
- package/styles/index.css +36 -0
- package/styles/index.min.css +1 -1
- package/styles/themes/alpine-light.css +8 -0
- package/styles/themes/alpine-light.min.css +1 -1
- package/styles/themes/light.css +8 -0
- package/styles/themes/light.min.css +1 -1
- package/styles/themes/midnight-gray.css +8 -0
- package/styles/themes/midnight-gray.min.css +1 -1
- package/text-merge-view/package.json +7 -0
package/js/bundle/index.d.ts
CHANGED
|
@@ -236,6 +236,8 @@ export { Tabs, TAB_GROUP_SIZE, TABS_ACCENT_TYPES };
|
|
|
236
236
|
export type { TextEditorProps, TextEditorValue, TextEditorValueChild, MarkType, BlockType, TextEditorTool, };
|
|
237
237
|
export { TextEditor, EditedText, InlineTextEditor, isEmptyTextEditorValue, isLongerTextEditorValueThan, hasGreaterTextEditorLinesThan, convertTextToTextEditorValue, TEXT_EDITOR_DEFAULT_VALUE, TEXT_EDITOR_DEFAULT_TOOLS, TEXT_EDITOR_TOOLS, INLINE_EDITOR_TYPES, BLOCK_TYPES, MARK_TYPES, TOOLBAR_POSITION, };
|
|
238
238
|
|
|
239
|
+
export { TextMergeView, type TextMergeProps };
|
|
240
|
+
|
|
239
241
|
export type { TextAreaProps, TextAreaResizeValues };
|
|
240
242
|
export { TextArea, TEXTAREA_RESIZE_VALUES };
|
|
241
243
|
|
|
@@ -6671,6 +6673,28 @@ export function hasGreaterTextEditorLinesThan(value: TextEditorValue[], maxTextL
|
|
|
6671
6673
|
*/
|
|
6672
6674
|
export function convertTextToTextEditorValue(text: string): TextEditorValue[];
|
|
6673
6675
|
|
|
6676
|
+
import './text-merge-view.less';
|
|
6677
|
+
export type TextMergeProps = {
|
|
6678
|
+
className?: string;
|
|
6679
|
+
testId?: string;
|
|
6680
|
+
isDarkTheme?: boolean;
|
|
6681
|
+
values: {
|
|
6682
|
+
left: string;
|
|
6683
|
+
right: string;
|
|
6684
|
+
};
|
|
6685
|
+
viewSettings?: {
|
|
6686
|
+
showLineNumbers: boolean;
|
|
6687
|
+
highlightActiveLine: boolean;
|
|
6688
|
+
};
|
|
6689
|
+
};
|
|
6690
|
+
/**
|
|
6691
|
+
* Merge view for 2 text versions
|
|
6692
|
+
* Limited to read-only view.
|
|
6693
|
+
* @midnight-gray-supported
|
|
6694
|
+
* @alpine-light-supported
|
|
6695
|
+
*/
|
|
6696
|
+
export function TextMergeView({ className, testId, isDarkTheme, values, viewSettings, }: TextMergeProps): import("react/jsx-runtime").JSX.Element;
|
|
6697
|
+
|
|
6674
6698
|
import './text-with-hyperlinks.less';
|
|
6675
6699
|
export type TextWithHyperlinksProps = {
|
|
6676
6700
|
value?: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@datarobot/design-system",
|
|
3
|
-
"version": "29.
|
|
3
|
+
"version": "29.7.0",
|
|
4
4
|
"description": "DataRobot react components library",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "node ../../tools/build-lib.js",
|
|
@@ -51,6 +51,9 @@
|
|
|
51
51
|
"rheostat": "4.1.1"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
54
|
+
"@codemirror/merge": "6.11.2",
|
|
55
|
+
"@codemirror/state": "^6.0.0",
|
|
56
|
+
"@codemirror/view": "^6.17.0",
|
|
54
57
|
"@fortawesome/fontawesome-svg-core": "6.7.1",
|
|
55
58
|
"@fortawesome/free-brands-svg-icons": "6.7.1",
|
|
56
59
|
"@fortawesome/free-regular-svg-icons": "6.7.1",
|
package/styles/index.css
CHANGED
|
@@ -859,6 +859,14 @@
|
|
|
859
859
|
--text-editor-background-hover-color: #20262A;
|
|
860
860
|
--text-editor-active-color: transparent;
|
|
861
861
|
/*#endregion */
|
|
862
|
+
/*#region TextMergeView component */
|
|
863
|
+
--deleted-main-color: #E64D4D;
|
|
864
|
+
--deleted-with-opacity-color: rgba(230, 77, 77, 0.5);
|
|
865
|
+
--deleted-line-color: rgba(230, 77, 77, 0.08);
|
|
866
|
+
--changed-main-color: #1FFF9A;
|
|
867
|
+
--changed-with-opacity-color: rgba(31, 255, 154, 0.5);
|
|
868
|
+
--changed-line-color: rgba(31, 255, 154, 0.08);
|
|
869
|
+
/*#endregion */
|
|
862
870
|
/*#region ToggleSwitch */
|
|
863
871
|
--toggle-bg: transparent;
|
|
864
872
|
--toggle-area-border-color: #81868A;
|
|
@@ -13387,6 +13395,34 @@ table.simple-table.sublevel tr td {
|
|
|
13387
13395
|
padding: 0.5rem 0;
|
|
13388
13396
|
}
|
|
13389
13397
|
|
|
13398
|
+
/*!************************************************************************************************************************************************************************************************************************************************************!*\
|
|
13399
|
+
!*** css ../../node_modules/css-loader/dist/cjs.js!../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[3].use[2]!../../node_modules/less-loader/dist/cjs.js??ruleSet[1].rules[3].use[3]!./src/components/text-merge-view/text-merge-view.less ***!
|
|
13400
|
+
\************************************************************************************************************************************************************************************************************************************************************/
|
|
13401
|
+
/* stylelint-disable dr-custom/only-kebab-case-class-names */
|
|
13402
|
+
.text-merge-view {
|
|
13403
|
+
width: 100%;
|
|
13404
|
+
}
|
|
13405
|
+
.text-merge-view .cm-mergeViewEditor .cm-merge-a .cm-changedLineGutter {
|
|
13406
|
+
background: var(--deleted-main-color);
|
|
13407
|
+
}
|
|
13408
|
+
.text-merge-view .cm-mergeViewEditor .cm-merge-a .cm-deletedLine .cm-changedText {
|
|
13409
|
+
background: linear-gradient(var(--deleted-with-opacity-color), var(--deleted-with-opacity-color)) bottom / 100% 0.125rem no-repeat;
|
|
13410
|
+
}
|
|
13411
|
+
.text-merge-view .cm-mergeViewEditor .cm-merge-a .cm-changedLine,
|
|
13412
|
+
.text-merge-view .cm-mergeViewEditor .cm-merge-a .cm-deletedChunk {
|
|
13413
|
+
background-color: var(--deleted-line-color);
|
|
13414
|
+
}
|
|
13415
|
+
.text-merge-view .cm-mergeViewEditor .cm-merge-b .cm-changedLineGutter {
|
|
13416
|
+
background: var(--changed-main-color);
|
|
13417
|
+
}
|
|
13418
|
+
.text-merge-view .cm-mergeViewEditor .cm-merge-b .cm-changedLine {
|
|
13419
|
+
background-color: var(--changed-line-color);
|
|
13420
|
+
}
|
|
13421
|
+
.text-merge-view .cm-mergeViewEditor .cm-merge-b .cm-insertedLine .cm-changedText {
|
|
13422
|
+
background: linear-gradient(var(--changed-with-opacity-color), var(--changed-with-opacity-color)) bottom / 100% 0.125rem no-repeat;
|
|
13423
|
+
}
|
|
13424
|
+
/* stylelint-enable dr-custom/only-kebab-case-class-names */
|
|
13425
|
+
|
|
13390
13426
|
/*!**********************************************************************************************************************************************************************************************************************************************************!*\
|
|
13391
13427
|
!*** css ../../node_modules/css-loader/dist/cjs.js!../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[3].use[2]!../../node_modules/less-loader/dist/cjs.js??ruleSet[1].rules[3].use[3]!./src/components/toggler-switch/toggler-switch.less ***!
|
|
13392
13428
|
\**********************************************************************************************************************************************************************************************************************************************************/
|