@walkeros/explorer 2.1.2 → 2.1.3
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 +9 -5
- package/dist/chunk-52ELVFJE.mjs +573 -0
- package/dist/chunk-52ELVFJE.mjs.map +1 -0
- package/dist/components/atoms/code.d.ts +8 -2
- package/dist/components/atoms/code.d.ts.map +1 -1
- package/dist/components/atoms/code.js +58 -5
- package/dist/components/atoms/code.js.map +1 -1
- package/dist/components/molecules/code-box.d.ts.map +1 -1
- package/dist/components/molecules/code-box.js +28 -39
- package/dist/components/molecules/code-box.js.map +1 -1
- package/dist/components/molecules/preview.d.ts.map +1 -1
- package/dist/components/molecules/preview.js +3 -0
- package/dist/components/molecules/preview.js.map +1 -1
- package/dist/index.d.cts +8 -13
- package/dist/index.mjs +165 -75
- package/dist/index.mjs.map +1 -1
- package/dist/{monaco-types-7HYTHECU.mjs → monaco-types-ZGWM2633.mjs} +2 -2
- package/dist/styles.css +47 -4
- package/dist/utils/monaco-json-schema.d.ts +13 -3
- package/dist/utils/monaco-json-schema.d.ts.map +1 -1
- package/dist/utils/monaco-json-schema.js +26 -11
- package/dist/utils/monaco-json-schema.js.map +1 -1
- package/package.json +3 -2
- package/dist/chunk-3TPAJIVM.mjs +0 -580
- package/dist/chunk-3TPAJIVM.mjs.map +0 -1
- /package/dist/{monaco-types-7HYTHECU.mjs.map → monaco-types-ZGWM2633.mjs.map} +0 -0
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
removeDestinationType,
|
|
15
15
|
removeTypeLibrary,
|
|
16
16
|
updateTypeLibrary
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-52ELVFJE.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-ZGWM2633.mjs.map
|
package/dist/styles.css
CHANGED
|
@@ -2000,17 +2000,60 @@
|
|
|
2000
2000
|
}
|
|
2001
2001
|
.elb-codebox-marker-badge--error {
|
|
2002
2002
|
color: var(--color-alert-error-text);
|
|
2003
|
-
background:
|
|
2003
|
+
background: transparent;
|
|
2004
2004
|
}
|
|
2005
2005
|
.elb-codebox-marker-badge--error:hover {
|
|
2006
|
-
background: var(--color-alert-error-
|
|
2006
|
+
background: var(--color-alert-error-bg);
|
|
2007
2007
|
}
|
|
2008
2008
|
.elb-codebox-marker-badge--warning {
|
|
2009
2009
|
color: var(--color-alert-warning-text);
|
|
2010
|
-
background:
|
|
2010
|
+
background: transparent;
|
|
2011
2011
|
}
|
|
2012
2012
|
.elb-codebox-marker-badge--warning:hover {
|
|
2013
|
-
background: var(--color-alert-warning-
|
|
2013
|
+
background: var(--color-alert-warning-bg);
|
|
2014
|
+
}
|
|
2015
|
+
.elb-codebox-marker-menu {
|
|
2016
|
+
position: absolute;
|
|
2017
|
+
top: 100%;
|
|
2018
|
+
right: 0;
|
|
2019
|
+
z-index: 10;
|
|
2020
|
+
margin-top: 4px;
|
|
2021
|
+
padding: 4px 0;
|
|
2022
|
+
background: var(--bg-dropdown);
|
|
2023
|
+
border: 1px solid var(--border-box);
|
|
2024
|
+
border-radius: var(--radius-button);
|
|
2025
|
+
box-shadow: var(--shadow-dropdown);
|
|
2026
|
+
min-width: 200px;
|
|
2027
|
+
max-width: 340px;
|
|
2028
|
+
max-height: 200px;
|
|
2029
|
+
overflow-y: auto;
|
|
2030
|
+
}
|
|
2031
|
+
.elb-codebox-marker-menu-item {
|
|
2032
|
+
display: flex;
|
|
2033
|
+
align-items: baseline;
|
|
2034
|
+
gap: 8px;
|
|
2035
|
+
width: 100%;
|
|
2036
|
+
padding: 4px 10px;
|
|
2037
|
+
border: none;
|
|
2038
|
+
background: none;
|
|
2039
|
+
cursor: pointer;
|
|
2040
|
+
font-size: calc(var(--font-size-base) - 2px);
|
|
2041
|
+
color: var(--color-text);
|
|
2042
|
+
text-align: left;
|
|
2043
|
+
}
|
|
2044
|
+
.elb-codebox-marker-menu-item:hover {
|
|
2045
|
+
background: var(--bg-dropdown-option-hover);
|
|
2046
|
+
}
|
|
2047
|
+
.elb-codebox-marker-menu-line {
|
|
2048
|
+
flex-shrink: 0;
|
|
2049
|
+
font-family: var(--font-mono);
|
|
2050
|
+
font-weight: var(--font-weight-semibold);
|
|
2051
|
+
opacity: 0.6;
|
|
2052
|
+
}
|
|
2053
|
+
.elb-codebox-marker-menu-msg {
|
|
2054
|
+
overflow: hidden;
|
|
2055
|
+
text-overflow: ellipsis;
|
|
2056
|
+
white-space: nowrap;
|
|
2014
2057
|
}
|
|
2015
2058
|
.elb-code-snippet {
|
|
2016
2059
|
min-height: var(--height-snippet-min);
|
|
@@ -5,10 +5,20 @@
|
|
|
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
|
-
* The monaco
|
|
9
|
-
*
|
|
10
|
-
*
|
|
8
|
+
* The monaco json namespace is initialized via initMonacoJson() when the
|
|
9
|
+
* Code atom's beforeMount fires. Schemas registered before initialization
|
|
10
|
+
* are queued and flushed once the namespace becomes available.
|
|
11
11
|
*/
|
|
12
|
+
/**
|
|
13
|
+
* Initialize the JSON schema registry with the monaco instance.
|
|
14
|
+
* Called from Code atom's handleBeforeMount where monaco is guaranteed loaded.
|
|
15
|
+
* Flushes any schemas registered before initialization.
|
|
16
|
+
*/
|
|
17
|
+
export declare function initMonacoJson(monaco: typeof import('monaco-editor')): void;
|
|
18
|
+
/**
|
|
19
|
+
* Reset state (for testing only).
|
|
20
|
+
*/
|
|
21
|
+
export declare function resetMonacoJson(): void;
|
|
12
22
|
/**
|
|
13
23
|
* Generate a unique model path for a Code instance.
|
|
14
24
|
* 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":"AAAA;;;;;;;;;;GAUG;
|
|
1
|
+
{"version":3,"file":"monaco-json-schema.d.ts","sourceRoot":"","sources":["../../src/utils/monaco-json-schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAkBH;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,cAAc,eAAe,CAAC,GAAG,IAAI,CAI3E;AAED;;GAEG;AACH,wBAAgB,eAAe,IAAI,IAAI,CAItC;AAED;;;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;AAgBD;;GAEG;AACH,wBAAgB,wBAAwB,IAAI,MAAM,CAEjD;AAED;;GAEG;AACH,wBAAgB,eAAe,IAAI,IAAI,CAGtC"}
|
|
@@ -5,20 +5,33 @@
|
|
|
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
|
-
* The monaco
|
|
9
|
-
*
|
|
10
|
-
*
|
|
8
|
+
* The monaco json namespace is initialized via initMonacoJson() when the
|
|
9
|
+
* Code atom's beforeMount fires. Schemas registered before initialization
|
|
10
|
+
* are queued and flushed once the namespace becomes available.
|
|
11
11
|
*/
|
|
12
12
|
const schemaRegistry = new Map();
|
|
13
13
|
let idCounter = 0;
|
|
14
|
-
//
|
|
14
|
+
// Monaco JSON namespace, set via initMonacoJson() from Code atom's beforeMount
|
|
15
15
|
let _json;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
16
|
+
/**
|
|
17
|
+
* Initialize the JSON schema registry with the monaco instance.
|
|
18
|
+
* Called from Code atom's handleBeforeMount where monaco is guaranteed loaded.
|
|
19
|
+
* Flushes any schemas registered before initialization.
|
|
20
|
+
*/
|
|
21
|
+
export function initMonacoJson(monaco) {
|
|
22
|
+
if (_json)
|
|
23
|
+
return;
|
|
24
|
+
_json = monaco.json;
|
|
25
|
+
if (schemaRegistry.size > 0)
|
|
26
|
+
applySchemas();
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Reset state (for testing only).
|
|
30
|
+
*/
|
|
31
|
+
export function resetMonacoJson() {
|
|
32
|
+
_json = undefined;
|
|
33
|
+
schemaRegistry.clear();
|
|
34
|
+
idCounter = 0;
|
|
22
35
|
}
|
|
23
36
|
/**
|
|
24
37
|
* Generate a unique model path for a Code instance.
|
|
@@ -51,7 +64,9 @@ export function unregisterJsonSchema(modelPath) {
|
|
|
51
64
|
* Apply all registered schemas to Monaco's JSON language service.
|
|
52
65
|
*/
|
|
53
66
|
function applySchemas() {
|
|
54
|
-
|
|
67
|
+
if (!_json)
|
|
68
|
+
return;
|
|
69
|
+
_json.jsonDefaults.setDiagnosticsOptions({
|
|
55
70
|
validate: true,
|
|
56
71
|
schemaValidation: 'error',
|
|
57
72
|
schemaRequest: 'ignore',
|
|
@@ -1 +1 @@
|
|
|
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
|
|
1
|
+
{"version":3,"file":"monaco-json-schema.js","sourceRoot":"","sources":["../../src/utils/monaco-json-schema.ts"],"names":[],"mappings":"AAAA;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c,CAAC,MAAM,EAAE,CAAC;KAC7C,CAAC,CAAC;AACL,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,wBAAwB;IACtC,OAAO,cAAc,CAAC,IAAI,CAAC;AAC7B,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,eAAe;IAC7B,cAAc,CAAC,KAAK,EAAE,CAAC;IACvB,YAAY,EAAE,CAAC;AACjB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@walkeros/explorer",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.3",
|
|
4
4
|
"description": "Interactive React components for walkerOS documentation and exploration",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -24,7 +24,8 @@
|
|
|
24
24
|
"scripts": {
|
|
25
25
|
"build": "tsup --silent",
|
|
26
26
|
"dev": "jest --watchAll --colors",
|
|
27
|
-
"start": "
|
|
27
|
+
"start": "npm run storybook",
|
|
28
|
+
"storybook": "storybook dev -p 6007 --no-open",
|
|
28
29
|
"lint": "tsc && eslint \"src/**/*.ts*\"",
|
|
29
30
|
"test": "jest",
|
|
30
31
|
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist",
|