@conecli/cone-render 0.8.15-beta.1 → 0.8.15-beta.10

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
@@ -1,3 +1 @@
1
1
  cone-render
2
-
3
- 11
@@ -1 +1 @@
1
- import Taro from '@tarojs/taro'
1
+ import Taro from '@tarojs/taro'
@@ -0,0 +1 @@
1
+ import React from 'react'
@@ -1 +1 @@
1
- import Taro, { useRouter } from '@tarojs/taro'
1
+ import Taro, { useRouter } from '@tarojs/taro'
2
2
  floorData = {},
3
3
  const rootDom = document.querySelector('#J_shopHomeRoot')
4
4
  root: rootDom,
5
5
  rootMargin: `0px 0px ${window.innerHeight}px 0px`,
6
6
  useEffect(() => {
7
7
  if(componentShowState === true){
8
8
  const modularPackResult = floorData?.floorExtInfo?.modularPackResult
9
9
  console.log('向IOS原生发送通知请求ISV模块依赖JS文件:', bundleUrl)
10
10
  nativePageRegisterMessage(
11
11
  Message_Type.NATIVE_INJECT_JS_FILE,
12
12
  {
13
13
  data: {
14
14
  "bundleUrl": [bundleUrl]
15
15
  },
16
16
  },
17
17
  )
18
18
  }
19
19
  }
20
20
  }, [componentShowState])
21
21
  ref={ref}
@@ -1 +1 @@
1
- import React, {useCallback, useState} from 'react'
1
+ import React, { useCallback, useEffect, useRef, useState } from 'react'
2
2
  const [componentShowState, setComponentShowState] = useState(false)
3
3
  const componentLazyRef = useRef<HTMLElement | null>(null)
4
4
  const componentShowStateRef = useRef(false)
5
5
  useEffect(() => {
6
6
  const latestRes = latestFromNativeMsgStorage[TaroEventType.PAGE_SCROLL] || {}
7
7
  !componentShowStateRef.current && dealPageScrollInfo(latestRes)
8
8
  Taro.eventCenter.on(TaroEventType.PAGE_SCROLL, (res) => {
9
9
  !componentShowStateRef.current && dealPageScrollInfo(res)
10
10
  })
11
11
 
12
12
 
13
13
  <View
14
14
  ref={componentLazyRef}
15
15
  className={classNames(
16
16
  imageStyle['d-app-lazy-image'],
17
17
  {
18
18
  [imageStyle['d-lazy-sku-image']]: isSkuImage,
19
19
  },
20
20
  {
21
21
  [imageStyle['d-hide-image-error']]: imageErrState,
22
22
  },
23
23
  {
24
24
  [imageStyle['d-load-completed']]: loadSuccess,
25
25
  },
26
26
  {
27
27
  'd-imag-rendering-crisp-edges':
28
28
  !taroJdBaseInfo.info.pageInfo.isVipShop &&
29
29
  imagRenderingSet,
30
30
  },
31
31
  'J_html5ImageBg',
32
32
  className,
33
33
  )}
34
34
  style={{
35
35
  ...style,
36
36
  ...changeStyleIncludeWidthAndHeightAndBgColor(),
37
37
  }}
38
38
  >
39
39
  {componentShowState && <img
40
40
  src={getQualityImage(
41
41
  imgSrc,
42
42
  taroJdBaseInfo.info.pageInfo.isVipShop
43
43
  ? NetWorkTypeQuality['perfect']
44
44
  : NetWorkTypeQuality[getNetWorkType],
45
45
  )}
46
46
  onLoad={imageLoad.bind(this, imgSrc)}
47
47
  onError={imageError}
48
48
  />}
49
49
  </View>
50
50
  ) : (
51
51
  <Image
52
52
  style={{
53
53
  ...style,
54
54
  ...changeStyleIncludeWidthAndHeightAndBgColor(),
55
55
  }}
56
56
  className={classNames(
57
57
  imageStyle['d-lazy-image'],
58
58
  {
59
59
  [imageStyle['d-lazy-sku-image']]: isSkuImage,
60
60
  },
61
61
  {
62
62
  [imageStyle['d-hide-image-error']]: imageErrState,
63
63
  },
64
64
  {
65
65
  [imageStyle['d-load-completed']]: loadSuccess,
66
66
  },
67
67
  {
68
68
  'd-imag-rendering-crisp-edges': imagRenderingSet,
69
69
  },
70
70
  className,
71
71
  )}
72
72
  src={getQualityImage(
73
73
  imgSrc,
74
74
  NetWorkTypeQuality[getNetWorkType],
75
75
  )}
76
76
  lazyLoad={lazyLoad}
77
77
  onError={imageError}
78
78
  onLoad={imageLoad.bind(this, imgSrc)}
79
79
  {...otherOption}
80
80
  />
81
81
  )
@@ -1 +1 @@
1
- import React, { Suspense, lazy } from 'react'
1
+ import React, { Suspense, lazy } from 'react'
@@ -1 +1 @@
1
- import Taro from '@tarojs/taro'
1
+ import Taro from '@tarojs/taro'
@@ -1 +1 @@
1
- import React from 'react'
1
+ import React from 'react'
2
2
  floorData={floorItem}
@@ -1 +1 @@
1
- import taroJdBaseInfo from '../common'
1
+ import taroJdBaseInfo from '../common'
2
2
  const result = document.domain.match(/jd\.\w+$/)
3
3
  if(result){
4
4
  document.domain = result[0]
5
5
  }
@@ -1 +1 @@
1
- import Taro from '@tarojs/taro'
1
+ import Taro from '@tarojs/taro'
2
2
  if(isJdApp && isH5AndJdShopView && isAndroidDevice){
3
3
  setTimeout(() => {
4
4
  nativePageRegisterMessage(
5
5
  Message_Type.NATIVE_GET_SCROLL_TOP,
6
6
  null,
7
7
  )
8
8
  }, 0)
9
9
  }
@@ -1 +1 @@
1
- import Taro from '@tarojs/taro'
1
+ import Taro from '@tarojs/taro'
package/package.json CHANGED
@@ -1,13 +1,11 @@
1
1
  {
2
2
  "name": "@conecli/cone-render",
3
- "version": "0.8.15-beta.1",
3
+ "version": "0.8.15-beta.10",
4
4
  "private": false,
5
- "main": "dist/open/index.ts",
6
5
  "files": [
7
6
  "dist/"
8
7
  ],
9
8
  "exports": {
10
- ".": "./dist/open/index.ts",
11
9
  "./api": "./dist/open/api/index.ts",
12
10
  "./components": "./dist/open/components/index.ts",
13
11
  "./modules": "./dist/open/modules/index.ts"
@@ -68,12 +66,13 @@
68
66
  "react": "^18.2.0",
69
67
  "react-content-loader": "^6.2.0",
70
68
  "react-dom": "^18.2.0",
71
- "react-refresh": "^0.14.0",
72
- "react-intersection-observer": "^9.1.0"
69
+ "react-intersection-observer": "^9.1.0",
70
+ "react-refresh": "^0.14.0"
73
71
  },
74
72
  "devDependencies": {
75
73
  "@babel/core": "^7.8.0",
76
74
  "@babel/runtime": "^7.17.9",
75
+ "@jmfe/jd-jssdk": "^3.3.1-alpha.0",
77
76
  "@pmmmwh/react-refresh-webpack-plugin": "^0.5.7",
78
77
  "@swc/core": "^1.2.242",
79
78
  "@swc/register": "^0.1.10",