@4399ywkf/core 5.0.30 → 5.0.32

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/cli/index.js CHANGED
@@ -1310,18 +1310,12 @@ var themePlugin = createPlugin((options = {}) => ({
1310
1310
  order: 10,
1311
1311
  }`;
1312
1312
  if (code.includes("providers: []")) {
1313
- code = code.replace(
1314
- "providers: []",
1315
- `providers: [
1313
+ code = code.replace("providers: []", `providers: [
1316
1314
  ${providerEntry},
1317
- ]`
1318
- );
1315
+ ]`);
1319
1316
  } else if (code.includes("providers: [")) {
1320
- code = code.replace(
1321
- "providers: [",
1322
- `providers: [
1323
- ${providerEntry},`
1324
- );
1317
+ code = code.replace("providers: [", `providers: [
1318
+ ${providerEntry},`);
1325
1319
  }
1326
1320
  if (!code.includes("import React")) {
1327
1321
  code = code.replace(
@@ -1354,9 +1348,7 @@ function generateThemeProvider(opts) {
1354
1348
  sections.push(`// \u6B64\u6587\u4EF6\u7531 @4399ywkf/plugin-theme v3 \u81EA\u52A8\u751F\u6210\uFF0C\u8BF7\u52FF\u624B\u52A8\u4FEE\u6539`);
1355
1349
  sections.push(buildImports({ globalReset, cssVar, scopePopupContainer, locale }));
1356
1350
  sections.push(TYPES_CODE);
1357
- sections.push(
1358
- buildStoreCode({ defaultAppearance, primaryColor, neutralColor, locale })
1359
- );
1351
+ sections.push(buildStoreCode({ defaultAppearance, primaryColor, neutralColor, locale }));
1360
1352
  sections.push(HOOKS_CODE);
1361
1353
  if (globalReset) sections.push(GLOBAL_RESET_CODE);
1362
1354
  if (cssVar) sections.push(buildCssVarSyncCode());
@@ -1553,10 +1545,6 @@ const GlobalReset = createGlobalStyle(({ theme }) => css\`
1553
1545
  code {
1554
1546
  font-family: \${theme.fontFamilyCode} !important;
1555
1547
  }
1556
-
1557
- ::selection {
1558
- -webkit-text-fill-color: unset !important;
1559
- }
1560
1548
  \`);`;
1561
1549
  function buildCssVarSyncCode() {
1562
1550
  return `
@@ -2137,6 +2125,7 @@ function collectPluginNames(plugins) {
2137
2125
  var defaultConfig = {
2138
2126
  appName: "app",
2139
2127
  appCName: "\u5E94\u7528",
2128
+ strictMode: true,
2140
2129
  dev: {
2141
2130
  port: 3e3,
2142
2131
  host: "localhost",
@@ -2855,7 +2844,7 @@ export default routes;
2855
2844
 
2856
2845
  // src/generator/templates/bootstrap.ts
2857
2846
  function generateBootstrap(config, injections = {}) {
2858
- const { appName, router } = config;
2847
+ const { appName, router, strictMode = true } = config;
2859
2848
  const routerImport = router.conventional ? `import { createRouter } from "./routes";` : `import { createRouter } from "@/routes";`;
2860
2849
  const imports = [
2861
2850
  `import { bootstrap, type AppConfig } from "@4399ywkf/core/runtime";`,
@@ -2906,7 +2895,7 @@ export function createAppConfig(userConfig: Partial<AppConfig> = {}): AppConfig
2906
2895
  router,
2907
2896
  basename: effectiveBasename,
2908
2897
  rootId: APP_NAME,
2909
- strictMode: true,
2898
+ strictMode: ${strictMode},
2910
2899
  antd: {
2911
2900
  enabled: true,
2912
2901
  },