@weapp-vite/web 1.2.1 → 1.2.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/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { W as WeappWebPluginOptions, t as transformWxssToCss, w as weappWebPlugin } from './plugin-C1f_qgnH.js';
1
+ export { W as WeappWebPluginOptions, t as transformWxssToCss, w as weappWebPlugin } from './plugin-D2-INTrF.js';
2
2
  export { ButtonFormConfig, NavigationBarMetrics, RenderContext, RpxConfig, TemplateRenderer, TemplateScope, createRenderContext, createTemplate, defineComponent, ensureButtonDefined, hideNavigationBarLoading, initializePageRoutes, injectStyle, navigateBack, navigateTo, reLaunch, redirectTo, registerApp, registerComponent, registerPage, removeStyle, renderTemplate, setButtonFormConfig, setNavigationBarColor, setNavigationBarMetrics, setNavigationBarTitle, setupRpx, showNavigationBarLoading, switchTab } from './runtime/index.js';
3
3
  import 'vite';
4
4
  import 'lit';
@@ -2,17 +2,17 @@ import { Plugin } from 'vite';
2
2
 
3
3
  interface WxssTransformOptions {
4
4
  /**
5
- * How many CSS pixels should a single rpx represent.
6
- * Default approximates a 750rpx layout projected to 375px screens.
5
+ * 1rpx 对应的 CSS 像素数。
6
+ * 默认值近似于 750rpx 设计稿在 375px 屏幕上的换算。
7
7
  */
8
8
  pxPerRpx?: number;
9
9
  /**
10
- * Design width for rpx conversion. When provided, rpx is converted into
11
- * `calc(var(--rpx) * N)` to enable responsive sizing.
10
+ * rpx 换算的设计宽度。传入后会把 rpx 转为
11
+ * `calc(var(--rpx) * N)` 以实现响应式缩放。
12
12
  */
13
13
  designWidth?: number;
14
14
  /**
15
- * CSS variable name used to store the runtime rpx size.
15
+ * 用于存储运行时 rpx 大小的 CSS 变量名。
16
16
  * @default "--rpx"
17
17
  */
18
18
  rpxVar?: string;
@@ -25,15 +25,15 @@ declare function transformWxssToCss(source: string, options?: WxssTransformOptio
25
25
  interface WeappWebPluginOptions {
26
26
  wxss?: WxssTransformOptions;
27
27
  /**
28
- * Source root of the mini-program project. Defaults to `<root>/src`.
28
+ * 小程序项目的源代码根目录,默认 `<root>/src`。
29
29
  */
30
30
  srcDir?: string;
31
31
  /**
32
- * Form behavior config for web runtime.
32
+ * Web 运行时的表单行为配置。
33
33
  */
34
34
  form?: {
35
35
  /**
36
- * When true, prevent default browser form submission. Defaults to true.
36
+ * true 时阻止浏览器默认的表单提交,默认 true
37
37
  */
38
38
  preventDefault?: boolean;
39
39
  };
package/dist/plugin.d.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  import 'vite';
2
- export { W as WeappWebPluginOptions, w as weappWebPlugin } from './plugin-C1f_qgnH.js';
2
+ export { W as WeappWebPluginOptions, w as weappWebPlugin } from './plugin-D2-INTrF.js';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@weapp-vite/web",
3
3
  "type": "module",
4
- "version": "1.2.1",
4
+ "version": "1.2.3",
5
5
  "description": "Experimental web runtime for weapp-vite templates",
6
6
  "author": "ice breaker <1324318532@qq.com>",
7
7
  "license": "MIT",
@@ -53,7 +53,7 @@
53
53
  "lit": "^3.3.1",
54
54
  "magic-string": "^0.30.21",
55
55
  "pathe": "^2.0.3",
56
- "rolldown-require": "2.0.3"
56
+ "rolldown-require": "2.0.5"
57
57
  },
58
58
  "scripts": {
59
59
  "dev": "tsup --watch --sourcemap",