@covalent/components 8.15.0-beta.1 → 8.15.0-beta.10

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 (160) hide show
  1. package/cell/cell.d.ts +7 -0
  2. package/cell/cell.d.ts.map +1 -1
  3. package/cell.js +21 -17
  4. package/cell.mjs +64 -46
  5. package/code-editor/code-editor.d.ts +30 -8
  6. package/code-editor/code-editor.d.ts.map +1 -1
  7. package/code-editor-3a09cbf1.js +732 -0
  8. package/{code-editor-383a8fae.mjs → code-editor-ce557bd5.mjs} +14372 -47270
  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/{html-d9124a1e.js → html-4fffc46e.js} +1 -1
  14. package/{html-a95df2b1.mjs → html-783f1e7c.mjs} +1 -1
  15. package/index.js +1 -1
  16. package/index.mjs +1 -1
  17. package/{javascript-0226b3a0.mjs → javascript-4d09cd3c.mjs} +2 -2
  18. package/{javascript-ec698494.js → javascript-90bb18e6.js} +1 -1
  19. package/notebook/notebook.d.ts +54 -16
  20. package/notebook/notebook.d.ts.map +1 -1
  21. package/notebook.js +75 -44
  22. package/notebook.mjs +926 -784
  23. package/package.json +1 -1
  24. package/{python-7770f129.mjs → python-562f8e9b.mjs} +1 -1
  25. package/{python-c7862f06.js → python-af3aad7d.js} +1 -1
  26. package/select.js +1 -1
  27. package/select.mjs +1 -1
  28. package/style.css +1 -1
  29. package/{typescript-eb2ab867.js → typescript-76d039b3.js} +1 -1
  30. package/{typescript-37d9bf54.mjs → typescript-a2a5d6b2.mjs} +1 -1
  31. package/{xml-9970ffe1.mjs → xml-89571455.mjs} +1 -1
  32. package/{xml-349a9a42.js → xml-e66929d0.js} +1 -1
  33. package/{yaml-837b2090.js → yaml-11a91e71.js} +1 -1
  34. package/{yaml-167e3d82.mjs → yaml-4eccd122.mjs} +1 -1
  35. package/abap-1354785f.mjs +0 -1314
  36. package/abap-c7187853.js +0 -6
  37. package/apex-279d4f27.mjs +0 -315
  38. package/apex-fc5f2b3e.js +0 -6
  39. package/assets/css.worker-1af1972f.js +0 -84
  40. package/assets/editor.worker-df55e1ff.js +0 -8
  41. package/assets/html.worker-38c267f1.js +0 -456
  42. package/assets/json.worker-bf861c27.js +0 -39
  43. package/assets/ts.worker-e151483b.js +0 -33972
  44. package/azcli-ba812c55.mjs +0 -74
  45. package/azcli-eb191d91.js +0 -6
  46. package/bat-34d38df4.js +0 -6
  47. package/bat-4d77495d.mjs +0 -95
  48. package/bicep-7b240724.mjs +0 -108
  49. package/bicep-a8264e77.js +0 -7
  50. package/cameligo-5d2daeb8.mjs +0 -168
  51. package/cameligo-6e71c8f3.js +0 -6
  52. package/clojure-355adae1.js +0 -6
  53. package/clojure-b7ea12a3.mjs +0 -754
  54. package/code-editor-4cce5e5d.js +0 -1200
  55. package/coffee-1a8cfbf4.mjs +0 -228
  56. package/coffee-fd8a7421.js +0 -6
  57. package/csp-54919de0.js +0 -6
  58. package/csp-96407af0.mjs +0 -57
  59. package/cssMode-821261c4.js +0 -9
  60. package/cssMode-9b89f9af.mjs +0 -1450
  61. package/cypher-11e5a4b6.mjs +0 -262
  62. package/cypher-cc849b67.js +0 -6
  63. package/dockerfile-2f8684f7.js +0 -6
  64. package/dockerfile-8739cff7.mjs +0 -132
  65. package/ecl-68a6f20f.js +0 -6
  66. package/ecl-a20c5155.mjs +0 -454
  67. package/elixir-32cc668e.js +0 -6
  68. package/elixir-8b028584.mjs +0 -467
  69. package/flow9-0dea2e73.mjs +0 -141
  70. package/flow9-1d2ab5f6.js +0 -6
  71. package/freemarker2-4fc0d2e6.mjs +0 -648
  72. package/freemarker2-7095cbc4.js +0 -8
  73. package/fsharp-49a70fad.mjs +0 -210
  74. package/fsharp-a22f5013.js +0 -6
  75. package/graphql-1a14eb34.js +0 -6
  76. package/graphql-51a577e5.mjs +0 -141
  77. package/handlebars-6a356ce9.js +0 -6
  78. package/handlebars-82c24f9d.mjs +0 -396
  79. package/hcl-0833427e.js +0 -6
  80. package/hcl-56b85754.mjs +0 -177
  81. package/htmlMode-3946317b.js +0 -9
  82. package/htmlMode-45fac07b.mjs +0 -1460
  83. package/ini-1d58d82f.mjs +0 -68
  84. package/ini-34a929df.js +0 -6
  85. package/jsonMode-a8e45f39.js +0 -11
  86. package/jsonMode-bdcd2ed9.mjs +0 -1871
  87. package/julia-7db1fb9a.js +0 -6
  88. package/julia-a0caf483.mjs +0 -496
  89. package/less-5219eae1.js +0 -7
  90. package/less-718543b4.mjs +0 -168
  91. package/lexon-5e6e7a44.mjs +0 -151
  92. package/lexon-dfd683ab.js +0 -6
  93. package/liquid-2dc745b6.mjs +0 -243
  94. package/liquid-b6e2effe.js +0 -6
  95. package/m3-87473279.js +0 -6
  96. package/m3-aadaf771.mjs +0 -210
  97. package/mips-161e49ce.mjs +0 -194
  98. package/mips-82a1ce59.js +0 -6
  99. package/msdax-b3b5017e.js +0 -6
  100. package/msdax-f65cb1e6.mjs +0 -377
  101. package/mysql-24549dd1.mjs +0 -875
  102. package/mysql-69f1c589.js +0 -6
  103. package/objective-c-c8319b65.js +0 -6
  104. package/objective-c-e129a5ca.mjs +0 -188
  105. package/pascal-4ccdf5ce.mjs +0 -245
  106. package/pascal-e5207a08.js +0 -6
  107. package/pascaligo-8eb79945.js +0 -6
  108. package/pascaligo-a9603dcd.mjs +0 -158
  109. package/perl-ba1fb97a.mjs +0 -599
  110. package/perl-e8264c91.js +0 -6
  111. package/pgsql-89978310.mjs +0 -843
  112. package/pgsql-c8ba6faf.js +0 -6
  113. package/pla-96c2695d.mjs +0 -131
  114. package/pla-c85b0e59.js +0 -6
  115. package/postiats-3c2c478e.js +0 -6
  116. package/postiats-7b52ebac.mjs +0 -544
  117. package/powerquery-8954ec26.mjs +0 -890
  118. package/powerquery-b0d5f9e4.js +0 -6
  119. package/powershell-cdb88123.js +0 -6
  120. package/powershell-f00d0274.mjs +0 -233
  121. package/protobuf-3eb85f80.mjs +0 -422
  122. package/protobuf-a3b2ca94.js +0 -7
  123. package/pug-6fab415a.mjs +0 -393
  124. package/pug-c5df821d.js +0 -6
  125. package/qsharp-4792f872.mjs +0 -282
  126. package/qsharp-7eddb7b9.js +0 -6
  127. package/razor-3871ef20.mjs +0 -517
  128. package/razor-4a6a11b1.js +0 -6
  129. package/redis-0d0a89dd.js +0 -6
  130. package/redis-276b8288.mjs +0 -298
  131. package/redshift-520a7359.mjs +0 -806
  132. package/redshift-b6bdaeca.js +0 -6
  133. package/restructuredtext-4676a3fc.mjs +0 -162
  134. package/restructuredtext-c83d56ed.js +0 -6
  135. package/ruby-764137cd.mjs +0 -444
  136. package/ruby-96103dcf.js +0 -6
  137. package/sb-8c22f14c.mjs +0 -110
  138. package/sb-e2701210.js +0 -6
  139. package/scheme-b9cbf7cb.js +0 -6
  140. package/scheme-e6a52cb0.mjs +0 -114
  141. package/scss-45104c77.mjs +0 -244
  142. package/scss-d0f4f80e.js +0 -8
  143. package/solidity-d4979008.mjs +0 -1351
  144. package/solidity-f1319e8a.js +0 -6
  145. package/sophia-21995caf.mjs +0 -190
  146. package/sophia-a1ce907f.js +0 -6
  147. package/sparql-5088743c.mjs +0 -193
  148. package/sparql-98d9e092.js +0 -6
  149. package/st-122893c4.js +0 -6
  150. package/st-fa9ab362.mjs +0 -414
  151. package/systemverilog-8139818b.js +0 -6
  152. package/systemverilog-a4f858ed.mjs +0 -556
  153. package/tcl-8adf937f.mjs +0 -232
  154. package/tcl-e49fed0b.js +0 -6
  155. package/tsMode-426fdb34.mjs +0 -794
  156. package/tsMode-9087ec29.js +0 -16
  157. package/twig-404eb73e.mjs +0 -323
  158. package/twig-4bfb5b04.js +0 -6
  159. package/vb-8dfd000c.js +0 -6
  160. package/vb-e21e8153.mjs +0 -364
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 {
@@ -45,6 +46,12 @@ export declare class CovalentCell extends LitElement {
45
46
  lineDecorationsWidth: number;
46
47
  lineNumbersMinChars: number;
47
48
  renderLineHighlight: string;
49
+ overviewRulerLanes: number;
50
+ hideCursorInOverviewRuler: boolean;
51
+ scrollbar: {
52
+ alwaysConsumeMouseWheel: boolean;
53
+ vertical: string;
54
+ };
48
55
  };
49
56
  static styles: import("lit").CSSResult[];
50
57
  handleCodeChange(e: CustomEvent): void;
@@ -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,SAAS,EAAE,YAAY,CAAC;KACzB;CACF;AAMD,qBACa,YAAa,SAAQ,UAAU;IAC1C;;OAEG;IAEH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IAEH,IAAI,SAAM;IAEV;;OAEG;IAEH,QAAQ,SAAM;IAEd;;OAEG;IAEH,QAAQ,UAAS;IAEjB;;OAEG;IAEH,aAAa,SAAK;IAElB;;OAEG;IAEH,UAAU,CAAC,sBAAQ;IAEnB,cAAc,UAAS;IAEvB,aAAa;;;;;;;;;;;;MAUX;IAEF,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;IAUnD,YAAY;IAqBZ,SAAS,CAAC,MAAM;CAwBjB;AAED,eAAe,YAAY,CAAC"}
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;AAKvE,OAAO,4BAA4B,CAAC;AACpC,OAAO,8BAA8B,CAAC;AACtC,OAAO,4BAA4B,CAAC;AACpC,OAAO,0BAA0B,CAAC;AAElC,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,SAAS,EAAE,YAAY,CAAC;KACzB;CACF;AAMD,qBACa,YAAa,SAAQ,UAAU;IAC1C;;OAEG;IAEH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IAEH,IAAI,SAAM;IAEV;;OAEG;IAEH,QAAQ,SAAM;IAEd;;OAEG;IAEH,QAAQ,UAAS;IAEjB;;OAEG;IAEH,aAAa,SAAK;IAElB;;OAEG;IAEH,UAAU,CAAC,sBAAQ;IAEnB,cAAc,UAAS;IAEvB,aAAa;;;;;;;;;;;;;;;;;;MAgBX;IAEF,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-4cce5e5d.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);height:100%;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,o)=>{for(var r=o>1?void 0:o?h(e,i):e,d=n.length-1,c;d>=0;d--)(c=n[d])&&(r=(o?c(e,i,r):c(r))||r);return o&&r&&p(e,i,r),r};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"}}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 o=(i=this.shadowRoot)==null?void 0:i.querySelector("cv-code-editor");o&&(o.code=this.code,o.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`
12
- <div class="${a.o(e)}">
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"),d=require("./class-map-0a4c6ca9.js");require("./code-editor-3a09cbf1.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;min-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:calc(100% - 96px)}.output{margin:.75rem .25rem .5rem;max-width:100%}
2
+ `;var p=Object.defineProperty,h=Object.getOwnPropertyDescriptor,s=(a,e,r,o)=>{for(var t=o>1?void 0:o?h(e,r):e,l=a.length-1,c;l>=0;l--)(c=a[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:{alwaysConsumeMouseWheel:!1,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`
16
+ <div class="${d.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 c, 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-383a8fae.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-ce557bd5.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);height:100%;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;min-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:calc(100% - 96px)}.output{margin:.75rem .25rem .5rem;max-width:100%}
21
24
  `;
22
- var g = Object.defineProperty, y = Object.getOwnPropertyDescriptor, s = (e, o, i, l) => {
23
- for (var r = l > 1 ? void 0 : l ? y(o, i) : o, a = e.length - 1, n; a >= 0; a--)
24
- (n = e[a]) && (r = (l ? n(o, i, r) : n(r)) || r);
25
- return l && 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 },
@@ -37,7 +40,13 @@ let t = class extends h {
37
40
  lineNumbers: "off",
38
41
  lineDecorationsWidth: 0,
39
42
  lineNumbersMinChars: 0,
40
- renderLineHighlight: "none"
43
+ renderLineHighlight: "none",
44
+ overviewRulerLanes: 0,
45
+ hideCursorInOverviewRuler: !0,
46
+ scrollbar: {
47
+ alwaysConsumeMouseWheel: !1,
48
+ vertical: "hidden"
49
+ }
41
50
  };
42
51
  }
43
52
  handleCodeChange(e) {
@@ -56,23 +65,32 @@ let t = class extends h {
56
65
  this._editorFocused = e, this.requestUpdate();
57
66
  }
58
67
  updated(e) {
59
- var o;
68
+ var o, d;
60
69
  if (e.has("code") || e.has("language")) {
61
- const i = (o = this.shadowRoot) == null ? void 0 : o.querySelector("cv-code-editor");
62
- i && (i.code = this.code, i.language = this.language);
70
+ const r = (o = this.shadowRoot) == null ? void 0 : o.querySelector("cv-code-editor");
71
+ if (r)
72
+ r.code = this.code, r.language = this.language;
73
+ else {
74
+ const t = (d = this.shadowRoot) == null ? void 0 : d.querySelector("cv-code-snippet");
75
+ t && !this.selected && (t.language = this.language);
76
+ }
63
77
  }
64
78
  }
65
79
  renderEditor() {
66
- const e = c`<cv-code-editor
67
- @code-change="${this.handleCodeChange}"
68
- @editor-focus="${() => this.setEditorFocus(!0)}"
69
- @editor-blur="${() => this.setEditorFocus(!1)}"
70
- .code="${this.code}"
71
- .language="${this.language}"
72
- .options="${this.editorOptions}"
73
- ></cv-code-editor>`, o = c`<cv-typography class="output" scale="body1">
74
- <slot name="output"></slot>
75
- </cv-typography>`;
80
+ const e = this.selected ? c`<cv-code-editor
81
+ @code-change="${this.handleCodeChange}"
82
+ @editor-focus="${() => this.setEditorFocus(!0)}"
83
+ @editor-blur="${() => this.setEditorFocus(!1)}"
84
+ .code="${this.code}"
85
+ .language="${this.language}"
86
+ .options="${this.editorOptions}"
87
+ ></cv-code-editor>` : c`<cv-code-snippet hideHeader .language="${this.language}"
88
+ >${this.code}</cv-code-snippet
89
+ >`, o = c`<slot name="error"></slot>
90
+ <cv-typography class="output" scale="body1">
91
+ <slot name="output"></slot>
92
+ <slot name="input"></slot>
93
+ </cv-typography>`;
76
94
  return c`${this.showEditor ? e : ""}${!this.showEditor && this.language === "markdown" || this.language !== "markdown" ? o : ""}`;
77
95
  }
78
96
  render() {
@@ -82,48 +100,48 @@ let t = class extends h {
82
100
  focused: this._editorFocused
83
101
  };
84
102
  return c`
85
- <div class="${v(e)}">
103
+ <div class="${g(e)}">
86
104
  <span class="selection-indicator"></span>
87
105
  <div class="cellWrapper">
88
106
  <div class="cellCodeWrapper">
89
107
  <span class="timesExecuted">
90
- ${this.showEditor ? c`[${this.timesExecuted === 0 ? " " : this.timesExecuted}]:` : ""}
108
+ ${this.showEditor ? c`[${this.timesExecuted ? this.timesExecuted : " "}]:` : ""}
91
109
  </span>
92
- <div class="editor-output-wrapper">${this.renderEditor()}</div>
110
+ <div class="cellOutputWrapper">${this.renderEditor()}</div>
93
111
  </div>
94
112
  </div>
95
113
  </div>
96
114
  `;
97
115
  }
98
116
  };
99
- t.styles = [
117
+ i.styles = [
100
118
  p`
101
- ${u(f)}
119
+ ${h(v)}
102
120
  `
103
121
  ];
104
122
  s([
105
- d({ type: Number })
106
- ], t.prototype, "index", 2);
123
+ l({ type: Number })
124
+ ], i.prototype, "index", 2);
107
125
  s([
108
- d({ type: String })
109
- ], t.prototype, "code", 2);
126
+ l({ type: String })
127
+ ], i.prototype, "code", 2);
110
128
  s([
111
- d({ type: String })
112
- ], t.prototype, "language", 2);
129
+ l({ type: String })
130
+ ], i.prototype, "language", 2);
113
131
  s([
114
- d({ type: Boolean, reflect: !0 })
115
- ], t.prototype, "selected", 2);
132
+ l({ type: Boolean, reflect: !0 })
133
+ ], i.prototype, "selected", 2);
116
134
  s([
117
- d({ type: Number })
118
- ], t.prototype, "timesExecuted", 2);
135
+ l({ type: Number })
136
+ ], i.prototype, "timesExecuted", 2);
119
137
  s([
120
- d({ type: Boolean, reflect: !0 })
121
- ], t.prototype, "showEditor", 2);
122
- t = s([
138
+ l({ type: Boolean, reflect: !0 })
139
+ ], i.prototype, "showEditor", 2);
140
+ i = s([
123
141
  m("cv-cell")
124
- ], t);
125
- const R = t;
142
+ ], i);
143
+ const I = i;
126
144
  export {
127
- t as CovalentCell,
128
- R as default
145
+ i as CovalentCell,
146
+ I as default
129
147
  };
@@ -1,5 +1,27 @@
1
1
  import { LitElement, PropertyValues } from 'lit';
2
- import * as monaco from 'monaco-editor';
2
+ import { editor } from 'monaco-editor/esm/vs/editor/editor.api.js';
3
+ import 'monaco-editor/esm/vs/basic-languages/html/html.contribution';
4
+ import 'monaco-editor/esm/vs/basic-languages/css/css.contribution';
5
+ import 'monaco-editor/esm/vs/basic-languages/javascript/javascript.contribution';
6
+ import 'monaco-editor/esm/vs/basic-languages/typescript/typescript.contribution';
7
+ import 'monaco-editor/esm/vs/basic-languages/python/python.contribution';
8
+ import 'monaco-editor/esm/vs/basic-languages/java/java.contribution';
9
+ import 'monaco-editor/esm/vs/basic-languages/csharp/csharp.contribution';
10
+ import 'monaco-editor/esm/vs/basic-languages/sql/sql.contribution';
11
+ import 'monaco-editor/esm/vs/basic-languages/yaml/yaml.contribution';
12
+ import 'monaco-editor/esm/vs/basic-languages/xml/xml.contribution';
13
+ import 'monaco-editor/esm/vs/basic-languages/markdown/markdown.contribution';
14
+ import 'monaco-editor/esm/vs/basic-languages/shell/shell.contribution';
15
+ import 'monaco-editor/esm/vs/basic-languages/go/go.contribution';
16
+ import 'monaco-editor/esm/vs/basic-languages/r/r.contribution';
17
+ import 'monaco-editor/esm/vs/basic-languages/cpp/cpp.contribution';
18
+ import 'monaco-editor/esm/vs/basic-languages/rust/rust.contribution';
19
+ import 'monaco-editor/esm/vs/basic-languages/kotlin/kotlin.contribution';
20
+ import 'monaco-editor/esm/vs/basic-languages/swift/swift.contribution';
21
+ import 'monaco-editor/esm/vs/basic-languages/lua/lua.contribution';
22
+ import 'monaco-editor/esm/vs/basic-languages/scala/scala.contribution';
23
+ import 'monaco-editor/esm/vs/basic-languages/dart/dart.contribution';
24
+ import 'monaco-editor/esm/vs/basic-languages/php/php.contribution';
3
25
  export declare class CovalentCodeEditor extends LitElement {
4
26
  /**
5
27
  * The container where editor will be created
@@ -8,7 +30,7 @@ export declare class CovalentCodeEditor extends LitElement {
8
30
  /**
9
31
  * Editor instance
10
32
  */
11
- editor?: monaco.editor.IStandaloneCodeEditor;
33
+ editor?: editor.IStandaloneCodeEditor;
12
34
  /**
13
35
  * Theme of the editor
14
36
  */
@@ -24,22 +46,22 @@ export declare class CovalentCodeEditor extends LitElement {
24
46
  /**
25
47
  * Options that can be ste for the editor
26
48
  */
27
- options?: monaco.editor.IEditorOptions & monaco.editor.IGlobalEditorOptions;
49
+ options?: editor.IEditorOptions & editor.IGlobalEditorOptions;
28
50
  static styles: import("lit").CSSResult[];
29
51
  private getFile;
30
52
  private getCode;
31
53
  private getLang;
32
54
  private getTheme;
33
55
  private isDark;
34
- setValue(value: string): void;
35
- getValue(): string | undefined;
56
+ private setTheme;
36
57
  adjustHeight(): void;
37
58
  createEditor(container: HTMLElement): void;
38
- onModelChange(): void;
39
59
  firstUpdated(): void;
40
- updated(changedProperties: PropertyValues): void;
60
+ getValue(): string | undefined;
61
+ onModelChange(): void;
41
62
  render(): import("lit-html").TemplateResult<1>;
42
- private _setTheme;
63
+ setValue(value: string): void;
64
+ updated(changedProperties: PropertyValues): void;
43
65
  disconnectedCallback(): void;
44
66
  }
45
67
  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;AAgCxC,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;IAmBnC,aAAa;IAcb,YAAY;IA8BZ,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/components/src/code-editor/code-editor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,UAAU,EAAE,cAAc,EAAa,MAAM,KAAK,CAAC;AAOvE,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AAInE,OAAO,6DAA6D,CAAC;AACrE,OAAO,2DAA2D,CAAC;AACnE,OAAO,yEAAyE,CAAC;AACjF,OAAO,yEAAyE,CAAC;AACjF,OAAO,iEAAiE,CAAC;AACzE,OAAO,6DAA6D,CAAC;AACrE,OAAO,iEAAiE,CAAC;AACzE,OAAO,2DAA2D,CAAC;AACnE,OAAO,6DAA6D,CAAC;AACrE,OAAO,2DAA2D,CAAC;AACnE,OAAO,qEAAqE,CAAC;AAC7E,OAAO,+DAA+D,CAAC;AACvE,OAAO,yDAAyD,CAAC;AACjE,OAAO,uDAAuD,CAAC;AAC/D,OAAO,2DAA2D,CAAC;AACnE,OAAO,6DAA6D,CAAC;AACrE,OAAO,iEAAiE,CAAC;AACzE,OAAO,+DAA+D,CAAC;AACvE,OAAO,2DAA2D,CAAC;AACnE,OAAO,+DAA+D,CAAC;AACvE,OAAO,6DAA6D,CAAC;AACrE,OAAO,2DAA2D,CAAC;AAEnE,qBACa,kBAAmB,SAAQ,UAAU;IAChD;;OAEG;IACH,OAAO,CAAC,SAAS,CAAiC;IAClD;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC,qBAAqB,CAAC;IACtC;;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,cAAc,GACzD,MAAM,CAAC,oBAAoB,CAAC;IAE9B,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,OAAO,CAAC,QAAQ,CAEd;IAEF,YAAY;IAQZ,YAAY,CAAC,SAAS,EAAE,WAAW;IAqBnC,YAAY;IAmCZ,QAAQ;IAKR,aAAa;IAab,MAAM;IAIN,QAAQ,CAAC,KAAK,EAAE,MAAM;IAItB,OAAO,CAAC,iBAAiB,EAAE,cAAc;IAehC,oBAAoB,IAAI,IAAI;CAKtC;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,gBAAgB,EAAE,kBAAkB,CAAC;KACtC;CACF;AAED,eAAe,kBAAkB,CAAC"}