@darajs/components 1.14.2 → 1.14.3
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/dist/dara_components-1.14.3-py3-none-any.whl +0 -0
- package/dist/smart/code-editor.d.ts +1 -0
- package/dist/smart/code-editor.d.ts.map +1 -1
- package/dist/smart/code-editor.js +1 -1
- package/dist/smart/code-editor.js.map +1 -1
- package/dist/umd/dara.components.umd.js +18303 -11088
- package/package.json +13 -13
- package/dist/dara_components-1.14.2-py3-none-any.whl +0 -0
|
Binary file
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { StyledComponentProps, Variable } from '@darajs/core';
|
|
2
2
|
interface CodeEditorProps extends StyledComponentProps {
|
|
3
3
|
script: Variable<string>;
|
|
4
|
+
language?: 'json' | 'python' | 'markdown' | 'sql';
|
|
4
5
|
}
|
|
5
6
|
/**
|
|
6
7
|
* A component that creates a CodeEditor. The script is stored in a variable and is updated
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"code-editor.d.ts","sourceRoot":"","sources":["../../js/smart/code-editor.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,QAAQ,EAA8C,MAAM,cAAc,CAAC;AAG1G,UAAU,eAAgB,SAAQ,oBAAoB;IAClD,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"code-editor.d.ts","sourceRoot":"","sources":["../../js/smart/code-editor.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,QAAQ,EAA8C,MAAM,cAAc,CAAC;AAG1G,UAAU,eAAgB,SAAQ,oBAAoB;IAClD,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,UAAU,GAAG,KAAK,CAAC;CACrD;AAID;;;GAGG;AACH,iBAAS,UAAU,CAAC,KAAK,EAAE,eAAe,GAAG,GAAG,CAAC,OAAO,CAavD;AAED,eAAe,UAAU,CAAC"}
|
|
@@ -9,7 +9,7 @@ const StyledCodeEditor = injectCss(UICodeEditor);
|
|
|
9
9
|
function CodeEditor(props) {
|
|
10
10
|
const [style, css] = useComponentStyles(props);
|
|
11
11
|
const [script, setScript] = useVariable(props.script);
|
|
12
|
-
return _jsx(StyledCodeEditor, { "$rawCss": css, initialScript: script, onChange: setScript, style: style });
|
|
12
|
+
return (_jsx(StyledCodeEditor, { "$rawCss": css, initialScript: script, onChange: setScript, style: style, language: props.language }));
|
|
13
13
|
}
|
|
14
14
|
export default CodeEditor;
|
|
15
15
|
//# sourceMappingURL=code-editor.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"code-editor.js","sourceRoot":"","sources":["../../js/smart/code-editor.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAkC,SAAS,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC1G,OAAO,EAAE,UAAU,IAAI,YAAY,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"code-editor.js","sourceRoot":"","sources":["../../js/smart/code-editor.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAkC,SAAS,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC1G,OAAO,EAAE,UAAU,IAAI,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAOpE,MAAM,gBAAgB,GAAG,SAAS,CAAC,YAAY,CAAC,CAAC;AAEjD;;;GAGG;AACH,SAAS,UAAU,CAAC,KAAsB;IACtC,MAAM,CAAC,KAAK,EAAE,GAAG,CAAC,GAAG,kBAAkB,CAAC,KAAK,CAAC,CAAC;IAC/C,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,WAAW,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAEtD,OAAO,CACH,KAAC,gBAAgB,eACJ,GAAG,EACZ,aAAa,EAAE,MAAM,EACrB,QAAQ,EAAE,SAAS,EACnB,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,KAAK,CAAC,QAAQ,GAC1B,CACL,CAAC;AACN,CAAC;AAED,eAAe,UAAU,CAAC"}
|