docusaurus-live-brython 3.0.0-beta.8 → 3.0.1

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 (175) hide show
  1. package/.devcontainer/devcontainer.json +38 -0
  2. package/.prettierignore +17 -0
  3. package/.prettierrc +9 -8
  4. package/CHANGELOG.md +5 -0
  5. package/README.md +7 -4
  6. package/lib/assets/py_back_trace.py +2 -1
  7. package/lib/index.d.ts +1 -7
  8. package/lib/index.d.ts.map +1 -0
  9. package/lib/index.js +94 -16
  10. package/lib/options.d.ts +1 -0
  11. package/lib/options.d.ts.map +1 -0
  12. package/lib/options.js +2 -2
  13. package/lib/theme/CodeBlock/index.d.ts +3 -3
  14. package/lib/theme/CodeBlock/index.d.ts.map +1 -0
  15. package/lib/theme/CodeBlock/index.jsx +24 -14
  16. package/lib/theme/CodeEditor/Actions/DownloadCode.d.ts +1 -0
  17. package/lib/theme/CodeEditor/Actions/DownloadCode.d.ts.map +1 -0
  18. package/lib/theme/CodeEditor/Actions/DownloadCode.jsx +8 -8
  19. package/lib/theme/CodeEditor/Actions/Reset.d.ts +1 -0
  20. package/lib/theme/CodeEditor/Actions/Reset.d.ts.map +1 -0
  21. package/lib/theme/CodeEditor/Actions/Reset.jsx +5 -5
  22. package/lib/theme/CodeEditor/Actions/RunCode.d.ts +2 -1
  23. package/lib/theme/CodeEditor/Actions/RunCode.d.ts.map +1 -0
  24. package/lib/theme/CodeEditor/Actions/RunCode.jsx +4 -4
  25. package/lib/theme/CodeEditor/Actions/ShowRaw.d.ts +1 -0
  26. package/lib/theme/CodeEditor/Actions/ShowRaw.d.ts.map +1 -0
  27. package/lib/theme/CodeEditor/Actions/ShowRaw.jsx +13 -7
  28. package/lib/theme/CodeEditor/Actions/ShowSyncStatus.d.ts +1 -0
  29. package/lib/theme/CodeEditor/Actions/ShowSyncStatus.d.ts.map +1 -0
  30. package/lib/theme/CodeEditor/Actions/ShowSyncStatus.jsx +21 -16
  31. package/lib/theme/CodeEditor/Actions/styles.module.css +2 -3
  32. package/lib/theme/CodeEditor/BrythonCommunicator.d.ts +2 -1
  33. package/lib/theme/CodeEditor/BrythonCommunicator.d.ts.map +1 -0
  34. package/lib/theme/CodeEditor/BrythonCommunicator.jsx +13 -9
  35. package/lib/theme/CodeEditor/Button/index.d.ts +3 -2
  36. package/lib/theme/CodeEditor/Button/index.d.ts.map +1 -0
  37. package/lib/theme/CodeEditor/Button/index.jsx +1 -1
  38. package/lib/theme/CodeEditor/Button/styles.module.css +1 -1
  39. package/lib/theme/CodeEditor/CodeHistory/index.d.ts +1 -0
  40. package/lib/theme/CodeEditor/CodeHistory/index.d.ts.map +1 -0
  41. package/lib/theme/CodeEditor/CodeHistory/index.jsx +26 -15
  42. package/lib/theme/CodeEditor/CodeHistory/styles.module.css +31 -31
  43. package/lib/theme/CodeEditor/ContextEditor/index.d.ts +22 -0
  44. package/lib/theme/CodeEditor/ContextEditor/index.d.ts.map +1 -0
  45. package/lib/theme/CodeEditor/ContextEditor/index.jsx +36 -0
  46. package/lib/theme/CodeEditor/Editor/EditorAce.d.ts +2 -1
  47. package/lib/theme/CodeEditor/Editor/EditorAce.d.ts.map +1 -0
  48. package/lib/theme/CodeEditor/Editor/EditorAce.jsx +17 -14
  49. package/lib/theme/CodeEditor/Editor/Header/index.d.ts +2 -1
  50. package/lib/theme/CodeEditor/Editor/Header/index.d.ts.map +1 -0
  51. package/lib/theme/CodeEditor/Editor/Header/index.jsx +12 -12
  52. package/lib/theme/CodeEditor/Editor/Header/styles.module.css +7 -7
  53. package/lib/theme/CodeEditor/Editor/HiddenCode/index.d.ts +8 -0
  54. package/lib/theme/CodeEditor/Editor/HiddenCode/index.d.ts.map +1 -0
  55. package/lib/theme/CodeEditor/Editor/HiddenCode/index.jsx +27 -0
  56. package/lib/theme/CodeEditor/Editor/HiddenCode/styles.module.css +52 -0
  57. package/lib/theme/CodeEditor/Editor/Result/Graphics/Canvas.d.ts +1 -0
  58. package/lib/theme/CodeEditor/Editor/Result/Graphics/Canvas.d.ts.map +1 -0
  59. package/lib/theme/CodeEditor/Editor/Result/Graphics/Canvas.jsx +8 -9
  60. package/lib/theme/CodeEditor/Editor/Result/Graphics/Turtle.d.ts +1 -0
  61. package/lib/theme/CodeEditor/Editor/Result/Graphics/Turtle.d.ts.map +1 -0
  62. package/lib/theme/CodeEditor/Editor/Result/Graphics/Turtle.jsx +11 -11
  63. package/lib/theme/CodeEditor/Editor/Result/Graphics/index.d.ts +4 -3
  64. package/lib/theme/CodeEditor/Editor/Result/Graphics/index.d.ts.map +1 -0
  65. package/lib/theme/CodeEditor/Editor/Result/Graphics/index.jsx +12 -10
  66. package/lib/theme/CodeEditor/Editor/Result/Graphics/styles.module.css +2 -2
  67. package/lib/theme/CodeEditor/Editor/Result/index.d.ts +2 -3
  68. package/lib/theme/CodeEditor/Editor/Result/index.d.ts.map +1 -0
  69. package/lib/theme/CodeEditor/Editor/Result/index.jsx +6 -9
  70. package/lib/theme/CodeEditor/Editor/Result/styles.module.css +15 -10
  71. package/lib/theme/CodeEditor/Editor/index.d.ts +6 -3
  72. package/lib/theme/CodeEditor/Editor/index.d.ts.map +1 -0
  73. package/lib/theme/CodeEditor/Editor/index.jsx +34 -28
  74. package/lib/theme/CodeEditor/Editor/styles.module.css +15 -7
  75. package/lib/theme/CodeEditor/Editor/utils/checkForButtonClick.d.ts +1 -0
  76. package/lib/theme/CodeEditor/Editor/utils/checkForButtonClick.d.ts.map +1 -0
  77. package/lib/theme/CodeEditor/Editor/utils/saveSvg.d.ts +1 -0
  78. package/lib/theme/CodeEditor/Editor/utils/saveSvg.d.ts.map +1 -0
  79. package/lib/theme/CodeEditor/Editor/utils/saveSvg.js +19 -8
  80. package/lib/theme/CodeEditor/Editor/utils/svgWithoutAnimations.d.ts +1 -0
  81. package/lib/theme/CodeEditor/Editor/utils/svgWithoutAnimations.d.ts.map +1 -0
  82. package/lib/theme/CodeEditor/Editor/utils/svgWithoutAnimations.js +43 -49
  83. package/lib/theme/CodeEditor/Icon/icons.d.ts +4 -1
  84. package/lib/theme/CodeEditor/Icon/icons.d.ts.map +1 -0
  85. package/lib/theme/CodeEditor/Icon/icons.js +3 -1
  86. package/lib/theme/CodeEditor/Icon/index.d.ts +4 -2
  87. package/lib/theme/CodeEditor/Icon/index.d.ts.map +1 -0
  88. package/lib/theme/CodeEditor/Icon/index.jsx +10 -3
  89. package/lib/theme/CodeEditor/Icon/styles.module.css +1 -1
  90. package/lib/theme/CodeEditor/WithScript/ScriptContext.d.ts +8 -0
  91. package/lib/theme/CodeEditor/WithScript/ScriptContext.d.ts.map +1 -0
  92. package/lib/theme/CodeEditor/WithScript/ScriptContext.jsx +27 -0
  93. package/lib/theme/CodeEditor/WithScript/Storage.d.ts +2 -1
  94. package/lib/theme/CodeEditor/WithScript/Storage.d.ts.map +1 -0
  95. package/lib/theme/CodeEditor/WithScript/Types.d.ts +12 -4
  96. package/lib/theme/CodeEditor/WithScript/Types.d.ts.map +1 -0
  97. package/lib/theme/CodeEditor/WithScript/bryRunner.d.ts +3 -0
  98. package/lib/theme/CodeEditor/WithScript/bryRunner.d.ts.map +1 -0
  99. package/lib/theme/CodeEditor/WithScript/bryRunner.js +29 -0
  100. package/lib/theme/CodeEditor/WithScript/createStore.d.ts +4 -0
  101. package/lib/theme/CodeEditor/WithScript/createStore.d.ts.map +1 -0
  102. package/lib/theme/CodeEditor/WithScript/{Store.jsx → createStore.js} +62 -74
  103. package/lib/theme/CodeEditor/WithScript/helpers.d.ts +1 -4
  104. package/lib/theme/CodeEditor/WithScript/helpers.d.ts.map +1 -0
  105. package/lib/theme/CodeEditor/WithScript/helpers.js +4 -14
  106. package/lib/theme/CodeEditor/constants.d.ts +1 -0
  107. package/lib/theme/CodeEditor/constants.d.ts.map +1 -0
  108. package/lib/theme/CodeEditor/hooks/index.d.ts +3 -0
  109. package/lib/theme/CodeEditor/hooks/index.d.ts.map +1 -0
  110. package/lib/theme/CodeEditor/hooks/index.js +2 -0
  111. package/lib/theme/CodeEditor/hooks/useScript.d.ts +3 -0
  112. package/lib/theme/CodeEditor/hooks/useScript.d.ts.map +1 -0
  113. package/lib/theme/CodeEditor/hooks/useScript.js +4 -0
  114. package/lib/theme/CodeEditor/hooks/useStore.d.ts +3 -0
  115. package/lib/theme/CodeEditor/hooks/useStore.d.ts.map +1 -0
  116. package/lib/theme/CodeEditor/hooks/useStore.js +10 -0
  117. package/lib/theme/CodeEditor/index.d.ts +24 -5
  118. package/lib/theme/CodeEditor/index.d.ts.map +1 -0
  119. package/lib/theme/CodeEditor/index.jsx +17 -16
  120. package/lib/theme/CodeEditor/styles.module.css +28 -30
  121. package/og-image.md +23 -0
  122. package/package.json +39 -20
  123. package/src/assets/py_back_trace.py +2 -1
  124. package/src/index.ts +96 -25
  125. package/src/options.ts +12 -12
  126. package/src/theme/CodeBlock/index.tsx +44 -68
  127. package/src/theme/CodeEditor/Actions/DownloadCode.tsx +23 -22
  128. package/src/theme/CodeEditor/Actions/Reset.tsx +14 -12
  129. package/src/theme/CodeEditor/Actions/RunCode.tsx +14 -11
  130. package/src/theme/CodeEditor/Actions/ShowRaw.tsx +17 -11
  131. package/src/theme/CodeEditor/Actions/ShowSyncStatus.tsx +32 -27
  132. package/src/theme/CodeEditor/Actions/styles.module.css +2 -3
  133. package/src/theme/CodeEditor/BrythonCommunicator.tsx +16 -19
  134. package/src/theme/CodeEditor/Button/index.tsx +17 -13
  135. package/src/theme/CodeEditor/Button/styles.module.css +1 -1
  136. package/src/theme/CodeEditor/CodeHistory/index.tsx +32 -20
  137. package/src/theme/CodeEditor/CodeHistory/styles.module.css +31 -31
  138. package/src/theme/CodeEditor/ContextEditor/index.tsx +74 -0
  139. package/src/theme/CodeEditor/Editor/EditorAce.tsx +20 -16
  140. package/src/theme/CodeEditor/Editor/Header/index.tsx +13 -19
  141. package/src/theme/CodeEditor/Editor/Header/styles.module.css +7 -7
  142. package/src/theme/CodeEditor/Editor/HiddenCode/index.tsx +49 -0
  143. package/src/theme/CodeEditor/Editor/HiddenCode/styles.module.css +52 -0
  144. package/src/theme/CodeEditor/Editor/Result/Graphics/Canvas.tsx +25 -22
  145. package/src/theme/CodeEditor/Editor/Result/Graphics/Turtle.tsx +23 -19
  146. package/src/theme/CodeEditor/Editor/Result/Graphics/index.tsx +16 -16
  147. package/src/theme/CodeEditor/Editor/Result/Graphics/styles.module.css +2 -2
  148. package/src/theme/CodeEditor/Editor/Result/index.tsx +7 -13
  149. package/src/theme/CodeEditor/Editor/Result/styles.module.css +15 -10
  150. package/src/theme/CodeEditor/Editor/index.tsx +67 -65
  151. package/src/theme/CodeEditor/Editor/styles.module.css +15 -7
  152. package/src/theme/CodeEditor/Editor/utils/checkForButtonClick.ts +5 -5
  153. package/src/theme/CodeEditor/Editor/utils/saveSvg.ts +63 -53
  154. package/src/theme/CodeEditor/Editor/utils/svgWithoutAnimations.ts +182 -201
  155. package/src/theme/CodeEditor/Icon/icons.ts +27 -13
  156. package/src/theme/CodeEditor/Icon/index.tsx +31 -11
  157. package/src/theme/CodeEditor/Icon/styles.module.css +1 -1
  158. package/src/theme/CodeEditor/WithScript/ScriptContext.tsx +36 -0
  159. package/src/theme/CodeEditor/WithScript/Storage.ts +3 -3
  160. package/src/theme/CodeEditor/WithScript/Types.ts +17 -11
  161. package/src/theme/CodeEditor/WithScript/bryRunner.ts +39 -0
  162. package/src/theme/CodeEditor/WithScript/createStore.ts +276 -0
  163. package/src/theme/CodeEditor/WithScript/helpers.ts +16 -26
  164. package/src/theme/CodeEditor/constants.ts +9 -11
  165. package/src/theme/CodeEditor/hooks/index.ts +2 -0
  166. package/src/theme/CodeEditor/hooks/useScript.ts +9 -0
  167. package/src/theme/CodeEditor/hooks/useStore.ts +15 -0
  168. package/src/theme/CodeEditor/index.tsx +45 -31
  169. package/src/theme/CodeEditor/styles.module.css +28 -30
  170. package/src/typings.d.ts +11 -0
  171. package/lib/theme/CodeEditor/WithScript/Store.d.ts +0 -15
  172. package/lib/types.d.ts +0 -28
  173. package/lib/types.js +0 -1
  174. package/src/theme/CodeEditor/WithScript/Store.tsx +0 -294
  175. package/src/types.ts +0 -29
@@ -9,6 +9,5 @@
9
9
  }
10
10
 
11
11
  html[data-theme='dark'] .runCode {
12
- color: white
13
- }
14
-
12
+ color: white;
13
+ }
@@ -1,3 +1,4 @@
1
- import * as React from "react";
1
+ import * as React from 'react';
2
2
  declare const BrythonCommunicator: () => React.JSX.Element;
3
3
  export default BrythonCommunicator;
4
+ //# sourceMappingURL=BrythonCommunicator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BrythonCommunicator.d.ts","sourceRoot":"","sources":["../../../src/theme/CodeEditor/BrythonCommunicator.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,QAAA,MAAM,mBAAmB,yBAsCxB,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
@@ -1,9 +1,9 @@
1
- import * as React from "react";
2
- import { BRYTHON_NOTIFICATION_EVENT, DOM_ELEMENT_IDS } from "docusaurus-live-brython/theme/CodeEditor/constants";
3
- import { useScript, useStore } from 'docusaurus-live-brython/theme/CodeEditor/WithScript/Store';
1
+ import * as React from 'react';
2
+ import { BRYTHON_NOTIFICATION_EVENT, DOM_ELEMENT_IDS } from '@theme/CodeEditor/constants';
3
+ import { useStore, useScript } from '@theme/CodeEditor/hooks';
4
4
  const BrythonCommunicator = () => {
5
- const { store } = useScript();
6
- const codeId = useStore(store, (state) => state.codeId);
5
+ const store = useStore();
6
+ const codeId = useScript(store, 'codeId');
7
7
  const ref = React.useRef(null);
8
8
  React.useEffect(() => {
9
9
  const { current } = ref;
@@ -14,15 +14,19 @@ const BrythonCommunicator = () => {
14
14
  if (event.detail) {
15
15
  const data = event.detail;
16
16
  switch (data.type) {
17
- case "start":
17
+ case 'start':
18
18
  store.clearLogMessages();
19
19
  store.setExecuting(true);
20
20
  break;
21
- case "done":
21
+ case 'done':
22
22
  store.setExecuting(false);
23
23
  break;
24
24
  default:
25
- store.addLogMessage(data);
25
+ store.addLogMessage({
26
+ type: data.type,
27
+ output: data.output,
28
+ timeStamp: data.timeStamp
29
+ });
26
30
  break;
27
31
  }
28
32
  }
@@ -32,6 +36,6 @@ const BrythonCommunicator = () => {
32
36
  current.removeEventListener(BRYTHON_NOTIFICATION_EVENT, onBryNotify);
33
37
  };
34
38
  }, [ref, store]);
35
- return (<div id={DOM_ELEMENT_IDS.communicator(codeId)} ref={ref}></div>);
39
+ return <div id={DOM_ELEMENT_IDS.communicator(codeId)} ref={ref}></div>;
36
40
  };
37
41
  export default BrythonCommunicator;
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import * as Icons from 'docusaurus-live-brython/theme/CodeEditor/Icon/icons';
2
+ import * as Icons from '@theme/CodeEditor/Icon/icons';
3
3
  export declare enum Color {
4
4
  Primary = "button--primary",
5
5
  Secondary = "button--secondary",
@@ -13,7 +13,7 @@ export declare enum Size {
13
13
  Small = "button--sm",
14
14
  Large = "button--lg"
15
15
  }
16
- interface Props {
16
+ export interface Props {
17
17
  icon: keyof typeof Icons;
18
18
  title?: string;
19
19
  onClick?: React.MouseEventHandler<HTMLButtonElement>;
@@ -25,3 +25,4 @@ interface Props {
25
25
  }
26
26
  declare const Button: (props: Props) => React.JSX.Element;
27
27
  export default Button;
28
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/theme/CodeEditor/Button/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,KAAK,MAAM,8BAA8B,CAAC;AAKtD,oBAAY,KAAK;IACb,OAAO,oBAAoB;IAC3B,SAAS,sBAAsB;IAC/B,OAAO,oBAAoB;IAC3B,IAAI,iBAAiB;IACrB,OAAO,oBAAoB;IAC3B,MAAM,mBAAmB;IACzB,IAAI,iBAAiB;CACxB;AACD,oBAAY,IAAI;IACZ,KAAK,eAAe;IACpB,KAAK,eAAe;CACvB;AAED,MAAM,WAAW,KAAK;IAClB,IAAI,EAAE,MAAM,OAAO,KAAK,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;IACrD,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,QAAA,MAAM,MAAM,GAAI,OAAO,KAAK,sBAqB3B,CAAC;AAEF,eAAe,MAAM,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import styles from './styles.module.css';
3
3
  import clsx from 'clsx';
4
- import Icon from 'docusaurus-live-brython/theme/CodeEditor/Icon';
4
+ import Icon from '@theme/CodeEditor/Icon';
5
5
  export var Color;
6
6
  (function (Color) {
7
7
  Color["Primary"] = "button--primary";
@@ -6,4 +6,4 @@
6
6
  cursor: pointer;
7
7
  margin: 0px 2px;
8
8
  padding: 4px 10px;
9
- }
9
+ }
@@ -2,3 +2,4 @@ import * as React from 'react';
2
2
  import 'rc-slider/assets/index.css';
3
3
  declare const CodeHistory: () => React.JSX.Element;
4
4
  export default CodeHistory;
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/theme/CodeEditor/CodeHistory/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,4BAA4B,CAAC;AAoBpC,QAAA,MAAM,WAAW,yBA2GhB,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -4,24 +4,24 @@ import styles from './styles.module.css';
4
4
  import { Prism } from 'prism-react-renderer';
5
5
  import Slider from 'rc-slider';
6
6
  import 'rc-slider/assets/index.css';
7
- import { useScript, useStore } from 'docusaurus-live-brython/theme/CodeEditor/WithScript/Store';
7
+ import { useStore, useScript } from '@theme/CodeEditor/hooks';
8
8
  import Translate, { translate } from '@docusaurus/Translate';
9
- import Button from 'docusaurus-live-brython/theme/CodeEditor/Button';
10
- import DiffViewer from 'react-diff-viewer';
9
+ import Button from '@theme/CodeEditor/Button';
10
+ import DiffViewer from 'react-diff-viewer-continued';
11
11
  import Details from '@theme/Details';
12
12
  const highlightSyntax = (str) => {
13
13
  if (!str) {
14
14
  return;
15
15
  }
16
16
  return (<span dangerouslySetInnerHTML={{
17
- __html: Prism.highlight(str, Prism.languages.python, 'python'),
17
+ __html: Prism.highlight(str, Prism.languages.python, 'python')
18
18
  }}/>);
19
19
  };
20
20
  const CodeHistory = () => {
21
21
  const [version, setVersion] = React.useState(1);
22
- const { store } = useScript();
23
- const versions = useStore(store, (state) => state.versions);
24
- const versionsLoaded = useStore(store, (state) => state.versionsLoaded);
22
+ const store = useStore();
23
+ const versions = useScript(store, 'versions');
24
+ const versionsLoaded = useScript(store, 'versionsLoaded');
25
25
  if (versions?.length < 2) {
26
26
  return null;
27
27
  }
@@ -30,11 +30,20 @@ const CodeHistory = () => {
30
30
  <div className={clsx(styles.summary)}>
31
31
  <span className="badge badge--secondary">
32
32
  {versionsLoaded
33
- ? translate({ message: '{n} Versions', id: 'CodeHistory.nVersions.text' }, { n: versions.length })
34
- : translate({ message: 'Load Versions', id: 'CodeHistory.LoadVersions.text' })}
33
+ ? translate({
34
+ message: '{n} Versions',
35
+ id: 'CodeHistory.nVersions.text'
36
+ }, { n: versions.length })
37
+ : translate({
38
+ message: 'Load Versions',
39
+ id: 'CodeHistory.LoadVersions.text'
40
+ })}
35
41
  </span>
36
42
  <span className={clsx(styles.spacer)}></span>
37
- <Button icon='Sync' title={translate({ message: 'Sync Versions', id: 'CodeHistory.LoadVersions.text' })} onClick={(e) => {
43
+ <Button icon="Sync" title={translate({
44
+ message: 'Sync Versions',
45
+ id: 'CodeHistory.LoadVersions.text'
46
+ })} onClick={(e) => {
38
47
  e.preventDefault();
39
48
  e.stopPropagation();
40
49
  store.loadVersions();
@@ -52,20 +61,22 @@ const CodeHistory = () => {
52
61
  }
53
62
  setVersion(c);
54
63
  }} min={1} max={versions.length - 1} dots={versions.length < 50}/>
55
- <span className="badge badge--primary">
56
- V{version}
57
- </span>
64
+ <span className="badge badge--primary">V{version}</span>
58
65
  </div>
59
66
  <div className={clsx(styles.diffViewer)}>
60
67
  {versions.length > 1 && (<DiffViewer splitView oldValue={versions[version - 1].code} newValue={versions[version].code} leftTitle={<div className={clsx(styles.diffHeader)}>
61
68
  {`V${version}`}
62
69
  {versions[version].pasted && (<span className={clsx('badge', 'badge--danger')}>
63
- <Translate id="CodeHistory.PastedBadge.Text">Pasted</Translate>
70
+ <Translate id="CodeHistory.PastedBadge.Text">
71
+ Pasted
72
+ </Translate>
64
73
  </span>)}
65
74
  </div>} rightTitle={<div className={clsx(styles.diffHeader)}>
66
75
  {`V${version}`}
67
76
  {versions[version].pasted && (<span className={clsx('badge', 'badge--danger')}>
68
- <Translate id="CodeHistory.PastedBadge.Text">Pasted</Translate>
77
+ <Translate id="CodeHistory.PastedBadge.Text">
78
+ Pasted
79
+ </Translate>
69
80
  </span>)}
70
81
  </div>} renderContent={highlightSyntax}/>)}
71
82
  </div>
@@ -1,54 +1,54 @@
1
- .codeHistory>.historyDetails {
2
- cursor: pointer;
3
- margin-bottom: 0;
4
- border-top-left-radius: 0;
5
- border-top-right-radius: 0;
1
+ .codeHistory > .historyDetails {
2
+ cursor: pointer;
3
+ margin-bottom: 0;
4
+ border-top-left-radius: 0;
5
+ border-top-right-radius: 0;
6
6
  }
7
7
  .summary {
8
- display: flex;
9
- align-items: center;
8
+ display: flex;
9
+ align-items: center;
10
10
  }
11
11
  .spacer {
12
- flex-grow: 1;
13
- flex-shrink: 1;
14
- flex-basis: 0;
15
- }
12
+ flex-grow: 1;
13
+ flex-shrink: 1;
14
+ flex-basis: 0;
15
+ }
16
16
 
17
17
  .versionControl {
18
- padding: 1em 2em;
19
- box-shadow: var(--ifm-global-shadow-lw);
20
- border-radius: var(--ifm-global-radius);
18
+ padding: 1em 2em;
19
+ box-shadow: var(--ifm-global-shadow-lw);
20
+ border-radius: var(--ifm-global-radius);
21
21
  }
22
22
 
23
23
  .faButton {
24
- margin-left: 1em;
24
+ margin-left: 1em;
25
25
  }
26
26
 
27
27
  .faButton:hover {
28
- transform: scale(1.2);
28
+ transform: scale(1.2);
29
29
  }
30
30
 
31
31
  .diffViewer {
32
- --ifm-pre-background: rgba(255, 255, 255, 0);
33
- --ifm-alert-background-color: rgba(255, 255, 255, 0);
34
- --ifm-alert-background-color-highlight: rgba(255, 255, 255, 0);
35
- --ifm-table-stripe-background: rgba(255, 255, 255, 0);
36
- font-family: monospace;
37
- overflow: auto;
32
+ --ifm-pre-background: rgba(255, 255, 255, 0);
33
+ --ifm-alert-background-color: rgba(255, 255, 255, 0);
34
+ --ifm-alert-background-color-highlight: rgba(255, 255, 255, 0);
35
+ --ifm-table-stripe-background: rgba(255, 255, 255, 0);
36
+ font-family: monospace;
37
+ overflow: auto;
38
38
  }
39
39
 
40
40
  .diffViewer table tbody tr td {
41
- padding-top: 0;
42
- padding-bottom: 0;
41
+ padding-top: 0;
42
+ padding-bottom: 0;
43
43
  }
44
44
 
45
45
  .diffViewer table tbody tr td pre {
46
- white-space: nowrap;
47
- padding-top: 0;
48
- padding-bottom: 0;
49
- line-height: 18px;
46
+ white-space: nowrap;
47
+ padding-top: 0;
48
+ padding-bottom: 0;
49
+ line-height: 18px;
50
50
  }
51
51
  .diffHeader {
52
- display: flex;
53
- justify-content: space-between;
54
- }
52
+ display: flex;
53
+ justify-content: space-between;
54
+ }
@@ -0,0 +1,22 @@
1
+ import React from 'react';
2
+ import { type MetaProps } from '@theme/CodeEditor';
3
+ interface Props extends MetaProps {
4
+ className?: string;
5
+ title?: string;
6
+ children: string | React.ReactNode;
7
+ onChange?: (code: string) => void;
8
+ }
9
+ export declare const splitCode: (rawCode: string) => {
10
+ pre: string;
11
+ code: string;
12
+ post: string;
13
+ };
14
+ /**
15
+ * Use this component when you want a working CodeEditor.
16
+ * The CodeEditor must be wrapped in a ScriptContext - this component does that.
17
+ * wraps it in a ScriptContext and initializes the CodeEditor with the given
18
+ * params.
19
+ */
20
+ declare const ContextEditor: (props: Props) => React.JSX.Element;
21
+ export default ContextEditor;
22
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/theme/CodeEditor/ContextEditor/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAmB,EAAE,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAI/D,UAAU,KAAM,SAAQ,SAAS;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;IACnC,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACrC;AAGD,eAAO,MAAM,SAAS,GAAI,SAAS,MAAM;;;;CAOxC,CAAC;AAEF;;;;;GAKG;AACH,QAAA,MAAM,aAAa,GAAI,OAAO,KAAK,sBA0ClC,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -0,0 +1,36 @@
1
+ import React from 'react';
2
+ import ExecutionEnvironment from '@docusaurus/ExecutionEnvironment';
3
+ import CodeEditor from '@theme/CodeEditor';
4
+ import ScriptContext from '@theme/CodeEditor/WithScript/ScriptContext';
5
+ import CodeBlock from '@theme/CodeBlock';
6
+ const SPLIT_CODE_REGEX = /^(?:(?<pre>.*?)\n###\s*PRE\s*)?(?<code>.*?)(?:\n###\s*POST\s*(?<post>.*))?$/s;
7
+ export const splitCode = (rawCode) => {
8
+ const { pre, code, post } = rawCode.replace(/\s*\n$/, '').match(SPLIT_CODE_REGEX).groups || {};
9
+ return {
10
+ pre: pre || '',
11
+ code: code || '',
12
+ post: post || ''
13
+ };
14
+ };
15
+ /**
16
+ * Use this component when you want a working CodeEditor.
17
+ * The CodeEditor must be wrapped in a ScriptContext - this component does that.
18
+ * wraps it in a ScriptContext and initializes the CodeEditor with the given
19
+ * params.
20
+ */
21
+ const ContextEditor = (props) => {
22
+ const langMatch = (props.className || '').match(/language-(?<lang>\w*)/);
23
+ let lang = langMatch?.groups?.lang?.toLocaleLowerCase() ?? '';
24
+ if (lang === 'py') {
25
+ lang = 'python';
26
+ }
27
+ if (ExecutionEnvironment.canUseDOM) {
28
+ const title = props.title || lang;
29
+ const { pre, code, post } = splitCode(props.children || '');
30
+ return (<ScriptContext id={props.id} lang={lang} title={title} code={code} preCode={pre} postCode={post} readonly={!!props.readonly} versioned={!!props.versioned}>
31
+ <CodeEditor code={code} lang={lang} preCode={pre} postCode={post} maxLines={props.maxLines && Number.parseInt(props.maxLines, 10)} readonly={!!props.readonly} resettable={!props.noReset} download={!props.versioned && !props.noDownload} slim={!!props.slim} showLineNumbers={!(!!props.slim && !/\n/.test(code))} versioned={!!props.versioned} noHistory={!!props.noHistory} noCompare={!!props.noCompare} title={title} className={props.className} onChange={props.onChange}/>
32
+ </ScriptContext>);
33
+ }
34
+ return <CodeBlock {...props}/>;
35
+ };
36
+ export default ContextEditor;
@@ -1,4 +1,3 @@
1
- /// <reference types="ace-builds/ace-modules" />
2
1
  import * as React from 'react';
3
2
  import 'ace-builds/src-noconflict/ext-searchbox';
4
3
  import 'ace-builds/src-noconflict/mode-python';
@@ -11,6 +10,8 @@ export interface Props {
11
10
  versioned?: boolean;
12
11
  showLineNumbers: boolean;
13
12
  maxLines?: number;
13
+ onChange?: (code: string) => void;
14
14
  }
15
15
  declare const EditorAce: (props: Props) => React.JSX.Element;
16
16
  export default EditorAce;
17
+ //# sourceMappingURL=EditorAce.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EditorAce.d.ts","sourceRoot":"","sources":["../../../../src/theme/CodeEditor/Editor/EditorAce.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,yCAAyC,CAAC;AACjD,OAAO,uCAAuC,CAAC;AAC/C,OAAO,oCAAoC,CAAC;AAC5C,OAAO,oCAAoC,CAAC;AAC5C,OAAO,yCAAyC,CAAC;AACjD,OAAO,8CAA8C,CAAC;AACtD,OAAO,6BAA6B,CAAC;AAKrC,MAAM,WAAW,KAAK;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,eAAe,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACrC;AAMD,QAAA,MAAM,SAAS,GAAI,OAAO,KAAK,sBA6F9B,CAAC;AACF,eAAe,SAAS,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import clsx from 'clsx';
3
3
  import styles from './styles.module.css';
4
- import { DOM_ELEMENT_IDS } from 'docusaurus-live-brython/theme/CodeEditor/constants';
4
+ import { DOM_ELEMENT_IDS } from '@theme/CodeEditor/constants';
5
5
  import AceEditor from 'react-ace';
6
6
  import 'ace-builds/src-noconflict/ext-searchbox';
7
7
  import 'ace-builds/src-noconflict/mode-python';
@@ -10,18 +10,18 @@ import 'ace-builds/src-noconflict/mode-svg';
10
10
  import 'ace-builds/src-noconflict/theme-dracula';
11
11
  import 'ace-builds/src-noconflict/ext-language_tools';
12
12
  import 'ace-builds/webpack-resolver';
13
- import { useScript, useStore } from 'docusaurus-live-brython/theme/CodeEditor/WithScript/Store';
13
+ import { useStore, useScript } from '@theme/CodeEditor/hooks';
14
14
  const ALIAS_LANG_MAP_ACE = {
15
- mpy: 'python',
15
+ mpy: 'python'
16
16
  };
17
17
  const EditorAce = (props) => {
18
18
  const eRef = React.useRef(null);
19
- const { store } = useScript();
20
- const code = useStore(store, (state) => state.code);
21
- const pristineCode = useStore(store, (state) => state.pristineCode);
22
- const lang = useStore(store, (state) => state.lang);
23
- const codeId = useStore(store, (state) => state.codeId);
24
- const showRaw = useStore(store, (state) => state.showRaw);
19
+ const store = useStore();
20
+ const code = useScript(store, 'code');
21
+ const pristineCode = useScript(store, 'pristineCode');
22
+ const lang = useScript(store, 'lang');
23
+ const codeId = useScript(store, 'codeId');
24
+ const showRaw = useScript(store, 'showRaw');
25
25
  React.useEffect(() => {
26
26
  if (eRef && eRef.current) {
27
27
  const node = eRef.current;
@@ -30,7 +30,7 @@ const EditorAce = (props) => {
30
30
  // commands is array of key bindings.
31
31
  name: 'execute',
32
32
  bindKey: { win: 'Ctrl-Enter', mac: 'Command-Enter' },
33
- exec: () => store.execScript(),
33
+ exec: () => store.execScript()
34
34
  });
35
35
  }
36
36
  node.editor.commands.addCommand({
@@ -39,7 +39,7 @@ const EditorAce = (props) => {
39
39
  bindKey: { win: 'Ctrl-s', mac: 'Command-s' },
40
40
  exec: () => {
41
41
  store.saveNow();
42
- },
42
+ }
43
43
  });
44
44
  return () => {
45
45
  if (node && node.editor) {
@@ -54,7 +54,7 @@ const EditorAce = (props) => {
54
54
  }
55
55
  };
56
56
  }
57
- }, [eRef, lang]);
57
+ }, [eRef, lang, store]);
58
58
  return (<div className={clsx(styles.editor)}>
59
59
  <AceEditor className={clsx(styles.brythonEditor, !props.showLineNumbers && styles.noGutter)} style={{
60
60
  width: '100%',
@@ -66,14 +66,17 @@ const EditorAce = (props) => {
66
66
  /**
67
67
  * Save immediately as pasted content
68
68
  */
69
- store.setState((s) => ({ ...s, isPasted: true }));
69
+ store.setIsPasted(true);
70
70
  }
71
71
  }} focus={false} navigateToFileEnd={false} maxLines={props.maxLines || 25} ref={eRef} mode={ALIAS_LANG_MAP_ACE[lang] ?? lang} theme="dracula" onChange={(value, e) => {
72
72
  store.setCode(value, e.action);
73
+ if (props.onChange) {
74
+ props.onChange(value);
75
+ }
73
76
  }} readOnly={showRaw} value={showRaw ? pristineCode : code} defaultValue={code || '\n'} name={DOM_ELEMENT_IDS.aceEditor(codeId)} editorProps={{ $blockScrolling: true }} setOptions={{
74
77
  displayIndentGuides: true,
75
78
  vScrollBarAlwaysVisible: false,
76
- highlightGutterLine: false,
79
+ highlightGutterLine: false
77
80
  }} showPrintMargin={false} highlightActiveLine={false} enableBasicAutocompletion enableLiveAutocompletion={false} enableSnippets={false} showGutter={props.showLineNumbers}/>
78
81
  </div>);
79
82
  };
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- interface Props {
2
+ export interface Props {
3
3
  slim: boolean;
4
4
  title: string;
5
5
  resettable: boolean;
@@ -8,3 +8,4 @@ interface Props {
8
8
  }
9
9
  declare const Header: (props: Props) => React.JSX.Element;
10
10
  export default Header;
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/theme/CodeEditor/Editor/Header/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAU/B,MAAM,WAAW,KAAK;IAClB,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;CACtB;AAED,QAAA,MAAM,MAAM,GAAI,OAAO,KAAK,sBAmB3B,CAAC;AAEF,eAAe,MAAM,CAAC"}
@@ -1,23 +1,23 @@
1
1
  import * as React from 'react';
2
2
  import clsx from 'clsx';
3
3
  import styles from './styles.module.css';
4
- import { useScript, useStore } from 'docusaurus-live-brython/theme/CodeEditor/WithScript/Store';
5
- import ShowSyncStatus from 'docusaurus-live-brython/theme/CodeEditor/Actions/ShowSyncStatus';
6
- import Reset from 'docusaurus-live-brython/theme/CodeEditor/Actions/Reset';
7
- import DownloadCode from 'docusaurus-live-brython/theme/CodeEditor/Actions/DownloadCode';
8
- import ShowRaw from 'docusaurus-live-brython/theme/CodeEditor/Actions/ShowRaw';
9
- import RunCode from 'docusaurus-live-brython/theme/CodeEditor/Actions/RunCode';
4
+ import { useStore, useScript } from '@theme/CodeEditor/hooks';
5
+ import ShowSyncStatus from '@theme/CodeEditor/Actions/ShowSyncStatus';
6
+ import Reset from '@theme/CodeEditor/Actions/Reset';
7
+ import DownloadCode from '@theme/CodeEditor/Actions/DownloadCode';
8
+ import ShowRaw from '@theme/CodeEditor/Actions/ShowRaw';
9
+ import RunCode from '@theme/CodeEditor/Actions/RunCode';
10
10
  const Header = (props) => {
11
- const { store } = useScript();
12
- const hasEdits = useStore(store, (state) => state.hasEdits);
13
- const lang = useStore(store, (state) => state.lang);
11
+ const store = useStore();
12
+ const hasEdits = useScript(store, 'hasEdits');
13
+ const lang = useScript(store, 'lang');
14
14
  return (<div className={clsx(styles.controls, props.slim && styles.slim)}>
15
15
  {!props.slim && (<React.Fragment>
16
16
  <div className={styles.title}>{props.title}</div>
17
17
  <ShowSyncStatus />
18
- {hasEdits && props.resettable && (<Reset />)}
19
- {props.download && (<DownloadCode title={props.title}/>)}
20
- {hasEdits && !props.noCompare && (<ShowRaw />)}
18
+ {hasEdits && props.resettable && <Reset />}
19
+ {props.download && <DownloadCode title={props.title}/>}
20
+ {hasEdits && !props.noCompare && <ShowRaw />}
21
21
  </React.Fragment>)}
22
22
  {lang === 'python' && <RunCode title={props.title} slim={props.slim}/>}
23
23
  </div>);
@@ -3,7 +3,7 @@
3
3
  display: flex;
4
4
  align-items: center;
5
5
  letter-spacing: 0.08em;
6
-
6
+
7
7
  z-index: calc(var(--ifm-z-index-fixed) - 2);
8
8
  padding: 0.2em;
9
9
  padding-left: 0.5em;
@@ -15,13 +15,13 @@
15
15
  }
16
16
 
17
17
  .controls > .title {
18
- flex-shrink: 1;
19
- flex-grow: 1;
20
- overflow-x: hidden;
21
- text-overflow: ellipsis;
22
- white-space: nowrap;
18
+ flex-shrink: 1;
19
+ flex-grow: 1;
20
+ overflow-x: hidden;
21
+ text-overflow: ellipsis;
22
+ white-space: nowrap;
23
23
  }
24
24
 
25
25
  .controls.slim {
26
26
  padding: 0;
27
- }
27
+ }
@@ -0,0 +1,8 @@
1
+ import * as React from 'react';
2
+ interface Props {
3
+ type: 'pre' | 'post';
4
+ code: string;
5
+ }
6
+ declare const HiddenCode: (props: Props) => React.JSX.Element;
7
+ export default HiddenCode;
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/theme/CodeEditor/Editor/HiddenCode/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,UAAU,KAAK;IACX,IAAI,EAAE,KAAK,GAAG,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;CAChB;AAED,QAAA,MAAM,UAAU,GAAI,OAAO,KAAK,sBAkC/B,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -0,0 +1,27 @@
1
+ import * as React from 'react';
2
+ import styles from './styles.module.css';
3
+ import CodeBlock from '@theme/CodeBlock';
4
+ import clsx from 'clsx';
5
+ import Icon from '@theme/CodeEditor/Icon';
6
+ import { translate } from '@docusaurus/Translate';
7
+ const HiddenCode = (props) => {
8
+ const [show, setShow] = React.useState(false);
9
+ const { code } = props;
10
+ if (code.length === 0) {
11
+ return null;
12
+ }
13
+ return (<div className={clsx(styles.container)}>
14
+ {show && (<div>
15
+ <CodeBlock language="python" showLineNumbers={false} className={clsx(styles.hiddenCode, styles.pre, show && styles.open)}>
16
+ {code}
17
+ </CodeBlock>
18
+ </div>)}
19
+ <button className={clsx(styles.toggleButton, show && styles.open, styles[props.type])} onClick={() => setShow(!show)} title={translate({
20
+ id: 'theme.CodeEditor.Editor.HiddenCode.toggleButtonTitle',
21
+ message: 'Toggle hidden code'
22
+ })}>
23
+ <Icon icon={show ? 'TrayMinus' : 'TrayPlus'} rotate={(show ? 180 : 0) + (props.type === 'post' ? 180 : 0)}/>
24
+ </button>
25
+ </div>);
26
+ };
27
+ export default HiddenCode;
@@ -0,0 +1,52 @@
1
+ .container > .toggleButton {
2
+ position: absolute;
3
+ left: 50%;
4
+ top: 0px;
5
+ z-index: var(--ifm-z-index-dropdown);
6
+ opacity: var(--show-hidden-code-toggle-opacity);
7
+ transition: opacity 0.6s ease; /* Adjust timing as needed */
8
+ padding: 0;
9
+ background: transparent;
10
+ border: 0;
11
+ color: var(--ifm-color-info-darkest);
12
+ cursor: pointer;
13
+ }
14
+ .container > .toggleButton:hover {
15
+ color: var(--ifm-color-info);
16
+ }
17
+
18
+ .container > .toggleButton.post {
19
+ left: 50%;
20
+ top: unset;
21
+ bottom: 0px;
22
+ }
23
+ .toggleButton > svg {
24
+ transition: all 0.1s ease; /* Adjust timing as needed */
25
+ }
26
+
27
+ .container > .toggleButton.open {
28
+ color: var(--ifm-color-danger);
29
+ }
30
+ .container > .toggleButton.open:hover {
31
+ color: var(--ifm-color-danger-darkest);
32
+ }
33
+
34
+ .hiddenCode {
35
+ margin-bottom: 0;
36
+ --ifm-pre-padding: 0 3em;
37
+ }
38
+ .hiddenCode pre {
39
+ border-radius: 0;
40
+ }
41
+ .hiddenCode pre > code {
42
+ background-color: var(--ifm-color-secondary-dark);
43
+ border-radius: 0;
44
+ }
45
+ .hiddenCode > div[class^='codeBlockContent'] > div[class^='buttonGroup'] {
46
+ right: 0;
47
+ top: 0;
48
+ }
49
+
50
+ html[data-theme='dark'] .hiddenCode pre > code {
51
+ background-color: var(--ifm-card-background-color);
52
+ }
@@ -1,3 +1,4 @@
1
1
  import * as React from 'react';
2
2
  declare const Canvas: () => React.JSX.Element;
3
3
  export default Canvas;
4
+ //# sourceMappingURL=Canvas.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Canvas.d.ts","sourceRoot":"","sources":["../../../../../../src/theme/CodeEditor/Editor/Result/Graphics/Canvas.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AA8B/B,QAAA,MAAM,MAAM,yBA+BX,CAAC;AAEF,eAAe,MAAM,CAAC"}