notebook 7.3.0a0__py3-none-any.whl → 7.3.0b0__py3-none-any.whl

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.

Potentially problematic release.


This version of notebook might be problematic. Click here for more details.

Files changed (233) hide show
  1. notebook/_version.py +1 -1
  2. notebook/app.py +10 -2
  3. notebook/static/113.bundle.js +1 -1
  4. notebook/static/1198.bundle.js +1 -1
  5. notebook/static/131.bundle.js +1 -1
  6. notebook/static/134.bundle.js +1 -1
  7. notebook/static/1408.bundle.js +1 -1
  8. notebook/static/1496.bundle.js +1 -1
  9. notebook/static/1584.bundle.js +1 -1
  10. notebook/static/1647.bundle.js +1 -1
  11. notebook/static/1650.bundle.js +1 -1
  12. notebook/static/1684.bundle.js +1 -1
  13. notebook/static/170.bundle.js +1 -1
  14. notebook/static/1809.bundle.js +1 -1
  15. notebook/static/1827.bundle.js +1 -1
  16. notebook/static/1828.bundle.js +1 -1
  17. notebook/static/1833.bundle.js +1 -1
  18. notebook/static/1958.bundle.js +1 -1
  19. notebook/static/1962.bundle.js +1 -1
  20. notebook/static/2007.bundle.js +1 -1
  21. notebook/static/2065.bundle.js +1 -1
  22. notebook/static/2088.bundle.js +1 -1
  23. notebook/static/2089.bundle.js +1 -1
  24. notebook/static/2122.bundle.js +1 -1
  25. notebook/static/2167.bundle.js +1 -1
  26. notebook/static/2184.bundle.js +1 -1
  27. notebook/static/2311.bundle.js +1 -1
  28. notebook/static/2401.bundle.js +1 -1
  29. notebook/static/2424.bundle.js +377 -0
  30. notebook/static/2479.bundle.js +1 -1
  31. notebook/static/2489.bundle.js +1 -1
  32. notebook/static/2607.bundle.js +1 -1
  33. notebook/static/2615.bundle.js +1 -1
  34. notebook/static/2636.bundle.js +1 -1
  35. notebook/static/2756.bundle.js +1 -1
  36. notebook/static/2813.bundle.js +1 -1
  37. notebook/static/2866.bundle.js +1 -1
  38. notebook/static/2924.bundle.js +1 -1
  39. notebook/static/2944.bundle.js +1 -1
  40. notebook/static/2955.bundle.js +1 -0
  41. notebook/static/3129.bundle.js +1 -1
  42. notebook/static/3146.bundle.js +1 -1
  43. notebook/static/3187.bundle.js +1 -1
  44. notebook/static/3213.bundle.js +1 -1
  45. notebook/static/3301.bundle.js +1 -1
  46. notebook/static/3325.bundle.js +1 -1
  47. notebook/static/3340.bundle.js +1 -1
  48. notebook/static/3360.bundle.js +1 -1
  49. notebook/static/{1261.bundle.js → 3463.bundle.js} +1 -1
  50. notebook/static/3466.bundle.js +1 -1
  51. notebook/static/35.bundle.js +1 -1
  52. notebook/static/3512.bundle.js +1 -1
  53. notebook/static/3676.bundle.js +1 -1
  54. notebook/static/3680.bundle.js +1 -1
  55. notebook/static/374.bundle.js +1 -1
  56. notebook/static/3768.bundle.js +1 -1
  57. notebook/static/377.bundle.js +1 -1
  58. notebook/static/3863.bundle.js +1 -1
  59. notebook/static/3881.bundle.js +1 -1
  60. notebook/static/4042.bundle.js +1 -1
  61. notebook/static/4058.bundle.js +1 -1
  62. notebook/static/409.bundle.js +1 -1
  63. notebook/static/4212.bundle.js +1 -1
  64. notebook/static/4242.bundle.js +79 -0
  65. notebook/static/4271.bundle.js +1 -1
  66. notebook/static/4291.bundle.js +1 -1
  67. notebook/static/4382.bundle.js +1 -1
  68. notebook/static/4526.bundle.js +1 -1
  69. notebook/static/4588.bundle.js +1 -1
  70. notebook/static/4630.bundle.js +1 -1
  71. notebook/static/4645.bundle.js +1 -1
  72. notebook/static/4811.bundle.js +1 -1
  73. notebook/static/4837.bundle.js +1 -1
  74. notebook/static/5099.bundle.js +1 -1
  75. notebook/static/5135.bundle.js +1 -1
  76. notebook/static/5166.bundle.js +1 -1
  77. notebook/static/5234.bundle.js +1 -1
  78. notebook/static/5254.bundle.js +1 -1
  79. notebook/static/5261.bundle.js +1 -1
  80. notebook/static/5263.bundle.js +1 -0
  81. notebook/static/5313.bundle.js +1 -1
  82. notebook/static/5325.bundle.js +1 -1
  83. notebook/static/5346.bundle.js +1 -1
  84. notebook/static/5426.bundle.js +1 -1
  85. notebook/static/5430.bundle.js +653 -0
  86. notebook/static/545.bundle.js +1 -1
  87. notebook/static/5451.bundle.js +1 -1
  88. notebook/static/5573.bundle.js +1 -1
  89. notebook/static/5601.bundle.js +1 -1
  90. notebook/static/5649.bundle.js +3 -3
  91. notebook/static/5733.bundle.js +1 -1
  92. notebook/static/5828.bundle.js +1 -1
  93. notebook/static/5850.bundle.js +1 -1
  94. notebook/static/5912.bundle.js +1 -1
  95. notebook/static/5921.bundle.js +1 -1
  96. notebook/static/6017.bundle.js +1 -1
  97. notebook/static/6061.bundle.js +1 -1
  98. notebook/static/6139.bundle.js +1 -1
  99. notebook/static/62.bundle.js +1 -1
  100. notebook/static/6271.bundle.js +1 -1
  101. notebook/static/6345.bundle.js +1 -1
  102. notebook/static/6604.bundle.js +1 -1
  103. notebook/static/6621.bundle.js +1 -1
  104. notebook/static/6627.bundle.js +1 -1
  105. notebook/static/6648.bundle.js +1 -0
  106. notebook/static/6731.bundle.js +1 -1
  107. notebook/static/6748.bundle.js +1 -1
  108. notebook/static/677.bundle.js +1 -1
  109. notebook/static/6815.bundle.js +1 -1
  110. notebook/static/6853.bundle.js +1 -1
  111. notebook/static/6893.bundle.js +1 -1
  112. notebook/static/690.bundle.js +1 -1
  113. notebook/static/6962.bundle.js +1 -1
  114. notebook/static/6999.bundle.js +1 -1
  115. notebook/static/7226.bundle.js +1 -1
  116. notebook/static/7252.bundle.js +1 -1
  117. notebook/static/7302.bundle.js +1 -1
  118. notebook/static/7386.bundle.js +1 -1
  119. notebook/static/7391.bundle.js +1 -1
  120. notebook/static/7450.bundle.js +1 -1
  121. notebook/static/7543.bundle.js +1 -1
  122. notebook/static/755.bundle.js +1 -1
  123. notebook/static/7603.bundle.js +1 -1
  124. notebook/static/7639.bundle.js +1 -1
  125. notebook/static/7655.bundle.js +1 -1
  126. notebook/static/{4427.bundle.js → 7674.bundle.js} +1 -1
  127. notebook/static/7684.bundle.js +1 -1
  128. notebook/static/7812.bundle.js +1 -1
  129. notebook/static/7819.bundle.js +1 -1
  130. notebook/static/7821.bundle.js +1 -1
  131. notebook/static/7854.bundle.js +1 -1
  132. notebook/static/7866.bundle.js +1 -0
  133. notebook/static/7900.bundle.js +1 -1
  134. notebook/static/7906.bundle.js +1 -1
  135. notebook/static/7995.bundle.js +1 -1
  136. notebook/static/8010.bundle.js +1 -1
  137. notebook/static/8032.bundle.js +1 -1
  138. notebook/static/8471.bundle.js +1 -1
  139. notebook/static/8579.bundle.js +1 -1
  140. notebook/static/8633.bundle.js +1 -1
  141. notebook/static/8635.bundle.js +41 -0
  142. notebook/static/8771.bundle.js +1 -1
  143. notebook/static/8781.bundle.js +1 -1
  144. notebook/static/8875.bundle.js +1 -1
  145. notebook/static/8907.bundle.js +1 -1
  146. notebook/static/8928.bundle.js +1 -1
  147. notebook/static/8929.bundle.js +1 -1
  148. notebook/static/893.bundle.js +1 -1
  149. notebook/static/901.bundle.js +1 -1
  150. notebook/static/9068.bundle.js +1 -1
  151. notebook/static/911.bundle.js +1 -1
  152. notebook/static/9136.bundle.js +1 -1
  153. notebook/static/9151.bundle.js +1 -1
  154. notebook/static/9161.bundle.js +1 -1
  155. notebook/static/9268.bundle.js +1 -1
  156. notebook/static/9335.bundle.js +1 -1
  157. notebook/static/9341.bundle.js +1 -1
  158. notebook/static/9380.bundle.js +1 -1
  159. notebook/static/9605.bundle.js +1 -1
  160. notebook/static/9638.bundle.js +1 -1
  161. notebook/static/9672.bundle.js +352 -0
  162. notebook/static/9680.bundle.js +1 -1
  163. notebook/static/9685.bundle.js +1 -1
  164. notebook/static/9752.bundle.js +1 -1
  165. notebook/static/9799.bundle.js +1 -0
  166. notebook/static/9821.bundle.js +1 -1
  167. notebook/static/9852.bundle.js +1 -1
  168. notebook/static/bundle.js +1 -1
  169. notebook/static/third-party-licenses.json +127 -133
  170. notebook/templates/consoles.html +1 -1
  171. notebook/templates/edit.html +1 -1
  172. notebook/templates/error.html +1 -1
  173. notebook/templates/notebooks.html +1 -1
  174. notebook/templates/terminals.html +1 -1
  175. notebook/templates/tree.html +1 -1
  176. {notebook-7.3.0a0.data → notebook-7.3.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/package.json.orig +17 -17
  177. {notebook-7.3.0a0.data → notebook-7.3.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/documentsearch-extension/package.json.orig +5 -5
  178. {notebook-7.3.0a0.data → notebook-7.3.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/help-extension/package.json.orig +6 -6
  179. {notebook-7.3.0a0.data → notebook-7.3.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/package.json.orig +11 -11
  180. {notebook-7.3.0a0.data → notebook-7.3.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/tree-extension/package.json.orig +18 -18
  181. {notebook-7.3.0a0.data → notebook-7.3.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/tree-extension/widget.json +0 -1
  182. {notebook-7.3.0a0.data → notebook-7.3.0b0.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/package.json +13 -13
  183. {notebook-7.3.0a0.data → notebook-7.3.0b0.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/schemas/@jupyter-notebook/lab-extension/package.json.orig +12 -12
  184. notebook-7.3.0a0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/568.6d49b092e49dc147dc54.js → notebook-7.3.0b0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/568.67f8b11d2af855286118.js +1 -1
  185. notebook-7.3.0a0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/646.57a345a80ce9f0e64830.js → notebook-7.3.0b0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/907.767373e59d0c0e33ef12.js +1 -1
  186. notebook-7.3.0a0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/928.7bcc163b9139ecb2b25b.js → notebook-7.3.0b0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/928.50419fa0a72e54064396.js +1 -1
  187. notebook-7.3.0b0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/remoteEntry.fd0956ebf15f666a19f8.js +1 -0
  188. {notebook-7.3.0a0.data → notebook-7.3.0b0.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/third-party-licenses.json +2 -2
  189. {notebook-7.3.0a0.dist-info → notebook-7.3.0b0.dist-info}/METADATA +2 -2
  190. {notebook-7.3.0a0.dist-info → notebook-7.3.0b0.dist-info}/RECORD +213 -222
  191. {notebook-7.3.0a0.dist-info → notebook-7.3.0b0.dist-info}/WHEEL +1 -1
  192. notebook/static/1226.bundle.js +0 -1
  193. notebook/static/1750.bundle.js +0 -1
  194. notebook/static/1884.bundle.js +0 -386
  195. notebook/static/4045.bundle.js +0 -1
  196. notebook/static/4434.bundle.js +0 -1
  197. notebook/static/5018.bundle.js +0 -1
  198. notebook/static/5712.bundle.js +0 -1
  199. notebook/static/6164.bundle.js +0 -1
  200. notebook/static/6318.bundle.js +0 -1
  201. notebook/static/6619.bundle.js +0 -1
  202. notebook/static/6898.bundle.js +0 -1
  203. notebook/static/7506.bundle.js +0 -703
  204. notebook/static/7579.bundle.js +0 -1
  205. notebook/static/8054.bundle.js +0 -1
  206. notebook/static/8647.bundle.js +0 -1
  207. notebook/static/8723.bundle.js +0 -1
  208. notebook/static/9092.bundle.js +0 -1
  209. notebook/static/9734.bundle.js +0 -1
  210. notebook/static/9906.bundle.js +0 -1
  211. notebook-7.3.0a0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/remoteEntry.9381fdb35e72f41d8af1.js +0 -1
  212. /notebook/static/{7506.bundle.js.LICENSE.txt → 4242.bundle.js.LICENSE.txt} +0 -0
  213. {notebook-7.3.0a0.data → notebook-7.3.0b0.data}/data/etc/jupyter/jupyter_server_config.d/notebook.json +0 -0
  214. {notebook-7.3.0a0.data → notebook-7.3.0b0.data}/data/share/applications/jupyter-notebook.desktop +0 -0
  215. {notebook-7.3.0a0.data → notebook-7.3.0b0.data}/data/share/icons/hicolor/scalable/apps/notebook.svg +0 -0
  216. {notebook-7.3.0a0.data → notebook-7.3.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/menus.json +0 -0
  217. {notebook-7.3.0a0.data → notebook-7.3.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/pages.json +0 -0
  218. {notebook-7.3.0a0.data → notebook-7.3.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/shell.json +0 -0
  219. {notebook-7.3.0a0.data → notebook-7.3.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/title.json +0 -0
  220. {notebook-7.3.0a0.data → notebook-7.3.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/top.json +0 -0
  221. {notebook-7.3.0a0.data → notebook-7.3.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/zen.json +0 -0
  222. {notebook-7.3.0a0.data → notebook-7.3.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/help-extension/open.json +0 -0
  223. {notebook-7.3.0a0.data → notebook-7.3.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/checkpoints.json +0 -0
  224. {notebook-7.3.0a0.data → notebook-7.3.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/edit-notebook-metadata.json +0 -0
  225. {notebook-7.3.0a0.data → notebook-7.3.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/kernel-logo.json +0 -0
  226. {notebook-7.3.0a0.data → notebook-7.3.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/scroll-output.json +0 -0
  227. {notebook-7.3.0a0.data → notebook-7.3.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/tree-extension/file-actions.json +0 -0
  228. {notebook-7.3.0a0.data → notebook-7.3.0b0.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/schemas/@jupyter-notebook/lab-extension/interface-switcher.json +0 -0
  229. {notebook-7.3.0a0.data → notebook-7.3.0b0.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/schemas/@jupyter-notebook/lab-extension/launch-tree.json +0 -0
  230. {notebook-7.3.0a0.data → notebook-7.3.0b0.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/93.eae3497dd223d842d198.js +0 -0
  231. {notebook-7.3.0a0.data → notebook-7.3.0b0.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/style.js +0 -0
  232. {notebook-7.3.0a0.dist-info → notebook-7.3.0b0.dist-info}/entry_points.txt +0 -0
  233. {notebook-7.3.0a0.dist-info → notebook-7.3.0b0.dist-info}/licenses/LICENSE +0 -0
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[9638,8771],{68771:(e,t,n)=>{n.r(t),n.d(t,{ILauncher:()=>a,Launcher:()=>p,LauncherModel:()=>u});const a=new(n(20998).Token)("@jupyterlab/launcher:ILauncher","A service for the application activity launcher.\n Use this to add your extension activities to the launcher panel.");var s,r=n(72703),c=n(70858),o=n(95291),i=n(33625),l=n(2549),d=n(14421),h=n(63485),m=n(78156);class u extends o.VDomModel{constructor(){super(...arguments),this.itemsList=[]}add(e){const t=s.createItem(e);return this.itemsList.push(t),this.stateChanged.emit(void 0),new l.DisposableDelegate((()=>{i.ArrayExt.removeFirstOf(this.itemsList,t),this.stateChanged.emit(void 0)}))}items(){return this.itemsList[Symbol.iterator]()}}class p extends o.VDomRenderer{constructor(e){super(e.model),this._pending=!1,this._cwd="",this._cwd=e.cwd,this.translator=e.translator||c.nullTranslator,this._trans=this.translator.load("jupyterlab"),this._callback=e.callback,this._commands=e.commands,this.addClass("jp-Launcher")}get cwd(){return this._cwd}set cwd(e){this._cwd=e,this.update()}get pending(){return this._pending}set pending(e){this._pending=e}render(){if(!this.model)return null;const e=[this._trans.__("Notebook"),this._trans.__("Console"),this._trans.__("Other")],t=[this._trans.__("Notebook"),this._trans.__("Console")],n=Object.create(null);for(const e of this.model.items()){const t=e.category||this._trans.__("Other");t in n||(n[t]=[]),n[t].push(e)}for(const e in n)n[e]=n[e].sort(((e,t)=>s.sortCmp(e,t,this._cwd,this._commands)));const a=[];let c;const l=[];for(const t of e)l.push(t);for(const t in n)-1===e.indexOf(t)&&l.push(t);return l.forEach((e=>{if(!n[e])return;const l=n[e][0],d={...l.args,cwd:this.cwd},u=t.indexOf(e)>-1,p=this._commands.iconClass(l.command,d),_=this._commands.icon(l.command,d);e in n&&(c=m.createElement("div",{className:"jp-Launcher-section",key:e},m.createElement("div",{className:"jp-Launcher-sectionHeader"},m.createElement(o.LabIcon.resolveReact,{icon:_,iconClass:(0,o.classes)(p,"jp-Icon-cover"),stylesheet:"launcherSection","aria-hidden":"true"}),m.createElement("h2",{className:"jp-Launcher-sectionTitle"},e)),m.createElement("div",{className:"jp-Launcher-cardContainer"},Array.from((0,i.map)(n[e],(e=>function(e,t,n,a,c,i){const l=t.command,d={...t.args,cwd:n.cwd},u=a.caption(l,d),p=a.label(l,d),_=e?p:u||p,g=()=>{!0!==n.pending&&(n.pending=!0,a.execute(l,{...t.args,cwd:n.cwd}).then((e=>{n.pending=!1,e instanceof h.Widget&&i(e)})).catch((e=>{console.error(e),n.pending=!1,(0,r.showErrorMessage)(c._p("Error","Launcher Error"),e)})))},E=a.iconClass(l,d),L=a.icon(l,d);return m.createElement("div",{className:"jp-LauncherCard",title:_,onClick:g,onKeyPress:e=>{"Enter"===e.key&&g()},tabIndex:0,"data-category":t.category||c.__("Other"),key:s.keyProperty.get(t)},m.createElement("div",{className:"jp-LauncherCard-icon"},e?t.kernelIconUrl?m.createElement("img",{src:t.kernelIconUrl,className:"jp-Launcher-kernelIcon",alt:_}):m.createElement("div",{className:"jp-LauncherCard-noKernelIcon"},p[0].toUpperCase()):m.createElement(o.LabIcon.resolveReact,{icon:L,iconClass:(0,o.classes)(E,"jp-Icon-cover"),stylesheet:"launcherCard"})),m.createElement("div",{className:"jp-LauncherCard-label",title:_},m.createElement("p",null,p)))}(u,e,this,this._commands,this._trans,this._callback)))))),a.push(c))})),m.createElement("div",{className:"jp-Launcher-body"},m.createElement("div",{className:"jp-Launcher-content"},m.createElement("div",{className:"jp-Launcher-cwd"},m.createElement("h3",null,this.cwd)),a))}}!function(e){let t=0;e.keyProperty=new d.AttachedProperty({name:"key",create:()=>t++}),e.createItem=function(e){return{...e,category:e.category||"",rank:void 0!==e.rank?e.rank:1/0}},e.sortCmp=function(e,t,n,a){const s=e.rank,r=t.rank;if(s!==r&&void 0!==s&&void 0!==r)return s<r?-1:1;const c=a.label(e.command,{...e.args,cwd:n}),o=a.label(t.command,{...t.args,cwd:n});return c.localeCompare(o)}}(s||(s={}))}}]);
1
+ "use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[9638,8771],{68771:(e,t,n)=>{n.r(t),n.d(t,{ILauncher:()=>a,Launcher:()=>p,LauncherModel:()=>u});const a=new(n(21961).Token)("@jupyterlab/launcher:ILauncher","A service for the application activity launcher.\n Use this to add your extension activities to the launcher panel.");var s,r=n(53876),c=n(93050),o=n(76878),i=n(14931),l=n(49901),d=n(80480),h=n(2260),m=n(78156);class u extends o.VDomModel{constructor(){super(...arguments),this.itemsList=[]}add(e){const t=s.createItem(e);return this.itemsList.push(t),this.stateChanged.emit(void 0),new l.DisposableDelegate((()=>{i.ArrayExt.removeFirstOf(this.itemsList,t),this.stateChanged.emit(void 0)}))}items(){return this.itemsList[Symbol.iterator]()}}class p extends o.VDomRenderer{constructor(e){super(e.model),this._pending=!1,this._cwd="",this._cwd=e.cwd,this.translator=e.translator||c.nullTranslator,this._trans=this.translator.load("jupyterlab"),this._callback=e.callback,this._commands=e.commands,this.addClass("jp-Launcher")}get cwd(){return this._cwd}set cwd(e){this._cwd=e,this.update()}get pending(){return this._pending}set pending(e){this._pending=e}render(){if(!this.model)return null;const e=[this._trans.__("Notebook"),this._trans.__("Console"),this._trans.__("Other")],t=[this._trans.__("Notebook"),this._trans.__("Console")],n=Object.create(null);for(const e of this.model.items()){const t=e.category||this._trans.__("Other");t in n||(n[t]=[]),n[t].push(e)}for(const e in n)n[e]=n[e].sort(((e,t)=>s.sortCmp(e,t,this._cwd,this._commands)));const a=[];let c;const l=[];for(const t of e)l.push(t);for(const t in n)-1===e.indexOf(t)&&l.push(t);return l.forEach((e=>{if(!n[e])return;const l=n[e][0],d={...l.args,cwd:this.cwd},u=t.indexOf(e)>-1,p=this._commands.iconClass(l.command,d),_=this._commands.icon(l.command,d);e in n&&(c=m.createElement("div",{className:"jp-Launcher-section",key:e},m.createElement("div",{className:"jp-Launcher-sectionHeader"},m.createElement(o.LabIcon.resolveReact,{icon:_,iconClass:(0,o.classes)(p,"jp-Icon-cover"),stylesheet:"launcherSection","aria-hidden":"true"}),m.createElement("h2",{className:"jp-Launcher-sectionTitle"},e)),m.createElement("div",{className:"jp-Launcher-cardContainer"},Array.from((0,i.map)(n[e],(e=>function(e,t,n,a,c,i){const l=t.command,d={...t.args,cwd:n.cwd},u=a.caption(l,d),p=a.label(l,d),_=e?p:u||p,g=()=>{!0!==n.pending&&(n.pending=!0,a.execute(l,{...t.args,cwd:n.cwd}).then((e=>{n.pending=!1,e instanceof h.Widget&&i(e)})).catch((e=>{console.error(e),n.pending=!1,(0,r.showErrorMessage)(c._p("Error","Launcher Error"),e)})))},E=a.iconClass(l,d),L=a.icon(l,d);return m.createElement("div",{className:"jp-LauncherCard",title:_,onClick:g,onKeyPress:e=>{"Enter"===e.key&&g()},tabIndex:0,"data-category":t.category||c.__("Other"),key:s.keyProperty.get(t)},m.createElement("div",{className:"jp-LauncherCard-icon"},e?t.kernelIconUrl?m.createElement("img",{src:t.kernelIconUrl,className:"jp-Launcher-kernelIcon",alt:_}):m.createElement("div",{className:"jp-LauncherCard-noKernelIcon"},p[0].toUpperCase()):m.createElement(o.LabIcon.resolveReact,{icon:L,iconClass:(0,o.classes)(E,"jp-Icon-cover"),stylesheet:"launcherCard"})),m.createElement("div",{className:"jp-LauncherCard-label",title:_},m.createElement("p",null,p)))}(u,e,this,this._commands,this._trans,this._callback)))))),a.push(c))})),m.createElement("div",{className:"jp-Launcher-body"},m.createElement("div",{className:"jp-Launcher-content"},m.createElement("div",{className:"jp-Launcher-cwd"},m.createElement("h3",null,this.cwd)),a))}}!function(e){let t=0;e.keyProperty=new d.AttachedProperty({name:"key",create:()=>t++}),e.createItem=function(e){return{...e,category:e.category||"",rank:void 0!==e.rank?e.rank:1/0}},e.sortCmp=function(e,t,n,a){const s=e.rank,r=t.rank;if(s!==r&&void 0!==s&&void 0!==r)return s<r?-1:1;const c=a.label(e.command,{...e.args,cwd:n}),o=a.label(t.command,{...t.args,cwd:n});return c.localeCompare(o)}}(s||(s={}))}}]);
@@ -0,0 +1,352 @@
1
+ "use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[9672],{99672:(e,t,o)=>{o.d(t,{o:()=>S});var a=o(68866),r=o(82616),l=o(98332),n=o(95185),i=o(91211),s=o(92221),d=o(14869),c=o(52865),h=o(89155),p=o(940),u=o(50755);class b extends u.I{}class g extends((0,p.Um)(b)){constructor(){super(...arguments),this.proxy=document.createElement("input")}}class $ extends g{readOnlyChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.readOnly=this.readOnly,this.validate())}autofocusChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.autofocus=this.autofocus,this.validate())}placeholderChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.placeholder=this.placeholder)}listChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.setAttribute("list",this.list),this.validate())}maxlengthChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.maxLength=this.maxlength,this.validate())}minlengthChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.minLength=this.minlength,this.validate())}patternChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.pattern=this.pattern,this.validate())}sizeChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.size=this.size)}spellcheckChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.spellcheck=this.spellcheck)}connectedCallback(){super.connectedCallback(),this.validate(),this.autofocus&&i.SO.queueUpdate((()=>{this.focus()}))}validate(){super.validate(this.control)}handleTextInput(){this.value=this.control.value}handleClearInput(){this.value="",this.control.focus(),this.handleChange()}handleChange(){this.$emit("change")}}(0,n.gn)([(0,l.Lj)({attribute:"readonly",mode:"boolean"})],$.prototype,"readOnly",void 0),(0,n.gn)([(0,l.Lj)({mode:"boolean"})],$.prototype,"autofocus",void 0),(0,n.gn)([l.Lj],$.prototype,"placeholder",void 0),(0,n.gn)([l.Lj],$.prototype,"list",void 0),(0,n.gn)([(0,l.Lj)({converter:l.Id})],$.prototype,"maxlength",void 0),(0,n.gn)([(0,l.Lj)({converter:l.Id})],$.prototype,"minlength",void 0),(0,n.gn)([l.Lj],$.prototype,"pattern",void 0),(0,n.gn)([(0,l.Lj)({converter:l.Id})],$.prototype,"size",void 0),(0,n.gn)([(0,l.Lj)({mode:"boolean"})],$.prototype,"spellcheck",void 0),(0,n.gn)([s.LO],$.prototype,"defaultSlottedNodes",void 0);class v{}(0,h.e)(v,d.v),(0,h.e)($,c.hW,v);var y=o(25269),x=o(17832),m=o(62564);function f(e,t,o){return e.nodeType!==Node.TEXT_NODE||"string"==typeof e.nodeValue&&!!e.nodeValue.trim().length}var k=o(12634),w=o(27002),L=o(58201),C=o(87206),H=o(21601),O=o(61424),T=o(98242),_=o(30550),I=o(13370);const E=k.i`
2
+ ${(0,H.j)("inline-block")} :host {
3
+ font-family: ${C.SV};
4
+ outline: none;
5
+ user-select: none;
6
+ /* Ensure to display focus highlight */
7
+ margin: calc((${C.vx} - ${C.H}) * 1px);
8
+ }
9
+
10
+ .root {
11
+ box-sizing: border-box;
12
+ position: relative;
13
+ display: flex;
14
+ flex-direction: row;
15
+ color: ${C.hY};
16
+ background: ${C._B};
17
+ border-radius: calc(${C.UW} * 1px);
18
+ border: calc(${C.H} * 1px) solid ${C.P0};
19
+ height: calc(${I.i} * 1px);
20
+ }
21
+
22
+ :host([aria-invalid='true']) .root {
23
+ border-color: ${C.a6};
24
+ }
25
+
26
+ .control {
27
+ -webkit-appearance: none;
28
+ font: inherit;
29
+ background: transparent;
30
+ border: 0;
31
+ color: inherit;
32
+ height: calc(100% - 4px);
33
+ width: 100%;
34
+ margin-top: auto;
35
+ margin-bottom: auto;
36
+ border: none;
37
+ padding: 0 calc(${C._5} * 2px + 1px);
38
+ font-size: ${C.cS};
39
+ line-height: ${C.RU};
40
+ }
41
+
42
+ .control:placeholder-shown {
43
+ text-overflow: ellipsis;
44
+ }
45
+
46
+ .control:hover,
47
+ .control:${L.b},
48
+ .control:disabled,
49
+ .control:active {
50
+ outline: none;
51
+ }
52
+
53
+ .label {
54
+ display: block;
55
+ color: ${C.hY};
56
+ cursor: pointer;
57
+ font-size: ${C.cS};
58
+ line-height: ${C.RU};
59
+ margin-bottom: 4px;
60
+ }
61
+
62
+ .label__hidden {
63
+ display: none;
64
+ visibility: hidden;
65
+ }
66
+
67
+ .start,
68
+ .end {
69
+ margin: auto;
70
+ fill: currentcolor;
71
+ }
72
+
73
+ ::slotted(svg) {
74
+ /* TODO: adaptive typography https://github.com/microsoft/fast/issues/2432 */
75
+ width: 16px;
76
+ height: 16px;
77
+ }
78
+
79
+ .start {
80
+ margin-inline-start: 11px;
81
+ }
82
+
83
+ .end {
84
+ margin-inline-end: 11px;
85
+ }
86
+
87
+ :host(:hover:not([disabled])) .root {
88
+ background: ${C.Tm};
89
+ border-color: ${C.Dg};
90
+ }
91
+
92
+ :host([aria-invalid='true']:hover:not([disabled])) .root {
93
+ border-color: ${C.ek};
94
+ }
95
+
96
+ :host(:active:not([disabled])) .root {
97
+ background: ${C.Tm};
98
+ border-color: ${C.hP};
99
+ }
100
+
101
+ :host([aria-invalid='true']:active:not([disabled])) .root {
102
+ border-color: ${C.GB};
103
+ }
104
+
105
+ :host(:focus-within:not([disabled])) .root {
106
+ border-color: ${C.D8};
107
+ box-shadow: 0 0 0 calc((${C.vx} - ${C.H}) * 1px)
108
+ ${C.D8};
109
+ }
110
+
111
+ :host([aria-invalid='true']:focus-within:not([disabled])) .root {
112
+ border-color: ${C.mH};
113
+ box-shadow: 0 0 0 calc((${C.vx} - ${C.H}) * 1px)
114
+ ${C.mH};
115
+ }
116
+
117
+ :host([appearance='filled']) .root {
118
+ background: ${C.wF};
119
+ }
120
+
121
+ :host([appearance='filled']:hover:not([disabled])) .root {
122
+ background: ${C.Xi};
123
+ }
124
+
125
+ :host([disabled]) .label,
126
+ :host([readonly]) .label,
127
+ :host([readonly]) .control,
128
+ :host([disabled]) .control {
129
+ cursor: ${O.H};
130
+ }
131
+
132
+ :host([disabled]) {
133
+ opacity: ${C.VF};
134
+ }
135
+
136
+ :host([disabled]) .control {
137
+ border-color: ${C.ak};
138
+ }
139
+ `.withBehaviors((0,T.vF)(k.i`
140
+ .root,
141
+ :host([appearance='filled']) .root {
142
+ forced-color-adjust: none;
143
+ background: ${_.H.Field};
144
+ border-color: ${_.H.FieldText};
145
+ }
146
+ :host([aria-invalid='true']) .root {
147
+ border-style: dashed;
148
+ }
149
+ :host(:hover:not([disabled])) .root,
150
+ :host([appearance='filled']:hover:not([disabled])) .root,
151
+ :host([appearance='filled']:hover) .root {
152
+ background: ${_.H.Field};
153
+ border-color: ${_.H.Highlight};
154
+ }
155
+ .start,
156
+ .end {
157
+ fill: currentcolor;
158
+ }
159
+ :host([disabled]) {
160
+ opacity: 1;
161
+ }
162
+ :host([disabled]) .root,
163
+ :host([appearance='filled']:hover[disabled]) .root {
164
+ border-color: ${_.H.GrayText};
165
+ background: ${_.H.Field};
166
+ }
167
+ :host(:focus-within:enabled) .root {
168
+ border-color: ${_.H.Highlight};
169
+ box-shadow: 0 0 0 calc((${C.vx} - ${C.H}) * 1px)
170
+ ${_.H.Highlight};
171
+ }
172
+ input::placeholder {
173
+ color: ${_.H.GrayText};
174
+ }
175
+ `)),F=w.DesignToken.create("clear-button-hover").withDefault((e=>{const t=C.DF.getValueFor(e),o=C.At.getValueFor(e);return t.evaluate(e,o.evaluate(e).hover).hover})),D=w.DesignToken.create("clear-button-active").withDefault((e=>{const t=C.DF.getValueFor(e),o=C.At.getValueFor(e);return t.evaluate(e,o.evaluate(e).hover).active}));class j extends ${constructor(){super(...arguments),this.appearance="outline"}}(0,r.gn)([l.Lj],j.prototype,"appearance",void 0);const z=j.compose({baseName:"search",baseClass:$,template:(e,t)=>y.d`
176
+ <template
177
+ class="
178
+ ${e=>e.readOnly?"readonly":""}
179
+ "
180
+ >
181
+ <label
182
+ part="label"
183
+ for="control"
184
+ class="${e=>e.defaultSlottedNodes&&e.defaultSlottedNodes.length?"label":"label label__hidden"}"
185
+ >
186
+ <slot
187
+ ${(0,x.Q)({property:"defaultSlottedNodes",filter:f})}
188
+ ></slot>
189
+ </label>
190
+ <div class="root" part="root" ${(0,m.i)("root")}>
191
+ ${(0,c.m9)(e,t)}
192
+ <div class="input-wrapper" part="input-wrapper">
193
+ <input
194
+ class="control"
195
+ part="control"
196
+ id="control"
197
+ @input="${e=>e.handleTextInput()}"
198
+ @change="${e=>e.handleChange()}"
199
+ ?autofocus="${e=>e.autofocus}"
200
+ ?disabled="${e=>e.disabled}"
201
+ list="${e=>e.list}"
202
+ maxlength="${e=>e.maxlength}"
203
+ minlength="${e=>e.minlength}"
204
+ pattern="${e=>e.pattern}"
205
+ placeholder="${e=>e.placeholder}"
206
+ ?readonly="${e=>e.readOnly}"
207
+ ?required="${e=>e.required}"
208
+ size="${e=>e.size}"
209
+ ?spellcheck="${e=>e.spellcheck}"
210
+ :value="${e=>e.value}"
211
+ type="search"
212
+ aria-atomic="${e=>e.ariaAtomic}"
213
+ aria-busy="${e=>e.ariaBusy}"
214
+ aria-controls="${e=>e.ariaControls}"
215
+ aria-current="${e=>e.ariaCurrent}"
216
+ aria-describedby="${e=>e.ariaDescribedby}"
217
+ aria-details="${e=>e.ariaDetails}"
218
+ aria-disabled="${e=>e.ariaDisabled}"
219
+ aria-errormessage="${e=>e.ariaErrormessage}"
220
+ aria-flowto="${e=>e.ariaFlowto}"
221
+ aria-haspopup="${e=>e.ariaHaspopup}"
222
+ aria-hidden="${e=>e.ariaHidden}"
223
+ aria-invalid="${e=>e.ariaInvalid}"
224
+ aria-keyshortcuts="${e=>e.ariaKeyshortcuts}"
225
+ aria-label="${e=>e.ariaLabel}"
226
+ aria-labelledby="${e=>e.ariaLabelledby}"
227
+ aria-live="${e=>e.ariaLive}"
228
+ aria-owns="${e=>e.ariaOwns}"
229
+ aria-relevant="${e=>e.ariaRelevant}"
230
+ aria-roledescription="${e=>e.ariaRoledescription}"
231
+ ${(0,m.i)("control")}
232
+ />
233
+ <slot name="close-button">
234
+ <button
235
+ class="clear-button ${e=>e.value?"":"clear-button__hidden"}"
236
+ part="clear-button"
237
+ tabindex="-1"
238
+ @click=${e=>e.handleClearInput()}
239
+ >
240
+ <slot name="close-glyph">
241
+ <svg
242
+ width="9"
243
+ height="9"
244
+ viewBox="0 0 9 9"
245
+ xmlns="http://www.w3.org/2000/svg"
246
+ >
247
+ <path
248
+ d="M0.146447 0.146447C0.338683 -0.0478972 0.645911 -0.0270359 0.853553 0.146447L4.5 3.793L8.14645 0.146447C8.34171 -0.0488155 8.65829 -0.0488155 8.85355 0.146447C9.04882 0.341709 9.04882 0.658291 8.85355 0.853553L5.207 4.5L8.85355 8.14645C9.05934 8.35223 9.03129 8.67582 8.85355 8.85355C8.67582 9.03129 8.35409 9.02703 8.14645 8.85355L4.5 5.207L0.853553 8.85355C0.658291 9.04882 0.341709 9.04882 0.146447 8.85355C-0.0488155 8.65829 -0.0488155 8.34171 0.146447 8.14645L3.793 4.5L0.146447 0.853553C-0.0268697 0.680237 -0.0457894 0.34079 0.146447 0.146447Z"
249
+ />
250
+ </svg>
251
+ </slot>
252
+ </button>
253
+ </slot>
254
+ </div>
255
+ ${(0,c.LC)(e,t)}
256
+ </div>
257
+ </template>
258
+ `,styles:(e,t)=>k.i`
259
+ ${E}
260
+
261
+ .control::-webkit-search-cancel-button {
262
+ -webkit-appearance: none;
263
+ }
264
+
265
+ .control:hover,
266
+ .control:${L.b},
267
+ .control:disabled,
268
+ .control:active {
269
+ outline: none;
270
+ }
271
+
272
+ .clear-button {
273
+ height: calc(100% - 2px);
274
+ opacity: 0;
275
+ margin: 1px;
276
+ background: transparent;
277
+ color: ${C.hY};
278
+ fill: currentcolor;
279
+ border: none;
280
+ border-radius: calc(${C.UW} * 1px);
281
+ min-width: calc(${I.i} * 1px);
282
+ font-size: ${C.cS};
283
+ line-height: ${C.RU};
284
+ outline: none;
285
+ font-family: ${C.SV};
286
+ padding: 0 calc((10 + (${C._5} * 2 * ${C.hV})) * 1px);
287
+ }
288
+
289
+ .clear-button:hover {
290
+ background: ${C.Qp};
291
+ }
292
+
293
+ .clear-button:active {
294
+ background: ${C.sG};
295
+ }
296
+
297
+ :host([appearance='filled']) .clear-button:hover {
298
+ background: ${F};
299
+ }
300
+
301
+ :host([appearance='filled']) .clear-button:active {
302
+ background: ${D};
303
+ }
304
+
305
+ .input-wrapper {
306
+ display: flex;
307
+ position: relative;
308
+ width: 100%;
309
+ }
310
+
311
+ .start,
312
+ .end {
313
+ display: flex;
314
+ margin: 1px;
315
+ fill: currentcolor;
316
+ }
317
+
318
+ ::slotted([slot='end']) {
319
+ height: 100%;
320
+ }
321
+
322
+ .end {
323
+ margin-inline-end: 1px;
324
+ height: calc(100% - 2px);
325
+ }
326
+
327
+ ::slotted(svg) {
328
+ /* TODO: adaptive typography https://github.com/microsoft/fast/issues/2432 */
329
+ width: 16px;
330
+ height: 16px;
331
+ margin-inline-end: 11px;
332
+ margin-inline-start: 11px;
333
+ margin-top: auto;
334
+ margin-bottom: auto;
335
+ }
336
+
337
+ .clear-button__hidden {
338
+ opacity: 0;
339
+ }
340
+
341
+ :host(:hover:not([disabled], [readOnly])) .clear-button,
342
+ :host(:active:not([disabled], [readOnly])) .clear-button,
343
+ :host(:focus-within:not([disabled], [readOnly])) .clear-button {
344
+ opacity: 1;
345
+ }
346
+
347
+ :host(:hover:not([disabled], [readOnly])) .clear-button__hidden,
348
+ :host(:active:not([disabled], [readOnly])) .clear-button__hidden,
349
+ :host(:focus-within:not([disabled], [readOnly])) .clear-button__hidden {
350
+ opacity: 0;
351
+ }
352
+ `,shadowOptions:{delegatesFocus:!0}});var U=o(78156),R=o.n(U),M=o(4444);(0,a.W)().register(z());const S=(0,U.forwardRef)(((e,t)=>{const o=(0,U.useRef)(null),{className:a,readonly:r,appearance:l,placeholder:n,list:i,pattern:s,readOnly:d,autofocus:c,maxlength:h,minlength:p,size:u,spellcheck:b,disabled:g,required:$,...v}=e;return(0,M.O)(o,"input",e.onInput),(0,M.O)(o,"change",e.onChange),(0,M.h)(o,"readOnly",e.readOnly),(0,M.h)(o,"autofocus",e.autofocus),(0,M.h)(o,"maxlength",e.maxlength),(0,M.h)(o,"minlength",e.minlength),(0,M.h)(o,"size",e.size),(0,M.h)(o,"spellcheck",e.spellcheck),(0,M.h)(o,"disabled",e.disabled),(0,M.h)(o,"required",e.required),(0,U.useImperativeHandle)(t,(()=>o.current),[o.current]),R().createElement("jp-search",{ref:o,...v,appearance:e.appearance,placeholder:e.placeholder,list:e.list,pattern:e.pattern,class:e.className,exportparts:e.exportparts,for:e.htmlFor,part:e.part,tabindex:e.tabIndex,readonly:e.readonly?"":void 0,style:{...e.style}},e.children)}))}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[9680,7812],{99680:(e,t,n)=>{n.r(t),n.d(t,{IMarkdownViewerTracker:()=>a,MarkdownDocument:()=>w,MarkdownViewer:()=>f,MarkdownViewerFactory:()=>_,MarkdownViewerTableOfContentsFactory:()=>s,MarkdownViewerTableOfContentsModel:()=>i});var r=n(85996);class i extends r.TableOfContentsModel{constructor(e,t,n){super(e,n),this.parser=t}get documentType(){return"markdown-viewer"}get isAlwaysActive(){return!0}get supportedOptions(){return["maximalDepth","numberingH1","numberHeaders"]}getHeadings(){const e=this.widget.context.model.toString(),t=r.TableOfContentsUtils.filterHeadings(r.TableOfContentsUtils.Markdown.getHeadings(e),{...this.configuration,baseNumbering:1});return Promise.resolve(t)}}class s extends r.TableOfContentsFactory{constructor(e,t,n){super(e),this.parser=t,this.sanitizer=n}_createNew(e,t){const n=new i(e,this.parser,t);let s=new WeakMap;const o=(t,n)=>{if(n){const t=s.get(n);if(t){const n=e.content.node.getBoundingClientRect(),r=t.getBoundingClientRect();(r.top>n.bottom||r.bottom<n.top)&&t.scrollIntoView({block:"center"})}else console.warn("Heading element not found for heading",n,"in widget",e)}},a=()=>{this.parser&&(r.TableOfContentsUtils.clearNumbering(e.content.node),s=new WeakMap,n.headings.forEach((async t=>{var n;const i=await r.TableOfContentsUtils.Markdown.getHeadingId(this.parser,t.raw,t.level,this.sanitizer);if(!i)return;const o=`h${t.level}[id="${CSS.escape(i)}"]`;s.set(t,r.TableOfContentsUtils.addPrefix(e.content.node,o,null!==(n=t.prefix)&&void 0!==n?n:""))})))};return e.content.ready.then((()=>{a(),e.content.rendered.connect(a),n.activeHeadingChanged.connect(o),n.headingsChanged.connect(a),e.disposed.connect((()=>{e.content.rendered.disconnect(a),n.activeHeadingChanged.disconnect(o),n.headingsChanged.disconnect(a)}))})),n}}var o=n(20998);const a=new o.Token("@jupyterlab/markdownviewer:IMarkdownViewerTracker","A widget tracker for markdown\n document viewers. Use this if you want to iterate over and interact with rendered markdown documents.");var d=n(72703),c=n(65848),l=n(89945),h=n(62514),u=n(70858),g=n(81997),m=n(63485);const p="text/markdown";class f extends m.Widget{constructor(e){super(),this._config={...f.defaultConfig},this._fragment="",this._ready=new o.PromiseDelegate,this._isRendering=!1,this._renderRequested=!1,this._rendered=new g.Signal(this),this.context=e.context,this.translator=e.translator||u.nullTranslator,this._trans=this.translator.load("jupyterlab"),this.renderer=e.renderer,this.node.tabIndex=0,this.addClass("jp-MarkdownViewer"),(this.layout=new m.StackedLayout).addWidget(this.renderer),this.context.ready.then((async()=>{await this._render(),this._monitor=new c.ActivityMonitor({signal:this.context.model.contentChanged,timeout:this._config.renderTimeout}),this._monitor.activityStopped.connect(this.update,this),this._ready.resolve(void 0)}))}get ready(){return this._ready.promise}get rendered(){return this._rendered}setFragment(e){this._fragment=e,this.update()}setOption(e,t){if(this._config[e]===t)return;this._config[e]=t;const{style:n}=this.renderer.node;switch(e){case"fontFamily":n.setProperty("font-family",t);break;case"fontSize":n.setProperty("font-size",t?t+"px":null);break;case"hideFrontMatter":this.update();break;case"lineHeight":n.setProperty("line-height",t?t.toString():null);break;case"lineWidth":{const e=t?`calc(50% - ${t/2}ch)`:null;n.setProperty("padding-left",e),n.setProperty("padding-right",e);break}case"renderTimeout":this._monitor&&(this._monitor.timeout=t)}}dispose(){this.isDisposed||(this._monitor&&this._monitor.dispose(),this._monitor=null,super.dispose())}onUpdateRequest(e){this.context.isReady&&!this.isDisposed&&(this._render(),this._fragment="")}onActivateRequest(e){this.node.focus()}async _render(){if(this.isDisposed)return;if(this._isRendering)return void(this._renderRequested=!0);this._renderRequested=!1;const{context:e}=this,{model:t}=e,n=t.toString(),r={};r[p]=this._config.hideFrontMatter?y.removeFrontMatter(n):n;const i=new h.MimeModel({data:r,metadata:{fragment:this._fragment}});try{if(this._isRendering=!0,await this.renderer.renderModel(i),this._isRendering=!1,this._renderRequested)return this._render();this._rendered.emit()}catch(t){requestAnimationFrame((()=>{this.dispose()})),(0,d.showErrorMessage)(this._trans.__("Renderer Failure: %1",e.path),t)}}}!function(e){e.defaultConfig={fontFamily:null,fontSize:null,lineHeight:null,lineWidth:null,hideFrontMatter:!0,renderTimeout:1e3}}(f||(f={}));class w extends l.DocumentWidget{setFragment(e){this.content.setFragment(e)}}class _ extends l.ABCWidgetFactory{constructor(e){super(y.createRegistryOptions(e)),this._fileType=e.primaryFileType,this._rendermime=e.rendermime}createNewWidget(e){var t,n,r,i,s;const o=this._rendermime.clone({resolver:e.urlResolver}).createRenderer(p),a=new f({context:e,renderer:o});return a.title.icon=null===(t=this._fileType)||void 0===t?void 0:t.icon,a.title.iconClass=null!==(r=null===(n=this._fileType)||void 0===n?void 0:n.iconClass)&&void 0!==r?r:"",a.title.iconLabel=null!==(s=null===(i=this._fileType)||void 0===i?void 0:i.iconLabel)&&void 0!==s?s:"",a.title.caption=this.label,new w({content:a,context:e})}}var y;!function(e){e.createRegistryOptions=function(e){return{...e,readOnly:!0}},e.removeFrontMatter=function(e){const t=e.match(/^---\n[^]*?\n(---|...)\n/);if(!t)return e;const{length:n}=t[0];return e.slice(n)}}(y||(y={}))}}]);
1
+ "use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[9680,7812],{99680:(e,t,n)=>{n.r(t),n.d(t,{IMarkdownViewerTracker:()=>a,MarkdownDocument:()=>w,MarkdownViewer:()=>f,MarkdownViewerFactory:()=>_,MarkdownViewerTableOfContentsFactory:()=>s,MarkdownViewerTableOfContentsModel:()=>i});var r=n(10035);class i extends r.TableOfContentsModel{constructor(e,t,n){super(e,n),this.parser=t}get documentType(){return"markdown-viewer"}get isAlwaysActive(){return!0}get supportedOptions(){return["maximalDepth","numberingH1","numberHeaders"]}getHeadings(){const e=this.widget.context.model.toString(),t=r.TableOfContentsUtils.filterHeadings(r.TableOfContentsUtils.Markdown.getHeadings(e),{...this.configuration,baseNumbering:1});return Promise.resolve(t)}}class s extends r.TableOfContentsFactory{constructor(e,t,n){super(e),this.parser=t,this.sanitizer=n}_createNew(e,t){const n=new i(e,this.parser,t);let s=new WeakMap;const o=(t,n)=>{if(n){const t=s.get(n);if(t){const n=e.content.node.getBoundingClientRect(),r=t.getBoundingClientRect();(r.top>n.bottom||r.bottom<n.top)&&t.scrollIntoView({block:"center"})}else console.warn("Heading element not found for heading",n,"in widget",e)}},a=()=>{this.parser&&(r.TableOfContentsUtils.clearNumbering(e.content.node),s=new WeakMap,n.headings.forEach((async t=>{var n;const i=await r.TableOfContentsUtils.Markdown.getHeadingId(this.parser,t.raw,t.level,this.sanitizer);if(!i)return;const o=`h${t.level}[id="${CSS.escape(i)}"]`;s.set(t,r.TableOfContentsUtils.addPrefix(e.content.node,o,null!==(n=t.prefix)&&void 0!==n?n:""))})))};return e.content.ready.then((()=>{a(),e.content.rendered.connect(a),n.activeHeadingChanged.connect(o),n.headingsChanged.connect(a),e.disposed.connect((()=>{e.content.rendered.disconnect(a),n.activeHeadingChanged.disconnect(o),n.headingsChanged.disconnect(a)}))})),n}}var o=n(21961);const a=new o.Token("@jupyterlab/markdownviewer:IMarkdownViewerTracker","A widget tracker for markdown\n document viewers. Use this if you want to iterate over and interact with rendered markdown documents.");var d=n(53876),c=n(20754),l=n(23764),h=n(58194),u=n(93050),g=n(2159),m=n(2260);const p="text/markdown";class f extends m.Widget{constructor(e){super(),this._config={...f.defaultConfig},this._fragment="",this._ready=new o.PromiseDelegate,this._isRendering=!1,this._renderRequested=!1,this._rendered=new g.Signal(this),this.context=e.context,this.translator=e.translator||u.nullTranslator,this._trans=this.translator.load("jupyterlab"),this.renderer=e.renderer,this.node.tabIndex=0,this.addClass("jp-MarkdownViewer"),(this.layout=new m.StackedLayout).addWidget(this.renderer),this.context.ready.then((async()=>{await this._render(),this._monitor=new c.ActivityMonitor({signal:this.context.model.contentChanged,timeout:this._config.renderTimeout}),this._monitor.activityStopped.connect(this.update,this),this._ready.resolve(void 0)}))}get ready(){return this._ready.promise}get rendered(){return this._rendered}setFragment(e){this._fragment=e,this.update()}setOption(e,t){if(this._config[e]===t)return;this._config[e]=t;const{style:n}=this.renderer.node;switch(e){case"fontFamily":n.setProperty("font-family",t);break;case"fontSize":n.setProperty("font-size",t?t+"px":null);break;case"hideFrontMatter":this.update();break;case"lineHeight":n.setProperty("line-height",t?t.toString():null);break;case"lineWidth":{const e=t?`calc(50% - ${t/2}ch)`:null;n.setProperty("padding-left",e),n.setProperty("padding-right",e);break}case"renderTimeout":this._monitor&&(this._monitor.timeout=t)}}dispose(){this.isDisposed||(this._monitor&&this._monitor.dispose(),this._monitor=null,super.dispose())}onUpdateRequest(e){this.context.isReady&&!this.isDisposed&&(this._render(),this._fragment="")}onActivateRequest(e){this.node.focus()}async _render(){if(this.isDisposed)return;if(this._isRendering)return void(this._renderRequested=!0);this._renderRequested=!1;const{context:e}=this,{model:t}=e,n=t.toString(),r={};r[p]=this._config.hideFrontMatter?y.removeFrontMatter(n):n;const i=new h.MimeModel({data:r,metadata:{fragment:this._fragment}});try{if(this._isRendering=!0,await this.renderer.renderModel(i),this._isRendering=!1,this._renderRequested)return this._render();this._rendered.emit()}catch(t){requestAnimationFrame((()=>{this.dispose()})),(0,d.showErrorMessage)(this._trans.__("Renderer Failure: %1",e.path),t)}}}!function(e){e.defaultConfig={fontFamily:null,fontSize:null,lineHeight:null,lineWidth:null,hideFrontMatter:!0,renderTimeout:1e3}}(f||(f={}));class w extends l.DocumentWidget{setFragment(e){this.content.setFragment(e)}}class _ extends l.ABCWidgetFactory{constructor(e){super(y.createRegistryOptions(e)),this._fileType=e.primaryFileType,this._rendermime=e.rendermime}createNewWidget(e){var t,n,r,i,s;const o=this._rendermime.clone({resolver:e.urlResolver}).createRenderer(p),a=new f({context:e,renderer:o});return a.title.icon=null===(t=this._fileType)||void 0===t?void 0:t.icon,a.title.iconClass=null!==(r=null===(n=this._fileType)||void 0===n?void 0:n.iconClass)&&void 0!==r?r:"",a.title.iconLabel=null!==(s=null===(i=this._fileType)||void 0===i?void 0:i.iconLabel)&&void 0!==s?s:"",a.title.caption=this.label,new w({content:a,context:e})}}var y;!function(e){e.createRegistryOptions=function(e){return{...e,readOnly:!0}},e.removeFrontMatter=function(e){const t=e.match(/^---\n[^]*?\n(---|...)\n/);if(!t)return e;const{length:n}=t[0];return e.slice(n)}}(y||(y={}))}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[9685,7252],{79685:(e,t,r)=>{r.r(t),r.d(t,{default:()=>k});var n,a=r(94535),o=r(72703),d=r(65848),i=r(4741),c=r(62514),s=r(89150),w=r(85996),m=r(70858);!function(e){e.markdownPreview="markdownviewer:open",e.markdownEditor="markdownviewer:edit"}(n||(n={}));const p="Markdown Preview",l={activate:function(e,t,r,a,s,w,m){const k=r.load("jupyterlab"),{commands:u,docRegistry:g}=e;t.addFactory(c.markdownRendererFactory);const f=new o.WidgetTracker({namespace:"markdownviewer-widget"});let h={...i.MarkdownViewer.defaultConfig};function y(e){Object.keys(h).forEach((t=>{var r;e.setOption(t,null!==(r=h[t])&&void 0!==r?r:null)}))}if(s){const e=e=>{h=e.composite,f.forEach((e=>{y(e.content)}))};s.load(l.id).then((t=>{t.changed.connect((()=>{e(t)})),e(t)})).catch((e=>{console.error(e.message)}))}const v=new i.MarkdownViewerFactory({rendermime:t,name:p,label:k.__("Markdown Preview"),primaryFileType:g.getFileType("markdown"),fileTypes:["markdown"],defaultRendered:["markdown"]});return v.widgetCreated.connect(((e,t)=>{t.context.pathChanged.connect((()=>{f.save(t)})),y(t.content),f.add(t)})),g.addWidgetFactory(v),a&&a.restore(f,{command:"docmanager:open",args:e=>({path:e.context.path,factory:p}),name:e=>e.context.path}),u.addCommand(n.markdownPreview,{label:k.__("Markdown Preview"),execute:e=>{const t=e.path;if("string"==typeof t)return u.execute("docmanager:open",{path:t,factory:p,options:e.options})}}),u.addCommand(n.markdownEditor,{execute:()=>{const e=f.currentWidget;if(!e)return;const t=e.context.path;return u.execute("docmanager:open",{path:t,factory:"Editor",options:{mode:"split-right"}})},isVisible:()=>{const e=f.currentWidget;return e&&".md"===d.PathExt.extname(e.context.path)||!1},label:k.__("Show Markdown Editor")}),w&&w.add(new i.MarkdownViewerTableOfContentsFactory(f,t.markdownParser,null!=m?m:t.sanitizer)),f},id:"@jupyterlab/markdownviewer-extension:plugin",description:"Adds markdown file viewer and provides its tracker.",provides:i.IMarkdownViewerTracker,requires:[c.IRenderMimeRegistry,m.ITranslator],optional:[a.ILayoutRestorer,s.ISettingRegistry,w.ITableOfContentsRegistry,o.ISanitizer],autoStart:!0},k=l}}]);
1
+ "use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[9685,7252],{79685:(e,t,r)=>{r.r(t),r.d(t,{default:()=>k});var n,a=r(73852),o=r(53876),d=r(20754),i=r(40907),c=r(58194),s=r(3012),w=r(10035),m=r(93050);!function(e){e.markdownPreview="markdownviewer:open",e.markdownEditor="markdownviewer:edit"}(n||(n={}));const p="Markdown Preview",l={activate:function(e,t,r,a,s,w,m){const k=r.load("jupyterlab"),{commands:u,docRegistry:g}=e;t.addFactory(c.markdownRendererFactory);const f=new o.WidgetTracker({namespace:"markdownviewer-widget"});let h={...i.MarkdownViewer.defaultConfig};function y(e){Object.keys(h).forEach((t=>{var r;e.setOption(t,null!==(r=h[t])&&void 0!==r?r:null)}))}if(s){const e=e=>{h=e.composite,f.forEach((e=>{y(e.content)}))};s.load(l.id).then((t=>{t.changed.connect((()=>{e(t)})),e(t)})).catch((e=>{console.error(e.message)}))}const v=new i.MarkdownViewerFactory({rendermime:t,name:p,label:k.__("Markdown Preview"),primaryFileType:g.getFileType("markdown"),fileTypes:["markdown"],defaultRendered:["markdown"]});return v.widgetCreated.connect(((e,t)=>{t.context.pathChanged.connect((()=>{f.save(t)})),y(t.content),f.add(t)})),g.addWidgetFactory(v),a&&a.restore(f,{command:"docmanager:open",args:e=>({path:e.context.path,factory:p}),name:e=>e.context.path}),u.addCommand(n.markdownPreview,{label:k.__("Markdown Preview"),execute:e=>{const t=e.path;if("string"==typeof t)return u.execute("docmanager:open",{path:t,factory:p,options:e.options})}}),u.addCommand(n.markdownEditor,{execute:()=>{const e=f.currentWidget;if(!e)return;const t=e.context.path;return u.execute("docmanager:open",{path:t,factory:"Editor",options:{mode:"split-right"}})},isVisible:()=>{const e=f.currentWidget;return e&&".md"===d.PathExt.extname(e.context.path)||!1},label:k.__("Show Markdown Editor")}),w&&w.add(new i.MarkdownViewerTableOfContentsFactory(f,t.markdownParser,null!=m?m:t.sanitizer)),f},id:"@jupyterlab/markdownviewer-extension:plugin",description:"Adds markdown file viewer and provides its tracker.",provides:i.IMarkdownViewerTracker,requires:[c.IRenderMimeRegistry,m.ITranslator],optional:[a.ILayoutRestorer,s.ISettingRegistry,w.ITableOfContentsRegistry,o.ISanitizer],autoStart:!0},k=l}}]);