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

@egjs/svelte-conveyer

Package Overview
Dependencies
Maintainers
9
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@egjs/svelte-conveyer - npm Package Compare versions

Comparing version 1.4.7-beta.3 to 1.4.7-beta.4

104

dist/conveyer.cjs.js

@@ -7,3 +7,3 @@ /*

repository: https://github.com/naver/egjs-conveyer
version: 1.4.7-beta.3
version: 1.4.7-beta.4
*/

@@ -13,5 +13,3 @@ 'use strict';

var conveyer = require('@egjs/conveyer');
var core = require('@cfcs/core');
var internal = require('svelte/internal');
var store = require('svelte/store');
var svelte = require('@cfcs/svelte');

@@ -46,92 +44,2 @@ /******************************************************************************

/*
Copyright (c) NAVER Corp.
name: @cfcs/svelte
license: MIT
author: NAVER Corp.
repository: https://github.com/naver/cfcs
version: 0.0.12
*/
/******************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
var __assign$1 = function () {
__assign$1 = Object.assign || function __assign(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
}
return t;
};
return __assign$1.apply(this, arguments);
};
function useRef(defaultValue) {
var refFunction = function (value) {
refFunction.current = value;
return {
destroy: function () {
return;
}
};
};
refFunction.current = defaultValue;
return refFunction;
}
function useReactive(reactiveProps) {
var adaptResult = core.adaptReactive(reactiveProps);
var reactiveState = adaptResult.state();
var writables = {};
var names = Object.keys(reactiveState);
var methods = adaptResult.methods();
for (var name in reactiveState) {
writables[name] = store.writable(reactiveState[name]);
}
internal.onMount(function () {
adaptResult.mounted();
var inst = adaptResult.instance();
names.forEach(function (name) {
inst.subscribe(name, function (value) {
writables[name].set(value);
});
});
adaptResult.init();
});
internal.onDestroy(function () {
adaptResult.destroy();
});
var reactiveEvents = reactiveProps.events || [];
var events = reactiveEvents.reduce(function (result, name) {
result[core.camelize("on ".concat(name))] = function (callback) {
internal.onMount(function () {
adaptResult.on(name, callback);
});
internal.onDestroy(function () {
adaptResult.off(name, callback);
});
};
return result;
}, {});
return __assign$1(__assign$1(__assign$1({}, writables), methods), events);
}
function useConveyer(props) {

@@ -144,4 +52,4 @@ if (props === void 0) {

var elementRef = useRef();
var result = useReactive(__assign({
var elementRef = svelte.useRef();
var result = svelte.useReactive(__assign({
data: function () {

@@ -164,4 +72,4 @@ return {

var elementRef = useRef();
useReactive(__assign({
var elementRef = svelte.useRef();
svelte.useReactive(__assign({
data: function () {

@@ -168,0 +76,0 @@ return {

@@ -7,8 +7,6 @@ /*

repository: https://github.com/naver/egjs-conveyer
version: 1.4.7-beta.3
version: 1.4.7-beta.4
*/
import { REACTIVE_CONVEYER } from '@egjs/conveyer';
import { adaptReactive, camelize } from '@cfcs/core';
import { onMount, onDestroy } from 'svelte/internal';
import { writable } from 'svelte/store';
import { useRef, useReactive } from '@cfcs/svelte';

@@ -43,92 +41,2 @@ /******************************************************************************

/*
Copyright (c) NAVER Corp.
name: @cfcs/svelte
license: MIT
author: NAVER Corp.
repository: https://github.com/naver/cfcs
version: 0.0.12
*/
/******************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
var __assign$1 = function () {
__assign$1 = Object.assign || function __assign(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
}
return t;
};
return __assign$1.apply(this, arguments);
};
function useRef(defaultValue) {
var refFunction = function (value) {
refFunction.current = value;
return {
destroy: function () {
return;
}
};
};
refFunction.current = defaultValue;
return refFunction;
}
function useReactive(reactiveProps) {
var adaptResult = adaptReactive(reactiveProps);
var reactiveState = adaptResult.state();
var writables = {};
var names = Object.keys(reactiveState);
var methods = adaptResult.methods();
for (var name in reactiveState) {
writables[name] = writable(reactiveState[name]);
}
onMount(function () {
adaptResult.mounted();
var inst = adaptResult.instance();
names.forEach(function (name) {
inst.subscribe(name, function (value) {
writables[name].set(value);
});
});
adaptResult.init();
});
onDestroy(function () {
adaptResult.destroy();
});
var reactiveEvents = reactiveProps.events || [];
var events = reactiveEvents.reduce(function (result, name) {
result[camelize("on ".concat(name))] = function (callback) {
onMount(function () {
adaptResult.on(name, callback);
});
onDestroy(function () {
adaptResult.off(name, callback);
});
};
return result;
}, {});
return __assign$1(__assign$1(__assign$1({}, writables), methods), events);
}
function useConveyer(props) {

@@ -135,0 +43,0 @@ if (props === void 0) {

4

package.json
{
"name": "@egjs/svelte-conveyer",
"version": "1.4.7-beta.3",
"version": "1.4.7-beta.4",
"description": "Svelte Conveyer adds Drag gestures to your Native Scroll.",

@@ -44,3 +44,3 @@ "sideEffects": false,

"dev": "rollup -c -w",
"start": "sirv public --no-clear",
"start": "sirv public --no-clear --port 4444",
"build": "rollup -c rollup.build.config.js && npm run declaration",

@@ -47,0 +47,0 @@ "declaration": "rm -rf declaration && tsc -p tsconfig.declaration.json"

@@ -10,2 +10,3 @@ import buildHelper from "@egjs/build-helper";

svelte: "svelte",
"@cfcs/svelte": "@cfcs/svelte",
},

@@ -12,0 +13,0 @@ plugins: [

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