@covalent/components 8.15.0-beta.11 → 8.15.0-beta.12
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/index.d.ts +1 -1
- package/index.d.ts.map +1 -1
- package/index.js +1 -1
- package/index.mjs +18 -18
- package/notebook/notebook.d.ts +7 -3
- package/notebook/notebook.d.ts.map +1 -1
- package/{cell/cell.d.ts → notebook-cell/notebook-cell.d.ts} +4 -4
- package/notebook-cell/notebook-cell.d.ts.map +1 -0
- package/notebook-cell.js +29 -0
- package/{cell.mjs → notebook-cell.mjs} +23 -19
- package/notebook.js +36 -20
- package/notebook.mjs +338 -304
- package/package.json +5 -5
- package/cell/cell.d.ts.map +0 -1
- package/cell.js +0 -25
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@covalent/components",
|
3
|
-
"version": "8.15.0-beta.
|
3
|
+
"version": "8.15.0-beta.12",
|
4
4
|
"description": "a catalog of material components for covalent",
|
5
5
|
"main": "./index.js",
|
6
6
|
"module": "./index.mjs",
|
@@ -41,10 +41,10 @@
|
|
41
41
|
"import": "./button.mjs",
|
42
42
|
"require": "./button.js"
|
43
43
|
},
|
44
|
-
"./cell": {
|
45
|
-
"types": "./cell/cell.d.ts",
|
46
|
-
"import": "./cell.mjs",
|
47
|
-
"require": "./cell.js"
|
44
|
+
"./notebook-cell": {
|
45
|
+
"types": "./notebook-cell/notebook-cell.d.ts",
|
46
|
+
"import": "./notebook-cell.mjs",
|
47
|
+
"require": "./notebook-cell.js"
|
48
48
|
},
|
49
49
|
"./checkbox": {
|
50
50
|
"types": "./checkbox/checkbox.d.ts",
|
package/cell/cell.d.ts.map
DELETED
@@ -1 +0,0 @@
|
|
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,OAAO,UAAS;IAEhB;;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;IAgBnD,YAAY;IA2BZ,oBAAoB;IAYpB,SAAS,CAAC,MAAM;CAgBjB;AAED,eAAe,YAAY,CAAC"}
|
package/cell.js
DELETED
@@ -1,25 +0,0 @@
|
|
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"),c=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}cv-code-editor{margin-top:-1px}.selectionIndicator{background-color:var(--cv-theme-primary);border-radius:2px;margin-top:2px;visibility:hidden;min-width:8px}.timesExecuted{color:var(--cv-theme-outline-variant);display:inline-flex;font-family:var(--mdc-typography-body2-font-family);font-size:var(--mdc-typography-body2-font-size);justify-content:end;line-height:var(--mdc-typography-body2-line-height);padding:0 .75rem;min-width:8%;max-width:8%}.timesExecuted .executionCount{box-sizing:border-box;display:inline-block;max-width:70%;padding:0 2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.timesExecuted .loading{font-size:var(--mdc-typography-headline6-font-size);position:relative;top:.275rem}.cell{box-sizing:border-box;display:flex;justify-content:space-between}.cell:hover .selectionIndicator,.cell.focused .selectionIndicator,.cell.selected .selectionIndicator{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;width:calc(100% - 8px)}.cellOutputWrapper{max-width:90%;min-width:90%}.output{margin:.75rem .25rem .5rem;max-width:100%}
|
2
|
-
`;var p=Object.defineProperty,h=Object.getOwnPropertyDescriptor,r=(d,e,o,s)=>{for(var i=s>1?void 0:s?h(e,o):e,n=d.length-1,a;n>=0;n--)(a=d[n])&&(i=(s?a(e,o,i):a(i))||i);return s&&i&&p(e,o,i),i};exports.CovalentCell=class extends t.s{constructor(){super(...arguments),this.code="",this.language="",this.loading=!1,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 o,s;if(e.has("code")||e.has("language")){const i=(o=this.shadowRoot)==null?void 0:o.querySelector("cv-code-editor");if(i)i.code=this.code,i.language=this.language;else{const n=(s=this.shadowRoot)==null?void 0:s.querySelector("cv-code-snippet");n&&!this.selected&&n.highlight()}}super.updated(e)}renderEditor(){const e=this.selected?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>`:t.x`<cv-code-snippet hideHeader .language="${this.language}"
|
10
|
-
>${this.code}</cv-code-snippet
|
11
|
-
>`,o=t.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 t.x`${this.showEditor?e:""}${!this.showEditor&&this.language==="markdown"||this.language!=="markdown"?o:""}`}renderExecutionCount(){let e=t.x` `;return this.showEditor&&(this.loading?e=t.x`<span class="loading">*</span>`:this.timesExecuted&&(e=t.x`${this.timesExecuted}`)),t.x`[<span class="executionCount">${e}</span>] :`}render(){const e={cell:!0,selected:this.selected,focused:this._editorFocused};return t.x`
|
16
|
-
<div class="${c.o(e)}">
|
17
|
-
<span class="selectionIndicator"></span>
|
18
|
-
<div class="cellCodeWrapper">
|
19
|
-
<span class="timesExecuted">${this.renderExecutionCount()}</span>
|
20
|
-
<div class="cellOutputWrapper">${this.renderEditor()}</div>
|
21
|
-
</div>
|
22
|
-
</div>
|
23
|
-
`}};exports.CovalentCell.styles=[t.i`
|
24
|
-
${t.r(u)}
|
25
|
-
`];r([l.n({type:Number})],exports.CovalentCell.prototype,"index",2);r([l.n({type:String})],exports.CovalentCell.prototype,"code",2);r([l.n({type:String})],exports.CovalentCell.prototype,"language",2);r([l.n({type:Boolean,reflect:!0})],exports.CovalentCell.prototype,"loading",2);r([l.n({type:Boolean,reflect:!0})],exports.CovalentCell.prototype,"selected",2);r([l.n({type:Number})],exports.CovalentCell.prototype,"timesExecuted",2);r([l.n({type:Boolean,reflect:!0})],exports.CovalentCell.prototype,"showEditor",2);exports.CovalentCell=r([t.e("cv-cell")],exports.CovalentCell);const v=exports.CovalentCell;exports.default=v;
|