@dovetail-v2/refine 0.3.11-alpha.2 → 0.3.12-alpha.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/style.css CHANGED
@@ -470,6 +470,10 @@
470
470
  background-color: transparent !important;
471
471
  padding: 0;
472
472
  }
473
+ .s82411.small {
474
+ padding: 0 10px;
475
+ height: 18px;
476
+ }
473
477
 
474
478
  .n9ja9cs.ant-tag.ant-tag-gray {
475
479
  background-color: rgba(237, 241, 250, 0.6);
@@ -584,6 +588,60 @@
584
588
  /* box shadow */
585
589
  /* fisheye */
586
590
  /* z-index */
591
+ .smzfpl7 {
592
+ color: #00122e;
593
+ }
594
+
595
+ .d85h4vb {
596
+ border-bottom: 1px dashed rgba(107, 128, 167, 0.6);
597
+ padding-bottom: 1px;
598
+ }/* // basic */
599
+ /* FishEye Color Variables and Functions */
600
+ /*
601
+ --------------------------- Primary Color ---------------------------
602
+ */
603
+ /*
604
+ ---------------------------When necessary to add at any time---------------------------
605
+ */
606
+ /* computed */
607
+ /* blue */
608
+ /* green */
609
+ /* yellow */
610
+ /* red */
611
+ /* purple */
612
+ /* palette global token*/
613
+ /* color opaque */
614
+ /* color transparent */
615
+ /* blue transparent */
616
+ /* green transparent */
617
+ /* yellow transparent */
618
+ /* red transparent */
619
+ /* gray transparent */
620
+ /* white transparent */
621
+ /* gradient opaque */
622
+ /* blue radial gradient */
623
+ /* blue linear gradient */
624
+ /* green radial gradient */
625
+ /* yellow radial gradient */
626
+ /* red radial gradient */
627
+ /* gray radial gradient */
628
+ /* white to gray radial gradient */
629
+ /* white to gray linear gradient */
630
+ /* gradient transparent */
631
+ /* secondary palette */
632
+ /* purple radial gradient */
633
+ /* refine alias color */
634
+ /* text */
635
+ /* link */
636
+ /* fill */
637
+ /* fill element */
638
+ /* fill interaction */
639
+ /* stroke */
640
+ /* background */
641
+ /* dim */
642
+ /* box shadow */
643
+ /* fisheye */
644
+ /* z-index */
587
645
  .b142d7q8 {
588
646
  display: flex;
589
647
  }
@@ -1855,6 +1913,62 @@
1855
1913
 
1856
1914
  .v1ixr1me {
1857
1915
  color: #00122E;
1916
+ }/* // basic */
1917
+ /* FishEye Color Variables and Functions */
1918
+ /*
1919
+ --------------------------- Primary Color ---------------------------
1920
+ */
1921
+ /*
1922
+ ---------------------------When necessary to add at any time---------------------------
1923
+ */
1924
+ /* computed */
1925
+ /* blue */
1926
+ /* green */
1927
+ /* yellow */
1928
+ /* red */
1929
+ /* purple */
1930
+ /* palette global token*/
1931
+ /* color opaque */
1932
+ /* color transparent */
1933
+ /* blue transparent */
1934
+ /* green transparent */
1935
+ /* yellow transparent */
1936
+ /* red transparent */
1937
+ /* gray transparent */
1938
+ /* white transparent */
1939
+ /* gradient opaque */
1940
+ /* blue radial gradient */
1941
+ /* blue linear gradient */
1942
+ /* green radial gradient */
1943
+ /* yellow radial gradient */
1944
+ /* red radial gradient */
1945
+ /* gray radial gradient */
1946
+ /* white to gray radial gradient */
1947
+ /* white to gray linear gradient */
1948
+ /* gradient transparent */
1949
+ /* secondary palette */
1950
+ /* purple radial gradient */
1951
+ /* refine alias color */
1952
+ /* text */
1953
+ /* link */
1954
+ /* fill */
1955
+ /* fill element */
1956
+ /* fill interaction */
1957
+ /* stroke */
1958
+ /* background */
1959
+ /* dim */
1960
+ /* box shadow */
1961
+ /* fisheye */
1962
+ /* z-index */
1963
+ .i1hk9uwu {
1964
+ display: flex;
1965
+ flex-direction: column;
1966
+ gap: 8px;
1967
+ }
1968
+
1969
+ .c1wn08fn {
1970
+ display: flex;
1971
+ flex-direction: column;
1858
1972
  }.pf-v5-t-light {
1859
1973
  --pf-v5-global--Color--100: var(--pf-v5-global--Color--dark-100);
1860
1974
  --pf-v5-global--Color--200: var(--pf-v5-global--Color--dark-200);
@@ -3333,9 +3447,8 @@
3333
3447
  }
3334
3448
 
3335
3449
  .b1f1s2pc {
3336
- margin: 0 24px;
3450
+ margin: 0 24px 0 24px;
3337
3451
  overflow: auto;
3338
- margin-bottom: 16;
3339
3452
  }
3340
3453
 
3341
3454
  .g1qw3bxx {
@@ -3347,7 +3460,6 @@
3347
3460
  }
3348
3461
 
3349
3462
  .flfewds {
3350
- background-color: #fff;
3351
3463
  height: 100%;
3352
3464
  }
3353
3465
 
@@ -3357,7 +3469,6 @@
3357
3469
  }
3358
3470
 
3359
3471
  .t1pt61xk {
3360
- padding-bottom: 16px;
3361
3472
  display: flex;
3362
3473
  flex-direction: column;
3363
3474
  align-items: center;
@@ -3372,6 +3483,7 @@
3372
3483
  .tca5959.ant-tabs {
3373
3484
  flex: 1;
3374
3485
  min-height: 0;
3486
+ margin-top: 16px;
3375
3487
  }
3376
3488
  .tca5959.ant-tabs .ant-tabs-nav {
3377
3489
  margin-bottom: 0;
@@ -3388,14 +3500,18 @@
3388
3500
  height: 100%;
3389
3501
  }
3390
3502
 
3391
- .k3dcesi {
3503
+ .s3dcesi.ant-tabs {
3504
+ margin-top: 12px;
3505
+ }
3506
+
3507
+ .kzyzuo8 {
3392
3508
  margin: auto 0;
3393
3509
  margin-right: 8px;
3394
3510
  border: 1px solid rgba(172, 186, 211, 0.6);
3395
3511
  background-color: white;
3396
3512
  }
3397
3513
 
3398
- .czyzuo8 {
3514
+ .cxd8k68 {
3399
3515
  padding: 4px 0;
3400
3516
  }/* // basic */
3401
3517
  /* FishEye Color Variables and Functions */
@@ -4641,12 +4757,7 @@
4641
4757
  /* box shadow */
4642
4758
  /* fisheye */
4643
4759
  /* z-index */
4644
- .dh5j833 {
4645
- border-bottom: 1px dashed rgba(107, 128, 167, 0.6);
4646
- padding-bottom: 1px;
4647
- }
4648
-
4649
- .s1fcgan.ant-tooltip .ant-tooltip-inner {
4760
+ .sh5j833.ant-tooltip .ant-tooltip-inner {
4650
4761
  width: 256px;
4651
4762
  }body,
4652
4763
  #root {
@@ -0,0 +1,2 @@
1
+ export declare const SmallSectionTitleStyle: import("@linaria/core").LinariaClassName;
2
+ export declare const DashedTitleStyle: import("@linaria/core").LinariaClassName;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dovetail-v2/refine",
3
- "version": "0.3.11-alpha.2",
3
+ "version": "0.3.12-alpha.0",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist",
@@ -1,59 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const common = require("./common-1eb43414.cjs");
4
- const monaco = require("monaco-editor");
5
- const React = require("react");
6
- function _interopNamespaceDefault(e) {
7
- const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
8
- if (e) {
9
- for (const k in e) {
10
- if (k !== "default") {
11
- const d = Object.getOwnPropertyDescriptor(e, k);
12
- Object.defineProperty(n, k, d.get ? d : {
13
- enumerable: true,
14
- get: () => e[k]
15
- });
16
- }
17
- }
18
- }
19
- n.default = e;
20
- return Object.freeze(n);
21
- }
22
- const monaco__namespace = /* @__PURE__ */ _interopNamespaceDefault(monaco);
23
- const MonacoYamlDiffEditor = (props) => {
24
- const ref = React.useRef(null);
25
- const { origin, modified, id, height } = props;
26
- React.useEffect(() => {
27
- const originalUri = id ? monaco__namespace.Uri.parse(`${id}_original.yaml`) : void 0;
28
- const modifiedUri = id ? monaco__namespace.Uri.parse(`${id}_modified.yaml`) : void 0;
29
- const originalModel = monaco__namespace.editor.createModel(origin, "yaml", originalUri);
30
- const modifiedModel = monaco__namespace.editor.createModel(modified, "yaml", modifiedUri);
31
- const diffEditor = monaco__namespace.editor.createDiffEditor(ref.current, {
32
- renderSideBySide: true,
33
- originalEditable: false,
34
- readOnly: true,
35
- ignoreTrimWhitespace: false,
36
- scrollBeyondLastLine: false
37
- });
38
- diffEditor.setModel({
39
- original: originalModel,
40
- modified: modifiedModel
41
- });
42
- return () => {
43
- diffEditor.dispose();
44
- originalModel.dispose();
45
- modifiedModel.dispose();
46
- };
47
- }, [modified, origin, id]);
48
- return /* @__PURE__ */ common.jsxRuntimeExports.jsx(
49
- "div",
50
- {
51
- ref,
52
- style: {
53
- width: "100%",
54
- height: height || "500px"
55
- }
56
- }
57
- );
58
- };
59
- exports.default = MonacoYamlDiffEditor;
@@ -1,42 +0,0 @@
1
- import { j as jsxRuntimeExports } from "./common-241b21f8.js";
2
- import * as monaco from "monaco-editor";
3
- import { useRef, useEffect } from "react";
4
- const MonacoYamlDiffEditor = (props) => {
5
- const ref = useRef(null);
6
- const { origin, modified, id, height } = props;
7
- useEffect(() => {
8
- const originalUri = id ? monaco.Uri.parse(`${id}_original.yaml`) : void 0;
9
- const modifiedUri = id ? monaco.Uri.parse(`${id}_modified.yaml`) : void 0;
10
- const originalModel = monaco.editor.createModel(origin, "yaml", originalUri);
11
- const modifiedModel = monaco.editor.createModel(modified, "yaml", modifiedUri);
12
- const diffEditor = monaco.editor.createDiffEditor(ref.current, {
13
- renderSideBySide: true,
14
- originalEditable: false,
15
- readOnly: true,
16
- ignoreTrimWhitespace: false,
17
- scrollBeyondLastLine: false
18
- });
19
- diffEditor.setModel({
20
- original: originalModel,
21
- modified: modifiedModel
22
- });
23
- return () => {
24
- diffEditor.dispose();
25
- originalModel.dispose();
26
- modifiedModel.dispose();
27
- };
28
- }, [modified, origin, id]);
29
- return /* @__PURE__ */ jsxRuntimeExports.jsx(
30
- "div",
31
- {
32
- ref,
33
- style: {
34
- width: "100%",
35
- height: height || "500px"
36
- }
37
- }
38
- );
39
- };
40
- export {
41
- MonacoYamlDiffEditor as default
42
- };
@@ -1,197 +0,0 @@
1
- import { j as jsxRuntimeExports, c as cx_default } from "./common-241b21f8.js";
2
- import yaml from "js-yaml";
3
- import * as monaco from "monaco-editor";
4
- import { setDiagnosticsOptions } from "monaco-yaml";
5
- import { useRef, useEffect } from "react";
6
- import ReactDOM from "react-dom";
7
- import { Y as YamlEditorStyle } from "./index-2db85ce1.js";
8
- import "dayjs";
9
- import "i18next";
10
- import "@refinedev/core";
11
- import "qs";
12
- import "react-router-dom";
13
- import "@cloudtower/eagle";
14
- import "@cloudtower/icons-react";
15
- import "lodash-es";
16
- import "usehooks-ts";
17
- import "k8s-api-provider";
18
- import "@patternfly/react-log-viewer";
19
- import "react-hook-form";
20
- import "sunflower-antd";
21
- import "antd";
22
- function MonacoYamlEditor(props) {
23
- const ref = useRef(null);
24
- const instanceRef = useRef({
25
- editor: null
26
- });
27
- const {
28
- defaultValue,
29
- id,
30
- height,
31
- readOnly,
32
- schemas,
33
- isScrollOnFocus,
34
- onChange,
35
- onValidate,
36
- getInstance,
37
- onEditorCreate,
38
- onBlur
39
- } = props;
40
- const uri = id ? monaco.Uri.parse(`${id}.yaml`) : void 0;
41
- useEffect(() => {
42
- if (!window._MonacoSchemaMap) {
43
- window._MonacoSchemaMap = /* @__PURE__ */ new Map();
44
- }
45
- window._MonacoSchemaMap.set(id || "", {
46
- // Id of the first schema
47
- uri: String(uri),
48
- // Associate with our model
49
- fileMatch: [String(uri)],
50
- schema: {
51
- oneOf: schemas || [{ type: "object" }]
52
- }
53
- });
54
- const finalSchemas = [...window._MonacoSchemaMap.values()];
55
- setDiagnosticsOptions({
56
- enableSchemaRequest: false,
57
- validate: true,
58
- format: true,
59
- isKubernetes: true,
60
- schemas: finalSchemas
61
- });
62
- const defaultValueString = typeof defaultValue === "string" ? defaultValue : yaml.dump(defaultValue);
63
- const model = monaco.editor.createModel(defaultValueString, "yaml", uri);
64
- const editor = monaco.editor.create(ref.current, {
65
- automaticLayout: true,
66
- scrollBeyondLastLine: false,
67
- model,
68
- scrollbar: {
69
- handleMouseWheel: !isScrollOnFocus,
70
- alwaysConsumeMouseWheel: false
71
- // https://github.com/microsoft/monaco-editor/issues/2007
72
- },
73
- tabSize: 2,
74
- lineNumbersMinChars: 7,
75
- readOnly,
76
- autoIndent: {}.VITE_IS_TEST ? "none" : "advanced",
77
- theme: "vs"
78
- });
79
- instanceRef.current.editor = editor;
80
- getInstance == null ? void 0 : getInstance(editor);
81
- onEditorCreate == null ? void 0 : onEditorCreate(editor);
82
- return () => {
83
- instanceRef.current.editor = null;
84
- window._MonacoSchemaMap.delete(id || "");
85
- model.dispose();
86
- editor.dispose();
87
- };
88
- }, [id, schemas, readOnly, isScrollOnFocus, getInstance]);
89
- useEffect(() => {
90
- const editor = instanceRef.current.editor;
91
- if (editor) {
92
- const stop = editor.onDidChangeModelContent(() => {
93
- ReactDOM.unstable_batchedUpdates(() => {
94
- const editorValue = editor.getValue();
95
- const newValue = typeof defaultValue === "string" ? editorValue : yaml.load(editorValue) || {};
96
- if (typeof defaultValue !== "string" && typeof newValue === "string") {
97
- onValidate == null ? void 0 : onValidate(false, true);
98
- } else {
99
- onValidate == null ? void 0 : onValidate(true, true);
100
- onChange == null ? void 0 : onChange(newValue);
101
- }
102
- });
103
- });
104
- return () => {
105
- stop.dispose();
106
- };
107
- }
108
- }, [onChange, defaultValue]);
109
- useEffect(() => {
110
- const editor = instanceRef.current.editor;
111
- if (editor) {
112
- const stop = monaco.editor.onDidChangeMarkers((uri2) => {
113
- var _a;
114
- const model = (_a = instanceRef.current.editor) == null ? void 0 : _a.getModel();
115
- const currentEditorUri = model == null ? void 0 : model.uri;
116
- if (model && uri2.toString() === (currentEditorUri == null ? void 0 : currentEditorUri.toString())) {
117
- const marks = monaco.editor.getModelMarkers({
118
- owner: "yaml",
119
- resource: currentEditorUri
120
- });
121
- const yamlMarks = marks.filter((m) => m.source === "YAML");
122
- const schemaMarks = marks.filter((m) => m.source !== "YAML");
123
- const yamlValid = yamlMarks.length === 0;
124
- const schemaValid = schemaMarks.length === 0;
125
- onValidate == null ? void 0 : onValidate(yamlValid, schemaValid);
126
- if (marks.some((mark) => {
127
- var _a2;
128
- return (_a2 = mark.source) == null ? void 0 : _a2.includes("yaml-schema");
129
- })) {
130
- monaco.editor.setModelMarkers(
131
- model,
132
- "yaml",
133
- marks.map((mark) => ({ ...mark, source: "", resource: {} }))
134
- );
135
- }
136
- }
137
- });
138
- return () => {
139
- stop.dispose();
140
- };
141
- }
142
- }, [onValidate]);
143
- useEffect(() => {
144
- const editor = instanceRef.current.editor;
145
- if (editor) {
146
- const stop = editor.onDidBlurEditorWidget(() => {
147
- ReactDOM.unstable_batchedUpdates(() => {
148
- onBlur == null ? void 0 : onBlur();
149
- });
150
- });
151
- return () => {
152
- stop.dispose();
153
- };
154
- }
155
- }, [onBlur]);
156
- useEffect(() => {
157
- const editor = instanceRef.current.editor;
158
- const stops = [];
159
- if (editor && isScrollOnFocus) {
160
- stops.push(
161
- editor.onDidFocusEditorWidget(() => {
162
- editor.updateOptions({
163
- scrollbar: {
164
- handleMouseWheel: true
165
- }
166
- });
167
- })
168
- );
169
- stops.push(
170
- editor.onDidBlurEditorWidget(() => {
171
- editor.updateOptions({
172
- scrollbar: {
173
- handleMouseWheel: false
174
- }
175
- });
176
- })
177
- );
178
- }
179
- return () => {
180
- stops.forEach((stop) => stop.dispose());
181
- };
182
- }, [isScrollOnFocus]);
183
- return /* @__PURE__ */ jsxRuntimeExports.jsx(
184
- "div",
185
- {
186
- ref,
187
- className: cx_default(YamlEditorStyle, props.className),
188
- style: {
189
- width: "100%",
190
- height: height || "500px"
191
- }
192
- }
193
- );
194
- }
195
- export {
196
- MonacoYamlEditor as default
197
- };