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

superfly-timeline

Package Overview
Dependencies
Maintainers
2
Versions
72
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

superfly-timeline - npm Package Compare versions

Comparing version 7.1.0 to 7.1.1

11

CHANGELOG.md

@@ -5,2 +5,13 @@ # Change Log

<a name="7.1.1"></a>
## [7.1.1](https://github.com/SuperFlyTV/supertimeline/compare/7.1.0...7.1.1) (2019-05-21)
### Bug Fixes
* make instance ids unique ([3376662](https://github.com/SuperFlyTV/supertimeline/commit/3376662))
* missing type in getState ([4f86b1b](https://github.com/SuperFlyTV/supertimeline/commit/4f86b1b))
<a name="7.1.0"></a>

@@ -7,0 +18,0 @@ # [7.1.0](https://github.com/SuperFlyTV/supertimeline/compare/7.0.2...7.1.0) (2019-05-18)

@@ -119,8 +119,16 @@ import { EventType } from './enums';

export interface TimelineObjectInstance {
/** id of the instance (unique) */
id: string;
/** if true, the instance starts from the beginning of time */
isFirst?: boolean;
/** The start time of the instance */
start: Time;
/** The end time of the instance (null = infinite) */
end: Time | null;
/** array of the id of the referenced objects */
references: Array<string>;
/** If set, tells the cap of the parent */
caps?: Array<Cap>;
/** If the instance was generated from another instance, reference to the original */
fromInstanceId?: string;
}

@@ -127,0 +135,0 @@ export interface Cap {

2

dist/resolver/resolver.d.ts

@@ -20,3 +20,3 @@ import { TimelineObject, ResolvedTimeline, ResolveOptions, Expression, ResolvedTimelineObject, TimelineObjectInstance, Time, TimelineState, ValueWithReference, ResolvedStates } from '../api/api';

*/
static getState(resolved: ResolvedTimeline, time: Time, eventLimit?: number): TimelineState;
static getState(resolved: ResolvedTimeline | ResolvedStates, time: Time, eventLimit?: number): TimelineState;
}

@@ -23,0 +23,0 @@ export declare function resolveTimelineObj(resolvedTimeline: ResolvedTimeline, obj: ResolvedTimelineObject): void;

@@ -230,18 +230,24 @@ "use strict";

// Construct a new object clone:
var newObj = void 0;
var newObj_1;
if (resolvedStates.objects[currentOnTopOfLayer.obj.id]) {
// Use the already existing one
newObj = resolvedStates.objects[currentOnTopOfLayer.obj.id];
newObj_1 = resolvedStates.objects[currentOnTopOfLayer.obj.id];
}
else {
newObj = _.clone(currentOnTopOfLayer.obj);
newObj.content = JSON.parse(JSON.stringify(newObj.content));
newObj.resolved = tslib_1.__assign({}, newObj.resolved || {}, { instances: [] });
common_1.addObjectToResolvedTimeline(resolvedStates, newObj);
newObj_1 = _.clone(currentOnTopOfLayer.obj);
newObj_1.content = JSON.parse(JSON.stringify(newObj_1.content));
newObj_1.resolved = tslib_1.__assign({}, newObj_1.resolved || {}, { instances: [] });
common_1.addObjectToResolvedTimeline(resolvedStates, newObj_1);
}
var newInstance = tslib_1.__assign({}, currentOnTopOfLayer.instance, {
var newInstance_1 = tslib_1.__assign({}, currentOnTopOfLayer.instance, {
// We're setting new start & end times so they match up with the state:
start: time, end: null });
newObj.resolved.instances.push(newInstance);
var newObjInstance = tslib_1.__assign({}, newObj, { instance: newInstance });
start: time, end: null, fromInstanceId: currentOnTopOfLayer.instance.id });
// Make the instance id unique:
_.each(newObj_1.resolved.instances, function (instance) {
if (instance.id === newInstance_1.id) {
newInstance_1.id = newInstance_1.id + '_$' + newObj_1.resolved.instances.length;
}
});
newObj_1.resolved.instances.push(newInstance_1);
var newObjInstance = tslib_1.__assign({}, newObj_1, { instance: newInstance_1 });
// Save to current state:

@@ -254,9 +260,9 @@ currentState[layer] = newObjInstance;

// Add to nextEvents:
if (newInstance.start > (onlyForTime || 0)) {
if (newInstance_1.start > (onlyForTime || 0)) {
resolvedStates.nextEvents.push({
type: enums_1.EventType.START,
time: newInstance.start,
time: newInstance_1.start,
objId: obj.id
});
eventObjectTimes[newInstance.start + ''] = enums_1.EventType.START;
eventObjectTimes[newInstance_1.start + ''] = enums_1.EventType.START;
}

@@ -263,0 +269,0 @@ }

{
"name": "superfly-timeline",
"version": "7.1.0",
"version": "7.1.1",
"description": "A collection of rules as well as a resolver for placing objects on a virtual timeline.",

@@ -5,0 +5,0 @@ "license": "MIT",

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