@_tc/template-core 0.2.2 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1499 -1499
- package/fe/packages/react/ui/components/testPage/demoRegistry.js +4 -1
- package/package.json +1 -1
|
@@ -199,12 +199,15 @@ var sources = /* @__PURE__ */ Object.assign({
|
|
|
199
199
|
"./demos/menu/MenuStateDemo.tsx": MenuStateDemo_default,
|
|
200
200
|
"./demos/menu/MenuTopDemo.tsx": MenuTopDemo_default
|
|
201
201
|
});
|
|
202
|
+
function normalizeDemoSource(source) {
|
|
203
|
+
return source.replaceAll("@tc/ui-react/components/Date", "@_tc/template-core/fe/rc/components/Date").replaceAll("@tc/ui-react/components", "@_tc/template-core/fe/rc").replaceAll("@tc/ui-react/i18n", "@_tc/template-core/fe/rc/i18n").replaceAll("@tc/ui-react/hooks", "@_tc/template-core/fe/rc/hooks").replaceAll("@tc/ui-react", "@_tc/template-core/fe/rc");
|
|
204
|
+
}
|
|
202
205
|
function buildDemos(group) {
|
|
203
206
|
return Object.entries(modules).filter(([id]) => id.startsWith(`./demos/${group}/`)).map(([id, module]) => ({
|
|
204
207
|
id,
|
|
205
208
|
Component: module.default,
|
|
206
209
|
meta: module.demoMeta,
|
|
207
|
-
source: String(sources[id] ?? "")
|
|
210
|
+
source: normalizeDemoSource(String(sources[id] ?? ""))
|
|
208
211
|
})).sort((a, b) => a.meta.order - b.meta.order);
|
|
209
212
|
}
|
|
210
213
|
var coreDemos = buildDemos("core");
|