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

@builder.io/sdk

Package Overview
Dependencies
Maintainers
1
Versions
695
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@builder.io/sdk - npm Package Compare versions

Comparing version 0.0.53 to 0.0.54

18

dist/clients/js/src/builder.class.js

@@ -11,5 +11,5 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var sortBy = require("lodash/sortBy");
var omit = require("lodash/omit");
var throttle = require("lodash/throttle");
var sortBy_1 = require("lodash-es/sortBy");
var omit_1 = require("lodash-es/omit");
var throttle_1 = require("lodash-es/throttle");
var queryString = require("query-string");

@@ -47,3 +47,3 @@ var parser = require("ua-parser-js");

type: 'builder.registerComponent',
data: omit(spec, 'class'),
data: omit_1.default(spec, 'class'),
}, '*');

@@ -61,3 +61,3 @@ }

this.eventsQueue = [];
this.throttledClearEventsQueue = throttle(function () {
this.throttledClearEventsQueue = throttle_1.default(function () {
_this.processEventsQueue();

@@ -117,3 +117,3 @@ }, 100);

type: 'builder.registerComponent',
data: omit(spec, 'class'),
data: omit_1.default(spec, 'class'),
}, '*');

@@ -245,3 +245,3 @@ }

type: 'builder.components',
data: Builder.components.map(function (item) { return omit(item, 'class'); }),
data: Builder.components.map(function (item) { return omit_1.default(item, 'class'); }),
}, '*');

@@ -422,3 +422,3 @@ break;

var data = result[modelName];
var sorted = sortBy(data, function (item) { return item.priority; });
var sorted = sortBy_1.default(data, function (item) { return item.priority; });
var testModifiedResults = _this.processResultsForTests(sorted);

@@ -525,3 +525,3 @@ observer.next(testModifiedResults);

.then(function (data) { return data[modelName]; })
.then(function (list) { return sortBy(list, function (item) { return item.priority; }); })
.then(function (list) { return sortBy_1.default(list, function (item) { return item.priority; }); })
.then(function (result) {

@@ -528,0 +528,0 @@ if (modelName === _this.blockContentLoading) {

export declare class EventCapturer {
events: string[];
element: HTMLElement;
element: EventTarget;
captureEvents: boolean;

@@ -5,0 +5,0 @@ usePassive: boolean;

@@ -11,3 +11,3 @@ "use strict";

this.events = [
'mousemove',
// 'mousemove',
'mousedown',

@@ -17,10 +17,11 @@ 'click',

'scroll',
'mouseenter',
'mouseleave',
'mouseover',
'mouseout',
'dblclick',
'resize',
];
this.element = document.documentElement;
this.element = window;
this.captureEvents = false;
this.usePassive = false;
// FIXME: this causing infinite loop - why?
this.observeMutations = false;

@@ -30,3 +31,3 @@ this.handleEvent = function (event) {

// events are caught before reaching anywhere else
if (_this.captureEvents) {
if (_this.captureEvents && event.type !== 'scroll' && event.type !== 'resize') {
event.preventDefault();

@@ -44,3 +45,3 @@ event.stopImmediatePropagation();

EventCapturer.prototype.getElementForEvent = function (eventName) {
return eventName === 'resize' ? window : this.element;
return eventName === 'resize' || eventName === 'scroll' ? window : this.element;
};

@@ -47,0 +48,0 @@ // TODO: in edit mode make these not passive and make them preventDefault() and stopPropagation()

{
"name": "@builder.io/sdk",
"version": "0.0.41",
"version": "0.0.53",
"lockfileVersion": 1,

@@ -27,2 +27,17 @@ "requires": true,

},
"@types/lodash": {
"version": "4.14.107",
"resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.107.tgz",
"integrity": "sha512-afvjfP2rl3yvtv2qrCRN23zIQcDinF+munMJCoHEw2BXF22QJogTlVfNPTACQ6ieDyA6VnyKT4WLuN/wK368ng==",
"dev": true
},
"@types/lodash-es": {
"version": "4.17.0",
"resolved": "https://registry.npmjs.org/@types/lodash-es/-/lodash-es-4.17.0.tgz",
"integrity": "sha512-h8lkWQSgT4qjs9PcIhcL2nWubZeXRVzjZxYlRFmcX9BW1PIk5qRc0djtRWZqtM+GDDFhwBt0ztRu72D/YxIcEw==",
"dev": true,
"requires": {
"@types/lodash": "4.14.107"
}
},
"@types/node": {

@@ -169,2 +184,7 @@ "version": "9.4.6",

},
"lodash-es": {
"version": "4.17.8",
"resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.8.tgz",
"integrity": "sha512-I9mjAxengFAleSThFhhAhvba6fsO0hunb9/0sQ6qQihSZsJRBofv2rYH58WXaOb/O++eUmYpCLywSQ22GfU+sA=="
},
"min-document": {

@@ -171,0 +191,0 @@ "version": "2.19.0",

{
"name": "@builder.io/sdk",
"version": "0.0.53",
"version": "0.0.54",
"main": "dist/clients/js/index.js",

@@ -19,2 +19,3 @@ "types": "dist/clients/js/index.d.ts",

"lodash": "^4.17.4",
"lodash-es": "^4.17.8",
"node-fetch": "^2.1.1",

@@ -32,2 +33,3 @@ "query-string": "^5.0.1",

"@types/json-stable-stringify": "^1.0.32",
"@types/lodash-es": "^4.17.0",
"@types/node": "^9.4.6",

@@ -34,0 +36,0 @@ "@types/node-fetch": "^1.6.7",

@@ -1,6 +0,6 @@

import sortBy = require('lodash/sortBy');
import kebabCase = require('lodash/kebabCase');
import capitalize = require('lodash/capitalize');
import omit = require('lodash/omit');
import throttle = require('lodash/throttle');
import sortBy from 'lodash-es/sortBy';
import kebabCase from 'lodash-es/kebabCase';
import capitalize from 'lodash-es/capitalize';
import omit from 'lodash-es/omit';
import throttle from 'lodash-es/throttle';

@@ -7,0 +7,0 @@ import * as queryString from 'query-string';

@@ -11,3 +11,3 @@ import uniqueSelector from 'unique-selector';

events = [
'mousemove',
// 'mousemove',
'mousedown',

@@ -17,4 +17,4 @@ 'click',

'scroll',
'mouseenter',
'mouseleave',
'mouseover',
'mouseout',
'dblclick',

@@ -24,6 +24,8 @@ 'resize',

element: HTMLElement = document.documentElement;
element: EventTarget = window;
captureEvents = false;
usePassive = false;
// FIXME: this causing infinite loop - why?
observeMutations = false;

@@ -40,3 +42,3 @@

private getElementForEvent(eventName: string) {
return eventName === 'resize' ? window : this.element;
return eventName === 'resize' || eventName === 'scroll' ? window : this.element;
}

@@ -99,3 +101,3 @@

// events are caught before reaching anywhere else
if (this.captureEvents) {
if (this.captureEvents && event.type !== 'scroll' && event.type !== 'resize') {
event.preventDefault();

@@ -102,0 +104,0 @@ event.stopImmediatePropagation();

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