@gravitee/graphene-core 2.52.0-feat-layout-content-width-tiers.35c2ff9 → 2.52.0-graphene-142-code-editor.aaa181c
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/USAGE_GUIDE.md +11 -145
- package/dist/CodeEditor-Cnn11Gx1.js +2010 -0
- package/dist/__stories__/fixtures/index.d.ts +1 -1
- package/dist/__stories__/fixtures/index.d.ts.map +1 -1
- package/dist/__stories__/fixtures/json-schema-form/code-editor.fixture.d.ts +14 -0
- package/dist/__stories__/fixtures/json-schema-form/code-editor.fixture.d.ts.map +1 -0
- package/dist/__stories__/fixtures/json-schema-form/index.d.ts +1 -0
- package/dist/__stories__/fixtures/json-schema-form/index.d.ts.map +1 -1
- package/dist/code-editor/index.js +2 -228
- package/dist/composed/AppLayout/AppLayout.d.ts +4 -17
- package/dist/composed/AppLayout/AppLayout.d.ts.map +1 -1
- package/dist/composed/CodeEditor/CodeEditor.d.ts.map +1 -1
- package/dist/composed/CodeEditor/setupCodeEditor.d.ts +34 -39
- package/dist/composed/CodeEditor/setupCodeEditor.d.ts.map +1 -1
- package/dist/composed/JsonSchemaForm/SchemaField.d.ts.map +1 -1
- package/dist/composed/JsonSchemaForm/fields/code-editor/CodeEditorField.d.ts +8 -0
- package/dist/composed/JsonSchemaForm/fields/code-editor/CodeEditorField.d.ts.map +1 -0
- package/dist/composed/JsonSchemaForm/models/json-schema.types.d.ts +5 -5
- package/dist/composed/JsonSchemaForm/models/json-schema.types.d.ts.map +1 -1
- package/dist/composed/JsonSchemaForm/utils/schemaShape.d.ts +2 -1
- package/dist/composed/JsonSchemaForm/utils/schemaShape.d.ts.map +1 -1
- package/dist/composed/LayoutSlots/LayoutSlotsContext.d.ts +1 -11
- package/dist/composed/LayoutSlots/LayoutSlotsContext.d.ts.map +1 -1
- package/dist/composed/LayoutSlots/use-layout-config.d.ts +0 -3
- package/dist/composed/LayoutSlots/use-layout-config.d.ts.map +1 -1
- package/dist/index.d.ts +0 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7636 -7626
- package/dist/styles/globals.css +1 -1
- package/dist/styles/tailwind-theme.css +0 -3
- package/dist/tokens/component.css +1 -3
- package/package.json +2 -2
- package/snippets/context-sidebar-detail-page.tsx +1 -10
- package/snippets/data-table-list-page.tsx +0 -5
- package/dist/Skeleton-C30qULzD.js +0 -1745
- package/dist/composed/PageContent/PageContent.d.ts +0 -60
- package/dist/composed/PageContent/PageContent.d.ts.map +0 -1
- package/dist/composed/PageContent/index.d.ts +0 -3
- package/dist/composed/PageContent/index.d.ts.map +0 -1
- package/dist/lib/view-transitions.d.ts +0 -14
- package/dist/lib/view-transitions.d.ts.map +0 -1
- package/snippets/creation-wizard-page.tsx +0 -121
- package/snippets/form-settings-page.tsx +0 -112
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
export { sampleApps, sampleAppsExtended } from './shell/app-switcher.fixture';
|
|
6
6
|
export { sampleEnvironments, sampleEnvironmentsForSidebar } from './shell/environment-picker.fixture';
|
|
7
7
|
export { agentManagementApps, agentManagementNavGroups, contextNavGroups, contextPageTabKeys, findContextLabel, findNavLabel, pageLayoutNavGroups, sampleNavGroups, } from './navigation.fixture';
|
|
8
|
-
export { jsonSchemaFormArrayExampleSchema, jsonSchemaFormBannerSchema, jsonSchemaFormCombinatorsExampleSchema, jsonSchemaFormDependenciesSchema, jsonSchemaFormDeprecatedSchema, jsonSchemaFormDisableIfSchema, jsonSchemaFormDisplayIfSchema, jsonSchemaFormEnumExampleSchema, jsonSchemaFormPlaygroundSchema, } from './json-schema-form';
|
|
8
|
+
export { jsonSchemaFormArrayExampleSchema, jsonSchemaFormBannerSchema, jsonSchemaFormCodeEditorSchema, jsonSchemaFormCombinatorsExampleSchema, jsonSchemaFormDependenciesSchema, jsonSchemaFormDeprecatedSchema, jsonSchemaFormDisableIfSchema, jsonSchemaFormDisplayIfSchema, jsonSchemaFormEnumExampleSchema, jsonSchemaFormPlaygroundSchema, } from './json-schema-form';
|
|
9
9
|
export { jsonSchemaFormObjectVariantsSchema } from './json-schema-form-object-variants.fixture';
|
|
10
10
|
export { catalogApis } from './apim/api-catalog.fixture';
|
|
11
11
|
export { samplePlans } from './apim/plans.fixture';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/__stories__/fixtures/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAC9E,OAAO,EAAE,kBAAkB,EAAE,4BAA4B,EAAE,MAAM,oCAAoC,CAAC;AAEtG,OAAO,EACL,mBAAmB,EACnB,wBAAwB,EACxB,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EAChB,YAAY,EACZ,mBAAmB,EACnB,eAAe,GAChB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,gCAAgC,EAChC,0BAA0B,EAC1B,sCAAsC,EACtC,gCAAgC,EAChC,8BAA8B,EAC9B,6BAA6B,EAC7B,6BAA6B,EAC7B,+BAA+B,EAC/B,8BAA8B,GAC/B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,kCAAkC,EAAE,MAAM,4CAA4C,CAAC;AAChG,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,+BAA+B,EAAE,MAAM,mCAAmC,CAAC;AAEpF,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAEpE,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/__stories__/fixtures/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAC9E,OAAO,EAAE,kBAAkB,EAAE,4BAA4B,EAAE,MAAM,oCAAoC,CAAC;AAEtG,OAAO,EACL,mBAAmB,EACnB,wBAAwB,EACxB,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EAChB,YAAY,EACZ,mBAAmB,EACnB,eAAe,GAChB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,gCAAgC,EAChC,0BAA0B,EAC1B,8BAA8B,EAC9B,sCAAsC,EACtC,gCAAgC,EAChC,8BAA8B,EAC9B,6BAA6B,EAC7B,6BAA6B,EAC7B,+BAA+B,EAC/B,8BAA8B,GAC/B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,kCAAkC,EAAE,MAAM,4CAA4C,CAAC;AAChG,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,+BAA+B,EAAE,MAAM,mCAAmC,CAAC;AAEpF,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAEpE,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { JsonSchema } from '../../../composed/JsonSchemaForm';
|
|
2
|
+
/**
|
|
3
|
+
* Mirrors ui-particles' `codeEditorExample`
|
|
4
|
+
* (`gio-form-json-schema/json-schema-example/code-editor.ts`) and the shape used by real APIM
|
|
5
|
+
* plugins (`format: 'gio-code-editor'`, e.g. the dynamic-properties HTTP service's JOLT
|
|
6
|
+
* transformation field). Forcing function for ISO behaviour: a Particles-authored schema must
|
|
7
|
+
* render the same widget in Graphene.
|
|
8
|
+
*
|
|
9
|
+
* The trigger is `type: 'string'` + `format: 'gio-code-editor'`. The language is read from
|
|
10
|
+
* `gioConfig.monacoEditorConfig.language` when present; otherwise the editor falls back to JSON
|
|
11
|
+
* auto-detection (JSON payload → `json`, else `plaintext`), matching Particles.
|
|
12
|
+
*/
|
|
13
|
+
export declare const jsonSchemaFormCodeEditorSchema: JsonSchema;
|
|
14
|
+
//# sourceMappingURL=code-editor.fixture.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"code-editor.fixture.d.ts","sourceRoot":"","sources":["../../../../src/__stories__/fixtures/json-schema-form/code-editor.fixture.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iDAAiD,CAAC;AAElF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,8BAA8B,EAAE,UA2C5C,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { jsonSchemaFormArrayExampleSchema } from './array.fixture';
|
|
2
2
|
export { jsonSchemaFormBannerSchema } from './banner.fixture';
|
|
3
|
+
export { jsonSchemaFormCodeEditorSchema } from './code-editor.fixture';
|
|
3
4
|
export { jsonSchemaFormCombinatorsExampleSchema } from './combinators.fixture';
|
|
4
5
|
export { jsonSchemaFormDependenciesSchema } from './dependencies.fixture';
|
|
5
6
|
export { jsonSchemaFormDeprecatedSchema } from './deprecated.fixture';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/__stories__/fixtures/json-schema-form/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,gCAAgC,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,EAAE,0BAA0B,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,sCAAsC,EAAE,MAAM,uBAAuB,CAAC;AAC/E,OAAO,EAAE,gCAAgC,EAAE,MAAM,wBAAwB,CAAC;AAC1E,OAAO,EAAE,8BAA8B,EAAE,MAAM,sBAAsB,CAAC;AACtE,OAAO,EAAE,6BAA6B,EAAE,MAAM,qBAAqB,CAAC;AACpE,OAAO,EAAE,6BAA6B,EAAE,MAAM,qBAAqB,CAAC;AACpE,OAAO,EAAE,+BAA+B,EAAE,MAAM,gBAAgB,CAAC;AACjE,OAAO,EAAE,8BAA8B,EAAE,MAAM,sBAAsB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/__stories__/fixtures/json-schema-form/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,gCAAgC,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,EAAE,0BAA0B,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,8BAA8B,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAE,sCAAsC,EAAE,MAAM,uBAAuB,CAAC;AAC/E,OAAO,EAAE,gCAAgC,EAAE,MAAM,wBAAwB,CAAC;AAC1E,OAAO,EAAE,8BAA8B,EAAE,MAAM,sBAAsB,CAAC;AACtE,OAAO,EAAE,6BAA6B,EAAE,MAAM,qBAAqB,CAAC;AACpE,OAAO,EAAE,6BAA6B,EAAE,MAAM,qBAAqB,CAAC;AACpE,OAAO,EAAE,+BAA+B,EAAE,MAAM,gBAAgB,CAAC;AACjE,OAAO,EAAE,8BAA8B,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -1,228 +1,2 @@
|
|
|
1
|
-
import { n as e, t } from "../
|
|
2
|
-
|
|
3
|
-
import { jsx as r } from "react/jsx-runtime";
|
|
4
|
-
import { Editor as i, loader as a } from "@monaco-editor/react";
|
|
5
|
-
//#region src/composed/CodeEditor/setupCodeEditor.ts
|
|
6
|
-
var o = "__grapheneCodeEditorConfigured__", s = !!globalThis[o];
|
|
7
|
-
function c({ baseUrl: e, monaco: t }) {
|
|
8
|
-
if (!s) {
|
|
9
|
-
if (t !== void 0) a.config({ monaco: t });
|
|
10
|
-
else if (e !== void 0) a.config({ paths: { vs: e.replace(/\/+$/, "") } });
|
|
11
|
-
else return;
|
|
12
|
-
s = !0, globalThis[o] = !0;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
//#endregion
|
|
16
|
-
//#region src/composed/CodeEditor/theme/buildTheme.ts
|
|
17
|
-
var l = "graphene";
|
|
18
|
-
function u(e) {
|
|
19
|
-
let t = {}, n = [], r = document.createElement("div");
|
|
20
|
-
document.body.appendChild(r);
|
|
21
|
-
let i = getComputedStyle(r), a = document.createElement("canvas");
|
|
22
|
-
a.width = 1, a.height = 1;
|
|
23
|
-
let o = a.getContext("2d");
|
|
24
|
-
for (let a of e) {
|
|
25
|
-
if (!o) {
|
|
26
|
-
t[a] = "#000000";
|
|
27
|
-
continue;
|
|
28
|
-
}
|
|
29
|
-
r.style.backgroundColor = `var(${a})`;
|
|
30
|
-
let e = i.backgroundColor;
|
|
31
|
-
(e === "" || e === "rgba(0, 0, 0, 0)") && n.push(a), o.clearRect(0, 0, 1, 1), o.fillStyle = e, o.fillRect(0, 0, 1, 1);
|
|
32
|
-
let [s, c, l] = o.getImageData(0, 0, 1, 1).data;
|
|
33
|
-
t[a] = "#" + [
|
|
34
|
-
s,
|
|
35
|
-
c,
|
|
36
|
-
l
|
|
37
|
-
].map((e) => e.toString(16).padStart(2, "0")).join("");
|
|
38
|
-
}
|
|
39
|
-
return document.body.removeChild(r), t;
|
|
40
|
-
}
|
|
41
|
-
function d() {
|
|
42
|
-
let e = document.documentElement.classList.contains("dark"), t = u([
|
|
43
|
-
"--background",
|
|
44
|
-
"--foreground",
|
|
45
|
-
"--border",
|
|
46
|
-
"--muted",
|
|
47
|
-
"--muted-foreground",
|
|
48
|
-
"--primary",
|
|
49
|
-
"--code-editor-string",
|
|
50
|
-
"--code-editor-keyword",
|
|
51
|
-
"--code-editor-number",
|
|
52
|
-
"--code-editor-type",
|
|
53
|
-
"--code-editor-special"
|
|
54
|
-
]), n = t["--background"], r = t["--foreground"], i = t["--border"], a = t["--muted"], o = t["--muted-foreground"], s = t["--primary"], c = t["--code-editor-string"], l = t["--code-editor-keyword"], d = t["--code-editor-number"], f = t["--code-editor-type"], p = t["--code-editor-special"], m = (e) => e.slice(1);
|
|
55
|
-
return {
|
|
56
|
-
base: e ? "vs-dark" : "vs",
|
|
57
|
-
inherit: !0,
|
|
58
|
-
rules: [
|
|
59
|
-
{
|
|
60
|
-
token: "string",
|
|
61
|
-
foreground: m(c)
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
token: "string.key.json",
|
|
65
|
-
foreground: m(f)
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
token: "keyword",
|
|
69
|
-
foreground: m(l)
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
token: "keyword.json",
|
|
73
|
-
foreground: m(p)
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
token: "number",
|
|
77
|
-
foreground: m(d)
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
token: "type",
|
|
81
|
-
foreground: m(f)
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
token: "tag",
|
|
85
|
-
foreground: m(l)
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
token: "attribute.name",
|
|
89
|
-
foreground: m(f)
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
token: "attribute.value",
|
|
93
|
-
foreground: m(c)
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
token: "comment",
|
|
97
|
-
foreground: m(o),
|
|
98
|
-
fontStyle: "italic"
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
token: "comment.line",
|
|
102
|
-
foreground: m(o),
|
|
103
|
-
fontStyle: "italic"
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
token: "comment.block",
|
|
107
|
-
foreground: m(o),
|
|
108
|
-
fontStyle: "italic"
|
|
109
|
-
},
|
|
110
|
-
{
|
|
111
|
-
token: "identifier",
|
|
112
|
-
foreground: m(r)
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
token: "variable",
|
|
116
|
-
foreground: m(r)
|
|
117
|
-
},
|
|
118
|
-
{
|
|
119
|
-
token: "delimiter",
|
|
120
|
-
foreground: m(r)
|
|
121
|
-
}
|
|
122
|
-
],
|
|
123
|
-
colors: {
|
|
124
|
-
"editor.background": n,
|
|
125
|
-
"editor.foreground": r,
|
|
126
|
-
"editor.lineHighlightBackground": r + "08",
|
|
127
|
-
"editor.lineHighlightBorder": "#00000000",
|
|
128
|
-
"editor.selectionBackground": s + "4d",
|
|
129
|
-
"editor.inactiveSelectionBackground": s + "26",
|
|
130
|
-
"editorCursor.foreground": s,
|
|
131
|
-
"editorLineNumber.foreground": o,
|
|
132
|
-
"editorLineNumber.activeForeground": r,
|
|
133
|
-
"editorGutter.background": n,
|
|
134
|
-
"editorIndentGuide.background1": i,
|
|
135
|
-
"editorIndentGuide.activeBackground1": o,
|
|
136
|
-
"editorWidget.background": a,
|
|
137
|
-
"editorWidget.foreground": r,
|
|
138
|
-
"editorWidget.border": i,
|
|
139
|
-
"editorWidget.resizeBorder": i,
|
|
140
|
-
"widget.shadow": r + "1a",
|
|
141
|
-
"input.background": n,
|
|
142
|
-
"input.border": i,
|
|
143
|
-
"input.foreground": r,
|
|
144
|
-
"input.placeholderForeground": o,
|
|
145
|
-
"inputOption.activeBorder": s,
|
|
146
|
-
"inputOption.activeBackground": s + "26",
|
|
147
|
-
"inputOption.activeForeground": s,
|
|
148
|
-
"button.background": s,
|
|
149
|
-
"button.foreground": "#ffffff",
|
|
150
|
-
"editorSuggestWidget.background": n,
|
|
151
|
-
"editorSuggestWidget.border": i,
|
|
152
|
-
"editorSuggestWidget.selectedBackground": s + "26",
|
|
153
|
-
"scrollbarSlider.background": i + "80",
|
|
154
|
-
"scrollbarSlider.hoverBackground": i,
|
|
155
|
-
"scrollbarSlider.activeBackground": o + "80"
|
|
156
|
-
}
|
|
157
|
-
};
|
|
158
|
-
}
|
|
159
|
-
//#endregion
|
|
160
|
-
//#region src/composed/CodeEditor/CodeEditor.tsx
|
|
161
|
-
function f(e) {
|
|
162
|
-
e.editor.defineTheme(l, d()), e.editor.setTheme(l);
|
|
163
|
-
}
|
|
164
|
-
var p = (e) => {
|
|
165
|
-
f(e);
|
|
166
|
-
};
|
|
167
|
-
function m() {
|
|
168
|
-
let [e, t] = n.useState(typeof document < "u" && document.documentElement.classList.contains("dark"));
|
|
169
|
-
return n.useEffect(() => {
|
|
170
|
-
let e = new MutationObserver(() => {
|
|
171
|
-
t(document.documentElement.classList.contains("dark"));
|
|
172
|
-
});
|
|
173
|
-
return e.observe(document.documentElement, {
|
|
174
|
-
attributes: !0,
|
|
175
|
-
attributeFilter: ["class"]
|
|
176
|
-
}), () => e.disconnect();
|
|
177
|
-
}, []), e;
|
|
178
|
-
}
|
|
179
|
-
function h({ value: a, defaultValue: o, onChange: s, language: c = "plaintext", readOnly: u = !1, disabled: d = !1, height: h, className: g, options: _, onMount: v }) {
|
|
180
|
-
let y = m(), b = n.useRef(null), x = n.useRef(null);
|
|
181
|
-
n.useEffect(() => {
|
|
182
|
-
b.current && f(b.current);
|
|
183
|
-
}, [y]), n.useEffect(() => {}, []);
|
|
184
|
-
let S = n.useCallback((e, t) => {
|
|
185
|
-
b.current = t, x.current = e, v?.(e, t);
|
|
186
|
-
}, [v]), C = typeof h == "number" ? `${h}px` : h ?? "300px";
|
|
187
|
-
return /* @__PURE__ */ r("div", {
|
|
188
|
-
"data-slot": "code-editor",
|
|
189
|
-
"data-disabled": d ? "" : void 0,
|
|
190
|
-
"data-readonly": u && !d ? "" : void 0,
|
|
191
|
-
className: e("overflow-hidden rounded-lg border border-input bg-background", "data-disabled:pointer-events-none data-disabled:opacity-50", "data-readonly:bg-muted/30", g),
|
|
192
|
-
style: { height: C },
|
|
193
|
-
children: /* @__PURE__ */ r(i, {
|
|
194
|
-
height: "100%",
|
|
195
|
-
language: c,
|
|
196
|
-
value: a,
|
|
197
|
-
defaultValue: o,
|
|
198
|
-
theme: l,
|
|
199
|
-
onChange: s,
|
|
200
|
-
onMount: S,
|
|
201
|
-
beforeMount: p,
|
|
202
|
-
loading: /* @__PURE__ */ r(t, { className: "size-full" }),
|
|
203
|
-
options: {
|
|
204
|
-
readOnly: u || d,
|
|
205
|
-
minimap: { enabled: !1 },
|
|
206
|
-
scrollBeyondLastLine: !1,
|
|
207
|
-
automaticLayout: !0,
|
|
208
|
-
fontFamily: "ui-monospace, Menlo, Consolas, \"Cascadia Code\", \"Liberation Mono\", monospace",
|
|
209
|
-
fontSize: 13,
|
|
210
|
-
lineHeight: 20,
|
|
211
|
-
padding: {
|
|
212
|
-
top: 8,
|
|
213
|
-
bottom: 8
|
|
214
|
-
},
|
|
215
|
-
glyphMargin: !1,
|
|
216
|
-
renderLineHighlight: "line",
|
|
217
|
-
scrollbar: {
|
|
218
|
-
verticalScrollbarSize: 6,
|
|
219
|
-
horizontalScrollbarSize: 6
|
|
220
|
-
},
|
|
221
|
-
overviewRulerLanes: 0,
|
|
222
|
-
..._
|
|
223
|
-
}
|
|
224
|
-
})
|
|
225
|
-
});
|
|
226
|
-
}
|
|
227
|
-
//#endregion
|
|
228
|
-
export { h as CodeEditor, c as setupCodeEditor };
|
|
1
|
+
import { n as e, t } from "../CodeEditor-Cnn11Gx1.js";
|
|
2
|
+
export { t as CodeEditor, e as setupCodeEditor };
|
|
@@ -18,24 +18,11 @@ interface AppLayoutProps {
|
|
|
18
18
|
/** Optional callback when context expansion state changes. */
|
|
19
19
|
readonly onContextExpandedChange?: (expanded: boolean) => void;
|
|
20
20
|
/**
|
|
21
|
-
* Controls content area
|
|
22
|
-
* - `"default"` —
|
|
23
|
-
* - `"full-bleed"` — no
|
|
24
|
-
*
|
|
25
|
-
* Pages that need narrower content (forms, wizards) use `<PageSection>` or
|
|
26
|
-
* `<PageFocused>` wrappers inside the default container.
|
|
27
|
-
*
|
|
28
|
-
* @deprecated `"wide"` is accepted for backward compatibility but is equivalent to `"default"`.
|
|
21
|
+
* Controls content area padding.
|
|
22
|
+
* - `"default"` — standard padding on all sides (the default).
|
|
23
|
+
* - `"full-bleed"` — no padding; content spans edge-to-edge.
|
|
29
24
|
*/
|
|
30
|
-
readonly contentVariant?: 'default' | '
|
|
31
|
-
/**
|
|
32
|
-
* Full-width banner rendered above the padded content area.
|
|
33
|
-
* Sits inside the scroll container but outside the content padding wrapper,
|
|
34
|
-
* so it spans edge-to-edge regardless of `contentVariant`.
|
|
35
|
-
*/
|
|
36
|
-
readonly banner?: ReactNode;
|
|
37
|
-
/** When true the banner sticks to the top of the scroll container. Defaults to `false`. */
|
|
38
|
-
readonly bannerSticky?: boolean;
|
|
25
|
+
readonly contentVariant?: 'default' | 'full-bleed';
|
|
39
26
|
/**
|
|
40
27
|
* When true the layout spans the full viewport height.
|
|
41
28
|
* Defaults to `true` (sidebar-dominant shell).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppLayout.d.ts","sourceRoot":"","sources":["../../../src/composed/AppLayout/AppLayout.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAsB,KAAK,SAAS,EAA6B,MAAM,OAAO,CAAC;AAGtF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8CAA8C,CAAC;AAEhF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gDAAgD,CAAC;AAGhF,UAAU,cAAc;IACtB,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,6DAA6D;IAC7D,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,CAAC;IAC7B,sDAAsD;IACtD,QAAQ,CAAC,cAAc,CAAC,EAAE,SAAS,CAAC;IACpC,6EAA6E;IAC7E,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,CAAC;IAC/B,yBAAyB;IACzB,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,CAAC;IAC9B,iEAAiE;IACjE,QAAQ,CAAC,QAAQ,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;IACzC,iEAAiE;IACjE,QAAQ,CAAC,eAAe,CAAC,EAAE,OAAO,CAAC;IACnC,8DAA8D;IAC9D,QAAQ,CAAC,uBAAu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YAAuB,EAAE,GAAG,IAAI,EAAE,EAAE,cAAc,+BAQ3G;kBARQ,SAAS;;;AAYlB,OAAO,EAAE,SAAS,EAAE,CAAC;AACrB,YAAY,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CodeEditor.d.ts","sourceRoot":"","sources":["../../../src/composed/CodeEditor/CodeEditor.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAe,WAAW,EAAU,MAAM,sBAAsB,CAAC;AAC7E,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"CodeEditor.d.ts","sourceRoot":"","sources":["../../../src/composed/CodeEditor/CodeEditor.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAe,WAAW,EAAU,MAAM,sBAAsB,CAAC;AAC7E,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,KAAK,EAAE,kBAAkB,EAAoB,MAAM,UAAU,CAAC;AAIrE,MAAM,WAAW,eAAe;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;IAC/C,QAAQ,CAAC,EAAE,kBAAkB,CAAC;IAC9B,uDAAuD;IACvD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,0DAA0D;IAC1D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,+EAA+E;IAC/E,OAAO,CAAC,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC;IACjC,sEAAsE;IACtE,OAAO,CAAC,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC;CAClC;AA6BD,iBAAS,UAAU,CAAC,EAClB,KAAK,EACL,YAAY,EACZ,QAAQ,EACR,QAAsB,EACtB,QAAgB,EAChB,QAAgB,EAChB,MAAM,EACN,SAAS,EACT,OAAO,EACP,OAAO,GACR,EAAE,eAAe,qBA2GjB;AAED,OAAO,EAAE,UAAU,EAAE,CAAC"}
|
|
@@ -4,61 +4,56 @@ export interface SetupCodeEditorOptions {
|
|
|
4
4
|
/**
|
|
5
5
|
* AMD / self-hosted: URL serving `node_modules/monaco-editor/min/vs`, e.g. `"/assets/monaco/vs"`.
|
|
6
6
|
* Use when Monaco is served as static files (e.g. CopyPlugin, Nginx, CDN) rather than bundled.
|
|
7
|
+
*
|
|
8
|
+
* Not required in the common case — `<CodeEditor>` auto-configures its loader with the bundled
|
|
9
|
+
* `monaco-editor` on first render. Reach for `baseUrl` only when self-hosting the AMD build.
|
|
7
10
|
*/
|
|
8
11
|
baseUrl?: string;
|
|
9
12
|
/**
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* setupCodeEditor({ monaco });
|
|
13
|
+
* @deprecated `<CodeEditor>` now auto-configures the loader with the `monaco-editor` instance
|
|
14
|
+
* bundled alongside graphene-core, so passing one in is redundant. Drop the call entirely
|
|
15
|
+
* (or use `{ baseUrl }` for AMD/self-hosted mode). Still honored for one release so existing
|
|
16
|
+
* bootstraps keep working.
|
|
15
17
|
*/
|
|
16
18
|
monaco?: MonacoLoaderConfig['monaco'];
|
|
17
19
|
}
|
|
18
20
|
/**
|
|
19
|
-
*
|
|
20
|
-
* Call once at app bootstrap — idempotent, first caller wins.
|
|
21
|
+
* Self-host Monaco from a pre-built `vs` folder (AMD mode).
|
|
21
22
|
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
* - `{ monaco }` — ESM/bundled, passes the `monaco-editor` namespace to the loader so it uses
|
|
25
|
-
* the npm-installed instance instead of fetching from CDN. Required for Rspack / MF hosts.
|
|
23
|
+
* In nearly every setup you do **not** need to call this — `<CodeEditor>` auto-configures its
|
|
24
|
+
* loader on first render using the bundled `monaco-editor`. Reach for `setupCodeEditor` only to:
|
|
26
25
|
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
26
|
+
* - Point the loader at a pre-built `vs` folder served as static assets (`{ baseUrl }`).
|
|
27
|
+
* - Pre-configure ahead of the first render (idempotent, first caller wins).
|
|
28
|
+
*
|
|
29
|
+
* Idempotent — first caller wins. Module-scoped, so each federated shell must call it
|
|
30
|
+
* independently if it wants to override the auto-config default.
|
|
29
31
|
*
|
|
30
32
|
* @example
|
|
31
|
-
* //
|
|
32
|
-
* // that resolves each language worker through `new URL(..., import.meta.url)` so the bundler
|
|
33
|
-
* // emits one chunk per worker, served from the same origin (CSP-safe, offline-capable).
|
|
34
|
-
* import * as monaco from 'monaco-editor';
|
|
33
|
+
* // AMD/self-hosted mode — graphene-core consumer ships Monaco as static assets.
|
|
35
34
|
* import { setupCodeEditor } from '@gravitee/graphene-core';
|
|
35
|
+
* setupCodeEditor({ baseUrl: '/assets/monaco/vs' });
|
|
36
|
+
*/
|
|
37
|
+
export declare function setupCodeEditor({ baseUrl, monaco }?: SetupCodeEditorOptions): void;
|
|
38
|
+
/**
|
|
39
|
+
* Configure the loader with the bundled `monaco-editor` so `<CodeEditor>` works out of the box,
|
|
40
|
+
* including in federated remotes whose own `loader` instance was never reached by the host's
|
|
41
|
+
* `setupCodeEditor` call.
|
|
36
42
|
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
* }
|
|
45
|
-
* if (label === 'html' || label === 'handlebars' || label === 'razor') {
|
|
46
|
-
* return new Worker(new URL('monaco-editor/esm/vs/language/html/html.worker', import.meta.url));
|
|
47
|
-
* }
|
|
48
|
-
* if (label === 'typescript' || label === 'javascript') {
|
|
49
|
-
* return new Worker(new URL('monaco-editor/esm/vs/language/typescript/ts.worker', import.meta.url));
|
|
50
|
-
* }
|
|
51
|
-
* return new Worker(new URL('monaco-editor/esm/vs/editor/editor.worker', import.meta.url));
|
|
52
|
-
* },
|
|
53
|
-
* };
|
|
43
|
+
* Awaited by `<CodeEditor>` once before its first render. The `monaco-editor` import is
|
|
44
|
+
* dynamic on purpose: a static import would put it on the module graph of every consumer that
|
|
45
|
+
* touches `<CodeEditor>` transitively (e.g. through `JsonSchemaForm`'s `SchemaField`), and
|
|
46
|
+
* vite/vitest's optional-peer-dep wrapper then refuses to resolve it during dep optimization.
|
|
47
|
+
* Dynamic import keeps it off the static graph — only the leaf that actually mounts an editor
|
|
48
|
+
* pays for it. Idempotent — yields to any prior `setupCodeEditor({ baseUrl | monaco })`.
|
|
49
|
+
* Module-scoped flag → each federated instance configures its own loader exactly once.
|
|
54
50
|
*
|
|
55
|
-
*
|
|
51
|
+
* @internal
|
|
56
52
|
*/
|
|
57
|
-
export declare function
|
|
53
|
+
export declare function ensureCodeEditorConfigured(): Promise<void>;
|
|
58
54
|
/**
|
|
59
|
-
* Whether
|
|
60
|
-
*
|
|
61
|
-
* CDN, which breaks under a strict CSP or offline.
|
|
55
|
+
* Whether the loader has been configured — by an explicit {@link setupCodeEditor} call or by
|
|
56
|
+
* {@link ensureCodeEditorConfigured} (which `<CodeEditor>` calls on first render).
|
|
62
57
|
*/
|
|
63
58
|
export declare function isCodeEditorConfigured(): boolean;
|
|
64
59
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setupCodeEditor.d.ts","sourceRoot":"","sources":["../../../src/composed/CodeEditor/setupCodeEditor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAE9C,KAAK,kBAAkB,GAAG,UAAU,CAAC,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AAE9D,MAAM,WAAW,sBAAsB;IACrC
|
|
1
|
+
{"version":3,"file":"setupCodeEditor.d.ts","sourceRoot":"","sources":["../../../src/composed/CodeEditor/setupCodeEditor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAE9C,KAAK,kBAAkB,GAAG,UAAU,CAAC,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AAE9D,MAAM,WAAW,sBAAsB;IACrC;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;;OAKG;IACH,MAAM,CAAC,EAAE,kBAAkB,CAAC,QAAQ,CAAC,CAAC;CACvC;AASD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,eAAe,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,GAAE,sBAA2B,GAAG,IAAI,CAyBtF;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,0BAA0B,IAAI,OAAO,CAAC,IAAI,CAAC,CAMhE;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,IAAI,OAAO,CAEhD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SchemaField.d.ts","sourceRoot":"","sources":["../../../src/composed/JsonSchemaForm/SchemaField.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAW,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"SchemaField.d.ts","sourceRoot":"","sources":["../../../src/composed/JsonSchemaForm/SchemaField.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAW,MAAM,OAAO,CAAC;AAgBhD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAUjD,UAAU,gBAAgB;IACxB,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAG1B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;CACzB;AAQD,iBAAS,WAAW,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAS,EAAE,EAAE,gBAAgB,+TAgC/D;AAwED,OAAO,EAAE,WAAW,EAAE,CAAC;AACvB,YAAY,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { SchemaNode } from '../../schema/types';
|
|
2
|
+
interface CodeEditorFieldProps {
|
|
3
|
+
readonly node: SchemaNode;
|
|
4
|
+
readonly name: string;
|
|
5
|
+
}
|
|
6
|
+
declare function CodeEditorField({ node, name }: CodeEditorFieldProps): import("react").JSX.Element;
|
|
7
|
+
export { CodeEditorField };
|
|
8
|
+
//# sourceMappingURL=CodeEditorField.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CodeEditorField.d.ts","sourceRoot":"","sources":["../../../../../src/composed/JsonSchemaForm/fields/code-editor/CodeEditorField.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAKrD,UAAU,oBAAoB;IAC5B,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAoBD,iBAAS,eAAe,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,oBAAoB,+BAsD5D;AAED,OAAO,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -17,11 +17,11 @@ interface GioUiTypeConfig {
|
|
|
17
17
|
}
|
|
18
18
|
interface GioCodeEditorConfig {
|
|
19
19
|
language: string;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
/**
|
|
21
|
+
* Editor height override — accepts a pixel number (`400`) or any CSS value (`"50vh"`). Optional;
|
|
22
|
+
* when omitted, `CodeEditorField` falls back to its default (250px).
|
|
23
|
+
*/
|
|
24
|
+
height?: number | string;
|
|
25
25
|
}
|
|
26
26
|
interface GioConfig extends GioUiTypeConfig {
|
|
27
27
|
displayIf?: GioIfConfig;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"json-schema.types.d.ts","sourceRoot":"","sources":["../../../../src/composed/JsonSchemaForm/models/json-schema.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE/C,KAAK,eAAe,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAE1E,KAAK,SAAS,GAAG,KAAK,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;AAEtD,UAAU,WAAW;IACnB,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,KAAK,CAAC,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC;CACnF;AAED,UAAU,eAAe;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,SAAS,CAAA;KAAE,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACnE;AAED,UAAU,mBAAmB;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB
|
|
1
|
+
{"version":3,"file":"json-schema.types.d.ts","sourceRoot":"","sources":["../../../../src/composed/JsonSchemaForm/models/json-schema.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE/C,KAAK,eAAe,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAE1E,KAAK,SAAS,GAAG,KAAK,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;AAEtD,UAAU,WAAW;IACnB,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,G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,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IACzC,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IACnC;;;;;OAKG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,YAAY,EAAE,SAAS,EAAE,eAAe,EAAE,mBAAmB,EAAE,SAAS,EAAE,WAAW,EAAE,eAAe,EAAE,UAAU,EAAE,CAAC"}
|
|
@@ -2,7 +2,8 @@ import { JsonSchema } from '../models/json-schema.types';
|
|
|
2
2
|
declare function isOneOfConstSelect(schema: JsonSchema): boolean;
|
|
3
3
|
declare function isMultiSelectArray(schema: JsonSchema): boolean;
|
|
4
4
|
declare function isHeadersArray(schema: JsonSchema): boolean;
|
|
5
|
+
declare function isCodeEditor(schema: JsonSchema): boolean;
|
|
5
6
|
declare function isOneOfWithProperties(schema: JsonSchema): boolean;
|
|
6
7
|
declare function isAnyOfWithProperties(schema: JsonSchema): boolean;
|
|
7
|
-
export { isAnyOfWithProperties, isHeadersArray, isMultiSelectArray, isOneOfConstSelect, isOneOfWithProperties };
|
|
8
|
+
export { isAnyOfWithProperties, isCodeEditor, isHeadersArray, isMultiSelectArray, isOneOfConstSelect, isOneOfWithProperties, };
|
|
8
9
|
//# sourceMappingURL=schemaShape.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemaShape.d.ts","sourceRoot":"","sources":["../../../../src/composed/JsonSchemaForm/utils/schemaShape.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAK9D,iBAAS,kBAAkB,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,CAMvD;AAID,iBAAS,kBAAkB,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,CAIvD;AAOD,iBAAS,cAAc,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,CAEnD;AAMD,iBAAS,qBAAqB,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,CAO1D;AAKD,iBAAS,qBAAqB,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,CAM1D;AAED,OAAO,
|
|
1
|
+
{"version":3,"file":"schemaShape.d.ts","sourceRoot":"","sources":["../../../../src/composed/JsonSchemaForm/utils/schemaShape.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAK9D,iBAAS,kBAAkB,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,CAMvD;AAID,iBAAS,kBAAkB,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,CAIvD;AAOD,iBAAS,cAAc,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,CAEnD;AAOD,iBAAS,YAAY,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,CAGjD;AAMD,iBAAS,qBAAqB,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,CAO1D;AAKD,iBAAS,qBAAqB,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,CAM1D;AAED,OAAO,EACL,qBAAqB,EACrB,YAAY,EACZ,cAAc,EACd,kBAAkB,EAClB,kBAAkB,EAClB,qBAAqB,GACtB,CAAC"}
|
|
@@ -8,17 +8,7 @@ interface LayoutSlots {
|
|
|
8
8
|
readonly leading: ReactNode;
|
|
9
9
|
readonly viewMode: 'global' | 'context';
|
|
10
10
|
readonly contextExpanded: boolean;
|
|
11
|
-
|
|
12
|
-
* `"default"` — 100rem left-aligned with padding (use for all standard pages).
|
|
13
|
-
* `"full-bleed"` — no max-width, no padding (tool layouts like Policy Studio).
|
|
14
|
-
*
|
|
15
|
-
* @deprecated `"wide"` is accepted for backward compatibility but equivalent to `"default"`.
|
|
16
|
-
*/
|
|
17
|
-
readonly contentVariant: 'default' | 'wide' | 'full-bleed';
|
|
18
|
-
/** Full-width banner rendered above the padded content area (e.g. deploy status, environment warnings). */
|
|
19
|
-
readonly banner: ReactNode;
|
|
20
|
-
/** When true the banner sticks to the top of the scroll container. */
|
|
21
|
-
readonly bannerSticky: boolean;
|
|
11
|
+
readonly contentVariant: 'default' | 'full-bleed';
|
|
22
12
|
}
|
|
23
13
|
interface LayoutSlotsContextValue {
|
|
24
14
|
readonly slots: LayoutSlots;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LayoutSlotsContext.d.ts","sourceRoot":"","sources":["../../../src/composed/LayoutSlots/LayoutSlotsContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,SAAS,EAA8C,MAAM,OAAO,CAAC;AAClG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gDAAgD,CAAC;AAEtF,UAAU,WAAW;IACnB,QAAQ,CAAC,UAAU,EAAE,SAAS,CAAC;IAC/B,QAAQ,CAAC,cAAc,EAAE,SAAS,CAAC;IACnC,QAAQ,CAAC,WAAW,EAAE,eAAe,EAAE,CAAC;IACxC,sFAAsF;IACtF,QAAQ,CAAC,OAAO,EAAE,SAAS,CAAC;IAC5B,QAAQ,CAAC,QAAQ,EAAE,QAAQ,GAAG,SAAS,CAAC;IACxC,QAAQ,CAAC,eAAe,EAAE,OAAO,CAAC;IAClC
|
|
1
|
+
{"version":3,"file":"LayoutSlotsContext.d.ts","sourceRoot":"","sources":["../../../src/composed/LayoutSlots/LayoutSlotsContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,SAAS,EAA8C,MAAM,OAAO,CAAC;AAClG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gDAAgD,CAAC;AAEtF,UAAU,WAAW;IACnB,QAAQ,CAAC,UAAU,EAAE,SAAS,CAAC;IAC/B,QAAQ,CAAC,cAAc,EAAE,SAAS,CAAC;IACnC,QAAQ,CAAC,WAAW,EAAE,eAAe,EAAE,CAAC;IACxC,sFAAsF;IACtF,QAAQ,CAAC,OAAO,EAAE,SAAS,CAAC;IAC5B,QAAQ,CAAC,QAAQ,EAAE,QAAQ,GAAG,SAAS,CAAC;IACxC,QAAQ,CAAC,eAAe,EAAE,OAAO,CAAC;IAClC,QAAQ,CAAC,cAAc,EAAE,SAAS,GAAG,YAAY,CAAC;CACnD;AAED,UAAU,uBAAuB;IAC/B,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC;IAC5B,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC,SAAS,MAAM,WAAW,EAAE,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;IACvF,QAAQ,CAAC,QAAQ,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;IAC3D,QAAQ,CAAC,UAAU,EAAE,CAAC,IAAI,EAAE,aAAa,CAAC,MAAM,WAAW,CAAC,KAAK,IAAI,CAAC;CACvE;AAED,QAAA,MAAM,aAAa,EAAE,WAQpB,CAAC;AAIF,iBAAS,mBAAmB,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAA;CAAE,+BAwB1E;AAED,iBAAS,cAAc,IAAI,uBAAuB,CAMjD;AAED,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,cAAc,EAAE,CAAC;AAC9D,YAAY,EAAE,WAAW,EAAE,uBAAuB,EAAE,CAAC"}
|
|
@@ -7,9 +7,6 @@ import { LayoutSlots } from './LayoutSlotsContext';
|
|
|
7
7
|
* **Resets all slots to defaults on unmount** so stale module content
|
|
8
8
|
* never lingers after navigation.
|
|
9
9
|
*
|
|
10
|
-
* Uses `useLayoutEffect` to apply config synchronously before paint,
|
|
11
|
-
* preventing visible layout shifts during navigation.
|
|
12
|
-
*
|
|
13
10
|
* @param config - Slot values the module wants to own.
|
|
14
11
|
* @param deps - Dependency array that triggers a config re-push
|
|
15
12
|
* (same semantics as `useEffect` deps).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-layout-config.d.ts","sourceRoot":"","sources":["../../../src/composed/LayoutSlots/use-layout-config.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,WAAW,EAAkB,MAAM,sBAAsB,CAAC;AAExE
|
|
1
|
+
{"version":3,"file":"use-layout-config.d.ts","sourceRoot":"","sources":["../../../src/composed/LayoutSlots/use-layout-config.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,WAAW,EAAkB,MAAM,sBAAsB,CAAC;AAExE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,iBAAS,eAAe,CAAC,MAAM,EAAE,OAAO,CAAC,WAAW,CAAC,EAAE,IAAI,GAAE,KAAK,CAAC,cAAmB,QAYrF;AAED,OAAO,EAAE,eAAe,EAAE,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export { cn } from './lib/utils';
|
|
2
2
|
export { PortalContainerProvider, usePortalContainer } from './lib/PortalContainerContext';
|
|
3
|
-
export { startLayoutTransition } from './lib/view-transitions';
|
|
4
3
|
export * from './base/Accordion';
|
|
5
4
|
export * from './base/Alert';
|
|
6
5
|
export * from './base/Avatar';
|
|
@@ -63,7 +62,6 @@ export * from './composed/FacetedFilter';
|
|
|
63
62
|
export * from './composed/FileUpload';
|
|
64
63
|
export * from './composed/JsonSchemaForm';
|
|
65
64
|
export * from './composed/LayoutSlots';
|
|
66
|
-
export * from './composed/PageContent';
|
|
67
65
|
export * from './composed/PasswordInput';
|
|
68
66
|
export * from './composed/SelectorDropdown';
|
|
69
67
|
export * from './composed/SidebarMode';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":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