From 26609872002e92e0de8a05e32718ce079d178fdc Mon Sep 17 00:00:00 2001 From: lareinayanyu Date: Wed, 9 Oct 2024 20:42:06 +0800 Subject: [PATCH 1/9] =?UTF-8?q?chore:=20=E8=AE=A1=E7=AE=97lineHeight?= =?UTF-8?q?=E6=97=B6=E6=B7=BB=E5=8A=A0fontSize=E6=A3=80=E6=B5=8B=E8=AD=A6?= =?UTF-8?q?=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/webpack-plugin/lib/runtime/components/react/utils.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/webpack-plugin/lib/runtime/components/react/utils.ts b/packages/webpack-plugin/lib/runtime/components/react/utils.ts index ef22aac502..802730b08f 100644 --- a/packages/webpack-plugin/lib/runtime/components/react/utils.ts +++ b/packages/webpack-plugin/lib/runtime/components/react/utils.ts @@ -182,6 +182,9 @@ function transformVar (styleObj: Record, varKeyPaths: Array) { let { lineHeight } = styleObj if (typeof lineHeight === 'string' && PERCENT_REGEX.test(lineHeight)) { + if (!styleObj.fontSize) { + console.warn('[Mpx runtime warn]: The fontSize property could not be read correctly, so the default fontSize of 16 will be used as the basis for calculating the lineHeight!') + } lineHeight = (parseFloat(lineHeight) / 100) * (styleObj.fontSize || DEFAULT_FONT_SIZE) styleObj.lineHeight = lineHeight } From f19650221af3a15d3d71242b782ee9752471c9f6 Mon Sep 17 00:00:00 2001 From: lareinayanyu Date: Wed, 9 Oct 2024 20:51:20 +0800 Subject: [PATCH 2/9] =?UTF-8?q?chore:=20=E8=AE=A1=E7=AE=97lineHeight?= =?UTF-8?q?=E6=97=B6=E6=B7=BB=E5=8A=A0fontSize=E6=A3=80=E6=B5=8B=E8=AD=A6?= =?UTF-8?q?=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/runtime/components/react/utils.ts | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/packages/webpack-plugin/lib/runtime/components/react/utils.ts b/packages/webpack-plugin/lib/runtime/components/react/utils.ts index 802730b08f..df8aefda20 100644 --- a/packages/webpack-plugin/lib/runtime/components/react/utils.ts +++ b/packages/webpack-plugin/lib/runtime/components/react/utils.ts @@ -1,5 +1,5 @@ import { useEffect, useRef, ReactNode, ReactElement, FunctionComponent, isValidElement, useContext, useState } from 'react' -import { TextStyle, Dimensions } from 'react-native' +import { Dimensions } from 'react-native' import { isObject, hasOwn, diffAndCloneA, noop } from '@mpxjs/utils' import { VarContext } from './context' @@ -12,6 +12,12 @@ export const VAR_USE_REGEX = /var\(([^,]+)(?:,([^)]+))?\)/ export const URL_REGEX = /url\(["']?(.*?)["']?\)/ export const DEFAULT_FONT_SIZE = 16 +export const throwReactWarning = (message: string) => { + setTimeout(() => { + console.warn(message) + }, 0) +} + export function rpx (value: number) { const { width } = Dimensions.get('screen') // rn 单位 dp = 1(css)px = 1 物理像素 * pixelRatio(像素比) @@ -182,10 +188,12 @@ function transformVar (styleObj: Record, varKeyPaths: Array) { let { lineHeight } = styleObj if (typeof lineHeight === 'string' && PERCENT_REGEX.test(lineHeight)) { - if (!styleObj.fontSize) { - console.warn('[Mpx runtime warn]: The fontSize property could not be read correctly, so the default fontSize of 16 will be used as the basis for calculating the lineHeight!') + const hasFontSize = hasOwn(styleObj, 'fontSize') + if (!hasFontSize) { + throwReactWarning('[Mpx runtime warn]: The fontSize property could not be read correctly, so the default fontSize of 16 will be used as the basis for calculating the lineHeight!') } - lineHeight = (parseFloat(lineHeight) / 100) * (styleObj.fontSize || DEFAULT_FONT_SIZE) + const fontSize = hasFontSize ? styleObj.fontSize : DEFAULT_FONT_SIZE + lineHeight = (parseFloat(lineHeight) / 100) * fontSize styleObj.lineHeight = lineHeight } } @@ -345,9 +353,3 @@ export function splitProps> (props: T) { } }) } - -export const throwReactWarning = (message: string) => { - setTimeout(() => { - console.warn(message) - }, 0) -} From 78562766365c4c352bc96df6fb1a5075ce76043e Mon Sep 17 00:00:00 2001 From: xiaolei <1017653702@qq.com> Date: Thu, 10 Oct 2024 10:35:16 +0800 Subject: [PATCH 3/9] [Fix]rn-ref-style array to object --- .../api/create-selector-query/rnNodesRef.js | 28 ++++++++++--------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/packages/api-proxy/src/platform/api/create-selector-query/rnNodesRef.js b/packages/api-proxy/src/platform/api/create-selector-query/rnNodesRef.js index 87977e03fe..d8d9eba21b 100644 --- a/packages/api-proxy/src/platform/api/create-selector-query/rnNodesRef.js +++ b/packages/api-proxy/src/platform/api/create-selector-query/rnNodesRef.js @@ -6,7 +6,6 @@ import { hump2dash, isArray } from '@mpxjs/utils' -import { StyleSheet } from 'react-native' const flushRefFns = (nodeInstances, fns, single) => { // wx的数据格式:对于具体方法接受到的回调传参,如果获取的 nodeRef 只有一个,那么只需要返回一条数据而不是数组,但是 exec 里面统一都是数组 @@ -61,8 +60,8 @@ const getMeasureProps = (measureProps = []) => { } const getDataset = (props) => { - return wrapFn((nodeRef, resolve) => { - props = nodeRef.props.current + return wrapFn((nodeInstance, resolve) => { + props = nodeInstance.props.current resolve({ dataset: collectDataset(props) }) @@ -70,9 +69,9 @@ const getDataset = (props) => { } const getPlainProps = (config) => { - return wrapFn((nodeRef, resolve) => { + return wrapFn((nodeInstance, resolve) => { const res = {} - const props = nodeRef.props.current + const props = nodeInstance.props.current config.forEach((key) => { // props 属性默认不转驼峰,用户写什么格式不会变化,取值做兼容 res[key] = props[key] || props[hump2dash(key)] || '' @@ -82,12 +81,15 @@ const getPlainProps = (config) => { } const getComputedStyle = (config = []) => { - return wrapFn((nodeRef, resolve) => { + return wrapFn((nodeInstance, resolve) => { config = new Set(config) const res = {} - const styles = nodeRef.props.current.style || [] - const defaultStyle = nodeRef.instance.defaultStyle || {} - const computedStyle = StyleSheet.flatten([defaultStyle, ...styles]) + const styles = nodeInstance.props.current.style || {} + const defaultStyle = nodeInstance.instance.defaultStyle || {} + const computedStyle = { + ...defaultStyle, + ...styles + } config.forEach((key) => { const humpKey = dash2hump(key) // 取 style 的 key 是根据传入的 key 来设置,传什么设置什么 key,只不过取值需要做兼容 @@ -99,8 +101,8 @@ const getComputedStyle = (config = []) => { } const getInstanceConfig = (config) => { - return wrapFn((nodeRef, resolve) => { - const instance = nodeRef.instance + return wrapFn((nodeInstance, resolve) => { + const instance = nodeInstance.instance resolve({ [config]: instance[config] || {} }) }) } @@ -113,8 +115,8 @@ const defaultScrollOffset = { } const getScrollOffset = () => { - return wrapFn((nodeRef, resolve) => { - const instance = nodeRef.instance + return wrapFn((nodeInstance, resolve) => { + const instance = nodeInstance.instance resolve( (instance.scrollOffset && instance.scrollOffset.current) || defaultScrollOffset From c9b7d8fe9483fb470d21509aad50ba9add10b6e1 Mon Sep 17 00:00:00 2001 From: lareinayanyu Date: Thu, 10 Oct 2024 15:35:22 +0800 Subject: [PATCH 4/9] =?UTF-8?q?chore:=20useTransformStyle=20styleObj?= =?UTF-8?q?=E5=B1=9E=E6=80=A7=E6=B7=BB=E5=8A=A0=E5=85=9C=E5=BA=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/webpack-plugin/lib/runtime/components/react/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/webpack-plugin/lib/runtime/components/react/utils.ts b/packages/webpack-plugin/lib/runtime/components/react/utils.ts index df8aefda20..9504ae473c 100644 --- a/packages/webpack-plugin/lib/runtime/components/react/utils.ts +++ b/packages/webpack-plugin/lib/runtime/components/react/utils.ts @@ -205,7 +205,7 @@ interface TransformStyleConfig { enableLineHeight?: boolean } -export function useTransformStyle (styleObj: Record, { enableVar, externalVarContext, enablePercent = true, enableLineHeight = true }: TransformStyleConfig) { +export function useTransformStyle (styleObj: Record = {}, { enableVar, externalVarContext, enablePercent = true, enableLineHeight = true }: TransformStyleConfig) { const varStyle: Record = {} const normalStyle: Record = {} let hasVarDec = false From e5f1fb04b2af515d5b96569e364ab0ceb94f43fb Mon Sep 17 00:00:00 2001 From: hiyuki <674883329@qq.com> Date: Fri, 11 Oct 2024 16:39:01 +0800 Subject: [PATCH 5/9] RN: support hairlineWidth && fix var() parse --- .../platform/builtInMixins/styleHelperMixin.ios.js | 10 ++++++---- .../webpack-plugin/lib/platform/style/wx/index.js | 6 +++--- packages/webpack-plugin/lib/react/style-helper.js | 6 +++++- .../lib/runtime/components/react/utils.ts | 11 ++++++----- 4 files changed, 20 insertions(+), 13 deletions(-) diff --git a/packages/core/src/platform/builtInMixins/styleHelperMixin.ios.js b/packages/core/src/platform/builtInMixins/styleHelperMixin.ios.js index e6bb196376..f8421b6ab7 100644 --- a/packages/core/src/platform/builtInMixins/styleHelperMixin.ios.js +++ b/packages/core/src/platform/builtInMixins/styleHelperMixin.ios.js @@ -1,5 +1,5 @@ import { isObject, isArray, dash2hump, isFunction, cached } from '@mpxjs/utils' -import { Dimensions } from 'react-native' +import { Dimensions, StyleSheet } from 'react-native' function rpx (value) { const { width } = Dimensions.get('screen') @@ -9,6 +9,7 @@ function rpx (value) { } global.__rpx = rpx +global.__hairlineWidth = StyleSheet.hairlineWidth const escapeReg = /[()[\]{}#!.:,%'"+$]/g const escapeMap = { @@ -81,7 +82,8 @@ const listDelimiter = /;(?![^(]*[)])/g const propertyDelimiter = /:(.+)/ const rpxRegExp = /^\s*(-?\d+(\.\d+)?)rpx\s*$/ const pxRegExp = /^\s*(-?\d+(\.\d+)?)(px)?\s*$/ -const varRegExp = /^--.*/ +const hairlineRegExp = /^\s*hairlineWidth\s*$/ +const varRegExp = /^--/ const parseStyleText = cached((cssText = '') => { const res = {} @@ -123,15 +125,15 @@ function transformStyleObj (styleObj) { const keys = Object.keys(styleObj) const transformed = {} keys.forEach((prop) => { - // todo 检测不支持的prop let value = styleObj[prop] let matched if ((matched = pxRegExp.exec(value))) { value = +matched[1] } else if ((matched = rpxRegExp.exec(value))) { value = rpx(+matched[1]) + } else if (hairlineRegExp.test(value)) { + value = StyleSheet.hairlineWidth } - // todo 检测不支持的value transformed[prop] = value }) return transformed diff --git a/packages/webpack-plugin/lib/platform/style/wx/index.js b/packages/webpack-plugin/lib/platform/style/wx/index.js index 008bc9e1f0..5a1183d7c6 100644 --- a/packages/webpack-plugin/lib/platform/style/wx/index.js +++ b/packages/webpack-plugin/lib/platform/style/wx/index.js @@ -9,7 +9,7 @@ module.exports = function getSpec ({ warn, error }) { // React Native android 不支持的 CSS property android: /^(text-decoration-style|text-decoration-color|shadow-offset|shadow-opacity|shadow-radius)$/ } - const cssVariableExp = /var\((.*?)\)/ + const cssVariableExp = /^var\((.+)\)$/ // 不支持的属性提示 const unsupportedPropError = ({ prop, mode }) => { error(`Property [${prop}] is not supported in React Native ${mode} environment!`) @@ -91,7 +91,7 @@ module.exports = function getSpec ({ warn, error }) { // css variable 类型校验 const newVal = (value.match(cssVariableExp)?.[1] || '').split(',') const variable = newVal?.[0] - if (!variable || !/^--.+$/.test(variable)) { + if (!variable || !/^--/.test(variable)) { tips(`The css variable [${prop}:${value}] is invalid, please check again`) return false } @@ -99,7 +99,7 @@ module.exports = function getSpec ({ warn, error }) { } const namedColor = ['transparent', 'aliceblue', 'antiquewhite', 'aqua', 'aquamarine', 'azure', 'beige', 'bisque', 'black', 'blanchedalmond', 'blue', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'fuchsia', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'gray', 'green', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'lime', 'limegreen', 'linen', 'magenta', 'maroon', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'navy', 'oldlace', 'olive', 'olivedrab', 'orange', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'purple', 'rebeccapurple', 'red', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'silver', 'skyblue', 'slateblue', 'slategray', 'snow', 'springgreen', 'steelblue', 'tan', 'teal', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'white', 'whitesmoke', 'yellow', 'yellowgreen'] const valueExp = { - number: /^(-?\d+(\.\d+)?)(rpx|px|%)?$/, + number: /^((-?\d+(\.\d+)?)(rpx|px|%)?|hairlineWidth)$/, color: new RegExp(('^(' + namedColor.join('|') + ')$') + '|(^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$)|^(rgb|rgba|hsl|hsla|hwb)\\(.+\\)$') } const type = getValueType(prop) diff --git a/packages/webpack-plugin/lib/react/style-helper.js b/packages/webpack-plugin/lib/react/style-helper.js index d067f87b24..6ce8790841 100644 --- a/packages/webpack-plugin/lib/react/style-helper.js +++ b/packages/webpack-plugin/lib/react/style-helper.js @@ -4,7 +4,8 @@ const getRulesRunner = require('../platform/index') const dash2hump = require('../utils/hump-dash').dash2hump const rpxRegExp = /^\s*(-?\d+(\.\d+)?)rpx\s*$/ const pxRegExp = /^\s*(-?\d+(\.\d+)?)(px)?\s*$/ -const varRegExp = /^--.*/ +const hairlineRegExp = /^\s*hairlineWidth\s*$/ +const varRegExp = /^--/ const cssPrefixExp = /^-(webkit|moz|ms|o)-/ function getClassMap ({ content, filename, mode, srcMode, warn, error }) { const classMap = {} @@ -22,6 +23,9 @@ function getClassMap ({ content, filename, mode, srcMode, warn, error }) { } else if ((matched = rpxRegExp.exec(value))) { value = `global.__rpx(${matched[1]})` needStringify = false + } else if (hairlineRegExp.test(value)) { + value = `global.__hairlineWidth` + needStringify = false } return needStringify ? JSON.stringify(value) : value } diff --git a/packages/webpack-plugin/lib/runtime/components/react/utils.ts b/packages/webpack-plugin/lib/runtime/components/react/utils.ts index ef22aac502..e7c7e05795 100644 --- a/packages/webpack-plugin/lib/runtime/components/react/utils.ts +++ b/packages/webpack-plugin/lib/runtime/components/react/utils.ts @@ -1,5 +1,5 @@ import { useEffect, useRef, ReactNode, ReactElement, FunctionComponent, isValidElement, useContext, useState } from 'react' -import { TextStyle, Dimensions } from 'react-native' +import { TextStyle, Dimensions, StyleSheet } from 'react-native' import { isObject, hasOwn, diffAndCloneA, noop } from '@mpxjs/utils' import { VarContext } from './context' @@ -8,8 +8,8 @@ export const PERCENT_REGEX = /^\s*-?\d+(\.\d+)?%\s*$/ export const BACKGROUND_REGEX = /^background(Image|Size|Repeat|Position)$/ export const TEXT_PROPS_REGEX = /ellipsizeMode|numberOfLines/ export const VAR_DEC_REGEX = /^--.*/ -export const VAR_USE_REGEX = /var\(([^,]+)(?:,([^)]+))?\)/ -export const URL_REGEX = /url\(["']?(.*?)["']?\)/ +export const VAR_USE_REGEX = /^\s*var\(([^,]+)(?:,(.+))?\)\s*$/ +export const URL_REGEX = /^\s*url\(["']?(.*?)["']?\)\s*$/ export const DEFAULT_FONT_SIZE = 16 export function rpx (value: number) { @@ -21,6 +21,7 @@ export function rpx (value: number) { const rpxRegExp = /^\s*(-?\d+(\.\d+)?)rpx\s*$/ const pxRegExp = /^\s*(-?\d+(\.\d+)?)(px)?\s*$/ +const hairlineRegExp = /^\s*hairlineWidth\s*$/ export function formatValue (value: string) { let matched @@ -28,6 +29,8 @@ export function formatValue (value: string) { return +matched[1] } else if ((matched = rpxRegExp.exec(value))) { return rpx(+matched[1]) + } else if (hairlineRegExp.test(value)) { + return StyleSheet.hairlineWidth } return value } @@ -79,9 +82,7 @@ export const parseInlineStyle = (inlineStyle = ''): Record => { export const parseUrl = (cssUrl = '') => { if (!cssUrl) return - const match = cssUrl.match(URL_REGEX) - return match?.[1] } From 88988b24784b8e6d169ac3f50b4911fc1074d80c Mon Sep 17 00:00:00 2001 From: hiyuki <674883329@qq.com> Date: Fri, 11 Oct 2024 16:47:35 +0800 Subject: [PATCH 6/9] fix lint --- .../core/src/platform/builtInMixins/styleHelperMixin.ios.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/src/platform/builtInMixins/styleHelperMixin.ios.js b/packages/core/src/platform/builtInMixins/styleHelperMixin.ios.js index f8421b6ab7..ab8f2a10e2 100644 --- a/packages/core/src/platform/builtInMixins/styleHelperMixin.ios.js +++ b/packages/core/src/platform/builtInMixins/styleHelperMixin.ios.js @@ -26,7 +26,7 @@ const escapeMap = { ':': '_c_', ',': '_2c_', '%': '_p_', - "'": '_q_', + '\'': '_q_', '"': '_dq_', '+': '_a_', $: '_si_' From 2bc87b988b788e85cebb8764a8b57656a96fa53c Mon Sep 17 00:00:00 2001 From: hiyuki <674883329@qq.com> Date: Fri, 11 Oct 2024 17:03:09 +0800 Subject: [PATCH 7/9] fix lint --- packages/webpack-plugin/lib/react/style-helper.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/webpack-plugin/lib/react/style-helper.js b/packages/webpack-plugin/lib/react/style-helper.js index 6ce8790841..c7276b86fd 100644 --- a/packages/webpack-plugin/lib/react/style-helper.js +++ b/packages/webpack-plugin/lib/react/style-helper.js @@ -24,7 +24,7 @@ function getClassMap ({ content, filename, mode, srcMode, warn, error }) { value = `global.__rpx(${matched[1]})` needStringify = false } else if (hairlineRegExp.test(value)) { - value = `global.__hairlineWidth` + value = 'global.__hairlineWidth' needStringify = false } return needStringify ? JSON.stringify(value) : value From 6594ff9b8956bd2047d24c5211505243cc5a064a Mon Sep 17 00:00:00 2001 From: hiyuki <674883329@qq.com> Date: Fri, 11 Oct 2024 17:57:31 +0800 Subject: [PATCH 8/9] rm useless routeContext value wrap --- .../core/src/platform/patch/react/getDefaultOptions.ios.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/core/src/platform/patch/react/getDefaultOptions.ios.js b/packages/core/src/platform/patch/react/getDefaultOptions.ios.js index 1228e1c996..c8885e3804 100644 --- a/packages/core/src/platform/patch/react/getDefaultOptions.ios.js +++ b/packages/core/src/platform/patch/react/getDefaultOptions.ios.js @@ -283,7 +283,7 @@ const triggerResizeEvent = (mpxProxy) => { } function usePageContext (mpxProxy, instance) { - const { pageId } = useContext(routeContext) || {} + const pageId = useContext(routeContext) instance.getPageId = () => { return pageId @@ -447,7 +447,7 @@ export function getDefaultOptions ({ type, rawOptions = {}, currentInject }) { null, createElement(routeContext.Provider, { - value: { pageId: currentPageId } + value: currentPageId }, createElement(defaultOptions, { From 7444efd4988668244e0b53b45787c8705a343c92 Mon Sep 17 00:00:00 2001 From: hiyuki <674883329@qq.com> Date: Fri, 11 Oct 2024 18:05:37 +0800 Subject: [PATCH 9/9] rm useless pageConfig props --- .../core/src/platform/patch/react/getDefaultOptions.ios.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/core/src/platform/patch/react/getDefaultOptions.ios.js b/packages/core/src/platform/patch/react/getDefaultOptions.ios.js index c8885e3804..12ad048939 100644 --- a/packages/core/src/platform/patch/react/getDefaultOptions.ios.js +++ b/packages/core/src/platform/patch/react/getDefaultOptions.ios.js @@ -452,8 +452,7 @@ export function getDefaultOptions ({ type, rawOptions = {}, currentInject }) { createElement(defaultOptions, { navigation, - route, - pageConfig + route } ) )