nativescript-vue 2.9.1 → 2.9.2

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.
Files changed (3) hide show
  1. package/dist/index.js +37 -20
  2. package/index.d.ts +25 -23
  3. package/package.json +25 -23
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
 
2
2
  /*!
3
- * NativeScript-Vue v2.9.1
3
+ * NativeScript-Vue v2.9.2
4
4
  * (Using Vue v2.6.14)
5
5
  * (c) 2017-2022 rigor789
6
6
  * Released under the MIT license.
@@ -802,8 +802,6 @@ prototypeAccessors$2.child.get = function () {
802
802
 
803
803
  Object.defineProperties( VNode.prototype, prototypeAccessors$2 );
804
804
 
805
- var VNode$1 = VNode;
806
-
807
805
  var createEmptyVNode = function (text) {
808
806
  if ( text === void 0 ) text = '';
809
807
 
@@ -982,7 +980,7 @@ function copyAugment (target, src, keys) {
982
980
  * or the existing observer if the value already has one.
983
981
  */
984
982
  function observe (value, asRootData) {
985
- if (!isObject$2(value) || value instanceof VNode$1) {
983
+ if (!isObject$2(value) || value instanceof VNode) {
986
984
  return
987
985
  }
988
986
  var ob;
@@ -2073,7 +2071,7 @@ function traverse (val) {
2073
2071
  function _traverse (val, seen) {
2074
2072
  var i, keys;
2075
2073
  var isA = Array.isArray(val);
2076
- if ((!isA && !isObject$2(val)) || Object.isFrozen(val) || val instanceof VNode$1) {
2074
+ if ((!isA && !isObject$2(val)) || Object.isFrozen(val) || val instanceof VNode) {
2077
2075
  return
2078
2076
  }
2079
2077
  if (val.__ob__) {
@@ -2472,8 +2470,6 @@ Watcher.prototype.teardown = function teardown () {
2472
2470
  }
2473
2471
  };
2474
2472
 
2475
- var Watcher$1 = Watcher;
2476
-
2477
2473
  var mark;
2478
2474
  var measure;
2479
2475
 
@@ -2575,7 +2571,7 @@ function updateListeners (
2575
2571
  /* */
2576
2572
 
2577
2573
  function mergeVNodeHook (def, hookKey, hook) {
2578
- if (def instanceof VNode$1) {
2574
+ if (def instanceof VNode) {
2579
2575
  def = def.data.hook || (def.data.hook = {});
2580
2576
  }
2581
2577
  var invoker;
@@ -3008,7 +3004,7 @@ function initComputed$1 (vm, computed) {
3008
3004
 
3009
3005
  {
3010
3006
  // create internal watcher for the computed property.
3011
- watchers[key] = new Watcher$1(
3007
+ watchers[key] = new Watcher(
3012
3008
  vm,
3013
3009
  getter || noop,
3014
3010
  noop,
@@ -3177,7 +3173,7 @@ function stateMixin (Vue) {
3177
3173
  }
3178
3174
  options = options || {};
3179
3175
  options.user = true;
3180
- var watcher = new Watcher$1(vm, expOrFn, cb, options);
3176
+ var watcher = new Watcher(vm, expOrFn, cb, options);
3181
3177
  if (options.immediate) {
3182
3178
  var info = "callback for immediate watcher \"" + (watcher.expression) + "\"";
3183
3179
  pushTarget();
@@ -3964,7 +3960,7 @@ function createFunctionalComponent (
3964
3960
 
3965
3961
  var vnode = options.render.call(null, renderContext._c, renderContext);
3966
3962
 
3967
- if (vnode instanceof VNode$1) {
3963
+ if (vnode instanceof VNode) {
3968
3964
  return cloneAndMarkFunctionalResult(vnode, data, renderContext.parent, options, renderContext)
3969
3965
  } else if (Array.isArray(vnode)) {
3970
3966
  var vnodes = normalizeChildren(vnode) || [];
@@ -4156,7 +4152,7 @@ function createComponent (
4156
4152
 
4157
4153
  // return a placeholder vnode
4158
4154
  var name = Ctor.options.name || tag;
4159
- var vnode = new VNode$1(
4155
+ var vnode = new VNode(
4160
4156
  ("vue-component-" + (Ctor.cid) + (name ? ("-" + name) : '')),
4161
4157
  data, undefined, undefined, undefined, context,
4162
4158
  { Ctor: Ctor, propsData: propsData, listeners: listeners, tag: tag, children: children },
@@ -4316,7 +4312,7 @@ function _createElement (
4316
4312
  context
4317
4313
  );
4318
4314
  }
4319
- vnode = new VNode$1(
4315
+ vnode = new VNode(
4320
4316
  config.parsePlatformTagName(tag), data, children,
4321
4317
  undefined, undefined, context
4322
4318
  );
@@ -4327,7 +4323,7 @@ function _createElement (
4327
4323
  // unknown or unlisted namespaced elements
4328
4324
  // check at runtime because it may get assigned a namespace when its
4329
4325
  // parent normalizes children
4330
- vnode = new VNode$1(
4326
+ vnode = new VNode(
4331
4327
  tag, data, children,
4332
4328
  undefined, undefined, context
4333
4329
  );
@@ -4472,7 +4468,7 @@ function renderMixin (Vue) {
4472
4468
  vnode = vnode[0];
4473
4469
  }
4474
4470
  // return empty vnode in case the render function errored out
4475
- if (!(vnode instanceof VNode$1)) {
4471
+ if (!(vnode instanceof VNode)) {
4476
4472
  if (process.env.NODE_ENV !== 'production' && Array.isArray(vnode)) {
4477
4473
  warn$1(
4478
4474
  'Multiple root nodes returned from render function. Render function ' +
@@ -4965,7 +4961,7 @@ function mountComponent (
4965
4961
  // we set this to vm._watcher inside the watcher's constructor
4966
4962
  // since the watcher's initial patch may call $forceUpdate (e.g. inside child
4967
4963
  // component's mounted hook), which relies on vm._watcher being already defined
4968
- new Watcher$1(vm, updateComponent, noop, {
4964
+ new Watcher(vm, updateComponent, noop, {
4969
4965
  before: function before () {
4970
4966
  if (vm._isMounted && !vm._isDestroyed) {
4971
4967
  callHook$1(vm, 'beforeUpdate');
@@ -5160,7 +5156,7 @@ var isTextInputType = makeMap('text,number,password,search,email,tel,url');
5160
5156
  * of making flow understand it is not worth it.
5161
5157
  */
5162
5158
 
5163
- var emptyNode = new VNode$1('', {}, []);
5159
+ var emptyNode = new VNode('', {}, []);
5164
5160
 
5165
5161
  var hooks = ['create', 'activate', 'update', 'remove', 'destroy'];
5166
5162
 
@@ -5216,7 +5212,7 @@ function createPatchFunction (backend) {
5216
5212
  }
5217
5213
 
5218
5214
  function emptyNodeAt (elm) {
5219
- return new VNode$1(nodeOps.tagName(elm).toLowerCase(), {}, [], undefined, elm)
5215
+ return new VNode(nodeOps.tagName(elm).toLowerCase(), {}, [], undefined, elm)
5220
5216
  }
5221
5217
 
5222
5218
  function createRmCb (childElm, listeners) {
@@ -6075,6 +6071,28 @@ var attrs = {
6075
6071
 
6076
6072
  /* */
6077
6073
 
6074
+ // these are reserved for web because they are directly compiled away
6075
+ // during template compilation
6076
+ makeMap('style,class');
6077
+
6078
+ // attributes that should be using props for binding
6079
+ makeMap('input,textarea,option,select,progress');
6080
+
6081
+ makeMap('contenteditable,draggable,spellcheck');
6082
+
6083
+ makeMap('events,caret,typing,plaintext-only');
6084
+
6085
+ makeMap(
6086
+ 'allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,' +
6087
+ 'default,defaultchecked,defaultmuted,defaultselected,defer,disabled,' +
6088
+ 'enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,' +
6089
+ 'muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,' +
6090
+ 'required,reversed,scoped,seamless,selected,sortable,' +
6091
+ 'truespeed,typemustmatch,visible'
6092
+ );
6093
+
6094
+ /* */
6095
+
6078
6096
  function genClassForVnode (vnode) {
6079
6097
  var data = vnode.data;
6080
6098
  var parentNode = vnode;
@@ -7194,7 +7212,7 @@ function isUnknownElement(el) {
7194
7212
  }
7195
7213
 
7196
7214
  var VUE_VERSION = process.env.VUE_VERSION || '2.6.14';
7197
- var NS_VUE_VERSION = process.env.NS_VUE_VERSION || '2.9.1';
7215
+ var NS_VUE_VERSION = process.env.NS_VUE_VERSION || '2.9.2';
7198
7216
 
7199
7217
  var infoTrace = once(function () {
7200
7218
  console.log(
@@ -11995,7 +12013,6 @@ var baseOptions = {
11995
12013
  };
11996
12014
 
11997
12015
  var ref = createCompiler(baseOptions);
11998
- ref.compile;
11999
12016
  var compileToFunctions = ref.compileToFunctions;
12000
12017
 
12001
12018
  function Vue (options) {
package/index.d.ts CHANGED
@@ -39,30 +39,32 @@ export interface ModalOptions extends Partial<ShowModalOptions> {
39
39
  props?: Record<string, any>;
40
40
  }
41
41
 
42
- // create a nativescript vue class that extends vue.js
43
- export interface NativeScriptVue<V = View> extends Vue {
44
- nativeView: V
42
+ declare module 'vue/types/vue' {
43
+ // 3. Declare augmentation for Vue
44
+ interface Vue<V = View> {
45
+ nativeView: V
45
46
 
46
- $navigateTo: navigateTo
47
- $navigateBack: navigateBack
48
-
49
- $modal?: { close: (data?: any) => Promise<typeof data> };
50
-
51
- /**
52
- * Open a modal using a component
53
- * @param {typeof Vue} component
54
- * @param {ModalOptions} options
55
- * @returns {any}
56
- */
57
- $showModal: (component: typeof Vue, options?: ModalOptions) => Promise<any>;
58
-
59
- /**
60
- * starts the nativescript application
61
- */
62
- $start: () => void
63
- }
64
-
65
- export interface NativeScriptVueConstructor extends VueConstructor<NativeScriptVue>
47
+ $navigateTo: navigateTo
48
+ $navigateBack: navigateBack
49
+
50
+ $modal?: { close: (data?: any) => Promise<typeof data> };
51
+
52
+ /**
53
+ * Open a modal using a component
54
+ * @param {typeof Vue} component
55
+ * @param {ModalOptions} options
56
+ * @returns {any}
57
+ */
58
+ $showModal: (component: typeof Vue, options?: ModalOptions) => Promise<any>;
59
+
60
+ /**
61
+ * starts the nativescript application
62
+ */
63
+ $start: () => void
64
+ }
65
+ }
66
+ export interface NativeScriptVue<V = View> extends Vue<V>{};
67
+ export interface NativeScriptVueConstructor<V = View> extends VueConstructor<NativeScriptVue<V>>
66
68
  {
67
69
  navigateTo: navigateTo
68
70
  navigateBack: navigateBack
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nativescript-vue",
3
- "version": "2.9.1",
3
+ "version": "2.9.2",
4
4
  "description": "NativeScript and Vue integration",
5
5
  "main": "dist/index.js",
6
6
  "files": [
@@ -53,33 +53,33 @@
53
53
  }
54
54
  },
55
55
  "devDependencies": {
56
- "@babel/core": "^7.16.0",
57
- "@babel/plugin-transform-flow-strip-types": "7.16.0",
58
- "@babel/preset-env": "7.16.0",
59
- "@commitlint/cli": "14.1.0",
60
- "@commitlint/config-conventional": "14.1.0",
61
- "@nativescript/core": "8.1.5",
62
- "@rollup/plugin-alias": "3.1.8",
56
+ "@babel/core": "^7.17.10",
57
+ "@babel/plugin-transform-flow-strip-types": "7.16.7",
58
+ "@babel/preset-env": "7.17.10",
59
+ "@commitlint/cli": "16.2.4",
60
+ "@commitlint/config-conventional": "16.2.4",
61
+ "@nativescript/core": "8.2.3",
62
+ "@rollup/plugin-alias": "3.1.9",
63
63
  "@rollup/plugin-buble": "0.21.3",
64
- "@rollup/plugin-commonjs": "21.0.1",
65
- "@rollup/plugin-node-resolve": "13.0.6",
66
- "@rollup/plugin-replace": "3.0.0",
67
- "babel-jest": "27.3.1",
68
- "chalk": "4.1.2",
64
+ "@rollup/plugin-commonjs": "22.0.0",
65
+ "@rollup/plugin-node-resolve": "13.3.0",
66
+ "@rollup/plugin-replace": "4.0.0",
67
+ "babel-jest": "28.1.0",
68
+ "chalk": "5.0.1",
69
69
  "commitizen": "4.2.4",
70
- "conventional-changelog-cli": "2.1.1",
70
+ "conventional-changelog-cli": "2.2.2",
71
71
  "cz-conventional-changelog": "3.3.0",
72
- "husky": "7.0.4",
73
- "inquirer": "8.2.0",
74
- "jest": "27.3.1",
75
- "jest-junit": "13.0.0",
76
- "lint-staged": "11.2.6",
72
+ "husky": "8.0.1",
73
+ "inquirer": "8.2.4",
74
+ "jest": "28.1.0",
75
+ "jest-junit": "13.2.0",
76
+ "lint-staged": "12.4.1",
77
77
  "patch-package": "^6.4.7",
78
- "prettier": "2.4.1",
79
- "rollup": "^2.59.0",
78
+ "prettier": "2.6.2",
79
+ "rollup": "^2.72.1",
80
80
  "rollup-plugin-flow-no-whitespace": "1.0.0",
81
81
  "rollup-plugin-resolve-aliases": "0.3.0",
82
- "semver": "7.3.5",
82
+ "semver": "7.3.7",
83
83
  "set-value": "4.1.0",
84
84
  "vue": "2.6.14"
85
85
  },
@@ -99,7 +99,9 @@
99
99
  "<rootDir>/samples"
100
100
  ],
101
101
  "collectCoverage": true,
102
- "testURL": "http://localhost"
102
+ "testEnvironmentOptions": {
103
+ "url": "http://localhost"
104
+ }
103
105
  },
104
106
  "prettier": {
105
107
  "semi": false,