@perses-dev/markdown-plugin 0.12.0 → 0.13.0-beta.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 (106) hide show
  1. package/__mf/js/{Markdown.20f59bf1.js → Markdown.7274a42c.js} +4 -4
  2. package/__mf/js/async/121.4f618242.js +2 -0
  3. package/__mf/js/async/192.5fcbacc8.js +1 -0
  4. package/__mf/js/async/235.8e51686f.js +1 -0
  5. package/__mf/js/async/274.46511e6c.js +2 -0
  6. package/__mf/js/async/354.a4ff15e0.js +4 -0
  7. package/__mf/js/async/354.a4ff15e0.js.LICENSE.txt +9 -0
  8. package/__mf/js/async/356.f2464831.js +1 -0
  9. package/__mf/js/async/377.33c77c6a.js +1 -0
  10. package/__mf/js/async/392.9a0e3220.js +2 -0
  11. package/__mf/js/async/470.4ec75a15.js +2 -0
  12. package/__mf/js/async/493.09764f91.js +102 -0
  13. package/__mf/js/async/555.aa8a9203.js +1 -0
  14. package/__mf/js/async/587.20e47b23.js +1 -0
  15. package/__mf/js/async/616.fcbca7cf.js +1 -0
  16. package/__mf/js/async/663.9789bc66.js +1 -0
  17. package/__mf/js/async/680.d2acb11f.js +12 -0
  18. package/__mf/js/async/808.1e94c038.js +43 -0
  19. package/__mf/js/async/808.1e94c038.js.LICENSE.txt +102 -0
  20. package/__mf/js/async/936.7be3b9ae.js +1 -0
  21. package/__mf/js/async/94.eb815395.js +10 -0
  22. package/__mf/js/async/941.601daa22.js +2 -0
  23. package/__mf/js/async/968.bc5b60bc.js +1 -0
  24. package/__mf/js/async/__federation_expose_Markdown.45af9b33.js +1 -0
  25. package/__mf/js/async/lib-router.8d81e712.js +2 -0
  26. package/__mf/js/{main.d8c74d29.js → main.c38f12c3.js} +3 -3
  27. package/lib/Markdown.d.ts +2 -2
  28. package/lib/Markdown.d.ts.map +1 -1
  29. package/lib/Markdown.js +3 -3
  30. package/lib/Markdown.js.map +1 -1
  31. package/lib/MarkdownPanel.d.ts +3 -3
  32. package/lib/MarkdownPanel.d.ts.map +1 -1
  33. package/lib/MarkdownPanel.js +7 -7
  34. package/lib/MarkdownPanel.js.map +1 -1
  35. package/lib/MarkdownPanelOptionsEditor.d.ts +3 -3
  36. package/lib/MarkdownPanelOptionsEditor.d.ts.map +1 -1
  37. package/lib/MarkdownPanelOptionsEditor.js +2 -2
  38. package/lib/MarkdownPanelOptionsEditor.js.map +1 -1
  39. package/lib/bootstrap.js +2 -2
  40. package/lib/getPluginModule.d.ts +1 -1
  41. package/lib/getPluginModule.d.ts.map +1 -1
  42. package/lib/getPluginModule.js +3 -1
  43. package/lib/getPluginModule.js.map +1 -1
  44. package/lib/index-federation.js +1 -1
  45. package/lib/index.js +5 -5
  46. package/lib/index.js.map +1 -1
  47. package/lib/markdown-panel-model.d.ts +1 -1
  48. package/lib/markdown-panel-model.d.ts.map +1 -1
  49. package/lib/markdown-panel-model.js.map +1 -1
  50. package/lib/setup-tests.d.ts +1 -1
  51. package/lib/setup-tests.d.ts.map +1 -1
  52. package/lib/setup-tests.js +2 -2
  53. package/lib/setup-tests.js.map +1 -1
  54. package/mf-manifest.json +29 -72
  55. package/mf-stats.json +29 -80
  56. package/package.json +10 -10
  57. package/__mf/js/async/121.a9ac3871.js +0 -2
  58. package/__mf/js/async/125.3fab3f86.js +0 -10
  59. package/__mf/js/async/177.5335836c.js +0 -1
  60. package/__mf/js/async/187.e36c4021.js +0 -7
  61. package/__mf/js/async/187.e36c4021.js.LICENSE.txt +0 -39
  62. package/__mf/js/async/192.1bcbacc5.js +0 -1
  63. package/__mf/js/async/235.f508ea23.js +0 -1
  64. package/__mf/js/async/274.fa2aa111.js +0 -2
  65. package/__mf/js/async/356.90d42c91.js +0 -1
  66. package/__mf/js/async/377.e079a255.js +0 -1
  67. package/__mf/js/async/392.6999603c.js +0 -2
  68. package/__mf/js/async/43.e1743b42.js +0 -2
  69. package/__mf/js/async/43.e1743b42.js.LICENSE.txt +0 -24
  70. package/__mf/js/async/470.926a1541.js +0 -2
  71. package/__mf/js/async/546.8bdb58c4.js +0 -24
  72. package/__mf/js/async/546.8bdb58c4.js.LICENSE.txt +0 -19
  73. package/__mf/js/async/558.3bb15034.js +0 -1
  74. package/__mf/js/async/587.99ce4abf.js +0 -1
  75. package/__mf/js/async/588.cfa85cf3.js +0 -1
  76. package/__mf/js/async/616.79bbce2d.js +0 -1
  77. package/__mf/js/async/71.1717f603.js +0 -1
  78. package/__mf/js/async/73.1d9051a3.js +0 -12
  79. package/__mf/js/async/854.1c79821c.js +0 -1
  80. package/__mf/js/async/873.8558505f.js +0 -1
  81. package/__mf/js/async/935.ce92b5f1.js +0 -139
  82. package/__mf/js/async/935.ce92b5f1.js.LICENSE.txt +0 -37
  83. package/__mf/js/async/941.4cd009e6.js +0 -2
  84. package/__mf/js/async/968.14a1791c.js +0 -1
  85. package/__mf/js/async/978.f2e7b013.js +0 -1
  86. package/__mf/js/async/__federation_expose_Markdown.c6f196e2.js +0 -1
  87. package/__mf/js/async/lib-router.ad82c2bf.js +0 -2
  88. package/lib/cjs/Markdown.js +0 -37
  89. package/lib/cjs/MarkdownPanel.js +0 -148
  90. package/lib/cjs/MarkdownPanelOptionsEditor.js +0 -58
  91. package/lib/cjs/bootstrap.js +0 -26
  92. package/lib/cjs/env.d.js +0 -14
  93. package/lib/cjs/getPluginModule.js +0 -39
  94. package/lib/cjs/index-federation.js +0 -55
  95. package/lib/cjs/index.js +0 -40
  96. package/lib/cjs/markdown-panel-model.js +0 -27
  97. package/lib/cjs/setup-tests.js +0 -19
  98. /package/__mf/css/async/{187.85c2cbf6.css → 808.85c2cbf6.css} +0 -0
  99. /package/__mf/js/async/{121.a9ac3871.js.LICENSE.txt → 121.4f618242.js.LICENSE.txt} +0 -0
  100. /package/__mf/js/async/{274.fa2aa111.js.LICENSE.txt → 274.46511e6c.js.LICENSE.txt} +0 -0
  101. /package/__mf/js/async/{392.6999603c.js.LICENSE.txt → 392.9a0e3220.js.LICENSE.txt} +0 -0
  102. /package/__mf/js/async/{470.926a1541.js.LICENSE.txt → 470.4ec75a15.js.LICENSE.txt} +0 -0
  103. /package/__mf/js/async/{73.1d9051a3.js.LICENSE.txt → 680.d2acb11f.js.LICENSE.txt} +0 -0
  104. /package/__mf/js/async/{125.3fab3f86.js.LICENSE.txt → 94.eb815395.js.LICENSE.txt} +0 -0
  105. /package/__mf/js/async/{941.4cd009e6.js.LICENSE.txt → 941.601daa22.js.LICENSE.txt} +0 -0
  106. /package/__mf/js/async/{lib-router.ad82c2bf.js.LICENSE.txt → lib-router.8d81e712.js.LICENSE.txt} +0 -0
package/lib/Markdown.js CHANGED
@@ -10,9 +10,9 @@
10
10
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
11
  // See the License for the specific language governing permissions and
12
12
  // limitations under the License.
13
- import { createInitialMarkdownPanelOptions } from './markdown-panel-model';
14
- import { MarkdownPanel } from './MarkdownPanel';
15
- import { MarkdownPanelOptionsEditor } from './MarkdownPanelOptionsEditor';
13
+ import { createInitialMarkdownPanelOptions } from "./markdown-panel-model.js";
14
+ import { MarkdownPanel } from "./MarkdownPanel.js";
15
+ import { MarkdownPanelOptionsEditor } from "./MarkdownPanelOptionsEditor.js";
16
16
  /**
17
17
  * The core Markdown panel plugin in Perses.
18
18
  */ export const Markdown = {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/Markdown.ts"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { PanelPlugin } from '@perses-dev/plugin-system';\nimport { createInitialMarkdownPanelOptions, MarkdownPanelOptions } from './markdown-panel-model';\nimport { MarkdownPanel } from './MarkdownPanel';\nimport { MarkdownPanelOptionsEditor } from './MarkdownPanelOptionsEditor';\n\n/**\n * The core Markdown panel plugin in Perses.\n */\nexport const Markdown: PanelPlugin<MarkdownPanelOptions> = {\n PanelComponent: MarkdownPanel,\n supportedQueryTypes: [],\n panelOptionsEditorComponents: [\n {\n label: 'Markdown',\n content: MarkdownPanelOptionsEditor,\n },\n ],\n createInitialOptions: createInitialMarkdownPanelOptions,\n hideQueryEditor: true,\n};\n"],"names":["createInitialMarkdownPanelOptions","MarkdownPanel","MarkdownPanelOptionsEditor","Markdown","PanelComponent","supportedQueryTypes","panelOptionsEditorComponents","label","content","createInitialOptions","hideQueryEditor"],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAGjC,SAASA,iCAAiC,QAA8B,yBAAyB;AACjG,SAASC,aAAa,QAAQ,kBAAkB;AAChD,SAASC,0BAA0B,QAAQ,+BAA+B;AAE1E;;CAEC,GACD,OAAO,MAAMC,WAA8C;IACzDC,gBAAgBH;IAChBI,qBAAqB,EAAE;IACvBC,8BAA8B;QAC5B;YACEC,OAAO;YACPC,SAASN;QACX;KACD;IACDO,sBAAsBT;IACtBU,iBAAiB;AACnB,EAAE"}
1
+ {"version":3,"sources":["../../src/Markdown.ts"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport type { PanelPlugin } from '@perses-dev/plugin-system';\n\nimport type { MarkdownPanelOptions } from './markdown-panel-model';\nimport { createInitialMarkdownPanelOptions } from './markdown-panel-model';\nimport { MarkdownPanel } from './MarkdownPanel';\nimport { MarkdownPanelOptionsEditor } from './MarkdownPanelOptionsEditor';\n\n/**\n * The core Markdown panel plugin in Perses.\n */\nexport const Markdown: PanelPlugin<MarkdownPanelOptions> = {\n PanelComponent: MarkdownPanel,\n supportedQueryTypes: [],\n panelOptionsEditorComponents: [\n {\n label: 'Markdown',\n content: MarkdownPanelOptionsEditor,\n },\n ],\n createInitialOptions: createInitialMarkdownPanelOptions,\n hideQueryEditor: true,\n};\n"],"names":["createInitialMarkdownPanelOptions","MarkdownPanel","MarkdownPanelOptionsEditor","Markdown","PanelComponent","supportedQueryTypes","panelOptionsEditorComponents","label","content","createInitialOptions","hideQueryEditor"],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAKjC,SAASA,iCAAiC,QAAQ,4BAAyB;AAC3E,SAASC,aAAa,QAAQ,qBAAkB;AAChD,SAASC,0BAA0B,QAAQ,kCAA+B;AAE1E;;CAEC,GACD,OAAO,MAAMC,WAA8C;IACzDC,gBAAgBH;IAChBI,qBAAqB,EAAE;IACvBC,8BAA8B;QAC5B;YACEC,OAAO;YACPC,SAASN;QACX;KACD;IACDO,sBAAsBT;IACtBU,iBAAiB;AACnB,EAAE"}
@@ -1,6 +1,6 @@
1
- import { PanelProps } from '@perses-dev/plugin-system';
2
- import { ReactElement } from 'react';
3
- import { MarkdownPanelOptions } from './markdown-panel-model';
1
+ import type { PanelProps } from '@perses-dev/plugin-system';
2
+ import type { ReactElement } from 'react';
3
+ import type { MarkdownPanelOptions } from './markdown-panel-model';
4
4
  export type MarkdownPanelProps = PanelProps<MarkdownPanelOptions>;
5
5
  export declare function MarkdownPanel(props: MarkdownPanelProps): ReactElement;
6
6
  //# sourceMappingURL=MarkdownPanel.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"MarkdownPanel.d.ts","sourceRoot":"","sources":["../../src/MarkdownPanel.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAE,UAAU,EAA+B,MAAM,2BAA2B,CAAC;AAGpF,OAAc,EAAE,YAAY,EAAW,MAAM,OAAO,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D,MAAM,MAAM,kBAAkB,GAAG,UAAU,CAAC,oBAAoB,CAAC,CAAC;AAwDlE,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,GAAG,YAAY,CAiBrE"}
1
+ {"version":3,"file":"MarkdownPanel.d.ts","sourceRoot":"","sources":["../../src/MarkdownPanel.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAI5D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAG1C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAEnE,MAAM,MAAM,kBAAkB,GAAG,UAAU,CAAC,oBAAoB,CAAC,CAAC;AAwDlE,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,GAAG,YAAY,CAiBrE"}
@@ -1,4 +1,3 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
1
  // Copyright The Perses Authors
3
2
  // Licensed under the Apache License, Version 2.0 (the "License");
4
3
  // you may not use this file except in compliance with the License.
@@ -11,12 +10,13 @@ import { jsx as _jsx } from "react/jsx-runtime";
11
10
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
11
  // See the License for the specific language governing permissions and
13
12
  // limitations under the License.
14
- import { Box } from '@mui/material';
15
- import { useChartsTheme } from '@perses-dev/components';
16
- import { useReplaceVariablesInString } from '@perses-dev/plugin-system';
17
- import DOMPurify from 'dompurify';
18
- import { marked } from 'marked';
19
- import React, { useMemo } from 'react';
13
+ import { jsx as _jsx } from "react/jsx-runtime";
14
+ import { Box } from "@mui/material";
15
+ import { useChartsTheme } from "@perses-dev/components";
16
+ import { useReplaceVariablesInString } from "@perses-dev/plugin-system";
17
+ import DOMPurify from "dompurify";
18
+ import { marked } from "marked";
19
+ import React, { useMemo } from "react";
20
20
  function createMarkdownPanelStyles(theme, chartsTheme) {
21
21
  return {
22
22
  padding: `${chartsTheme.container.padding.default}px`,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/MarkdownPanel.tsx"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { Box, Theme } from '@mui/material';\nimport { PersesChartsTheme, useChartsTheme } from '@perses-dev/components';\nimport { PanelProps, useReplaceVariablesInString } from '@perses-dev/plugin-system';\nimport DOMPurify from 'dompurify';\nimport { marked } from 'marked';\nimport React, { ReactElement, useMemo } from 'react';\nimport { MarkdownPanelOptions } from './markdown-panel-model';\n\nexport type MarkdownPanelProps = PanelProps<MarkdownPanelOptions>;\n\nfunction createMarkdownPanelStyles(theme: Theme, chartsTheme: PersesChartsTheme): Record<string, unknown> {\n return {\n padding: `${chartsTheme.container.padding.default}px`,\n // Make the content scrollable\n height: '100%',\n overflowY: 'auto',\n // Ignore top margin on the first element.\n '& :first-of-type': {\n marginTop: 0,\n },\n // Styles for headers\n '& h1': {\n fontSize: '2em',\n },\n // Styles for <code>\n '& code': { fontSize: '0.85em' },\n '& :not(pre) code': {\n padding: '0.2em 0.4em',\n backgroundColor: theme.palette.grey[100],\n borderRadius: '4px',\n },\n '& pre': {\n padding: '1.2em',\n backgroundColor: theme.palette.grey[100],\n borderRadius: '4px',\n },\n // Styles for <table>\n '& table, & th, & td': {\n padding: '0.6em',\n border: `1px solid ${theme.palette.grey[300]}`,\n borderCollapse: 'collapse',\n },\n // Styles for <li>\n '& li + li': {\n marginTop: '0.25em',\n },\n // Styles for <a>\n '& a': {\n color: theme.palette.primary.main,\n },\n };\n}\n\n// Convert markdown to HTML\n// Supports original markdown and GitHub Flavored markdown\nfunction markdownToHTML(text: string): string {\n return marked.parse(text, { gfm: true, async: false });\n}\n\n// Prevent XSS attacks by removing the vectors for attacks\nfunction sanitizeHTML(html: string): string {\n return DOMPurify.sanitize(html);\n}\n\nexport function MarkdownPanel(props: MarkdownPanelProps): ReactElement {\n const {\n spec: { text },\n } = props;\n const chartsTheme = useChartsTheme();\n\n const textAfterVariableReplacement = useReplaceVariablesInString(text);\n\n const html = useMemo(() => markdownToHTML(textAfterVariableReplacement ?? ''), [textAfterVariableReplacement]);\n const sanitizedHTML = useMemo(() => sanitizeHTML(html), [html]);\n\n return (\n <Box\n sx={(theme) => createMarkdownPanelStyles(theme, chartsTheme)}\n dangerouslySetInnerHTML={{ __html: sanitizedHTML }}\n />\n );\n}\n"],"names":["Box","useChartsTheme","useReplaceVariablesInString","DOMPurify","marked","React","useMemo","createMarkdownPanelStyles","theme","chartsTheme","padding","container","default","height","overflowY","marginTop","fontSize","backgroundColor","palette","grey","borderRadius","border","borderCollapse","color","primary","main","markdownToHTML","text","parse","gfm","async","sanitizeHTML","html","sanitize","MarkdownPanel","props","spec","textAfterVariableReplacement","sanitizedHTML","sx","dangerouslySetInnerHTML","__html"],"mappings":";AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,SAASA,GAAG,QAAe,gBAAgB;AAC3C,SAA4BC,cAAc,QAAQ,yBAAyB;AAC3E,SAAqBC,2BAA2B,QAAQ,4BAA4B;AACpF,OAAOC,eAAe,YAAY;AAClC,SAASC,MAAM,QAAQ,SAAS;AAChC,OAAOC,SAAuBC,OAAO,QAAQ,QAAQ;AAKrD,SAASC,0BAA0BC,KAAY,EAAEC,WAA8B;IAC7E,OAAO;QACLC,SAAS,GAAGD,YAAYE,SAAS,CAACD,OAAO,CAACE,OAAO,CAAC,EAAE,CAAC;QACrD,8BAA8B;QAC9BC,QAAQ;QACRC,WAAW;QACX,0CAA0C;QAC1C,oBAAoB;YAClBC,WAAW;QACb;QACA,qBAAqB;QACrB,QAAQ;YACNC,UAAU;QACZ;QACA,oBAAoB;QACpB,UAAU;YAAEA,UAAU;QAAS;QAC/B,oBAAoB;YAClBN,SAAS;YACTO,iBAAiBT,MAAMU,OAAO,CAACC,IAAI,CAAC,IAAI;YACxCC,cAAc;QAChB;QACA,SAAS;YACPV,SAAS;YACTO,iBAAiBT,MAAMU,OAAO,CAACC,IAAI,CAAC,IAAI;YACxCC,cAAc;QAChB;QACA,qBAAqB;QACrB,uBAAuB;YACrBV,SAAS;YACTW,QAAQ,CAAC,UAAU,EAAEb,MAAMU,OAAO,CAACC,IAAI,CAAC,IAAI,EAAE;YAC9CG,gBAAgB;QAClB;QACA,kBAAkB;QAClB,aAAa;YACXP,WAAW;QACb;QACA,iBAAiB;QACjB,OAAO;YACLQ,OAAOf,MAAMU,OAAO,CAACM,OAAO,CAACC,IAAI;QACnC;IACF;AACF;AAEA,2BAA2B;AAC3B,0DAA0D;AAC1D,SAASC,eAAeC,IAAY;IAClC,OAAOvB,OAAOwB,KAAK,CAACD,MAAM;QAAEE,KAAK;QAAMC,OAAO;IAAM;AACtD;AAEA,0DAA0D;AAC1D,SAASC,aAAaC,IAAY;IAChC,OAAO7B,UAAU8B,QAAQ,CAACD;AAC5B;AAEA,OAAO,SAASE,cAAcC,KAAyB;IACrD,MAAM,EACJC,MAAM,EAAET,IAAI,EAAE,EACf,GAAGQ;IACJ,MAAM1B,cAAcR;IAEpB,MAAMoC,+BAA+BnC,4BAA4ByB;IAEjE,MAAMK,OAAO1B,QAAQ,IAAMoB,eAAeW,gCAAgC,KAAK;QAACA;KAA6B;IAC7G,MAAMC,gBAAgBhC,QAAQ,IAAMyB,aAAaC,OAAO;QAACA;KAAK;IAE9D,qBACE,KAAChC;QACCuC,IAAI,CAAC/B,QAAUD,0BAA0BC,OAAOC;QAChD+B,yBAAyB;YAAEC,QAAQH;QAAc;;AAGvD"}
1
+ {"version":3,"sources":["../../src/MarkdownPanel.tsx"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport type { Theme } from '@mui/material';\nimport { Box } from '@mui/material';\nimport type { PersesChartsTheme } from '@perses-dev/components';\nimport { useChartsTheme } from '@perses-dev/components';\nimport type { PanelProps } from '@perses-dev/plugin-system';\nimport { useReplaceVariablesInString } from '@perses-dev/plugin-system';\nimport DOMPurify from 'dompurify';\nimport { marked } from 'marked';\nimport type { ReactElement } from 'react';\nimport React, { useMemo } from 'react';\n\nimport type { MarkdownPanelOptions } from './markdown-panel-model';\n\nexport type MarkdownPanelProps = PanelProps<MarkdownPanelOptions>;\n\nfunction createMarkdownPanelStyles(theme: Theme, chartsTheme: PersesChartsTheme): Record<string, unknown> {\n return {\n padding: `${chartsTheme.container.padding.default}px`,\n // Make the content scrollable\n height: '100%',\n overflowY: 'auto',\n // Ignore top margin on the first element.\n '& :first-of-type': {\n marginTop: 0,\n },\n // Styles for headers\n '& h1': {\n fontSize: '2em',\n },\n // Styles for <code>\n '& code': { fontSize: '0.85em' },\n '& :not(pre) code': {\n padding: '0.2em 0.4em',\n backgroundColor: theme.palette.grey[100],\n borderRadius: '4px',\n },\n '& pre': {\n padding: '1.2em',\n backgroundColor: theme.palette.grey[100],\n borderRadius: '4px',\n },\n // Styles for <table>\n '& table, & th, & td': {\n padding: '0.6em',\n border: `1px solid ${theme.palette.grey[300]}`,\n borderCollapse: 'collapse',\n },\n // Styles for <li>\n '& li + li': {\n marginTop: '0.25em',\n },\n // Styles for <a>\n '& a': {\n color: theme.palette.primary.main,\n },\n };\n}\n\n// Convert markdown to HTML\n// Supports original markdown and GitHub Flavored markdown\nfunction markdownToHTML(text: string): string {\n return marked.parse(text, { gfm: true, async: false });\n}\n\n// Prevent XSS attacks by removing the vectors for attacks\nfunction sanitizeHTML(html: string): string {\n return DOMPurify.sanitize(html);\n}\n\nexport function MarkdownPanel(props: MarkdownPanelProps): ReactElement {\n const {\n spec: { text },\n } = props;\n const chartsTheme = useChartsTheme();\n\n const textAfterVariableReplacement = useReplaceVariablesInString(text);\n\n const html = useMemo(() => markdownToHTML(textAfterVariableReplacement ?? ''), [textAfterVariableReplacement]);\n const sanitizedHTML = useMemo(() => sanitizeHTML(html), [html]);\n\n return (\n <Box\n sx={(theme) => createMarkdownPanelStyles(theme, chartsTheme)}\n dangerouslySetInnerHTML={{ __html: sanitizedHTML }}\n />\n );\n}\n"],"names":["Box","useChartsTheme","useReplaceVariablesInString","DOMPurify","marked","React","useMemo","createMarkdownPanelStyles","theme","chartsTheme","padding","container","default","height","overflowY","marginTop","fontSize","backgroundColor","palette","grey","borderRadius","border","borderCollapse","color","primary","main","markdownToHTML","text","parse","gfm","async","sanitizeHTML","html","sanitize","MarkdownPanel","props","spec","textAfterVariableReplacement","sanitizedHTML","sx","dangerouslySetInnerHTML","__html"],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAGjC,SAASA,GAAG,QAAQ,gBAAgB;AAEpC,SAASC,cAAc,QAAQ,yBAAyB;AAExD,SAASC,2BAA2B,QAAQ,4BAA4B;AACxE,OAAOC,eAAe,YAAY;AAClC,SAASC,MAAM,QAAQ,SAAS;AAEhC,OAAOC,SAASC,OAAO,QAAQ,QAAQ;AAMvC,SAASC,0BAA0BC,KAAY,EAAEC,WAA8B;IAC7E,OAAO;QACLC,SAAS,GAAGD,YAAYE,SAAS,CAACD,OAAO,CAACE,OAAO,CAAC,EAAE,CAAC;QACrD,8BAA8B;QAC9BC,QAAQ;QACRC,WAAW;QACX,0CAA0C;QAC1C,oBAAoB;YAClBC,WAAW;QACb;QACA,qBAAqB;QACrB,QAAQ;YACNC,UAAU;QACZ;QACA,oBAAoB;QACpB,UAAU;YAAEA,UAAU;QAAS;QAC/B,oBAAoB;YAClBN,SAAS;YACTO,iBAAiBT,MAAMU,OAAO,CAACC,IAAI,CAAC,IAAI;YACxCC,cAAc;QAChB;QACA,SAAS;YACPV,SAAS;YACTO,iBAAiBT,MAAMU,OAAO,CAACC,IAAI,CAAC,IAAI;YACxCC,cAAc;QAChB;QACA,qBAAqB;QACrB,uBAAuB;YACrBV,SAAS;YACTW,QAAQ,CAAC,UAAU,EAAEb,MAAMU,OAAO,CAACC,IAAI,CAAC,IAAI,EAAE;YAC9CG,gBAAgB;QAClB;QACA,kBAAkB;QAClB,aAAa;YACXP,WAAW;QACb;QACA,iBAAiB;QACjB,OAAO;YACLQ,OAAOf,MAAMU,OAAO,CAACM,OAAO,CAACC,IAAI;QACnC;IACF;AACF;AAEA,2BAA2B;AAC3B,0DAA0D;AAC1D,SAASC,eAAeC,IAAY;IAClC,OAAOvB,OAAOwB,KAAK,CAACD,MAAM;QAAEE,KAAK;QAAMC,OAAO;IAAM;AACtD;AAEA,0DAA0D;AAC1D,SAASC,aAAaC,IAAY;IAChC,OAAO7B,UAAU8B,QAAQ,CAACD;AAC5B;AAEA,OAAO,SAASE,cAAcC,KAAyB;IACrD,MAAM,EACJC,MAAM,EAAET,IAAI,EAAE,EACf,GAAGQ;IACJ,MAAM1B,cAAcR;IAEpB,MAAMoC,+BAA+BnC,4BAA4ByB;IAEjE,MAAMK,OAAO1B,QAAQ,IAAMoB,eAAeW,gCAAgC,KAAK;QAACA;KAA6B;IAC7G,MAAMC,gBAAgBhC,QAAQ,IAAMyB,aAAaC,OAAO;QAACA;KAAK;IAE9D,qBACE,KAAChC;QACCuC,IAAI,CAAC/B,QAAUD,0BAA0BC,OAAOC;QAChD+B,yBAAyB;YAAEC,QAAQH;QAAc;;AAGvD"}
@@ -1,6 +1,6 @@
1
- import { ReactElement } from 'react';
2
- import { OptionsEditorProps } from '@perses-dev/plugin-system';
3
- import { MarkdownPanelOptions } from './markdown-panel-model';
1
+ import type { OptionsEditorProps } from '@perses-dev/plugin-system';
2
+ import type { ReactElement } from 'react';
3
+ import type { MarkdownPanelOptions } from './markdown-panel-model';
4
4
  export type MarkdownPanelOptionsEditorProps = OptionsEditorProps<MarkdownPanelOptions>;
5
5
  export declare function MarkdownPanelOptionsEditor(props: MarkdownPanelOptionsEditorProps): ReactElement;
6
6
  //# sourceMappingURL=MarkdownPanelOptionsEditor.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"MarkdownPanelOptionsEditor.d.ts","sourceRoot":"","sources":["../../src/MarkdownPanelOptionsEditor.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAe,YAAY,EAAE,MAAM,OAAO,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAE/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D,MAAM,MAAM,+BAA+B,GAAG,kBAAkB,CAAC,oBAAoB,CAAC,CAAC;AAKvF,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,+BAA+B,GAAG,YAAY,CA0B/F"}
1
+ {"version":3,"file":"MarkdownPanelOptionsEditor.d.ts","sourceRoot":"","sources":["../../src/MarkdownPanelOptionsEditor.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,KAAK,EAAe,YAAY,EAAE,MAAM,OAAO,CAAC;AAEvD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAEnE,MAAM,MAAM,+BAA+B,GAAG,kBAAkB,CAAC,oBAAoB,CAAC,CAAC;AAKvF,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,+BAA+B,GAAG,YAAY,CA0B/F"}
@@ -1,3 +1,4 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
2
  // Copyright The Perses Authors
2
3
  // Licensed under the Apache License, Version 2.0 (the "License");
3
4
  // you may not use this file except in compliance with the License.
@@ -10,8 +11,7 @@
10
11
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
12
  // See the License for the specific language governing permissions and
12
13
  // limitations under the License.
13
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
14
- import { Link, Stack, TextField } from '@mui/material';
14
+ import { Link, Stack, TextField } from "@mui/material";
15
15
  const MARKDOWN_GUIDE_URL = 'https://commonmark.org/help/';
16
16
  const TEXT_INPUT_NUM_ROWS = 20;
17
17
  export function MarkdownPanelOptionsEditor(props) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/MarkdownPanelOptionsEditor.tsx"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { ChangeEvent, ReactElement } from 'react';\nimport { OptionsEditorProps } from '@perses-dev/plugin-system';\nimport { Link, Stack, TextField } from '@mui/material';\nimport { MarkdownPanelOptions } from './markdown-panel-model';\n\nexport type MarkdownPanelOptionsEditorProps = OptionsEditorProps<MarkdownPanelOptions>;\n\nconst MARKDOWN_GUIDE_URL = 'https://commonmark.org/help/';\nconst TEXT_INPUT_NUM_ROWS = 20;\n\nexport function MarkdownPanelOptionsEditor(props: MarkdownPanelOptionsEditorProps): ReactElement {\n const {\n onChange,\n value: { text },\n } = props;\n\n const handleChange = (e: ChangeEvent<HTMLInputElement>): void => {\n onChange({ text: e.target.value });\n };\n\n return (\n <Stack spacing={1}>\n <Link sx={{ alignSelf: 'end', textDecoration: 'none' }} href={MARKDOWN_GUIDE_URL} target=\"_blank\" rel=\"noopener\">\n Markdown Guide\n </Link>\n <TextField\n label=\"Text\"\n // Multiline\n multiline\n rows={TEXT_INPUT_NUM_ROWS}\n // Value\n value={text}\n onChange={handleChange}\n />\n </Stack>\n );\n}\n"],"names":["Link","Stack","TextField","MARKDOWN_GUIDE_URL","TEXT_INPUT_NUM_ROWS","MarkdownPanelOptionsEditor","props","onChange","value","text","handleChange","e","target","spacing","sx","alignSelf","textDecoration","href","rel","label","multiline","rows"],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAIjC,SAASA,IAAI,EAAEC,KAAK,EAAEC,SAAS,QAAQ,gBAAgB;AAKvD,MAAMC,qBAAqB;AAC3B,MAAMC,sBAAsB;AAE5B,OAAO,SAASC,2BAA2BC,KAAsC;IAC/E,MAAM,EACJC,QAAQ,EACRC,OAAO,EAAEC,IAAI,EAAE,EAChB,GAAGH;IAEJ,MAAMI,eAAe,CAACC;QACpBJ,SAAS;YAAEE,MAAME,EAAEC,MAAM,CAACJ,KAAK;QAAC;IAClC;IAEA,qBACE,MAACP;QAAMY,SAAS;;0BACd,KAACb;gBAAKc,IAAI;oBAAEC,WAAW;oBAAOC,gBAAgB;gBAAO;gBAAGC,MAAMd;gBAAoBS,QAAO;gBAASM,KAAI;0BAAW;;0BAGjH,KAAChB;gBACCiB,OAAM;gBACN,YAAY;gBACZC,SAAS;gBACTC,MAAMjB;gBACN,QAAQ;gBACRI,OAAOC;gBACPF,UAAUG;;;;AAIlB"}
1
+ {"version":3,"sources":["../../src/MarkdownPanelOptionsEditor.tsx"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { Link, Stack, TextField } from '@mui/material';\nimport type { OptionsEditorProps } from '@perses-dev/plugin-system';\nimport type { ChangeEvent, ReactElement } from 'react';\n\nimport type { MarkdownPanelOptions } from './markdown-panel-model';\n\nexport type MarkdownPanelOptionsEditorProps = OptionsEditorProps<MarkdownPanelOptions>;\n\nconst MARKDOWN_GUIDE_URL = 'https://commonmark.org/help/';\nconst TEXT_INPUT_NUM_ROWS = 20;\n\nexport function MarkdownPanelOptionsEditor(props: MarkdownPanelOptionsEditorProps): ReactElement {\n const {\n onChange,\n value: { text },\n } = props;\n\n const handleChange = (e: ChangeEvent<HTMLInputElement>): void => {\n onChange({ text: e.target.value });\n };\n\n return (\n <Stack spacing={1}>\n <Link sx={{ alignSelf: 'end', textDecoration: 'none' }} href={MARKDOWN_GUIDE_URL} target=\"_blank\" rel=\"noopener\">\n Markdown Guide\n </Link>\n <TextField\n label=\"Text\"\n // Multiline\n multiline\n rows={TEXT_INPUT_NUM_ROWS}\n // Value\n value={text}\n onChange={handleChange}\n />\n </Stack>\n );\n}\n"],"names":["Link","Stack","TextField","MARKDOWN_GUIDE_URL","TEXT_INPUT_NUM_ROWS","MarkdownPanelOptionsEditor","props","onChange","value","text","handleChange","e","target","spacing","sx","alignSelf","textDecoration","href","rel","label","multiline","rows"],"mappings":";AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,SAASA,IAAI,EAAEC,KAAK,EAAEC,SAAS,QAAQ,gBAAgB;AAQvD,MAAMC,qBAAqB;AAC3B,MAAMC,sBAAsB;AAE5B,OAAO,SAASC,2BAA2BC,KAAsC;IAC/E,MAAM,EACJC,QAAQ,EACRC,OAAO,EAAEC,IAAI,EAAE,EAChB,GAAGH;IAEJ,MAAMI,eAAe,CAACC;QACpBJ,SAAS;YAAEE,MAAME,EAAEC,MAAM,CAACJ,KAAK;QAAC;IAClC;IAEA,qBACE,MAACP;QAAMY,SAAS;;0BACd,KAACb;gBAAKc,IAAI;oBAAEC,WAAW;oBAAOC,gBAAgB;gBAAO;gBAAGC,MAAMd;gBAAoBS,QAAO;gBAASM,KAAI;0BAAW;;0BAGjH,KAAChB;gBACCiB,OAAM;gBACN,YAAY;gBACZC,SAAS;gBACTC,MAAMjB;gBACN,QAAQ;gBACRI,OAAOC;gBACPF,UAAUG;;;;AAIlB"}
package/lib/bootstrap.js CHANGED
@@ -11,8 +11,8 @@ import { jsx as _jsx } from "react/jsx-runtime";
11
11
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
  // See the License for the specific language governing permissions and
13
13
  // limitations under the License.
14
- import React from 'react';
15
- import ReactDOM from 'react-dom/client';
14
+ import React from "react";
15
+ import ReactDOM from "react-dom/client";
16
16
  const root = ReactDOM.createRoot(document.getElementById('root'));
17
17
  root.render(/*#__PURE__*/ _jsx(React.StrictMode, {}));
18
18
 
@@ -1,4 +1,4 @@
1
- import { PluginModuleResource } from '@perses-dev/plugin-system';
1
+ import type { PluginModuleResource } from '@perses-dev/plugin-system';
2
2
  /**
3
3
  * Returns the plugin module information from package.json
4
4
  */
@@ -1 +1 @@
1
- {"version":3,"file":"getPluginModule.d.ts","sourceRoot":"","sources":["../../src/getPluginModule.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,oBAAoB,EAAoB,MAAM,2BAA2B,CAAC;AAGnF;;GAEG;AACH,wBAAgB,eAAe,IAAI,oBAAoB,CAUtD"}
1
+ {"version":3,"file":"getPluginModule.d.ts","sourceRoot":"","sources":["../../src/getPluginModule.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,oBAAoB,EAAoB,MAAM,2BAA2B,CAAC;AAIxF;;GAEG;AACH,wBAAgB,eAAe,IAAI,oBAAoB,CAUtD"}
@@ -10,7 +10,9 @@
10
10
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
11
  // See the License for the specific language governing permissions and
12
12
  // limitations under the License.
13
- import packageJson from '../package.json';
13
+ import packageJson from "../package.json" with {
14
+ type: 'json'
15
+ };
14
16
  /**
15
17
  * Returns the plugin module information from package.json
16
18
  */ export function getPluginModule() {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/getPluginModule.ts"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { PluginModuleResource, PluginModuleSpec } from '@perses-dev/plugin-system';\nimport packageJson from '../package.json';\n\n/**\n * Returns the plugin module information from package.json\n */\nexport function getPluginModule(): PluginModuleResource {\n const { name, version, perses } = packageJson;\n return {\n kind: 'PluginModule',\n metadata: {\n name,\n version,\n },\n spec: perses as PluginModuleSpec,\n };\n}\n"],"names":["packageJson","getPluginModule","name","version","perses","kind","metadata","spec"],"mappings":"AAAA,+BAA+B;AAC/B,oEAAoE;AACpE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,sEAAsE;AACtE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAGjC,OAAOA,iBAAiB,kBAAkB;AAE1C;;CAEC,GACD,OAAO,SAASC;IACd,MAAM,EAAEC,IAAI,EAAEC,OAAO,EAAEC,MAAM,EAAE,GAAGJ;IAClC,OAAO;QACLK,MAAM;QACNC,UAAU;YACRJ;YACAC;QACF;QACAI,MAAMH;IACR;AACF"}
1
+ {"version":3,"sources":["../../src/getPluginModule.ts"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport type { PluginModuleResource, PluginModuleSpec } from '@perses-dev/plugin-system';\n\nimport packageJson from '../package.json' with { type: 'json' };\n\n/**\n * Returns the plugin module information from package.json\n */\nexport function getPluginModule(): PluginModuleResource {\n const { name, version, perses } = packageJson;\n return {\n kind: 'PluginModule',\n metadata: {\n name,\n version,\n },\n spec: perses as PluginModuleSpec,\n };\n}\n"],"names":["packageJson","type","getPluginModule","name","version","perses","kind","metadata","spec"],"mappings":"AAAA,+BAA+B;AAC/B,oEAAoE;AACpE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,sEAAsE;AACtE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAIjC,OAAOA,iBAAiB,uBAAuB;IAAEC,MAAM;AAAO,EAAE;AAEhE;;CAEC,GACD,OAAO,SAASC;IACd,MAAM,EAAEC,IAAI,EAAEC,OAAO,EAAEC,MAAM,EAAE,GAAGL;IAClC,OAAO;QACLM,MAAM;QACNC,UAAU;YACRJ;YACAC;QACF;QACAI,MAAMH;IACR;AACF"}
@@ -10,6 +10,6 @@
10
10
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
11
  // See the License for the specific language governing permissions and
12
12
  // limitations under the License.
13
- import('./bootstrap');
13
+ import("./bootstrap.js");
14
14
 
15
15
  //# sourceMappingURL=index-federation.js.map
package/lib/index.js CHANGED
@@ -10,10 +10,10 @@
10
10
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
11
  // See the License for the specific language governing permissions and
12
12
  // limitations under the License.
13
- export { getPluginModule } from './getPluginModule';
14
- export * from './Markdown';
15
- export * from './markdown-panel-model';
16
- export * from './MarkdownPanel';
17
- export * from './MarkdownPanelOptionsEditor';
13
+ export { getPluginModule } from "./getPluginModule.js";
14
+ export * from "./Markdown.js";
15
+ export * from "./markdown-panel-model.js";
16
+ export * from "./MarkdownPanel.js";
17
+ export * from "./MarkdownPanelOptionsEditor.js";
18
18
 
19
19
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/index.ts"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport { getPluginModule } from './getPluginModule';\nexport * from './Markdown';\nexport * from './markdown-panel-model';\nexport * from './MarkdownPanel';\nexport * from './MarkdownPanelOptionsEditor';\n"],"names":["getPluginModule"],"mappings":"AAAA,+BAA+B;AAC/B,oEAAoE;AACpE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,sEAAsE;AACtE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,SAASA,eAAe,QAAQ,oBAAoB;AACpD,cAAc,aAAa;AAC3B,cAAc,yBAAyB;AACvC,cAAc,kBAAkB;AAChC,cAAc,+BAA+B"}
1
+ {"version":3,"sources":["../../src/index.ts"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport { getPluginModule } from './getPluginModule';\nexport * from './Markdown';\nexport * from './markdown-panel-model';\nexport * from './MarkdownPanel';\nexport * from './MarkdownPanelOptionsEditor';\n"],"names":["getPluginModule"],"mappings":"AAAA,+BAA+B;AAC/B,oEAAoE;AACpE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,sEAAsE;AACtE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,SAASA,eAAe,QAAQ,uBAAoB;AACpD,cAAc,gBAAa;AAC3B,cAAc,4BAAyB;AACvC,cAAc,qBAAkB;AAChC,cAAc,kCAA+B"}
@@ -1,4 +1,4 @@
1
- import { Definition } from '@perses-dev/spec';
1
+ import type { Definition } from '@perses-dev/spec';
2
2
  /**
3
3
  * The schema for a Markdown panel.
4
4
  */
@@ -1 +1 @@
1
- {"version":3,"file":"markdown-panel-model.d.ts","sourceRoot":"","sources":["../../src/markdown-panel-model.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C;;GAEG;AACH,MAAM,WAAW,uBAAwB,SAAQ,UAAU,CAAC,oBAAoB,CAAC;IAC/E,IAAI,EAAE,UAAU,CAAC;CAClB;AAED,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;CACd;AAED,wBAAgB,iCAAiC,IAAI,oBAAoB,CAExE"}
1
+ {"version":3,"file":"markdown-panel-model.d.ts","sourceRoot":"","sources":["../../src/markdown-panel-model.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD;;GAEG;AACH,MAAM,WAAW,uBAAwB,SAAQ,UAAU,CAAC,oBAAoB,CAAC;IAC/E,IAAI,EAAE,UAAU,CAAC;CAClB;AAED,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;CACd;AAED,wBAAgB,iCAAiC,IAAI,oBAAoB,CAExE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/markdown-panel-model.ts"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { Definition } from '@perses-dev/spec';\n\n/**\n * The schema for a Markdown panel.\n */\nexport interface MarkdownPanelDefinition extends Definition<MarkdownPanelOptions> {\n kind: 'Markdown';\n}\n\nexport interface MarkdownPanelOptions {\n text: string;\n}\n\nexport function createInitialMarkdownPanelOptions(): MarkdownPanelOptions {\n return { text: '' };\n}\n"],"names":["createInitialMarkdownPanelOptions","text"],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAejC,OAAO,SAASA;IACd,OAAO;QAAEC,MAAM;IAAG;AACpB"}
1
+ {"version":3,"sources":["../../src/markdown-panel-model.ts"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport type { Definition } from '@perses-dev/spec';\n\n/**\n * The schema for a Markdown panel.\n */\nexport interface MarkdownPanelDefinition extends Definition<MarkdownPanelOptions> {\n kind: 'Markdown';\n}\n\nexport interface MarkdownPanelOptions {\n text: string;\n}\n\nexport function createInitialMarkdownPanelOptions(): MarkdownPanelOptions {\n return { text: '' };\n}\n"],"names":["createInitialMarkdownPanelOptions","text"],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAejC,OAAO,SAASA;IACd,OAAO;QAAEC,MAAM;IAAG;AACpB"}
@@ -1,2 +1,2 @@
1
- import '@testing-library/jest-dom';
1
+ import '@testing-library/jest-dom/vitest';
2
2
  //# sourceMappingURL=setup-tests.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"setup-tests.d.ts","sourceRoot":"","sources":["../../src/setup-tests.ts"],"names":[],"mappings":"AAaA,OAAO,2BAA2B,CAAC"}
1
+ {"version":3,"file":"setup-tests.d.ts","sourceRoot":"","sources":["../../src/setup-tests.ts"],"names":[],"mappings":"AAaA,OAAO,kCAAkC,CAAC"}
@@ -10,8 +10,8 @@
10
10
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
11
  // See the License for the specific language governing permissions and
12
12
  // limitations under the License.
13
- import '@testing-library/jest-dom';
13
+ import "@testing-library/jest-dom/vitest";
14
14
  // Always mock e-charts during tests since we don't have a proper canvas in jsdom
15
- jest.mock('echarts/core');
15
+ vi.mock('echarts/core');
16
16
 
17
17
  //# sourceMappingURL=setup-tests.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/setup-tests.ts"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport '@testing-library/jest-dom';\n\n// Always mock e-charts during tests since we don't have a proper canvas in jsdom\njest.mock('echarts/core');\n"],"names":["jest","mock"],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,OAAO,4BAA4B;AAEnC,iFAAiF;AACjFA,KAAKC,IAAI,CAAC"}
1
+ {"version":3,"sources":["../../src/setup-tests.ts"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport '@testing-library/jest-dom/vitest';\n\n// Always mock e-charts during tests since we don't have a proper canvas in jsdom\nvi.mock('echarts/core');\n"],"names":["vi","mock"],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,OAAO,mCAAmC;AAE1C,iFAAiF;AACjFA,GAAGC,IAAI,CAAC"}
package/mf-manifest.json CHANGED
@@ -5,11 +5,11 @@
5
5
  "name": "Markdown",
6
6
  "type": "app",
7
7
  "buildInfo": {
8
- "buildVersion": "0.12.0",
8
+ "buildVersion": "0.13.0-beta.1",
9
9
  "buildName": "@perses-dev/markdown-plugin"
10
10
  },
11
11
  "remoteEntry": {
12
- "name": "__mf/js/Markdown.20f59bf1.js",
12
+ "name": "__mf/js/Markdown.7274a42c.js",
13
13
  "path": "",
14
14
  "type": "global"
15
15
  },
@@ -19,9 +19,9 @@
19
19
  "zip": "",
20
20
  "api": ""
21
21
  },
22
- "globalName": "Markdown",
22
+ "globalName": "Markdown_0_13_0_beta_1",
23
23
  "pluginVersion": "2.6.0",
24
- "getPublicPath": "function() { const prefix = window.PERSES_PLUGIN_ASSETS_PATH || window.PERSES_APP_CONFIG?.api_prefix || \"\"; return prefix + \"/plugins/Markdown/\"; }"
24
+ "getPublicPath": "function() { const prefix = window.PERSES_PLUGIN_ASSETS_PATH || window.PERSES_APP_CONFIG?.api_prefix || \"\"; return prefix + \"/plugins/Markdown~0.13.0-beta.1/\"; }"
25
25
  },
26
26
  "shared": [
27
27
  {
@@ -34,7 +34,7 @@
34
34
  "js": {
35
35
  "async": [],
36
36
  "sync": [
37
- "__mf/js/async/274.fa2aa111.js"
37
+ "__mf/js/async/274.46511e6c.js"
38
38
  ]
39
39
  },
40
40
  "css": {
@@ -54,9 +54,8 @@
54
54
  "js": {
55
55
  "async": [],
56
56
  "sync": [
57
- "__mf/js/async/235.f508ea23.js",
58
- "__mf/js/async/616.79bbce2d.js",
59
- "__mf/js/async/854.1c79821c.js"
57
+ "__mf/js/async/235.8e51686f.js",
58
+ "__mf/js/async/616.fcbca7cf.js"
60
59
  ]
61
60
  },
62
61
  "css": {
@@ -76,8 +75,8 @@
76
75
  "js": {
77
76
  "async": [],
78
77
  "sync": [
79
- "__mf/js/async/587.99ce4abf.js",
80
- "__mf/js/async/968.14a1791c.js"
78
+ "__mf/js/async/587.20e47b23.js",
79
+ "__mf/js/async/968.bc5b60bc.js"
81
80
  ]
82
81
  },
83
82
  "css": {
@@ -90,20 +89,20 @@
90
89
  {
91
90
  "id": "Markdown:@perses-dev/components",
92
91
  "name": "@perses-dev/components",
93
- "version": "0.54.0",
92
+ "version": "0.55.0-beta.6",
94
93
  "singleton": true,
95
- "requiredVersion": "^0.54.0",
94
+ "requiredVersion": "^0.55.0-beta.6",
96
95
  "assets": {
97
96
  "js": {
98
97
  "async": [],
99
98
  "sync": [
100
- "__mf/js/async/187.e36c4021.js"
99
+ "__mf/js/async/808.1e94c038.js"
101
100
  ]
102
101
  },
103
102
  "css": {
104
103
  "async": [],
105
104
  "sync": [
106
- "__mf/css/async/187.85c2cbf6.css"
105
+ "__mf/css/async/808.85c2cbf6.css"
107
106
  ]
108
107
  }
109
108
  },
@@ -112,14 +111,14 @@
112
111
  {
113
112
  "id": "Markdown:@perses-dev/plugin-system",
114
113
  "name": "@perses-dev/plugin-system",
115
- "version": "0.54.0",
114
+ "version": "0.55.0-beta.6",
116
115
  "singleton": true,
117
- "requiredVersion": "^0.54.0",
116
+ "requiredVersion": "^0.55.0-beta.6",
118
117
  "assets": {
119
118
  "js": {
120
119
  "async": [],
121
120
  "sync": [
122
- "__mf/js/async/546.8bdb58c4.js"
121
+ "__mf/js/async/354.a4ff15e0.js"
123
122
  ]
124
123
  },
125
124
  "css": {
@@ -139,27 +138,7 @@
139
138
  "js": {
140
139
  "async": [],
141
140
  "sync": [
142
- "__mf/js/async/192.1bcbacc5.js"
143
- ]
144
- },
145
- "css": {
146
- "async": [],
147
- "sync": []
148
- }
149
- },
150
- "fallback": ""
151
- },
152
- {
153
- "id": "Markdown:echarts",
154
- "name": "echarts",
155
- "version": "5.5.0",
156
- "singleton": true,
157
- "requiredVersion": "^undefined",
158
- "assets": {
159
- "js": {
160
- "async": [],
161
- "sync": [
162
- "__mf/js/async/873.8558505f.js"
141
+ "__mf/js/async/192.5fcbacc8.js"
163
142
  ]
164
143
  },
165
144
  "css": {
@@ -179,7 +158,7 @@
179
158
  "js": {
180
159
  "async": [],
181
160
  "sync": [
182
- "__mf/js/async/392.6999603c.js"
161
+ "__mf/js/async/392.9a0e3220.js"
183
162
  ]
184
163
  },
185
164
  "css": {
@@ -199,7 +178,7 @@
199
178
  "js": {
200
179
  "async": [],
201
180
  "sync": [
202
- "__mf/js/async/470.926a1541.js"
181
+ "__mf/js/async/470.4ec75a15.js"
203
182
  ]
204
183
  },
205
184
  "css": {
@@ -219,27 +198,7 @@
219
198
  "js": {
220
199
  "async": [],
221
200
  "sync": [
222
- "__mf/js/async/121.a9ac3871.js"
223
- ]
224
- },
225
- "css": {
226
- "async": [],
227
- "sync": []
228
- }
229
- },
230
- "fallback": ""
231
- },
232
- {
233
- "id": "Markdown:date-fns-tz",
234
- "name": "date-fns-tz",
235
- "version": "3.2.0",
236
- "singleton": true,
237
- "requiredVersion": "^3.2.0",
238
- "assets": {
239
- "js": {
240
- "async": [],
241
- "sync": [
242
- "__mf/js/async/978.f2e7b013.js"
201
+ "__mf/js/async/121.4f618242.js"
243
202
  ]
244
203
  },
245
204
  "css": {
@@ -258,24 +217,22 @@
258
217
  "assets": {
259
218
  "js": {
260
219
  "sync": [
261
- "__mf/js/async/125.3fab3f86.js",
262
- "__mf/js/async/73.1d9051a3.js",
263
- "__mf/js/async/__federation_expose_Markdown.c6f196e2.js"
220
+ "__mf/js/async/94.eb815395.js",
221
+ "__mf/js/async/680.d2acb11f.js",
222
+ "__mf/js/async/__federation_expose_Markdown.45af9b33.js"
264
223
  ],
265
224
  "async": [
266
- "__mf/js/async/588.cfa85cf3.js",
267
- "__mf/js/async/71.1717f603.js",
268
- "__mf/js/async/43.e1743b42.js",
269
- "__mf/js/async/935.ce92b5f1.js",
270
- "__mf/js/async/lib-router.ad82c2bf.js",
271
- "__mf/js/async/356.90d42c91.js",
272
- "__mf/js/async/177.5335836c.js"
225
+ "__mf/js/async/493.09764f91.js",
226
+ "__mf/js/async/663.9789bc66.js",
227
+ "__mf/js/async/lib-router.8d81e712.js",
228
+ "__mf/js/async/356.f2464831.js",
229
+ "__mf/js/async/936.7be3b9ae.js"
273
230
  ]
274
231
  },
275
232
  "css": {
276
233
  "sync": [],
277
234
  "async": [
278
- "__mf/css/async/187.85c2cbf6.css"
235
+ "__mf/css/async/808.85c2cbf6.css"
279
236
  ]
280
237
  }
281
238
  },