@ray-js/framework-shared 1.7.53 → 1.7.54

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.
@@ -1,5 +1,6 @@
1
1
  import "core-js/modules/esnext.iterator.constructor.js";
2
2
  import "core-js/modules/esnext.iterator.for-each.js";
3
+ import "core-js/modules/web.dom-collections.iterator.js";
3
4
  export class Emitter {
4
5
  constructor() {
5
6
  this.listeners = {};
@@ -1,3 +1,5 @@
1
+ import "core-js/modules/es.regexp.exec.js";
2
+ import "core-js/modules/es.string.replace.js";
1
3
  import "core-js/modules/esnext.iterator.constructor.js";
2
4
  import "core-js/modules/esnext.iterator.reduce.js";
3
5
  export const isPlatformSpecifyProp = prop => prop.match(/^(ali|wechat|toutiao)-/);
@@ -1,6 +1,9 @@
1
+ import "core-js/modules/es.regexp.exec.js";
2
+ import "core-js/modules/es.string.replace.js";
1
3
  import "core-js/modules/esnext.iterator.constructor.js";
2
4
  import "core-js/modules/esnext.iterator.filter.js";
3
5
  import "core-js/modules/esnext.iterator.for-each.js";
6
+ import "core-js/modules/web.dom-collections.iterator.js";
4
7
  import { isWeb } from '@ray-js/env';
5
8
  import { isUnitlessNumber } from './CSSProperty';
6
9
 
@@ -25,15 +28,15 @@ export function inlineStyle() {
25
28
  else if (!(key in isUnitlessNumber)) {
26
29
  if (!Number.isNaN(Number(value))) {
27
30
  if (isWeb) {
28
- style[key] = `${value / 100}rem`;
31
+ style[key] = "".concat(value / 100, "rem");
29
32
  } else {
30
- style[key] = `${value}rpx`;
33
+ style[key] = "".concat(value, "rpx");
31
34
  }
32
35
  } else if (/\b([.\d]+)rpx\b/.test(value) && isWeb) {
33
36
  // TODO: 支持 native 的样式抹平
34
37
  style[key] = value.replace(/\b([.\d]+)rpx\b/g, (match, x) => {
35
38
  const size = Number(x);
36
- return `${size / 100}rem`;
39
+ return "".concat(size / 100, "rem");
37
40
  });
38
41
  }
39
42
  }
@@ -1,8 +1,12 @@
1
1
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
+ import "core-js/modules/es.json.stringify.js";
3
+ import "core-js/modules/es.regexp.exec.js";
4
+ import "core-js/modules/es.string.replace.js";
2
5
  import "core-js/modules/esnext.iterator.constructor.js";
3
6
  import "core-js/modules/esnext.iterator.filter.js";
4
7
  import "core-js/modules/esnext.iterator.find.js";
5
8
  import "core-js/modules/esnext.iterator.map.js";
9
+ import "core-js/modules/web.dom-collections.iterator.js";
6
10
  import { match, parse } from 'path-to-regexp';
7
11
  const locals = {
8
12
  tabBarPagePathMustBeInRoutes: 'tabBar.list[{index}].pagePath: {pagePath} must be in route configuration: {routes}',
@@ -1,6 +1,9 @@
1
+ import "core-js/modules/es.regexp.exec.js";
2
+ import "core-js/modules/es.string.replace.js";
1
3
  import "core-js/modules/esnext.iterator.constructor.js";
2
4
  import "core-js/modules/esnext.iterator.filter.js";
3
5
  import "core-js/modules/esnext.iterator.reduce.js";
6
+ import "core-js/modules/web.dom-collections.iterator.js";
4
7
  const vendorPrefixes = ['webkit', 'moz', 'ms', 'o'];
5
8
  const transformReactStyleKey = key => {
6
9
  var _styleValue;
@@ -9,7 +12,7 @@ const transformReactStyleKey = key => {
9
12
  return key;
10
13
  }
11
14
  let styleValue = key.replace(/\.?([A-Z]+)/g, function (_x, y) {
12
- return `-${y.toLowerCase()}`;
15
+ return "-".concat(y.toLowerCase());
13
16
  });
14
17
 
15
18
  // vendor prefix
@@ -17,7 +20,7 @@ const transformReactStyleKey = key => {
17
20
  const firstWord = styleValue.split('-').filter(s => s)[0];
18
21
  styleValue = styleValue.replace(/^-/, '');
19
22
  if (vendorPrefixes.find(prefix => prefix === firstWord)) {
20
- styleValue = `-${styleValue}`;
23
+ styleValue = "-".concat(styleValue);
21
24
  }
22
25
  }
23
26
  return styleValue;
@@ -28,6 +31,6 @@ export const plainStyle = style => {
28
31
  }
29
32
  return Object.keys(style).reduce((acc, key) => {
30
33
  const value = style[key];
31
- return [...acc, `${transformReactStyleKey(key)}:${value};`];
34
+ return [...acc, "".concat(transformReactStyleKey(key), ":").concat(value, ";")];
32
35
  }, []).join('\n');
33
36
  };
@@ -1,12 +1,11 @@
1
1
  import React from 'react';
2
2
  import { plainStyle } from '../plainStyle';
3
3
  let clsxId = 0;
4
- const generateClassName = () => `placeholder-style-${clsxId++}`;
4
+ const generateClassName = () => "placeholder-style-".concat(clsxId++);
5
5
  export function useStylesheet(css) {
6
6
  const className = React.useRef(generateClassName());
7
7
  React.useEffect(() => {
8
- const styleContent = `.${className.current}::placeholder {
9
- ${plainStyle(css)}}`;
8
+ const styleContent = ".".concat(className.current, "::placeholder {\n").concat(plainStyle(css), "}");
10
9
  const style = window.document.createElement('style');
11
10
  style.type = 'text/css';
12
11
  style.appendChild(document.createTextNode(styleContent));
@@ -1,3 +1,4 @@
1
+ import "core-js/modules/web.dom-collections.iterator.js";
1
2
  import { useRef, useState } from 'react';
2
3
 
3
4
  /**
@@ -6,6 +6,7 @@ import "core-js/modules/esnext.iterator.filter.js";
6
6
  import "core-js/modules/esnext.iterator.for-each.js";
7
7
  import "core-js/modules/esnext.iterator.map.js";
8
8
  import "core-js/modules/esnext.iterator.reduce.js";
9
+ import "core-js/modules/web.dom-collections.iterator.js";
9
10
  import * as React from 'react';
10
11
  import { isWeb } from '@ray-js/env';
11
12
  const LONG_TAP_DURATION = 350;
@@ -1,3 +1,4 @@
1
+ import "core-js/modules/web.dom-collections.iterator.js";
1
2
  import { useEffect, useRef, useState } from 'react';
2
3
  const nextFrame = function () {
3
4
  let duration = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1000 / 30;
@@ -32,6 +33,6 @@ export function useTransition(options, deps) {
32
33
  updateShow(visible);
33
34
  }, [visible]);
34
35
  return [status, {
35
- animationDuration: `${duration / 1000}s`
36
+ animationDuration: "".concat(duration / 1000, "s")
36
37
  }, updateShow];
37
38
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ray-js/framework-shared",
3
- "version": "1.7.53",
3
+ "version": "1.7.54",
4
4
  "description": "Ray shared for framework",
5
5
  "keywords": [
6
6
  "ray"
@@ -24,16 +24,16 @@
24
24
  },
25
25
  "dependencies": {
26
26
  "@ray-core/wechat": "^0.4.9",
27
- "@ray-js/env": "1.7.53",
28
- "@ray-js/types": "1.7.53",
27
+ "@ray-js/env": "1.7.54",
28
+ "@ray-js/types": "1.7.54",
29
29
  "path-to-regexp": "^6.3.0"
30
30
  },
31
31
  "devDependencies": {
32
- "@ray-js/cli": "1.7.53"
32
+ "@ray-js/cli": "1.7.54"
33
33
  },
34
34
  "publishConfig": {
35
35
  "access": "public",
36
36
  "registry": "https://registry.npmjs.org"
37
37
  },
38
- "gitHead": "5a151b15dd84ecf24beccb60450762fd0a0514bc"
38
+ "gitHead": "5116e3b87db4744a118a9fe97f88a8c708b44a93"
39
39
  }