@mui/internal-markdown 1.0.1 → 1.0.2

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 (2) hide show
  1. package/loader.js +10 -3
  2. package/package.json +3 -3
package/loader.js CHANGED
@@ -126,6 +126,7 @@ module.exports = async function demoLoader() {
126
126
  const components = {};
127
127
  const demoModuleIDs = new Set();
128
128
  const componentModuleIDs = new Set();
129
+ const nonEditableDemos = new Set();
129
130
  const demoNames = Array.from(
130
131
  new Set(
131
132
  docs.en.rendered
@@ -133,6 +134,9 @@ module.exports = async function demoLoader() {
133
134
  return typeof markdownOrComponentConfig !== 'string' && markdownOrComponentConfig.demo;
134
135
  })
135
136
  .map((demoConfig) => {
137
+ if (demoConfig.hideToolbar) {
138
+ nonEditableDemos.add(demoConfig.demo);
139
+ }
136
140
  return demoConfig.demo;
137
141
  }),
138
142
  ),
@@ -164,9 +168,12 @@ module.exports = async function demoLoader() {
164
168
  raw: await fs.readFile(moduleFilepath, { encoding: 'utf8' }),
165
169
  };
166
170
  demoModuleIDs.add(moduleID);
167
- extractImports(demos[demoName].raw).forEach((importModuleID) =>
168
- importedModuleIDs.add(importModuleID),
169
- );
171
+ // Skip non-editable demos
172
+ if (!nonEditableDemos.has(demoName)) {
173
+ extractImports(demos[demoName].raw).forEach((importModuleID) =>
174
+ importedModuleIDs.add(importModuleID),
175
+ );
176
+ }
170
177
 
171
178
  if (multipleDemoVersionsUsed) {
172
179
  // Add Tailwind demo data
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/internal-markdown",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "author": "MUI Team",
5
5
  "description": "MUI markdown parser. This is an internal package not meant for general use.",
6
6
  "main": "./index.js",
@@ -16,13 +16,13 @@
16
16
  "directory": "packages/markdown"
17
17
  },
18
18
  "dependencies": {
19
- "@babel/runtime": "^7.23.9",
19
+ "@babel/runtime": "^7.24.4",
20
20
  "lodash": "^4.17.21",
21
21
  "marked": "^5.1.2",
22
22
  "prismjs": "^1.29.0"
23
23
  },
24
24
  "devDependencies": {
25
- "@types/chai": "^4.3.12",
25
+ "@types/chai": "^4.3.14",
26
26
  "chai": "^4.4.1"
27
27
  },
28
28
  "publishConfig": {