@dcloudio/uni-shared 3.0.0-alpha-3030820220114006 → 3.0.0-alpha-3030820220114008

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.
@@ -344,6 +344,7 @@ const defaultMiniProgramRpx2Unit = {
344
344
  unitRatio: 1,
345
345
  unitPrecision: 1,
346
346
  };
347
+ const defaultNVueRpx2Unit = defaultMiniProgramRpx2Unit;
347
348
  function createRpx2Unit(unit, unitRatio, unitPrecision) {
348
349
  // ignore: rpxCalcIncludeWidth
349
350
  return (val) => val.replace(unitRE, (m, $1) => {
@@ -584,18 +585,6 @@ function formatH5Log(type, filename, ...args) {
584
585
  console[type].apply(console, [...args, filename]);
585
586
  }
586
587
 
587
- let latestNodeId = 1;
588
- class NVueTextNode {
589
- constructor(text) {
590
- this.instanceId = '';
591
- this.nodeId = latestNodeId++;
592
- this.parentNode = null;
593
- this.nodeType = 3;
594
- this.text = text;
595
- this.children = [];
596
- }
597
- }
598
-
599
588
  function plusReady(callback) {
600
589
  if (typeof callback !== 'function') {
601
590
  return;
@@ -1344,7 +1333,6 @@ exports.NODE_TYPE_PAGE = NODE_TYPE_PAGE;
1344
1333
  exports.NODE_TYPE_TEXT = NODE_TYPE_TEXT;
1345
1334
  exports.NVUE_BUILT_IN_TAGS = NVUE_BUILT_IN_TAGS;
1346
1335
  exports.NVUE_U_BUILT_IN_TAGS = NVUE_U_BUILT_IN_TAGS;
1347
- exports.NVueTextNode = NVueTextNode;
1348
1336
  exports.ON_ADD_TO_FAVORITES = ON_ADD_TO_FAVORITES;
1349
1337
  exports.ON_APP_ENTER_BACKGROUND = ON_APP_ENTER_BACKGROUND;
1350
1338
  exports.ON_APP_ENTER_FOREGROUND = ON_APP_ENTER_FOREGROUND;
@@ -1415,6 +1403,7 @@ exports.debounce = debounce;
1415
1403
  exports.decode = decode;
1416
1404
  exports.decodedQuery = decodedQuery;
1417
1405
  exports.defaultMiniProgramRpx2Unit = defaultMiniProgramRpx2Unit;
1406
+ exports.defaultNVueRpx2Unit = defaultNVueRpx2Unit;
1418
1407
  exports.defaultRpx2Unit = defaultRpx2Unit;
1419
1408
  exports.dynamicSlotName = dynamicSlotName;
1420
1409
  exports.forcePatchProp = forcePatchProp;
@@ -148,6 +148,12 @@ export declare const defaultMiniProgramRpx2Unit: {
148
148
  unitPrecision: number;
149
149
  };
150
150
 
151
+ export declare const defaultNVueRpx2Unit: {
152
+ unit: string;
153
+ unitRatio: number;
154
+ unitPrecision: number;
155
+ };
156
+
151
157
  export declare const defaultRpx2Unit: {
152
158
  unit: string;
153
159
  unitRatio: number;
@@ -317,6 +323,7 @@ export declare interface NVueDocument {
317
323
  open: () => void;
318
324
  close: () => void;
319
325
  createElement: (tagName: string, props?: Record<string, unknown>) => NVueElement;
326
+ createText: (text: string) => Record<string, unknown>;
320
327
  createComment: (text: string) => Record<string, unknown>;
321
328
  fireEvent: (type: string) => void;
322
329
  destroy: () => void;
@@ -389,16 +396,6 @@ export declare interface NVueTaskCenter {
389
396
  updateData: (componentId: string, data: Record<string, unknown> | void, callback?: Function) => void;
390
397
  }
391
398
 
392
- export declare class NVueTextNode {
393
- instanceId: string;
394
- nodeId: number;
395
- parentNode: null | NVueElement;
396
- nodeType: 3;
397
- text: string;
398
- children: unknown[];
399
- constructor(text: string);
400
- }
401
-
402
399
  export declare const ON_ADD_TO_FAVORITES = "onAddToFavorites";
403
400
 
404
401
  export declare const ON_APP_ENTER_BACKGROUND = "onAppEnterBackground";
@@ -340,6 +340,7 @@ const defaultMiniProgramRpx2Unit = {
340
340
  unitRatio: 1,
341
341
  unitPrecision: 1,
342
342
  };
343
+ const defaultNVueRpx2Unit = defaultMiniProgramRpx2Unit;
343
344
  function createRpx2Unit(unit, unitRatio, unitPrecision) {
344
345
  // ignore: rpxCalcIncludeWidth
345
346
  return (val) => val.replace(unitRE, (m, $1) => {
@@ -580,18 +581,6 @@ function formatH5Log(type, filename, ...args) {
580
581
  console[type].apply(console, [...args, filename]);
581
582
  }
582
583
 
583
- let latestNodeId = 1;
584
- class NVueTextNode {
585
- constructor(text) {
586
- this.instanceId = '';
587
- this.nodeId = latestNodeId++;
588
- this.parentNode = null;
589
- this.nodeType = 3;
590
- this.text = text;
591
- this.children = [];
592
- }
593
- }
594
-
595
584
  function plusReady(callback) {
596
585
  if (typeof callback !== 'function') {
597
586
  return;
@@ -1299,4 +1288,4 @@ function getEnvLocale() {
1299
1288
  return (lang && lang.replace(/[.:].*/, '')) || 'en';
1300
1289
  }
1301
1290
 
1302
- export { ACTION_TYPE_ADD_EVENT, ACTION_TYPE_ADD_WXS_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_CHANGE_PREFIX, ATTR_CLASS, ATTR_INNER_HTML, ATTR_STYLE, ATTR_TEXT_CONTENT, ATTR_V_OWNER_ID, ATTR_V_RENDERJS, ATTR_V_SHOW, BACKGROUND_COLOR, BUILT_IN_TAGS, BUILT_IN_TAG_NAMES, COMPONENT_NAME_PREFIX, COMPONENT_PREFIX, COMPONENT_SELECTOR_PREFIX, DATA_RE, EventChannel, EventModifierFlags, I18N_JSON_DELIMITERS, JSON_PROTOCOL, LINEFEED, MINI_PROGRAM_PAGE_RUNTIME_HOOKS, NAVBAR_HEIGHT, NODE_TYPE_COMMENT, NODE_TYPE_ELEMENT, NODE_TYPE_PAGE, NODE_TYPE_TEXT, NVUE_BUILT_IN_TAGS, NVUE_U_BUILT_IN_TAGS, NVueTextNode, 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, ON_WXS_INVOKE_CALL_METHOD, PLUS_RE, PRIMARY_COLOR, RENDERJS_MODULES, RESPONSIVE_MIN_WIDTH, SCHEME_RE, SELECTED_COLOR, SLOT_DEFAULT_NAME, TABBAR_HEIGHT, TAGS, UNI_SSR, UNI_SSR_DATA, UNI_SSR_GLOBAL_DATA, UNI_SSR_STORE, UNI_SSR_TITLE, UNI_STORAGE_LOCALE, UniBaseNode, UniCommentNode, UniElement, UniEvent, UniInputElement, UniLifecycleHooks, UniNode, UniTextAreaElement, UniTextNode, WEB_INVOKE_APPSERVICE, WXS_MODULES, WXS_PROTOCOL, addFont, addLeadingSlash, cache, cacheStringFunction, callOptions, createIsCustomElement, createRpx2Unit, createUniEvent, customizeEvent, debounce, decode, decodedQuery, defaultMiniProgramRpx2Unit, defaultRpx2Unit, dynamicSlotName, forcePatchProp, formatAppLog, formatDateTime, formatH5Log, formatLog, getCustomDataset, getEnvLocale, getLen, getValueByDataPath, initCustomDataset, invokeArrayFns, isAppNVueNativeTag, isAppNativeTag, isBuiltInComponent, isComponentInternalInstance, isComponentTag, isH5CustomElement, isH5NativeTag, isMiniProgramNativeTag, isRootHook, normalizeDataset, normalizeEventType, normalizeTarget, once, parseEventName, parseQuery, parseUrl, passive, plusReady, removeLeadingSlash, resolveComponentInstance, resolveOwnerEl, resolveOwnerVm, sanitise, scrollTo, stringifyQuery, updateElementStyle };
1291
+ export { ACTION_TYPE_ADD_EVENT, ACTION_TYPE_ADD_WXS_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_CHANGE_PREFIX, ATTR_CLASS, ATTR_INNER_HTML, ATTR_STYLE, ATTR_TEXT_CONTENT, ATTR_V_OWNER_ID, ATTR_V_RENDERJS, ATTR_V_SHOW, BACKGROUND_COLOR, BUILT_IN_TAGS, BUILT_IN_TAG_NAMES, COMPONENT_NAME_PREFIX, COMPONENT_PREFIX, COMPONENT_SELECTOR_PREFIX, DATA_RE, EventChannel, EventModifierFlags, I18N_JSON_DELIMITERS, JSON_PROTOCOL, LINEFEED, MINI_PROGRAM_PAGE_RUNTIME_HOOKS, NAVBAR_HEIGHT, NODE_TYPE_COMMENT, NODE_TYPE_ELEMENT, NODE_TYPE_PAGE, NODE_TYPE_TEXT, NVUE_BUILT_IN_TAGS, NVUE_U_BUILT_IN_TAGS, 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, ON_WXS_INVOKE_CALL_METHOD, PLUS_RE, PRIMARY_COLOR, RENDERJS_MODULES, RESPONSIVE_MIN_WIDTH, SCHEME_RE, SELECTED_COLOR, SLOT_DEFAULT_NAME, TABBAR_HEIGHT, TAGS, UNI_SSR, UNI_SSR_DATA, UNI_SSR_GLOBAL_DATA, UNI_SSR_STORE, UNI_SSR_TITLE, UNI_STORAGE_LOCALE, UniBaseNode, UniCommentNode, UniElement, UniEvent, UniInputElement, UniLifecycleHooks, UniNode, UniTextAreaElement, UniTextNode, WEB_INVOKE_APPSERVICE, WXS_MODULES, WXS_PROTOCOL, addFont, addLeadingSlash, cache, cacheStringFunction, callOptions, createIsCustomElement, createRpx2Unit, createUniEvent, customizeEvent, debounce, decode, decodedQuery, defaultMiniProgramRpx2Unit, defaultNVueRpx2Unit, defaultRpx2Unit, dynamicSlotName, forcePatchProp, formatAppLog, formatDateTime, formatH5Log, formatLog, getCustomDataset, getEnvLocale, getLen, getValueByDataPath, initCustomDataset, invokeArrayFns, isAppNVueNativeTag, isAppNativeTag, isBuiltInComponent, isComponentInternalInstance, isComponentTag, isH5CustomElement, isH5NativeTag, isMiniProgramNativeTag, isRootHook, normalizeDataset, normalizeEventType, normalizeTarget, once, parseEventName, parseQuery, parseUrl, passive, plusReady, removeLeadingSlash, resolveComponentInstance, resolveOwnerEl, resolveOwnerVm, sanitise, scrollTo, stringifyQuery, updateElementStyle };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcloudio/uni-shared",
3
- "version": "3.0.0-alpha-3030820220114006",
3
+ "version": "3.0.0-alpha-3030820220114008",
4
4
  "description": "@dcloudio/uni-shared",
5
5
  "main": "./dist/uni-shared.cjs.js",
6
6
  "module": "./dist/uni-shared.es.js",
@@ -20,9 +20,9 @@
20
20
  },
21
21
  "gitHead": "33e807d66e1fe47e2ee08ad9c59247e37b8884da",
22
22
  "devDependencies": {
23
- "@vue/runtime-core": "3.2.27"
23
+ "@vue/runtime-core": "3.2.30"
24
24
  },
25
25
  "dependencies": {
26
- "@vue/shared": "3.2.27"
26
+ "@vue/shared": "3.2.30"
27
27
  }
28
28
  }