@datalayer/core 0.0.3 → 0.0.4

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 (330) hide show
  1. package/README.md +114 -3
  2. package/lib/App.css +2 -2
  3. package/lib/App.d.ts +1 -1
  4. package/lib/App.js +9 -9
  5. package/lib/__tests__/index.test.js +5 -5
  6. package/lib/api/DatalayerApi.d.ts +1 -1
  7. package/lib/api/DatalayerApi.js +3 -3
  8. package/lib/api/index.d.ts +3 -3
  9. package/lib/api/index.js +3 -3
  10. package/lib/api/runtimes/actions.js +22 -23
  11. package/lib/api/runtimes/settings.js +3 -3
  12. package/lib/api/runtimes/snapshots.d.ts +1 -1
  13. package/lib/api/runtimes/snapshots.js +8 -8
  14. package/lib/api/runtimes/utils.js +1 -4
  15. package/lib/collaboration/DatalayerCollaboration.d.ts +9 -0
  16. package/lib/collaboration/DatalayerCollaboration.js +28 -0
  17. package/lib/collaboration/DatalayerCollaborationProvider.d.ts +54 -0
  18. package/lib/collaboration/DatalayerCollaborationProvider.js +162 -0
  19. package/lib/collaboration/index.d.ts +2 -0
  20. package/lib/collaboration/index.js +6 -0
  21. package/lib/components/avatars/BoringAvatar.d.ts +1 -1
  22. package/lib/components/avatars/BoringAvatar.js +2 -2
  23. package/lib/components/avatars/UserProfileAvatar.js +2 -9
  24. package/lib/components/banners/NoAutomationBanner.js +4 -4
  25. package/lib/components/buttons/DownloadCSVButton.js +1 -1
  26. package/lib/components/buttons/UploadButton.js +1 -1
  27. package/lib/components/checkout/StripeCheckout.d.ts +1 -1
  28. package/lib/components/checkout/StripeCheckout.js +6 -6
  29. package/lib/components/confetti/ConfettiSuccess.js +1 -1
  30. package/lib/components/context/OrganizationSelect.js +5 -5
  31. package/lib/components/context/SpaceSelect.js +7 -7
  32. package/lib/components/display/AvatarSkeleton.js +1 -1
  33. package/lib/components/display/CenteredSpinner.js +4 -4
  34. package/lib/components/display/CodePreview.js +4 -4
  35. package/lib/components/display/DatalayerBox.js +13 -14
  36. package/lib/components/display/HorizontalCenter.d.ts +1 -1
  37. package/lib/components/display/HorizontalCenter.js +1 -1
  38. package/lib/components/display/JupyterDialog.js +17 -15
  39. package/lib/components/display/NavLink.d.ts +4 -2
  40. package/lib/components/display/NavLink.js +6 -4
  41. package/lib/components/display/NotebookSkeleton.js +2 -2
  42. package/lib/components/display/Placeholder.js +1 -1
  43. package/lib/components/display/ToTopBranded.js +1 -1
  44. package/lib/components/echarts/EChartsReact.d.ts +1 -1
  45. package/lib/components/echarts/EChartsReact.js +1 -1
  46. package/lib/components/flashes/FlashClosable.js +11 -11
  47. package/lib/components/flashes/FlashDisclaimer.js +2 -3
  48. package/lib/components/flashes/FlashGuest.js +3 -4
  49. package/lib/components/flashes/FlashSurveys.js +3 -4
  50. package/lib/components/flashes/FlashUnauthorized.js +2 -2
  51. package/lib/components/flashes/surveys/Survey2025_1.d.ts +1 -1
  52. package/lib/components/flashes/surveys/Survey2025_1.js +62 -85
  53. package/lib/components/iam/ExternalTokenSilentLogin.js +6 -4
  54. package/lib/components/icons/ArtifactIcon.d.ts +2 -2
  55. package/lib/components/icons/ArtifactIcon.js +39 -39
  56. package/lib/components/labels/VisibilityLabel.js +2 -5
  57. package/lib/components/landings/StepBlock.d.ts +1 -1
  58. package/lib/components/landings/StepBlock.js +1 -1
  59. package/lib/components/navbar/NavigationVisbilityObserver.js +2 -2
  60. package/lib/components/navbar/SubdomainNavBar.js +45 -23
  61. package/lib/components/navbar/SubdomainNavBar.module.css +33 -14
  62. package/lib/components/nbgrader/NbGradesDetails.d.ts +1 -1
  63. package/lib/components/nbgrader/NbGradesDetails.js +5 -8
  64. package/lib/components/notebooks/JupyterNotebook.js +5 -5
  65. package/lib/components/notebooks/JupyterNotebookToolbar.js +3 -3
  66. package/lib/components/primer/Helper.d.ts +1 -1
  67. package/lib/components/primer/Helper.js +5 -3
  68. package/lib/components/primer/Portals.d.ts +1 -1
  69. package/lib/components/primer/Portals.js +2 -2
  70. package/lib/components/primer/Styles.js +1 -1
  71. package/lib/components/progress/ConsumptionBar.js +2 -2
  72. package/lib/components/progress/CreditsIndicator.d.ts +1 -1
  73. package/lib/components/progress/CreditsIndicator.js +4 -7
  74. package/lib/components/progress/ProgressRing.js +2 -2
  75. package/lib/components/runtimes/RuntimeCellVariables.js +9 -9
  76. package/lib/components/runtimes/RuntimeCellVariablesDialog.js +3 -3
  77. package/lib/components/runtimes/RuntimeLauncherDialog.js +30 -34
  78. package/lib/components/runtimes/RuntimePickerBase.js +42 -31
  79. package/lib/components/runtimes/RuntimePickerCell.js +9 -12
  80. package/lib/components/runtimes/RuntimePickerNotebook.js +44 -44
  81. package/lib/components/runtimes/RuntimeReservationControl.js +10 -15
  82. package/lib/components/runtimes/RuntimeSimplePicker.js +9 -12
  83. package/lib/components/runtimes/RuntimeUtils.js +22 -12
  84. package/lib/components/runtimes/RuntimeVariables.js +7 -7
  85. package/lib/components/screenshot/ScreenCapture.js +9 -13
  86. package/lib/components/screenshot/ScreenCaptureButton.d.ts +1 -1
  87. package/lib/components/screenshot/ScreenCaptureButton.js +14 -8
  88. package/lib/components/snapshots/RuntimeSnapshotMenu.js +19 -17
  89. package/lib/components/snippets/SnippetDialog.js +5 -5
  90. package/lib/components/storage/ContentsBrowser.js +63 -56
  91. package/lib/components/storage/ContentsItems.js +10 -8
  92. package/lib/components/students/StudentItemStatus.d.ts +1 -1
  93. package/lib/components/students/StudentItemStatus.js +35 -16
  94. package/lib/components/subnav/SubNav.d.ts +1 -1
  95. package/lib/components/subnav/SubNav.js +30 -15
  96. package/lib/components/subnav/SubNav.module.css +55 -21
  97. package/lib/components/tables/DataTable.js +1 -4
  98. package/lib/components/text-reveal/TextRevealAnimation.js +7 -2
  99. package/lib/components/text-reveal/TextRevealAnimation.module.css +4 -2
  100. package/lib/components/tokens/SpaceVariantToken.d.ts +1 -1
  101. package/lib/components/tokens/SpaceVariantToken.js +5 -5
  102. package/lib/components/toolbars/AssignmentEditorToolbar.js +1 -3
  103. package/lib/components/users/PeerIndicator.d.ts +1 -1
  104. package/lib/components/users/PeerIndicator.js +5 -5
  105. package/lib/config/Configuration.d.ts +48 -0
  106. package/lib/config/Configuration.js +42 -0
  107. package/lib/config/integrations/Loom.js +3 -3
  108. package/lib/examples/CellExample.d.ts +2 -2
  109. package/lib/examples/CellExample.js +34 -3
  110. package/lib/examples/DatalayerNotebookExample.d.ts +16 -0
  111. package/lib/examples/DatalayerNotebookExample.js +75 -0
  112. package/lib/examples/NativeNavigationExample.d.ts +8 -0
  113. package/lib/examples/NativeNavigationExample.js +97 -0
  114. package/lib/examples/NotebookExample.d.ts +1 -3
  115. package/lib/examples/NotebookExample.js +9 -7
  116. package/lib/examples/NotebookMutationsKernel.d.ts +2 -0
  117. package/lib/examples/NotebookMutationsKernel.js +115 -0
  118. package/lib/examples/NotebookMutationsServiceManager.d.ts +2 -0
  119. package/lib/examples/NotebookMutationsServiceManager.js +107 -0
  120. package/lib/examples/ReactRouterExample.d.ts +6 -0
  121. package/lib/examples/ReactRouterExample.js +175 -0
  122. package/lib/examples/example-selector.d.ts +22 -0
  123. package/lib/examples/example-selector.js +45 -0
  124. package/lib/examples/index.d.ts +2 -0
  125. package/lib/examples/index.js +6 -0
  126. package/lib/examples/main.js +153 -0
  127. package/lib/examples/notebooks/IPyWidgetsExample.ipynb.json +101 -0
  128. package/lib/examples/notebooks/IPyWidgetsExampleWithState.ipynb.json +112 -0
  129. package/lib/examples/{NotebookExample1.ipynb.json → notebooks/Lite.ipynb.json} +45 -53
  130. package/lib/examples/notebooks/Matplotlib.ipynb.json +137 -0
  131. package/lib/examples/notebooks/NotebookExample1.ipynb.json +126 -0
  132. package/lib/examples/notebooks/NotebookExample2.ipynb.json +48 -0
  133. package/lib/examples/notebooks/NotebookOutputs.ipynb.json +49 -0
  134. package/lib/examples/notebooks/NotebookToCExample.ipynb.json +102 -0
  135. package/lib/examples/notebooks/OutputIPyWidgetsExample.d.ts +145 -0
  136. package/lib/examples/notebooks/OutputIPyWidgetsExample.js +153 -0
  137. package/lib/examples/notebooks/PyGWalker.ipynb.json +55 -0
  138. package/lib/hooks/assets/OutputshotPlaceholders.d.ts +10 -10
  139. package/lib/hooks/assets/OutputshotPlaceholders.js +10 -10
  140. package/lib/hooks/index.d.ts +29 -28
  141. package/lib/hooks/index.js +29 -28
  142. package/lib/hooks/layouts/LayoutBackdrop.js +3 -6
  143. package/lib/hooks/layouts/LayoutScreenshot.css +1 -1
  144. package/lib/hooks/layouts/LayoutScreenshot.js +6 -6
  145. package/lib/hooks/useAIAgents.d.ts +1 -1
  146. package/lib/hooks/useAIAgents.js +6 -6
  147. package/lib/hooks/useAuthorization.js +4 -4
  148. package/lib/hooks/useBackdrop.js +7 -7
  149. package/lib/hooks/useBackdropJupyterLab.d.ts +1 -1
  150. package/lib/hooks/useBackdropJupyterLab.js +4 -4
  151. package/lib/hooks/useCache.d.ts +6 -2
  152. package/lib/hooks/useCache.js +233 -179
  153. package/lib/hooks/useCellOutputshot.js +3 -6
  154. package/lib/hooks/useContainsFocus.js +2 -1
  155. package/lib/hooks/useDatalayer.js +5 -3
  156. package/lib/hooks/useError.d.ts +1 -1
  157. package/lib/hooks/useError.js +2 -2
  158. package/lib/hooks/useExternalScript.js +4 -4
  159. package/lib/hooks/useFocusTrap.js +2 -1
  160. package/lib/hooks/useIAM.js +4 -5
  161. package/lib/hooks/useId.js +3 -3
  162. package/lib/hooks/useJupyterLabTheme.js +3 -1
  163. package/lib/hooks/useLocation.d.ts +22 -0
  164. package/lib/hooks/useLocation.js +149 -0
  165. package/lib/hooks/useLocationHandles.d.ts +2 -2
  166. package/lib/hooks/useLocationHandles.js +6 -4
  167. package/lib/hooks/useNavigate.d.ts +5 -1
  168. package/lib/hooks/useNavigate.js +62 -7
  169. package/lib/hooks/useNotebookAIAgent.js +3 -1
  170. package/lib/hooks/useParams.d.ts +5 -0
  171. package/lib/hooks/useParams.js +152 -0
  172. package/lib/hooks/useRuntimes.js +2 -2
  173. package/lib/hooks/useScreenshot.js +5 -5
  174. package/lib/hooks/useToast.js +15 -13
  175. package/lib/hooks/useUpload.js +9 -9
  176. package/lib/hooks/useUser.js +1 -1
  177. package/lib/index.css +1 -1
  178. package/lib/index.d.ts +6 -3
  179. package/lib/index.js +7 -3
  180. package/lib/mocks/components/FlashMock.js +4 -4
  181. package/lib/mocks/hooks/rests/rests.js +15 -18
  182. package/lib/mocks/hooks/useDatalayerMock.d.ts +2 -2
  183. package/lib/mocks/hooks/useDatalayerMock.js +7 -7
  184. package/lib/mocks/models/CodeBlockMock.js +1 -1
  185. package/lib/mocks/models/CodelineMock.js +1 -1
  186. package/lib/mocks/models/CourseMock.d.ts +1 -1
  187. package/lib/mocks/models/CourseMock.js +10 -10
  188. package/lib/mocks/models/InviteMock.d.ts +1 -1
  189. package/lib/mocks/models/InviteMock.js +21 -6
  190. package/lib/mocks/models/JupyterLabUserMock.js +2 -2
  191. package/lib/mocks/models/OrganisationMock.d.ts +1 -1
  192. package/lib/mocks/models/OrganisationMock.js +11 -7
  193. package/lib/mocks/models/SchoolMock.d.ts +1 -1
  194. package/lib/mocks/models/SchoolMock.js +6 -6
  195. package/lib/mocks/models/SpaceMock.d.ts +1 -1
  196. package/lib/mocks/models/SpaceMock.js +9 -9
  197. package/lib/mocks/models/TeamMock.d.ts +1 -1
  198. package/lib/mocks/models/TeamMock.js +6 -6
  199. package/lib/mocks/models/UserMock.d.ts +1 -1
  200. package/lib/mocks/models/UserMock.js +4 -6
  201. package/lib/mocks/views/ActionMenuMock.js +1 -1
  202. package/lib/mocks/views/ChartMock.js +3 -3
  203. package/lib/mocks/views/ChartMockOptions.js +24 -24
  204. package/lib/mocks/views/DashboardMock.js +74 -74
  205. package/lib/mocks/views/FormMock.js +1 -1
  206. package/lib/mocks/views/TableMock.js +1 -1
  207. package/lib/models/Account.d.ts +2 -2
  208. package/lib/models/Assignment.d.ts +2 -2
  209. package/lib/models/Cell.d.ts +1 -1
  210. package/lib/models/CodeBlock.d.ts +1 -1
  211. package/lib/models/CodefeedBlocks.d.ts +2 -2
  212. package/lib/models/Contact.d.ts +1 -1
  213. package/lib/models/Contact.js +14 -14
  214. package/lib/models/ContactIAMProvider.js +2 -2
  215. package/lib/models/Course.d.ts +7 -7
  216. package/lib/models/Dataset.d.ts +1 -1
  217. package/lib/models/Dean.d.ts +1 -1
  218. package/lib/models/Document.d.ts +1 -1
  219. package/lib/models/Environment.d.ts +2 -2
  220. package/lib/models/Exercise.d.ts +1 -1
  221. package/lib/models/IAMProviderLinked.js +1 -1
  222. package/lib/models/Instructor.d.ts +1 -1
  223. package/lib/models/Invite.d.ts +2 -2
  224. package/lib/models/Invite.js +1 -1
  225. package/lib/models/Item.d.ts +5 -5
  226. package/lib/models/LandingRoles.js +18 -18
  227. package/lib/models/Lesson.d.ts +1 -1
  228. package/lib/models/Member.d.ts +1 -1
  229. package/lib/models/Notebook.d.ts +1 -1
  230. package/lib/models/Organization.d.ts +4 -4
  231. package/lib/models/Organization.js +2 -2
  232. package/lib/models/OrganizationMember.d.ts +2 -2
  233. package/lib/models/Page.js +4 -2
  234. package/lib/models/PageTag.d.ts +1 -1
  235. package/lib/models/PageTag.js +56 -9
  236. package/lib/models/Profile.d.ts +1 -1
  237. package/lib/models/RolesOrganization.d.ts +1 -1
  238. package/lib/models/RolesOrganization.js +4 -12
  239. package/lib/models/RolesPlatform.d.ts +1 -1
  240. package/lib/models/RolesPlatform.js +12 -34
  241. package/lib/models/RolesTeam.d.ts +1 -1
  242. package/lib/models/RolesTeam.js +3 -10
  243. package/lib/models/Runtime.js +4 -4
  244. package/lib/models/RuntimeSnapshot.js +1 -1
  245. package/lib/models/School.d.ts +4 -4
  246. package/lib/models/Space.d.ts +5 -5
  247. package/lib/models/Space.js +3 -3
  248. package/lib/models/SpaceItem.d.ts +8 -8
  249. package/lib/models/SpaceMember.d.ts +2 -2
  250. package/lib/models/Student.d.ts +2 -2
  251. package/lib/models/StudentItem.d.ts +3 -3
  252. package/lib/models/Team.d.ts +3 -3
  253. package/lib/models/Team.js +2 -2
  254. package/lib/models/TeamMember.d.ts +2 -2
  255. package/lib/models/URN.js +1 -1
  256. package/lib/models/User.d.ts +2 -2
  257. package/lib/models/User.js +5 -3
  258. package/lib/models/UserOnboarding.d.ts +1 -1
  259. package/lib/models/UserOnboarding.js +7 -7
  260. package/lib/models/UserSettings.js +2 -2
  261. package/lib/models/index.d.ts +2 -2
  262. package/lib/models/index.js +2 -2
  263. package/lib/navigation/adapters/native.d.ts +11 -0
  264. package/lib/navigation/adapters/native.js +48 -0
  265. package/lib/navigation/adapters/nextjs.d.ts +9 -0
  266. package/lib/navigation/adapters/nextjs.js +35 -0
  267. package/lib/navigation/adapters/react-router.d.ts +4 -0
  268. package/lib/navigation/adapters/react-router.js +12 -0
  269. package/lib/navigation/components.d.ts +20 -0
  270. package/lib/navigation/components.js +36 -0
  271. package/lib/navigation/index.d.ts +4 -0
  272. package/lib/navigation/index.js +12 -0
  273. package/lib/routes/index.d.ts +1 -1
  274. package/lib/routes/index.js +1 -1
  275. package/lib/services/DatalayerServiceManager.d.ts +22 -0
  276. package/lib/services/DatalayerServiceManager.js +79 -0
  277. package/lib/services/index.d.ts +4 -0
  278. package/lib/services/index.js +7 -0
  279. package/lib/services/reconnectToRuntime.d.ts +32 -0
  280. package/lib/services/reconnectToRuntime.js +59 -0
  281. package/lib/state/State.d.ts +1 -1
  282. package/lib/state/State.js +1 -1
  283. package/lib/state/index.d.ts +1 -1
  284. package/lib/state/index.js +1 -1
  285. package/lib/state/storage/IAMStorage.js +14 -2
  286. package/lib/state/storage/index.d.ts +1 -1
  287. package/lib/state/storage/index.js +1 -1
  288. package/lib/state/substates/AIAgentState.js +4 -2
  289. package/lib/state/substates/CellState.js +6 -5
  290. package/lib/state/substates/CoreState.d.ts +1 -1
  291. package/lib/state/substates/CoreState.js +23 -15
  292. package/lib/state/substates/DatasourceState.js +1 -1
  293. package/lib/state/substates/IAMState.d.ts +4 -0
  294. package/lib/state/substates/IAMState.js +75 -56
  295. package/lib/state/substates/JupyterLabState.js +1 -1
  296. package/lib/state/substates/LayoutState.d.ts +2 -2
  297. package/lib/state/substates/LayoutState.js +41 -28
  298. package/lib/state/substates/OrganizationState.js +1 -1
  299. package/lib/state/substates/RuntimesState.js +6 -5
  300. package/lib/state/substates/SpaceState.js +1 -1
  301. package/lib/state/substates/SurveysState.js +4 -4
  302. package/lib/state/substates/TeamState.js +1 -1
  303. package/lib/test-setup.js +25 -3
  304. package/lib/theme/DatalayerTheme.js +1 -1
  305. package/lib/theme/DatalayerThemeProvider.js +17 -14
  306. package/lib/theme/Palette.js +1 -1
  307. package/lib/utils/Avatar.js +2 -2
  308. package/lib/utils/Browser.js +6 -6
  309. package/lib/utils/Cells.d.ts +1 -1
  310. package/lib/utils/Cookie.js +1 -1
  311. package/lib/utils/Date.js +2 -2
  312. package/lib/utils/Download.js +5 -3
  313. package/lib/utils/DownloadFile.js +4 -2
  314. package/lib/utils/Env.js +2 -1
  315. package/lib/utils/Lazy.d.ts +1 -1
  316. package/lib/utils/Lazy.js +2 -2
  317. package/lib/utils/Name.js +10 -8
  318. package/lib/utils/Notebook.d.ts +1 -1
  319. package/lib/utils/Notebook.js +3 -3
  320. package/lib/utils/Number.js +13 -9
  321. package/lib/utils/Plots.js +4 -4
  322. package/lib/utils/Screenshot.js +1 -1
  323. package/lib/utils/Sleep.js +1 -1
  324. package/lib/utils/Snapshot.js +2 -2
  325. package/lib/utils/String.js +2 -2
  326. package/lib/utils/Uri.js +1 -1
  327. package/lib/utils/WithSuspense.js +3 -6
  328. package/package.json +41 -5
  329. package/lib/__tests__/App.test.js +0 -17
  330. /package/lib/{__tests__/App.test.d.ts → examples/main.d.ts} +0 -0
@@ -0,0 +1,126 @@
1
+ {
2
+ "cells": [
3
+ {
4
+ "cell_type": "code",
5
+ "execution_count": 1,
6
+ "metadata": {},
7
+ "outputs": [
8
+ {
9
+ "data": {
10
+ "text/plain": ["2"]
11
+ },
12
+ "execution_count": 1,
13
+ "metadata": {},
14
+ "output_type": "execute_result"
15
+ }
16
+ ],
17
+ "source": ["1+1"]
18
+ },
19
+ {
20
+ "cell_type": "code",
21
+ "execution_count": 1,
22
+ "metadata": {
23
+ "datalayer": {
24
+ "_about": "AI Platform for Data Analysis"
25
+ }
26
+ },
27
+ "outputs": [
28
+ {
29
+ "data": {
30
+ "text/plain": ["4"]
31
+ },
32
+ "execution_count": 1,
33
+ "metadata": {},
34
+ "output_type": "execute_result"
35
+ }
36
+ ],
37
+ "source": ["# I am a Python cell.\n", "print('2+2')"]
38
+ },
39
+ {
40
+ "cell_type": "code",
41
+ "execution_count": 1,
42
+ "metadata": {},
43
+ "outputs": [
44
+ {
45
+ "data": {
46
+ "text/plain": []
47
+ },
48
+ "execution_count": 1,
49
+ "metadata": {},
50
+ "output_type": "execute_result"
51
+ }
52
+ ],
53
+ "source": [
54
+ "# import micropip\n",
55
+ "# await micropip.install('ipywidgets')\n",
56
+ "from ipywidgets import IntSlider\n",
57
+ "w = IntSlider()\n",
58
+ "w"
59
+ ]
60
+ },
61
+ {
62
+ "cell_type": "code",
63
+ "execution_count": 1,
64
+ "metadata": {},
65
+ "outputs": [
66
+ {
67
+ "data": {
68
+ "text/plain": []
69
+ },
70
+ "execution_count": 1,
71
+ "metadata": {},
72
+ "output_type": "execute_result"
73
+ }
74
+ ],
75
+ "source": ["w"]
76
+ },
77
+ {
78
+ "cell_type": "code",
79
+ "execution_count": 1,
80
+ "metadata": {
81
+ "datalayer": {
82
+ "sql": true
83
+ }
84
+ },
85
+ "outputs": [
86
+ {
87
+ "data": {
88
+ "text/plain": [""]
89
+ },
90
+ "execution_count": 1,
91
+ "metadata": {},
92
+ "output_type": "execute_result"
93
+ }
94
+ ],
95
+ "source": ["-- I am a SQL cell.\n", "SELECT * FROM LOGS"]
96
+ },
97
+ {
98
+ "cell_type": "code",
99
+ "execution_count": null,
100
+ "metadata": {},
101
+ "outputs": [],
102
+ "source": []
103
+ }
104
+ ],
105
+ "metadata": {
106
+ "kernelspec": {
107
+ "display_name": "Python (ipykernel)",
108
+ "language": "python",
109
+ "name": "python"
110
+ },
111
+ "language_info": {
112
+ "codemirror_mode": {
113
+ "name": "ipython",
114
+ "version": 3
115
+ },
116
+ "file_extension": ".py",
117
+ "mimetype": "text/x-python",
118
+ "name": "python",
119
+ "nbconvert_exporter": "python",
120
+ "pygments_lexer": "ipython3",
121
+ "version": "3.10.4"
122
+ }
123
+ },
124
+ "nbformat": 4,
125
+ "nbformat_minor": 4
126
+ }
@@ -0,0 +1,48 @@
1
+ {
2
+ "cells": [
3
+ {
4
+ "cell_type": "code",
5
+ "execution_count": 1,
6
+ "metadata": {},
7
+ "outputs": [
8
+ {
9
+ "data": {
10
+ "text/plain": ["4"]
11
+ },
12
+ "execution_count": 1,
13
+ "metadata": {},
14
+ "output_type": "execute_result"
15
+ }
16
+ ],
17
+ "source": ["2+2"]
18
+ },
19
+ {
20
+ "cell_type": "code",
21
+ "execution_count": null,
22
+ "metadata": {},
23
+ "outputs": [],
24
+ "source": []
25
+ }
26
+ ],
27
+ "metadata": {
28
+ "kernelspec": {
29
+ "display_name": "Python (ipykernel)",
30
+ "language": "python",
31
+ "name": "python"
32
+ },
33
+ "language_info": {
34
+ "codemirror_mode": {
35
+ "name": "ipython",
36
+ "version": 3
37
+ },
38
+ "file_extension": ".py",
39
+ "mimetype": "text/x-python",
40
+ "name": "python",
41
+ "nbconvert_exporter": "python",
42
+ "pygments_lexer": "ipython3",
43
+ "version": "3.10.4"
44
+ }
45
+ },
46
+ "nbformat": 4,
47
+ "nbformat_minor": 4
48
+ }
@@ -0,0 +1,49 @@
1
+ {
2
+ "cells": [
3
+ {
4
+ "cell_type": "code",
5
+ "execution_count": 1,
6
+ "metadata": {},
7
+ "outputs": [
8
+ {
9
+ "data": {
10
+ "text/plain": ["2"]
11
+ },
12
+ "execution_count": 1,
13
+ "metadata": {},
14
+ "output_type": "execute_result"
15
+ }
16
+ ],
17
+ "source": ["1+1"]
18
+ },
19
+ {
20
+ "cell_type": "code",
21
+ "execution_count": 1,
22
+ "metadata": {},
23
+ "outputs": [
24
+ {
25
+ "ename": "NameError",
26
+ "evalue": "name 'HTML' is not defined",
27
+ "output_type": "error",
28
+ "traceback": [
29
+ "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
30
+ "\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)",
31
+ "Cell \u001b[0;32mIn[1], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m display(\u001b[43mHTML\u001b[49m(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m\"\u001b[39m));\n",
32
+ "\u001b[0;31mNameError\u001b[0m: name 'HTML' is not defined"
33
+ ]
34
+ }
35
+ ],
36
+ "source": ["display(HTML(\"\"));"]
37
+ },
38
+ {
39
+ "cell_type": "code",
40
+ "execution_count": null,
41
+ "metadata": {},
42
+ "outputs": [],
43
+ "source": []
44
+ }
45
+ ],
46
+ "metadata": {},
47
+ "nbformat": 4,
48
+ "nbformat_minor": 4
49
+ }
@@ -0,0 +1,102 @@
1
+ {
2
+ "cells": [
3
+ {
4
+ "cell_type": "markdown",
5
+ "id": "6ecc7b98-968d-43cd-9fbb-8ceadf863b74",
6
+ "metadata": {},
7
+ "source": ["# Heading 1"]
8
+ },
9
+ {
10
+ "cell_type": "markdown",
11
+ "id": "5099ba4a-88e8-4108-be32-a0ea52a58f79",
12
+ "metadata": {
13
+ "editable": true,
14
+ "slideshow": {
15
+ "slide_type": ""
16
+ },
17
+ "tags": []
18
+ },
19
+ "source": ["LOL"]
20
+ },
21
+ {
22
+ "cell_type": "markdown",
23
+ "id": "418b532a-c1eb-4f37-96c2-3465879122de",
24
+ "metadata": {},
25
+ "source": ["**Okay**"]
26
+ },
27
+ {
28
+ "cell_type": "markdown",
29
+ "id": "60a3ee36-8ee6-4648-93d7-af587bf3892f",
30
+ "metadata": {},
31
+ "source": ["## Heading 1-1"]
32
+ },
33
+ {
34
+ "cell_type": "code",
35
+ "execution_count": 2,
36
+ "id": "113f7bb9-220a-405f-9784-e0de940e0adf",
37
+ "metadata": {},
38
+ "outputs": [
39
+ {
40
+ "name": "stdin",
41
+ "output_type": "stream",
42
+ "text": ["Please input your name: leon\n"]
43
+ },
44
+ {
45
+ "name": "stdout",
46
+ "output_type": "stream",
47
+ "text": ["Hello, leon!\n", "finish\n"]
48
+ }
49
+ ],
50
+ "source": [
51
+ "name = input(\"Please input your name: \")\n",
52
+ "print(f\"Hello, {name}!\") \n",
53
+ "import time\n",
54
+ "time.sleep(3)\n",
55
+ "print(\"finish\")"
56
+ ]
57
+ },
58
+ {
59
+ "cell_type": "markdown",
60
+ "id": "dfd17807-2ad3-4d2d-8371-5102d24e0d67",
61
+ "metadata": {},
62
+ "source": ["# Heading 2"]
63
+ },
64
+ {
65
+ "cell_type": "markdown",
66
+ "id": "de6a4139-4e4d-49d4-8824-0985baccf704",
67
+ "metadata": {
68
+ "editable": true,
69
+ "slideshow": {
70
+ "slide_type": ""
71
+ },
72
+ "tags": []
73
+ },
74
+ "source": [
75
+ "## Heading 2-1\n",
76
+ "\n",
77
+ "Man! **you know** what I am saying."
78
+ ]
79
+ }
80
+ ],
81
+ "metadata": {
82
+ "kernelspec": {
83
+ "display_name": "Python 3 (ipykernel)",
84
+ "language": "python",
85
+ "name": "python3"
86
+ },
87
+ "language_info": {
88
+ "codemirror_mode": {
89
+ "name": "ipython",
90
+ "version": 3
91
+ },
92
+ "file_extension": ".py",
93
+ "mimetype": "text/x-python",
94
+ "name": "python",
95
+ "nbconvert_exporter": "python",
96
+ "pygments_lexer": "ipython3",
97
+ "version": "3.10.4"
98
+ }
99
+ },
100
+ "nbformat": 4,
101
+ "nbformat_minor": 5
102
+ }
@@ -0,0 +1,145 @@
1
+ export declare const view: {
2
+ version_major: number;
3
+ version_minor: number;
4
+ model_id: string;
5
+ };
6
+ export declare const state: {
7
+ version_major: number;
8
+ version_minor: number;
9
+ state: {
10
+ '8621699ecc804983a612f09b7dfe806b': {
11
+ model_name: string;
12
+ model_module: string;
13
+ model_module_version: string;
14
+ state: {
15
+ _view_module_version: string;
16
+ children: string[];
17
+ _model_module_version: string;
18
+ layout: string;
19
+ _view_count: number;
20
+ };
21
+ };
22
+ '961d612211fe4c64a70f48942d885c14': {
23
+ model_name: string;
24
+ model_module: string;
25
+ model_module_version: string;
26
+ state: {
27
+ _model_module_version: string;
28
+ _view_module_version: string;
29
+ _view_count: number;
30
+ };
31
+ };
32
+ '564e75ddea4c4ea0a32c4bd39ed0ed6d': {
33
+ model_name: string;
34
+ model_module: string;
35
+ model_module_version: string;
36
+ state: {
37
+ _model_module_version: string;
38
+ _view_module_version: string;
39
+ _view_count: number;
40
+ };
41
+ };
42
+ a8b1ae50aada4d929397b907115bfc2c: {
43
+ model_name: string;
44
+ model_module: string;
45
+ model_module_version: string;
46
+ state: {
47
+ style: string;
48
+ _view_module_version: string;
49
+ max: number;
50
+ value: number;
51
+ _model_module_version: string;
52
+ layout: string;
53
+ _view_count: number;
54
+ };
55
+ };
56
+ b63481ca8b7943aa85d097a114a931f5: {
57
+ model_name: string;
58
+ model_module: string;
59
+ model_module_version: string;
60
+ state: {
61
+ _model_module_version: string;
62
+ _view_module_version: string;
63
+ _view_count: number;
64
+ };
65
+ };
66
+ d86e0cb348eb48bf97f14906a9406731: {
67
+ model_name: string;
68
+ model_module: string;
69
+ model_module_version: string;
70
+ state: {
71
+ _model_module_version: string;
72
+ _view_module_version: string;
73
+ _view_count: number;
74
+ };
75
+ };
76
+ '289e54d14b7c4c6d8ac18b4c86ab514c': {
77
+ model_name: string;
78
+ model_module: string;
79
+ model_module_version: string;
80
+ state: {
81
+ style: string;
82
+ _view_module_version: string;
83
+ value: number;
84
+ _model_module_version: string;
85
+ layout: string;
86
+ _view_count: number;
87
+ };
88
+ };
89
+ bb589d8dc365404b94e73a153407128f: {
90
+ model_name: string;
91
+ model_module: string;
92
+ model_module_version: string;
93
+ state: {
94
+ _model_module_version: string;
95
+ _view_module_version: string;
96
+ _view_count: number;
97
+ };
98
+ };
99
+ '19a24d8ea5a248be8db79790290ae2a1': {
100
+ model_name: string;
101
+ model_module: string;
102
+ model_module_version: string;
103
+ state: {
104
+ _model_module_version: string;
105
+ _view_module_version: string;
106
+ _view_count: number;
107
+ };
108
+ };
109
+ '965bbfeaddd74b9baa488c7f6ac13027': {
110
+ model_name: string;
111
+ model_module: string;
112
+ model_module_version: string;
113
+ state: {
114
+ style: string;
115
+ _view_module_version: string;
116
+ icon: string;
117
+ _model_module_version: string;
118
+ layout: string;
119
+ _view_count: number;
120
+ };
121
+ };
122
+ '6edd9d3360cc47c8aceff0ba11edeca9': {
123
+ model_name: string;
124
+ model_module: string;
125
+ model_module_version: string;
126
+ state: {
127
+ _model_module_version: string;
128
+ target: string[];
129
+ source: string[];
130
+ _view_module_version: string;
131
+ _view_name: string;
132
+ };
133
+ };
134
+ d7d14e74f61f4b3bb5f53a713bcadced: {
135
+ model_name: string;
136
+ model_module: string;
137
+ model_module_version: string;
138
+ state: {
139
+ _model_module_version: string;
140
+ _view_module_version: string;
141
+ _view_count: number;
142
+ };
143
+ };
144
+ };
145
+ };
@@ -0,0 +1,153 @@
1
+ /*
2
+ * Copyright (c) 2023-2025 Datalayer, Inc.
3
+ * Distributed under the terms of the Modified BSD License.
4
+ */
5
+ export const view = {
6
+ version_major: 2,
7
+ version_minor: 0,
8
+ model_id: '8621699ecc804983a612f09b7dfe806b',
9
+ };
10
+ export const state = {
11
+ version_major: 2,
12
+ version_minor: 0,
13
+ state: {
14
+ '8621699ecc804983a612f09b7dfe806b': {
15
+ model_name: 'VBoxModel',
16
+ model_module: '@jupyter-widgets/controls',
17
+ model_module_version: '1.0.0',
18
+ state: {
19
+ _view_module_version: '1.0.0',
20
+ children: [
21
+ 'IPY_MODEL_a8b1ae50aada4d929397b907115bfc2c',
22
+ 'IPY_MODEL_289e54d14b7c4c6d8ac18b4c86ab514c',
23
+ 'IPY_MODEL_965bbfeaddd74b9baa488c7f6ac13027',
24
+ ],
25
+ _model_module_version: '1.0.0',
26
+ layout: 'IPY_MODEL_d7d14e74f61f4b3bb5f53a713bcadced',
27
+ _view_count: 1,
28
+ },
29
+ },
30
+ '961d612211fe4c64a70f48942d885c14': {
31
+ model_name: 'LayoutModel',
32
+ model_module: '@jupyter-widgets/base',
33
+ model_module_version: '1.0.0',
34
+ state: {
35
+ _model_module_version: '1.0.0',
36
+ _view_module_version: '1.0.0',
37
+ _view_count: 1,
38
+ },
39
+ },
40
+ '564e75ddea4c4ea0a32c4bd39ed0ed6d': {
41
+ model_name: 'SliderStyleModel',
42
+ model_module: '@jupyter-widgets/controls',
43
+ model_module_version: '1.0.0',
44
+ state: {
45
+ _model_module_version: '1.0.0',
46
+ _view_module_version: '1.0.0',
47
+ _view_count: 1,
48
+ },
49
+ },
50
+ a8b1ae50aada4d929397b907115bfc2c: {
51
+ model_name: 'IntSliderModel',
52
+ model_module: '@jupyter-widgets/controls',
53
+ model_module_version: '1.0.0',
54
+ state: {
55
+ style: 'IPY_MODEL_564e75ddea4c4ea0a32c4bd39ed0ed6d',
56
+ _view_module_version: '1.0.0',
57
+ max: 200,
58
+ value: 100,
59
+ _model_module_version: '1.0.0',
60
+ layout: 'IPY_MODEL_961d612211fe4c64a70f48942d885c14',
61
+ _view_count: 1,
62
+ },
63
+ },
64
+ b63481ca8b7943aa85d097a114a931f5: {
65
+ model_name: 'LayoutModel',
66
+ model_module: '@jupyter-widgets/base',
67
+ model_module_version: '1.0.0',
68
+ state: {
69
+ _model_module_version: '1.0.0',
70
+ _view_module_version: '1.0.0',
71
+ _view_count: 1,
72
+ },
73
+ },
74
+ d86e0cb348eb48bf97f14906a9406731: {
75
+ model_name: 'SliderStyleModel',
76
+ model_module: '@jupyter-widgets/controls',
77
+ model_module_version: '1.0.0',
78
+ state: {
79
+ _model_module_version: '1.0.0',
80
+ _view_module_version: '1.0.0',
81
+ _view_count: 1,
82
+ },
83
+ },
84
+ '289e54d14b7c4c6d8ac18b4c86ab514c': {
85
+ model_name: 'IntSliderModel',
86
+ model_module: '@jupyter-widgets/controls',
87
+ model_module_version: '1.0.0',
88
+ state: {
89
+ style: 'IPY_MODEL_d86e0cb348eb48bf97f14906a9406731',
90
+ _view_module_version: '1.0.0',
91
+ value: 40,
92
+ _model_module_version: '1.0.0',
93
+ layout: 'IPY_MODEL_b63481ca8b7943aa85d097a114a931f5',
94
+ _view_count: 1,
95
+ },
96
+ },
97
+ bb589d8dc365404b94e73a153407128f: {
98
+ model_name: 'LayoutModel',
99
+ model_module: '@jupyter-widgets/base',
100
+ model_module_version: '1.0.0',
101
+ state: {
102
+ _model_module_version: '1.0.0',
103
+ _view_module_version: '1.0.0',
104
+ _view_count: 1,
105
+ },
106
+ },
107
+ '19a24d8ea5a248be8db79790290ae2a1': {
108
+ model_name: 'ButtonStyleModel',
109
+ model_module: '@jupyter-widgets/controls',
110
+ model_module_version: '1.0.0',
111
+ state: {
112
+ _model_module_version: '1.0.0',
113
+ _view_module_version: '1.0.0',
114
+ _view_count: 1,
115
+ },
116
+ },
117
+ '965bbfeaddd74b9baa488c7f6ac13027': {
118
+ model_name: 'ButtonModel',
119
+ model_module: '@jupyter-widgets/controls',
120
+ model_module_version: '1.0.0',
121
+ state: {
122
+ style: 'IPY_MODEL_19a24d8ea5a248be8db79790290ae2a1',
123
+ _view_module_version: '1.0.0',
124
+ icon: 'legal',
125
+ _model_module_version: '1.0.0',
126
+ layout: 'IPY_MODEL_bb589d8dc365404b94e73a153407128f',
127
+ _view_count: 1,
128
+ },
129
+ },
130
+ '6edd9d3360cc47c8aceff0ba11edeca9': {
131
+ model_name: 'DirectionalLinkModel',
132
+ model_module: '@jupyter-widgets/controls',
133
+ model_module_version: '1.0.0',
134
+ state: {
135
+ _model_module_version: '1.0.0',
136
+ target: ['IPY_MODEL_289e54d14b7c4c6d8ac18b4c86ab514c', 'max'],
137
+ source: ['IPY_MODEL_a8b1ae50aada4d929397b907115bfc2c', 'value'],
138
+ _view_module_version: '1.0.0',
139
+ _view_name: '',
140
+ },
141
+ },
142
+ d7d14e74f61f4b3bb5f53a713bcadced: {
143
+ model_name: 'LayoutModel',
144
+ model_module: '@jupyter-widgets/base',
145
+ model_module_version: '1.0.0',
146
+ state: {
147
+ _model_module_version: '1.0.0',
148
+ _view_module_version: '1.0.0',
149
+ _view_count: 1,
150
+ },
151
+ },
152
+ },
153
+ };
@@ -0,0 +1,55 @@
1
+ {
2
+ "cells": [
3
+ {
4
+ "cell_type": "code",
5
+ "execution_count": 1,
6
+ "metadata": {},
7
+ "outputs": [
8
+ {
9
+ "data": {
10
+ "text/plain": []
11
+ },
12
+ "execution_count": 1,
13
+ "metadata": {},
14
+ "output_type": "execute_result"
15
+ }
16
+ ],
17
+ "source": [
18
+ "import pygwalker as pyg\n",
19
+ "import pandas as pd\n",
20
+ "\n",
21
+ "df = pd.read_csv(\"https://kanaries-app.s3.ap-northeast-1.amazonaws.com/public-datasets/bike_sharing_dc.csv\")\n",
22
+ "\n",
23
+ "walker = pyg.walk(df)"
24
+ ]
25
+ },
26
+ {
27
+ "cell_type": "code",
28
+ "execution_count": null,
29
+ "metadata": {},
30
+ "outputs": [],
31
+ "source": []
32
+ }
33
+ ],
34
+ "metadata": {
35
+ "kernelspec": {
36
+ "display_name": "Python (ipykernel)",
37
+ "language": "python",
38
+ "name": "python"
39
+ },
40
+ "language_info": {
41
+ "codemirror_mode": {
42
+ "name": "ipython",
43
+ "version": 3
44
+ },
45
+ "file_extension": ".py",
46
+ "mimetype": "text/x-python",
47
+ "name": "python",
48
+ "nbconvert_exporter": "python",
49
+ "pygments_lexer": "ipython3",
50
+ "version": "3.10.4"
51
+ }
52
+ },
53
+ "nbformat": 4,
54
+ "nbformat_minor": 4
55
+ }