@sia.soul/sia-react-ui 0.1.162 → 0.1.163

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 (35) hide show
  1. package/dist/chart.cjs +1 -1
  2. package/dist/chart.js +5 -5
  3. package/dist/{chunk-ZNPNZD6O.js → chunk-23FQ5ARA.js} +4 -4
  4. package/dist/{chunk-33WX54AU.js → chunk-2EC653G5.js} +5 -5
  5. package/dist/{chunk-WMZYYPIW.js → chunk-CUAXJCSH.js} +1 -1
  6. package/dist/{chunk-Q3LEK2TL.js → chunk-DKQ5UCN6.js} +58 -42
  7. package/dist/{chunk-KA3M4TE4.js → chunk-G5EJJFUI.js} +2 -2
  8. package/dist/{chunk-UL54A2YN.js → chunk-J6BPKBEL.js} +2 -2
  9. package/dist/{chunk-M4IASLGB.js → chunk-NHGCGOF2.js} +3 -3
  10. package/dist/{chunk-CRA7VNOA.js → chunk-OHAESA5R.js} +1 -1
  11. package/dist/{chunk-4B7ATL6J.js → chunk-PAWEP65C.js} +1 -1
  12. package/dist/{chunk-MXK6TKMO.js → chunk-SX4LLT3H.js} +5 -5
  13. package/dist/{chunk-5WZR2RHA.js → chunk-V4I32DPL.js} +2 -2
  14. package/dist/{chunk-UPXL2QLJ.js → chunk-WR5YBY2A.js} +6 -6
  15. package/dist/core.cjs +1 -1
  16. package/dist/core.css +81 -7
  17. package/dist/core.js +8 -8
  18. package/dist/game.cjs +1 -1
  19. package/dist/game.js +3 -3
  20. package/dist/index.cjs +55 -39
  21. package/dist/index.css +81 -7
  22. package/dist/index.d.cts +1 -1
  23. package/dist/index.d.ts +1 -1
  24. package/dist/index.js +12 -12
  25. package/dist/markdown-editor.cjs +1 -1
  26. package/dist/markdown-editor.js +3 -3
  27. package/dist/rich-text-editor.cjs +1 -1
  28. package/dist/rich-text-editor.js +7 -7
  29. package/dist/{select-date-range-Cbh37zmU.d.cts → select-date-range-C9lTBQFX.d.cts} +4 -4
  30. package/dist/{select-date-range-CIXBuoef.d.ts → select-date-range-CQCGGkkt.d.ts} +4 -4
  31. package/dist/select-date-range.cjs +55 -39
  32. package/dist/select-date-range.d.cts +1 -1
  33. package/dist/select-date-range.d.ts +1 -1
  34. package/dist/select-date-range.js +8 -8
  35. package/package.json +1 -1
package/dist/chart.cjs CHANGED
@@ -868,7 +868,7 @@ var PopupPortal = (0, import_react5.forwardRef)(function PopupPortal2({
868
868
  cancelAnimationFrame(frame);
869
869
  observer.disconnect();
870
870
  };
871
- }, [anchorRef, offset, motion.present, placement, viewportPadding]);
871
+ }, [anchorRef, offset, motion.present, placement, viewportPadding, position?.availableHeight, position?.placement]);
872
872
  if (!motion.present || typeof document === "undefined") return null;
873
873
  return (0, import_react_dom.createPortal)(
874
874
  /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
package/dist/chart.js CHANGED
@@ -56,11 +56,11 @@ import {
56
56
  smoothSvgPath,
57
57
  svgArcPath,
58
58
  transferCompositeValue
59
- } from "./chunk-M4IASLGB.js";
60
- import "./chunk-UL54A2YN.js";
61
- import "./chunk-4B7ATL6J.js";
62
- import "./chunk-CRA7VNOA.js";
63
- import "./chunk-WMZYYPIW.js";
59
+ } from "./chunk-NHGCGOF2.js";
60
+ import "./chunk-J6BPKBEL.js";
61
+ import "./chunk-PAWEP65C.js";
62
+ import "./chunk-OHAESA5R.js";
63
+ import "./chunk-CUAXJCSH.js";
64
64
  export {
65
65
  BarChart,
66
66
  CHART_VIEWBOX_HEIGHT,
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  TextArea
3
- } from "./chunk-UL54A2YN.js";
3
+ } from "./chunk-J6BPKBEL.js";
4
4
  import {
5
5
  Icon,
6
6
  Modal
7
- } from "./chunk-KA3M4TE4.js";
7
+ } from "./chunk-G5EJJFUI.js";
8
8
  import {
9
9
  Button
10
- } from "./chunk-4B7ATL6J.js";
10
+ } from "./chunk-PAWEP65C.js";
11
11
  import {
12
12
  FloatingScrollbarProvider,
13
13
  PopupPortal,
@@ -17,7 +17,7 @@ import {
17
17
  useControllableState,
18
18
  usePlaceholderMode,
19
19
  withTitleTooltip
20
- } from "./chunk-WMZYYPIW.js";
20
+ } from "./chunk-CUAXJCSH.js";
21
21
 
22
22
  // src/components/Navigation.tsx
23
23
  import { useEffect, useId, useLayoutEffect as useLayoutEffect3, useMemo, useRef as useRef3, useState, forwardRef } from "react";
@@ -1,19 +1,19 @@
1
1
  import {
2
2
  Dropdown,
3
3
  Input
4
- } from "./chunk-ZNPNZD6O.js";
4
+ } from "./chunk-23FQ5ARA.js";
5
5
  import {
6
6
  Icon
7
- } from "./chunk-KA3M4TE4.js";
7
+ } from "./chunk-G5EJJFUI.js";
8
8
  import {
9
9
  Button
10
- } from "./chunk-4B7ATL6J.js";
10
+ } from "./chunk-PAWEP65C.js";
11
11
  import {
12
12
  useFloatingPlaceholder
13
- } from "./chunk-CRA7VNOA.js";
13
+ } from "./chunk-OHAESA5R.js";
14
14
  import {
15
15
  withTitleTooltip
16
- } from "./chunk-WMZYYPIW.js";
16
+ } from "./chunk-CUAXJCSH.js";
17
17
 
18
18
  // src/components/RichTextEditor.tsx
19
19
  import { useEffect, useMemo, useRef, useState } from "react";
@@ -930,7 +930,7 @@ var PopupPortal = forwardRef(function PopupPortal2({
930
930
  cancelAnimationFrame(frame);
931
931
  observer.disconnect();
932
932
  };
933
- }, [anchorRef, offset, motion.present, placement, viewportPadding]);
933
+ }, [anchorRef, offset, motion.present, placement, viewportPadding, position?.availableHeight, position?.placement]);
934
934
  if (!motion.present || typeof document === "undefined") return null;
935
935
  return createPortal(
936
936
  /* @__PURE__ */ jsx2(
@@ -1,19 +1,19 @@
1
1
  import {
2
2
  Select
3
- } from "./chunk-MXK6TKMO.js";
3
+ } from "./chunk-SX4LLT3H.js";
4
4
  import {
5
5
  Icon
6
- } from "./chunk-KA3M4TE4.js";
6
+ } from "./chunk-G5EJJFUI.js";
7
7
  import {
8
8
  useFloatingPlaceholder
9
- } from "./chunk-CRA7VNOA.js";
9
+ } from "./chunk-OHAESA5R.js";
10
10
  import {
11
11
  FloatingScrollbarProvider,
12
12
  PopupPortal,
13
13
  useControlSize,
14
14
  useControllableState,
15
15
  withTitleTooltip
16
- } from "./chunk-WMZYYPIW.js";
16
+ } from "./chunk-CUAXJCSH.js";
17
17
 
18
18
  // src/components/DatePicker.tsx
19
19
  import { useEffect as useEffect2, useId, useLayoutEffect as useLayoutEffect2, useMemo, useRef as useRef2, useState } from "react";
@@ -154,10 +154,12 @@ function CalendarMonth({
154
154
  const rangeStart = Boolean(start && key === start);
155
155
  const rangeEnd = Boolean(range[1] && key === range[1]);
156
156
  const inRange = Boolean(low && high && key >= low && key <= high);
157
+ const segmentStart = inRange && (index % 7 === 0 || key === low);
158
+ const segmentEnd = inRange && (index % 7 === 6 || key === high);
157
159
  return /* @__PURE__ */ jsx(
158
160
  "span",
159
161
  {
160
- className: `sia-date-panel__cell${outside ? " is-outside" : ""}${selected ? " is-selected" : ""}${rangeStart ? " is-range-start" : ""}${rangeEnd ? " is-range-end" : ""}${inRange ? " is-in-range" : ""}${key === today ? " is-today" : ""}`,
162
+ className: `sia-date-panel__cell${outside ? " is-outside" : ""}${selected ? " is-selected" : ""}${rangeStart ? " is-range-start" : ""}${rangeEnd ? " is-range-end" : ""}${inRange ? " is-in-range" : ""}${segmentStart ? " is-range-segment-start" : ""}${segmentEnd ? " is-range-segment-end" : ""}${key === today ? " is-today" : ""}`,
161
163
  children: /* @__PURE__ */ jsx(
162
164
  "button",
163
165
  {
@@ -858,10 +860,10 @@ function DateRangePicker({
858
860
  }
859
861
  return () => observer.disconnect();
860
862
  });
861
- const [dateTimeView, setDateTimeView] = useState("date");
863
+ const [dateTimeViews, setDateTimeViews] = useState(["date", "date"]);
862
864
  const [hoverDate, setHoverDate] = useState("");
863
865
  const [viewMonth, setViewMonth] = useState(() => startOfMonth(parseDate(dayFromValue(currentValue[0] || currentValue[1])) ?? /* @__PURE__ */ new Date()));
864
- const [endViewMonth, setEndViewMonth] = useState(() => startOfMonth(parseDate(dayFromValue(currentValue[1])) ?? addMonths(parseDate(dayFromValue(currentValue[0])) ?? /* @__PURE__ */ new Date(), 1)));
866
+ const [endViewMonth, setEndViewMonth] = useState(() => startOfMonth(parseDate(dayFromValue(currentValue[1])) ?? (showTime ? parseDate(dayFromValue(currentValue[0])) ?? /* @__PURE__ */ new Date() : addMonths(parseDate(dayFromValue(currentValue[0])) ?? /* @__PURE__ */ new Date(), 1))));
865
867
  const showSecond = showSecondFrom(showTime);
866
868
  const defaultTime = defaultTimeFrom(showTime);
867
869
  const defaultEndTime = defaultTimeFrom(showTime, 1);
@@ -889,10 +891,10 @@ function DateRangePicker({
889
891
  setDraftValue(currentValue);
890
892
  setTimes([timePart(currentValue[0], defaultTime), timePart(currentValue[1], defaultEndTime)]);
891
893
  setActiveIndex(endpointDisabled[0] ? 1 : endpointDisabled[1] ? 0 : endpoint ?? (currentValue[0] && !currentValue[1] ? 1 : 0));
892
- setDateTimeView("date");
894
+ setDateTimeViews(["date", "date"]);
893
895
  const nextStartMonth = startOfMonth(parseDate(dayFromValue(currentValue[0] || currentValue[1])) ?? /* @__PURE__ */ new Date());
894
896
  setViewMonth(nextStartMonth);
895
- setEndViewMonth(startOfMonth(parseDate(dayFromValue(currentValue[1])) ?? addMonths(nextStartMonth, 1)));
897
+ setEndViewMonth(startOfMonth(parseDate(dayFromValue(currentValue[1])) ?? (showTime ? nextStartMonth : addMonths(nextStartMonth, 1))));
896
898
  }
897
899
  if (next && endpoint !== void 0 && !endpointDisabled[endpoint]) setActiveIndex(endpoint);
898
900
  setVisible(next);
@@ -961,13 +963,6 @@ function DateRangePicker({
961
963
  nextValue[index] = withTime(day, time, showSecond);
962
964
  updateDraft(nextValue);
963
965
  setHoverDate("");
964
- const otherIndex = index === 0 ? 1 : 0;
965
- if (!nextValue[otherIndex]) {
966
- setActiveIndex(otherIndex);
967
- const month = startOfMonth(parseDate(day) ?? /* @__PURE__ */ new Date());
968
- (otherIndex === 0 ? setViewMonth : setEndViewMonth)(month);
969
- return;
970
- }
971
966
  setActiveIndex(index);
972
967
  }
973
968
  function changeTime(index, nextTime) {
@@ -1020,7 +1015,7 @@ function DateRangePicker({
1020
1015
  setTimes([timePart(next[0], defaultTime), timePart(next[1], defaultEndTime)]);
1021
1016
  const nextStartMonth = startOfMonth(parseDate(dayFromValue(next[0] || next[1])) ?? /* @__PURE__ */ new Date());
1022
1017
  setViewMonth(nextStartMonth);
1023
- setEndViewMonth(startOfMonth(parseDate(dayFromValue(next[1])) ?? addMonths(nextStartMonth, 1)));
1018
+ setEndViewMonth(startOfMonth(parseDate(dayFromValue(next[1])) ?? (showTime ? nextStartMonth : addMonths(nextStartMonth, 1))));
1024
1019
  if (!resolvedNeedConfirm) {
1025
1020
  changeOpen(false);
1026
1021
  }
@@ -1060,6 +1055,43 @@ function DateRangePicker({
1060
1055
  )
1061
1056
  ] });
1062
1057
  }
1058
+ function switchDateTimeView(index, view) {
1059
+ if (endpointDisabled[index]) return;
1060
+ setActiveIndex(index);
1061
+ setDateTimeViews((previous) => index === 0 ? [view, previous[1]] : [previous[0], view]);
1062
+ }
1063
+ function renderDateTimeEndpoint(index) {
1064
+ const label = index === 0 ? "\u5F00\u59CB" : "\u7ED3\u675F";
1065
+ const view = dateTimeViews[index];
1066
+ return /* @__PURE__ */ jsxs2("section", { className: "sia-date-panel__endpoint", "aria-label": `${label}\u65E5\u671F\u65F6\u95F4`, children: [
1067
+ /* @__PURE__ */ jsxs2("div", { className: "sia-date-panel__views", children: [
1068
+ /* @__PURE__ */ jsx2("section", { className: `sia-date-panel__view sia-date-panel__view--date${view === "date" ? " is-active" : ""}`, "aria-hidden": view !== "date", ...view !== "date" ? { inert: "" } : {}, "aria-label": `${label}\u65E5\u671F`, children: renderDateTimeGroup(index) }),
1069
+ /* @__PURE__ */ jsx2("div", { className: `sia-date-panel__view sia-date-panel__view--time${view === "time" ? " is-active" : ""}`, "aria-hidden": view !== "time", ...view !== "time" ? { inert: "" } : {}, children: /* @__PURE__ */ jsx2(
1070
+ TimePanel,
1071
+ {
1072
+ value: times[index],
1073
+ showSecond,
1074
+ title: `\u9009\u62E9${label}\u65F6\u95F4`,
1075
+ unitLabels: true,
1076
+ ariaLabel: `\u9009\u62E9${label}\u65F6\u95F4`,
1077
+ disabledTime: endpointDisabled[index] ? () => true : void 0,
1078
+ onChange: (nextTime) => changeTime(index, nextTime)
1079
+ }
1080
+ ) })
1081
+ ] }),
1082
+ /* @__PURE__ */ jsx2(
1083
+ DateTimePanelFooter,
1084
+ {
1085
+ date: rangeDates[index] || dateKey(/* @__PURE__ */ new Date()),
1086
+ time: showSecond ? times[index] : times[index].slice(0, 5),
1087
+ view,
1088
+ disabled: endpointDisabled[index],
1089
+ onSwitchDate: () => switchDateTimeView(index, "date"),
1090
+ onSwitchTime: () => switchDateTimeView(index, "time")
1091
+ }
1092
+ )
1093
+ ] }, index);
1094
+ }
1063
1095
  const displayValue = visible && allowEmpty.some(Boolean) ? draftValue : currentValue;
1064
1096
  const startFloating = useFloatingPlaceholder({ mode: placeholderMode, placeholder: placeholder[0], filled: Boolean(displayValue[0]), active: visible });
1065
1097
  const endFloating = useFloatingPlaceholder({ mode: placeholderMode, placeholder: placeholder[1], filled: Boolean(displayValue[1]), active: visible });
@@ -1109,7 +1141,7 @@ function DateRangePicker({
1109
1141
  ref: popupRef,
1110
1142
  anchorRef: rootRef,
1111
1143
  open: visible,
1112
- className: `sia-date-panel${showTime ? " sia-date-panel--datetime" : " sia-date-panel--range"}${presets?.length ? " sia-date-panel--with-presets" : ""}`,
1144
+ className: `sia-date-panel${showTime ? " sia-date-panel--datetime-range" : " sia-date-panel--range"}${presets?.length ? " sia-date-panel--with-presets" : ""}`,
1113
1145
  role: "dialog",
1114
1146
  "aria-label": "\u65E5\u671F\u8303\u56F4\u9009\u62E9\u9762\u677F",
1115
1147
  onKeyDown: (event) => {
@@ -1121,20 +1153,9 @@ function DateRangePicker({
1121
1153
  children: [
1122
1154
  /* @__PURE__ */ jsxs2("div", { className: "sia-date-panel__body", children: [
1123
1155
  presets?.length ? /* @__PURE__ */ jsx2("aside", { className: "sia-date-panel__presets", "aria-label": "\u5FEB\u6377\u65E5\u671F\u8303\u56F4", children: presets.map((preset, index) => /* @__PURE__ */ jsx2("button", { type: "button", onClick: () => applyPreset(preset), children: preset.label }, index)) }) : null,
1124
- showTime ? /* @__PURE__ */ jsxs2("div", { className: "sia-date-panel__views", children: [
1125
- /* @__PURE__ */ jsx2("section", { className: `sia-date-panel__view sia-date-panel__view--date${dateTimeView === "date" ? " is-active" : ""}`, "aria-hidden": dateTimeView !== "date", "aria-label": `${activeIndex === 0 ? "\u5F00\u59CB" : "\u7ED3\u675F"}\u65E5\u671F`, children: renderDateTimeGroup(activeIndex) }, activeIndex === 0 ? "\u5F00\u59CB" : "\u7ED3\u675F"),
1126
- /* @__PURE__ */ jsx2("div", { className: `sia-date-panel__view sia-date-panel__view--time${dateTimeView === "time" ? " is-active" : ""}`, "aria-hidden": dateTimeView !== "time", children: /* @__PURE__ */ jsx2(
1127
- TimePanel,
1128
- {
1129
- value: times[activeIndex],
1130
- showSecond,
1131
- title: `\u9009\u62E9${activeIndex === 0 ? "\u5F00\u59CB" : "\u7ED3\u675F"}\u65F6\u95F4`,
1132
- unitLabels: true,
1133
- ariaLabel: `\u9009\u62E9${activeIndex === 0 ? "\u5F00\u59CB" : "\u7ED3\u675F"}\u65F6\u95F4`,
1134
- disabledTime: endpointDisabled[activeIndex] ? () => true : void 0,
1135
- onChange: (nextTime) => changeTime(activeIndex, nextTime)
1136
- }
1137
- ) })
1156
+ showTime ? /* @__PURE__ */ jsxs2("div", { className: "sia-date-panel__datetime-endpoints", children: [
1157
+ renderDateTimeEndpoint(0),
1158
+ renderDateTimeEndpoint(1)
1138
1159
  ] }) : /* @__PURE__ */ jsxs2("div", { className: "sia-date-panel__range-calendars", children: [
1139
1160
  /* @__PURE__ */ jsxs2("section", { className: "sia-date-panel__calendar", children: [
1140
1161
  /* @__PURE__ */ jsx2(
@@ -1162,13 +1183,10 @@ function DateRangePicker({
1162
1183
  ] })
1163
1184
  ] })
1164
1185
  ] }),
1165
- showTime ? /* @__PURE__ */ jsx2(
1166
- DateTimePanelFooter,
1186
+ showTime ? renderExtraFooter || invalidDateTimeRange || maxRangeDays ? /* @__PURE__ */ jsx2(
1187
+ DatePanelFooter,
1167
1188
  {
1168
- date: rangeDates[activeIndex] || dateKey(/* @__PURE__ */ new Date()),
1169
- time: showSecond ? times[activeIndex] : times[activeIndex].slice(0, 5),
1170
- view: dateTimeView,
1171
- disabled: endpointDisabled[activeIndex],
1189
+ showToday: false,
1172
1190
  extra: /* @__PURE__ */ jsxs2(Fragment2, { children: [
1173
1191
  renderExtraFooter?.(),
1174
1192
  invalidDateTimeRange ? /* @__PURE__ */ jsx2("small", { className: "sia-date-panel__range-error", children: "\u7ED3\u675F\u65F6\u95F4\u4E0D\u80FD\u65E9\u4E8E\u5F00\u59CB\u65F6\u95F4" }) : maxRangeDays ? /* @__PURE__ */ jsxs2("small", { children: [
@@ -1176,11 +1194,9 @@ function DateRangePicker({
1176
1194
  maxRangeDays,
1177
1195
  " \u5929"
1178
1196
  ] }) : null
1179
- ] }),
1180
- onSwitchDate: () => setDateTimeView("date"),
1181
- onSwitchTime: () => setDateTimeView("time")
1197
+ ] })
1182
1198
  }
1183
- ) : /* @__PURE__ */ jsx2(
1199
+ ) : null : /* @__PURE__ */ jsx2(
1184
1200
  DatePanelFooter,
1185
1201
  {
1186
1202
  showToday: showToday && !presets?.length,
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  Button
3
- } from "./chunk-4B7ATL6J.js";
3
+ } from "./chunk-PAWEP65C.js";
4
4
  import {
5
5
  useOverlayMotion,
6
6
  withTitleTooltip
7
- } from "./chunk-WMZYYPIW.js";
7
+ } from "./chunk-CUAXJCSH.js";
8
8
 
9
9
  // src/components/Icon.tsx
10
10
  import { forwardRef } from "react";
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  useFloatingPlaceholder
3
- } from "./chunk-CRA7VNOA.js";
3
+ } from "./chunk-OHAESA5R.js";
4
4
  import {
5
5
  useControlSize,
6
6
  withTitleTooltip
7
- } from "./chunk-WMZYYPIW.js";
7
+ } from "./chunk-CUAXJCSH.js";
8
8
 
9
9
  // src/components/TextArea.tsx
10
10
  import { forwardRef, useId, useState } from "react";
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  TextArea
3
- } from "./chunk-UL54A2YN.js";
3
+ } from "./chunk-J6BPKBEL.js";
4
4
  import {
5
5
  Button
6
- } from "./chunk-4B7ATL6J.js";
6
+ } from "./chunk-PAWEP65C.js";
7
7
  import {
8
8
  initializeDefaultScrollbars,
9
9
  withTitleTooltip
10
- } from "./chunk-WMZYYPIW.js";
10
+ } from "./chunk-CUAXJCSH.js";
11
11
 
12
12
  // src/components/ChartWhirlingLoading.tsx
13
13
  import { useEffect, useState } from "react";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  usePlaceholderMode
3
- } from "./chunk-WMZYYPIW.js";
3
+ } from "./chunk-CUAXJCSH.js";
4
4
 
5
5
  // src/components/FloatingPlaceholder.tsx
6
6
  import { jsx } from "react/jsx-runtime";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  useControlSize,
3
3
  withTitleTooltip
4
- } from "./chunk-WMZYYPIW.js";
4
+ } from "./chunk-CUAXJCSH.js";
5
5
 
6
6
  // src/components/Button.tsx
7
7
  import { forwardRef, useEffect, useRef } from "react";
@@ -1,19 +1,19 @@
1
1
  import {
2
2
  Dropdown,
3
3
  Input
4
- } from "./chunk-ZNPNZD6O.js";
4
+ } from "./chunk-23FQ5ARA.js";
5
5
  import {
6
6
  Icon,
7
7
  Modal,
8
8
  isAnchorBehindOverlay,
9
9
  subscribeOverlayLayers
10
- } from "./chunk-KA3M4TE4.js";
10
+ } from "./chunk-G5EJJFUI.js";
11
11
  import {
12
12
  Button
13
- } from "./chunk-4B7ATL6J.js";
13
+ } from "./chunk-PAWEP65C.js";
14
14
  import {
15
15
  useFloatingPlaceholder
16
- } from "./chunk-CRA7VNOA.js";
16
+ } from "./chunk-OHAESA5R.js";
17
17
  import {
18
18
  ControlSizeContext,
19
19
  FloatingScrollbarProvider,
@@ -22,7 +22,7 @@ import {
22
22
  useControllableState,
23
23
  useOverlayMotion,
24
24
  withTitleTooltip
25
- } from "./chunk-WMZYYPIW.js";
25
+ } from "./chunk-CUAXJCSH.js";
26
26
 
27
27
  // src/components/usePressFeedback.ts
28
28
  import { useEffect, useRef } from "react";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  useFloatingPlaceholder
3
- } from "./chunk-CRA7VNOA.js";
3
+ } from "./chunk-OHAESA5R.js";
4
4
  import {
5
5
  withTitleTooltip
6
- } from "./chunk-WMZYYPIW.js";
6
+ } from "./chunk-CUAXJCSH.js";
7
7
 
8
8
  // src/components/MarkdownEditor.tsx
9
9
  import { useEffect, useRef, useState } from "react";
@@ -1,26 +1,26 @@
1
1
  import {
2
2
  Popover,
3
3
  Tooltip
4
- } from "./chunk-MXK6TKMO.js";
4
+ } from "./chunk-SX4LLT3H.js";
5
5
  import {
6
6
  Dropdown
7
- } from "./chunk-ZNPNZD6O.js";
7
+ } from "./chunk-23FQ5ARA.js";
8
8
  import {
9
9
  TextArea
10
- } from "./chunk-UL54A2YN.js";
10
+ } from "./chunk-J6BPKBEL.js";
11
11
  import {
12
12
  Icon,
13
13
  useOverlayLifecycle
14
- } from "./chunk-KA3M4TE4.js";
14
+ } from "./chunk-G5EJJFUI.js";
15
15
  import {
16
16
  Button
17
- } from "./chunk-4B7ATL6J.js";
17
+ } from "./chunk-PAWEP65C.js";
18
18
  import {
19
19
  useControlSize,
20
20
  useControllableState,
21
21
  useOverlayMotion,
22
22
  withTitleTooltip
23
- } from "./chunk-WMZYYPIW.js";
23
+ } from "./chunk-CUAXJCSH.js";
24
24
 
25
25
  // src/components/Toolbar.tsx
26
26
  import { useLayoutEffect, useRef, useState } from "react";
package/dist/core.cjs CHANGED
@@ -820,7 +820,7 @@ var PopupPortal = (0, import_react4.forwardRef)(function PopupPortal2({
820
820
  cancelAnimationFrame(frame);
821
821
  observer.disconnect();
822
822
  };
823
- }, [anchorRef, offset, motion.present, placement, viewportPadding]);
823
+ }, [anchorRef, offset, motion.present, placement, viewportPadding, position?.availableHeight, position?.placement]);
824
824
  if (!motion.present || typeof document === "undefined") return null;
825
825
  return (0, import_react_dom.createPortal)(
826
826
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
package/dist/core.css CHANGED
@@ -7545,14 +7545,25 @@ body:has(.sia-window-frame[data-sia-text-selectable=false]) img {
7545
7545
  .sia-date-panel__cell.is-in-range {
7546
7546
  background: var(--sia-color-primary);
7547
7547
  }
7548
- .sia-date-panel__cell.is-range-start,
7549
- .sia-date-panel__cell.is-range-end {
7550
- background: transparent;
7548
+ .sia-date-panel__cell.is-in-range:not(.is-range-segment-end)::after {
7549
+ position: absolute;
7550
+ inset-block: 0;
7551
+ inset-inline-end: -4px;
7552
+ width: 4px;
7553
+ content: "";
7554
+ pointer-events: none;
7555
+ background: var(--sia-color-primary);
7551
7556
  }
7552
- .sia-date-panel__cell.is-in-range button,
7553
- .sia-date-panel__cell.is-range-start button,
7554
- .sia-date-panel__cell.is-range-end button {
7555
- border-radius: 0;
7557
+ .sia-date-panel__cell.is-range-segment-start {
7558
+ border-start-start-radius: 12px;
7559
+ border-end-start-radius: 12px;
7560
+ }
7561
+ .sia-date-panel__cell.is-range-segment-end {
7562
+ border-start-end-radius: 12px;
7563
+ border-end-end-radius: 12px;
7564
+ }
7565
+ .sia-date-panel__cell.is-in-range button {
7566
+ border-radius: inherit;
7556
7567
  }
7557
7568
  .sia-date-panel__cell button {
7558
7569
  position: relative;
@@ -7599,6 +7610,11 @@ body:has(.sia-window-frame[data-sia-text-selectable=false]) img {
7599
7610
  background: var(--sia-color-control-hover);
7600
7611
  border-color: transparent;
7601
7612
  }
7613
+ .sia-date-panel__cell.is-in-range button:disabled {
7614
+ color: rgb(255 255 255 / 55%);
7615
+ background: transparent;
7616
+ border-color: transparent;
7617
+ }
7602
7618
  .sia-date-panel__time {
7603
7619
  display: grid;
7604
7620
  grid-template-rows: 52px minmax(0, 1fr);
@@ -7665,6 +7681,64 @@ body:has(.sia-window-frame[data-sia-text-selectable=false]) img {
7665
7681
  transition: none;
7666
7682
  }
7667
7683
  }
7684
+ .sia-date-panel--datetime-range {
7685
+ width: max-content;
7686
+ }
7687
+ .sia-date-panel__datetime-endpoints {
7688
+ display: grid;
7689
+ grid-template-columns: repeat(2, 280px);
7690
+ min-width: 0;
7691
+ }
7692
+ .sia-date-panel__endpoint {
7693
+ display: flex;
7694
+ flex-direction: column;
7695
+ min-width: 0;
7696
+ }
7697
+ .sia-date-panel__endpoint + .sia-date-panel__endpoint {
7698
+ border-inline-start: 1px solid var(--sia-color-border);
7699
+ }
7700
+ .sia-date-panel__endpoint > .sia-date-panel__views {
7701
+ flex: none;
7702
+ }
7703
+ .sia-date-panel__endpoint > .sia-date-panel__footer {
7704
+ position: static;
7705
+ }
7706
+ .sia-date-panel--datetime-range.sia-date-panel--with-presets {
7707
+ display: grid;
7708
+ grid-template-columns: 145px minmax(0, 1fr);
7709
+ }
7710
+ .sia-date-panel--datetime-range.sia-date-panel--with-presets > .sia-date-panel__body {
7711
+ display: contents;
7712
+ }
7713
+ .sia-date-panel--datetime-range.sia-date-panel--with-presets .sia-date-panel__presets {
7714
+ grid-row: 1 / span 2;
7715
+ }
7716
+ .sia-date-panel--datetime-range.sia-date-panel--with-presets > .sia-date-panel__footer {
7717
+ grid-column: 2;
7718
+ }
7719
+ @media (max-width: 600px) {
7720
+ .sia-date-panel--datetime-range,
7721
+ .sia-date-panel--datetime-range.sia-date-panel--with-presets {
7722
+ width: 282px;
7723
+ }
7724
+ .sia-date-panel__datetime-endpoints {
7725
+ grid-template-columns: minmax(0, 1fr);
7726
+ }
7727
+ .sia-date-panel__endpoint + .sia-date-panel__endpoint {
7728
+ border-inline-start: 0;
7729
+ border-top: 1px solid var(--sia-color-border);
7730
+ }
7731
+ .sia-date-panel--datetime-range.sia-date-panel--with-presets {
7732
+ display: block;
7733
+ }
7734
+ .sia-date-panel--datetime-range.sia-date-panel--with-presets > .sia-date-panel__body {
7735
+ display: block;
7736
+ }
7737
+ .sia-date-panel--datetime-range .sia-date-panel__presets {
7738
+ border-inline-end: 0;
7739
+ border-bottom: 1px solid var(--sia-color-border);
7740
+ }
7741
+ }
7668
7742
  .sia-date-panel__time-columns > div {
7669
7743
  height: 100%;
7670
7744
  overflow: auto;
package/dist/core.js CHANGED
@@ -11,29 +11,29 @@ import {
11
11
  Typography,
12
12
  Upload,
13
13
  message
14
- } from "./chunk-UPXL2QLJ.js";
14
+ } from "./chunk-WR5YBY2A.js";
15
15
  import "./chunk-RX242MUO.js";
16
16
  import {
17
17
  Select
18
- } from "./chunk-MXK6TKMO.js";
18
+ } from "./chunk-SX4LLT3H.js";
19
19
  import {
20
20
  Input,
21
21
  Segmented
22
- } from "./chunk-ZNPNZD6O.js";
23
- import "./chunk-UL54A2YN.js";
22
+ } from "./chunk-23FQ5ARA.js";
23
+ import "./chunk-J6BPKBEL.js";
24
24
  import {
25
25
  Icon,
26
26
  Modal,
27
27
  Skeleton
28
- } from "./chunk-KA3M4TE4.js";
28
+ } from "./chunk-G5EJJFUI.js";
29
29
  import {
30
30
  Button
31
- } from "./chunk-4B7ATL6J.js";
32
- import "./chunk-CRA7VNOA.js";
31
+ } from "./chunk-PAWEP65C.js";
32
+ import "./chunk-OHAESA5R.js";
33
33
  import {
34
34
  FloatingScrollbarProvider,
35
35
  initializeDefaultScrollbars
36
- } from "./chunk-WMZYYPIW.js";
36
+ } from "./chunk-CUAXJCSH.js";
37
37
 
38
38
  // src/core.ts
39
39
  initializeDefaultScrollbars();
package/dist/game.cjs CHANGED
@@ -1198,7 +1198,7 @@ var PopupPortal = (0, import_react4.forwardRef)(function PopupPortal2({
1198
1198
  cancelAnimationFrame(frame);
1199
1199
  observer.disconnect();
1200
1200
  };
1201
- }, [anchorRef, offset, motion.present, placement, viewportPadding]);
1201
+ }, [anchorRef, offset, motion.present, placement, viewportPadding, position?.availableHeight, position?.placement]);
1202
1202
  if (!motion.present || typeof document === "undefined") return null;
1203
1203
  return (0, import_react_dom.createPortal)(
1204
1204
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
package/dist/game.js CHANGED
@@ -1,13 +1,13 @@
1
1
  import "./chunk-RX242MUO.js";
2
2
  import {
3
3
  Modal
4
- } from "./chunk-KA3M4TE4.js";
4
+ } from "./chunk-G5EJJFUI.js";
5
5
  import {
6
6
  Button
7
- } from "./chunk-4B7ATL6J.js";
7
+ } from "./chunk-PAWEP65C.js";
8
8
  import {
9
9
  initializeDefaultScrollbars
10
- } from "./chunk-WMZYYPIW.js";
10
+ } from "./chunk-CUAXJCSH.js";
11
11
 
12
12
  // src/game/hex-rules.ts
13
13
  var DEFAULT_GAME_ABILITIES = [