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

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 (155) 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 +28 -6
  6. package/code-editor/code-editor.d.ts.map +1 -1
  7. package/code-editor-3a09cbf1.js +732 -0
  8. package/{code-editor-49ed0cc2.mjs → code-editor-ce557bd5.mjs} +14367 -47248
  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-2b6bfaf8.js → html-4fffc46e.js} +1 -1
  14. package/{html-8da5188a.mjs → html-783f1e7c.mjs} +1 -1
  15. package/index.js +1 -1
  16. package/index.mjs +1 -1
  17. package/{javascript-f014ee80.mjs → javascript-4d09cd3c.mjs} +2 -2
  18. package/{javascript-4d528a27.js → javascript-90bb18e6.js} +1 -1
  19. package/notebook/notebook.d.ts +51 -19
  20. package/notebook/notebook.d.ts.map +1 -1
  21. package/notebook.js +61 -33
  22. package/notebook.mjs +890 -779
  23. package/package.json +1 -1
  24. package/{python-5e3b4914.mjs → python-562f8e9b.mjs} +1 -1
  25. package/{python-1c6f39ab.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-6490ca2e.js → typescript-76d039b3.js} +1 -1
  30. package/{typescript-ba89d39f.mjs → typescript-a2a5d6b2.mjs} +1 -1
  31. package/{xml-2a05d02d.mjs → xml-89571455.mjs} +1 -1
  32. package/{xml-ed522294.js → xml-e66929d0.js} +1 -1
  33. package/{yaml-e520529c.js → yaml-11a91e71.js} +1 -1
  34. package/{yaml-b1226770.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/azcli-ba812c55.mjs +0 -74
  40. package/azcli-eb191d91.js +0 -6
  41. package/bat-34d38df4.js +0 -6
  42. package/bat-4d77495d.mjs +0 -95
  43. package/bicep-7b240724.mjs +0 -108
  44. package/bicep-a8264e77.js +0 -7
  45. package/cameligo-5d2daeb8.mjs +0 -168
  46. package/cameligo-6e71c8f3.js +0 -6
  47. package/clojure-355adae1.js +0 -6
  48. package/clojure-b7ea12a3.mjs +0 -754
  49. package/code-editor-7e7e4197.js +0 -1200
  50. package/coffee-1a8cfbf4.mjs +0 -228
  51. package/coffee-fd8a7421.js +0 -6
  52. package/csp-54919de0.js +0 -6
  53. package/csp-96407af0.mjs +0 -57
  54. package/cssMode-117dc70a.mjs +0 -1450
  55. package/cssMode-9f32fcf1.js +0 -9
  56. package/cypher-11e5a4b6.mjs +0 -262
  57. package/cypher-cc849b67.js +0 -6
  58. package/dockerfile-2f8684f7.js +0 -6
  59. package/dockerfile-8739cff7.mjs +0 -132
  60. package/ecl-68a6f20f.js +0 -6
  61. package/ecl-a20c5155.mjs +0 -454
  62. package/elixir-32cc668e.js +0 -6
  63. package/elixir-8b028584.mjs +0 -467
  64. package/flow9-0dea2e73.mjs +0 -141
  65. package/flow9-1d2ab5f6.js +0 -6
  66. package/freemarker2-22c962f2.js +0 -8
  67. package/freemarker2-a368c7af.mjs +0 -648
  68. package/fsharp-49a70fad.mjs +0 -210
  69. package/fsharp-a22f5013.js +0 -6
  70. package/graphql-1a14eb34.js +0 -6
  71. package/graphql-51a577e5.mjs +0 -141
  72. package/handlebars-8cfb10a2.mjs +0 -396
  73. package/handlebars-a97e1ef4.js +0 -6
  74. package/hcl-0833427e.js +0 -6
  75. package/hcl-56b85754.mjs +0 -177
  76. package/htmlMode-789c7165.mjs +0 -1460
  77. package/htmlMode-b3001f86.js +0 -9
  78. package/ini-1d58d82f.mjs +0 -68
  79. package/ini-34a929df.js +0 -6
  80. package/jsonMode-071e521b.mjs +0 -1871
  81. package/jsonMode-1db13325.js +0 -11
  82. package/julia-7db1fb9a.js +0 -6
  83. package/julia-a0caf483.mjs +0 -496
  84. package/less-5219eae1.js +0 -7
  85. package/less-718543b4.mjs +0 -168
  86. package/lexon-5e6e7a44.mjs +0 -151
  87. package/lexon-dfd683ab.js +0 -6
  88. package/liquid-7723b12b.js +0 -6
  89. package/liquid-f8017dc6.mjs +0 -243
  90. package/m3-87473279.js +0 -6
  91. package/m3-aadaf771.mjs +0 -210
  92. package/mips-161e49ce.mjs +0 -194
  93. package/mips-82a1ce59.js +0 -6
  94. package/msdax-b3b5017e.js +0 -6
  95. package/msdax-f65cb1e6.mjs +0 -377
  96. package/mysql-24549dd1.mjs +0 -875
  97. package/mysql-69f1c589.js +0 -6
  98. package/objective-c-c8319b65.js +0 -6
  99. package/objective-c-e129a5ca.mjs +0 -188
  100. package/pascal-4ccdf5ce.mjs +0 -245
  101. package/pascal-e5207a08.js +0 -6
  102. package/pascaligo-8eb79945.js +0 -6
  103. package/pascaligo-a9603dcd.mjs +0 -158
  104. package/perl-ba1fb97a.mjs +0 -599
  105. package/perl-e8264c91.js +0 -6
  106. package/pgsql-89978310.mjs +0 -843
  107. package/pgsql-c8ba6faf.js +0 -6
  108. package/pla-96c2695d.mjs +0 -131
  109. package/pla-c85b0e59.js +0 -6
  110. package/postiats-3c2c478e.js +0 -6
  111. package/postiats-7b52ebac.mjs +0 -544
  112. package/powerquery-8954ec26.mjs +0 -890
  113. package/powerquery-b0d5f9e4.js +0 -6
  114. package/powershell-cdb88123.js +0 -6
  115. package/powershell-f00d0274.mjs +0 -233
  116. package/protobuf-3eb85f80.mjs +0 -422
  117. package/protobuf-a3b2ca94.js +0 -7
  118. package/pug-6fab415a.mjs +0 -393
  119. package/pug-c5df821d.js +0 -6
  120. package/qsharp-4792f872.mjs +0 -282
  121. package/qsharp-7eddb7b9.js +0 -6
  122. package/razor-2ce3ee94.mjs +0 -517
  123. package/razor-bc0cba40.js +0 -6
  124. package/redis-0d0a89dd.js +0 -6
  125. package/redis-276b8288.mjs +0 -298
  126. package/redshift-520a7359.mjs +0 -806
  127. package/redshift-b6bdaeca.js +0 -6
  128. package/restructuredtext-4676a3fc.mjs +0 -162
  129. package/restructuredtext-c83d56ed.js +0 -6
  130. package/ruby-764137cd.mjs +0 -444
  131. package/ruby-96103dcf.js +0 -6
  132. package/sb-8c22f14c.mjs +0 -110
  133. package/sb-e2701210.js +0 -6
  134. package/scheme-b9cbf7cb.js +0 -6
  135. package/scheme-e6a52cb0.mjs +0 -114
  136. package/scss-45104c77.mjs +0 -244
  137. package/scss-d0f4f80e.js +0 -8
  138. package/solidity-d4979008.mjs +0 -1351
  139. package/solidity-f1319e8a.js +0 -6
  140. package/sophia-21995caf.mjs +0 -190
  141. package/sophia-a1ce907f.js +0 -6
  142. package/sparql-5088743c.mjs +0 -193
  143. package/sparql-98d9e092.js +0 -6
  144. package/st-122893c4.js +0 -6
  145. package/st-fa9ab362.mjs +0 -414
  146. package/systemverilog-8139818b.js +0 -6
  147. package/systemverilog-a4f858ed.mjs +0 -556
  148. package/tcl-8adf937f.mjs +0 -232
  149. package/tcl-e49fed0b.js +0 -6
  150. package/tsMode-a8318df7.mjs +0 -794
  151. package/tsMode-fc73b7ce.js +0 -16
  152. package/twig-404eb73e.mjs +0 -323
  153. package/twig-4bfb5b04.js +0 -6
  154. package/vb-8dfd000c.js +0 -6
  155. 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 {
@@ -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;;;;;;;;;;;;;;;;;MAeX;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;;;;;;;;;;;;;;;;;MAeX;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-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-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;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-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);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
  };
@@ -1,5 +1,27 @@
1
1
  import { LitElement, PropertyValues } from 'lit';
2
- import * as monaco from 'monaco-editor';
2
+ import * as monaco 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
@@ -31,15 +53,15 @@ export declare class CovalentCodeEditor extends LitElement {
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;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/components/src/code-editor/code-editor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,UAAU,EAAE,cAAc,EAAa,MAAM,KAAK,CAAC;AAOvE,OAAO,KAAK,MAAM,MAAM,2CAA2C,CAAC;AAIpE,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,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,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"}