@walkeros/explorer 2.1.1 → 2.1.2
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/AGENT.md +5 -0
- package/dist/{chunk-4AJX6MFW.mjs → chunk-3TPAJIVM.mjs} +8 -1
- package/dist/{chunk-4AJX6MFW.mjs.map → chunk-3TPAJIVM.mjs.map} +1 -1
- package/dist/components/molecules/code-box.d.ts.map +1 -1
- package/dist/components/molecules/code-box.js +10 -2
- package/dist/components/molecules/code-box.js.map +1 -1
- package/dist/index.d.cts +11 -0
- package/dist/index.mjs +29 -16
- package/dist/index.mjs.map +1 -1
- package/dist/{monaco-types-KN2DINPW.mjs → monaco-types-7HYTHECU.mjs} +2 -2
- package/dist/utils/monaco-json-schema.d.ts +11 -0
- package/dist/utils/monaco-json-schema.d.ts.map +1 -1
- package/dist/utils/monaco-json-schema.js +13 -3
- package/dist/utils/monaco-json-schema.js.map +1 -1
- package/package.json +1 -1
- /package/dist/{monaco-types-KN2DINPW.mjs.map → monaco-types-7HYTHECU.mjs.map} +0 -0
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
removeDestinationType,
|
|
15
15
|
removeTypeLibrary,
|
|
16
16
|
updateTypeLibrary
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-3TPAJIVM.mjs";
|
|
18
18
|
export {
|
|
19
19
|
addDestinationType,
|
|
20
20
|
addFunctionContextTypes,
|
|
@@ -31,4 +31,4 @@ export {
|
|
|
31
31
|
removeTypeLibrary,
|
|
32
32
|
updateTypeLibrary
|
|
33
33
|
};
|
|
34
|
-
//# sourceMappingURL=monaco-types-
|
|
34
|
+
//# sourceMappingURL=monaco-types-7HYTHECU.mjs.map
|
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Monaco JSON Schema Registry
|
|
3
|
+
*
|
|
4
|
+
* Manages JSON Schema registrations for Monaco's JSON language service.
|
|
5
|
+
* Multiple Code instances can register schemas concurrently — the registry
|
|
6
|
+
* accumulates all schemas and issues a single setDiagnosticsOptions() call.
|
|
7
|
+
*
|
|
8
|
+
* The monaco-editor `json` namespace is lazy-loaded on first use to keep
|
|
9
|
+
* this module SSR-safe. By the time registerJsonSchema() is called (from
|
|
10
|
+
* useEffect in the Code atom), Monaco is already loaded in the browser.
|
|
11
|
+
*/
|
|
1
12
|
/**
|
|
2
13
|
* Generate a unique model path for a Code instance.
|
|
3
14
|
* Used as the `path` prop for @monaco-editor/react Editor.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"monaco-json-schema.d.ts","sourceRoot":"","sources":["../../src/utils/monaco-json-schema.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"monaco-json-schema.d.ts","sourceRoot":"","sources":["../../src/utils/monaco-json-schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AA0BH;;;GAGG;AACH,wBAAgB,iBAAiB,IAAI,MAAM,CAE1C;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC9B,IAAI,CAON;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAG5D;AAeD;;GAEG;AACH,wBAAgB,wBAAwB,IAAI,MAAM,CAEjD;AAED;;GAEG;AACH,wBAAgB,eAAe,IAAI,IAAI,CAGtC"}
|
|
@@ -5,11 +5,21 @@
|
|
|
5
5
|
* Multiple Code instances can register schemas concurrently — the registry
|
|
6
6
|
* accumulates all schemas and issues a single setDiagnosticsOptions() call.
|
|
7
7
|
*
|
|
8
|
-
*
|
|
8
|
+
* The monaco-editor `json` namespace is lazy-loaded on first use to keep
|
|
9
|
+
* this module SSR-safe. By the time registerJsonSchema() is called (from
|
|
10
|
+
* useEffect in the Code atom), Monaco is already loaded in the browser.
|
|
9
11
|
*/
|
|
10
|
-
import { json } from 'monaco-editor';
|
|
11
12
|
const schemaRegistry = new Map();
|
|
12
13
|
let idCounter = 0;
|
|
14
|
+
// Lazy-loaded Monaco JSON namespace (cached after first access)
|
|
15
|
+
let _json;
|
|
16
|
+
function getJson() {
|
|
17
|
+
if (!_json) {
|
|
18
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
19
|
+
_json = require('monaco-editor').json;
|
|
20
|
+
}
|
|
21
|
+
return _json;
|
|
22
|
+
}
|
|
13
23
|
/**
|
|
14
24
|
* Generate a unique model path for a Code instance.
|
|
15
25
|
* Used as the `path` prop for @monaco-editor/react Editor.
|
|
@@ -41,7 +51,7 @@ export function unregisterJsonSchema(modelPath) {
|
|
|
41
51
|
* Apply all registered schemas to Monaco's JSON language service.
|
|
42
52
|
*/
|
|
43
53
|
function applySchemas() {
|
|
44
|
-
|
|
54
|
+
getJson().jsonDefaults.setDiagnosticsOptions({
|
|
45
55
|
validate: true,
|
|
46
56
|
schemaValidation: 'error',
|
|
47
57
|
schemaRequest: 'ignore',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"monaco-json-schema.js","sourceRoot":"","sources":["../../src/utils/monaco-json-schema.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"monaco-json-schema.js","sourceRoot":"","sources":["../../src/utils/monaco-json-schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAWH,MAAM,cAAc,GAAG,IAAI,GAAG,EAA4B,CAAC;AAE3D,IAAI,SAAS,GAAG,CAAC,CAAC;AAElB,gEAAgE;AAChE,IAAI,KAAsD,CAAC;AAE3D,SAAS,OAAO;IACd,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,iEAAiE;QACjE,KAAK,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC,IAAI,CAAC;IACxC,CAAC;IACD,OAAO,KAAM,CAAC;AAChB,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,iBAAiB;IAC/B,OAAO,4BAA4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