@ldelia/react-media 0.2.7 → 0.3.0

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.
Files changed (105) hide show
  1. package/.storybook/main.js +25 -2
  2. package/config/env.js +104 -0
  3. package/config/getHttpsConfig.js +66 -0
  4. package/config/jest/babelTransform.js +29 -0
  5. package/config/jest/cssTransform.js +14 -0
  6. package/config/jest/fileTransform.js +40 -0
  7. package/config/modules.js +134 -0
  8. package/config/paths.js +77 -0
  9. package/config/webpack/persistentCache/createEnvironmentHash.js +9 -0
  10. package/config/webpack.config.js +755 -0
  11. package/config/webpackDevServer.config.js +127 -0
  12. package/dist/components/timeline/{RangeSelectorCanvas.js → RangeSelectorCanvas/RangeSelectorCanvas.js} +30 -8
  13. package/dist/components/timeline/Timeline.d.ts +0 -5
  14. package/dist/components/timeline/Timeline.js +32 -27
  15. package/dist/components/timeline/{TickTimeCollectionDisplay.js → TimelineCanvas/TickTimeCollectionDisplay.js} +2 -2
  16. package/dist/components/timeline/TimelineCanvas/TimelineCanvas.d.ts +7 -0
  17. package/dist/components/timeline/TimelineCanvas/TimelineCanvas.js +72 -0
  18. package/dist/components/timeline/TimelineCanvas/drawTimeBlocksOnCanvas.d.ts +2 -0
  19. package/dist/components/timeline/TimelineCanvas/drawTimeBlocksOnCanvas.js +32 -0
  20. package/dist/components/timeline/TimelineValue/TimelineValue.d.ts +7 -0
  21. package/dist/components/timeline/{VaLueLineCanvas.js → TimelineValue/TimelineValue.js} +8 -39
  22. package/dist/components/timeline/ZoomContext/ZoomContext.d.ts +7 -0
  23. package/dist/components/timeline/ZoomContext/ZoomContext.js +8 -0
  24. package/dist/components/timeline/utils/utils.d.ts +3 -1
  25. package/dist/components/timeline/utils/utils.js +14 -1
  26. package/dist/stories/timeline.stories.d.ts +6 -6
  27. package/package.json +126 -18
  28. package/scripts/build.js +217 -0
  29. package/scripts/start.js +154 -0
  30. package/scripts/test.js +52 -0
  31. package/src/components/__tests__/timeline/timeline.test.js +22 -0
  32. package/src/components/index.js +1 -0
  33. package/src/components/timeline/RangeSelectorCanvas/RangeSelectorCanvas.js +127 -0
  34. package/src/components/timeline/{RangeSelectorCanvas.tsx → RangeSelectorCanvas/RangeSelectorCanvas.tsx} +9 -11
  35. package/src/components/timeline/Timeline.js +77 -0
  36. package/src/components/timeline/Timeline.tsx +47 -37
  37. package/src/components/timeline/TimelineCanvas/TickTime.js +26 -0
  38. package/src/components/timeline/TimelineCanvas/TickTimeCollectionDisplay.js +19 -0
  39. package/src/components/timeline/{TickTimeCollectionDisplay.tsx → TimelineCanvas/TickTimeCollectionDisplay.tsx} +5 -5
  40. package/src/components/timeline/TimelineCanvas/TimelineCanvas.js +44 -0
  41. package/src/components/timeline/TimelineCanvas/TimelineCanvas.tsx +79 -0
  42. package/src/components/timeline/TimelineCanvas/drawTimeBlocksOnCanvas.js +28 -0
  43. package/src/components/timeline/TimelineCanvas/drawTimeBlocksOnCanvas.ts +43 -0
  44. package/src/components/timeline/TimelineValue/TimelineValue.js +50 -0
  45. package/src/components/timeline/{VaLueLineCanvas.tsx → TimelineValue/TimelineValue.tsx} +9 -64
  46. package/src/components/timeline/ZoomContext/ZoomContext.js +2 -0
  47. package/src/components/timeline/ZoomContext/ZoomContext.ts +10 -0
  48. package/src/components/timeline/constants.js +13 -0
  49. package/src/components/timeline/index.js +1 -0
  50. package/src/components/timeline/utils/utils.js +28 -0
  51. package/src/components/timeline/utils/utils.ts +22 -1
  52. package/src/index.js +1 -0
  53. package/src/react-app-env.d.ts +71 -1
  54. package/src/react-docgen-types.d.ts +37 -0
  55. package/src/setupTests.js +5 -0
  56. package/src/stories/timeline.stories.js +54 -0
  57. package/storybook-static/favicon.svg +1 -0
  58. package/storybook-static/index.html +173 -0
  59. package/storybook-static/index.json +1 -0
  60. package/storybook-static/nunito-sans-bold-italic.woff2 +0 -0
  61. package/storybook-static/nunito-sans-bold.woff2 +0 -0
  62. package/storybook-static/nunito-sans-italic.woff2 +0 -0
  63. package/storybook-static/nunito-sans-regular.woff2 +0 -0
  64. package/storybook-static/project.json +1 -0
  65. package/storybook-static/sb-addons/essentials-actions-3/manager-bundle.js +3 -0
  66. package/storybook-static/sb-addons/essentials-actions-3/manager-bundle.js.LEGAL.txt +0 -0
  67. package/storybook-static/sb-addons/essentials-backgrounds-4/manager-bundle.js +12 -0
  68. package/storybook-static/sb-addons/essentials-backgrounds-4/manager-bundle.js.LEGAL.txt +0 -0
  69. package/storybook-static/sb-addons/essentials-controls-2/manager-bundle.js +412 -0
  70. package/storybook-static/sb-addons/essentials-controls-2/manager-bundle.js.LEGAL.txt +0 -0
  71. package/storybook-static/sb-addons/essentials-measure-7/manager-bundle.js +3 -0
  72. package/storybook-static/sb-addons/essentials-measure-7/manager-bundle.js.LEGAL.txt +0 -0
  73. package/storybook-static/sb-addons/essentials-outline-8/manager-bundle.js +3 -0
  74. package/storybook-static/sb-addons/essentials-outline-8/manager-bundle.js.LEGAL.txt +0 -0
  75. package/storybook-static/sb-addons/essentials-toolbars-6/manager-bundle.js +3 -0
  76. package/storybook-static/sb-addons/essentials-toolbars-6/manager-bundle.js.LEGAL.txt +0 -0
  77. package/storybook-static/sb-addons/essentials-viewport-5/manager-bundle.js +3 -0
  78. package/storybook-static/sb-addons/essentials-viewport-5/manager-bundle.js.LEGAL.txt +0 -0
  79. package/storybook-static/sb-addons/links-1/manager-bundle.js +3 -0
  80. package/storybook-static/sb-addons/links-1/manager-bundle.js.LEGAL.txt +0 -0
  81. package/storybook-static/sb-addons/storybook-core-core-server-presets-0/common-manager-bundle.js +3 -0
  82. package/storybook-static/sb-addons/storybook-core-core-server-presets-0/common-manager-bundle.js.LEGAL.txt +0 -0
  83. package/storybook-static/sb-common-assets/favicon.svg +1 -0
  84. package/storybook-static/sb-common-assets/nunito-sans-bold-italic.woff2 +0 -0
  85. package/storybook-static/sb-common-assets/nunito-sans-bold.woff2 +0 -0
  86. package/storybook-static/sb-common-assets/nunito-sans-italic.woff2 +0 -0
  87. package/storybook-static/sb-common-assets/nunito-sans-regular.woff2 +0 -0
  88. package/storybook-static/sb-manager/globals-module-info.js +995 -0
  89. package/storybook-static/sb-manager/globals-runtime.js +53527 -0
  90. package/storybook-static/sb-manager/globals.js +48 -0
  91. package/storybook-static/sb-manager/runtime.js +11885 -0
  92. package/storybook-static/sb-preview/globals.js +33 -0
  93. package/storybook-static/sb-preview/runtime.js +9483 -0
  94. package/tsconfig.json +8 -7
  95. package/.storybook/main.ts +0 -18
  96. package/.storybook/preview.ts +0 -14
  97. package/dist/components/timeline/VaLueLineCanvas.d.ts +0 -7
  98. package/dist/reportWebVitals.d.ts +0 -3
  99. package/dist/reportWebVitals.js +0 -37
  100. package/src/reportWebVitals.ts +0 -15
  101. /package/dist/components/timeline/{RangeSelectorCanvas.d.ts → RangeSelectorCanvas/RangeSelectorCanvas.d.ts} +0 -0
  102. /package/dist/components/timeline/{TickTime.d.ts → TimelineCanvas/TickTime.d.ts} +0 -0
  103. /package/dist/components/timeline/{TickTime.js → TimelineCanvas/TickTime.js} +0 -0
  104. /package/dist/components/timeline/{TickTimeCollectionDisplay.d.ts → TimelineCanvas/TickTimeCollectionDisplay.d.ts} +0 -0
  105. /package/src/components/timeline/{TickTime.tsx → TimelineCanvas/TickTime.tsx} +0 -0
package/tsconfig.json CHANGED
@@ -1,13 +1,14 @@
1
1
  {
2
2
  "compilerOptions": {
3
3
  "target": "ES6",
4
- "module": "commonjs",
5
- "declaration": true,
6
- "outDir": "./dist",
7
- "strict": true,
4
+ "module": "ESNext",
8
5
  "jsx": "react",
6
+ "strict": true,
7
+ "moduleResolution": "node",
9
8
  "esModuleInterop": true,
10
- "skipLibCheck": true
9
+ "skipLibCheck": true,
10
+ "forceConsistentCasingInFileNames": true,
11
+ "allowSyntheticDefaultImports": true
11
12
  },
12
- "include": ["src"]
13
- }
13
+ "include": ["src", ".storybook", "src/react-docgen-types.d.ts"]
14
+ }
@@ -1,18 +0,0 @@
1
- import type { StorybookConfig } from "@storybook/react-webpack5";
2
-
3
- const config: StorybookConfig = {
4
- stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
5
- addons: [
6
- "@storybook/preset-create-react-app",
7
- "@storybook/addon-onboarding",
8
- "@storybook/addon-links",
9
- "@storybook/addon-essentials",
10
- "@chromatic-com/storybook",
11
- "@storybook/addon-interactions",
12
- ],
13
- framework: {
14
- name: "@storybook/react-webpack5",
15
- options: {},
16
- },
17
- };
18
- export default config;
@@ -1,14 +0,0 @@
1
- import type { Preview } from "@storybook/react";
2
-
3
- const preview: Preview = {
4
- parameters: {
5
- controls: {
6
- matchers: {
7
- color: /(background|color)$/i,
8
- date: /Date$/i,
9
- },
10
- },
11
- },
12
- };
13
-
14
- export default preview;
@@ -1,7 +0,0 @@
1
- import React from 'react';
2
- export interface VaLueLineCanvasProps {
3
- blockStartingTimes: number[];
4
- value: number;
5
- }
6
- declare const VaLueLineCanvas: React.FC<VaLueLineCanvasProps>;
7
- export default VaLueLineCanvas;
@@ -1,3 +0,0 @@
1
- import { ReportHandler } from 'web-vitals';
2
- declare const reportWebVitals: (onPerfEntry?: ReportHandler) => void;
3
- export default reportWebVitals;
@@ -1,37 +0,0 @@
1
- "use strict";
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- const reportWebVitals = (onPerfEntry) => {
27
- if (onPerfEntry && onPerfEntry instanceof Function) {
28
- Promise.resolve().then(() => __importStar(require('web-vitals'))).then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
29
- getCLS(onPerfEntry);
30
- getFID(onPerfEntry);
31
- getFCP(onPerfEntry);
32
- getLCP(onPerfEntry);
33
- getTTFB(onPerfEntry);
34
- });
35
- }
36
- };
37
- exports.default = reportWebVitals;
@@ -1,15 +0,0 @@
1
- import { ReportHandler } from 'web-vitals';
2
-
3
- const reportWebVitals = (onPerfEntry?: ReportHandler) => {
4
- if (onPerfEntry && onPerfEntry instanceof Function) {
5
- import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
6
- getCLS(onPerfEntry);
7
- getFID(onPerfEntry);
8
- getFCP(onPerfEntry);
9
- getLCP(onPerfEntry);
10
- getTTFB(onPerfEntry);
11
- });
12
- }
13
- };
14
-
15
- export default reportWebVitals;