cabloy 5.1.91 → 5.1.93

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/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # Changelog
2
2
 
3
+ ## 5.1.93
4
+
5
+ ### Bug Fixes
6
+
7
+ - Apply theme colors to select options
8
+
9
+ ## 5.1.92
10
+
11
+ ### Bug Fixes
12
+
13
+ - Preserve SSR route typing visibility.
14
+
15
+ ### Improvements
16
+
17
+ - Clarify side-effect import module names.
18
+ - Publish the latest package updates.
19
+
3
20
  ## 5.1.91
4
21
 
5
22
  ### Features
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cabloy",
3
- "version": "5.1.91",
3
+ "version": "5.1.93",
4
4
  "gitHead": "2c5c19284bab738e492856189acb6fad74b8a7b7",
5
5
  "description": "A Node.js fullstack framework",
6
6
  "keywords": [
@@ -474,8 +474,8 @@ importers:
474
474
  specifier: npm:@cabloy/zod@4.3.8
475
475
  version: '@cabloy/zod@4.3.8'
476
476
  zova:
477
- specifier: ^5.1.126
478
- version: 5.1.126(typescript@5.9.3)(vue@3.5.39(typescript@5.9.3))
477
+ specifier: ^5.1.129
478
+ version: 5.1.129(typescript@5.9.3)(vue@3.5.39(typescript@5.9.3))
479
479
  zova-jsx:
480
480
  specifier: ^1.1.74
481
481
  version: 1.1.74(typescript@5.9.3)
@@ -513,8 +513,8 @@ importers:
513
513
  specifier: ^5.1.32
514
514
  version: 5.1.32
515
515
  zova-module-a-ssr:
516
- specifier: ^5.1.26
517
- version: 5.1.26
516
+ specifier: ^5.1.29
517
+ version: 5.1.29
518
518
  zova-module-a-style:
519
519
  specifier: ^5.1.32
520
520
  version: 5.1.32
@@ -7598,6 +7598,9 @@ packages:
7598
7598
  zova-module-a-ssr@5.1.26:
7599
7599
  resolution: {integrity: sha512-NSW9Gmf2eM/2L6zKWeW3CU8rwO6d2ayh/XnBSmKK7nZwBtnsYp0J/xs1d4z8JrBOrzkQJaD1YSk7iPtwm8OqMQ==}
7600
7600
 
7601
+ zova-module-a-ssr@5.1.29:
7602
+ resolution: {integrity: sha512-wlxLSy+Wjh/UFEVqsKQ105bvXceXPdIDmJQPKF0hSwiNY1R8HUottADfXPwYOatzZAayZ4AU4vQIpG92F2GJiA==}
7603
+
7601
7604
  zova-module-a-ssrhmr@5.1.22:
7602
7605
  resolution: {integrity: sha512-K9D0DqCPuABvESyuAY8tQ7RukMpMEaMol0SV08ixVyed7Zd/b+Ugh49WEC2b5Y5iZCJliW9JJekvzS9Y0DilTA==}
7603
7606
 
@@ -7622,9 +7625,15 @@ packages:
7622
7625
  zova-suite-a-zova@5.1.125:
7623
7626
  resolution: {integrity: sha512-JE2gfchep6I9OTmQ43O36gbO8JtLfxiy4yCMMsifGvtfZDDuPRx6/KFtFKBIusB7Oohc6GBBGDfixANXdhGDZA==}
7624
7627
 
7628
+ zova-suite-a-zova@5.1.128:
7629
+ resolution: {integrity: sha512-+YRaC7QwS1/3upXrw7gPdpApgJjs1I1UUxeDl+3CHhiXHf/qYsLdPeUuQ98WKCiLIDD5jYyEYI5SU/Cs1gwjwA==}
7630
+
7625
7631
  zova@5.1.126:
7626
7632
  resolution: {integrity: sha512-MRuKzH7rUO7jxYRqTJrjkj9GtgX/liEVyT2cBFp+O+EraHD4EQuYKf88QJzzI6w4CbfPKfgFvOfhsYnzU96pjw==}
7627
7633
 
7634
+ zova@5.1.129:
7635
+ resolution: {integrity: sha512-cRLBx/UbXxhlwYBjLOeO9EI05HFk9rexU9T/KaN2fWrWeEV86cPM6aQmGuyuj/TvnAVEIvmcr+PGFPb6x6YMvQ==}
7636
+
7628
7637
  zwitch@1.0.5:
7629
7638
  resolution: {integrity: sha512-V50KMwwzqJV0NpZIZFwfOD5/lyny3WlSzRiXgA0G7VUnRlqttta1L6UQIHzd6EuBY/cHGfwTIck7w1yH6Q5zUw==}
7630
7639
 
@@ -13201,6 +13210,11 @@ snapshots:
13201
13210
  devalue: 5.8.1
13202
13211
  ms: 2.1.3
13203
13212
 
13213
+ zova-module-a-ssr@5.1.29:
13214
+ dependencies:
13215
+ devalue: 5.8.1
13216
+ ms: 2.1.3
13217
+
13204
13218
  zova-module-a-ssrhmr@5.1.22:
13205
13219
  dependencies:
13206
13220
  '@cabloy/socket': link:packages-utils/socket
@@ -13281,6 +13295,40 @@ snapshots:
13281
13295
  - typescript
13282
13296
  - vue
13283
13297
 
13298
+ zova-suite-a-zova@5.1.128(typescript@5.9.3)(vue@3.5.39(typescript@5.9.3)):
13299
+ dependencies:
13300
+ zova-module-a-api: 5.1.21
13301
+ zova-module-a-app: 5.1.24
13302
+ zova-module-a-bean: 5.1.31
13303
+ zova-module-a-behavior: 5.1.25
13304
+ zova-module-a-behaviors: 5.1.21
13305
+ zova-module-a-boundary: 5.1.21
13306
+ zova-module-a-command: 5.1.33
13307
+ zova-module-a-fetch: 5.1.23
13308
+ zova-module-a-form: 5.1.43(vue@3.5.39(typescript@5.9.3))
13309
+ zova-module-a-icon: 5.1.26
13310
+ zova-module-a-interceptor: 5.1.29
13311
+ zova-module-a-logger: 5.1.26
13312
+ zova-module-a-meta: 5.1.21
13313
+ zova-module-a-model: 5.1.30(vue@3.5.39(typescript@5.9.3))
13314
+ zova-module-a-openapi: 5.1.41
13315
+ zova-module-a-router: 5.1.29
13316
+ zova-module-a-routerstack: 5.1.26
13317
+ zova-module-a-routertabs: 5.1.32
13318
+ zova-module-a-ssr: 5.1.29
13319
+ zova-module-a-ssrhmr: 5.1.22
13320
+ zova-module-a-ssrserver: 5.1.22
13321
+ zova-module-a-style: 5.1.32
13322
+ zova-module-a-table: 5.1.37(vue@3.5.39(typescript@5.9.3))
13323
+ zova-module-a-zod: 5.1.35
13324
+ zova-module-a-zova: 5.1.89(typescript@5.9.3)(vue@3.5.39(typescript@5.9.3))
13325
+ transitivePeerDependencies:
13326
+ - '@vue/composition-api'
13327
+ - debug
13328
+ - supports-color
13329
+ - typescript
13330
+ - vue
13331
+
13284
13332
  zova@5.1.126(typescript@5.9.3)(vue@3.5.39(typescript@5.9.3)):
13285
13333
  dependencies:
13286
13334
  zova-core: 5.1.74(patch_hash=0f4164c4d2bbb16d671beb5c26759dff37769be0709df941bc7b90b94261ac54)(typescript@5.9.3)
@@ -13292,6 +13340,17 @@ snapshots:
13292
13340
  - typescript
13293
13341
  - vue
13294
13342
 
13343
+ zova@5.1.129(typescript@5.9.3)(vue@3.5.39(typescript@5.9.3)):
13344
+ dependencies:
13345
+ zova-core: 5.1.74(patch_hash=0f4164c4d2bbb16d671beb5c26759dff37769be0709df941bc7b90b94261ac54)(typescript@5.9.3)
13346
+ zova-suite-a-zova: 5.1.128(typescript@5.9.3)(vue@3.5.39(typescript@5.9.3))
13347
+ transitivePeerDependencies:
13348
+ - '@vue/composition-api'
13349
+ - debug
13350
+ - supports-color
13351
+ - typescript
13352
+ - vue
13353
+
13295
13354
  zwitch@1.0.5: {}
13296
13355
 
13297
13356
  zwitch@2.0.4: {}
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zova-cli",
3
- "version": "1.2.95",
3
+ "version": "1.2.96",
4
4
  "gitHead": "6f675a8cc46d596142c591c28a40cc4d82fcc6cc",
5
5
  "description": "zova cli",
6
6
  "keywords": [
@@ -44,7 +44,7 @@
44
44
  "@cabloy/process-helper": "^3.1.8",
45
45
  "fs-extra": "^11.3.5",
46
46
  "semver": "^7.6.2",
47
- "zova-cli-set-front": "^1.2.93"
47
+ "zova-cli-set-front": "^1.2.94"
48
48
  },
49
49
  "devDependencies": {
50
50
  "clean-package": "^2.2.0",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zova-cli-set-front",
3
- "version": "1.2.93",
3
+ "version": "1.2.94",
4
4
  "gitHead": "6f675a8cc46d596142c591c28a40cc4d82fcc6cc",
5
5
  "description": "zova cli-set-front",
6
6
  "keywords": [
@@ -53,6 +53,7 @@ interface IBinBuildRestContext {
53
53
  srcDir: string;
54
54
  outDir: string;
55
55
  bundleModules?: string[];
56
+ sideEffectImportModuleNames?: string[];
56
57
  }
57
58
 
58
59
  export class CliBinBuildRest extends BeanCliBase {
@@ -106,14 +107,20 @@ export class CliBinBuildRest extends BeanCliBase {
106
107
  // Modules
107
108
  const modules: string[] = [];
108
109
  const bundleModules: string[] = [];
110
+ const sideEffectImportModuleNames: string[] = [];
109
111
  for (const module of modulesMeta.modulesArray) {
110
- modules.push(`export * from '${module.info.fullName}';`);
112
+ const moduleName = module.info.fullName;
113
+ modules.push(`import '${moduleName}';`);
114
+ modules.push(`export * from '${moduleName}';`);
111
115
  const moduleRoot = module.root.replaceAll('\\', '/');
112
116
  if (moduleRoot.includes('/src/module/') || moduleRoot.includes('/src/suite/')) {
113
- bundleModules.push(module.info.fullName);
117
+ bundleModules.push(moduleName);
118
+ } else {
119
+ sideEffectImportModuleNames.push(moduleName);
114
120
  }
115
121
  }
116
122
  context.bundleModules = bundleModules;
123
+ context.sideEffectImportModuleNames = sideEffectImportModuleNames;
117
124
  argv.Modules = modules.join('\n');
118
125
  // Name/Version
119
126
  argv.Name = bundleName;
@@ -149,7 +156,12 @@ export class CliBinBuildRest extends BeanCliBase {
149
156
  await fse.writeFile(fileIndex, fileContent);
150
157
  }
151
158
 
152
- async _buildDts({ srcDir, outDir, bundleModules }: IBinBuildRestContext) {
159
+ async _buildDts({
160
+ srcDir,
161
+ outDir,
162
+ bundleModules,
163
+ sideEffectImportModuleNames,
164
+ }: IBinBuildRestContext) {
153
165
  // entry
154
166
  const entry = path.join(srcDir, 'index.ts');
155
167
  // build
@@ -176,6 +188,18 @@ export class CliBinBuildRest extends BeanCliBase {
176
188
  },
177
189
  // minify: true,
178
190
  });
191
+ await this._injectDtsImports(outDir, sideEffectImportModuleNames!);
192
+ }
193
+
194
+ async _injectDtsImports(outDir: string, sideEffectImportModuleNames: string[]) {
195
+ const fileIndex = path.join(outDir, 'index.d.mts');
196
+ let fileContent = (await fse.readFile(fileIndex)).toString();
197
+ const imports = sideEffectImportModuleNames
198
+ .filter(moduleName => !fileContent.includes(`import "${moduleName}";`))
199
+ .map(moduleName => `import "${moduleName}";`);
200
+ if (imports.length === 0) return;
201
+ fileContent = `${imports.join('\n')}\n${fileContent}`;
202
+ await fse.writeFile(fileIndex, fileContent);
179
203
  }
180
204
 
181
205
  async _build(buildContext: IBinBuildRestContext) {
@@ -224,7 +248,7 @@ async function _extractDeps(filePath: string): Promise<string[]> {
224
248
  const pos = content.indexOf('//#region');
225
249
  content = content.substring(0, pos);
226
250
  const packageNames = new Set();
227
- const re = /import\s+[\s\S]*?\s+from\s+['"]([^'"]+)['"]/g;
251
+ const re = /import\s+(?:[\s\S]*?\s+from\s+)?['"]([^'"]+)['"]/g;
228
252
 
229
253
  let match: any;
230
254
  while (true) {
@@ -395,7 +395,7 @@ importers:
395
395
  specifier: ^7.6.2
396
396
  version: 7.8.5
397
397
  zova-cli-set-front:
398
- specifier: ^1.2.92
398
+ specifier: ^1.2.94
399
399
  version: link:../cli-set-front
400
400
  devDependencies:
401
401
  clean-package:
@@ -816,7 +816,7 @@ importers:
816
816
  specifier: ^5.1.74
817
817
  version: link:../zova-core
818
818
  zova-suite-a-zova:
819
- specifier: ^5.1.126
819
+ specifier: ^5.1.128
820
820
  version: link:../../src/suite-vendor/a-zova
821
821
  devDependencies:
822
822
  clean-package:
@@ -983,7 +983,7 @@ importers:
983
983
  specifier: ^5.1.32
984
984
  version: link:modules/a-routertabs
985
985
  zova-module-a-ssr:
986
- specifier: ^5.1.27
986
+ specifier: ^5.1.29
987
987
  version: link:modules/a-ssr
988
988
  zova-module-a-ssrhmr:
989
989
  specifier: ^5.1.22
@@ -39,9 +39,26 @@ export class ControllerSelect extends BeanControllerBase {
39
39
  controllerRef,
40
40
  onChange,
41
41
  onBlur,
42
+ style,
42
43
  'onUpdate:modelValue': _onUpdateModelValue,
43
44
  ...props
44
45
  } = this.$props as any;
46
+ const selectBackgroundColor = style?.backgroundColor ?? 'var(--color-base-100)';
47
+ const selectColor = style?.color ?? 'var(--color-base-content)';
48
+ const optionStyle = {
49
+ backgroundColor: selectBackgroundColor,
50
+ color: selectColor,
51
+ };
52
+ const placeholderOptionStyle = {
53
+ backgroundColor: selectBackgroundColor,
54
+ color: `color-mix(in oklch, ${selectColor} 60%, transparent)`,
55
+ };
56
+ const selectStyle = {
57
+ ...style,
58
+ colorScheme: this.$theme.dark ? 'dark' : 'light',
59
+ backgroundColor: selectBackgroundColor,
60
+ color: selectColor,
61
+ };
45
62
  const domOptions: VNode[] = [];
46
63
  const modelValueDom = isNil(this.modelValue) ? '' : String(this.modelValue);
47
64
  if (items) {
@@ -50,7 +67,12 @@ export class ControllerSelect extends BeanControllerBase {
50
67
  const value = item[itemValue];
51
68
  const valueDom = isNil(value) ? '' : String(value);
52
69
  domOptions.push(
53
- <option key={valueDom} value={valueDom} selected={modelValueDom === valueDom}>
70
+ <option
71
+ key={valueDom}
72
+ value={valueDom}
73
+ selected={modelValueDom === valueDom}
74
+ style={optionStyle}
75
+ >
54
76
  {title}
55
77
  </option>,
56
78
  );
@@ -59,6 +81,7 @@ export class ControllerSelect extends BeanControllerBase {
59
81
  return (
60
82
  <select
61
83
  {...props}
84
+ style={selectStyle}
62
85
  onChange={(e: Event) => {
63
86
  const selectedValue = (e.target as HTMLSelectElement).value;
64
87
  const item = items?.find(item => {
@@ -75,7 +98,7 @@ export class ControllerSelect extends BeanControllerBase {
75
98
  }}
76
99
  >
77
100
  {!!placeholder && (
78
- <option disabled={true} selected={isNil(this.modelValue)}>
101
+ <option disabled={true} selected={isNil(this.modelValue)} style={placeholderOptionStyle}>
79
102
  {placeholder}
80
103
  </option>
81
104
  )}