@micromag/core 0.3.733 → 0.3.736
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/es/utils.js +8 -3
- package/package.json +2 -2
package/es/utils.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import isString from 'lodash/isString';
|
|
1
2
|
import isNumber from 'lodash/isNumber';
|
|
2
3
|
import { kebabCase, pascalCase, snakeCase } from 'change-case';
|
|
3
4
|
export { camelCase, pascalCase, snakeCase } from 'change-case';
|
|
@@ -5,7 +6,6 @@ import _regenerator from '@babel/runtime/helpers/regenerator';
|
|
|
5
6
|
import _asyncToGenerator from '@babel/runtime/helpers/asyncToGenerator';
|
|
6
7
|
import isObject from 'lodash/isObject';
|
|
7
8
|
import { useEffect, useMemo } from 'react';
|
|
8
|
-
import isString from 'lodash/isString';
|
|
9
9
|
import tinycolor from 'tinycolor2';
|
|
10
10
|
import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
|
|
11
11
|
import _objectSpread from '@babel/runtime/helpers/objectSpread2';
|
|
@@ -15,6 +15,10 @@ import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
|
15
15
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
16
16
|
import slugify from 'slugify';
|
|
17
17
|
|
|
18
|
+
function addNonBreakingSpaces(text) {
|
|
19
|
+
return isString(text) ? text.replace(/«\s/g, '« ').replace(/\s»/g, ' »').replace(/\s:\s/g, ' : ') : text;
|
|
20
|
+
}
|
|
21
|
+
|
|
18
22
|
var convertStyleToString = function convertStyleToString(style) {
|
|
19
23
|
return style !== null ? Object.keys(style).map(function (key) {
|
|
20
24
|
return "".concat(kebabCase(key), ":").concat(isNumber(style[key]) ? "".concat(style[key], "px") : style[key], ";");
|
|
@@ -931,7 +935,8 @@ var getStyleFromText = function getStyleFromText(value) {
|
|
|
931
935
|
bold = _ref$bold === void 0 ? false : _ref$bold,
|
|
932
936
|
_ref$underline = _ref.underline,
|
|
933
937
|
underline = _ref$underline === void 0 ? false : _ref$underline,
|
|
934
|
-
|
|
938
|
+
_ref$transform = _ref.transform,
|
|
939
|
+
textTransform = _ref$transform === void 0 ? null : _ref$transform,
|
|
935
940
|
_ref$outline = _ref.outline,
|
|
936
941
|
outline = _ref$outline === void 0 ? false : _ref$outline;
|
|
937
942
|
return _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({
|
|
@@ -1185,4 +1190,4 @@ var getContrastingColor = function getContrastingColor(backgroundColor) {
|
|
|
1185
1190
|
return tinycolor(color).spin(30).toString();
|
|
1186
1191
|
};
|
|
1187
1192
|
|
|
1188
|
-
export { convertStyleToString, copyToClipboard, createNullableOnChange, createUseEvent, easings, getColorAsString, getComponentFromName, getContrastingColor, getDeviceScreens, getDisplayName, _getFieldByName as getFieldByName, getFieldFromPath, getFileName, getFontFamily as getFontFamilyFromFont, getFooterProps, getGridLayoutName, largestRemainderRound as getLargestRemainderRound, getLayersFromBackground, getLayoutParts, getMediaFilesAsArray, getOptimalImageUrl, getScreenExtraField, getScreenFieldsWithStates, getSecondsFromTime, getShadowCoords, getStyleFromAlignment, getStyleFromBorder, getStyleFromBox, getStyleFromColor, getStyleFromContainer, getStyleFromHighlight, getStyleFromImage, getStyleFromLink, getStyleFromMargin, getStyleFromText, getVideoSupportedMimes, isFooterFilled, isHeaderFilled, isImageFilled, isIos, isTextFilled$1 as isLabelFilled, isMessage, isTextFilled, isValidUrl, schemaId, _setValue as setFieldValue, slug, unique, _validateFields as validateFields };
|
|
1193
|
+
export { addNonBreakingSpaces, convertStyleToString, copyToClipboard, createNullableOnChange, createUseEvent, easings, getColorAsString, getComponentFromName, getContrastingColor, getDeviceScreens, getDisplayName, _getFieldByName as getFieldByName, getFieldFromPath, getFileName, getFontFamily as getFontFamilyFromFont, getFooterProps, getGridLayoutName, largestRemainderRound as getLargestRemainderRound, getLayersFromBackground, getLayoutParts, getMediaFilesAsArray, getOptimalImageUrl, getScreenExtraField, getScreenFieldsWithStates, getSecondsFromTime, getShadowCoords, getStyleFromAlignment, getStyleFromBorder, getStyleFromBox, getStyleFromColor, getStyleFromContainer, getStyleFromHighlight, getStyleFromImage, getStyleFromLink, getStyleFromMargin, getStyleFromText, getVideoSupportedMimes, isFooterFilled, isHeaderFilled, isImageFilled, isIos, isTextFilled$1 as isLabelFilled, isMessage, isTextFilled, isValidUrl, schemaId, _setValue as setFieldValue, slug, unique, _validateFields as validateFields };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/core",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.736",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"keywords": [
|
|
@@ -145,5 +145,5 @@
|
|
|
145
145
|
"access": "public",
|
|
146
146
|
"registry": "https://registry.npmjs.org/"
|
|
147
147
|
},
|
|
148
|
-
"gitHead": "
|
|
148
|
+
"gitHead": "77bd0bf6941418463c0f7bbb68bf9b20379c5c55"
|
|
149
149
|
}
|