@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.
@@ -1,5 +1,5 @@
1
- import { Q as YwkfPlugin, e as PluginHooks, Y as YwkfConfig, f as PluginConfig, U as RouteItem } from '../schema-CMyZyL6E.js';
2
- export { y as BuildHooks, C as CodeInjection, V as DefinePlugin, F as GeneratedFile, G as GeneratorContext, J as GeneratorHooks, W as PluginAPI, K as PluginContext, X as PluginLogger, L as RouterHooks, N as RuntimeHooks } from '../schema-CMyZyL6E.js';
1
+ import { Q as YwkfPlugin, e as PluginHooks, Y as YwkfConfig, f as PluginConfig, U as RouteItem } from '../schema-C91lhskq.js';
2
+ export { y as BuildHooks, C as CodeInjection, V as DefinePlugin, F as GeneratedFile, G as GeneratorContext, J as GeneratorHooks, W as PluginAPI, K as PluginContext, X as PluginLogger, L as RouterHooks, N as RuntimeHooks } from '../schema-C91lhskq.js';
3
3
  import { Configuration } from '@rspack/core';
4
4
  import { a as AppConfig, P as ProviderConfig } from '../types-BYqzyGAY.js';
5
5
  import 'react';
@@ -1,5 +1,5 @@
1
1
  import { Configuration } from '@rspack/core';
2
- import { Y as YwkfConfig } from '../schema-CMyZyL6E.js';
2
+ import { Y as YwkfConfig } from '../schema-C91lhskq.js';
3
3
  import '../types-BYqzyGAY.js';
4
4
  import 'react';
5
5
  import 'react-router';
@@ -1305,18 +1305,12 @@ var themePlugin = createPlugin((options = {}) => ({
1305
1305
  order: 10,
1306
1306
  }`;
1307
1307
  if (code.includes("providers: []")) {
1308
- code = code.replace(
1309
- "providers: []",
1310
- `providers: [
1308
+ code = code.replace("providers: []", `providers: [
1311
1309
  ${providerEntry},
1312
- ]`
1313
- );
1310
+ ]`);
1314
1311
  } else if (code.includes("providers: [")) {
1315
- code = code.replace(
1316
- "providers: [",
1317
- `providers: [
1318
- ${providerEntry},`
1319
- );
1312
+ code = code.replace("providers: [", `providers: [
1313
+ ${providerEntry},`);
1320
1314
  }
1321
1315
  if (!code.includes("import React")) {
1322
1316
  code = code.replace(
@@ -1349,9 +1343,7 @@ function generateThemeProvider(opts) {
1349
1343
  sections.push(`// \u6B64\u6587\u4EF6\u7531 @4399ywkf/plugin-theme v3 \u81EA\u52A8\u751F\u6210\uFF0C\u8BF7\u52FF\u624B\u52A8\u4FEE\u6539`);
1350
1344
  sections.push(buildImports({ globalReset, cssVar, scopePopupContainer, locale }));
1351
1345
  sections.push(TYPES_CODE);
1352
- sections.push(
1353
- buildStoreCode({ defaultAppearance, primaryColor, neutralColor, locale })
1354
- );
1346
+ sections.push(buildStoreCode({ defaultAppearance, primaryColor, neutralColor, locale }));
1355
1347
  sections.push(HOOKS_CODE);
1356
1348
  if (globalReset) sections.push(GLOBAL_RESET_CODE);
1357
1349
  if (cssVar) sections.push(buildCssVarSyncCode());
@@ -1548,10 +1540,6 @@ const GlobalReset = createGlobalStyle(({ theme }) => css\`
1548
1540
  code {
1549
1541
  font-family: \${theme.fontFamilyCode} !important;
1550
1542
  }
1551
-
1552
- ::selection {
1553
- -webkit-text-fill-color: unset !important;
1554
- }
1555
1543
  \`);`;
1556
1544
  function buildCssVarSyncCode() {
1557
1545
  return `
@@ -2073,6 +2061,7 @@ var ALL_SHORTHAND_KEYS = /* @__PURE__ */ new Set([
2073
2061
  var defaultConfig = {
2074
2062
  appName: "app",
2075
2063
  appCName: "\u5E94\u7528",
2064
+ strictMode: true,
2076
2065
  dev: {
2077
2066
  port: 3e3,
2078
2067
  host: "localhost",
@@ -2537,7 +2526,7 @@ export default routes;
2537
2526
 
2538
2527
  // src/generator/templates/bootstrap.ts
2539
2528
  function generateBootstrap(config, injections = {}) {
2540
- const { appName, router } = config;
2529
+ const { appName, router, strictMode = true } = config;
2541
2530
  const routerImport = router.conventional ? `import { createRouter } from "./routes";` : `import { createRouter } from "@/routes";`;
2542
2531
  const imports = [
2543
2532
  `import { bootstrap, type AppConfig } from "@4399ywkf/core/runtime";`,
@@ -2588,7 +2577,7 @@ export function createAppConfig(userConfig: Partial<AppConfig> = {}): AppConfig
2588
2577
  router,
2589
2578
  basename: effectiveBasename,
2590
2579
  rootId: APP_NAME,
2591
- strictMode: true,
2580
+ strictMode: ${strictMode},
2592
2581
  antd: {
2593
2582
  enabled: true,
2594
2583
  },