Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@tarojs/shared

Package Overview
Dependencies
Maintainers
10
Versions
649
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tarojs/shared - npm Package Compare versions

Comparing version 4.0.7-alpha.1 to 4.0.7-alpha.2

1

dist/constants.d.ts

@@ -8,2 +8,3 @@ export declare enum PLATFORM_TYPE {

}
export declare const COMPILE_MODE_IDENTIFIER_PREFIX = "f";
export declare const PLATFORM_CONFIG_MAP: {

@@ -10,0 +11,0 @@ h5: {

3

dist/constants.js

@@ -9,2 +9,3 @@ var PLATFORM_TYPE;

})(PLATFORM_TYPE || (PLATFORM_TYPE = {}));
const COMPILE_MODE_IDENTIFIER_PREFIX = 'f';
const PLATFORM_CONFIG_MAP = {

@@ -28,3 +29,3 @@ h5: {

export { PLATFORM_CONFIG_MAP, PLATFORM_TYPE };
export { COMPILE_MODE_IDENTIFIER_PREFIX, PLATFORM_CONFIG_MAP, PLATFORM_TYPE };
//# sourceMappingURL=constants.js.map

@@ -347,2 +347,3 @@ 'use strict';

})(exports.PLATFORM_TYPE || (exports.PLATFORM_TYPE = {}));
const COMPILE_MODE_IDENTIFIER_PREFIX = 'f';
const PLATFORM_CONFIG_MAP = {

@@ -1293,2 +1294,3 @@ h5: {

exports.COMPILE_MODE_IDENTIFIER_PREFIX = COMPILE_MODE_IDENTIFIER_PREFIX;
exports.EMPTY_ARR = EMPTY_ARR;

@@ -1295,0 +1297,0 @@ exports.EMPTY_OBJ = EMPTY_OBJ;

export { animation, controlledComponent, focusComponents, internalComponents, nestElements, singleQuote, touchEvents, voidElements } from './components.js';
export { PLATFORM_CONFIG_MAP, PLATFORM_TYPE } from './constants.js';
export { COMPILE_MODE_IDENTIFIER_PREFIX, PLATFORM_CONFIG_MAP, PLATFORM_TYPE } from './constants.js';
export { EventChannel } from './event-channel.js';

@@ -4,0 +4,0 @@ export { Events } from './event-emitter.js';

@@ -345,2 +345,3 @@ const DEFAULT_EMPTY_ARRAY = '[]';

})(PLATFORM_TYPE || (PLATFORM_TYPE = {}));
const COMPILE_MODE_IDENTIFIER_PREFIX = 'f';
const PLATFORM_CONFIG_MAP = {

@@ -1291,3 +1292,3 @@ h5: {

export { EMPTY_ARR, EMPTY_OBJ, EventChannel, Events, HOOK_TYPE, PLATFORM_CONFIG_MAP, PLATFORM_TYPE, Shortcuts, TaroHook, TaroHooks, animation, box, cacheDataGet, cacheDataHas, cacheDataSet, capitalize, controlledComponent, ensure, focusComponents, getComponentsAlias, getPlatformType, getUniqueKey, hasOwn, hooks, indent, internalComponents, isArray, isBoolean, isBooleanStringLiteral, isFunction, isNull, isNumber, isObject, isString, isUndefined, isWebPlatform, mergeInternalComponents, mergeReconciler, nestElements, nonsupport, noop, processApis, queryToJson, setUniqueKeyToRoute, singleQuote, toCamelCase, toDashed, toKebabCase, touchEvents, unbox, voidElements, warn };
export { COMPILE_MODE_IDENTIFIER_PREFIX, EMPTY_ARR, EMPTY_OBJ, EventChannel, Events, HOOK_TYPE, PLATFORM_CONFIG_MAP, PLATFORM_TYPE, Shortcuts, TaroHook, TaroHooks, animation, box, cacheDataGet, cacheDataHas, cacheDataSet, capitalize, controlledComponent, ensure, focusComponents, getComponentsAlias, getPlatformType, getUniqueKey, hasOwn, hooks, indent, internalComponents, isArray, isBoolean, isBooleanStringLiteral, isFunction, isNull, isNumber, isObject, isString, isUndefined, isWebPlatform, mergeInternalComponents, mergeReconciler, nestElements, nonsupport, noop, processApis, queryToJson, setUniqueKeyToRoute, singleQuote, toCamelCase, toDashed, toKebabCase, touchEvents, unbox, voidElements, warn };
//# sourceMappingURL=shared.esm.js.map

@@ -53,2 +53,3 @@ /**

protected _isUseXS: boolean;
protected _isUseCompileMode: boolean;
protected exportExpr: string;

@@ -77,2 +78,4 @@ protected isSupportRecursive: boolean;

get baseLevel(): number;
set isUseCompileMode(isUse: boolean);
get isUseCompileMode(): boolean;
set isUseXS(isUse: boolean);

@@ -79,0 +82,0 @@ get isUseXS(): boolean;

@@ -329,2 +329,29 @@ 'use strict';

var PLATFORM_TYPE;
(function (PLATFORM_TYPE) {
PLATFORM_TYPE["MINI"] = "mini";
PLATFORM_TYPE["WEB"] = "web";
PLATFORM_TYPE["RN"] = "rn";
PLATFORM_TYPE["HARMONY"] = "harmony";
PLATFORM_TYPE["QUICK"] = "quickapp";
})(PLATFORM_TYPE || (PLATFORM_TYPE = {}));
const COMPILE_MODE_IDENTIFIER_PREFIX = 'f';
({
h5: {
type: PLATFORM_TYPE.WEB
},
harmony: {
type: PLATFORM_TYPE.HARMONY
},
mini: {
type: PLATFORM_TYPE.MINI
},
rn: {
type: PLATFORM_TYPE.RN
},
quickapp: {
type: PLATFORM_TYPE.QUICK
},
});
function isString(o) {

@@ -358,28 +385,2 @@ return typeof o === 'string';

var PLATFORM_TYPE;
(function (PLATFORM_TYPE) {
PLATFORM_TYPE["MINI"] = "mini";
PLATFORM_TYPE["WEB"] = "web";
PLATFORM_TYPE["RN"] = "rn";
PLATFORM_TYPE["HARMONY"] = "harmony";
PLATFORM_TYPE["QUICK"] = "quickapp";
})(PLATFORM_TYPE || (PLATFORM_TYPE = {}));
({
h5: {
type: PLATFORM_TYPE.WEB
},
harmony: {
type: PLATFORM_TYPE.HARMONY
},
mini: {
type: PLATFORM_TYPE.MINI
},
rn: {
type: PLATFORM_TYPE.RN
},
quickapp: {
type: PLATFORM_TYPE.QUICK
},
});
class Events {

@@ -769,2 +770,3 @@ constructor(opts) {

this._isUseXS = true;
this._isUseCompileMode = false;
this.exportExpr = 'module.exports =';

@@ -830,2 +832,8 @@ this.thirdPartyPatcher = {};

}
set isUseCompileMode(isUse) {
this._isUseCompileMode = isUse;
}
get isUseCompileMode() {
return this._isUseCompileMode;
}
set isUseXS(isUse) {

@@ -1003,3 +1011,3 @@ this._isUseXS = this.supportXS && isUse;

getChildrenTemplate(level) {
const { isSupportRecursive, isUseXS, Adapter } = this;
const { isSupportRecursive, isUseXS, Adapter, isUseCompileMode = true } = this;
const isLastRecursiveComp = !isSupportRecursive && level + 1 === this.baseLevel;

@@ -1033,3 +1041,5 @@ const isUnRecursiveXs = !this.isSupportRecursive && isUseXS;

? `<template is="{{'tmpl_0_' + item.${"nn" /* Shortcuts.NodeName */}}}" data="{{${data}}}" ${forAttribute} />`
: `<template is="{{'tmpl_' + c + '_' + item.${"nn" /* Shortcuts.NodeName */}}}" data="{{${data}}}" ${forAttribute} />`;
: isUseCompileMode
? `<template is="{{'tmpl_' + (item.${"nn" /* Shortcuts.NodeName */}[0]==='${COMPILE_MODE_IDENTIFIER_PREFIX}' ? 0 : c) + '_' + item.${"nn" /* Shortcuts.NodeName */}}}" data="{{${data}}}" ${forAttribute} />`
: `<template is="{{'tmpl_' + c + '_' + item.${"nn" /* Shortcuts.NodeName */}}}" data="{{${data}}}" ${forAttribute} />`;
}

@@ -1132,3 +1142,3 @@ }

<template name="tmpl_${level}_${compName}">
<${compName} i="{{i}}" l="{{l}}" id="{{i.uid||i.sid}}" data-sid="{{i.sid}}">
<${compName} i="{{i}}" ${!isSupportRecursive && isUseXS ? 'l="{{l}}"' : ''} id="{{i.uid||i.sid}}" data-sid="{{i.sid}}">
</${compName}>

@@ -1135,0 +1145,0 @@ </template>

{
"name": "@tarojs/shared",
"version": "4.0.7-alpha.1",
"version": "4.0.7-alpha.2",
"description": "Taro utils internal use.",

@@ -5,0 +5,0 @@ "author": "O2Team",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc