Ievgen Naida 1 rok pred
rodič
commit
e3bd49ab4e

+ 7 - 1
CHANGELOG.md

@@ -2,7 +2,13 @@
 
 ## Changes
 
-## [2.3.1] - 03.24.2024
+## [2.3.2] - 10.04.2024
+
+### Changed
+
+- Fixed casing of the lib files.
+
+## [2.3.1] - 24.03.2024
 
 ### Changed
 

+ 18 - 2
lib/animation-timeline.js

@@ -465,6 +465,22 @@ var TimelineUtils = /*#__PURE__*/function () {
       mergeOptionsDeep(toArg, newOptions);
       return toArg;
     }
+    /**
+     * Format numbers with len
+     */
+  }, {
+    key: "timePadZero",
+    value: function timePadZero(num) {
+      var len = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2;
+      var str = String(num);
+      var threshold = Math.pow(10, len - 1);
+      if (num < threshold) {
+        while (String(threshold).length > str.length) {
+          str = "0".concat(num);
+        }
+      }
+      return str;
+    }
   }]);
 }();
 timelineUtils_defineProperty(TimelineUtils, "deepClone", function (previousOptions) {
@@ -2507,10 +2523,10 @@ var Timeline = /*#__PURE__*/function (_TimelineEventsEmitte) {
         str += hours + ':';
       }
       if (minutes) {
-        str += minutes + ':';
+        str += hours ? TimelineUtils.timePadZero(minutes) : minutes + ':';
       }
       if (!isNaN(seconds)) {
-        str += seconds;
+        str += minutes ? TimelineUtils.timePadZero(seconds) : seconds;
       }
       return sign + str;
     });

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 0
lib/animation-timeline.js.map


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 0
lib/animation-timeline.min.js


+ 0 - 11
lib/model/timelineGroup.d.ts

@@ -1,11 +0,0 @@
-import { TimelineGroupStyle } from '../settings/styles/timelineGroupStyle';
-/**
- * Timeline group view model.
- */
-export interface TimelineGroup {
-    style: TimelineGroupStyle;
-    /**
-     * Whether group of keyframes are draggable.
-     */
-    draggable?: boolean;
-}

+ 0 - 12
lib/model/timelineKeyframe.d.ts

@@ -1,12 +0,0 @@
-import { TimelineKeyframeStyle } from '../settings/styles/timelineKeyframeStyle';
-import { TimelineSelectable } from '../utils/timelineSelectable';
-import { TimelineRanged } from './timelineRanged';
-import { TimelineGroup } from './timelineGroup';
-export interface TimelineKeyframe extends TimelineKeyframeStyle, TimelineSelectable, TimelineRanged {
-  val: number;
-  /**
-   * Related keyframe group.
-   * Timeline keyframes groups are rendered as one instance.
-   */
-  group?: string | TimelineGroup;
-}

+ 0 - 4
lib/model/timelineModel.d.ts

@@ -1,4 +0,0 @@
-import { TimelineRow } from './timelineRow';
-export interface TimelineModel {
-    rows: TimelineRow[];
-}

+ 0 - 10
lib/model/timelineRanged.d.ts

@@ -1,10 +0,0 @@
-export interface TimelineRanged {
-    /**
-     * min
-     */
-    min?: number | null;
-    /**
-     * max.
-     */
-    max?: number | null;
-}

+ 0 - 8
lib/model/timelineRow.d.ts

@@ -1,8 +0,0 @@
-import { TimelineKeyframe } from './timelineKeyframe';
-import { TimelineRowStyle } from '../settings/styles/timelineRowStyle';
-import { TimelineRanged } from './timelineRanged';
-export interface TimelineRow extends TimelineRanged {
-    keyframes?: TimelineKeyframe[] | null;
-    style?: TimelineRowStyle;
-    hidden?: boolean;
-}

+ 0 - 12
lib/settings/defaults.d.ts

@@ -1,12 +0,0 @@
-import { TimelineConsts } from './timelineConsts';
-import { TimelineStyle } from './styles/timelineStyle';
-import { TimelineOptions } from './timelineOptions';
-import { TimelineKeyframeStyle } from './styles/timelineKeyframeStyle';
-import { TimelineRowStyle } from './styles/timelineRowStyle';
-import { TimelineGroupStyle } from './styles/timelineGroupStyle';
-export declare const defaultTimelineStyle: TimelineStyle;
-export declare const defaultGroupStyle: TimelineGroupStyle;
-export declare const defaultTimelineKeyframeStyle: TimelineKeyframeStyle;
-export declare const defaultTimelineRowStyle: TimelineRowStyle;
-export declare const defaultTimelineOptions: TimelineOptions;
-export declare const defaultTimelineConsts: TimelineConsts;

+ 0 - 0
lib/settings/styles/TimelineRowStyle.d.ts → lib/settings/styles/timelineRowStyle.d.ts


+ 0 - 11
lib/timelineGroup.d.ts

@@ -1,11 +0,0 @@
-import { TimelineGroupStyle } from './settings/styles/timelineGroupStyle';
-/**
- * Timeline group view model.
- */
-export interface TimelineGroup {
-    style: TimelineGroupStyle;
-    /**
-     * Whether group of keyframes are draggable.
-     */
-    draggable?: boolean;
-}

+ 0 - 12
lib/timelineKeyframe.d.ts

@@ -1,12 +0,0 @@
-import { TimelineKeyframeStyle } from './settings/styles/timelineKeyframeStyle';
-import { TimelineSelectable } from './utils/timelineSelectable';
-import { TimelineRanged } from './timelineRanged';
-import { TimelineGroup } from './timelineGroup';
-export interface TimelineKeyframe extends TimelineKeyframeStyle, TimelineSelectable, TimelineRanged {
-    val: number;
-    /**
-     * Related keyframe group.
-     * Timeline keyframes groups are rendered as one instance.
-     */
-    group?: string | TimelineGroup;
-}

+ 0 - 4
lib/timelineModel.d.ts

@@ -1,4 +0,0 @@
-import { TimelineRow } from './timelineRow';
-export interface TimelineModel {
-    rows: TimelineRow[];
-}

+ 0 - 10
lib/timelineRanged.d.ts

@@ -1,10 +0,0 @@
-export interface TimelineRanged {
-    /**
-     * min
-     */
-    min?: number | null;
-    /**
-     * max.
-     */
-    max?: number | null;
-}

+ 0 - 8
lib/timelineRow.d.ts

@@ -1,8 +0,0 @@
-import { TimelineKeyframe } from './timelineKeyframe';
-import { TimelineRowStyle } from './settings/styles/timelineRowStyle';
-import { TimelineRanged } from './timelineRanged';
-export interface TimelineRow extends TimelineRanged {
-    keyframes?: TimelineKeyframe[] | null;
-    style?: TimelineRowStyle;
-    hidden?: boolean;
-}

+ 0 - 4
lib/utils/selectable.d.ts

@@ -1,4 +0,0 @@
-export interface Selectable {
-    selected?: boolean;
-    selectable?: boolean;
-}

+ 0 - 12
lib/utils/timelineCalculated.d.ts

@@ -1,12 +0,0 @@
-import { TimelineRanged } from '../timelineRanged';
-import { TimelineCalculatedKeyframe } from './timelineCalculatedKeyframe';
-export interface TimelineCalculated extends TimelineRanged {
-    /**
-     * Screen coordinates of the element.
-     */
-    size: DOMRect;
-    /**
-     * model keyframes.
-     */
-    keyframes: TimelineCalculatedKeyframe[];
-}

+ 0 - 12
lib/utils/timelineCalculatedGroup.d.ts

@@ -1,12 +0,0 @@
-import { TimelineCalculated } from './timelineCalculated';
-import { TimelineCalculatedKeyframe } from './timelineCalculatedKeyframe';
-export interface TimelineCalculatedGroup extends TimelineCalculated {
-    /**
-     * related group.
-     */
-    group: unknown;
-    /**
-     * Grouped keyframes.
-     */
-    keyframes: Array<TimelineCalculatedKeyframe>;
-}

+ 0 - 9
lib/utils/timelineCalculatedKeyframe.d.ts

@@ -1,9 +0,0 @@
-import { TimelineKeyframe } from '../timelineKeyframe';
-import { TimelineCalculatedGroup } from './timelineCalculatedGroup';
-import { TimelineCalculatedRow } from './timelineCalculatedRow';
-export interface TimelineCalculatedKeyframe {
-    size: DOMRect;
-    model: TimelineKeyframe;
-    parentRow: TimelineCalculatedRow;
-    parentGroup: TimelineCalculatedGroup;
-}

+ 0 - 26
lib/utils/timelineCalculatedRow.d.ts

@@ -1,26 +0,0 @@
-import { TimelineRow } from '../timelineRow';
-import { TimelineCalculated } from './timelineCalculated';
-import { TimelineCalculatedGroup } from './timelineCalculatedGroup';
-import { TimelineCalculatedKeyframe } from './timelineCalculatedKeyframe';
-export interface TimelineCalculatedRow extends TimelineCalculated {
-    /**
-     * Related row model.
-     */
-    model: TimelineRow;
-    /**
-     * Current row index.
-     */
-    index: number;
-    /**
-     * Row margin bottom
-     */
-    marginBottom: number;
-    /**
-     * Collection of the keyframes groups exists in a current row.
-     */
-    groups: Array<TimelineCalculatedGroup>;
-    /**
-     * All row keyframes
-     */
-    keyframes: Array<TimelineCalculatedKeyframe>;
-}

+ 0 - 0
lib/utils/TimelineElement.d.ts → lib/utils/timelineElement.d.ts


+ 0 - 0
lib/utils/TimelineElementDragState.d.ts → lib/utils/timelineElementDragState.d.ts


+ 0 - 11
lib/utils/timelineModelCalcResults.d.ts

@@ -1,11 +0,0 @@
-import { TimelineCalculated } from './timelineCalculated';
-import { TimelineCalculatedRow } from './timelineCalculatedRow';
-/**
- * View model given with the calculated information.
- */
-export interface TimelineModelCalcResults extends TimelineCalculated {
-    /**
-     * Collection of the rows sizes.
-     */
-    rows: TimelineCalculatedRow[];
-}

+ 4 - 0
lib/utils/timelineUtils.d.ts

@@ -41,4 +41,8 @@ export declare class TimelineUtils {
      * Merge options. New keys will be added.
      */
     static mergeOptions(previousOptions: TimelineOptions, newOptions: TimelineOptions): TimelineOptions;
+    /**
+     * Format numbers with len
+     */
+    static timePadZero(num: number, len?: number): string;
 }

+ 0 - 17
lib/utils/timelineValues.d.ts

@@ -1,17 +0,0 @@
-/**
- * Timeline values interface.
- */
-export interface TimelineValues {
-    /**
-     * Value used for the visualization.
-     */
-    val: number;
-    /**
-     * Snapped value (val property will be snapped if snapping was enabled)
-     */
-    snapVal?: number;
-    /**
-     * Unsnapped original value.
-     */
-    originalVal?: number;
-}

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "animation-timeline-js",
-  "version": "2.3.1",
+  "version": "2.3.2",
   "description": "animation timeline control based on the canvas.",
   "main": "lib/animation-timeline.min.js",
   "types": "lib/animation-timeline.d.ts",

+ 1 - 1
tsconfig.tests.json

@@ -6,7 +6,7 @@
     "target": "es5",
     "allowJs": false,
     "inlineSourceMap": true,
-    "strict": false,
+    "strict": true,
     "declaration": false,
     "forceConsistentCasingInFileNames": true
   },

Niektoré súbory nie sú zobrazené, pretože je v týchto rozdielových dátach zmenené mnoho súborov