@ldelia/react-media 0.4.1 → 0.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/__tests__/timeline/timeline.test.js +5 -10
- package/dist/components/index.js +2 -17
- package/dist/components/timeline/RangeSelectorCanvas/RangeSelectorCanvas.js +16 -44
- package/dist/components/timeline/Timeline.js +26 -56
- package/dist/components/timeline/TimelineCanvas/TickTime.js +5 -10
- package/dist/components/timeline/TimelineCanvas/TickTimeCollectionDisplay.js +9 -14
- package/dist/components/timeline/TimelineCanvas/TimelineCanvas.js +16 -44
- package/dist/components/timeline/TimelineCanvas/drawTimeBlocksOnCanvas.js +4 -8
- package/dist/components/timeline/TimelineValue/TimelineValue.js +24 -54
- package/dist/components/timeline/ZoomContext/ZoomContext.js +2 -8
- package/dist/components/timeline/constants.js +1 -4
- package/dist/components/timeline/index.js +1 -17
- package/dist/components/timeline/utils/utils.js +6 -15
- package/dist/index.js +1 -17
- package/dist/setupTests.js +1 -3
- package/dist/stories/timeline.stories.js +18 -24
- package/package.json +45 -35
- package/.bitmap +0 -48
- package/.eslintcache +0 -1
- package/.prettierignore +0 -3
- package/.prettierrc +0 -7
- package/.storybook/main.js +0 -38
- package/.storybook/preview.js +0 -4
- package/config/env.js +0 -104
- package/config/getHttpsConfig.js +0 -66
- package/config/jest/babelTransform.js +0 -29
- package/config/jest/cssTransform.js +0 -14
- package/config/jest/fileTransform.js +0 -40
- package/config/modules.js +0 -134
- package/config/paths.js +0 -77
- package/config/webpack/persistentCache/createEnvironmentHash.js +0 -9
- package/config/webpack.config.js +0 -755
- package/config/webpackDevServer.config.js +0 -127
- package/dist/components/__tests__/timeline/timeline.test.d.ts +0 -1
- package/dist/components/index.d.ts +0 -1
- package/dist/components/timeline/RangeSelectorCanvas/RangeSelectorCanvas.d.ts +0 -8
- package/dist/components/timeline/Timeline.d.ts +0 -12
- package/dist/components/timeline/TimelineCanvas/TickTime.d.ts +0 -7
- package/dist/components/timeline/TimelineCanvas/TickTimeCollectionDisplay.d.ts +0 -6
- package/dist/components/timeline/TimelineCanvas/TimelineCanvas.d.ts +0 -7
- package/dist/components/timeline/TimelineCanvas/drawTimeBlocksOnCanvas.d.ts +0 -2
- package/dist/components/timeline/TimelineValue/TimelineValue.d.ts +0 -7
- package/dist/components/timeline/ZoomContext/ZoomContext.d.ts +0 -7
- package/dist/components/timeline/constants.d.ts +0 -1
- package/dist/components/timeline/index.d.ts +0 -1
- package/dist/components/timeline/utils/utils.d.ts +0 -7
- package/dist/index.d.ts +0 -1
- package/dist/setupTests.d.ts +0 -1
- package/dist/stories/timeline.stories.d.ts +0 -9
- package/scripts/build.js +0 -217
- package/scripts/start.js +0 -154
- package/scripts/test.js +0 -52
- package/src/components/__tests__/timeline/timeline.test.js +0 -22
- package/src/components/__tests__/timeline/timeline.test.tsx +0 -26
- package/src/components/index.js +0 -2
- package/src/components/index.ts +0 -2
- package/src/components/reproduction-widget/README.md +0 -27
- package/src/components/reproduction-widget/ReproductionWidget.tsx +0 -68
- package/src/components/reproduction-widget/index.tsx +0 -1
- package/src/components/reproduction-widget/inner-players/PlayAlongInnerPlayer.tsx +0 -10
- package/src/components/reproduction-widget/inner-players/YouTubeInnerPlayer.tsx +0 -36
- package/src/components/reproduction-widget/models/Player/PlayAlongPlayer.ts +0 -129
- package/src/components/reproduction-widget/models/Player/PlayerEvents.ts +0 -4
- package/src/components/reproduction-widget/models/Player/YouTubePlayer.ts +0 -171
- package/src/components/reproduction-widget/models/Reproduction.ts +0 -272
- package/src/components/reproduction-widget/models/ReproductionBuilder.ts +0 -70
- package/src/components/timeline/README.md +0 -111
- package/src/components/timeline/RangeSelectorCanvas/RangeSelectorCanvas.js +0 -127
- package/src/components/timeline/RangeSelectorCanvas/RangeSelectorCanvas.tsx +0 -166
- package/src/components/timeline/Timeline.js +0 -77
- package/src/components/timeline/Timeline.tsx +0 -139
- package/src/components/timeline/TimelineCanvas/TickTime.js +0 -26
- package/src/components/timeline/TimelineCanvas/TickTime.tsx +0 -45
- package/src/components/timeline/TimelineCanvas/TickTimeCollectionDisplay.js +0 -19
- package/src/components/timeline/TimelineCanvas/TickTimeCollectionDisplay.tsx +0 -42
- package/src/components/timeline/TimelineCanvas/TimelineCanvas.js +0 -44
- package/src/components/timeline/TimelineCanvas/TimelineCanvas.tsx +0 -79
- package/src/components/timeline/TimelineCanvas/drawTimeBlocksOnCanvas.js +0 -28
- package/src/components/timeline/TimelineCanvas/drawTimeBlocksOnCanvas.ts +0 -43
- package/src/components/timeline/TimelineValue/TimelineValue.js +0 -50
- package/src/components/timeline/TimelineValue/TimelineValue.tsx +0 -87
- package/src/components/timeline/ZoomContext/ZoomContext.js +0 -2
- package/src/components/timeline/ZoomContext/ZoomContext.ts +0 -10
- package/src/components/timeline/constants.js +0 -13
- package/src/components/timeline/constants.ts +0 -13
- package/src/components/timeline/index.js +0 -1
- package/src/components/timeline/index.tsx +0 -1
- package/src/components/timeline/utils/utils.js +0 -28
- package/src/components/timeline/utils/utils.ts +0 -49
- package/src/index.js +0 -1
- package/src/index.ts +0 -1
- package/src/modules.d.ts +0 -1
- package/src/react-app-env.d.ts +0 -71
- package/src/react-docgen-types.d.ts +0 -37
- package/src/setupTests.js +0 -5
- package/src/setupTests.ts +0 -5
- package/src/stories/Configure.mdx +0 -364
- package/src/stories/reproduction-widget.stories.tsx +0 -23
- package/src/stories/timeline.stories.custom.css +0 -29
- package/src/stories/timeline.stories.js +0 -54
- package/src/stories/timeline.stories.tsx +0 -66
- package/storybook-static/favicon.svg +0 -1
- package/storybook-static/index.html +0 -173
- package/storybook-static/index.json +0 -1
- package/storybook-static/nunito-sans-bold-italic.woff2 +0 -0
- package/storybook-static/nunito-sans-bold.woff2 +0 -0
- package/storybook-static/nunito-sans-italic.woff2 +0 -0
- package/storybook-static/nunito-sans-regular.woff2 +0 -0
- package/storybook-static/project.json +0 -1
- package/storybook-static/sb-addons/essentials-actions-3/manager-bundle.js +0 -3
- package/storybook-static/sb-addons/essentials-actions-3/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-static/sb-addons/essentials-backgrounds-4/manager-bundle.js +0 -12
- package/storybook-static/sb-addons/essentials-backgrounds-4/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-static/sb-addons/essentials-controls-2/manager-bundle.js +0 -412
- package/storybook-static/sb-addons/essentials-controls-2/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-static/sb-addons/essentials-measure-7/manager-bundle.js +0 -3
- package/storybook-static/sb-addons/essentials-measure-7/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-static/sb-addons/essentials-outline-8/manager-bundle.js +0 -3
- package/storybook-static/sb-addons/essentials-outline-8/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-static/sb-addons/essentials-toolbars-6/manager-bundle.js +0 -3
- package/storybook-static/sb-addons/essentials-toolbars-6/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-static/sb-addons/essentials-viewport-5/manager-bundle.js +0 -3
- package/storybook-static/sb-addons/essentials-viewport-5/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-static/sb-addons/links-1/manager-bundle.js +0 -3
- package/storybook-static/sb-addons/links-1/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-static/sb-addons/storybook-core-core-server-presets-0/common-manager-bundle.js +0 -3
- package/storybook-static/sb-addons/storybook-core-core-server-presets-0/common-manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-static/sb-common-assets/favicon.svg +0 -1
- package/storybook-static/sb-common-assets/nunito-sans-bold-italic.woff2 +0 -0
- package/storybook-static/sb-common-assets/nunito-sans-bold.woff2 +0 -0
- package/storybook-static/sb-common-assets/nunito-sans-italic.woff2 +0 -0
- package/storybook-static/sb-common-assets/nunito-sans-regular.woff2 +0 -0
- package/storybook-static/sb-manager/globals-module-info.js +0 -995
- package/storybook-static/sb-manager/globals-runtime.js +0 -53527
- package/storybook-static/sb-manager/globals.js +0 -48
- package/storybook-static/sb-manager/runtime.js +0 -11885
- package/storybook-static/sb-preview/globals.js +0 -33
- package/storybook-static/sb-preview/runtime.js +0 -9483
- package/tsconfig.json +0 -14
- /package/{src → dist}/components/reproduction-widget/ReproductionWidget.js +0 -0
- /package/{src → dist}/components/reproduction-widget/index.js +0 -0
- /package/{src → dist}/components/reproduction-widget/inner-players/PlayAlongInnerPlayer.js +0 -0
- /package/{src → dist}/components/reproduction-widget/inner-players/YouTubeInnerPlayer.js +0 -0
- /package/{src → dist}/components/reproduction-widget/models/Player/PlayAlongPlayer.js +0 -0
- /package/{src → dist}/components/reproduction-widget/models/Player/PlayerEvents.js +0 -0
- /package/{src → dist}/components/reproduction-widget/models/Player/YouTubePlayer.js +0 -0
- /package/{src → dist}/components/reproduction-widget/models/Reproduction.js +0 -0
- /package/{src → dist}/components/reproduction-widget/models/ReproductionBuilder.js +0 -0
- /package/{src → dist}/stories/reproduction-widget.stories.js +0 -0
package/dist/index.js
CHANGED
|
@@ -1,17 +1 @@
|
|
|
1
|
-
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./components"), exports);
|
|
1
|
+
export * from './components';
|
package/dist/setupTests.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
1
|
// jest-dom adds custom jest matchers for asserting on DOM nodes.
|
|
4
2
|
// allows you to do things like:
|
|
5
3
|
// expect(element).toHaveTextContent(/react/i)
|
|
6
4
|
// learn more: https://github.com/testing-library/jest-dom
|
|
7
|
-
|
|
5
|
+
import '@testing-library/jest-dom';
|
|
@@ -1,57 +1,51 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
exports.Minimalist = exports.WithoutTimeBlocks = exports.WithCustomClassName = exports.WithSelectedRange = exports.Default = void 0;
|
|
7
|
-
const react_1 = __importDefault(require("react"));
|
|
8
|
-
const timeline_1 = require("../components/timeline");
|
|
9
|
-
const styled_components_1 = __importDefault(require("styled-components"));
|
|
10
|
-
require("./timeline.stories.custom.css");
|
|
11
|
-
const StyledTimeline = (0, styled_components_1.default)(timeline_1.Timeline) `
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Timeline } from '../components/timeline';
|
|
3
|
+
import styled from 'styled-components';
|
|
4
|
+
import './timeline.stories.custom.css';
|
|
5
|
+
const StyledTimeline = styled(Timeline) `
|
|
12
6
|
.media-timeline-value-line {
|
|
13
7
|
background-color: red;
|
|
14
8
|
width: 5px;
|
|
15
9
|
}
|
|
16
10
|
`;
|
|
17
|
-
|
|
11
|
+
export default {
|
|
18
12
|
title: 'Timeline',
|
|
19
|
-
component:
|
|
13
|
+
component: Timeline,
|
|
20
14
|
argTypes: {
|
|
21
15
|
onChange: { action: 'changed' },
|
|
22
16
|
onRangeChange: { action: 'range changed' },
|
|
23
17
|
},
|
|
24
18
|
};
|
|
25
|
-
const Template = (args) => (
|
|
26
|
-
|
|
27
|
-
|
|
19
|
+
const Template = (args) => (React.createElement(StyledTimeline, Object.assign({}, args)));
|
|
20
|
+
export const Default = Template.bind({});
|
|
21
|
+
Default.args = {
|
|
28
22
|
duration: 305,
|
|
29
23
|
value: 301,
|
|
30
24
|
zoomLevel: 0,
|
|
31
25
|
};
|
|
32
|
-
|
|
33
|
-
|
|
26
|
+
export const WithSelectedRange = Template.bind({});
|
|
27
|
+
WithSelectedRange.args = {
|
|
34
28
|
duration: 305,
|
|
35
29
|
value: 31,
|
|
36
30
|
zoomLevel: 0,
|
|
37
31
|
selectedRange: [20, 30],
|
|
38
32
|
};
|
|
39
|
-
|
|
40
|
-
|
|
33
|
+
export const WithCustomClassName = Template.bind({});
|
|
34
|
+
WithCustomClassName.args = {
|
|
41
35
|
duration: 305,
|
|
42
36
|
value: 31,
|
|
43
37
|
zoomLevel: 0,
|
|
44
38
|
className: 'this-class-redefines-styles',
|
|
45
39
|
};
|
|
46
|
-
|
|
47
|
-
|
|
40
|
+
export const WithoutTimeBlocks = Template.bind({});
|
|
41
|
+
WithoutTimeBlocks.args = {
|
|
48
42
|
duration: 305,
|
|
49
43
|
value: 31,
|
|
50
44
|
zoomLevel: 0,
|
|
51
45
|
withTimeBlocks: false,
|
|
52
46
|
};
|
|
53
|
-
|
|
54
|
-
|
|
47
|
+
export const Minimalist = Template.bind({});
|
|
48
|
+
Minimalist.args = {
|
|
55
49
|
duration: 305,
|
|
56
50
|
value: 31,
|
|
57
51
|
zoomLevel: 0,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ldelia/react-media",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.3",
|
|
4
4
|
"description": "A React components collection for media-related features.",
|
|
5
5
|
"private": false,
|
|
6
6
|
"keywords": [
|
|
@@ -11,7 +11,51 @@
|
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"bugs": "https://github.com/ldelia/react-media/issues",
|
|
13
13
|
"main": "dist/index.js",
|
|
14
|
+
"module": "dist/index.js",
|
|
14
15
|
"types": "dist/index.d.ts",
|
|
16
|
+
"exports": {
|
|
17
|
+
".": {
|
|
18
|
+
"import": "./dist/index.js",
|
|
19
|
+
"require": "./dist/index.js"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"files": [
|
|
23
|
+
"dist"
|
|
24
|
+
],
|
|
25
|
+
"scripts": {
|
|
26
|
+
"start": "node scripts/start.js",
|
|
27
|
+
"build": "tsc",
|
|
28
|
+
"test": "node scripts/test.js",
|
|
29
|
+
"format": "prettier --write \"src/**/*.{ts,tsx,js,jsx,json,css,scss,md}\"",
|
|
30
|
+
"storybook": "storybook dev -p 6006",
|
|
31
|
+
"build-storybook": "storybook build"
|
|
32
|
+
},
|
|
33
|
+
"eslintConfig": {
|
|
34
|
+
"extends": [
|
|
35
|
+
"react-app",
|
|
36
|
+
"react-app/jest",
|
|
37
|
+
"plugin:storybook/recommended",
|
|
38
|
+
"prettier"
|
|
39
|
+
],
|
|
40
|
+
"plugins": [
|
|
41
|
+
"prettier"
|
|
42
|
+
],
|
|
43
|
+
"rules": {
|
|
44
|
+
"prettier/prettier": "error"
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"browserslist": {
|
|
48
|
+
"production": [
|
|
49
|
+
">0.2%",
|
|
50
|
+
"not dead",
|
|
51
|
+
"not op_mini all"
|
|
52
|
+
],
|
|
53
|
+
"development": [
|
|
54
|
+
"last 1 chrome version",
|
|
55
|
+
"last 1 firefox version",
|
|
56
|
+
"last 1 safari version"
|
|
57
|
+
]
|
|
58
|
+
},
|
|
15
59
|
"dependencies": {
|
|
16
60
|
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.3",
|
|
17
61
|
"@svgr/webpack": "^8.1.0",
|
|
@@ -64,40 +108,6 @@
|
|
|
64
108
|
"webpack-manifest-plugin": "^4.0.2",
|
|
65
109
|
"workbox-webpack-plugin": "^6.4.1"
|
|
66
110
|
},
|
|
67
|
-
"scripts": {
|
|
68
|
-
"start": "node scripts/start.js",
|
|
69
|
-
"build": "tsc",
|
|
70
|
-
"test": "node scripts/test.js",
|
|
71
|
-
"format": "prettier --write \"src/**/*.{ts,tsx,js,jsx,json,css,scss,md}\"",
|
|
72
|
-
"storybook": "storybook dev -p 6006",
|
|
73
|
-
"build-storybook": "storybook build"
|
|
74
|
-
},
|
|
75
|
-
"eslintConfig": {
|
|
76
|
-
"extends": [
|
|
77
|
-
"react-app",
|
|
78
|
-
"react-app/jest",
|
|
79
|
-
"plugin:storybook/recommended",
|
|
80
|
-
"prettier"
|
|
81
|
-
],
|
|
82
|
-
"plugins": [
|
|
83
|
-
"prettier"
|
|
84
|
-
],
|
|
85
|
-
"rules": {
|
|
86
|
-
"prettier/prettier": "error"
|
|
87
|
-
}
|
|
88
|
-
},
|
|
89
|
-
"browserslist": {
|
|
90
|
-
"production": [
|
|
91
|
-
">0.2%",
|
|
92
|
-
"not dead",
|
|
93
|
-
"not op_mini all"
|
|
94
|
-
],
|
|
95
|
-
"development": [
|
|
96
|
-
"last 1 chrome version",
|
|
97
|
-
"last 1 firefox version",
|
|
98
|
-
"last 1 safari version"
|
|
99
|
-
]
|
|
100
|
-
},
|
|
101
111
|
"devDependencies": {
|
|
102
112
|
"@babel/core": "^7.24.9",
|
|
103
113
|
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
|
package/.bitmap
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
/* THIS IS A BIT-AUTO-GENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. */
|
|
2
|
-
|
|
3
|
-
{
|
|
4
|
-
"ldelia.react-media/timeline@1.0.8": {
|
|
5
|
-
"files": [
|
|
6
|
-
{
|
|
7
|
-
"relativePath": "src/components/timeline/README.md",
|
|
8
|
-
"test": false,
|
|
9
|
-
"name": "README.md"
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
"relativePath": "src/components/timeline/RangeSelectorCanvas.tsx",
|
|
13
|
-
"test": false,
|
|
14
|
-
"name": "RangeSelectorCanvas.tsx"
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
"relativePath": "src/components/timeline/TickTime.tsx",
|
|
18
|
-
"test": false,
|
|
19
|
-
"name": "TickTime.tsx"
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
"relativePath": "src/components/timeline/TickTimeCollectionDisplay.tsx",
|
|
23
|
-
"test": false,
|
|
24
|
-
"name": "TickTimeCollectionDisplay.tsx"
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
"relativePath": "src/components/timeline/VaLueLineCanvas.tsx",
|
|
28
|
-
"test": false,
|
|
29
|
-
"name": "VaLueLineCanvas.tsx"
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
"relativePath": "src/components/timeline/index.tsx",
|
|
33
|
-
"test": false,
|
|
34
|
-
"name": "index.tsx"
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
"relativePath": "src/components/timeline/utils/utils.ts",
|
|
38
|
-
"test": false,
|
|
39
|
-
"name": "utils.ts"
|
|
40
|
-
}
|
|
41
|
-
],
|
|
42
|
-
"mainFile": "src/components/timeline/index.tsx",
|
|
43
|
-
"trackDir": "src/components/timeline",
|
|
44
|
-
"origin": "AUTHORED",
|
|
45
|
-
"exported": true
|
|
46
|
-
},
|
|
47
|
-
"version": "14.8.8"
|
|
48
|
-
}
|
package/.eslintcache
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
[{"/home/ldelia/Proyectos/react-media/src/components/timeline/index.tsx":"1","/home/ldelia/Proyectos/react-media/src/components/timeline/VaLueLineCanvas.tsx":"2","/home/ldelia/Proyectos/react-media/src/components/timeline/TickTimeCollectionDisplay.tsx":"3","/home/ldelia/Proyectos/react-media/src/components/timeline/RangeSelectorCanvas.tsx":"4","/home/ldelia/Proyectos/react-media/src/components/timeline/utils/utils.ts":"5","/home/ldelia/Proyectos/react-media/src/components/timeline/TickTime.tsx":"6","/home/ldelia/Proyectos/react-media/src/stories/timeline.stories.tsx":"7","/home/ldelia/Proyectos/react-media/src/components/timeline/constants.ts":"8"},{"size":4115,"mtime":1612815036821,"results":"9","hashOfConfig":"10"},{"size":3108,"mtime":1611772905837,"results":"11","hashOfConfig":"10"},{"size":1159,"mtime":1611772905837,"results":"12","hashOfConfig":"10"},{"size":6266,"mtime":1611772905837,"results":"13","hashOfConfig":"10"},{"size":404,"mtime":1611772905841,"results":"14","hashOfConfig":"10"},{"size":988,"mtime":1611772905837,"results":"15","hashOfConfig":"10"},{"size":860,"mtime":1611772905841,"results":"16","hashOfConfig":"10"},{"size":319,"mtime":1612814974971,"results":"17","hashOfConfig":"10"},{"filePath":"18","messages":"19","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"v8ab83",{"filePath":"20","messages":"21","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"22","messages":"23","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"24","messages":"25","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"26","messages":"27","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"28","messages":"29","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"30","messages":"31","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"32","messages":"33","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/home/ldelia/Proyectos/react-media/src/components/timeline/index.tsx",[],"/home/ldelia/Proyectos/react-media/src/components/timeline/VaLueLineCanvas.tsx",[],"/home/ldelia/Proyectos/react-media/src/components/timeline/TickTimeCollectionDisplay.tsx",[],"/home/ldelia/Proyectos/react-media/src/components/timeline/RangeSelectorCanvas.tsx",[],"/home/ldelia/Proyectos/react-media/src/components/timeline/utils/utils.ts",[],"/home/ldelia/Proyectos/react-media/src/components/timeline/TickTime.tsx",[],"/home/ldelia/Proyectos/react-media/src/stories/timeline.stories.tsx",[],"/home/ldelia/Proyectos/react-media/src/components/timeline/constants.ts",[]]
|
package/.prettierignore
DELETED
package/.prettierrc
DELETED
package/.storybook/main.js
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
"stories": [
|
|
3
|
-
"../src/**/*.stories.mdx",
|
|
4
|
-
"../src/**/*.stories.@(js|jsx|ts|tsx)"
|
|
5
|
-
],
|
|
6
|
-
"addons": [
|
|
7
|
-
"@storybook/addon-links",
|
|
8
|
-
"@storybook/addon-essentials",
|
|
9
|
-
'@storybook/addon-docs',
|
|
10
|
-
],
|
|
11
|
-
"framework": {
|
|
12
|
-
name: "@storybook/react-webpack5",
|
|
13
|
-
options: {},
|
|
14
|
-
},
|
|
15
|
-
webpackFinal: async (config) => {
|
|
16
|
-
config.module.rules.push({
|
|
17
|
-
test: /\.(ts|tsx)$/,
|
|
18
|
-
use: [
|
|
19
|
-
{
|
|
20
|
-
loader: require.resolve('babel-loader'),
|
|
21
|
-
options: {
|
|
22
|
-
presets: ['@babel/preset-env', '@babel/preset-react', '@babel/preset-typescript'],
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
loader: require.resolve('ts-loader'),
|
|
27
|
-
options: {
|
|
28
|
-
transpileOnly: true, // Disable type checking
|
|
29
|
-
},
|
|
30
|
-
},
|
|
31
|
-
],
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
config.resolve.extensions.push('.ts', '.tsx');
|
|
35
|
-
|
|
36
|
-
return config;
|
|
37
|
-
},
|
|
38
|
-
}
|
package/.storybook/preview.js
DELETED
package/config/env.js
DELETED
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const fs = require('fs');
|
|
4
|
-
const path = require('path');
|
|
5
|
-
const paths = require('./paths');
|
|
6
|
-
|
|
7
|
-
// Make sure that including paths.js after env.js will read .env variables.
|
|
8
|
-
delete require.cache[require.resolve('./paths')];
|
|
9
|
-
|
|
10
|
-
const NODE_ENV = process.env.NODE_ENV;
|
|
11
|
-
if (!NODE_ENV) {
|
|
12
|
-
throw new Error(
|
|
13
|
-
'The NODE_ENV environment variable is required but was not specified.'
|
|
14
|
-
);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
// https://github.com/bkeepers/dotenv#what-other-env-files-can-i-use
|
|
18
|
-
const dotenvFiles = [
|
|
19
|
-
`${paths.dotenv}.${NODE_ENV}.local`,
|
|
20
|
-
// Don't include `.env.local` for `test` environment
|
|
21
|
-
// since normally you expect tests to produce the same
|
|
22
|
-
// results for everyone
|
|
23
|
-
NODE_ENV !== 'test' && `${paths.dotenv}.local`,
|
|
24
|
-
`${paths.dotenv}.${NODE_ENV}`,
|
|
25
|
-
paths.dotenv,
|
|
26
|
-
].filter(Boolean);
|
|
27
|
-
|
|
28
|
-
// Load environment variables from .env* files. Suppress warnings using silent
|
|
29
|
-
// if this file is missing. dotenv will never modify any environment variables
|
|
30
|
-
// that have already been set. Variable expansion is supported in .env files.
|
|
31
|
-
// https://github.com/motdotla/dotenv
|
|
32
|
-
// https://github.com/motdotla/dotenv-expand
|
|
33
|
-
dotenvFiles.forEach(dotenvFile => {
|
|
34
|
-
if (fs.existsSync(dotenvFile)) {
|
|
35
|
-
require('dotenv-expand')(
|
|
36
|
-
require('dotenv').config({
|
|
37
|
-
path: dotenvFile,
|
|
38
|
-
})
|
|
39
|
-
);
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
// We support resolving modules according to `NODE_PATH`.
|
|
44
|
-
// This lets you use absolute paths in imports inside large monorepos:
|
|
45
|
-
// https://github.com/facebook/create-react-app/issues/253.
|
|
46
|
-
// It works similar to `NODE_PATH` in Node itself:
|
|
47
|
-
// https://nodejs.org/api/modules.html#modules_loading_from_the_global_folders
|
|
48
|
-
// Note that unlike in Node, only *relative* paths from `NODE_PATH` are honored.
|
|
49
|
-
// Otherwise, we risk importing Node.js core modules into an app instead of webpack shims.
|
|
50
|
-
// https://github.com/facebook/create-react-app/issues/1023#issuecomment-265344421
|
|
51
|
-
// We also resolve them to make sure all tools using them work consistently.
|
|
52
|
-
const appDirectory = fs.realpathSync(process.cwd());
|
|
53
|
-
process.env.NODE_PATH = (process.env.NODE_PATH || '')
|
|
54
|
-
.split(path.delimiter)
|
|
55
|
-
.filter(folder => folder && !path.isAbsolute(folder))
|
|
56
|
-
.map(folder => path.resolve(appDirectory, folder))
|
|
57
|
-
.join(path.delimiter);
|
|
58
|
-
|
|
59
|
-
// Grab NODE_ENV and REACT_APP_* environment variables and prepare them to be
|
|
60
|
-
// injected into the application via DefinePlugin in webpack configuration.
|
|
61
|
-
const REACT_APP = /^REACT_APP_/i;
|
|
62
|
-
|
|
63
|
-
function getClientEnvironment(publicUrl) {
|
|
64
|
-
const raw = Object.keys(process.env)
|
|
65
|
-
.filter(key => REACT_APP.test(key))
|
|
66
|
-
.reduce(
|
|
67
|
-
(env, key) => {
|
|
68
|
-
env[key] = process.env[key];
|
|
69
|
-
return env;
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
// Useful for determining whether we’re running in production mode.
|
|
73
|
-
// Most importantly, it switches React into the correct mode.
|
|
74
|
-
NODE_ENV: process.env.NODE_ENV || 'development',
|
|
75
|
-
// Useful for resolving the correct path to static assets in `public`.
|
|
76
|
-
// For example, <img src={process.env.PUBLIC_URL + '/img/logo.png'} />.
|
|
77
|
-
// This should only be used as an escape hatch. Normally you would put
|
|
78
|
-
// images into the `src` and `import` them in code to get their paths.
|
|
79
|
-
PUBLIC_URL: publicUrl,
|
|
80
|
-
// We support configuring the sockjs pathname during development.
|
|
81
|
-
// These settings let a developer run multiple simultaneous projects.
|
|
82
|
-
// They are used as the connection `hostname`, `pathname` and `port`
|
|
83
|
-
// in webpackHotDevClient. They are used as the `sockHost`, `sockPath`
|
|
84
|
-
// and `sockPort` options in webpack-dev-server.
|
|
85
|
-
WDS_SOCKET_HOST: process.env.WDS_SOCKET_HOST,
|
|
86
|
-
WDS_SOCKET_PATH: process.env.WDS_SOCKET_PATH,
|
|
87
|
-
WDS_SOCKET_PORT: process.env.WDS_SOCKET_PORT,
|
|
88
|
-
// Whether or not react-refresh is enabled.
|
|
89
|
-
// It is defined here so it is available in the webpackHotDevClient.
|
|
90
|
-
FAST_REFRESH: process.env.FAST_REFRESH !== 'false',
|
|
91
|
-
}
|
|
92
|
-
);
|
|
93
|
-
// Stringify all values so we can feed into webpack DefinePlugin
|
|
94
|
-
const stringified = {
|
|
95
|
-
'process.env': Object.keys(raw).reduce((env, key) => {
|
|
96
|
-
env[key] = JSON.stringify(raw[key]);
|
|
97
|
-
return env;
|
|
98
|
-
}, {}),
|
|
99
|
-
};
|
|
100
|
-
|
|
101
|
-
return { raw, stringified };
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
module.exports = getClientEnvironment;
|
package/config/getHttpsConfig.js
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const fs = require('fs');
|
|
4
|
-
const path = require('path');
|
|
5
|
-
const crypto = require('crypto');
|
|
6
|
-
const chalk = require('react-dev-utils/chalk');
|
|
7
|
-
const paths = require('./paths');
|
|
8
|
-
|
|
9
|
-
// Ensure the certificate and key provided are valid and if not
|
|
10
|
-
// throw an easy to debug error
|
|
11
|
-
function validateKeyAndCerts({ cert, key, keyFile, crtFile }) {
|
|
12
|
-
let encrypted;
|
|
13
|
-
try {
|
|
14
|
-
// publicEncrypt will throw an error with an invalid cert
|
|
15
|
-
encrypted = crypto.publicEncrypt(cert, Buffer.from('test'));
|
|
16
|
-
} catch (err) {
|
|
17
|
-
throw new Error(
|
|
18
|
-
`The certificate "${chalk.yellow(crtFile)}" is invalid.\n${err.message}`
|
|
19
|
-
);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
try {
|
|
23
|
-
// privateDecrypt will throw an error with an invalid key
|
|
24
|
-
crypto.privateDecrypt(key, encrypted);
|
|
25
|
-
} catch (err) {
|
|
26
|
-
throw new Error(
|
|
27
|
-
`The certificate key "${chalk.yellow(keyFile)}" is invalid.\n${
|
|
28
|
-
err.message
|
|
29
|
-
}`
|
|
30
|
-
);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
// Read file and throw an error if it doesn't exist
|
|
35
|
-
function readEnvFile(file, type) {
|
|
36
|
-
if (!fs.existsSync(file)) {
|
|
37
|
-
throw new Error(
|
|
38
|
-
`You specified ${chalk.cyan(
|
|
39
|
-
type
|
|
40
|
-
)} in your env, but the file "${chalk.yellow(file)}" can't be found.`
|
|
41
|
-
);
|
|
42
|
-
}
|
|
43
|
-
return fs.readFileSync(file);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
// Get the https config
|
|
47
|
-
// Return cert files if provided in env, otherwise just true or false
|
|
48
|
-
function getHttpsConfig() {
|
|
49
|
-
const { SSL_CRT_FILE, SSL_KEY_FILE, HTTPS } = process.env;
|
|
50
|
-
const isHttps = HTTPS === 'true';
|
|
51
|
-
|
|
52
|
-
if (isHttps && SSL_CRT_FILE && SSL_KEY_FILE) {
|
|
53
|
-
const crtFile = path.resolve(paths.appPath, SSL_CRT_FILE);
|
|
54
|
-
const keyFile = path.resolve(paths.appPath, SSL_KEY_FILE);
|
|
55
|
-
const config = {
|
|
56
|
-
cert: readEnvFile(crtFile, 'SSL_CRT_FILE'),
|
|
57
|
-
key: readEnvFile(keyFile, 'SSL_KEY_FILE'),
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
validateKeyAndCerts({ ...config, keyFile, crtFile });
|
|
61
|
-
return config;
|
|
62
|
-
}
|
|
63
|
-
return isHttps;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
module.exports = getHttpsConfig;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const babelJest = require('babel-jest').default;
|
|
4
|
-
|
|
5
|
-
const hasJsxRuntime = (() => {
|
|
6
|
-
if (process.env.DISABLE_NEW_JSX_TRANSFORM === 'true') {
|
|
7
|
-
return false;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
try {
|
|
11
|
-
require.resolve('react/jsx-runtime');
|
|
12
|
-
return true;
|
|
13
|
-
} catch (e) {
|
|
14
|
-
return false;
|
|
15
|
-
}
|
|
16
|
-
})();
|
|
17
|
-
|
|
18
|
-
module.exports = babelJest.createTransformer({
|
|
19
|
-
presets: [
|
|
20
|
-
[
|
|
21
|
-
require.resolve('babel-preset-react-app'),
|
|
22
|
-
{
|
|
23
|
-
runtime: hasJsxRuntime ? 'automatic' : 'classic',
|
|
24
|
-
},
|
|
25
|
-
],
|
|
26
|
-
],
|
|
27
|
-
babelrc: false,
|
|
28
|
-
configFile: false,
|
|
29
|
-
});
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
// This is a custom Jest transformer turning style imports into empty objects.
|
|
4
|
-
// http://facebook.github.io/jest/docs/en/webpack.html
|
|
5
|
-
|
|
6
|
-
module.exports = {
|
|
7
|
-
process() {
|
|
8
|
-
return 'module.exports = {};';
|
|
9
|
-
},
|
|
10
|
-
getCacheKey() {
|
|
11
|
-
// The output is always the same.
|
|
12
|
-
return 'cssTransform';
|
|
13
|
-
},
|
|
14
|
-
};
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const path = require('path');
|
|
4
|
-
const camelcase = require('camelcase');
|
|
5
|
-
|
|
6
|
-
// This is a custom Jest transformer turning file imports into filenames.
|
|
7
|
-
// http://facebook.github.io/jest/docs/en/webpack.html
|
|
8
|
-
|
|
9
|
-
module.exports = {
|
|
10
|
-
process(src, filename) {
|
|
11
|
-
const assetFilename = JSON.stringify(path.basename(filename));
|
|
12
|
-
|
|
13
|
-
if (filename.match(/\.svg$/)) {
|
|
14
|
-
// Based on how SVGR generates a component name:
|
|
15
|
-
// https://github.com/smooth-code/svgr/blob/01b194cf967347d43d4cbe6b434404731b87cf27/packages/core/src/state.js#L6
|
|
16
|
-
const pascalCaseFilename = camelcase(path.parse(filename).name, {
|
|
17
|
-
pascalCase: true,
|
|
18
|
-
});
|
|
19
|
-
const componentName = `Svg${pascalCaseFilename}`;
|
|
20
|
-
return `const React = require('react');
|
|
21
|
-
module.exports = {
|
|
22
|
-
__esModule: true,
|
|
23
|
-
default: ${assetFilename},
|
|
24
|
-
ReactComponent: React.forwardRef(function ${componentName}(props, ref) {
|
|
25
|
-
return {
|
|
26
|
-
$$typeof: Symbol.for('react.element'),
|
|
27
|
-
type: 'svg',
|
|
28
|
-
ref: ref,
|
|
29
|
-
key: null,
|
|
30
|
-
props: Object.assign({}, props, {
|
|
31
|
-
children: ${assetFilename}
|
|
32
|
-
})
|
|
33
|
-
};
|
|
34
|
-
}),
|
|
35
|
-
};`;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
return `module.exports = ${assetFilename};`;
|
|
39
|
-
},
|
|
40
|
-
};
|