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

@figspec/components

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@figspec/components - npm Package Compare versions

Comparing version 0.1.10 to 1.0.0

cjs/es2016/FigspecViewer/TouchGestureMixin.d.ts

3

cjs/es2016/FigspecViewer/PositionedMixin.d.ts
import { LitElement } from "lit-element";
import { TouchGestureMixinProps } from "./TouchGestureMixin";
import type { Constructor } from "./utils";

@@ -12,2 +13,2 @@ export interface Positioned {

}
export declare const PositionedMixin: <T extends Constructor<LitElement>>(superClass: T) => T & Constructor<Positioned>;
export declare const PositionedMixin: <T extends Constructor<LitElement>>(superClass: T) => T & Constructor<Positioned & TouchGestureMixinProps>;

@@ -24,5 +24,6 @@ "use strict";

const lit_element_1 = require("lit-element");
const TouchGestureMixin_1 = require("./TouchGestureMixin");
exports.PositionedMixin = (superClass) => {
var _isDragModeOn, _movePanel, _keyDown, _keyUp, _listenToKeyboardEvents;
class Positioned extends superClass {
class Positioned extends TouchGestureMixin_1.TouchGestureMixin(superClass) {
constructor(...args) {

@@ -163,2 +164,10 @@ super(...args);

}
onTouchPan(delta) {
this.panX += delta.x / this.scale;
this.panY += delta.y / this.scale;
}
onTouchPinch(delta) {
// TODO: Remove this no-brainer magic number
this.scale *= 1 - delta / 1000;
}
}

@@ -165,0 +174,0 @@ _isDragModeOn = new WeakMap(), _movePanel = new WeakMap(), _keyDown = new WeakMap(), _keyUp = new WeakMap(), _listenToKeyboardEvents = new WeakMap();

@@ -298,4 +298,3 @@ "use strict";

node.type === "COMPONENT" ||
//@ts-ignore TODO: update types once there are updates in https://github.com/jongold/figma-js
// See https://github.com/jongold/figma-js/pull/48 for the current state
//@ts-ignore NOTE: figma-js does not implement COMPONENT_SET type (yet?)
node.type === "COMPONENT_SET")) {

@@ -302,0 +301,0 @@ throw new Error("Cannot update node tree: Top level node MUST be one of CANVAS, FRAME, COMPONENT, or COMPONENT_SET");

import { LitElement } from "lit-element";
import { TouchGestureMixinProps } from "./TouchGestureMixin";
import type { Constructor } from "./utils";

@@ -12,2 +13,2 @@ export interface Positioned {

}
export declare const PositionedMixin: <T extends Constructor<LitElement>>(superClass: T) => T & Constructor<Positioned>;
export declare const PositionedMixin: <T extends Constructor<LitElement>>(superClass: T) => T & Constructor<Positioned & TouchGestureMixinProps>;

@@ -21,5 +21,6 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

import { property } from "lit-element";
import { TouchGestureMixin } from "./TouchGestureMixin";
export const PositionedMixin = (superClass) => {
var _isDragModeOn, _movePanel, _keyDown, _keyUp, _listenToKeyboardEvents;
class Positioned extends superClass {
class Positioned extends TouchGestureMixin(superClass) {
constructor(...args) {

@@ -160,2 +161,10 @@ super(...args);

}
onTouchPan(delta) {
this.panX += delta.x / this.scale;
this.panY += delta.y / this.scale;
}
onTouchPinch(delta) {
// TODO: Remove this no-brainer magic number
this.scale *= 1 - delta / 1000;
}
}

@@ -162,0 +171,0 @@ _isDragModeOn = new WeakMap(), _movePanel = new WeakMap(), _keyDown = new WeakMap(), _keyUp = new WeakMap(), _listenToKeyboardEvents = new WeakMap();

@@ -295,4 +295,3 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

node.type === "COMPONENT" ||
//@ts-ignore TODO: update types once there are updates in https://github.com/jongold/figma-js
// See https://github.com/jongold/figma-js/pull/48 for the current state
//@ts-ignore NOTE: figma-js does not implement COMPONENT_SET type (yet?)
node.type === "COMPONENT_SET")) {

@@ -299,0 +298,0 @@ throw new Error("Cannot update node tree: Top level node MUST be one of CANVAS, FRAME, COMPONENT, or COMPONENT_SET");

@@ -8,3 +8,3 @@ {

],
"version": "0.1.10",
"version": "1.0.0",
"contributors": [

@@ -11,0 +11,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