xmlui 0.11.1 → 0.11.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12168,15 +12168,20 @@ const TextMd = createMetadata({
12168
12168
  [`borderStyle-${COMP$1n}`]: "solid",
12169
12169
  [`fontSize-${COMP$1n}`]: "$fontSize-sm",
12170
12170
  [`borderWidth-${COMP$1n}`]: "$space-0",
12171
- [`lineHeight-${COMP$1n}-codefence`]: "1.5",
12172
- [`fontWeight-${COMP$1n}-abbr`]: "$fontWeight-bold",
12173
- [`textTransform-${COMP$1n}-abbr`]: "uppercase",
12174
- [`fontSize-${COMP$1n}-secondary`]: "$fontSize-sm",
12175
- [`fontStyle-${COMP$1n}-cite`]: "italic",
12176
12171
  [`textColor-${COMP$1n}`]: "$textColor-primary",
12177
12172
  [`fontFamily-${COMP$1n}`]: "$fontFamily",
12178
12173
  [`fontWeight-${COMP$1n}`]: "$fontWeight-normal",
12174
+ [`fontSize-${COMP$1n}-secondary`]: "$fontSize-sm",
12175
+ [`textColor-${COMP$1n}-secondary`]: "$textColor-secondary",
12176
+ [`fontWeight-${COMP$1n}-abbr`]: "$fontWeight-bold",
12177
+ [`textTransform-${COMP$1n}-abbr`]: "uppercase",
12178
+ [`fontStyle-${COMP$1n}-cite`]: "italic",
12179
12179
  [`fontSize-${COMP$1n}-codefence`]: "$fontSize-code",
12180
+ [`fontFamily-${COMP$1n}-codefence`]: "$fontFamily-monospace",
12181
+ [`paddingHorizontal-${COMP$1n}-codefence`]: "$space-4",
12182
+ [`paddingVertical-${COMP$1n}-codefence`]: "$space-3",
12183
+ [`textColor-${COMP$1n}-codefence`]: "$color-surface-900",
12184
+ [`lineHeight-${COMP$1n}-codefence`]: "1.5",
12180
12185
  [`fontFamily-${COMP$1n}-code`]: "$fontFamily-monospace",
12181
12186
  [`fontSize-${COMP$1n}-code`]: "$fontSize-sm",
12182
12187
  [`borderWidth-${COMP$1n}-code`]: "1px",
@@ -12184,6 +12189,8 @@ const TextMd = createMetadata({
12184
12189
  [`borderRadius-${COMP$1n}-code`]: "4px",
12185
12190
  [`paddingHorizontal-${COMP$1n}-code`]: "$space-0_5",
12186
12191
  [`paddingBottom-${COMP$1n}-code`]: "2px",
12192
+ [`backgroundColor-${COMP$1n}-code`]: "rgb(from $color-surface-100 r g b / 0.4)",
12193
+ [`borderColor-${COMP$1n}-code`]: "$color-surface-100",
12187
12194
  [`textDecorationLine-${COMP$1n}-deleted`]: "line-through",
12188
12195
  [`textDecorationLine-${COMP$1n}-inserted`]: "underline",
12189
12196
  [`fontFamily-${COMP$1n}-keyboard`]: "$fontFamily-monospace",
@@ -12191,6 +12198,8 @@ const TextMd = createMetadata({
12191
12198
  [`fontWeight-${COMP$1n}-keyboard`]: "$fontWeight-bold",
12192
12199
  [`borderWidth-${COMP$1n}-keyboard`]: "1px",
12193
12200
  [`paddingHorizontal-${COMP$1n}-keyboard`]: "$space-1",
12201
+ [`backgroundColor-${COMP$1n}-keyboard`]: "rgb(from $color-surface-100 r g b / 0.4)",
12202
+ [`borderColor-${COMP$1n}-keyboard`]: "$color-surface-300",
12194
12203
  [`fontFamily-${COMP$1n}-sample`]: "$fontFamily-monospace",
12195
12204
  [`fontSize-${COMP$1n}-sample`]: "$fontSize-sm",
12196
12205
  [`fontSize-${COMP$1n}-sup`]: "$fontSize-xs",
@@ -12205,28 +12214,20 @@ const TextMd = createMetadata({
12205
12214
  [`fontSize-${COMP$1n}-small`]: "$fontSize-sm",
12206
12215
  [`letterSpacing-${COMP$1n}-caption`]: "0.05rem",
12207
12216
  [`fontSize-${COMP$1n}-placeholder`]: "$fontSize-xs",
12208
- [`fontFamily-${COMP$1n}-codefence`]: "$fontFamily-monospace",
12209
- [`paddingHorizontal-${COMP$1n}-codefence`]: "$space-4",
12210
- [`paddingVertical-${COMP$1n}-codefence`]: "$space-3",
12217
+ [`textColor-${COMP$1n}-placeholder`]: "$color-surface-500",
12211
12218
  [`paddingVertical-${COMP$1n}-paragraph`]: "$space-1",
12212
12219
  [`fontSize-${COMP$1n}-subheading`]: "$fontSize-H6",
12213
12220
  [`fontWeight-${COMP$1n}-subheading`]: "$fontWeight-bold",
12214
12221
  [`letterSpacing-${COMP$1n}-subheading`]: "0.04em",
12215
12222
  [`textTransform-${COMP$1n}-subheading`]: "uppercase",
12223
+ [`textColor-${COMP$1n}-subheading`]: "$textColor-secondary",
12216
12224
  [`marginTop-${COMP$1n}-tableheading`]: "$space-1",
12217
12225
  [`marginBottom-${COMP$1n}-tableheading`]: "$space-4",
12218
12226
  [`paddingHorizontal-${COMP$1n}-tableheading`]: "$space-1",
12219
12227
  [`fontSize-${COMP$1n}-tableheading`]: "$fontSize-H6",
12220
12228
  [`fontWeight-${COMP$1n}-tableheading`]: "$fontWeight-bold",
12221
- [`backgroundColor-${COMP$1n}-code`]: "rgb(from $color-surface-100 r g b / 0.4)",
12222
- [`borderColor-${COMP$1n}-code`]: "$color-surface-100",
12223
- [`backgroundColor-${COMP$1n}-keyboard`]: "rgb(from $color-surface-100 r g b / 0.4)",
12224
- [`borderColor-${COMP$1n}-keyboard`]: "$color-surface-300",
12229
+ [`fontWeight-${COMP$1n}-strong`]: "$fontWeight-bold",
12225
12230
  [`backgroundColor-${COMP$1n}-marked`]: "rgb(from $color-primary-200 r g b / 0.4)",
12226
- [`textColor-${COMP$1n}-placeholder`]: "$color-surface-500",
12227
- [`textColor-${COMP$1n}-codefence`]: "$color-surface-900",
12228
- [`textColor-${COMP$1n}-subheading`]: "$textColor-secondary",
12229
- [`textColor-${COMP$1n}-secondary`]: "$textColor-secondary",
12230
12231
  dark: {
12231
12232
  [`backgroundColor-${COMP$1n}-marked`]: "rgb(from $color-primary-400 r g b / 0.4)"
12232
12233
  }
@@ -17036,9 +17037,12 @@ const styles$Q = {
17036
17037
  };
17037
17038
  const parseSize = (size, containerSize) => {
17038
17039
  if (size.endsWith("px")) {
17039
- return parseInt(size, 10);
17040
+ const pixels = parseInt(size, 10);
17041
+ return pixels < 0 ? containerSize + pixels : pixels;
17040
17042
  } else if (size.endsWith("%")) {
17041
- return parseInt(size, 10) / 100 * containerSize;
17043
+ const percentage = parseInt(size, 10);
17044
+ const actualPercentage = percentage < 0 ? 100 + percentage : percentage;
17045
+ return actualPercentage / 100 * containerSize;
17042
17046
  }
17043
17047
  throw new Error("Invalid size format. Use px or %.");
17044
17048
  };
@@ -17068,7 +17072,8 @@ const Splitter = ({
17068
17072
  ...rest
17069
17073
  }) => {
17070
17074
  var _a2;
17071
- const [size, setSize] = useState(0);
17075
+ const [sizePercentage, setSizePercentage] = useState(50);
17076
+ const [containerSize, setContainerSize] = useState(0);
17072
17077
  const [splitter2, setSplitter] = useState(null);
17073
17078
  const [resizerVisible, setResizerVisible] = useState(false);
17074
17079
  const [resizer2, setResizer] = useState(null);
@@ -17077,23 +17082,40 @@ const Splitter = ({
17077
17082
  () => floating ? floatingResizer2 : resizer2,
17078
17083
  [floating, resizer2, floatingResizer2]
17079
17084
  );
17085
+ const size = useMemo(() => {
17086
+ return sizePercentage / 100 * containerSize;
17087
+ }, [sizePercentage, containerSize]);
17088
+ useEffect(() => {
17089
+ if (!splitter2) return;
17090
+ const resizeObserver = new ResizeObserver((entries) => {
17091
+ for (const entry of entries) {
17092
+ const newContainerSize = orientation === "horizontal" ? entry.contentRect.width : entry.contentRect.height;
17093
+ setContainerSize(newContainerSize);
17094
+ }
17095
+ });
17096
+ resizeObserver.observe(splitter2);
17097
+ return () => {
17098
+ resizeObserver.disconnect();
17099
+ };
17100
+ }, [splitter2, orientation]);
17080
17101
  useEffect(() => {
17081
17102
  if (splitter2) {
17082
- const containerSize = orientation === "horizontal" ? splitter2.getBoundingClientRect().width : splitter2.getBoundingClientRect().height;
17083
- const initialParsedSize = parseSize(initialPrimarySize, containerSize);
17084
- setSize(initialParsedSize);
17103
+ const newContainerSize = orientation === "horizontal" ? splitter2.getBoundingClientRect().width : splitter2.getBoundingClientRect().height;
17104
+ setContainerSize(newContainerSize);
17105
+ const initialParsedSize = parseSize(initialPrimarySize, newContainerSize);
17106
+ const initialPercentage = toPercentage(initialParsedSize, newContainerSize);
17107
+ setSizePercentage(initialPercentage);
17085
17108
  if (resize2) {
17086
17109
  resize2([
17087
- toPercentage(initialParsedSize, containerSize),
17088
- toPercentage(containerSize - initialParsedSize, containerSize)
17110
+ initialPercentage,
17111
+ 100 - initialPercentage
17089
17112
  ]);
17090
17113
  }
17091
17114
  }
17092
17115
  }, [initialPrimarySize, orientation, resize2, splitter2, swapped]);
17093
17116
  useEffect(() => {
17094
17117
  const handleMouseMove = (event) => {
17095
- if (splitter2 && resizerElement) {
17096
- const containerSize = orientation === "horizontal" ? splitter2.getBoundingClientRect().width : splitter2.getBoundingClientRect().height;
17118
+ if (splitter2 && resizerElement && containerSize > 0) {
17097
17119
  const newSize = orientation === "horizontal" ? Math.min(
17098
17120
  Math.max(
17099
17121
  event.clientX - splitter2.getBoundingClientRect().left,
@@ -17107,11 +17129,12 @@ const Splitter = ({
17107
17129
  ),
17108
17130
  parseSize(maxPrimarySize, containerSize)
17109
17131
  );
17110
- setSize(newSize);
17132
+ const newPercentage = toPercentage(newSize, containerSize);
17133
+ setSizePercentage(newPercentage);
17111
17134
  if (resize2) {
17112
17135
  resize2([
17113
- toPercentage(newSize, containerSize),
17114
- toPercentage(containerSize - newSize, containerSize)
17136
+ newPercentage,
17137
+ 100 - newPercentage
17115
17138
  ]);
17116
17139
  }
17117
17140
  }
@@ -17134,7 +17157,7 @@ const Splitter = ({
17134
17157
  document.removeEventListener("mousemove", handleMouseMove);
17135
17158
  document.removeEventListener("mouseup", handleMouseUp);
17136
17159
  };
17137
- }, [minPrimarySize, maxPrimarySize, orientation, resize2, floating, resizerElement, splitter2]);
17160
+ }, [minPrimarySize, maxPrimarySize, orientation, resize2, floating, resizerElement, splitter2, containerSize]);
17138
17161
  useEffect(() => {
17139
17162
  const watchResizer = (event) => {
17140
17163
  const cursorPosition = orientation === "horizontal" ? event.clientX : event.clientY;
@@ -17255,7 +17278,7 @@ const baseSplitterMd = createMetadata({
17255
17278
  defaultValue: defaultProps$M.minPrimarySize
17256
17279
  },
17257
17280
  maxPrimarySize: {
17258
- description: `This property sets the maximum size the primary section can have. The unit of the size value is in pixels or percentages.`,
17281
+ description: `This property sets the maximum size the primary section can have. The unit of the size value is in pixels or percentages. Negative values are supported and calculate from the end of the container (e.g., "-20%" means "80% of container", "-100px" means "container size - 100px").`,
17259
17282
  valueType: "string",
17260
17283
  defaultValue: defaultProps$M.maxPrimarySize
17261
17284
  },
@@ -24329,7 +24352,7 @@ function ApiInterceptorProvider({
24329
24352
  return;
24330
24353
  }
24331
24354
  void (async () => {
24332
- const { initMock } = await import("./initMock-DhUnLKrR.js");
24355
+ const { initMock } = await import("./initMock-DdH1iCH-.js");
24333
24356
  const apiInstance2 = await initMock(interceptor);
24334
24357
  setApiInstance(apiInstance2);
24335
24358
  setInitialized(true);
@@ -24346,7 +24369,7 @@ function ApiInterceptorProvider({
24346
24369
  if (process.env.VITE_MOCK_ENABLED) {
24347
24370
  const [{ createApiInterceptorWorker }, { initMock }] = await Promise.all([
24348
24371
  useWorker ? import("./apiInterceptorWorker-QiltRtq1.js") : Promise.resolve({ createApiInterceptorWorker: () => null }),
24349
- import("./initMock-DhUnLKrR.js")
24372
+ import("./initMock-DdH1iCH-.js")
24350
24373
  ]);
24351
24374
  if (interceptor || forceInitialize) {
24352
24375
  const apiInstance2 = await initMock(interceptor || {});
@@ -24383,7 +24406,7 @@ function ApiInterceptorProvider({
24383
24406
  void (async () => {
24384
24407
  const [{ createApiInterceptorWorker }, { initMock }] = await Promise.all([
24385
24408
  import("./apiInterceptorWorker-QiltRtq1.js"),
24386
- import("./initMock-DhUnLKrR.js")
24409
+ import("./initMock-DdH1iCH-.js")
24387
24410
  ]);
24388
24411
  const apiInstance2 = await initMock(interceptor);
24389
24412
  await createApiInterceptorWorker(apiInstance2, parentInterceptorWorker);
@@ -43133,7 +43156,7 @@ function BarChart({
43133
43156
  "div",
43134
43157
  {
43135
43158
  ref: (el) => {
43136
- if (el && el !== tooltipElement) {
43159
+ if (el) {
43137
43160
  setTooltipElement(el);
43138
43161
  }
43139
43162
  },
@@ -43150,7 +43173,7 @@ function BarChart({
43150
43173
  height: miniMode || hideX ? 0 : xAxisHeight,
43151
43174
  tick: miniMode || hideTickX ? false : { fill: "currentColor", fontSize },
43152
43175
  tickFormatter: miniMode || hideTickX ? void 0 : tickFormatterX,
43153
- domain: [0, (dataMax) => dataMax * 1.05]
43176
+ domain: [0, (dataMax) => Math.ceil(dataMax * 1.05 / 10) * 10]
43154
43177
  } : {
43155
43178
  type: "category",
43156
43179
  dataKey: nameKey,
@@ -43180,7 +43203,13 @@ function BarChart({
43180
43203
  tickCount: yTickCount,
43181
43204
  tickFormatter: miniMode || hideTickY ? void 0 : tickFormatterY,
43182
43205
  width: miniMode || hideY ? 0 : yAxisWidth,
43183
- domain: [0, (dataMax) => dataMax * 1.1]
43206
+ domain: [
43207
+ 0,
43208
+ (dataMax) => {
43209
+ const roundedMax = Math.ceil(dataMax * 1.05 / 10) * 10;
43210
+ return roundedMax;
43211
+ }
43212
+ ]
43184
43213
  };
43185
43214
  return /* @__PURE__ */ jsxs(ChartProvider, { value: chartContextValue, children: [
43186
43215
  children,
@@ -44014,7 +44043,7 @@ const LineChart = forwardRef(function LineChart2({
44014
44043
  tickLine: false,
44015
44044
  tickFormatter: miniMode ? void 0 : tickFormatterY,
44016
44045
  tick: miniMode ? false : !hideTickY && { fill: "currentColor", fontSize },
44017
- domain: [(dataMin) => dataMin * 0.95, (dataMax) => dataMax * 1.05]
44046
+ domain: [0, (dataMax) => Math.ceil(dataMax * 1.05 / 10) * 10]
44018
44047
  }
44019
44048
  ),
44020
44049
  !miniMode && !hideTooltip && /* @__PURE__ */ jsx(Tooltip$2, { content: safeTooltipRenderer }),
@@ -46299,7 +46328,7 @@ function IconProvider({ children }) {
46299
46328
  /* @__PURE__ */ jsx("svg", { style: { display: "none" }, ref: spriteRootRef })
46300
46329
  ] });
46301
46330
  }
46302
- const version = "0.11.1";
46331
+ const version = "0.11.3";
46303
46332
  const miscellaneousUtils = {
46304
46333
  capitalize,
46305
46334
  pluralize: pluralize$1,
@@ -1,6 +1,6 @@
1
1
  import { delay as delay$1, HttpResponse, matchRequestUrl } from "msw";
2
2
  import { isArray, isObject, mapValues } from "lodash-es";
3
- import { r as runEventHandlerCode, g as getDate, d as delay, m as miscellaneousUtils, a as dateFunctions, o as orderBy, T as ThrowStatementError } from "./index-CEq6OdjV.js";
3
+ import { r as runEventHandlerCode, g as getDate, d as delay, m as miscellaneousUtils, a as dateFunctions, o as orderBy, T as ThrowStatementError } from "./index-DSUDwtWN.js";
4
4
  import Dexie from "dexie";
5
5
  var HttpStatusCode = /* @__PURE__ */ ((HttpStatusCode2) => {
6
6
  HttpStatusCode2[HttpStatusCode2["Continue"] = 100] = "Continue";
@@ -1,4 +1,4 @@
1
- import { m as main, s as start } from "./server-common-2DaoOOL5.js";
1
+ import { m as main, s as start } from "./server-common-hq0poDwA.js";
2
2
  var browser = main;
3
3
  const messageReader = new browser.BrowserMessageReader(self);
4
4
  messageReader.listen((message) => {
@@ -1,4 +1,4 @@
1
- import { m as main, s as start$1 } from "./server-common-2DaoOOL5.js";
1
+ import { m as main, s as start$1 } from "./server-common-hq0poDwA.js";
2
2
  var node = main;
3
3
  function start() {
4
4
  const connection = node.createConnection(node.ProposedFeatures.all);