@covalent/components 8.15.0-beta.4 → 8.15.0-beta.5

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.
Files changed (49) hide show
  1. package/cell/cell.d.ts +1 -0
  2. package/cell/cell.d.ts.map +1 -1
  3. package/cell.js +20 -16
  4. package/cell.mjs +59 -47
  5. package/code-editor/code-editor.d.ts +5 -5
  6. package/code-editor/code-editor.d.ts.map +1 -1
  7. package/{code-editor-7e7e4197.js → code-editor-1a85e0d5.js} +15 -15
  8. package/{code-editor-49ed0cc2.mjs → code-editor-50658551.mjs} +46 -46
  9. package/code-editor.js +1 -1
  10. package/code-editor.mjs +1 -1
  11. package/code-snippet.js +1 -1
  12. package/code-snippet.mjs +1 -1
  13. package/{cssMode-117dc70a.mjs → cssMode-2b74fdc2.mjs} +1 -1
  14. package/{cssMode-9f32fcf1.js → cssMode-9d3a459c.js} +1 -1
  15. package/{freemarker2-22c962f2.js → freemarker2-bde9aca2.js} +1 -1
  16. package/{freemarker2-a368c7af.mjs → freemarker2-cfbd8857.mjs} +1 -1
  17. package/{handlebars-8cfb10a2.mjs → handlebars-c9cf3ba5.mjs} +1 -1
  18. package/{handlebars-a97e1ef4.js → handlebars-f9941f98.js} +1 -1
  19. package/{html-8da5188a.mjs → html-201c3d5b.mjs} +1 -1
  20. package/{html-2b6bfaf8.js → html-e9028ad1.js} +1 -1
  21. package/{htmlMode-789c7165.mjs → htmlMode-81e069aa.mjs} +1 -1
  22. package/{htmlMode-b3001f86.js → htmlMode-8825beb1.js} +1 -1
  23. package/index.js +1 -1
  24. package/index.mjs +1 -1
  25. package/{javascript-4d528a27.js → javascript-3c211951.js} +1 -1
  26. package/{javascript-f014ee80.mjs → javascript-b57f3bab.mjs} +2 -2
  27. package/{jsonMode-071e521b.mjs → jsonMode-1e42d08e.mjs} +1 -1
  28. package/{jsonMode-1db13325.js → jsonMode-8cd3f8b9.js} +1 -1
  29. package/{liquid-f8017dc6.mjs → liquid-987381d2.mjs} +1 -1
  30. package/{liquid-7723b12b.js → liquid-c3f3aaaf.js} +1 -1
  31. package/notebook/notebook.d.ts +51 -19
  32. package/notebook/notebook.d.ts.map +1 -1
  33. package/notebook.js +61 -33
  34. package/notebook.mjs +890 -779
  35. package/package.json +1 -1
  36. package/{python-1c6f39ab.js → python-bc49c081.js} +1 -1
  37. package/{python-5e3b4914.mjs → python-fc06c865.mjs} +1 -1
  38. package/{razor-2ce3ee94.mjs → razor-52a04ea4.mjs} +1 -1
  39. package/{razor-bc0cba40.js → razor-90572182.js} +1 -1
  40. package/select.js +1 -1
  41. package/select.mjs +1 -1
  42. package/{tsMode-fc73b7ce.js → tsMode-d31816b7.js} +1 -1
  43. package/{tsMode-a8318df7.mjs → tsMode-f63ee283.mjs} +1 -1
  44. package/{typescript-6490ca2e.js → typescript-40210801.js} +1 -1
  45. package/{typescript-ba89d39f.mjs → typescript-43c5c20d.mjs} +1 -1
  46. package/{xml-ed522294.js → xml-7bc2fc7c.js} +1 -1
  47. package/{xml-2a05d02d.mjs → xml-fa896994.mjs} +1 -1
  48. package/{yaml-b1226770.mjs → yaml-78bd2cbe.mjs} +1 -1
  49. package/{yaml-e520529c.js → yaml-ed9aa786.js} +1 -1
package/cell/cell.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { LitElement, PropertyValues } from 'lit';
2
2
  import '../code-editor/code-editor';
3
+ import '../code-snippet/code-snippet';
3
4
  import '../icon-button/icon-button';
4
5
  import '../typography/typography';
5
6
  declare global {
@@ -1 +1 @@
1
- {"version":3,"file":"cell.d.ts","sourceRoot":"","sources":["../../../../libs/components/src/cell/cell.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,UAAU,EAAE,cAAc,EAAa,MAAM,KAAK,CAAC;AAIvE,OAAO,4BAA4B,CAAC;AACpC,OAAO,4BAA4B,CAAC;AACpC,OAAO,0BAA0B,CAAC;AAElC,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,S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AEF,OAAgB,MAAM,4BAIpB;IAEF,gBAAgB,CAAC,CAAC,EAAE,WAAW;IAI/B,SAAS;IAUT,cAAc,CAAC,QAAQ,EAAE,OAAO;IAKhC,SAAS,CAAC,OAAO,CAAC,iBAAiB,EAAE,cAAc;IAenD,YAAY;IA2BZ,SAAS,CAAC,MAAM;CAsBjB;AAED,eAAe,YAAY,CAAC"}
package/cell.js CHANGED
@@ -1,25 +1,29 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("./query-assigned-elements-f623705d.js"),l=require("./property-57f6f6fe.js"),a=require("./class-map-0a4c6ca9.js");require("./code-editor-7e7e4197.js");require("./icon-button.js");require("./typography.js");require("./directive-1186bc23.js");require("./async-directive-4a34f75e.js");require("./directive-helpers-0ce1f995.js");require("./tslib.es6-98719205.js");require("./ripple-handlers-9fb4a31a.js");require("./base-element-58a3f9ea.js");require("./utils-a8190a39.js");require("./state-0974a8e5.js");require("./query-680f1868.js");require("./style-map-a135c6ab.js");require("./aria-property-849c8816.js");require("./event-options-3f5eb195.js");require("./if-defined-f1c45245.js");const u=`:host{--mdc-icon-button-size: 24px;font-family:var(--mdc-typography-body1-font-family);width:100%}.selection-indicator{background-color:var(--cv-theme-primary);border-radius:2px;margin-top:2px;visibility:hidden;width:8px}.timesExecuted{color:var(--cv-theme-outline-variant);min-height:var(--mdc-icon-button-size);min-width:var(--mdc-icon-button-size)}.cell{box-sizing:border-box;display:flex;justify-content:space-between}.cell:hover .selection-indicator,.cell.focused .selection-indicator,.cell.selected .selection-indicator{visibility:visible}.cell:hover .timesExecuted,.cell.focused .timesExecuted,.cell.selected .timesExecuted{color:var(--cv-theme-primary)}.cellWrapper{display:flex;flex-direction:column;width:95%}.cellCodeWrapper{align-items:flex-start;display:flex;justify-content:space-between}.cellCodeWrapper .editor-output-wrapper{width:calc(95% - 8px)}.output{margin:.5rem .25rem}
2
- `;var p=Object.defineProperty,h=Object.getOwnPropertyDescriptor,s=(n,e,i,r)=>{for(var o=r>1?void 0:r?h(e,i):e,d=n.length-1,c;d>=0;d--)(c=n[d])&&(o=(r?c(e,i,o):c(o))||o);return r&&o&&p(e,i,o),o};exports.CovalentCell=class extends t.s{constructor(){super(...arguments),this.code="",this.language="",this.selected=!1,this.timesExecuted=0,this.showEditor=!0,this._editorFocused=!1,this.editorOptions={minimap:{enabled:!1},wordWrap:"on",fontSize:"14px",glyphMargin:!1,folding:!1,lineNumbers:"off",lineDecorationsWidth:0,lineNumbersMinChars:0,renderLineHighlight:"none",overviewRulerLanes:0,hideCursorInOverviewRuler:!0,scrollbar:{vertical:"hidden"}}}handleCodeChange(e){this.code=e.detail.code}handleRun(){this.dispatchEvent(new CustomEvent("cell-run-code",{detail:{index:this.index,code:this.code},bubbles:!0,composed:!0}))}setEditorFocus(e){this._editorFocused=e,this.requestUpdate()}updated(e){var i;if(e.has("code")||e.has("language")){const r=(i=this.shadowRoot)==null?void 0:i.querySelector("cv-code-editor");r&&(r.code=this.code,r.language=this.language)}}renderEditor(){const e=t.x`<cv-code-editor
3
- @code-change="${this.handleCodeChange}"
4
- @editor-focus="${()=>this.setEditorFocus(!0)}"
5
- @editor-blur="${()=>this.setEditorFocus(!1)}"
6
- .code="${this.code}"
7
- .language="${this.language}"
8
- .options="${this.editorOptions}"
9
- ></cv-code-editor>`,i=t.x`<cv-typography class="output" scale="body1">
10
- <slot name="output"></slot>
11
- </cv-typography>`;return t.x`${this.showEditor?e:""}${!this.showEditor&&this.language==="markdown"||this.language!=="markdown"?i:""}`}render(){const e={cell:!0,selected:this.selected,focused:this._editorFocused};return t.x`
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("./query-assigned-elements-f623705d.js"),n=require("./property-57f6f6fe.js"),a=require("./class-map-0a4c6ca9.js");require("./code-editor-1a85e0d5.js");require("./code-snippet.js");require("./icon-button.js");require("./typography.js");require("./directive-1186bc23.js");require("./async-directive-4a34f75e.js");require("./directive-helpers-0ce1f995.js");require("./query-assigned-nodes-99eae71d.js");require("./_commonjsHelpers-2367a3a2.js");require("./tslib.es6-98719205.js");require("./ripple-handlers-9fb4a31a.js");require("./base-element-58a3f9ea.js");require("./utils-a8190a39.js");require("./state-0974a8e5.js");require("./query-680f1868.js");require("./style-map-a135c6ab.js");require("./aria-property-849c8816.js");require("./event-options-3f5eb195.js");require("./if-defined-f1c45245.js");const u=`:host{--mdc-icon-button-size: 24px;font-family:var(--mdc-typography-body1-font-family);width:100%}cv-code-snippet{background-color:var(--cv-theme-surface-container-high);border-radius:0;box-sizing:border-box;min-height:21px;padding:0 .25rem}cv-code-snippet::part(code){font-size:var(--mdc-typography-body2-font-size);line-height:var(--mdc-typography-body2-line-height);padding:1px 0;white-space:pre-wrap}.selection-indicator{background-color:var(--cv-theme-primary);border-radius:2px;margin-top:2px;visibility:hidden;width:8px}.timesExecuted{color:var(--cv-theme-outline-variant);margin:0 2rem;min-height:var(--mdc-icon-button-size);min-width:var(--mdc-icon-button-size)}.cell{box-sizing:border-box;display:flex;justify-content:space-between}.cell:hover .selection-indicator,.cell.focused .selection-indicator,.cell.selected .selection-indicator{visibility:visible}.cell:hover .timesExecuted,.cell.focused .timesExecuted,.cell.selected .timesExecuted{color:var(--cv-theme-primary)}.cellWrapper{display:flex;flex-direction:column;width:100%}.cellCodeWrapper{align-items:flex-start;display:flex;justify-content:space-between}.cellOutputWrapper{width:100%}.output{margin:.75rem .25rem .5rem;max-width:100%}
2
+ `;var p=Object.defineProperty,h=Object.getOwnPropertyDescriptor,s=(d,e,r,o)=>{for(var t=o>1?void 0:o?h(e,r):e,l=d.length-1,c;l>=0;l--)(c=d[l])&&(t=(o?c(e,r,t):c(t))||t);return o&&t&&p(e,r,t),t};exports.CovalentCell=class extends i.s{constructor(){super(...arguments),this.code="",this.language="",this.selected=!1,this.timesExecuted=0,this.showEditor=!0,this._editorFocused=!1,this.editorOptions={minimap:{enabled:!1},wordWrap:"on",fontSize:"14px",glyphMargin:!1,folding:!1,lineNumbers:"off",lineDecorationsWidth:0,lineNumbersMinChars:0,renderLineHighlight:"none",overviewRulerLanes:0,hideCursorInOverviewRuler:!0,scrollbar:{vertical:"hidden"}}}handleCodeChange(e){this.code=e.detail.code}handleRun(){this.dispatchEvent(new CustomEvent("cell-run-code",{detail:{index:this.index,code:this.code},bubbles:!0,composed:!0}))}setEditorFocus(e){this._editorFocused=e,this.requestUpdate()}updated(e){var r,o;if(e.has("code")||e.has("language")){const t=(r=this.shadowRoot)==null?void 0:r.querySelector("cv-code-editor");if(t)t.code=this.code,t.language=this.language;else{const l=(o=this.shadowRoot)==null?void 0:o.querySelector("cv-code-snippet");l&&!this.selected&&(l.language=this.language)}}}renderEditor(){const e=this.selected?i.x`<cv-code-editor
3
+ @code-change="${this.handleCodeChange}"
4
+ @editor-focus="${()=>this.setEditorFocus(!0)}"
5
+ @editor-blur="${()=>this.setEditorFocus(!1)}"
6
+ .code="${this.code}"
7
+ .language="${this.language}"
8
+ .options="${this.editorOptions}"
9
+ ></cv-code-editor>`:i.x`<cv-code-snippet hideHeader .language="${this.language}"
10
+ >${this.code}</cv-code-snippet
11
+ >`,r=i.x`<slot name="error"></slot>
12
+ <cv-typography class="output" scale="body1">
13
+ <slot name="output"></slot>
14
+ <slot name="input"></slot>
15
+ </cv-typography>`;return i.x`${this.showEditor?e:""}${!this.showEditor&&this.language==="markdown"||this.language!=="markdown"?r:""}`}render(){const e={cell:!0,selected:this.selected,focused:this._editorFocused};return i.x`
12
16
  <div class="${a.o(e)}">
13
17
  <span class="selection-indicator"></span>
14
18
  <div class="cellWrapper">
15
19
  <div class="cellCodeWrapper">
16
20
  <span class="timesExecuted">
17
- ${this.showEditor?t.x`[${this.timesExecuted===0?" ":this.timesExecuted}]:`:""}
21
+ ${this.showEditor?i.x`[${this.timesExecuted?this.timesExecuted:" "}]:`:""}
18
22
  </span>
19
- <div class="editor-output-wrapper">${this.renderEditor()}</div>
23
+ <div class="cellOutputWrapper">${this.renderEditor()}</div>
20
24
  </div>
21
25
  </div>
22
26
  </div>
23
- `}};exports.CovalentCell.styles=[t.i`
24
- ${t.r(u)}
25
- `];s([l.n({type:Number})],exports.CovalentCell.prototype,"index",2);s([l.n({type:String})],exports.CovalentCell.prototype,"code",2);s([l.n({type:String})],exports.CovalentCell.prototype,"language",2);s([l.n({type:Boolean,reflect:!0})],exports.CovalentCell.prototype,"selected",2);s([l.n({type:Number})],exports.CovalentCell.prototype,"timesExecuted",2);s([l.n({type:Boolean,reflect:!0})],exports.CovalentCell.prototype,"showEditor",2);exports.CovalentCell=s([t.e("cv-cell")],exports.CovalentCell);const v=exports.CovalentCell;exports.default=v;
27
+ `}};exports.CovalentCell.styles=[i.i`
28
+ ${i.r(u)}
29
+ `];s([n.n({type:Number})],exports.CovalentCell.prototype,"index",2);s([n.n({type:String})],exports.CovalentCell.prototype,"code",2);s([n.n({type:String})],exports.CovalentCell.prototype,"language",2);s([n.n({type:Boolean,reflect:!0})],exports.CovalentCell.prototype,"selected",2);s([n.n({type:Number})],exports.CovalentCell.prototype,"timesExecuted",2);s([n.n({type:Boolean,reflect:!0})],exports.CovalentCell.prototype,"showEditor",2);exports.CovalentCell=s([i.e("cv-cell")],exports.CovalentCell);const v=exports.CovalentCell;exports.default=v;
package/cell.mjs CHANGED
@@ -1,12 +1,15 @@
1
- import { i as p, r as u, s as h, x as l, e as m } from "./query-assigned-elements-4a39219d.mjs";
2
- import { n as d } from "./property-9b6ea53b.mjs";
3
- import { o as v } from "./class-map-6e504a9a.mjs";
4
- import "./code-editor-49ed0cc2.mjs";
1
+ import { i as p, r as h, s as u, x as c, e as m } from "./query-assigned-elements-4a39219d.mjs";
2
+ import { n as l } from "./property-9b6ea53b.mjs";
3
+ import { o as g } from "./class-map-6e504a9a.mjs";
4
+ import "./code-editor-50658551.mjs";
5
+ import "./code-snippet.mjs";
5
6
  import "./icon-button.mjs";
6
7
  import "./typography.mjs";
7
8
  import "./directive-daf4e9b6.mjs";
8
9
  import "./async-directive-99a01ec7.mjs";
9
10
  import "./directive-helpers-e3ea6592.mjs";
11
+ import "./query-assigned-nodes-df691e78.mjs";
12
+ import "./_commonjsHelpers-2f131a27.mjs";
10
13
  import "./tslib.es6-c4b0f3b1.mjs";
11
14
  import "./ripple-handlers-8883e893.mjs";
12
15
  import "./base-element-acf30176.mjs";
@@ -17,14 +20,14 @@ import "./style-map-e7ec6d41.mjs";
17
20
  import "./aria-property-fa2717fe.mjs";
18
21
  import "./event-options-78d6cf94.mjs";
19
22
  import "./if-defined-c367f208.mjs";
20
- const f = `:host{--mdc-icon-button-size: 24px;font-family:var(--mdc-typography-body1-font-family);width:100%}.selection-indicator{background-color:var(--cv-theme-primary);border-radius:2px;margin-top:2px;visibility:hidden;width:8px}.timesExecuted{color:var(--cv-theme-outline-variant);min-height:var(--mdc-icon-button-size);min-width:var(--mdc-icon-button-size)}.cell{box-sizing:border-box;display:flex;justify-content:space-between}.cell:hover .selection-indicator,.cell.focused .selection-indicator,.cell.selected .selection-indicator{visibility:visible}.cell:hover .timesExecuted,.cell.focused .timesExecuted,.cell.selected .timesExecuted{color:var(--cv-theme-primary)}.cellWrapper{display:flex;flex-direction:column;width:95%}.cellCodeWrapper{align-items:flex-start;display:flex;justify-content:space-between}.cellCodeWrapper .editor-output-wrapper{width:calc(95% - 8px)}.output{margin:.5rem .25rem}
23
+ const v = `:host{--mdc-icon-button-size: 24px;font-family:var(--mdc-typography-body1-font-family);width:100%}cv-code-snippet{background-color:var(--cv-theme-surface-container-high);border-radius:0;box-sizing:border-box;min-height:21px;padding:0 .25rem}cv-code-snippet::part(code){font-size:var(--mdc-typography-body2-font-size);line-height:var(--mdc-typography-body2-line-height);padding:1px 0;white-space:pre-wrap}.selection-indicator{background-color:var(--cv-theme-primary);border-radius:2px;margin-top:2px;visibility:hidden;width:8px}.timesExecuted{color:var(--cv-theme-outline-variant);margin:0 2rem;min-height:var(--mdc-icon-button-size);min-width:var(--mdc-icon-button-size)}.cell{box-sizing:border-box;display:flex;justify-content:space-between}.cell:hover .selection-indicator,.cell.focused .selection-indicator,.cell.selected .selection-indicator{visibility:visible}.cell:hover .timesExecuted,.cell.focused .timesExecuted,.cell.selected .timesExecuted{color:var(--cv-theme-primary)}.cellWrapper{display:flex;flex-direction:column;width:100%}.cellCodeWrapper{align-items:flex-start;display:flex;justify-content:space-between}.cellOutputWrapper{width:100%}.output{margin:.75rem .25rem .5rem;max-width:100%}
21
24
  `;
22
- var g = Object.defineProperty, y = Object.getOwnPropertyDescriptor, s = (e, o, i, c) => {
23
- for (var r = c > 1 ? void 0 : c ? y(o, i) : o, a = e.length - 1, n; a >= 0; a--)
24
- (n = e[a]) && (r = (c ? n(o, i, r) : n(r)) || r);
25
- return c && r && g(o, i, r), r;
25
+ var f = Object.defineProperty, y = Object.getOwnPropertyDescriptor, s = (e, o, d, r) => {
26
+ for (var t = r > 1 ? void 0 : r ? y(o, d) : o, a = e.length - 1, n; a >= 0; a--)
27
+ (n = e[a]) && (t = (r ? n(o, d, t) : n(t)) || t);
28
+ return r && t && f(o, d, t), t;
26
29
  };
27
- let t = class extends h {
30
+ let i = class extends u {
28
31
  constructor() {
29
32
  super(...arguments), this.code = "", this.language = "", this.selected = !1, this.timesExecuted = 0, this.showEditor = !0, this._editorFocused = !1, this.editorOptions = {
30
33
  minimap: { enabled: !1 },
@@ -61,24 +64,33 @@ let t = class extends h {
61
64
  this._editorFocused = e, this.requestUpdate();
62
65
  }
63
66
  updated(e) {
64
- var o;
67
+ var o, d;
65
68
  if (e.has("code") || e.has("language")) {
66
- const i = (o = this.shadowRoot) == null ? void 0 : o.querySelector("cv-code-editor");
67
- i && (i.code = this.code, i.language = this.language);
69
+ const r = (o = this.shadowRoot) == null ? void 0 : o.querySelector("cv-code-editor");
70
+ if (r)
71
+ r.code = this.code, r.language = this.language;
72
+ else {
73
+ const t = (d = this.shadowRoot) == null ? void 0 : d.querySelector("cv-code-snippet");
74
+ t && !this.selected && (t.language = this.language);
75
+ }
68
76
  }
69
77
  }
70
78
  renderEditor() {
71
- const e = l`<cv-code-editor
72
- @code-change="${this.handleCodeChange}"
73
- @editor-focus="${() => this.setEditorFocus(!0)}"
74
- @editor-blur="${() => this.setEditorFocus(!1)}"
75
- .code="${this.code}"
76
- .language="${this.language}"
77
- .options="${this.editorOptions}"
78
- ></cv-code-editor>`, o = l`<cv-typography class="output" scale="body1">
79
- <slot name="output"></slot>
80
- </cv-typography>`;
81
- return l`${this.showEditor ? e : ""}${!this.showEditor && this.language === "markdown" || this.language !== "markdown" ? o : ""}`;
79
+ const e = this.selected ? c`<cv-code-editor
80
+ @code-change="${this.handleCodeChange}"
81
+ @editor-focus="${() => this.setEditorFocus(!0)}"
82
+ @editor-blur="${() => this.setEditorFocus(!1)}"
83
+ .code="${this.code}"
84
+ .language="${this.language}"
85
+ .options="${this.editorOptions}"
86
+ ></cv-code-editor>` : c`<cv-code-snippet hideHeader .language="${this.language}"
87
+ >${this.code}</cv-code-snippet
88
+ >`, o = c`<slot name="error"></slot>
89
+ <cv-typography class="output" scale="body1">
90
+ <slot name="output"></slot>
91
+ <slot name="input"></slot>
92
+ </cv-typography>`;
93
+ return c`${this.showEditor ? e : ""}${!this.showEditor && this.language === "markdown" || this.language !== "markdown" ? o : ""}`;
82
94
  }
83
95
  render() {
84
96
  const e = {
@@ -86,49 +98,49 @@ let t = class extends h {
86
98
  selected: this.selected,
87
99
  focused: this._editorFocused
88
100
  };
89
- return l`
90
- <div class="${v(e)}">
101
+ return c`
102
+ <div class="${g(e)}">
91
103
  <span class="selection-indicator"></span>
92
104
  <div class="cellWrapper">
93
105
  <div class="cellCodeWrapper">
94
106
  <span class="timesExecuted">
95
- ${this.showEditor ? l`[${this.timesExecuted === 0 ? " " : this.timesExecuted}]:` : ""}
107
+ ${this.showEditor ? c`[${this.timesExecuted ? this.timesExecuted : " "}]:` : ""}
96
108
  </span>
97
- <div class="editor-output-wrapper">${this.renderEditor()}</div>
109
+ <div class="cellOutputWrapper">${this.renderEditor()}</div>
98
110
  </div>
99
111
  </div>
100
112
  </div>
101
113
  `;
102
114
  }
103
115
  };
104
- t.styles = [
116
+ i.styles = [
105
117
  p`
106
- ${u(f)}
118
+ ${h(v)}
107
119
  `
108
120
  ];
109
121
  s([
110
- d({ type: Number })
111
- ], t.prototype, "index", 2);
122
+ l({ type: Number })
123
+ ], i.prototype, "index", 2);
112
124
  s([
113
- d({ type: String })
114
- ], t.prototype, "code", 2);
125
+ l({ type: String })
126
+ ], i.prototype, "code", 2);
115
127
  s([
116
- d({ type: String })
117
- ], t.prototype, "language", 2);
128
+ l({ type: String })
129
+ ], i.prototype, "language", 2);
118
130
  s([
119
- d({ type: Boolean, reflect: !0 })
120
- ], t.prototype, "selected", 2);
131
+ l({ type: Boolean, reflect: !0 })
132
+ ], i.prototype, "selected", 2);
121
133
  s([
122
- d({ type: Number })
123
- ], t.prototype, "timesExecuted", 2);
134
+ l({ type: Number })
135
+ ], i.prototype, "timesExecuted", 2);
124
136
  s([
125
- d({ type: Boolean, reflect: !0 })
126
- ], t.prototype, "showEditor", 2);
127
- t = s([
137
+ l({ type: Boolean, reflect: !0 })
138
+ ], i.prototype, "showEditor", 2);
139
+ i = s([
128
140
  m("cv-cell")
129
- ], t);
130
- const L = t;
141
+ ], i);
142
+ const I = i;
131
143
  export {
132
- t as CovalentCell,
133
- L as default
144
+ i as CovalentCell,
145
+ I as default
134
146
  };
@@ -31,15 +31,15 @@ export declare class CovalentCodeEditor extends LitElement {
31
31
  private getLang;
32
32
  private getTheme;
33
33
  private isDark;
34
- setValue(value: string): void;
35
- getValue(): string | undefined;
34
+ private setTheme;
36
35
  adjustHeight(): void;
37
36
  createEditor(container: HTMLElement): void;
38
- onModelChange(): void;
39
37
  firstUpdated(): void;
40
- updated(changedProperties: PropertyValues): void;
38
+ getValue(): string | undefined;
39
+ onModelChange(): void;
41
40
  render(): import("lit-html").TemplateResult<1>;
42
- private _setTheme;
41
+ setValue(value: string): void;
42
+ updated(changedProperties: PropertyValues): void;
43
43
  disconnectedCallback(): void;
44
44
  }
45
45
  declare global {
@@ -1 +1 @@
1
- {"version":3,"file":"code-editor.d.ts","sourceRoot":"","sources":["../../../../libs/components/src/code-editor/code-editor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,UAAU,EAAE,cAAc,EAAa,MAAM,KAAK,CAAC;AAOvE,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAGxC,qBACa,kBAAmB,SAAQ,UAAU;IAChD;;OAEG;IACH,OAAO,CAAC,SAAS,CAAiC;IAClD;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,CAAC,qBAAqB,CAAC;IAC7C;;OAEG;IACS,KAAK,CAAC,EAAE,MAAM,CAAC;IAC3B;;OAEG;IACS,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC9B;;OAEG;IACS,IAAI,CAAC,EAAE,MAAM,CAAC;IAC1B;;OAEG;IACyB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,CAAC,cAAc,GAChE,MAAM,CAAC,MAAM,CAAC,oBAAoB,CAAC;IAErC,MAAM,CAAC,MAAM,4BAIX;IAEF,OAAO,CAAC,OAAO;IAKf,OAAO,CAAC,OAAO;IAOf,OAAO,CAAC,OAAO;IAQf,OAAO,CAAC,QAAQ;IAMhB,OAAO,CAAC,MAAM;IAOd,QAAQ,CAAC,KAAK,EAAE,MAAM;IAItB,QAAQ;IAKR,YAAY;IAQZ,YAAY,CAAC,SAAS,EAAE,WAAW;IAoBnC,aAAa;IAab,YAAY;IAmCZ,OAAO,CAAC,iBAAiB,EAAE,cAAc;IAezC,MAAM;IAIN,OAAO,CAAC,SAAS,CAEf;IAEO,oBAAoB,IAAI,IAAI;CAKtC;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,gBAAgB,EAAE,kBAAkB,CAAC;KACtC;CACF;AAED,eAAe,kBAAkB,CAAC"}
1
+ {"version":3,"file":"code-editor.d.ts","sourceRoot":"","sources":["../../../../libs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