@revolist/ui 4.0.1-rc → 4.0.2-rc

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 (218) hide show
  1. package/README.md +6 -5
  2. package/_chunks/calendar-CpaUK7w1.js +248 -0
  3. package/_chunks/chart-frame-BC99KjGa.js +127 -0
  4. package/_chunks/choice-chips-Cs4D-3nH.js +110 -0
  5. package/_chunks/{color-palette-BmZ7kH9R.js → color-palette-BBMFmUNA.js} +41 -41
  6. package/_chunks/color-picker-D90Jg-M8.js +138 -0
  7. package/_chunks/compat.module-DDB2pm9O.js +229 -0
  8. package/_chunks/component-YDcfoOLz.js +859 -0
  9. package/_chunks/{control-tooltip-BCNzQCXE.js → control-tooltip-ztgmsG7H.js} +29 -29
  10. package/_chunks/{controller-CmLo-Ajc.js → controller-hRBm_Lfz.js} +15 -15
  11. package/_chunks/{controls-NEL5tDaz.js → controls-DIum-E66.js} +192 -192
  12. package/_chunks/{date-control-CYCkb1aQ.js → date-control-BJSzu79z.js} +21 -21
  13. package/_chunks/date-time-BxPJusp9.js +770 -0
  14. package/_chunks/{delete-button-DnpmDNEJ.js → delete-button-Bblyah10.js} +1 -1
  15. package/_chunks/dialog.parts-DBqo3Qwb.js +134 -0
  16. package/_chunks/{dropdown-CkGQBm1Q.js → dropdown-voWqmwAe.js} +102 -102
  17. package/_chunks/duration-87U2EoMS.js +271 -0
  18. package/_chunks/editor-commit-Bq3wSgvr.js +12 -0
  19. package/_chunks/{editor-popup-B7fu_A_T.js → editor-popup-D3JdS8l3.js} +8 -8
  20. package/_chunks/framework-mount-C-Zwm44H.js +54 -0
  21. package/_chunks/hooks.module-CG3gN83z.js +157 -0
  22. package/_chunks/jsxRuntime.module-F6UFnpT-.js +30 -0
  23. package/_chunks/mount-DZe_6VtR.js +90 -0
  24. package/_chunks/native.view-ByyZ1CT5.js +32 -0
  25. package/_chunks/{number-input-NnH57J4j.js → number-input-BeIadZuL.js} +89 -89
  26. package/_chunks/picker-DpP7iQLA.js +122 -0
  27. package/_chunks/preact.module-BBM36DnO.js +290 -0
  28. package/_chunks/{rating-choice-CWAsNQNS.js → rating-choice-Ca8ZBty3.js} +10 -10
  29. package/_chunks/reorder-list-Cc3KmfAN.js +59 -0
  30. package/_chunks/request-trail-IdNiFvKH.js +347 -0
  31. package/_chunks/{rich-text-2Rla349o.js → rich-text-BzI1DyfF.js} +167 -167
  32. package/_vendor/preact/LICENSE +21 -0
  33. package/_vendor/preact/compat/src/index.d.ts +353 -0
  34. package/_vendor/preact/compat/src/suspense-list.d.ts +16 -0
  35. package/_vendor/preact/compat/src/suspense.d.ts +19 -0
  36. package/_vendor/preact/hooks/src/index.d.ts +145 -0
  37. package/_vendor/preact/src/dom.d.ts +2548 -0
  38. package/_vendor/preact/src/index.d.ts +373 -0
  39. package/_vendor/preact/src/jsx.d.ts +2958 -0
  40. package/activity-message.d.ts +1 -1
  41. package/activity-message.js +16 -16
  42. package/ai/components.d.ts +1 -1
  43. package/ai/index.js +2 -2
  44. package/ai/request-trail.d.ts +1 -1
  45. package/ai/translation-context.d.ts +1 -1
  46. package/alert.d.ts +2 -2
  47. package/assignee/field.d.ts +2 -2
  48. package/assignee/index.js +87 -87
  49. package/assignee/layout.d.ts +2 -2
  50. package/assignee/picker.d.ts +1 -1
  51. package/avatar/index.js +25 -25
  52. package/avatar/index.view.d.ts +1 -1
  53. package/brush-range/component.d.ts +1 -1
  54. package/brush-range/component.js +30 -30
  55. package/buttons/delete-button.js +1 -1
  56. package/buttons/remove-button.d.ts +1 -1
  57. package/buttons/remove-button.js +3 -3
  58. package/buttons/svg-button.d.ts +1 -1
  59. package/buttons/svg-button.js +35 -35
  60. package/calendar/calendar.d.ts +1 -1
  61. package/calendar/calendar.js +1 -1
  62. package/calendar/caption.d.ts +1 -1
  63. package/calendar/day.d.ts +1 -1
  64. package/calendar/day.js +4 -4
  65. package/calendar/header.d.ts +1 -1
  66. package/calendar/header.js +35 -35
  67. package/calendar/index.js +2 -2
  68. package/calendar/month-grid.d.ts +1 -1
  69. package/calendar/month-grid.js +37 -37
  70. package/calendar/picker.d.ts +1 -1
  71. package/calendar/types.d.ts +1 -1
  72. package/calendar/year-grid.d.ts +1 -1
  73. package/calendar/year-grid.js +12 -12
  74. package/checkbox/index.d.ts +2 -2
  75. package/checkbox/index.js +9 -9
  76. package/choice-chips/index.d.ts +1 -1
  77. package/choice-chips/index.js +1 -1
  78. package/color-palette/color-palette.d.ts +1 -1
  79. package/color-palette/color-palette.js +1 -1
  80. package/color-palette/color-picker.d.ts +1 -1
  81. package/color-palette/color-picker.js +2 -2
  82. package/component-catalog.d.ts +19 -19
  83. package/control-presentation.js +18 -18
  84. package/controls.d.ts +4 -4
  85. package/controls.js +1 -1
  86. package/core/editor-commit.d.ts +1 -1
  87. package/core/editor-popup.d.ts +1 -1
  88. package/core/editor-popup.js +1 -1
  89. package/date-time/date-control.d.ts +1 -1
  90. package/date-time/field.d.ts +2 -2
  91. package/date-time/index.js +1 -1
  92. package/date-time/picker.d.ts +1 -1
  93. package/date-time/time-control.d.ts +1 -1
  94. package/date-time/time-selection.d.ts +1 -1
  95. package/date-time/types.d.ts +1 -1
  96. package/dialog/dialog-action-footer.view.d.ts +1 -1
  97. package/dialog/dialog.dom.js +52 -52
  98. package/dialog/dialog.parts.d.ts +18 -18
  99. package/dialog/dialog.parts.js +1 -1
  100. package/dialog/dialog.preact.d.ts +1 -1
  101. package/dialog/dialog.preact.js +6 -6
  102. package/distribution-chart/area-chart.d.ts +1 -1
  103. package/distribution-chart/area-chart.js +25 -25
  104. package/distribution-chart/bar-chart.d.ts +1 -1
  105. package/distribution-chart/bar-chart.js +6 -6
  106. package/distribution-chart/chart-frame.d.ts +1 -1
  107. package/distribution-chart/index.d.ts +1 -1
  108. package/distribution-chart/index.js +6 -6
  109. package/distribution-chart/line-chart.d.ts +1 -1
  110. package/distribution-chart/line-chart.js +9 -9
  111. package/distribution-chart/types.d.ts +1 -1
  112. package/dropdown/content.d.ts +1 -1
  113. package/dropdown/content.js +83 -82
  114. package/dropdown/dropdown.service.d.ts +1 -1
  115. package/dropdown/dropdown.service.js +9 -9
  116. package/dropdown/index.js +1 -1
  117. package/dropdown/lookup-field.d.ts +1 -1
  118. package/dropdown/lookup-field.js +41 -41
  119. package/dropdown/popup.d.ts +1 -1
  120. package/dropdown/popup.js +17 -16
  121. package/duration/controls.d.ts +1 -1
  122. package/duration/index.d.ts +2 -2
  123. package/duration/index.js +1 -1
  124. package/editor-actions.d.ts +1 -1
  125. package/editor-actions.js +21 -20
  126. package/editor-layout/index.d.ts +1 -1
  127. package/editor-layout/index.js +27 -27
  128. package/field-configurator.d.ts +1 -1
  129. package/field-configurator.js +93 -93
  130. package/field-reorder.hook.js +32 -32
  131. package/filter/filters/slider/preact.js +3 -3
  132. package/filter/filters/slider/single.d.ts +1 -1
  133. package/filter/filters/slider/single.js +23 -23
  134. package/filter-badge.d.ts +1 -1
  135. package/filter-badge.js +23 -22
  136. package/filter-controls.d.ts +1 -1
  137. package/filter-controls.js +31 -31
  138. package/form-controls/index.js +20 -20
  139. package/form-controls/presentation.d.ts +1 -1
  140. package/form-controls/presentation.js +44 -44
  141. package/formatting/comparison-preview.d.ts +1 -1
  142. package/formatting/control-tooltip.d.ts +1 -1
  143. package/formatting/icon-controls.d.ts +1 -1
  144. package/formatting/index.js +99 -98
  145. package/formatting/inspector-section.d.ts +1 -1
  146. package/formatting/typography-controls.d.ts +1 -1
  147. package/framework-mount.d.ts +1 -1
  148. package/framework.js +19 -19
  149. package/icons/icon.d.ts +1 -1
  150. package/icons/icon.js +1 -1
  151. package/legend.d.ts +1 -1
  152. package/legend.js +12 -12
  153. package/masked-input/index.d.ts +1 -1
  154. package/masked-input/index.js +109 -109
  155. package/native-control.d.ts +11 -11
  156. package/native-control.js +12 -12
  157. package/native.js +39 -39
  158. package/number-input/index.d.ts +1 -1
  159. package/number-input/index.js +1 -1
  160. package/package.json +1 -2
  161. package/pdf-viewer/component.d.ts +1 -1
  162. package/pdf-viewer/controller.js +1 -1
  163. package/pdf-viewer/header.d.ts +1 -1
  164. package/pdf-viewer/index.js +13 -13
  165. package/pdf-viewer/search-bar.d.ts +1 -1
  166. package/pdf-viewer/status.d.ts +1 -1
  167. package/pdf-viewer/toolbar.d.ts +1 -1
  168. package/pickers.d.ts +1 -1
  169. package/preact-mount.d.ts +1 -1
  170. package/preact-mount.js +1 -1
  171. package/preact.js +14 -14
  172. package/rating-choice.d.ts +1 -1
  173. package/rating-choice.js +1 -1
  174. package/react-adapter.d.ts +1 -1
  175. package/react.js +19 -19
  176. package/reorder-list.d.ts +1 -1
  177. package/reorder-list.js +1 -1
  178. package/resource-picker/resource-picker-avatar.d.ts +1 -1
  179. package/resource-picker/resource-picker-avatar.js +14 -14
  180. package/resource-picker/resource-picker-option.d.ts +1 -1
  181. package/resource-picker/resource-picker-option.js +28 -28
  182. package/resource-picker/resource-picker-popup.d.ts +1 -1
  183. package/resource-picker/resource-picker-popup.js +3 -3
  184. package/resource-picker/resource-picker.d.ts +1 -1
  185. package/resource-picker/resource-picker.js +88 -88
  186. package/rich-text/index.d.ts +1 -1
  187. package/rich-text/index.js +1 -1
  188. package/rich-text/toolbar.d.ts +1 -1
  189. package/search-input/index.js +12 -12
  190. package/segmented-switch/index.d.ts +1 -1
  191. package/segmented-switch/index.js +1 -1
  192. package/status-feedback/render.d.ts +2 -2
  193. package/status-feedback/render.js +13 -13
  194. package/surfaces.js +34 -34
  195. package/svelte.js +2 -2
  196. package/switch/index.js +15 -15
  197. package/time-grid.d.ts +1 -1
  198. package/time-grid.js +58 -58
  199. package/timeline-track/component.d.ts +1 -1
  200. package/timeline-track/index.js +75 -75
  201. package/vue-adapter.d.ts +1 -1
  202. package/vue.d.ts +116 -116
  203. package/vue.js +121 -121
  204. package/_chunks/calendar-BsDxCYhI.js +0 -248
  205. package/_chunks/chart-frame-BvxbmEU9.js +0 -126
  206. package/_chunks/choice-chips-0HfOnK_4.js +0 -110
  207. package/_chunks/color-picker-BRv-__AM.js +0 -138
  208. package/_chunks/component-D4PH5UZT.js +0 -859
  209. package/_chunks/date-time-DjucJmbc.js +0 -769
  210. package/_chunks/dialog.parts-Dt3KinUz.js +0 -134
  211. package/_chunks/duration-BCaktcvz.js +0 -270
  212. package/_chunks/editor-commit-D6Rf5rGz.js +0 -12
  213. package/_chunks/framework-mount-BKIOsvY-.js +0 -54
  214. package/_chunks/mount-0-8opf1j.js +0 -90
  215. package/_chunks/native.view-8q_nwQ7x.js +0 -32
  216. package/_chunks/picker-oazJ7sO_.js +0 -121
  217. package/_chunks/reorder-list-BV3kZXso.js +0 -59
  218. package/_chunks/request-trail-D0oVzdRd.js +0 -347
package/switch/index.js CHANGED
@@ -1,26 +1,26 @@
1
- import { jsx as e, jsxs as t } from "preact/jsx-runtime";
1
+ import { t as e } from "../_chunks/jsxRuntime.module-F6UFnpT-.js";
2
2
  //#region src/switch/index.tsx
3
- function n({ checked: n, onChange: r, label: i, ariaLabel: a, className: o = "", disabled: s = !1, labelPosition: c = "before", title: l, testId: u }) {
4
- let d = /* @__PURE__ */ e("span", {
3
+ function t({ checked: t, onChange: n, label: r, ariaLabel: i, className: a = "", disabled: o = !1, labelPosition: s = "before", title: c, testId: l }) {
4
+ let u = /* @__PURE__ */ e("span", {
5
5
  class: "rv-switch-label",
6
- children: i
7
- }), f = /* @__PURE__ */ e("span", {
6
+ children: r
7
+ }), d = /* @__PURE__ */ e("span", {
8
8
  class: "rv-switch-track",
9
9
  "aria-hidden": "true",
10
10
  children: /* @__PURE__ */ e("span", { class: "rv-switch-thumb" })
11
11
  });
12
- return /* @__PURE__ */ t("button", {
12
+ return /* @__PURE__ */ e("button", {
13
13
  type: "button",
14
- class: `rv-switch ${o}`.trim(),
14
+ class: `rv-switch ${a}`.trim(),
15
15
  role: "switch",
16
- "aria-checked": n,
17
- "aria-label": a ?? (typeof i == "string" ? i : void 0),
18
- disabled: s,
19
- title: l,
20
- "data-testid": u,
21
- onClick: () => r(!n),
22
- children: [c === "before" ? d : f, c === "before" ? f : d]
16
+ "aria-checked": t,
17
+ "aria-label": i ?? (typeof r == "string" ? r : void 0),
18
+ disabled: o,
19
+ title: c,
20
+ "data-testid": l,
21
+ onClick: () => n(!t),
22
+ children: [s === "before" ? u : d, s === "before" ? d : u]
23
23
  });
24
24
  }
25
25
  //#endregion
26
- export { n as Switch };
26
+ export { t as Switch };
package/time-grid.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { h, RefObject } from 'preact';
1
+ import { h, RefObject } from './_vendor/preact/src/index';
2
2
  export interface TimeGridWorkingHours {
3
3
  readonly startHour: number;
4
4
  readonly endHour: number;
package/time-grid.js CHANGED
@@ -1,80 +1,80 @@
1
- import { ButtonControl as e } from "./native-control.js";
2
- import { useLayoutEffect as t, useRef as n } from "preact/hooks";
3
- import { jsx as r, jsxs as i } from "preact/jsx-runtime";
1
+ import { r as e, t } from "./_chunks/hooks.module-CG3gN83z.js";
2
+ import { t as n } from "./_chunks/jsxRuntime.module-F6UFnpT-.js";
3
+ import { ButtonControl as r } from "./native-control.js";
4
4
  //#region src/time-grid.tsx
5
- var a = (e, t) => `${e}:${t}`;
6
- function o(e) {
5
+ var i = (e, t) => `${e}:${t}`;
6
+ function a(e) {
7
7
  return [
8
8
  "rv-time-grid__cell",
9
9
  e.weekend && "is-weekend",
10
10
  e.outsideWorkHours && "is-outside-work-hours"
11
11
  ].filter(Boolean).join(" ");
12
12
  }
13
- function s(t) {
14
- let n = (e) => `rv-time-grid__${e}${t.legacyClassPrefix ? ` ${t.legacyClassPrefix}__${e}` : ""}`, s = Array.from({ length: 12 }, (e, t) => t * 2);
15
- return /* @__PURE__ */ i("div", {
16
- class: n("schedule"),
17
- children: [/* @__PURE__ */ i("div", {
18
- class: n("hours"),
13
+ function o(e) {
14
+ let t = (t) => `rv-time-grid__${t}${e.legacyClassPrefix ? ` ${e.legacyClassPrefix}__${t}` : ""}`, o = Array.from({ length: 12 }, (e, t) => t * 2);
15
+ return /* @__PURE__ */ n("div", {
16
+ class: t("schedule"),
17
+ children: [/* @__PURE__ */ n("div", {
18
+ class: t("hours"),
19
19
  "aria-hidden": "true",
20
- children: [/* @__PURE__ */ r("span", {}), s.map((e) => /* @__PURE__ */ r("span", {
21
- class: n("hour"),
22
- children: t.hourLabel(e)
23
- }, e))]
24
- }), /* @__PURE__ */ r("div", {
25
- ref: t.matrixRef,
26
- class: n("matrix"),
20
+ children: [/* @__PURE__ */ n("span", {}), o.map((r) => /* @__PURE__ */ n("span", {
21
+ class: t("hour"),
22
+ children: e.hourLabel(r)
23
+ }, r))]
24
+ }), /* @__PURE__ */ n("div", {
25
+ ref: e.matrixRef,
26
+ class: t("matrix"),
27
27
  role: "grid",
28
- "aria-label": t.gridLabel,
29
- "aria-rowcount": t.days.length,
28
+ "aria-label": e.gridLabel,
29
+ "aria-rowcount": e.days.length,
30
30
  "aria-colcount": 12,
31
- children: t.days.map((c) => {
32
- let { weekday: l, short: u, long: d } = c, f = t.weekendDays.includes(l);
33
- return /* @__PURE__ */ i("div", {
34
- class: `${n("row")}${f ? " is-weekend" : ""}`,
31
+ children: e.days.map((s) => {
32
+ let { weekday: c, short: l, long: u } = s, d = e.weekendDays.includes(c);
33
+ return /* @__PURE__ */ n("div", {
34
+ class: `${t("row")}${d ? " is-weekend" : ""}`,
35
35
  role: "row",
36
- children: [/* @__PURE__ */ r("span", {
37
- class: n("weekday"),
36
+ children: [/* @__PURE__ */ n("span", {
37
+ class: t("weekday"),
38
38
  role: "rowheader",
39
- title: d,
40
- children: u
41
- }), s.map((n) => {
42
- let i = a(l, n), s = t.cells.has(i) || t.cells.has(a(l, n + 1)), u = t.workingHours ? n < t.workingHours.startHour || n + 2 > t.workingHours.endHour : !1;
43
- return /* @__PURE__ */ r(e, {
39
+ title: u,
40
+ children: l
41
+ }), o.map((t) => {
42
+ let o = i(c, t), l = e.cells.has(o) || e.cells.has(i(c, t + 1)), u = e.workingHours ? t < e.workingHours.startHour || t + 2 > e.workingHours.endHour : !1;
43
+ return /* @__PURE__ */ n(r, {
44
44
  type: "button",
45
- disabled: t.disabled,
45
+ disabled: e.disabled,
46
46
  role: "gridcell",
47
- "data-time-cell": i,
48
- class: `${o({
49
- weekend: f,
47
+ "data-time-cell": o,
48
+ class: `${a({
49
+ weekend: d,
50
50
  outsideWorkHours: u
51
- })} ${t.legacyClassPrefix ? `${t.legacyClassPrefix}__cell` : ""}`,
52
- "aria-selected": s,
53
- "aria-label": t.cellLabel(c, t.hourLabel(n), t.hourLabel(n + 2), s),
54
- tabIndex: t.focused === i ? 0 : -1,
55
- onFocus: () => t.onFocus(i),
56
- onKeyDown: (e) => t.onKeyDown(e, l, n),
57
- onClick: (e) => t.onClick(e, l, n, s),
58
- onPointerDown: (e) => t.onPointerDown(e, l, n, s),
59
- onPointerEnter: () => t.onPointerEnter(l, n)
60
- }, i);
51
+ })} ${e.legacyClassPrefix ? `${e.legacyClassPrefix}__cell` : ""}`,
52
+ "aria-selected": l,
53
+ "aria-label": e.cellLabel(s, e.hourLabel(t), e.hourLabel(t + 2), l),
54
+ tabIndex: e.focused === o ? 0 : -1,
55
+ onFocus: () => e.onFocus(o),
56
+ onKeyDown: (n) => e.onKeyDown(n, c, t),
57
+ onClick: (n) => e.onClick(n, c, t, l),
58
+ onPointerDown: (n) => e.onPointerDown(n, c, t, l),
59
+ onPointerEnter: () => e.onPointerEnter(c, t)
60
+ }, o);
61
61
  })]
62
- }, l);
62
+ }, c);
63
63
  })
64
64
  })]
65
65
  });
66
66
  }
67
- function c(e) {
68
- let r = n(e);
69
- r.current = e;
70
- let i = n(), o = n(), s = n(), c = () => {
67
+ function s(n) {
68
+ let r = t(n);
69
+ r.current = n;
70
+ let a = t(), o = t(), s = t(), c = () => {
71
71
  o.current?.(), o.current = void 0;
72
72
  };
73
- t(() => () => {
74
- i.current = void 0, c(), s.current !== void 0 && cancelAnimationFrame(s.current);
73
+ e(() => () => {
74
+ a.current = void 0, c(), s.current !== void 0 && cancelAnimationFrame(s.current);
75
75
  }, []);
76
76
  let l = (e, t) => {
77
- let n = a(e, t);
77
+ let n = i(e, t);
78
78
  r.current.onFocus(n), s.current !== void 0 && cancelAnimationFrame(s.current), s.current = requestAnimationFrame(() => r.current.matrixRef.current?.querySelector(`[data-time-cell="${n}"]`)?.focus());
79
79
  };
80
80
  return {
@@ -97,18 +97,18 @@ function c(e) {
97
97
  },
98
98
  onPointerDown: (e, t, n, s) => {
99
99
  if (r.current.disabled || e.button !== 0) return;
100
- e.preventDefault(), c(), i.current = { selected: !s };
100
+ e.preventDefault(), c(), a.current = { selected: !s };
101
101
  let l = e.currentTarget.ownerDocument, u = () => {
102
- i.current && (i.current = void 0, c(), r.current.onCommit());
102
+ a.current && (a.current = void 0, c(), r.current.onCommit());
103
103
  };
104
104
  l.addEventListener("pointerup", u), l.addEventListener("pointercancel", u), o.current = () => {
105
105
  l.removeEventListener("pointerup", u), l.removeEventListener("pointercancel", u);
106
- }, r.current.onPaint(t, n, !s), r.current.onFocus(a(t, n));
106
+ }, r.current.onPaint(t, n, !s), r.current.onFocus(i(t, n));
107
107
  },
108
108
  onPointerEnter: (e, t) => {
109
- i.current && !r.current.disabled && r.current.onPaint(e, t, i.current.selected);
109
+ a.current && !r.current.disabled && r.current.onPaint(e, t, a.current.selected);
110
110
  }
111
111
  };
112
112
  }
113
113
  //#endregion
114
- export { s as TimeGrid, a as timeGridCellKey, c as useTimeGridInteraction };
114
+ export { o as TimeGrid, i as timeGridCellKey, s as useTimeGridInteraction };
@@ -20,4 +20,4 @@ export interface TimelineTrackProps<T extends TimelineTrackEvent> {
20
20
  readonly onEventChange: (id: string | number, event: T) => void;
21
21
  }
22
22
  /** Controlled numeric timeline. Changes preserve event metadata; consumers own commits. */
23
- export declare function TimelineTrack<T extends TimelineTrackEvent>({ rows, selected, range, labels, onSelect, onEventChange, }: TimelineTrackProps<T>): import("preact").JSX.Element;
23
+ export declare function TimelineTrack<T extends TimelineTrackEvent>({ rows, selected, range, labels, onSelect, onEventChange, }: TimelineTrackProps<T>): import("../_vendor/preact/src/index").JSX.Element;
@@ -1,139 +1,139 @@
1
- import { ButtonControl as e } from "../native-control.js";
2
- import { eventOutsideRange as t, moveTimelineEvent as n, niceTimelineStep as r, resizeTimelineEvent as i, timelineGeometry as a } from "./model.js";
3
- import { useRef as o } from "preact/hooks";
4
- import { jsx as s, jsxs as c } from "preact/jsx-runtime";
1
+ import { t as e } from "../_chunks/hooks.module-CG3gN83z.js";
2
+ import { t } from "../_chunks/jsxRuntime.module-F6UFnpT-.js";
3
+ import { ButtonControl as n } from "../native-control.js";
4
+ import { eventOutsideRange as r, moveTimelineEvent as i, niceTimelineStep as a, resizeTimelineEvent as o, timelineGeometry as s } from "./model.js";
5
5
  //#region src/timeline-track/component.tsx
6
- var l = {
6
+ var c = {
7
7
  preview: "Timeline preview",
8
8
  moveEvent: (e) => `Move event ${e}`,
9
9
  resizeStart: (e) => `Resize start of ${e}`,
10
10
  resizeEnd: (e) => `Resize end of ${e}`
11
11
  };
12
- function u({ rows: u, selected: d, range: f, labels: p, onSelect: m, onEventChange: h }) {
13
- let g = {
14
- ...l,
15
- ...p
16
- }, _ = o(), v = (e, t, n) => {
12
+ function l({ rows: l, selected: u, range: d, labels: f, onSelect: p, onEventChange: m }) {
13
+ let h = {
14
+ ...c,
15
+ ...f
16
+ }, g = e(), _ = (e, t, n) => {
17
17
  let r = e.currentTarget.closest(".rv-timeline-control__track");
18
- r && (e.preventDefault(), e.currentTarget.setPointerCapture?.(e.pointerId), _.current = {
18
+ r && (e.preventDefault(), e.currentTarget.setPointerCapture?.(e.pointerId), g.current = {
19
19
  id: t.id,
20
20
  mode: n,
21
21
  clientX: e.clientX,
22
22
  event: t.event,
23
23
  width: r.getBoundingClientRect().width
24
- }, m(t.id));
25
- }, y = (e) => {
26
- let t = _.current;
24
+ }, p(t.id));
25
+ }, v = (e) => {
26
+ let t = g.current;
27
27
  if (!t) return;
28
- let a = r(f), o = (e.clientX - t.clientX) / Math.max(1, t.width) * (f.end - f.start), s = Math.round(o / a) * a, c = t.mode === "move" ? n(t.event, s, f) : i(t.event, t.mode, s, f);
29
- h(t.id, c);
30
- }, b = () => {
31
- _.current = void 0;
32
- }, x = (e, t, a) => {
28
+ let n = a(d), r = (e.clientX - t.clientX) / Math.max(1, t.width) * (d.end - d.start), s = Math.round(r / n) * n, c = t.mode === "move" ? i(t.event, s, d) : o(t.event, t.mode, s, d);
29
+ m(t.id, c);
30
+ }, y = () => {
31
+ g.current = void 0;
32
+ }, b = (e, t, n) => {
33
33
  if (e.key !== "ArrowLeft" && e.key !== "ArrowRight") return;
34
34
  e.preventDefault();
35
- let o = r(f) * (e.key === "ArrowLeft" ? -1 : 1);
36
- h(t.id, a === "move" ? n(t.event, o, f) : i(t.event, a, o, f));
35
+ let r = a(d) * (e.key === "ArrowLeft" ? -1 : 1);
36
+ m(t.id, n === "move" ? i(t.event, r, d) : o(t.event, n, r, d));
37
37
  };
38
- return /* @__PURE__ */ c("div", {
38
+ return /* @__PURE__ */ t("div", {
39
39
  class: "rv-timeline-editor__track rv-timeline-control__track",
40
40
  role: "group",
41
- "aria-label": g.preview,
41
+ "aria-label": h.preview,
42
42
  children: [
43
- /* @__PURE__ */ s("span", {
43
+ /* @__PURE__ */ t("span", {
44
44
  class: "rv-timeline-editor__range rv-timeline-editor__range--start rv-timeline-control__range rv-timeline-control__range--start",
45
- children: f.start
45
+ children: d.start
46
46
  }),
47
- /* @__PURE__ */ s("span", {
47
+ /* @__PURE__ */ t("span", {
48
48
  class: "rv-timeline-editor__range rv-timeline-editor__range--end rv-timeline-control__range rv-timeline-control__range--end",
49
- children: f.end
49
+ children: d.end
50
50
  }),
51
- u.map((e, t) => ({
51
+ l.map((e, t) => ({
52
52
  row: e,
53
53
  index: t
54
- })).filter(({ row: e }) => Number.isFinite(e.event.start) && Number.isFinite(e.event.end) && e.event.end >= e.event.start).map(({ row: n, index: r }) => {
55
- let i = a(n.event, f), o = t(n.event, f), l = n.event.label || g.moveEvent(r + 1);
56
- return /* @__PURE__ */ c("div", {
54
+ })).filter(({ row: e }) => Number.isFinite(e.event.start) && Number.isFinite(e.event.end) && e.event.end >= e.event.start).map(({ row: e, index: i }) => {
55
+ let a = s(e.event, d), o = r(e.event, d), c = e.event.label || h.moveEvent(i + 1);
56
+ return /* @__PURE__ */ t("div", {
57
57
  class: [
58
58
  "rv-timeline-editor__bar rv-timeline-control__bar",
59
- d === n.id ? "rv-timeline-editor__bar--selected rv-timeline-control__bar--selected" : "",
60
- n.event.start === n.event.end ? "rv-timeline-editor__bar--milestone rv-timeline-control__bar--milestone" : "",
59
+ u === e.id ? "rv-timeline-editor__bar--selected rv-timeline-control__bar--selected" : "",
60
+ e.event.start === e.event.end ? "rv-timeline-editor__bar--milestone rv-timeline-control__bar--milestone" : "",
61
61
  o ? "rv-timeline-editor__bar--outside rv-timeline-control__bar--outside" : ""
62
62
  ].filter(Boolean).join(" "),
63
63
  style: {
64
- left: `${i.left}%`,
65
- width: `${i.width}%`
64
+ left: `${a.left}%`,
65
+ width: `${a.width}%`
66
66
  },
67
67
  role: "group",
68
- "aria-label": l,
68
+ "aria-label": c,
69
69
  children: [
70
- /* @__PURE__ */ s(e, {
70
+ /* @__PURE__ */ t(n, {
71
71
  unstyled: !0,
72
72
  type: "button",
73
73
  class: "rv-timeline-editor__bar-move rv-timeline-control__bar-move",
74
- "data-autofocus": r === 0 ? "" : void 0,
75
- "aria-label": n.event.label ? `${g.moveEvent(r + 1)}: ${n.event.label}` : g.moveEvent(r + 1),
74
+ "data-autofocus": i === 0 ? "" : void 0,
75
+ "aria-label": e.event.label ? `${h.moveEvent(i + 1)}: ${e.event.label}` : h.moveEvent(i + 1),
76
76
  "aria-keyshortcuts": "ArrowLeft ArrowRight",
77
- onFocus: () => m(n.id),
78
- onPointerDown: (e) => v(e, n, "move"),
79
- onPointerMove: y,
80
- onPointerUp: b,
81
- onPointerCancel: b,
82
- onKeyDown: (e) => x(e, n, "move"),
83
- children: /* @__PURE__ */ s("span", {
77
+ onFocus: () => p(e.id),
78
+ onPointerDown: (t) => _(t, e, "move"),
79
+ onPointerMove: v,
80
+ onPointerUp: y,
81
+ onPointerCancel: y,
82
+ onKeyDown: (t) => b(t, e, "move"),
83
+ children: /* @__PURE__ */ t("span", {
84
84
  class: "rv-timeline-editor__bar-label rv-timeline-control__bar-label",
85
- children: n.event.label
85
+ children: e.event.label
86
86
  })
87
87
  }),
88
- /* @__PURE__ */ s(e, {
88
+ /* @__PURE__ */ t(n, {
89
89
  unstyled: !0,
90
90
  type: "button",
91
91
  class: "rv-timeline-editor__handle rv-timeline-editor__handle--start rv-timeline-control__handle rv-timeline-control__handle--start",
92
92
  role: "slider",
93
93
  "aria-orientation": "horizontal",
94
- "aria-label": g.resizeStart(l),
95
- "aria-valuemin": Math.min(f.start, n.event.start),
96
- "aria-valuemax": n.event.end,
97
- "aria-valuenow": n.event.start,
94
+ "aria-label": h.resizeStart(c),
95
+ "aria-valuemin": Math.min(d.start, e.event.start),
96
+ "aria-valuemax": e.event.end,
97
+ "aria-valuenow": e.event.start,
98
98
  "aria-keyshortcuts": "ArrowLeft ArrowRight",
99
- onFocus: () => m(n.id),
100
- onPointerDown: (e) => {
101
- e.stopPropagation(), v(e, n, "start");
99
+ onFocus: () => p(e.id),
100
+ onPointerDown: (t) => {
101
+ t.stopPropagation(), _(t, e, "start");
102
102
  },
103
- onPointerMove: y,
104
- onPointerUp: b,
105
- onPointerCancel: b,
106
- onKeyDown: (e) => {
107
- e.stopPropagation(), x(e, n, "start");
103
+ onPointerMove: v,
104
+ onPointerUp: y,
105
+ onPointerCancel: y,
106
+ onKeyDown: (t) => {
107
+ t.stopPropagation(), b(t, e, "start");
108
108
  }
109
109
  }),
110
- /* @__PURE__ */ s(e, {
110
+ /* @__PURE__ */ t(n, {
111
111
  unstyled: !0,
112
112
  type: "button",
113
113
  class: "rv-timeline-editor__handle rv-timeline-editor__handle--end rv-timeline-control__handle rv-timeline-control__handle--end",
114
114
  role: "slider",
115
115
  "aria-orientation": "horizontal",
116
- "aria-label": g.resizeEnd(l),
117
- "aria-valuemin": n.event.start,
118
- "aria-valuemax": Math.max(f.end, n.event.end),
119
- "aria-valuenow": n.event.end,
116
+ "aria-label": h.resizeEnd(c),
117
+ "aria-valuemin": e.event.start,
118
+ "aria-valuemax": Math.max(d.end, e.event.end),
119
+ "aria-valuenow": e.event.end,
120
120
  "aria-keyshortcuts": "ArrowLeft ArrowRight",
121
- onFocus: () => m(n.id),
122
- onPointerDown: (e) => {
123
- e.stopPropagation(), v(e, n, "end");
121
+ onFocus: () => p(e.id),
122
+ onPointerDown: (t) => {
123
+ t.stopPropagation(), _(t, e, "end");
124
124
  },
125
- onPointerMove: y,
126
- onPointerUp: b,
127
- onPointerCancel: b,
128
- onKeyDown: (e) => {
129
- e.stopPropagation(), x(e, n, "end");
125
+ onPointerMove: v,
126
+ onPointerUp: y,
127
+ onPointerCancel: y,
128
+ onKeyDown: (t) => {
129
+ t.stopPropagation(), b(t, e, "end");
130
130
  }
131
131
  })
132
132
  ]
133
- }, n.id);
133
+ }, e.id);
134
134
  })
135
135
  ]
136
136
  });
137
137
  }
138
138
  //#endregion
139
- export { u as TimelineTrack, t as eventOutsideRange, n as moveTimelineEvent, r as niceTimelineStep, i as resizeTimelineEvent, a as timelineGeometry };
139
+ export { l as TimelineTrack, r as eventOutsideRange, i as moveTimelineEvent, a as niceTimelineStep, o as resizeTimelineEvent, s as timelineGeometry };
package/vue-adapter.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { ComponentProps, ComponentType } from 'preact';
1
+ import { ComponentProps, ComponentType } from './_vendor/preact/src/index';
2
2
  import { DefineComponent } from 'vue';
3
3
  export interface VueAdapterOptions {
4
4
  /** Maps Vue's default v-model to the existing controlled component contract. */