@dcloudio/uni-shared
Advanced tools
Comparing version 3.0.0-alpha-3000020210730001 to 3.0.0-alpha-3000020210808001
@@ -575,2 +575,5 @@ 'use strict'; | ||
const ATTR_STYLE = 'style'; | ||
const ATTR_INNER_HTML = 'innerHTML'; | ||
const ATTR_TEXT_CONTENT = 'textContent'; | ||
const ATTR_V_SHOW = '.vShow'; | ||
class UniBaseNode extends UniNode { | ||
@@ -732,2 +735,3 @@ constructor(nodeType, nodeName, container) { | ||
const ACTION_TYPE_SET_TEXT = 10; | ||
const ACTION_TYPE_PAGE_SCROLL = 15; | ||
const ACTION_TYPE_EVENT = 20; | ||
@@ -937,2 +941,13 @@ | ||
const PAGE_HOOKS = [ | ||
ON_BACK_PRESS, | ||
ON_PAGE_SCROLL, | ||
ON_TAB_ITEM_TAP, | ||
ON_REACH_BOTTOM, | ||
ON_PULL_DOWN_REFRESH, | ||
]; | ||
function isRootHook(name) { | ||
return PAGE_HOOKS.indexOf(name) > -1; | ||
} | ||
function getEnvLocale() { | ||
@@ -950,2 +965,3 @@ const { env } = process; | ||
exports.ACTION_TYPE_PAGE_CREATED = ACTION_TYPE_PAGE_CREATED; | ||
exports.ACTION_TYPE_PAGE_SCROLL = ACTION_TYPE_PAGE_SCROLL; | ||
exports.ACTION_TYPE_REMOVE = ACTION_TYPE_REMOVE; | ||
@@ -957,3 +973,6 @@ exports.ACTION_TYPE_REMOVE_ATTRIBUTE = ACTION_TYPE_REMOVE_ATTRIBUTE; | ||
exports.ATTR_CLASS = ATTR_CLASS; | ||
exports.ATTR_INNER_HTML = ATTR_INNER_HTML; | ||
exports.ATTR_STYLE = ATTR_STYLE; | ||
exports.ATTR_TEXT_CONTENT = ATTR_TEXT_CONTENT; | ||
exports.ATTR_V_SHOW = ATTR_V_SHOW; | ||
exports.BACKGROUND_COLOR = BACKGROUND_COLOR; | ||
@@ -1043,2 +1062,3 @@ exports.BUILT_IN_TAGS = BUILT_IN_TAGS; | ||
exports.isNativeTag = isNativeTag; | ||
exports.isRootHook = isRootHook; | ||
exports.isServiceCustomElement = isServiceCustomElement; | ||
@@ -1045,0 +1065,0 @@ exports.isServiceNativeTag = isServiceNativeTag; |
@@ -15,2 +15,4 @@ import { FontFaceDescriptors } from 'css-font-loading-module'; | ||
export declare const ACTION_TYPE_PAGE_SCROLL = 15; | ||
export declare const ACTION_TYPE_REMOVE = 5; | ||
@@ -42,4 +44,10 @@ | ||
export declare const ATTR_INNER_HTML = "innerHTML"; | ||
export declare const ATTR_STYLE = "style"; | ||
export declare const ATTR_TEXT_CONTENT = "textContent"; | ||
export declare const ATTR_V_SHOW = ".vShow"; | ||
export declare const BACKGROUND_COLOR = "#f7f7f7"; | ||
@@ -170,2 +178,4 @@ | ||
export declare function isRootHook(name: string): boolean; | ||
export declare function isServiceCustomElement(_tag: string): boolean; | ||
@@ -283,3 +293,3 @@ | ||
export declare type PageAction = PageCreateAction | PageCreatedAction | PageUpdateAction; | ||
export declare type PageAction = PageCreateAction | PageCreatedAction | PageUpdateAction | PageScrollAction; | ||
@@ -310,2 +320,7 @@ export declare type PageCreateAction = [typeof ACTION_TYPE_PAGE_CREATE, PageCreateData]; | ||
/** | ||
* onReachBottomDistance | ||
*/ | ||
export declare type PageScrollAction = [typeof ACTION_TYPE_PAGE_SCROLL, number]; | ||
export declare type PageUpdateAction = CreateAction | InsertAction | RemoveAction | AddEventAction | RemoveEventAction | SetAttributeAction | RemoveAttributeAction | SetTextAction; | ||
@@ -312,0 +327,0 @@ |
@@ -571,2 +571,5 @@ import { camelize, extend, isString, isPlainObject, isArray, isHTMLTag, isSVGTag, capitalize, hyphenate } from '@vue/shared'; | ||
const ATTR_STYLE = 'style'; | ||
const ATTR_INNER_HTML = 'innerHTML'; | ||
const ATTR_TEXT_CONTENT = 'textContent'; | ||
const ATTR_V_SHOW = '.vShow'; | ||
class UniBaseNode extends UniNode { | ||
@@ -728,2 +731,3 @@ constructor(nodeType, nodeName, container) { | ||
const ACTION_TYPE_SET_TEXT = 10; | ||
const ACTION_TYPE_PAGE_SCROLL = 15; | ||
const ACTION_TYPE_EVENT = 20; | ||
@@ -933,2 +937,13 @@ | ||
const PAGE_HOOKS = [ | ||
ON_BACK_PRESS, | ||
ON_PAGE_SCROLL, | ||
ON_TAB_ITEM_TAP, | ||
ON_REACH_BOTTOM, | ||
ON_PULL_DOWN_REFRESH, | ||
]; | ||
function isRootHook(name) { | ||
return PAGE_HOOKS.indexOf(name) > -1; | ||
} | ||
function getEnvLocale() { | ||
@@ -940,2 +955,2 @@ const { env } = process; | ||
export { ACTION_TYPE_ADD_EVENT, ACTION_TYPE_CREATE, ACTION_TYPE_EVENT, ACTION_TYPE_INSERT, ACTION_TYPE_PAGE_CREATE, ACTION_TYPE_PAGE_CREATED, ACTION_TYPE_REMOVE, ACTION_TYPE_REMOVE_ATTRIBUTE, ACTION_TYPE_REMOVE_EVENT, ACTION_TYPE_SET_ATTRIBUTE, ACTION_TYPE_SET_TEXT, ATTR_CLASS, ATTR_STYLE, BACKGROUND_COLOR, BUILT_IN_TAGS, COMPONENT_NAME_PREFIX, COMPONENT_PREFIX, COMPONENT_SELECTOR_PREFIX, DATA_RE, EventChannel, EventModifierFlags, JSON_PROTOCOL, NAVBAR_HEIGHT, NODE_TYPE_COMMENT, NODE_TYPE_ELEMENT, NODE_TYPE_PAGE, NODE_TYPE_TEXT, ON_ADD_TO_FAVORITES, ON_APP_ENTER_BACKGROUND, ON_APP_ENTER_FOREGROUND, ON_BACK_PRESS, ON_ERROR, ON_HIDE, ON_KEYBOARD_HEIGHT_CHANGE, ON_LAUNCH, ON_LOAD, ON_NAVIGATION_BAR_BUTTON_TAP, ON_NAVIGATION_BAR_SEARCH_INPUT_CHANGED, ON_NAVIGATION_BAR_SEARCH_INPUT_CLICKED, ON_NAVIGATION_BAR_SEARCH_INPUT_CONFIRMED, ON_NAVIGATION_BAR_SEARCH_INPUT_FOCUS_CHANGED, ON_PAGE_NOT_FOUND, ON_PAGE_SCROLL, ON_PULL_DOWN_REFRESH, ON_REACH_BOTTOM, ON_REACH_BOTTOM_DISTANCE, ON_READY, ON_RESIZE, ON_SHARE_APP_MESSAGE, ON_SHARE_TIMELINE, ON_SHOW, ON_TAB_ITEM_TAP, ON_THEME_CHANGE, ON_UNHANDLE_REJECTION, ON_UNLOAD, ON_WEB_INVOKE_APP_SERVICE, PLUS_RE, PRIMARY_COLOR, RESPONSIVE_MIN_WIDTH, SCHEME_RE, SELECTED_COLOR, TABBAR_HEIGHT, TAGS, UNI_SSR, UNI_SSR_DATA, UNI_SSR_GLOBAL_DATA, UNI_SSR_STORE, UNI_SSR_TITLE, UniBaseNode, UniCommentNode, UniElement, UniEvent, UniInputElement, UniNode, UniTextAreaElement, UniTextNode, WEB_INVOKE_APPSERVICE, addFont, cache, cacheStringFunction, callOptions, createRpx2Unit, createUniEvent, debounce, decode, decodedQuery, defaultRpx2Unit, formatDateTime, formatLog, getCustomDataset, getEnvLocale, getLen, initCustomDataset, invokeArrayFns, isBuiltInComponent, isCustomElement, isNativeTag, isServiceCustomElement, isServiceNativeTag, normalizeDataset, normalizeEventType, normalizeTarget, once, parseEventName, parseQuery, parseUrl, passive, plusReady, removeLeadingSlash, sanitise, scrollTo, stringifyQuery, updateElementStyle }; | ||
export { ACTION_TYPE_ADD_EVENT, ACTION_TYPE_CREATE, ACTION_TYPE_EVENT, ACTION_TYPE_INSERT, ACTION_TYPE_PAGE_CREATE, ACTION_TYPE_PAGE_CREATED, ACTION_TYPE_PAGE_SCROLL, ACTION_TYPE_REMOVE, ACTION_TYPE_REMOVE_ATTRIBUTE, ACTION_TYPE_REMOVE_EVENT, ACTION_TYPE_SET_ATTRIBUTE, ACTION_TYPE_SET_TEXT, ATTR_CLASS, ATTR_INNER_HTML, ATTR_STYLE, ATTR_TEXT_CONTENT, ATTR_V_SHOW, BACKGROUND_COLOR, BUILT_IN_TAGS, COMPONENT_NAME_PREFIX, COMPONENT_PREFIX, COMPONENT_SELECTOR_PREFIX, DATA_RE, EventChannel, EventModifierFlags, JSON_PROTOCOL, NAVBAR_HEIGHT, NODE_TYPE_COMMENT, NODE_TYPE_ELEMENT, NODE_TYPE_PAGE, NODE_TYPE_TEXT, ON_ADD_TO_FAVORITES, ON_APP_ENTER_BACKGROUND, ON_APP_ENTER_FOREGROUND, ON_BACK_PRESS, ON_ERROR, ON_HIDE, ON_KEYBOARD_HEIGHT_CHANGE, ON_LAUNCH, ON_LOAD, ON_NAVIGATION_BAR_BUTTON_TAP, ON_NAVIGATION_BAR_SEARCH_INPUT_CHANGED, ON_NAVIGATION_BAR_SEARCH_INPUT_CLICKED, ON_NAVIGATION_BAR_SEARCH_INPUT_CONFIRMED, ON_NAVIGATION_BAR_SEARCH_INPUT_FOCUS_CHANGED, ON_PAGE_NOT_FOUND, ON_PAGE_SCROLL, ON_PULL_DOWN_REFRESH, ON_REACH_BOTTOM, ON_REACH_BOTTOM_DISTANCE, ON_READY, ON_RESIZE, ON_SHARE_APP_MESSAGE, ON_SHARE_TIMELINE, ON_SHOW, ON_TAB_ITEM_TAP, ON_THEME_CHANGE, ON_UNHANDLE_REJECTION, ON_UNLOAD, ON_WEB_INVOKE_APP_SERVICE, PLUS_RE, PRIMARY_COLOR, RESPONSIVE_MIN_WIDTH, SCHEME_RE, SELECTED_COLOR, TABBAR_HEIGHT, TAGS, UNI_SSR, UNI_SSR_DATA, UNI_SSR_GLOBAL_DATA, UNI_SSR_STORE, UNI_SSR_TITLE, UniBaseNode, UniCommentNode, UniElement, UniEvent, UniInputElement, UniNode, UniTextAreaElement, UniTextNode, WEB_INVOKE_APPSERVICE, addFont, cache, cacheStringFunction, callOptions, createRpx2Unit, createUniEvent, debounce, decode, decodedQuery, defaultRpx2Unit, formatDateTime, formatLog, getCustomDataset, getEnvLocale, getLen, initCustomDataset, invokeArrayFns, isBuiltInComponent, isCustomElement, isNativeTag, isRootHook, isServiceCustomElement, isServiceNativeTag, normalizeDataset, normalizeEventType, normalizeTarget, once, parseEventName, parseQuery, parseUrl, passive, plusReady, removeLeadingSlash, sanitise, scrollTo, stringifyQuery, updateElementStyle }; |
{ | ||
"name": "@dcloudio/uni-shared", | ||
"version": "3.0.0-alpha-3000020210730001", | ||
"version": "3.0.0-alpha-3000020210808001", | ||
"description": "@dcloudio/uni-shared", | ||
@@ -21,3 +21,3 @@ "main": "./dist/uni-shared.cjs.js", | ||
}, | ||
"gitHead": "703a382f118f1bdcc88e5c6507560b335914b607" | ||
"gitHead": "1abd521bea2a247694b704b33a2f6c6e4157d4eb" | ||
} |
93755
2432