react-timelane 1.2.1 → 1.2.2

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 (139) hide show
  1. package/dist/_virtual/bind-all.js +4 -0
  2. package/dist/_virtual/bind.js +4 -0
  3. package/dist/_virtual/index.js +5 -0
  4. package/dist/_virtual/index2.js +4 -0
  5. package/dist/_virtual/index3.js +5 -0
  6. package/dist/_virtual/index4.js +4 -0
  7. package/dist/_virtual/react-dom.development.js +4 -0
  8. package/dist/_virtual/react-dom.production.js +4 -0
  9. package/dist/components/Timelane/Timelane.css +1 -0
  10. package/dist/components/Timelane/Timelane.js +53 -0
  11. package/dist/components/TimelaneAllocation/TimelaneAllocation.js +49 -0
  12. package/dist/components/TimelaneAside/TimelaneAside.js +60 -0
  13. package/dist/components/TimelaneBackground/TimelaneBackground.js +46 -0
  14. package/dist/components/TimelaneBody/TimelaneBody.js +13 -0
  15. package/dist/components/TimelaneBody/TimelaneSelectionLayer.js +96 -0
  16. package/dist/components/TimelaneHeader/DaysHeader.js +30 -0
  17. package/dist/components/TimelaneHeader/MonthsHeader.js +38 -0
  18. package/dist/components/TimelaneHeader/TimelaneHeader.js +55 -0
  19. package/dist/components/TimelaneHeader/WeeksHeader.js +39 -0
  20. package/dist/components/TimelaneHeader/renderingUtils.js +26 -0
  21. package/dist/components/TimelaneItem/DragResizeComponent.js +125 -0
  22. package/dist/components/TimelaneItem/TimelaneItem.js +42 -0
  23. package/dist/components/TimelaneLane/DropPreview.js +25 -0
  24. package/dist/components/TimelaneLane/DropTarget.js +57 -0
  25. package/dist/components/TimelaneLane/OverlapIndicator.js +21 -0
  26. package/dist/components/TimelaneLane/TimelaneLane.js +164 -0
  27. package/dist/components/TimelaneLayout/TimelaneLayout.js +77 -0
  28. package/dist/components/TimelaneLayout/layout.css +1 -0
  29. package/dist/components/TimelaneSettingsProvider/TimelaneSettingsContext.js +21 -0
  30. package/dist/components/TimelaneSettingsProvider/TimelaneSettingsProvider.js +15 -0
  31. package/dist/components/utils.js +243 -0
  32. package/dist/hooks/useScroll.js +47 -0
  33. package/dist/hooks/useTimelaneContext.js +6 -0
  34. package/dist/index.js +36 -0
  35. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/adapter/element-adapter-native-data-key.js +4 -0
  36. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/adapter/element-adapter.js +127 -0
  37. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/honey-pot-fix/get-element-from-point-without-honey-pot.js +9 -0
  38. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/honey-pot-fix/honey-pot-data-attribute.js +4 -0
  39. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/honey-pot-fix/is-honey-pot-element.js +7 -0
  40. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/honey-pot-fix/make-honey-pot-fix.js +226 -0
  41. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/ledger/dispatch-consumer-event.js +107 -0
  42. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/ledger/lifecycle-manager.js +195 -0
  43. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/ledger/usage-ledger.js +21 -0
  44. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/make-adapter/make-adapter.js +43 -0
  45. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/make-adapter/make-drop-target.js +253 -0
  46. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/make-adapter/make-monitor.js +121 -0
  47. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/public-utils/combine.js +12 -0
  48. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/public-utils/once.js +17 -0
  49. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/add-attribute.js +9 -0
  50. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/android.js +8 -0
  51. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/changing-window/count-events-for-safari.js +57 -0
  52. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/changing-window/is-from-another-window.js +9 -0
  53. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/changing-window/is-leaving-window.js +13 -0
  54. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/detect-broken-drag.js +47 -0
  55. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/get-input.js +17 -0
  56. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/is-firefox.js +7 -0
  57. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/is-safari.js +10 -0
  58. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/max-z-index.js +4 -0
  59. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/media-types/text-media-type.js +4 -0
  60. package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/media-types/url-media-type.js +4 -0
  61. package/dist/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js +8 -0
  62. package/dist/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js +6 -0
  63. package/dist/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js +7 -0
  64. package/dist/node_modules/@babel/runtime/helpers/esm/defineProperty.js +12 -0
  65. package/dist/node_modules/@babel/runtime/helpers/esm/iterableToArray.js +6 -0
  66. package/dist/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js +21 -0
  67. package/dist/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js +7 -0
  68. package/dist/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js +7 -0
  69. package/dist/node_modules/@babel/runtime/helpers/esm/slicedToArray.js +10 -0
  70. package/dist/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js +10 -0
  71. package/dist/node_modules/@babel/runtime/helpers/esm/toPrimitive.js +14 -0
  72. package/dist/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js +9 -0
  73. package/dist/node_modules/@babel/runtime/helpers/esm/typeof.js +11 -0
  74. package/dist/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js +11 -0
  75. package/dist/node_modules/bind-event-listener/dist/bind-all.js +45 -0
  76. package/dist/node_modules/bind-event-listener/dist/bind.js +16 -0
  77. package/dist/node_modules/bind-event-listener/dist/index.js +20 -0
  78. package/dist/node_modules/date-fns/_lib/addLeadingZeros.js +7 -0
  79. package/dist/node_modules/date-fns/_lib/defaultOptions.js +7 -0
  80. package/dist/node_modules/date-fns/_lib/format/formatters.js +583 -0
  81. package/dist/node_modules/date-fns/_lib/format/lightFormatters.js +59 -0
  82. package/dist/node_modules/date-fns/_lib/format/longFormatters.js +52 -0
  83. package/dist/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js +18 -0
  84. package/dist/node_modules/date-fns/_lib/normalizeDates.js +11 -0
  85. package/dist/node_modules/date-fns/_lib/normalizeInterval.js +8 -0
  86. package/dist/node_modules/date-fns/_lib/protectedTokens.js +20 -0
  87. package/dist/node_modules/date-fns/addDays.js +10 -0
  88. package/dist/node_modules/date-fns/addWeeks.js +8 -0
  89. package/dist/node_modules/date-fns/constants.js +6 -0
  90. package/dist/node_modules/date-fns/constructFrom.js +8 -0
  91. package/dist/node_modules/date-fns/differenceInCalendarDays.js +16 -0
  92. package/dist/node_modules/date-fns/eachDayOfInterval.js +17 -0
  93. package/dist/node_modules/date-fns/eachMonthOfInterval.js +17 -0
  94. package/dist/node_modules/date-fns/eachWeekOfInterval.js +22 -0
  95. package/dist/node_modules/date-fns/format.js +59 -0
  96. package/dist/node_modules/date-fns/getDay.js +8 -0
  97. package/dist/node_modules/date-fns/getDayOfYear.js +11 -0
  98. package/dist/node_modules/date-fns/getISOWeek.js +12 -0
  99. package/dist/node_modules/date-fns/getISOWeekYear.js +15 -0
  100. package/dist/node_modules/date-fns/getWeek.js +12 -0
  101. package/dist/node_modules/date-fns/getWeekYear.js +17 -0
  102. package/dist/node_modules/date-fns/isDate.js +7 -0
  103. package/dist/node_modules/date-fns/isSameDay.js +14 -0
  104. package/dist/node_modules/date-fns/isSunday.js +8 -0
  105. package/dist/node_modules/date-fns/isValid.js +9 -0
  106. package/dist/node_modules/date-fns/lastDayOfMonth.js +9 -0
  107. package/dist/node_modules/date-fns/locale/_lib/buildFormatLongFn.js +9 -0
  108. package/dist/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +18 -0
  109. package/dist/node_modules/date-fns/locale/_lib/buildMatchFn.js +31 -0
  110. package/dist/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js +15 -0
  111. package/dist/node_modules/date-fns/locale/en-US/_lib/formatDistance.js +70 -0
  112. package/dist/node_modules/date-fns/locale/en-US/_lib/formatLong.js +33 -0
  113. package/dist/node_modules/date-fns/locale/en-US/_lib/formatRelative.js +11 -0
  114. package/dist/node_modules/date-fns/locale/en-US/_lib/localize.js +155 -0
  115. package/dist/node_modules/date-fns/locale/en-US/_lib/match.js +110 -0
  116. package/dist/node_modules/date-fns/locale/en-US.js +21 -0
  117. package/dist/node_modules/date-fns/max.js +14 -0
  118. package/dist/node_modules/date-fns/min.js +14 -0
  119. package/dist/node_modules/date-fns/nextDay.js +10 -0
  120. package/dist/node_modules/date-fns/nextSunday.js +8 -0
  121. package/dist/node_modules/date-fns/setHours.js +9 -0
  122. package/dist/node_modules/date-fns/startOfDay.js +9 -0
  123. package/dist/node_modules/date-fns/startOfISOWeek.js +8 -0
  124. package/dist/node_modules/date-fns/startOfISOWeekYear.js +11 -0
  125. package/dist/node_modules/date-fns/startOfWeek.js +11 -0
  126. package/dist/node_modules/date-fns/startOfWeekYear.js +13 -0
  127. package/dist/node_modules/date-fns/startOfYear.js +9 -0
  128. package/dist/node_modules/date-fns/toDate.js +8 -0
  129. package/dist/node_modules/raf-schd/dist/raf-schd.esm.js +15 -0
  130. package/dist/node_modules/re-resizable/lib/index.js +424 -0
  131. package/dist/node_modules/re-resizable/lib/resizer.js +49 -0
  132. package/dist/node_modules/react-dom/cjs/react-dom.development.js +227 -0
  133. package/dist/node_modules/react-dom/cjs/react-dom.production.js +147 -0
  134. package/dist/node_modules/react-dom/index.js +23 -0
  135. package/dist/node_modules/tiny-invariant/dist/esm/tiny-invariant.js +12 -0
  136. package/dist/types/Item.js +6 -0
  137. package/package.json +10 -7
  138. package/dist/react-timelane.css +0 -1
  139. package/dist/react-timelane.js +0 -4754
@@ -0,0 +1,227 @@
1
+ import { __exports as n } from "../../../_virtual/react-dom.development.js";
2
+ import _ from "react";
3
+ /**
4
+ * @license React
5
+ * react-dom.development.js
6
+ *
7
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
8
+ *
9
+ * This source code is licensed under the MIT license found in the
10
+ * LICENSE file in the root directory of this source tree.
11
+ */
12
+ var p;
13
+ function S() {
14
+ return p ? n : (p = 1, process.env.NODE_ENV !== "production" && function() {
15
+ function s() {
16
+ }
17
+ function g(t) {
18
+ return "" + t;
19
+ }
20
+ function m(t, e, r) {
21
+ var i = 3 < arguments.length && arguments[3] !== void 0 ? arguments[3] : null;
22
+ try {
23
+ g(i);
24
+ var u = !1;
25
+ } catch {
26
+ u = !0;
27
+ }
28
+ return u && (console.error(
29
+ "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
30
+ typeof Symbol == "function" && Symbol.toStringTag && i[Symbol.toStringTag] || i.constructor.name || "Object"
31
+ ), g(i)), {
32
+ $$typeof: O,
33
+ key: i == null ? null : "" + i,
34
+ children: t,
35
+ containerInfo: e,
36
+ implementation: r
37
+ };
38
+ }
39
+ function l(t, e) {
40
+ if (t === "font") return "";
41
+ if (typeof e == "string")
42
+ return e === "use-credentials" ? e : "";
43
+ }
44
+ function a(t) {
45
+ return t === null ? "`null`" : t === void 0 ? "`undefined`" : t === "" ? "an empty string" : 'something with type "' + typeof t + '"';
46
+ }
47
+ function c(t) {
48
+ return t === null ? "`null`" : t === void 0 ? "`undefined`" : t === "" ? "an empty string" : typeof t == "string" ? JSON.stringify(t) : typeof t == "number" ? "`" + t + "`" : 'something with type "' + typeof t + '"';
49
+ }
50
+ function y() {
51
+ var t = d.H;
52
+ return t === null && console.error(
53
+ `Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
54
+ 1. You might have mismatching versions of React and the renderer (such as React DOM)
55
+ 2. You might be breaking the Rules of Hooks
56
+ 3. You might have more than one copy of React in the same app
57
+ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`
58
+ ), t;
59
+ }
60
+ typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
61
+ var h = _, o = {
62
+ d: {
63
+ f: s,
64
+ r: function() {
65
+ throw Error(
66
+ "Invalid form element. requestFormReset must be passed a form that was rendered by React."
67
+ );
68
+ },
69
+ D: s,
70
+ C: s,
71
+ L: s,
72
+ m: s,
73
+ X: s,
74
+ S: s,
75
+ M: s
76
+ },
77
+ p: 0,
78
+ findDOMNode: null
79
+ }, O = Symbol.for("react.portal"), d = h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
80
+ typeof Map == "function" && Map.prototype != null && typeof Map.prototype.forEach == "function" && typeof Set == "function" && Set.prototype != null && typeof Set.prototype.clear == "function" && typeof Set.prototype.forEach == "function" || console.error(
81
+ "React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"
82
+ ), n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = o, n.createPortal = function(t, e) {
83
+ var r = 2 < arguments.length && arguments[2] !== void 0 ? arguments[2] : null;
84
+ if (!e || e.nodeType !== 1 && e.nodeType !== 9 && e.nodeType !== 11)
85
+ throw Error("Target container is not a DOM element.");
86
+ return m(t, e, null, r);
87
+ }, n.flushSync = function(t) {
88
+ var e = d.T, r = o.p;
89
+ try {
90
+ if (d.T = null, o.p = 2, t)
91
+ return t();
92
+ } finally {
93
+ d.T = e, o.p = r, o.d.f() && console.error(
94
+ "flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task."
95
+ );
96
+ }
97
+ }, n.preconnect = function(t, e) {
98
+ typeof t == "string" && t ? e != null && typeof e != "object" ? console.error(
99
+ "ReactDOM.preconnect(): Expected the `options` argument (second) to be an object but encountered %s instead. The only supported option at this time is `crossOrigin` which accepts a string.",
100
+ c(e)
101
+ ) : e != null && typeof e.crossOrigin != "string" && console.error(
102
+ "ReactDOM.preconnect(): Expected the `crossOrigin` option (second argument) to be a string but encountered %s instead. Try removing this option or passing a string value instead.",
103
+ a(e.crossOrigin)
104
+ ) : console.error(
105
+ "ReactDOM.preconnect(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",
106
+ a(t)
107
+ ), typeof t == "string" && (e ? (e = e.crossOrigin, e = typeof e == "string" ? e === "use-credentials" ? e : "" : void 0) : e = null, o.d.C(t, e));
108
+ }, n.prefetchDNS = function(t) {
109
+ if (typeof t != "string" || !t)
110
+ console.error(
111
+ "ReactDOM.prefetchDNS(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",
112
+ a(t)
113
+ );
114
+ else if (1 < arguments.length) {
115
+ var e = arguments[1];
116
+ typeof e == "object" && e.hasOwnProperty("crossOrigin") ? console.error(
117
+ "ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. It looks like the you are attempting to set a crossOrigin property for this DNS lookup hint. Browsers do not perform DNS queries using CORS and setting this attribute on the resource hint has no effect. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",
118
+ c(e)
119
+ ) : console.error(
120
+ "ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",
121
+ c(e)
122
+ );
123
+ }
124
+ typeof t == "string" && o.d.D(t);
125
+ }, n.preinit = function(t, e) {
126
+ if (typeof t == "string" && t ? e == null || typeof e != "object" ? console.error(
127
+ "ReactDOM.preinit(): Expected the `options` argument (second) to be an object with an `as` property describing the type of resource to be preinitialized but encountered %s instead.",
128
+ c(e)
129
+ ) : e.as !== "style" && e.as !== "script" && console.error(
130
+ 'ReactDOM.preinit(): Expected the `as` property in the `options` argument (second) to contain a valid value describing the type of resource to be preinitialized but encountered %s instead. Valid values for `as` are "style" and "script".',
131
+ c(e.as)
132
+ ) : console.error(
133
+ "ReactDOM.preinit(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",
134
+ a(t)
135
+ ), typeof t == "string" && e && typeof e.as == "string") {
136
+ var r = e.as, i = l(r, e.crossOrigin), u = typeof e.integrity == "string" ? e.integrity : void 0, f = typeof e.fetchPriority == "string" ? e.fetchPriority : void 0;
137
+ r === "style" ? o.d.S(
138
+ t,
139
+ typeof e.precedence == "string" ? e.precedence : void 0,
140
+ {
141
+ crossOrigin: i,
142
+ integrity: u,
143
+ fetchPriority: f
144
+ }
145
+ ) : r === "script" && o.d.X(t, {
146
+ crossOrigin: i,
147
+ integrity: u,
148
+ fetchPriority: f,
149
+ nonce: typeof e.nonce == "string" ? e.nonce : void 0
150
+ });
151
+ }
152
+ }, n.preinitModule = function(t, e) {
153
+ var r = "";
154
+ if (typeof t == "string" && t || (r += " The `href` argument encountered was " + a(t) + "."), e !== void 0 && typeof e != "object" ? r += " The `options` argument encountered was " + a(e) + "." : e && "as" in e && e.as !== "script" && (r += " The `as` option encountered was " + c(e.as) + "."), r)
155
+ console.error(
156
+ "ReactDOM.preinitModule(): Expected up to two arguments, a non-empty `href` string and, optionally, an `options` object with a valid `as` property.%s",
157
+ r
158
+ );
159
+ else
160
+ switch (r = e && typeof e.as == "string" ? e.as : "script", r) {
161
+ case "script":
162
+ break;
163
+ default:
164
+ r = c(r), console.error(
165
+ 'ReactDOM.preinitModule(): Currently the only supported "as" type for this function is "script" but received "%s" instead. This warning was generated for `href` "%s". In the future other module types will be supported, aligning with the import-attributes proposal. Learn more here: (https://github.com/tc39/proposal-import-attributes)',
166
+ r,
167
+ t
168
+ );
169
+ }
170
+ typeof t == "string" && (typeof e == "object" && e !== null ? (e.as == null || e.as === "script") && (r = l(
171
+ e.as,
172
+ e.crossOrigin
173
+ ), o.d.M(t, {
174
+ crossOrigin: r,
175
+ integrity: typeof e.integrity == "string" ? e.integrity : void 0,
176
+ nonce: typeof e.nonce == "string" ? e.nonce : void 0
177
+ })) : e == null && o.d.M(t));
178
+ }, n.preload = function(t, e) {
179
+ var r = "";
180
+ if (typeof t == "string" && t || (r += " The `href` argument encountered was " + a(t) + "."), e == null || typeof e != "object" ? r += " The `options` argument encountered was " + a(e) + "." : typeof e.as == "string" && e.as || (r += " The `as` option encountered was " + a(e.as) + "."), r && console.error(
181
+ 'ReactDOM.preload(): Expected two arguments, a non-empty `href` string and an `options` object with an `as` property valid for a `<link rel="preload" as="..." />` tag.%s',
182
+ r
183
+ ), typeof t == "string" && typeof e == "object" && e !== null && typeof e.as == "string") {
184
+ r = e.as;
185
+ var i = l(
186
+ r,
187
+ e.crossOrigin
188
+ );
189
+ o.d.L(t, r, {
190
+ crossOrigin: i,
191
+ integrity: typeof e.integrity == "string" ? e.integrity : void 0,
192
+ nonce: typeof e.nonce == "string" ? e.nonce : void 0,
193
+ type: typeof e.type == "string" ? e.type : void 0,
194
+ fetchPriority: typeof e.fetchPriority == "string" ? e.fetchPriority : void 0,
195
+ referrerPolicy: typeof e.referrerPolicy == "string" ? e.referrerPolicy : void 0,
196
+ imageSrcSet: typeof e.imageSrcSet == "string" ? e.imageSrcSet : void 0,
197
+ imageSizes: typeof e.imageSizes == "string" ? e.imageSizes : void 0,
198
+ media: typeof e.media == "string" ? e.media : void 0
199
+ });
200
+ }
201
+ }, n.preloadModule = function(t, e) {
202
+ var r = "";
203
+ typeof t == "string" && t || (r += " The `href` argument encountered was " + a(t) + "."), e !== void 0 && typeof e != "object" ? r += " The `options` argument encountered was " + a(e) + "." : e && "as" in e && typeof e.as != "string" && (r += " The `as` option encountered was " + a(e.as) + "."), r && console.error(
204
+ 'ReactDOM.preloadModule(): Expected two arguments, a non-empty `href` string and, optionally, an `options` object with an `as` property valid for a `<link rel="modulepreload" as="..." />` tag.%s',
205
+ r
206
+ ), typeof t == "string" && (e ? (r = l(
207
+ e.as,
208
+ e.crossOrigin
209
+ ), o.d.m(t, {
210
+ as: typeof e.as == "string" && e.as !== "script" ? e.as : void 0,
211
+ crossOrigin: r,
212
+ integrity: typeof e.integrity == "string" ? e.integrity : void 0
213
+ })) : o.d.m(t));
214
+ }, n.requestFormReset = function(t) {
215
+ o.d.r(t);
216
+ }, n.unstable_batchedUpdates = function(t, e) {
217
+ return t(e);
218
+ }, n.useFormState = function(t, e, r) {
219
+ return y().useFormState(t, e, r);
220
+ }, n.useFormStatus = function() {
221
+ return y().useHostTransitionStatus();
222
+ }, n.version = "19.1.0", typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
223
+ }(), n);
224
+ }
225
+ export {
226
+ S as __require
227
+ };
@@ -0,0 +1,147 @@
1
+ import { __exports as i } from "../../../_virtual/react-dom.production.js";
2
+ import v from "react";
3
+ /**
4
+ * @license React
5
+ * react-dom.production.js
6
+ *
7
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
8
+ *
9
+ * This source code is licensed under the MIT license found in the
10
+ * LICENSE file in the root directory of this source tree.
11
+ */
12
+ var l;
13
+ function O() {
14
+ if (l) return i;
15
+ l = 1;
16
+ var s = v;
17
+ function g(e) {
18
+ var r = "https://react.dev/errors/" + e;
19
+ if (1 < arguments.length) {
20
+ r += "?args[]=" + encodeURIComponent(arguments[1]);
21
+ for (var t = 2; t < arguments.length; t++)
22
+ r += "&args[]=" + encodeURIComponent(arguments[t]);
23
+ }
24
+ return "Minified React error #" + e + "; visit " + r + " for the full message or use the non-minified dev environment for full errors and additional helpful warnings.";
25
+ }
26
+ function a() {
27
+ }
28
+ var n = {
29
+ d: {
30
+ f: a,
31
+ r: function() {
32
+ throw Error(g(522));
33
+ },
34
+ D: a,
35
+ C: a,
36
+ L: a,
37
+ m: a,
38
+ X: a,
39
+ S: a,
40
+ M: a
41
+ },
42
+ p: 0,
43
+ findDOMNode: null
44
+ }, o = Symbol.for("react.portal");
45
+ function m(e, r, t) {
46
+ var f = 3 < arguments.length && arguments[3] !== void 0 ? arguments[3] : null;
47
+ return {
48
+ $$typeof: o,
49
+ key: f == null ? null : "" + f,
50
+ children: e,
51
+ containerInfo: r,
52
+ implementation: t
53
+ };
54
+ }
55
+ var c = s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
56
+ function u(e, r) {
57
+ if (e === "font") return "";
58
+ if (typeof r == "string")
59
+ return r === "use-credentials" ? r : "";
60
+ }
61
+ return i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = n, i.createPortal = function(e, r) {
62
+ var t = 2 < arguments.length && arguments[2] !== void 0 ? arguments[2] : null;
63
+ if (!r || r.nodeType !== 1 && r.nodeType !== 9 && r.nodeType !== 11)
64
+ throw Error(g(299));
65
+ return m(e, r, null, t);
66
+ }, i.flushSync = function(e) {
67
+ var r = c.T, t = n.p;
68
+ try {
69
+ if (c.T = null, n.p = 2, e) return e();
70
+ } finally {
71
+ c.T = r, n.p = t, n.d.f();
72
+ }
73
+ }, i.preconnect = function(e, r) {
74
+ typeof e == "string" && (r ? (r = r.crossOrigin, r = typeof r == "string" ? r === "use-credentials" ? r : "" : void 0) : r = null, n.d.C(e, r));
75
+ }, i.prefetchDNS = function(e) {
76
+ typeof e == "string" && n.d.D(e);
77
+ }, i.preinit = function(e, r) {
78
+ if (typeof e == "string" && r && typeof r.as == "string") {
79
+ var t = r.as, f = u(t, r.crossOrigin), d = typeof r.integrity == "string" ? r.integrity : void 0, y = typeof r.fetchPriority == "string" ? r.fetchPriority : void 0;
80
+ t === "style" ? n.d.S(
81
+ e,
82
+ typeof r.precedence == "string" ? r.precedence : void 0,
83
+ {
84
+ crossOrigin: f,
85
+ integrity: d,
86
+ fetchPriority: y
87
+ }
88
+ ) : t === "script" && n.d.X(e, {
89
+ crossOrigin: f,
90
+ integrity: d,
91
+ fetchPriority: y,
92
+ nonce: typeof r.nonce == "string" ? r.nonce : void 0
93
+ });
94
+ }
95
+ }, i.preinitModule = function(e, r) {
96
+ if (typeof e == "string")
97
+ if (typeof r == "object" && r !== null) {
98
+ if (r.as == null || r.as === "script") {
99
+ var t = u(
100
+ r.as,
101
+ r.crossOrigin
102
+ );
103
+ n.d.M(e, {
104
+ crossOrigin: t,
105
+ integrity: typeof r.integrity == "string" ? r.integrity : void 0,
106
+ nonce: typeof r.nonce == "string" ? r.nonce : void 0
107
+ });
108
+ }
109
+ } else r == null && n.d.M(e);
110
+ }, i.preload = function(e, r) {
111
+ if (typeof e == "string" && typeof r == "object" && r !== null && typeof r.as == "string") {
112
+ var t = r.as, f = u(t, r.crossOrigin);
113
+ n.d.L(e, t, {
114
+ crossOrigin: f,
115
+ integrity: typeof r.integrity == "string" ? r.integrity : void 0,
116
+ nonce: typeof r.nonce == "string" ? r.nonce : void 0,
117
+ type: typeof r.type == "string" ? r.type : void 0,
118
+ fetchPriority: typeof r.fetchPriority == "string" ? r.fetchPriority : void 0,
119
+ referrerPolicy: typeof r.referrerPolicy == "string" ? r.referrerPolicy : void 0,
120
+ imageSrcSet: typeof r.imageSrcSet == "string" ? r.imageSrcSet : void 0,
121
+ imageSizes: typeof r.imageSizes == "string" ? r.imageSizes : void 0,
122
+ media: typeof r.media == "string" ? r.media : void 0
123
+ });
124
+ }
125
+ }, i.preloadModule = function(e, r) {
126
+ if (typeof e == "string")
127
+ if (r) {
128
+ var t = u(r.as, r.crossOrigin);
129
+ n.d.m(e, {
130
+ as: typeof r.as == "string" && r.as !== "script" ? r.as : void 0,
131
+ crossOrigin: t,
132
+ integrity: typeof r.integrity == "string" ? r.integrity : void 0
133
+ });
134
+ } else n.d.m(e);
135
+ }, i.requestFormReset = function(e) {
136
+ n.d.r(e);
137
+ }, i.unstable_batchedUpdates = function(e, r) {
138
+ return e(r);
139
+ }, i.useFormState = function(e, r, t) {
140
+ return c.H.useFormState(e, r, t);
141
+ }, i.useFormStatus = function() {
142
+ return c.H.useHostTransitionStatus();
143
+ }, i.version = "19.1.0", i;
144
+ }
145
+ export {
146
+ O as __require
147
+ };
@@ -0,0 +1,23 @@
1
+ import { __module as e } from "../../_virtual/index4.js";
2
+ import { __require as t } from "./cjs/react-dom.production.js";
3
+ import { __require as c } from "./cjs/react-dom.development.js";
4
+ var o;
5
+ function O() {
6
+ if (o) return e.exports;
7
+ o = 1;
8
+ function r() {
9
+ if (!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ > "u" || typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE != "function")) {
10
+ if (process.env.NODE_ENV !== "production")
11
+ throw new Error("^_^");
12
+ try {
13
+ __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r);
14
+ } catch (_) {
15
+ console.error(_);
16
+ }
17
+ }
18
+ }
19
+ return process.env.NODE_ENV === "production" ? (r(), e.exports = t()) : e.exports = c(), e.exports;
20
+ }
21
+ export {
22
+ O as __require
23
+ };
@@ -0,0 +1,12 @@
1
+ var n = process.env.NODE_ENV === "production", r = "Invariant failed";
2
+ function o(a, i) {
3
+ if (!a) {
4
+ if (n)
5
+ throw new Error(r);
6
+ var e = r;
7
+ throw new Error(e);
8
+ }
9
+ }
10
+ export {
11
+ o as default
12
+ };
@@ -0,0 +1,6 @@
1
+ function i(n) {
2
+ return "id" in n && "laneId" in n && "start" in n && "end" in n && "size" in n && "offset" in n;
3
+ }
4
+ export {
5
+ i as isItem
6
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-timelane",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "dev": "vite",
@@ -40,25 +40,28 @@
40
40
  "typescript": "~5.8.3",
41
41
  "typescript-eslint": "^8.30.1",
42
42
  "vite": "^6.3.5",
43
- "vite-plugin-dts": "^4.5.4"
43
+ "vite-plugin-dts": "^4.5.4",
44
+ "vite-plugin-lib-inject-css": "^2.2.2"
44
45
  },
45
46
  "repository": {
46
47
  "url": "https://github.com/dhansmair/react-timelane"
47
48
  },
48
- "main": "./dist/react-timelane.js",
49
- "module": "./dist/react-timelane.js",
49
+ "main": "./dist/index.js",
50
+ "module": "./dist/index.js",
50
51
  "types": "./dist/index.d.ts",
51
52
  "exports": {
52
53
  ".": {
53
54
  "types": "./dist/index.d.ts",
54
- "default": "./dist/react-timelane.js"
55
- },
56
- "./style.css": "./dist/react-timelane.css"
55
+ "default": "./dist/index.js"
56
+ }
57
57
  },
58
58
  "files": [
59
59
  "dist",
60
60
  "!dist/stories",
61
61
  "!**/*.stories.ts",
62
62
  "!**/*.stories.d.ts"
63
+ ],
64
+ "sideEffects": [
65
+ "**/*.css"
63
66
  ]
64
67
  }
@@ -1 +0,0 @@
1
- :root{--border: 1px solid lightgray}.timelane-layout{position:relative;width:100%;height:100%;overflow:auto;border:var(--border)}.timelane-layout .timelane-layout-inner{position:relative;width:fit-content;height:fit-content;display:grid;grid-template-areas:"corner-tl header corner-tr" "aside-l body aside-r" "corner-bl footer corner-br"}.timelane-layout .timelane-layout-inner .timelane-layout-header,.timelane-layout .timelane-layout-inner .timelane-layout-footer,.timelane-layout .timelane-layout-inner .timelane-layout-aside,.timelane-layout .timelane-layout-inner .timelane-layout-corner{background:#fff}.timelane-layout .timelane-layout-inner .timelane-layout-header{grid-area:header;position:sticky;position:-webkit-sticky;top:0;z-index:101;border-bottom:var(--border)}.timelane-layout .timelane-layout-inner .timelane-layout-body{grid-area:body;z-index:100}.timelane-layout .timelane-layout-inner .timelane-layout-background{grid-area:body;z-index:-1}.timelane-layout .timelane-layout-inner .timelane-layout-footer{grid-area:footer;position:sticky;position:-webkit-sticky;bottom:0;z-index:101;border-top:var(--border)}.timelane-layout .timelane-layout-inner .timelane-layout-aside{grid-area:aside-l;justify-self:stretch;position:sticky;position:-webkit-sticky;left:0;z-index:101;border-right:var(--border)}.timelane-layout .timelane-layout-inner .timelane-layout-aside.timelane-layout-aside-right{grid-area:aside-r;right:0;left:initial;border-left:var(--border);border-right:none}.timelane-layout .timelane-layout-inner .timelane-layout-corner{position:sticky;position:-webkit-sticky;z-index:102}.timelane-layout .timelane-layout-inner .timelane-layout-corner.timelane-layout-corner-top-left{grid-area:corner-tl;top:0;left:0;border-bottom:var(--border);border-right:var(--border)}.timelane-layout .timelane-layout-inner .timelane-layout-corner.timelane-layout-corner-top-right{grid-area:corner-tr;top:0;right:0;border-bottom:var(--border);border-left:var(--border)}.timelane-layout .timelane-layout-inner .timelane-layout-corner.timelane-layout-corner-bottom-left{grid-area:corner-bl;bottom:0;left:0;border-top:var(--border);border-right:var(--border)}.timelane-layout .timelane-layout-inner .timelane-layout-corner.timelane-layout-corner-bottom-right{grid-area:corner-br;bottom:0;right:0;border-top:var(--border);border-left:var(--border)}*{box-sizing:border-box}.timelane{--timelane-aside-width: 150px;--timelane-border-color-light: #f0f0f0;--timelane-border-color-normal: lightgray;--timelane-border-color-dark: gray;--timelane-highlight-color: #f8f8f8;--timelane-focused-color: rgba(0, 0, 255, .1);--timelane-hover-color: rgba(0, 0, 0, .05);overflow:auto;position:relative;width:100%;height:100%}.timelane .timelane-header{width:fit-content;top:0;z-index:101;background:#fff}.timelane .timelane-header .timelane-header-months{display:flex;flex-flow:row nowrap}.timelane .timelane-header .timelane-header-months .timelane-header-month-label{border-right:1px solid var(--timelane-border-color-normal);border-bottom:1px solid var(--timelane-border-color-normal);overflow:hidden;font-size:1em;height:30px;line-height:30px;text-align:center;cursor:pointer}.timelane .timelane-header .timelane-header-months .timelane-header-month-label:hover{background:var(--timelane-hover-color)}.timelane .timelane-header .timelane-header-weeks{display:flex;flex-flow:row nowrap}.timelane .timelane-header .timelane-header-weeks .timelane-header-week-label{border-right:1px solid var(--timelane-border-color-normal);border-bottom:1px solid var(--timelane-border-color-normal);overflow:hidden;font-size:1em;height:30px;line-height:30px;text-align:center;cursor:pointer}.timelane .timelane-header .timelane-header-weeks .timelane-header-week-label:hover{background:var(--timelane-hover-color)}.timelane .timelane-header .timelane-header-days{display:flex;flex-flow:row nowrap}.timelane .timelane-header .timelane-header-days .timelane-header-day-label{border-right:1px solid var(--timelane-border-color-normal);overflow:hidden;font-size:.8em;height:20px;line-height:20px;text-align:center;cursor:pointer}.timelane .timelane-header .timelane-header-days .timelane-header-day-label:hover{background:var(--timelane-hover-color)}.timelane .timelane-header .timelane-header-days .timelane-header-day-label.timelane-header-day-label-focused{background:var(--timelane-focused-color)}.timelane .timelane-header-corner{z-index:102;background:#fff}.timelane .timelane-body{z-index:99;position:relative;width:fit-content}.timelane .timelane-body .timelane-lane{border-color:var(--timelane-border-color-normal)!important;border-top:1px solid gray;margin-top:-1px;overflow:hidden}.timelane .timelane-body .timelane-lane .timelane-drop-target{position:relative;width:100%;height:100%}.timelane .timelane-body .timelane-lane .timelane-drop-target .timelane-item{position:absolute;cursor:pointer;border-radius:3px;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.timelane .timelane-body .timelane-lane .timelane-drop-target .timelane-item.timelane-item-marked .timelane-allocation{border:2px dashed rgba(0,0,0,.5)}.timelane .timelane-body .timelane-lane .timelane-drop-target .timelane-item .timelane-item-drag-handle{height:100%}.timelane .timelane-body .timelane-lane .timelane-drop-target .timelane-item .timelane-item-resize-handle{background:#bed7dc;border-radius:5px;top:4px!important;bottom:4px!important;height:auto!important;width:6px!important;z-index:2;background:transparent!important;transition:.2s}.timelane .timelane-body .timelane-lane .timelane-drop-target .timelane-item .timelane-item-resize-handle:hover{background:#0000001a!important}.timelane .timelane-body .timelane-lane .timelane-drop-target .timelane-item .timelane-item-resize-handle.timelane-item-resize-handle-left{left:0!important;margin-left:1px}.timelane .timelane-body .timelane-lane .timelane-drop-target .timelane-item .timelane-item-resize-handle.timelane-item-resize-handle-right{right:0!important}.timelane .timelane-body .timelane-lane .timelane-drop-target .timelane-item .timelane-allocation{background:#92a8d1;border-radius:2px;border:2px solid transparent;height:calc(100% - 1px);overflow:hidden;cursor:pointer;padding:0 4px;margin-left:1px;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;container-type:size;container-name:timelane-allocation}.timelane .timelane-body .timelane-lane .timelane-drop-target .timelane-item .timelane-allocation .timelane-allocation-title{font-weight:700;transform-origin:top left;line-height:30px;white-space:nowrap}@container timelane-allocation (max-height: 30px){.timelane .timelane-body .timelane-lane .timelane-drop-target .timelane-item .timelane-allocation .timelane-allocation-title{margin:0}}.timelane .timelane-body .timelane-lane .timelane-drop-target .timelane-item .timelane-allocation.timelane-allocation-selected{border:2px dashed rgba(0,0,0,.5)}.timelane .timelane-body .timelane-lane .timelane-drop-target .timelane-item.dragging{opacity:0}.timelane .timelane-body .timelane-lane .timelane-drop-target .timelane-drop-preview{background:#00f;position:absolute;border-radius:2px;color:#fff}.timelane .timelane-body .timelane-lane.timelane-row-focused{background:var(--timelane-focused-color)}.timelane .timelane-aside{width:var(--timelane-aside-width);background:#fff}.timelane .timelane-aside .timelane-aside-lane-header{border-top:1px solid var(--timelane-border-color-normal);margin-top:-1px;padding:10px;overflow:hidden;position:relative;cursor:pointer}.timelane .timelane-aside .timelane-aside-lane-header.timelane-aside-lane-header-focused{background:var(--timelane-focused-color)}.timelane .timelane-aside .timelane-aside-lane-header:hover .timelane-aside-resource-menu{opacity:1}.timelane .timelane-aside .timelane-aside-lane-header .timelane-aside-resource-menu{position:absolute;top:5px;right:5px;opacity:0;transition:.15s}.timelane .timelane-aside .timelane-aside-lane-header .timelane-aside-resource-menu.timelane-aside-resource-menu-open{opacity:1}.timelane .timelane-background{position:relative;width:100%;height:100%}.timelane .timelane-background .timelane-background-inner{display:flex;flex-flow:row nowrap;height:100%}.timelane .timelane-background .timelane-background-inner .timelane-background-day-label{border-right:1px solid var(--timelane-border-color-light);overflow:hidden;font-size:.8em;height:100%;z-index:-100}.timelane .timelane-background .timelane-background-inner .timelane-background-day-label.timelane-background-day-label-sunday{border-right:1px solid var(--timelane-border-color-normal)}.timelane .timelane-background .timelane-background-inner .timelane-background-day-label.timelane-background-day-label-focused{background:var(--timelane-focused-color)}.timelane .timelane-background .timelane-background-inner .timelane-background-focused-day-position{position:absolute;height:100%;background:var(--timelane-focused-color);z-index:-101}.timelane-header-tooltip,.timelane-header-day-tooltip{font-size:2em}