@antv/dumi-theme-antv 0.3.2 → 0.3.3
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.
- package/dist/pages/Examples/index.module.less +1 -1
- package/dist/plugin/examples.js +21 -16
- package/dist/plugin/index.js +4 -1
- package/dist/plugin/utils.js +4 -1
- package/dist/slots/ExampleSider/index.module.less +1 -1
- package/dist/slots/ManualContent/index.module.less +1 -1
- package/package.json +1 -1
package/dist/plugin/examples.js
CHANGED
|
@@ -16,7 +16,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
}
|
|
17
17
|
return to;
|
|
18
18
|
};
|
|
19
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
21
|
+
mod
|
|
22
|
+
));
|
|
20
23
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
24
|
|
|
22
25
|
// src/plugin/examples.ts
|
|
@@ -72,22 +75,24 @@ var getTopicExamples = (topicPath) => {
|
|
|
72
75
|
}).sort((a, b) => a.order - b.order);
|
|
73
76
|
};
|
|
74
77
|
var getExamplesPageTopics = (exampleTopics) => {
|
|
75
|
-
return exampleTopics.map(
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
78
|
+
return exampleTopics.map(
|
|
79
|
+
({ id, slug, title, icon }) => {
|
|
80
|
+
const nid = id || slug;
|
|
81
|
+
let examples = [];
|
|
82
|
+
try {
|
|
83
|
+
examples = getTopicExamples(path.join(examplesBaseDir, nid));
|
|
84
|
+
} catch (e) {
|
|
85
|
+
console.warn(e);
|
|
86
|
+
}
|
|
87
|
+
return {
|
|
88
|
+
id: nid,
|
|
89
|
+
title,
|
|
90
|
+
icon,
|
|
91
|
+
examples,
|
|
92
|
+
childrenKey: "examples"
|
|
93
|
+
};
|
|
82
94
|
}
|
|
83
|
-
|
|
84
|
-
id: nid,
|
|
85
|
-
title,
|
|
86
|
-
icon,
|
|
87
|
-
examples,
|
|
88
|
-
childrenKey: "examples"
|
|
89
|
-
};
|
|
90
|
-
});
|
|
95
|
+
);
|
|
91
96
|
};
|
|
92
97
|
function getExamplePaths() {
|
|
93
98
|
const exampleTopicPaths = glob.sync(`${examplesBaseDir}/*/*`);
|
package/dist/plugin/index.js
CHANGED
|
@@ -16,7 +16,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
}
|
|
17
17
|
return to;
|
|
18
18
|
};
|
|
19
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
21
|
+
mod
|
|
22
|
+
));
|
|
20
23
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
24
|
|
|
22
25
|
// src/plugin/index.ts
|
package/dist/plugin/utils.js
CHANGED
|
@@ -16,7 +16,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
}
|
|
17
17
|
return to;
|
|
18
18
|
};
|
|
19
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
21
|
+
mod
|
|
22
|
+
));
|
|
20
23
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
24
|
|
|
22
25
|
// src/plugin/utils.ts
|