@kodaris/krubble-components 1.0.30 → 1.0.32
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/breaking-changes.json +10 -1
- package/custom-elements.json +234 -28
- package/dist/button/button.js +2 -2
- package/dist/dialog/dialog.d.ts +24 -1
- package/dist/dialog/dialog.d.ts.map +1 -1
- package/dist/dialog/dialog.js +93 -17
- package/dist/dialog/dialog.js.map +1 -1
- package/dist/krubble-components.bundled.js +107 -31
- package/dist/krubble-components.bundled.js.map +1 -1
- package/dist/krubble-components.bundled.min.js +57 -32
- package/dist/krubble-components.bundled.min.js.map +1 -1
- package/dist/krubble-components.umd.js +107 -31
- package/dist/krubble-components.umd.js.map +1 -1
- package/dist/krubble-components.umd.min.js +71 -46
- package/dist/krubble-components.umd.min.js.map +1 -1
- package/dist/monaco/monaco.d.ts +35 -0
- package/dist/monaco/monaco.d.ts.map +1 -0
- package/dist/monaco/monaco.js +130 -0
- package/dist/monaco/monaco.js.map +1 -0
- package/dist/tabs/tab.d.ts +3 -3
- package/dist/tabs/tab.d.ts.map +1 -1
- package/dist/tabs/tab.js +5 -4
- package/dist/tabs/tab.js.map +1 -1
- package/dist/tabs/tabs.d.ts +2 -2
- package/dist/tabs/tabs.js +3 -3
- package/package.json +14 -1
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
import * as monaco from 'monaco-editor';
|
|
3
|
+
/**
|
|
4
|
+
* A Monaco Editor wrapper that handles shadow DOM boilerplate.
|
|
5
|
+
*
|
|
6
|
+
* Copies Monaco's injected styles from document.head into the shadow root
|
|
7
|
+
* and watches for new styles added later via MutationObserver. Applies CSS
|
|
8
|
+
* fixes for the find widget inside shadow DOM. Disposes the editor and
|
|
9
|
+
* observer on disconnect.
|
|
10
|
+
*
|
|
11
|
+
* Consumers get full access to the Monaco API via the `editor` property.
|
|
12
|
+
* Pass editor configuration through the `options` property before the
|
|
13
|
+
* element connects, or call `editor.updateOptions()` after.
|
|
14
|
+
*
|
|
15
|
+
* @fires ready - Fired when the editor instance is created. Detail: `{ editor }`
|
|
16
|
+
*/
|
|
17
|
+
export declare class KRMonaco extends LitElement {
|
|
18
|
+
static styles: import("lit").CSSResult;
|
|
19
|
+
private _headObserver;
|
|
20
|
+
options: monaco.editor.IStandaloneEditorConstructionOptions;
|
|
21
|
+
editor: monaco.editor.IStandaloneCodeEditor | null;
|
|
22
|
+
firstUpdated(): void;
|
|
23
|
+
disconnectedCallback(): void;
|
|
24
|
+
private _isMonacoStyle;
|
|
25
|
+
private _copyMonacoStyles;
|
|
26
|
+
private _initEditor;
|
|
27
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
28
|
+
}
|
|
29
|
+
export { monaco };
|
|
30
|
+
declare global {
|
|
31
|
+
interface HTMLElementTagNameMap {
|
|
32
|
+
'kr-monaco': KRMonaco;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=monaco.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"monaco.d.ts","sourceRoot":"","sources":["../../src/monaco/monaco.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAE5C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAcxC;;;;;;;;;;;;;GAaG;AACH,qBACa,QAAS,SAAQ,UAAU;IACtC,OAAgB,MAAM,0BA0BpB;IAEF,OAAO,CAAC,aAAa,CAAiC;IAGtD,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,oCAAoC,CAAM;IAEjE,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,qBAAqB,GAAG,IAAI,CAAQ;IAE1D,YAAY;IAOZ,oBAAoB;IAYpB,OAAO,CAAC,cAAc;IAItB,OAAO,CAAC,iBAAiB;IAuBzB,OAAO,CAAC,WAAW;IAenB,MAAM;CAGP;AAED,OAAO,EAAE,MAAM,EAAE,CAAC;AAElB,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,WAAW,EAAE,QAAQ,CAAC;KACvB;CACF"}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { LitElement, html, css } from 'lit';
|
|
8
|
+
import { customElement, property } from 'lit/decorators.js';
|
|
9
|
+
import * as monaco from 'monaco-editor';
|
|
10
|
+
// Default worker setup — consumers can override by setting self.MonacoEnvironment before importing this module
|
|
11
|
+
if (!self.MonacoEnvironment) {
|
|
12
|
+
self.MonacoEnvironment = {
|
|
13
|
+
getWorker() {
|
|
14
|
+
return new Worker(new URL('monaco-editor/esm/vs/editor/editor.worker.js', import.meta.url), { type: 'module' });
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* A Monaco Editor wrapper that handles shadow DOM boilerplate.
|
|
20
|
+
*
|
|
21
|
+
* Copies Monaco's injected styles from document.head into the shadow root
|
|
22
|
+
* and watches for new styles added later via MutationObserver. Applies CSS
|
|
23
|
+
* fixes for the find widget inside shadow DOM. Disposes the editor and
|
|
24
|
+
* observer on disconnect.
|
|
25
|
+
*
|
|
26
|
+
* Consumers get full access to the Monaco API via the `editor` property.
|
|
27
|
+
* Pass editor configuration through the `options` property before the
|
|
28
|
+
* element connects, or call `editor.updateOptions()` after.
|
|
29
|
+
*
|
|
30
|
+
* @fires ready - Fired when the editor instance is created. Detail: `{ editor }`
|
|
31
|
+
*/
|
|
32
|
+
let KRMonaco = class KRMonaco extends LitElement {
|
|
33
|
+
constructor() {
|
|
34
|
+
super(...arguments);
|
|
35
|
+
this._headObserver = null;
|
|
36
|
+
this.options = {};
|
|
37
|
+
this.editor = null;
|
|
38
|
+
}
|
|
39
|
+
firstUpdated() {
|
|
40
|
+
requestAnimationFrame(() => {
|
|
41
|
+
this._copyMonacoStyles();
|
|
42
|
+
this._initEditor();
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
disconnectedCallback() {
|
|
46
|
+
super.disconnectedCallback();
|
|
47
|
+
if (this._headObserver) {
|
|
48
|
+
this._headObserver.disconnect();
|
|
49
|
+
this._headObserver = null;
|
|
50
|
+
}
|
|
51
|
+
if (this.editor) {
|
|
52
|
+
this.editor.dispose();
|
|
53
|
+
this.editor = null;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
_isMonacoStyle(text) {
|
|
57
|
+
return text.includes('.monaco-') || text.includes('.codicon');
|
|
58
|
+
}
|
|
59
|
+
_copyMonacoStyles() {
|
|
60
|
+
if (!this.shadowRoot) {
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
document.head.querySelectorAll('style').forEach((style) => {
|
|
64
|
+
if (style.textContent && this._isMonacoStyle(style.textContent)) {
|
|
65
|
+
this.shadowRoot.appendChild(style.cloneNode(true));
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
this._headObserver = new MutationObserver((mutations) => {
|
|
69
|
+
mutations.forEach((mutation) => {
|
|
70
|
+
mutation.addedNodes.forEach((node) => {
|
|
71
|
+
if (node instanceof HTMLStyleElement && node.textContent && this._isMonacoStyle(node.textContent)) {
|
|
72
|
+
this.shadowRoot.appendChild(node.cloneNode(true));
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
});
|
|
76
|
+
});
|
|
77
|
+
this._headObserver.observe(document.head, { childList: true });
|
|
78
|
+
}
|
|
79
|
+
_initEditor() {
|
|
80
|
+
const container = this.shadowRoot?.querySelector('#container');
|
|
81
|
+
if (!container) {
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
this.editor = monaco.editor.create(container, this.options);
|
|
85
|
+
this.dispatchEvent(new CustomEvent('ready', {
|
|
86
|
+
detail: { editor: this.editor },
|
|
87
|
+
bubbles: true,
|
|
88
|
+
composed: true,
|
|
89
|
+
}));
|
|
90
|
+
}
|
|
91
|
+
render() {
|
|
92
|
+
return html `<div id="container"></div>`;
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
KRMonaco.styles = css `
|
|
96
|
+
:host {
|
|
97
|
+
display: block;
|
|
98
|
+
position: relative;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
#container {
|
|
102
|
+
position: absolute;
|
|
103
|
+
top: 0;
|
|
104
|
+
left: 0;
|
|
105
|
+
right: 0;
|
|
106
|
+
bottom: 0;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/* Monaco find widget assumes content-box for layout of all its children */
|
|
110
|
+
.monaco-editor .find-widget,
|
|
111
|
+
.monaco-editor .find-widget *,
|
|
112
|
+
.monaco-editor .find-widget *::before,
|
|
113
|
+
.monaco-editor .find-widget *::after {
|
|
114
|
+
box-sizing: content-box;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/* Prevent overflow:hidden on the scrollable wrapper from clipping the input focus outline */
|
|
118
|
+
.monaco-editor .find-widget .monaco-scrollable-element {
|
|
119
|
+
overflow: visible !important;
|
|
120
|
+
}
|
|
121
|
+
`;
|
|
122
|
+
__decorate([
|
|
123
|
+
property({ type: Object })
|
|
124
|
+
], KRMonaco.prototype, "options", void 0);
|
|
125
|
+
KRMonaco = __decorate([
|
|
126
|
+
customElement('kr-monaco')
|
|
127
|
+
], KRMonaco);
|
|
128
|
+
export { KRMonaco };
|
|
129
|
+
export { monaco };
|
|
130
|
+
//# sourceMappingURL=monaco.js.map
|
|
@@ -0,0 +1 @@
|
|
|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,UAAU,EAAE,aAAa,CAAC,YAAY,CAAgB,CAAC;QAC9E,IAAI,CAAC,SAAS,EAAE,CAAC;YACf,OAAO;QACT,CAAC;QAED,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QAE5D,IAAI,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,OAAO,EAAE;YAC1C,MAAM,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE;YAC/B,OAAO,EAAE,IAAI;YACb,QAAQ,EAAE,IAAI;SACf,CAAC,CAAC,CAAC;IACN,CAAC;IAED,MAAM;QACJ,OAAO,IAAI,CAAA,4BAA4B,CAAC;IAC1C,CAAC;;AAlGe,eAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0B3B,AA1BqB,CA0BpB;AAKF;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;yCACsC;AAhCtD,QAAQ;IADpB,aAAa,CAAC,WAAW,CAAC;GACd,QAAQ,CAoGpB;;AAED,OAAO,EAAE,MAAM,EAAE,CAAC"}
|
package/dist/tabs/tab.d.ts
CHANGED
|
@@ -13,11 +13,11 @@ export declare class KRTab extends LitElement {
|
|
|
13
13
|
*/
|
|
14
14
|
id: string;
|
|
15
15
|
/**
|
|
16
|
-
* Display
|
|
16
|
+
* Display label for the tab
|
|
17
17
|
*/
|
|
18
|
-
|
|
18
|
+
label: string;
|
|
19
19
|
/**
|
|
20
|
-
* Badge text displayed next to
|
|
20
|
+
* Badge text displayed next to label (e.g. notification count)
|
|
21
21
|
*/
|
|
22
22
|
badge: string;
|
|
23
23
|
/**
|
package/dist/tabs/tab.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tab.d.ts","sourceRoot":"","sources":["../../src/tabs/tab.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAI5C;;;;;;GAMG;AACH,qBACa,KAAM,SAAQ,UAAU;IACnC,OAAgB,MAAM,4BAapB;IAEF;;OAEG;IAEM,EAAE,SAAM;IAEjB;;OAEG;IAEH,KAAK,SAAM;IAEX;;OAEG;IAEH,KAAK,SAAM;IAEX;;OAEG;IAEH,eAAe,SAAM;IAErB;;OAEG;IAEH,UAAU,SAAM;IAEhB;;OAEG;IAEH,QAAQ,UAAS;IAEjB;;OAEG;IAEH,WAAW,UAAS;IAEpB;;OAEG;IAEH,MAAM,UAAS;IAEf;;OAEG;IACH,cAAc,IAAI,OAAO,GAAG,IAAI;IAIvB,MAAM;
|
|
1
|
+
{"version":3,"file":"tab.d.ts","sourceRoot":"","sources":["../../src/tabs/tab.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAI5C;;;;;;GAMG;AACH,qBACa,KAAM,SAAQ,UAAU;IACnC,OAAgB,MAAM,4BAapB;IAEF;;OAEG;IAEM,EAAE,SAAM;IAEjB;;OAEG;IAEH,KAAK,SAAM;IAEX;;OAEG;IAEH,KAAK,SAAM;IAEX;;OAEG;IAEH,eAAe,SAAM;IAErB;;OAEG;IAEH,UAAU,SAAM;IAEhB;;OAEG;IAEH,QAAQ,UAAS;IAEjB;;OAEG;IAEH,WAAW,UAAS;IAEpB;;OAEG;IAEH,MAAM,UAAS;IAEf;;OAEG;IACH,cAAc,IAAI,OAAO,GAAG,IAAI;IAIvB,MAAM;CAIhB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,QAAQ,EAAE,KAAK,CAAC;KACjB;CACF"}
|
package/dist/tabs/tab.js
CHANGED
|
@@ -22,11 +22,11 @@ let KRTab = class KRTab extends LitElement {
|
|
|
22
22
|
*/
|
|
23
23
|
this.id = '';
|
|
24
24
|
/**
|
|
25
|
-
* Display
|
|
25
|
+
* Display label for the tab
|
|
26
26
|
*/
|
|
27
|
-
this.
|
|
27
|
+
this.label = '';
|
|
28
28
|
/**
|
|
29
|
-
* Badge text displayed next to
|
|
29
|
+
* Badge text displayed next to label (e.g. notification count)
|
|
30
30
|
*/
|
|
31
31
|
this.badge = '';
|
|
32
32
|
/**
|
|
@@ -57,6 +57,7 @@ let KRTab = class KRTab extends LitElement {
|
|
|
57
57
|
return this.querySelector('[slot="icon"]');
|
|
58
58
|
}
|
|
59
59
|
render() {
|
|
60
|
+
console.log('tab render');
|
|
60
61
|
return html `<slot></slot>`;
|
|
61
62
|
}
|
|
62
63
|
};
|
|
@@ -79,7 +80,7 @@ __decorate([
|
|
|
79
80
|
], KRTab.prototype, "id", void 0);
|
|
80
81
|
__decorate([
|
|
81
82
|
property({ type: String })
|
|
82
|
-
], KRTab.prototype, "
|
|
83
|
+
], KRTab.prototype, "label", void 0);
|
|
83
84
|
__decorate([
|
|
84
85
|
property({ type: String })
|
|
85
86
|
], KRTab.prototype, "badge", void 0);
|
package/dist/tabs/tab.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tab.js","sourceRoot":"","sources":["../../src/tabs/tab.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C;;;;;;GAMG;AAEI,IAAM,KAAK,GAAX,MAAM,KAAM,SAAQ,UAAU;IAA9B;;QAgBL;;WAEG;QAEM,OAAE,GAAG,EAAE,CAAC;QAEjB;;WAEG;QAEH,UAAK,GAAG,EAAE,CAAC;QAEX;;WAEG;QAEH,UAAK,GAAG,EAAE,CAAC;QAEX;;WAEG;QAEH,oBAAe,GAAG,EAAE,CAAC;QAErB;;WAEG;QAEH,eAAU,GAAG,EAAE,CAAC;QAEhB;;WAEG;QAEH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CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;oCAChB;AAMX;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;oCAChB;AAMX;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,kBAAkB,EAAE,CAAC;8CACrC;AAMrB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,aAAa,EAAE,CAAC;yCACrC;AAMhB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;uCACX;AAMjB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;0CACR;AAMpB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;qCAC5B;AA9DJ,KAAK;IADjB,aAAa,CAAC,QAAQ,CAAC;GACX,KAAK,CA2EjB"}
|
package/dist/tabs/tabs.d.ts
CHANGED
|
@@ -12,11 +12,11 @@ import { LitElement, TemplateResult } from 'lit';
|
|
|
12
12
|
* @example
|
|
13
13
|
* ```html
|
|
14
14
|
* <kr-tab-group active-tab-id="settings">
|
|
15
|
-
* <kr-tab id="home"
|
|
15
|
+
* <kr-tab id="home" label="Home">
|
|
16
16
|
* <svg slot="icon" viewBox="0 0 20 20" fill="currentColor" width="16" height="16">...</svg>
|
|
17
17
|
* <p>Home content here</p>
|
|
18
18
|
* </kr-tab>
|
|
19
|
-
* <kr-tab id="settings"
|
|
19
|
+
* <kr-tab id="settings" label="Settings" badge="3">
|
|
20
20
|
* <svg slot="icon" viewBox="0 0 20 20" fill="currentColor" width="16" height="16">...</svg>
|
|
21
21
|
* <p>Settings content here</p>
|
|
22
22
|
* </kr-tab>
|
package/dist/tabs/tabs.js
CHANGED
|
@@ -22,11 +22,11 @@ import { krBaseCSS } from '../style/base.js';
|
|
|
22
22
|
* @example
|
|
23
23
|
* ```html
|
|
24
24
|
* <kr-tab-group active-tab-id="settings">
|
|
25
|
-
* <kr-tab id="home"
|
|
25
|
+
* <kr-tab id="home" label="Home">
|
|
26
26
|
* <svg slot="icon" viewBox="0 0 20 20" fill="currentColor" width="16" height="16">...</svg>
|
|
27
27
|
* <p>Home content here</p>
|
|
28
28
|
* </kr-tab>
|
|
29
|
-
* <kr-tab id="settings"
|
|
29
|
+
* <kr-tab id="settings" label="Settings" badge="3">
|
|
30
30
|
* <svg slot="icon" viewBox="0 0 20 20" fill="currentColor" width="16" height="16">...</svg>
|
|
31
31
|
* <p>Settings content here</p>
|
|
32
32
|
* </kr-tab>
|
|
@@ -146,7 +146,7 @@ let KRTabGroup = class KRTabGroup extends LitElement {
|
|
|
146
146
|
@click=${() => this._handleTabClick(tab)}
|
|
147
147
|
>
|
|
148
148
|
${this._renderTabIcon(tab)}
|
|
149
|
-
<span>${tab.
|
|
149
|
+
<span>${tab.label}</span>
|
|
150
150
|
${tab.badge ? html `<span class="label-badge" style=${styleMap({ backgroundColor: tab.badgeBackground, color: tab.badgeColor })}>${tab.badge}</span>` : nothing}
|
|
151
151
|
${tab.dismissible
|
|
152
152
|
? html `
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kodaris/krubble-components",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.32",
|
|
4
4
|
"description": "Krubble Lit Web Components Library",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -97,6 +97,10 @@
|
|
|
97
97
|
"./form/select-option": {
|
|
98
98
|
"types": "./dist/form/select-field/select-option.d.ts",
|
|
99
99
|
"import": "./dist/form/select-field/select-option.js"
|
|
100
|
+
},
|
|
101
|
+
"./monaco": {
|
|
102
|
+
"types": "./dist/monaco/monaco.d.ts",
|
|
103
|
+
"import": "./dist/monaco/monaco.js"
|
|
100
104
|
}
|
|
101
105
|
},
|
|
102
106
|
"files": [
|
|
@@ -117,6 +121,14 @@
|
|
|
117
121
|
"test": "web-test-runner",
|
|
118
122
|
"lint": "eslint src"
|
|
119
123
|
},
|
|
124
|
+
"peerDependencies": {
|
|
125
|
+
"monaco-editor": ">=0.50.0"
|
|
126
|
+
},
|
|
127
|
+
"peerDependenciesMeta": {
|
|
128
|
+
"monaco-editor": {
|
|
129
|
+
"optional": true
|
|
130
|
+
}
|
|
131
|
+
},
|
|
120
132
|
"dependencies": {
|
|
121
133
|
"lit": "^3.2.0"
|
|
122
134
|
},
|
|
@@ -125,6 +137,7 @@
|
|
|
125
137
|
"@rollup/plugin-node-resolve": "^15.3.0",
|
|
126
138
|
"@rollup/plugin-terser": "^0.4.4",
|
|
127
139
|
"concurrently": "^8.2.0",
|
|
140
|
+
"monaco-editor": "^0.55.1",
|
|
128
141
|
"rollup": "^4.24.0",
|
|
129
142
|
"typescript": "^5.6.3"
|
|
130
143
|
},
|