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

@stencil/vue-output-target

Package Overview
Dependencies
Maintainers
2
Versions
158
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stencil/vue-output-target - npm Package Compare versions

Comparing version 0.7.0 to 0.7.2-dev.11691590901.1db83f93

8

dist/generate-vue-component.js

@@ -12,5 +12,7 @@ import { dashToPascalCase } from './utils';

}
const componentType = `${importTypes}.${tagNameAsPascal}`;
const findModel = componentModelConfig && componentModelConfig.find((config) => config.elements.includes(cmpMeta.tagName));
const modelType = findModel !== undefined ? `, ${componentType}["${findModel.targetAttr}"]` : '';
let templateString = `
export const ${tagNameAsPascal} = /*@__PURE__*/ defineContainer<${importTypes}.${tagNameAsPascal}>('${cmpMeta.tagName}', ${importAs}`;
const findModel = componentModelConfig && componentModelConfig.find((config) => config.elements.includes(cmpMeta.tagName));
export const ${tagNameAsPascal} = /*@__PURE__*/ defineContainer<${componentType}${modelType}>('${cmpMeta.tagName}', ${importAs}`;
if (props.length > 0) {

@@ -22,3 +24,3 @@ templateString += `, [

* If there are no props,
* but but v-model is stil used,
* but v-model is still used,
* make sure we pass in an empty array

@@ -25,0 +27,0 @@ * otherwise all of the defineContainer properties

@@ -100,5 +100,7 @@ 'use strict';

}
const componentType = `${importTypes}.${tagNameAsPascal}`;
const findModel = componentModelConfig && componentModelConfig.find((config) => config.elements.includes(cmpMeta.tagName));
const modelType = findModel !== undefined ? `, ${componentType}["${findModel.targetAttr}"]` : '';
let templateString = `
export const ${tagNameAsPascal} = /*@__PURE__*/ defineContainer<${importTypes}.${tagNameAsPascal}>('${cmpMeta.tagName}', ${importAs}`;
const findModel = componentModelConfig && componentModelConfig.find((config) => config.elements.includes(cmpMeta.tagName));
export const ${tagNameAsPascal} = /*@__PURE__*/ defineContainer<${componentType}${modelType}>('${cmpMeta.tagName}', ${importAs}`;
if (props.length > 0) {

@@ -110,3 +112,3 @@ templateString += `, [

* If there are no props,
* but but v-model is stil used,
* but v-model is still used,
* make sure we pass in an empty array

@@ -113,0 +115,0 @@ * otherwise all of the defineContainer properties

@@ -91,5 +91,7 @@ import path from 'path';

}
const componentType = `${importTypes}.${tagNameAsPascal}`;
const findModel = componentModelConfig && componentModelConfig.find((config) => config.elements.includes(cmpMeta.tagName));
const modelType = findModel !== undefined ? `, ${componentType}["${findModel.targetAttr}"]` : '';
let templateString = `
export const ${tagNameAsPascal} = /*@__PURE__*/ defineContainer<${importTypes}.${tagNameAsPascal}>('${cmpMeta.tagName}', ${importAs}`;
const findModel = componentModelConfig && componentModelConfig.find((config) => config.elements.includes(cmpMeta.tagName));
export const ${tagNameAsPascal} = /*@__PURE__*/ defineContainer<${componentType}${modelType}>('${cmpMeta.tagName}', ${importAs}`;
if (props.length > 0) {

@@ -101,3 +103,3 @@ templateString += `, [

* If there are no props,
* but but v-model is stil used,
* but v-model is still used,
* make sure we pass in an empty array

@@ -104,0 +106,0 @@ * otherwise all of the defineContainer properties

{
"name": "@stencil/vue-output-target",
"version": "0.7.0",
"version": "0.7.2-dev.11691590901.1db83f93",
"description": "Vue output target for @stencil/core components.",

@@ -39,3 +39,3 @@ "main": "dist/index.cjs.js",

"peerDependencies": {
"@stencil/core": "^2.9.0 || ^3.0.0-beta.0"
"@stencil/core": ">=2.0.0 || >=3 || >= 4.0.0-beta.0 || >= 4.0.0"
},

@@ -56,3 +56,6 @@ "jest": {

},
"gitHead": "a3588e905186a0e86e7f88418fd5b2f9531b55e0"
"gitHead": "db83f93bf80266494560db9c21d19f8f31a95df2",
"volta": {
"extends": "../../package.json"
}
}

@@ -0,1 +1,3 @@

// @ts-nocheck
// It's easier and safer for Volar to disable typechecking and let the return type inference do its job.
import { VNode, defineComponent, getCurrentInstance, h, inject, ref, Ref } from 'vue';

@@ -75,3 +77,3 @@

const Container = defineComponent<Props & InputProps<VModelType>>((props: any, { attrs, slots, emit }) => {
const Container = defineComponent<Props & InputProps<VModelType>>((props, { attrs, slots, emit }) => {
let modelPropValue = props[modelProp];

@@ -188,15 +190,17 @@ const containerRef = ref<HTMLElement>();

Container.displayName = name;
if (typeof Container !== 'function') {
Container.name = name;
Container.props = {
[ROUTER_LINK_VALUE]: DEFAULT_EMPTY_PROP,
};
Container.props = {
[ROUTER_LINK_VALUE]: DEFAULT_EMPTY_PROP,
};
componentProps.forEach((componentProp) => {
Container.props[componentProp] = DEFAULT_EMPTY_PROP;
});
componentProps.forEach((componentProp) => {
Container.props[componentProp] = DEFAULT_EMPTY_PROP;
});
if (modelProp) {
Container.props[MODEL_VALUE] = DEFAULT_EMPTY_PROP;
Container.emits = [UPDATE_VALUE_EVENT, externalModelUpdateEvent];
if (modelProp) {
Container.props[MODEL_VALUE] = DEFAULT_EMPTY_PROP;
Container.emits = [UPDATE_VALUE_EVENT, externalModelUpdateEvent];
}
}

@@ -203,0 +207,0 @@

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