@weapp-tailwindcss/lynx 0.1.0 → 0.2.0

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 CHANGED
@@ -27,4 +27,16 @@ export default defineConfig({
27
27
  @source "./src";
28
28
  ```
29
29
 
30
- `pluginLynxTailwindcss` 固定使用 `platform: 'lynx'` 与 `generator.target: 'web'`。首版仅支持 ReactLynx + Rspeedy Tailwind CSS v4;不覆盖 Rspeedy Web 输出、非 React Lynx 框架、Tailwind CSS v3 或 React Native 风格的运行时样式映射。
30
+ `pluginLynxTailwindcss` 固定使用 `platform: 'lynx'`、`generator.target: 'web'` Lynx 原生兼容输出。Tailwind v4 theme 变量会在构建期静态化,确保 `bg-sky-500`、`p-6`、`text-lg` 等标准 utility 能进入 Lynx 原生样式表;应用自行定义的动态 CSS 变量保持不变。
31
+
32
+ 首版仅支持 ReactLynx + Rspeedy 与 Tailwind CSS v4;不覆盖 Rspeedy Web 输出、非 React Lynx 框架、Tailwind CSS v3 或 React Native 风格的运行时样式映射。
33
+
34
+ ## iOS 视觉验收
35
+
36
+ 仓库开发者可在已安装 LynxExplorer 的 iOS Simulator 中运行:
37
+
38
+ ```bash
39
+ pnpm e2e:lynx:ios
40
+ ```
41
+
42
+ 命令会启动 Rspeedy、解析实际 bundle URL、将 URL 写入 Simulator pasteboard,并在截图后按生成的 `bg-sky-500` 颜色做像素断言。当前 LynxExplorer iOS 版本没有可用的 deep-link 回调,因此需在提示出现后手动将 URL 粘贴到首页、点击 Go,再回到终端按 Enter;其余截图、裁剪、像素分析和 dev server 清理均自动完成。
package/dist/index.cjs CHANGED
@@ -4,15 +4,25 @@ let weapp_tailwindcss_rspack = require("weapp-tailwindcss/rspack");
4
4
  const PLUGIN_NAME = "weapp-tailwindcss:lynx";
5
5
  function normalizeOptions(options) {
6
6
  const { rspack: _rspack, generator, ...rest } = options;
7
+ const generatorOptions = generator === false ? {} : generator;
7
8
  return {
8
9
  ...rest,
10
+ rewriteCssImports: true,
9
11
  platform: "lynx",
10
12
  cssOptions: {
11
13
  ...options.cssOptions,
12
14
  platform: "lynx"
13
15
  },
14
16
  generator: {
15
- ...generator === false ? {} : generator,
17
+ ...generatorOptions,
18
+ webCompat: true,
19
+ styleOptions: {
20
+ ...generatorOptions?.styleOptions,
21
+ cssOptions: {
22
+ ...generatorOptions?.styleOptions?.cssOptions,
23
+ platform: "lynx"
24
+ }
25
+ },
16
26
  target: "web"
17
27
  }
18
28
  };
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { PatchRspackConfigOptions } from "weapp-tailwindcss/rspack";
2
1
  import { RsbuildPlugin } from "@lynx-js/rspeedy";
3
2
  import { WeappTailwindcssGeneratorOptions } from "weapp-tailwindcss/generator";
3
+ import { PatchRspackConfigOptions } from "weapp-tailwindcss/rspack";
4
4
  import { UserDefinedOptions } from "weapp-tailwindcss/types";
5
5
  //#region src/index.d.ts
6
6
  declare const PLUGIN_NAME = "weapp-tailwindcss:lynx";
package/dist/index.js CHANGED
@@ -3,15 +3,25 @@ import { WeappTailwindcss, patchRspackConfig } from "weapp-tailwindcss/rspack";
3
3
  const PLUGIN_NAME = "weapp-tailwindcss:lynx";
4
4
  function normalizeOptions(options) {
5
5
  const { rspack: _rspack, generator, ...rest } = options;
6
+ const generatorOptions = generator === false ? {} : generator;
6
7
  return {
7
8
  ...rest,
9
+ rewriteCssImports: true,
8
10
  platform: "lynx",
9
11
  cssOptions: {
10
12
  ...options.cssOptions,
11
13
  platform: "lynx"
12
14
  },
13
15
  generator: {
14
- ...generator === false ? {} : generator,
16
+ ...generatorOptions,
17
+ webCompat: true,
18
+ styleOptions: {
19
+ ...generatorOptions?.styleOptions,
20
+ cssOptions: {
21
+ ...generatorOptions?.styleOptions?.cssOptions,
22
+ platform: "lynx"
23
+ }
24
+ },
15
25
  target: "web"
16
26
  }
17
27
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@weapp-tailwindcss/lynx",
3
3
  "type": "module",
4
- "version": "0.1.0",
4
+ "version": "0.2.0",
5
5
  "description": "Tailwind CSS 4 integration for ReactLynx and Rspeedy.",
6
6
  "license": "MIT",
7
7
  "repository": {
@@ -43,7 +43,7 @@
43
43
  }
44
44
  },
45
45
  "dependencies": {
46
- "weapp-tailwindcss": "^5.2.12"
46
+ "weapp-tailwindcss": "^5.2.13"
47
47
  },
48
48
  "devDependencies": {
49
49
  "@lynx-js/rspeedy": "^0.16.3",