@lynx-js/web-constants 0.16.1 → 0.17.1

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,23 @@
1
1
  # @lynx-js/web-constants
2
2
 
3
+ ## 0.17.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies []:
8
+ - @lynx-js/web-worker-rpc@0.17.1
9
+
10
+ ## 0.17.0
11
+
12
+ ### Patch Changes
13
+
14
+ - fix: avoid duplicate style transformation ([#1748](https://github.com/lynx-family/lynx-stack/pull/1748))
15
+
16
+ After this commit, we use DAG methods to handle the styleInfos
17
+
18
+ - Updated dependencies []:
19
+ - @lynx-js/web-worker-rpc@0.17.0
20
+
3
21
  ## 0.16.1
4
22
 
5
23
  ### Patch Changes
@@ -16,6 +16,12 @@ export interface OneInfo {
16
16
  export interface StyleInfo {
17
17
  [cssId: string]: OneInfo;
18
18
  }
19
+ export interface FlattenedOneInfo {
20
+ content: string[];
21
+ rules: CSSRule[];
22
+ importBy: string[];
23
+ }
24
+ export type FlattenedStyleInfo = FlattenedOneInfo[];
19
25
  /**
20
26
  * CSS Info for Old Generation CSS System
21
27
  */
@@ -42,9 +42,9 @@ const templateUpgraders = [
42
42
  'requestAnimationFrame',
43
43
  'cancelAnimationFrame',
44
44
  ].join(',');
45
- template.appType = template.lepusCode.root.startsWith('(function (globDynamicComponentEntry')
45
+ template.appType = template.appType ?? (template.lepusCode.root.startsWith('(function (globDynamicComponentEntry')
46
46
  ? 'lazy'
47
- : 'card';
47
+ : 'card');
48
48
  /**
49
49
  * The template version 1 has no module wrapper for bts code
50
50
  */
@@ -72,7 +72,7 @@ const generateModuleContent = (content, eager, appType) =>
72
72
  '\n(function() { "use strict"; const ',
73
73
  globalDisallowedVars.join('=void 0,'),
74
74
  '=void 0;\n',
75
- appType === 'lazy' ? 'module.exports=\n' : '',
75
+ appType !== 'card' ? 'module.exports=\n' : '',
76
76
  content,
77
77
  '\n})()',
78
78
  ].join('');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lynx-js/web-constants",
3
- "version": "0.16.1",
3
+ "version": "0.17.1",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "keywords": [],
@@ -23,7 +23,7 @@
23
23
  "**/*.css"
24
24
  ],
25
25
  "dependencies": {
26
- "@lynx-js/web-worker-rpc": "0.16.1"
26
+ "@lynx-js/web-worker-rpc": "0.17.1"
27
27
  },
28
28
  "devDependencies": {
29
29
  "@lynx-js/offscreen-document": "0.1.4"